XML technologies / SVG / Using animations / Ways to implement animations / Attributes for animate, animateMotion, animateColor and animateTransform
(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)
Besides the universal attributes, some attributes apply only to the tags <animate>, <animateMotion>, <animateColor> and <animateTransform>:
calcModespecifies animation interpolation. Possible values arediscrete,linear,pacesorspline. The default islinearwhen omitted, except for elements not supporting that interpolation, such as text. These usediscrete. Unsupported settings are also ignored in favor ofdiscrete. Withlinearintermediate states are interpolated for smooth transitions. Withdiscreteno interpolation occurs between frames.paceddisplays an intermediate frame mixing two successive frames. This requires the animated attribute to have a linear value range allowing intermediate values to be calculated.splinecalculates interpolation between neighboring states using a cubic Bézier curve.valuesis a comma-separated list of one or more values. Their purpose depends on the tag containing the attribute.keyTimesis a list of comma-separated values describing the intervals between values used in the animation. Each must lie between 0 and 1 and represent a proportional interval relative to the animated attribute’s standard differences. Each entry corresponds to an entry invaluesand must exceed its predecessor. Further restrictions depend on the attributecalcMode. Withlinearandsplinethe first value must be 0 and the last 1. WithdiscreteascalcModeonly the first value must be 0. Withpacedthe attributekeyTimesis ignored.keySplineslists numeric Bézier control points, each an x/y pair. The list 0 0 1 1 defines two points, 0/0 and 1/1. Each control point must correspond to a value invalues. ThekeySplineslist therefore describes the control points for a time segment, whilekeyTimesvalues locate the Bézier guide’s anchor on the timeline. All values must lie between 0 and 1. The attribute is ignored whencalcMode="spline"is selected.fromsets the animation’s starting value.tosets the animation’s target value.bysets a relative difference from the previous value.additivedetermines whether frames replace previous frames or preserve them. Possible values arereplaceandsum.replaceis the default. Withsumold frames remain.accumulatedetermines whether animation is cumulative, using each iteration’s final values as the next iteration’s starting point. The default isnone. For a cumulative effect usesum.
Note:
The following examples for individual tags illustrate their use.
Copyright © verlag moderne industrie GmbH 2001
You may print the online version for your private use.
Otherwise, this chapter from “Das Einsteigerseminar SVG — Webgrafiken mit XML” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
verlag moderne industrie GmbH, Justus-von-Liebig-Straße 1, D-86899 Landsberg/Lech, fon ++49 (0) 81 91 / 125 – 0, leserservice(at)mi-verlag.de
back to top