PDA

View Full Version : my first 3d asctionscript! yay!



zylum
April 18th, 2003, 07:16 PM
i'm not sure if this would be considered a *real* 3d engine but it does have z-sorting. this is the first time i real appretiated the power of functions. without them, the AS would be over 500 lines long but it's only 49 right now. here's a link to the swf...3d_balls.swf (http://zylum1.tripod.com/3d_balls.html)
it uses my *patented* circular motion. the balls are all duplicates of one ball and a function is applyed to them to convert the three imaginary coordinates (x,y,z) into two coordinates which flash can understand. the balls go around in circles around their x , z plane. each ball has a different rotation around the x axis so that the balls also move up and down rather than just side to side (the balls would only move side to side if the y and z axis weren't rotated aroud the x axis since their movement is only on the x z plane) the scale and alpha is change relative to the z coordinate of the ball. every frame, the balls depth is swaped to become the same as their z coordinate. this acts as the z-sorting. if you would like to see a fla and further explanation, just ask. the AS isn't terribly difficult.

- mike

eyeinfinitude
April 18th, 2003, 07:45 PM
Looks good, I saw something similar awhile back, but I can't remember where. I'll post a link once I can remember. =)

blah-de-blah
April 19th, 2003, 11:27 PM
Well i'd definately like to see an fla of that since you said its not terribly difficult, if you wouldn't mind :)

andr.in
April 20th, 2003, 12:27 AM
Congratrulations! Doesn't it feel good to accomplish something? :) Haven't felt that for a while now....

zylum
April 21st, 2003, 11:13 PM
the AS is fairly straight forward except for the formulas which rotate the axis to match the flash coordinate system. I hope the *extensive* internal documentation helps and if anything is unclear, please let me know and ill help

the fla...

pom
April 23rd, 2003, 05:20 AM
Pretty cool :)

deamothul
April 23rd, 2003, 05:48 AM
Like ITI:-) ,uuuhhhmm no, Love IT:beam:

Greetz from deamothul - the script keeper -

markcq
April 24th, 2003, 07:35 AM
similar to what i'm busy with now... first is a drag and drop function. and the other one has random movement... my code is still in a mess, but i'm busy cleaning up.:alien:

source file for random movement perspective (http://www.geocities.com/markcq2002/perspect.zip)

markcq