[Golist] This looks a bit better as far as syntax

Asher Graeme graemea at zaaz.com
Tue May 6 13:17:20 PDT 2008


John,

I have never seen an approach like this, but it is appealing at first  
glance.  It would appear that this might also create a speed gain via  
direct access/no parsing, compared to traditional implementations we  
have seen so far.  Have you run any test to see if this approach does  
perform better?

Graeme


On May 6, 2008, at 12:54 PM, John Grden wrote:

> Was this:
> tween_0 = new Tween3D(target, 1, Equations.easeOutCubic);
> tween_0.x = 0;
> tween_0.y = 50;
> tween_0.rotationZ = 0;
> sequence.addStep(tween_0);
>
> sequence.lastStep.advance = new OnDurationComplete(.2); // advance  
> early/overlap
> tween_0b = new Tween3D(target, 1, Equations.easeOutCubic);
> tween_0b.z = 200;
> sequence.addStep(tween_0b, true); // 2nd param groups it with  
> previous step. param is "addToLastStep"
>
> tween_1 = new Tween3D(target, 1, Equations.easeOutCubic);
> tween_1.x = -10;
> tween_1.y = 85;
> tween_1.rotationZ = 15;
> sequence.addStep(tween_1);
> sequence.lastStep.advance = new OnDurationComplete(.25); // advance  
> early/overlap
>
> tween_2 = new Tween3D(target, 1, Equations.easeOutBounce);
> tween_2.rotationX = 0;
> tween_2.rotationY = 0;
> sequence.addStep(tween_2);
>
> Is now this:
>
> tween_0 = new Tween3D(target, [Go3D.x(0), Go3D.y(50),  
> Go3D.rotationZ(0)], 1, Equations.easeOutCubic);
> sequence.addStep(tween_0);
> sequence.lastStep.advance = new OnDurationComplete(.2); // advance  
> early/overlap
>
> tween_0b = new Tween3D(target, [Go3D.z(200)], 1,  
> Equations.easeOutCubic);
> sequence.addStep(tween_0b, true); // 2nd param groups it with  
> previous step. param is "addToLastStep"
>
> tween_1 = new Tween3D(target, [Go3D.x(-10), Go3D.y(85),  
> Go3D.rotationZ(15)], 1, Equations.easeOutCubic);
> sequence.addStep(tween_1);
> sequence.lastStep.advance = new OnDurationComplete(.25); // advance  
> early/overlap
>
> tween_2 = new Tween3D(target, [Go3D.rotationX(0),  
> Go3D.rotationY(0)], 1, Equations.easeOutBounce);
> sequence.addStep(tween_2);
>
>
> I'm still thinking about this approach, but thought I would throw it  
> out to you guys to see what you thought.  Right now, there's static  
> methods in Go3D that return a Go3Dproperty.  Tween3D has an array  
> called propertyChanges and if there is an array in the  
> propertyChanges argument, I just set it straight away - no parsing  
> required.  It's all ready to go and is filled with Go3DProperty  
> objects.
>
> Thoughts?
> -- 
> [ JPG ] <ATT00001.txt>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080506/5b568b03/attachment.html 


More information about the GoList mailing list