Dynamically updating geometry…

Software: Away3D 4.x

Karim Beyrouti, Administrator
Posted: 14 February 2012 02:03 PM   Total Posts: 30

First post - thank you for all the lovely work on Away3D - it’s great.

I am using Dev for this one - is there is a better way of doing this:

var sg : SphereGeometry = mesh.geometry as SphereGeometry;
  sg.radius = Math.sin ( t + ( index / 100 ) ) * 10;
mesh.geometry = sg;

I am trying to get my mesh to dynamically resize but it’s very slow with 200 objects…. any tips on optimising this bit of code?...

Any help much appreciated… thanks again…

- Karim

   

Karim Beyrouti, Administrator
Posted: 14 February 2012 02:49 PM   Total Posts: 30   [ # 1 ]

Aha - sorted, what a Newbie question…
tweaking the scale ( mesh.scale( v ); ) make more sense…
no need to re-create geometry…

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X