Jump to content

How can I animate the CreateLines()


matthewharwood
 Share

Recommended Posts

I have a pretty complex shape that is created from points and the createLines() method.

http://www.babylonjs-playground.com/#1ZAJZK#1

 

The Math is taken from a book I bought http://www.amazon.com/Morphing-Mathematical-Transformations-Architects-Designers/dp/1780674139 and I would like to get a better idea of how the math draws the shape.

 

Therefore, How would animate lines e.g. How can I get the lines to appear as if they are drawing in over a 10 second period?

Link to comment
Share on other sites

Hey deltakosh!  

Thanks for the welcoming!! And thank you for being so quick in your response!!!

Yeah I thought I could do the short timeout.  It just bothered me so I didn't try lol. but the timeout will satisfy my curiosity, so thanks for the confidence.

I have lots more questions as I stumble through learning babylonjs.  Looking forward to hearing from you more ;)

Link to comment
Share on other sites

if the number of points in your line doesn't change, but only the point positions, you could also re-use the CreateLine() method directly in the render loop

http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#lines-and-dashedlines

The same for a LineSystem object : http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#linesystem

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...