jsvg icon indicating copy to clipboard operation
jsvg copied to clipboard

Support for animations (request for input)

Open weisJ opened this issue 4 years ago • 4 comments

Technically all animation attributes are children of the element they apply to. But for memory reasons I don't want to make any SVGNode that supports being animated a container element. Instead the AttributeNode which only exists during load time should keep the animation elements.

Then before building an element we would parse the animation elements. This way when an element request the say width property from the AttributeNode it could instead of returning a plain Length return an animation capable substitute. The current animation time would be passed in the MeasureContext s.t. the animation attributes can properly be resolved while rendering.

weisJ avatar Sep 08 '21 17:09 weisJ

I have an implementation ready that currently supports animation of length values for basic shapes.

Bringing animation support to all animatable properties will be a long process. Therefore it would be great to get some feedback on what sorts of properties are of interest here. Simply respond with this issue what you would like to be prioritised. If possible an example SVG would be highly appreciated.

weisJ avatar Sep 15 '24 15:09 weisJ

The current state of animations is located in the https://github.com/weisJ/jsvg/tree/animation branch.

weisJ avatar Sep 15 '24 20:09 weisJ