Eventlisteners and Performance…

Software: Away3D 4.x

Mr Margaret Scratcher, Sr. Member
Posted: 10 July 2011 03:34 PM   Total Posts: 344

Hi there, I’m having a bit of an issue with performane in Broomstick, whereby having event listeners on some objects causes a massive hit in performance. At the moment I have an imported OBJ, which runs nice at smooth at a rock steady 60fps. Then I generate 20 cubes, with eventlisteners for mouseover, mouseclick, mouseout. This causes the fps to drop down to around 30, blipping up to 60 fps every now and again, this is with the camera not moving at all, and no objects moving around.

However if I then comment out the eventlisteners, I get a steady 60fps again..

Am I doing something wrong, or is it always the case that event listeners should affect performance like this?

   

Avatar
theMightyAtom, Sr. Member
Posted: 10 July 2011 04:24 PM   Total Posts: 669   [ # 1 ]

Hi Mr. M,

Adding mouseEnabled=true does add to the rendering loop, but your example sounds extreme.

I’d recommend you post a link to your example and the code. Makes it a lot easier to see if you’re “doing something wrong”.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X