Search the Community
Showing results for tags 'lathe'.
-
Hi all, Very new to Babylon, and indeed 3D stuff (a couple of days). I've created a lathe mesh which I'm happy with, but would also like to be able to update the shape of it dynamically. Is this possible? I may be mis-reading, but the documentation would suggest no and yes, in that there's no method for an updated mesh as there is with ribbons, extruded shapes etc. (and I think I read somewhere which I can't find now that you couldn't). But, there is an 'updatable' property on the lathe which gives me hope you might be able to! Any advice greatly appreciated :-)
-
Hi people, I just added a new optional parameter, called invertUV (boolean, default false) to every ribbon based shapes : ribbon, tube, lathe, standard and custom extrusion. var rib = BABYLON.MeshBuilder.CreateRibbon("r", {pathArray: paths, invertUV: true}, scene); This swaps the U and V coordinates at geometry construction time. What is this for ? Imagine you've got two different meshes, say, a tube and a sphere and they share, for performance reasons, the same material/texture. You notice then that the texture is applied on to the tube the wrong way (horizontally, for instance) compared to what you expected, but the right way on the sphere. If you build your texture by rotating the image for 90°, you will have then a right textured tube but a wrong textured sphere. So instead of making two different images and to use then two different textures/materials to solve your problem, you can now just invert the UV on the tube and its texture will switched horizontally/vertically. [EDIT] : 2 tubes, one material/texture, 2 different orientations http://www.babylonjs-playground.com/#G6DG0#8