Letractively / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

Support for animating path "d" attribute #321

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Is there planned support for animating a path?
e.g. app engine project delivered from here:
http://www.animentor.com/graphics/wavingman.html

Expected:  crude drawing of a body slowly waving an arm over a 10s period
Actual:  static image from time zero

SVGWeb 2009-09-16 UmberHulk (forceflash=true)
Mac OSX Leopard
Safari 4.0.3
Flash 10

Very useful so far!  An important use case now is delivering animated figures.

Original issue reported on code.google.com by john.dan...@gmail.com on 22 Sep 2009 at 2:54

GoogleCodeExporter commented 8 years ago
I've started this in r899.

Note, however, that this just supports setting 'd' as a discrete value. The neat
thing about animating path is that native implementations interpolate between 
path
data points specified in different key values. This provides a smooth path
transition. That is a cool effect that still needs to be implemented.

Original comment by grick23@gmail.com on 28 Sep 2009 at 12:25

GoogleCodeExporter commented 8 years ago
Yeah, Opera is one browser that interpolates between values and the result is 
quite good.  Discrete values are a 
good start.  This will allow proof of concept and give the idea of what the 
final animation will look like when 
smoothed out.  A kind of storyboard perhaps.

Original comment by john.dan...@gmail.com on 29 Sep 2009 at 2:54

GoogleCodeExporter commented 8 years ago
I updated to the "Beholder" release and the discrete value path animation works 
as expected.  If I were to 
increase the sampling frequency I could smooth it out (at the expense of file 
size, of course).  Thank-you.

Original comment by john.dan...@gmail.com on 14 Oct 2009 at 2:44

GoogleCodeExporter commented 8 years ago
I've attached a patch that implements path animation.  It uses the existing 
methods to do interpolation after its parsed the from and to path into arrays 
of numbers.  I moved the path parsing code out of SVGPathNode into its own util 
class, SVGPathParser, which is attached along with the patch, a sample of my 
own demonstrating line animation (btw, opera native doesnt seem to like its 
partial second starts and durations), and john daniel robinson's example from 
above, which now renders smoothly.  This approach could certainly be made more 
performant, but its a start.

Original comment by bduncan%...@gtempaccount.com on 28 Jun 2010 at 6:54

Attachments:

GoogleCodeExporter commented 8 years ago
Patch applied in r1207.
Issue 321; Support interpolation between path values when animated.

Thanks to Bruce Duncan of Visual Mining for the patch.

Bruce- After looking at your example, I can see how this would significantly 
improve transitions between data sets in charts. Pretty cool.

Original comment by grick23@gmail.com on 3 Aug 2010 at 2:40