> So use two animations like
> 
>   <svg xmlns='http://www.w3.org/2000/svg'>
>     <rect width="100" height="100">
>       <animateTransform
>        attributeName='transform'
>        type='translate'
>        by='0,50'
>        dur='2s'
>        id='a'
>        fill='freeze'
>        />
>       <animateTransform
>        attributeName='transform'
>        type='translate'
>        by='0,-20'
>        dur='2s'
>        begin='a.end'
>        fill='freeze'
>        additive="sum"
>        />
>     </rect>
>   </svg>
>

Thanks, you are right of course. Adding sequential animationTransform
nodes retains the animation state. So I created 3 animationTransform
nodes (+50 y, -20 y and -20 y) with 'additive=sum' and lo and behold
it works. I also experimented with removing the first child which
resulted in the object placed -40 y from its original position. So
apparently adding or removing animationTransform nodes renders the
animation again from node 1 to 3.
I was secretly hoping that the SVG engine would render the total
animation chain to a single object and perform the animation by the
state it keeps in that single object but this is apparently not the
case. And besides, that would mean I count on side effects of the
particular SVG engine.

For pretty much "static" applications the above is not a problem.
However, I'm writing a piece of code that fetches "real time" data
from a greenhouse automation server and the client checks every 2 or 3
seconds whether that data has changed and acts (animates) accordingly.
I have >50 animated SVG objects per screen so adding a bunch of
animationTransform nodes will eat its way through client memory. If my
assumption about this is wrong I'd be happy if someone could
clarify this to me.

Of course I can refresh the active screen every 15-30 minutes so that
the SVG document would be rendered from scratch. This way the added
animation nodes will be removed from memory. And within 2 or 3 seconds
the SVG document will show the fresh data again. Of course this is
just a thought :-)

> If you have to use scripting
> you should consider to script the animation instead of using SMIL.

I think this is indeed the best solution to my problem. I've seen some
scripted animation examples on the Kevin Lindsey site
(www.kevlindev.com) and on the DevOpera site but they all are based on
a simple rect or circle object (or SMIL). I deal with groups of
objects (the SVG document is exported from Visio).
So, if someone has links to scripted animation on groups of objects
not using SMIL I'd be very happy.

@Chaals: actually I read your article before I started with SVG
animation. However, I try to animate something non-predetermined
and I'm not sure SVG was meant for that.

Thanks again for the info.

Rick de Koster



-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to