ggg Posted March 1, 2017 Share Posted March 1, 2017 (edited) I'm new here. I got samples from babylonjs for drawing lines in 3D. It looks fine. I want to know how we can extend lines with new points at runtime? Could anyone please help me out? Source: http://www.babylonjs-playground.com/#165IV6#8 Edited March 1, 2017 by ggg adding link to the demo Quote Link to comment Share on other sites More sharing options...
jerome Posted March 1, 2017 Share Posted March 1, 2017 no, you can't. A line, like other updatable meshes, can't be extended, just morphed. This means only the positions of the points can change, not their number because the internal geometry has to keep the same : the vertex number and how they are linked together (indices). http://doc.babylonjs.com/tutorials/how_to_dynamically_morph_a_mesh To add points on an existing line, I'm afraid you need to simply rebuild a new one. Quote Link to comment Share on other sites More sharing options...
ggg Posted March 1, 2017 Author Share Posted March 1, 2017 Thanks jerome. You are right. We need to rebuild a new one every time a new point needs to be added. I got to achieve with your guidance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.