# Linear vs. Paced vs. Discrete SVG/SMIL Animation

Click the SVG to restart the animations.

The SVG/SMIL `calcMode` attribute on animation elements defines how to interpolate between multiple values in a single animation.

Linear animation (the default) divides up the time evenly between multiple specified values, and then progresses between each stop point in an even manner. So if you have 5 values, the time will be divided into 4 transitions between each successive pair of values. You can specify different timings with a `keyTimes` attribute, but each step will still interpolate linearly. For `keyTimes` , use another semi-colon separated list with the same number of entries as your `values` list. The first time must be 0 and the last time 1; other times are given as decimals (representing a proportion of total time), in numerical order.

Paced animation calculates the distance between each values, and divides up the time accordingly to create an even speed of change throughout the entire animation. Key times are ignored. Only certain types of values can be paced: colours or simple numbers/lengths. You can't pace a path or a dasharray, for example, because there's no clear way to compare the "distances" between two sets of values.

Discrete animation jumps from one value to the next. By default it spends equal time on each, but you can change that with `keyTimes` . Note that for discrete animation—unlike linear—a list of 5 values result in 5 time periods. The `keyTimes` values are the start time of each setting, so while the first time still has to be zero, the last time does not have to be 1.

Spline animation (not shown) allows you to change the rate at which the animation transitions between two values. The time devoted to each stage of the animation is divided the same as for linear animation. A `keySplines` attribute defines the easing function for each transition.