• Content count

  • Joined

  • Last visited

  • Days Won


Kesshi last won the day on April 20 2016

Kesshi had the most liked content!

About Kesshi

  • Rank
    Advanced Member

Recent Profile Visitors

1,683 profile views
  1. Kesshi

    Ortho camera

    If you have a sphere with a diameter of 10 units, you have to use an ortho value of 5 to make it exactly fit to the view. camera.orthoTop = 5; //5 units to the top camera.orthoBottom = -5; //5 units to the bottom camera.orthoLeft = -5; //5 units to the left camera.orthoRight = 5; //5 units to the right
  2. Here is my answer to a similar topic. Maybe it helps:
  3. Kesshi

    Multiple Textures on same Geom

    To enable correct alpha blending you should enable "useAlphaFromDiffuseTexture" at your material. See line 25:
  4. Kesshi

    Empty screenshot

    When you create the BABYLON.Engine the option "preserveDrawingBuffer" has to be enabled. Maybe that helps.
  5. It works after calling "SG.recreateShadowMap()"
  6. Kesshi

    Problems with debugLayer in Firefox

    I also see a small difference. (Firefox 57.0.2) With debug layer = 53 fps Without = 60 fps I get the same numbers with IE 11. In Chrome and Edge i always have 60 fps.
  7. just use "scene.meshes". Its an array of all mesehs in the scene.
  8. Kesshi

    Uses of CreateScreenshot

    The way CreateScreenshot is working has changed internally. I think this tutorial was not updated. If you want the old behaviour, you have to use CreateScreenshotUsingRenderTarget.
  9. Kesshi

    Please welcome the TransformNode

    I found another issue. If i don't use TransformNodes i'm able to clone a mesh with all its children but if i have a TransformNode somewhere in my hierarchy this does not work. It would be nice if i could clone everything at once. See this playground:
  10. Kesshi

    Please welcome the TransformNode

    I have some ideas to improve it a bit. - (this more like a bug) dispose() does not remove the TransformNode from the Scene. transformNodes array - dispose() should also dispose all the children (meshes and other transform nodes) of the current node, just like the dispose function of AbstractMesh currently its a bit complicated to dispose a whole hierarchie if Meshes and TransformNodes are mixed - there should be a getChildTransformNodes() helper just like getChildMeshes() I could work on a PR if you want.
  11. Lines with a custom width are not possible with WebGL (at least not on windows plattforms). You have to simulate it with triangles. You can have a look here: In my project i created a basic implementation of that technique by creating a custom BabylonJS mesh and a shader.
  12. Kesshi

    Babylonjs 3.1 - beta phase

    I just noticed that the following types are declared in global scope inside the babylon.d.ts declare type Nullable<T> = T | null; declare type float = number; declare type double = number; declare type int = number; declare type FloatArray = number[] | Float32Array; declare type IndicesArray = number[] | Int32Array | Uint32Array | Uint16Array; Is this on purpose? I don't think that this is a good idea. Atleast the IndicesArray was declared inside the BABYLON namespace before.
  13. You did not devine the number of samples in your PG. I fixed it in line 64 here: I used 16 samples.
  14. Kesshi

    Multiply a Vector3 times a Quaternion

    Here are two versions of my "rotateVector3ToRef" function. basic version: export function rotateVector3ToRef(pV: BABYLON.Vector3, pRot: BABYLON.Quaternion, pResult: BABYLON.Vector3): void { //pResult = pRot * pV * conjugate(pRot) let tQuat = pRot.multiply(new BABYLON.Quaternion(pV.x, pV.y, pV.z, 0)); tQuat.multiplyInPlace(pRot.conjugate()); pResult.x = tQuat.x; pResult.y = tQuat.y; pResult.z = tQuat.z; } And a faster version based on this: This is the one i'm using in production. export function rotateVector3ToRef(pV: BABYLON.Vector3, pRot: BABYLON.Quaternion, pResult: BABYLON.Vector3): void { //t = 2 * cross(, pVector) //pResult = pVector + pRotation.w * t * cross(, t) let tx = 2 * (pRot.y * pV.z - pRot.z * pV.y); let ty = 2 * (pRot.z * pV.x - pRot.x * pV.z); let tz = 2 * (pRot.x * pV.y - pRot.y * pV.x); pResult.x = pV.x + pRot.w * tx + (pRot.y * tz - pRot.z * ty); pResult.y = pV.y + pRot.w * ty + (pRot.z * tx - pRot.x * tz); pResult.z = pV.z + pRot.w * tz + (pRot.x * ty - pRot.y * tx); }
  15. Kesshi

    WebGL2 occlusion queries

    I can also reproduce it everytime in ff55. Background is always green and the sphere is invisible. WebGL 2 is available. It is working in Chrome on the same machine.