Improvements from AS3 for Math functions [?]

Software: Away3D 4.x

Cermunnos, Newbie
Posted: 22 October 2012 01:33 PM   Total Posts: 1

Hi,

I have an 2d as3 particle physics simulation that uses lots of Math.sqrt, multiplication, distance calculations and collisions detection between 100s of circular vector objects. I want to increase this to 1000s

Is Away3d any good at these calculations or is more a platform to generate polygons quickly and the like?

Regards,
C

   

Karim Beyrouti, Administrator
Posted: 22 October 2012 04:47 PM   Total Posts: 30   [ # 1 ]

For math.abs you have:
private static function abs( value:Number ):Number{ return value < 0 ? -value : value;}

If you are using any kind of raycasting try this function:
http://www.simppa.fi/blog/extremely-fast-line-algorithm-as3-optimized/
(much faster than bresenheim).

Also, have a look at : http://jacksondunstan.com/articles/1217 - he has lots of optimisations on his blog…

and this one:
http://www.nbilyk.com/optimizing-actionscript-3

and don’t take their work for it - test… hope this helped…

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X