[Golist] This looks a bit better as far as syntax
Karsten Goetz
KarstenGoetz at web.de
Wed May 7 10:35:36 PDT 2008
Hi John,
i tried somthing like this, too. I've post it on playground here:
GoPlayground/KarstenGoetz/src/de/karstengoetz/tests/TgoTween.as
It's nearly without comments and I did not make a wiki entry, too
( sorry... ).
The intention was to keep the init-possibilies of a tween open, and I
came up to use a arbitrary class ( i call them VO for value
objects ), too - and leave the possibility to use quick objects.
Init an VO-object would simple look like this:
var startFormatVo : TextFormatVO = new TextFormatVO();
startFormatVo.size = 1;
startFormatVo.letterSpacing = 50;
startFormatVo.leading = 10;
And it could be used in different ways like this:
// if startvalue is null, the tween takes the instance parameters
group.addChild(new ClipTween(textField, null, {alpha:1}, 0, .4,
Linear.easeIn));
// start and endvalues as objects, most common and quick use...
group.addChild(new ClipTween(textField, {y:200}, {y:50}, 0, 1,
Bounce.easeOut));
// start and endvalues predefined with value objects
group.addChild(new TextFormatTween(textField, startFormatVo,
endFormatVo, 0, 1, Bounce.easeOut));
// start defined inline with the value object, endvalue defined with
a DropShadowFilter( returned from endFilter() ). Only the tweenable
values of the DropShadowFilter will be used
group.addChild(new DropShadowTween(textField, new DropShadowVO(10,
50, 0x000000, 1, 50, 45, 20), endFilter(), 0, 1, Linear.easeNone));
if you're pretty sure what properties to tween you can use {alpha:1},
for complex animations or for storeing animation values you could use
the vo-objects.
If you have to set a only oneway-used dataset you could use new
VOObject(10, 50, and so on) and your editor would give the value-hints.
I created an array in the VO-classes and tried to use this one in the
tweenclass itself for setting the properties or for the overlapmonitor.
But this stuff is not finished and I have to bring up wiki ( i
promised so ;- )
I'm not 100% sure if this fits into the discussion, but these are my
thoughts about spliting properties and tweenclasses. I like the idea
of arbitrary classes!
Greetings
Karsten
Am 07.05.2008 um 18:17 schrieb John Grden:
> I think abstracting the properties to be static functions of an
> arbitrary class is the way to go - it's portable, and certainly
> doesn't step on the toes of anything previously written etc
>
> On Wed, May 7, 2008 at 11:04 AM, Sebastian Weyrauch <go at tweego.org>
> wrote:
> Btw: Joa Ebert developed a tweening engine, too:
> http://blog.je2050.de/2008/05/07/tweening-and-object-pools/
>
> He choosed a similar way:
> For example he tweens with "DisplayObject.relativeX(50)" in the api.
>
> I'm considering if I should implement this principle in tweego,
> too. But
> overloading it can't be the right way.
>
>
>
> sebastian
>
>
> -----Ursprüngliche Nachricht-----
> Von: golist-bounces at goasap.org [mailto:golist-bounces at goasap.org]
> Im Auftrag
> von Asher Graeme
> Gesendet: Mittwoch, 7. Mai 2008 17:50
> An: Mailing list for the Go ActionScript Animation Platform
> Betreff: Re: [Golist] This looks a bit better as far as syntax
>
> John Grden has made a blog post on his progress so far with the Go3D
> API. It speaks further to his points made here on this list, includes
> a cool example as well sample code. Seems to be shaping up nicely.
> This is going to be a great addition for PV3D.
>
> http://www.rockonflash.com/blog/?p=116
>
> Graeme
>
> _______________________________________________
> GoList mailing list
> GoList at goasap.org
> http://goasap.org/mailman/listinfo/golist_goasap.org
>
>
>
> _______________________________________________
> GoList mailing list
> GoList at goasap.org
> http://goasap.org/mailman/listinfo/golist_goasap.org
>
>
>
> --
> [ JPG ]
> _______________________________________________
> GoList mailing list
> GoList at goasap.org
> http://goasap.org/mailman/listinfo/golist_goasap.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080507/f50f739c/attachment-0001.html
More information about the GoList
mailing list