<animateFromSequence/>
<animateFromSequence/>
is a General Operator component
that renders an animation of a changing component over a specified interval of uniform steps.
Attributes and Properties
Attribute | Type | Values |
---|---|---|
allowAdjustmentsWhileRunning = "…" | boolean | "true" "false" |
animationInterval = "…" | number | |
animationMode = "…" | text | "increase" "decrease" "increase once" "decrease once" "oscillate" |
animationOn = "…" | boolean | "true" "false" |
exclude = "…" | ||
from = "…" | ||
length = "…" | ||
step = "…" | ||
target = "…" | ||
to = "…" | ||
type = "…" | "number" "math" "letters" |
Property | Type |
---|---|
$a.allowAdjustmentsWhileRunning | boolean |
$a.animationInterval | number |
$a.animationMode | text |
$a.animationOn | boolean |
$a.currentAnimationDirection | text |
$a.disabled | boolean |
$a.fixed | boolean |
$a.fixLocation | boolean |
$a.hidden | boolean |
$a.selectedIndex | number |
$a.value |
Example: Animated counting
The <animateFromSequence/>
component is used to animate a <number>
over a sequence of values from 1 to 20.
Example: Animation with start/stop button
A <callAction>
component references a named <animateFromSequence />
with
the actionName
set to toggleAnimation
.
Example: Animated circle radius
The <animateFromSequence />
component is used to animate the radius of a <circle>
where
the radius has been defined as a <number/>
over a sequence of values from 0 to 10.
Example: Point moving along a function
The <animateFromSequence />
component is used to animate the -coordinate of a
point which has been defined as a <number/>
over a sequence of values from -9 to 9.
The -coordinate of the point is defined with the function evaluation macro $$f(x)
.
Attribute Example: target
The target
attribute is used to specify the value to animate. Since points have a
numerical property corresponding to their -coordinate, this value can be animated directly
without having to define a separate <number/>
.
Attribute Example: animationOn
The animationOn
attribute is used to specify the current state of the animation.
This attributes takes a boolean value or an expression which evaluates to a boolean. In this particular example
the boolean value is specified by the user with a <booleanInput/>
.
Attribute Example: animationMode
The animationMode
attribute is used to specify the directional behavior of the animation.
Valid values for the input text are: increase
, increase once,
decrease
, decrease once
, and oscillate
.
The default value is increase
.
Attribute Example: animationInterval
The -coordinate of two points are both animated with the <animateFromSequence />
component,
and the user must specify the input value for the animationInterval
attribute for each point.
The length of the animationInterval
governs the amount of time elapsed between successive steps
of the animation sequence. The default value is 1000 ms.
Attribute Example: type=“letters”
The type
attribute takes either “letters” or “number” as a text input.
If unspecified, the default type
is “number”.
Attribute Example: length
The length
attribute specifies the length, in number of terms, of the animation sequence.
Attribute Example: from, to
The from
and to
attributes specify
the starting and ending values in the animation sequence.
Attribute Example: step
The step
attribute specifies the size of each increment in the animation sequence.
The default step
is .
Attribute Example: exclude
The exclude
attribute specifies values to exclude in the animation sequence.
Property Example: Attributes as properties
The above listed <animateFromSequence/>
attributes are also accessible as properties.
Property Example: value
The value
property of the <animateFromSequence/>
component
renders the current sequence value of the animation target.
Property Example: currentAnimationDirection
The currentAnimationDirection
property of the <animateFromSequence/>
component
renders the current direction of the animation; i.e. whether the sequence values are increasing or decreasing.
Property Example: selectedIndex
The selectedIndex
property returns the index number of the current sequence value.