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…
Do I need to render everyframe to do a tweening?Software: Away3D 3.x |
||
|
||
|
||
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. |
||
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. |