• Content count

  • Joined

  • Last visited

About Gijs

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Gijs

    Label above the mesh

    I don't know what the best way is, but I did it by manually setting the TextBlock top and left each frame: To get the screen position of something on screen: function worldToScreen(worldVec: BABYLON.Vector3, engine: BABYLON.Engine, scene: BABYLON.Scene) { let identity = BABYLON.Matrix.Identity(); let viewport = scene.activeCamera!.viewport.toGlobal(engine.getRenderWidth(), engine.getRenderHeight()); let transform = scene.getTransformMatrix(); return BABYLON.Vector3.Project(worldVec, identity, transform, viewport); } Then I set the top and left, like this (note the 30 px): let pos = worldToScreen(node.position, engine, scene); textBlock.left = pos.x - this.canvas.width / 2; = pos.y - this.canvas.height / 2 - 30;
  2. How far did you get after ?
  3. That's awesome! And it's notable how so much was going on behind the scenes before making it to the convention, which is something that is easily overlooked. This is also good news: I've been assured by the creators and lead developers of babylon.js that they have secured an agreement with Microsoft ensuring the framework remain open source and free. It would be cool if I could scan my face on my Xperia.. 🤩 . Thank you for your service.
  4. Gijs

    Animation State Machine Progress

    Hi Mackey, I watched the video, and I tried some things, but to no avail... but then I found this: Seems like the answer is somewhere in there, now you just gotta make sense of it 🤔 I wish I could be of more help, because it's a really nice project you are working on! Keep it up! 🙂
  5. This function gets called in the end of the creation function when you create a BJS mesh like a plane: So that's how meshes get their sides changed from the initial front side; their vertex data get changed. That's my 2 cents.
  6. Gijs

    Photorealistic Skydome for Babylon

    Reading the Shadertoy comments, apparently @BitOfGold made this shader and used it in his BJS project here: @BitOfGold, nice work! What are your thoughts on this? And the shader code is licensed under the default Shadertoy license, right? (CC Attribution-NonCommercial-ShareAlike 3.0 Unported)
  7. Gijs

    Import SVG Paths -- suggestion

    Or you could make an addCurveTo method using a Curve3, like this (not tested): BABYLON.Path2.prototype.addCurveTo = function(redX, redY, blueX, blueY){ let points = this.getPoints(); let lastPoint = points[points.length - 1]; let origin = new BABYLON.Vector3(lastPoint.x, lastPoint.y, 0); let control = new BABYLON.Vector3(redX, redY, 0); let destination = new BABYLON.Vector3(blueX, blueY, 0); let nb_of_points = 10; let curve = BABYLON.Curve3.CreateQuadraticBezier(origin, control, destination, nb_of_points); let curvePoints = curve.getPoints(); for(let i=1; i<curvePoints.length; i++){ this.addLineTo(curvePoints[i].x, curvePoints[i].y); } }
  8. Gijs

    Import SVG Paths -- suggestion

    You could use Curve3 instead of Path2, and turn the curve into a Path2 later if you need that. Then instead of addLine, you make a new Curve3 that is the line, and use yourCurve.continue(the new curve) to get the added curve. To get the quadratic curve, you can use: Good luck with your project
  9. Gijs

    GUI HUD - Background Image

    You could overwrite the function that draws the background color:
  10. Gijs

    How To Mirror Matrix Pose

    How about bone._martix.invert()?
  11. You could take the initial rotation and the lookAt rotation (Quaternions), and interpolate between them (slerp):
  12. Hi all, I have this playground: In it, there is box, and an instance of box, which is box2. box has isVisible set to false, and after 1000 ms, has its material changed to swapMat. This is what happens then: Chrome/Opera: When swapMat is normalMat, nothing seems to happen. When swapMat is set to greenMat, box2 disappears, and the following errors show: Firefox/Edge: When swapMat is normalMat, box2 turns white. When swapMat is greenMat, box2 turns green with no errors. Setting isVisible to true right before/after changing the material makes it work as expected. The same happens in the stable version. What could it be? Thanks.
  13. I don't know what causes it, but can't you just remove the timeout?
  14. Gijs

    MeshBuilder.CreateLineSystem() TS errors

    It's not failing to compile, it's only saying there's an error. It'll run just fine.