W3C home > Mailing lists > Public > www-svg@w3.org > December 2010

Re: animateMotion - specifying a start position along a path that is not the beginning of the path

From: ddailey <ddailey@zoominternet.net>
Date: Sat, 11 Dec 2010 15:56:01 -0500
Message-ID: <736CE17856B24767BB5C73D7EEF81C4F@disxgdg31szkx7>
To: "Ryan Arnold" <ryan.arnold@gmail.com>, <www-svg@w3.org>
Allied tests and examples are discussed in the SVG Primer at 
http://www.w3.org/Graphics/SVG/IG/resources/svgprimer.html#multi-valued_animation - 
- follow down to the examples on "following paths". If resolution to such 
issues is found, let me know and I'll try to include links to such from 
there.

There is also the related thread associated with this example: 
http://owl3d.com/tests/svg-developers/notknot2.svg, emanating from the 
thread at 
http://www.mail-archive.com/svg-developers@yahoogroups.com/msg14136.html , 
that has also been discussed a bit here, in relationship to adding pairwise 
over-under data to subpaths.

cheers
David
----- Original Message ----- 
From: "Ryan Arnold" <ryan.arnold@gmail.com>
To: <www-svg@w3.org>
Sent: Friday, December 10, 2010 6:38 PM
Subject: animateMotion - specifying a start position along a path that is 
not the beginning of the path


Hello,

Erik Dahlström asked me to email this mailing list regarding a
potential deficiency with animateMotion.

I'm tinkering with a train engine + couplings + cars following a track
(path) demo:

http://rsasandbox.appspot.com/anim.svg

This appears to do what I want but there's a gross hack in it.  It
abuses animateMotions's begin="" feature to add new cars and couplings
to the path behind the engine after the previous engine or car has
passed by the start of the path.

This hack is not programmatically scalable.  Changing the
animateMotion duration to 10s, for example, will result in incorrectly
spaced cars.  I can't even figure out how to determine the begin=""
values for each element.  In my current example they were specified
manually.

What I want is to be able to programatically place cars on the path
one after the other and then have them all begin their animated motion
at the same time.  It'd be nice if negative offsets worked with closed
paths.

I also want to be able to start the chain of cars' motion at an
arbitrary place on the track.  There doesn't seem to be a way to do
this.  I notice that textpath has a startOffset.  Is there a reason
something like this couldn't work for paths?

Any ideas?

Ryan S. Arnold
Received on Saturday, 11 December 2010 20:56:42 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:47 GMT