leota

Members
  • Content Count

    30
  • Joined

  • Last visited

About leota

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. Yes it is. It's not exactly what I was looking for, as it applies a uniform subdivision, but it's good enough. Thanks!
  2. I see that other shapes have that parameter. On the box would be useful for 3D modeling puposes
  3. That's a shame Is there any easy workaround to achieve that? Or do I have to modify that Class to implement this change?
  4. You can see here: https://threejs.org/docs/index.html#api/geometries/BoxGeometry (Can open GUI controls at the top right)
  5. When creating a Box using BABYLON.MeshBuilder.CreateBox() I can pass it parameters like width, height and depth, but I don't see widthSegments, or heightSegments for example. Is there a way to do that?
  6. I come from Three.js, where you create a geometry and the assign it to a Mesh, and that's what the mesh will look like. So from what you're saying this is not possible in BJS, and I'm a bit confused about some concepts. What's the purpose of having a BoxGeometry class then? Can you please make a pratical example where I can use geometries?
  7. I have created a BoxGeometry and then added it to a Mesh. The problem is that no matter what size a give it, it always gets rendered as size=1. I also created a box using BABYLON.MeshBuilder.CreateBox(), and there it works fine, size is updated as expected. Here's the PG: http://playground.babylonjs.com/#UUJWXS Problem is at line 14: var box = new BABYLON.BoxGeometry('box', scene, 8, true, mesh, 4); as you can see size is set to 8, but actually it gets rendered smaller the the other box which has size 4.
  8. Thanks, I need a solution that work on any kind of geometry, so recreating and reassigning the mesh seems to be the best solution so far.
  9. Ok so basically I need to reassign the "mesh" variable to a newly created mesh. Thought there was a method to explicitly trigger a mesh update, but that's fine too. Thx!
  10. mmh not really....I need to update geometry parameters. For example, if I use a CylinderGeometry I would need to change "diameterTop", so the scaling trick would not work.
  11. Yep you're right, callling engine.resize() on every canvas change works fine. Still have the issue at the first frame but I've fixed it calling the engine.resize() when the DOM has been fully rendered: ngAfterViewInit() { this.scene.engine.resize(); } like this I can get rid of the setTimeout() fix. Thanks everyone for the support 😃
  12. I've created a BoxGeometry and assigned it to a Mesh, then when I click on the Mesh I would like to trigger an update of the geometry, for example change its "size" parameter. Is there a method I need to call on the Mesh to update it? I can see that the size property of the geometry gets updated, but the Mesh is still using the cached version. This is probably an easy thing to do, but I'm struggling a bit as I'm very new to Babylon. I've created a PG here: http://www.babylonjs-playground.com/#JTA9RH Any help would be much appreciated
  13. Awesome! Situation is getting very interesting here 🤔 Hope someone can give an explaination regarding this issue