Do I need to render everyframe to do a tweening?

Software: Away3D 3.x

Hwang, Newbie
Posted: 06 September 2011 02:17 AM   Total Posts: 1

I tried to use Greensock to do my animation, but I notice it doesn’t do any animation unless I render the view constantly. Is it like that, or I’m missing something? Cause having ENTER_FRAME to run constantly is bad…

   

Avatar
Choons, Sr. Member
Posted: 06 September 2011 03:38 AM   Total Posts: 281   [ # 1 ]

yeah that is just how Away3D works- render needs to be called every frame. It’s the same as what Flash does internally if you think about it.

   

Richard Olsson, Administrator
Posted: 06 September 2011 08:19 AM   Total Posts: 1192   [ # 2 ]

There’s nothing wrong with having a (single) ENTER_FRAME listener running constantly. And when you think about the number of CPU cycles that are used to render the scene, the ENTER_FRAME event handler is likely not doing a relevant impact on your app’s performance.

   

Avatar
Alejandro Santander, Administrator
Posted: 06 September 2011 11:15 PM   Total Posts: 414   [ # 3 ]

If you want to keep your app as optimized as possible, then add the enterframe listener when the animation starts and remove it once it ends. OR, render the view whenever the tween is updated.

Of course, this is assuming that as animation we understand all possible moments where the position of objects in regard to the camera change. Its up to you to determine when the view needs to be rendered.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X