[Golist] Sneek peak at DepthTween
Joel Stransky
joel at stranskydesign.com
Mon Jun 23 17:10:11 PDT 2008
Hey peeps,
My first Go package is finally taking shape. It's very early in development
but I couldn't wait to show you all.
I really wanted to have this done in time for flashbelt but hey, maybe next
time. :)
DepthTween is a 2.5D position manager. It basically manages a list of
objects and updates their stacking order when any of their draw() methods
are called.
You first create an instance of DepthManager and pass a
DisplayObjectContainer. Children of that DOC can then be initialized and
have 3d tween methods called on them.
http://lab.stranskydesign.com/depthTween.html
Currently I'm struggling with what form of virtual x and virtual y to go
with. The goal of the class is to simply add a z property to existing
DisplayObjects. Currently I'm using a right-hand system which makes calling
3dtweens a little weird if you're not used to thinking in 3d as an objects
0,0,0 point becomes the center of the DisplayObjectContainer and half way
between the foreground and background instead of the upper left corner like
we're used to.
The catch is, if I keep x and y relative to the upper left corner (reverse
cartesian), you still have to get used to thinking in terms of those
coordinates augmented by z-depth.
I've got a lot of planned features and although it's very early I'd
appreciate any feedback/questions/suggestions.
--
--Joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080623/8eb40b4e/attachment.html
More information about the GoList
mailing list