Dynamic lines with pathExtrude?

Software: Away3D 4.x

Hector, Sr. Member
Posted: 16 December 2013 10:41 PM   Total Posts: 137

Hi all,
I need to create dynamic lines (with arrowheads) that the user can draw or modify.
I can create a pathExtrude on mouse move, but I was wondering if it is possible to have a single pathExtrude object and change the ‘path’ property to modify the shape.
Is there a better way to do this with the current v4.1? Maybe a different type of object other than pathExtrude?

   

Raph, Newbie
Posted: 12 April 2015 12:49 AM   Total Posts: 6   [ # 1 ]

Hello!

I have looked everywhere but I have not yet found any solution :’( . My issue is more or less the same as the one presented in this (old) post : I’m trying to generate a tube , and make it move by controling the path.

Apparently, to update the vertex positions at eachh frame, I need to remove the “pathExtrude” from the scene, create a new one with the updated path, and put it back to the scene… By doing that, the frame rate drops down significantly.

Moreover, if I use the “scale” parameter, the profile used to regenerate the pipe is altered by the previous “pathExtrude” initialization.

Is there a way to update the pipe geometry properly?

thank you in advance for your help.

   

Avatar
Fabrice Closier, Administrator
Posted: 12 April 2015 07:20 PM   Total Posts: 1265   [ # 2 ]

This class could use an update for sure, but that will probably not fix your performance issues, as this class is not ment to be updated on enterFrame.
You need to write a vertex shader to handle smooth update.
Ik wrote a new animator for this kind of modifiers. Even if I would push it (needs polishing and to be updated to animators 4.2 api), you’d still need to write the dedicated shader to make it happend.

Not as smooth as shader based, tho if your tube isn’t too complex and not having too many segments, updating the vertices only could perform ok. Where you’d build once, and update the vertices buffer with a reduced routine that would only align the vertices to the bezier curve.

   

Raph, Newbie
Posted: 12 April 2015 10:49 PM   Total Posts: 6   [ # 3 ]

Thank you Fabrice!
I’m not a professional programer, and I try to learn by myself. It seems that a big headache is coming soon but I will try to implement your solution.
Thank you again for your help!

you rock!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X