Graphic abstract
A base class for any element in the storyboard that can be displayed, including static image and animation.
Properties
layer
The layer on which the element resides.
- Type:
Layer(Layer)
origin
The origin point of the element.
- Type:
Origin(Origin)
path
The path to the element's resource.
- Type:
string
position
The position of the element.
- Type:
Vector2(Vector2)
commands
Array of commands for animations and transformations.
- Type:
Command[](Command)
Methods
fade(props)
Change the opacity of the object (how transparent it is).
Parameters:
props.startTime(number | string | Timestamp) (Timestamp): The start time of the animation.props.endTime(number | string | Timestamp | undefined) (Timestamp): The end time of the animation. Defaults toundefined.props.startValue(number): The starting value of the fade.props.endValue(number | undefined): The ending value of the fade. Defaults toundefined.props.easing(Easing | undefined) (Easing): The easing function for the fade animation. Defaults toundefined.
Returns:
this
move(props)
Move the object to a new position in the play area.
Parameters:
props.startTime(number | string | Timestamp) (Timestamp): The start time of the animation.props.endTime(number | string | Timestamp | undefined) (Timestamp): The end time of the animation. Defaults toundefined.props.startValue(IVector2 | Vector2Tuple) (Vector2): The starting value of the move.props.endValue(IVector2 | Vector2Tuple | undefined) (Vector2): The ending value of the move. Defaults toundefined.props.easing(Easing | undefined) (Easing): The easing function for the move animation. Defaults toundefined.
Returns:
this
moveX(props)
Move the object along the x axis.
Parameters:
props.startTime(number | string | Timestamp) (Timestamp): The start time of the animation.props.endTime(number | string | Timestamp | undefined) (Timestamp): The end time of the animation. Defaults toundefined.props.startValue(number): The starting X position of the move.props.endValue(number | undefined): The ending X position of the move. Defaults toundefined.props.easing(Easing | undefined) (Easing): The easing function for the moveX animation. Defaults toundefined.
Returns:
this
moveY(props)
Move the object along the y axis.
Parameters:
props.startTime(number | string | Timestamp) (Timestamp): The start time of the animation.props.endTime(number | string | Timestamp | undefined) (Timestamp): The end time of the animation. Defaults toundefined.props.startValue(number): The starting Y position.props.endValue(number | undefined): The ending Y position. Defaults toundefined.props.easing(Easing | undefined) (Easing): The easing function for the moveY animation. Defaults toundefined.
Returns:
this
scale(props)
Change the size of the object relative to its original size.
Parameters:
props.startTime(number | string | Timestamp) (Timestamp): The start time of the animation.props.endTime(number | string | Timestamp | undefined) (Timestamp): The end time of the animation. Defaults toundefined.props.startValue(number): The starting scale value or vector.props.endValue(number | undefined): The ending scale value or vector. Defaults toundefined.props.easing(Easing | undefined) (Easing): The easing function for the scale animation. Defaults toundefined.
Returns:
this
scaleVec(props)
Scale the object each side individually.
Parameters:
props.startTime(number | string | Timestamp) (Timestamp): The start time of the animation.props.endTime(number | string | Timestamp | undefined) (Timestamp): The end time of the animation. Defaults toundefined.props.startValue(IVector2 | Vector2Tuple) (Vector2): The starting scale value or vector.props.endValue(IVector2 | Vector2Tuple | undefined) (Vector2): The ending scale value or vector.Defaults toundefined.props.easing(Easing | undefined) (Easing): The easing function for the scale animation. Defaults toundefined.
Returns:
this
rotate(props)
Rotate the object around its origin.
Parameters:
props.startTime(number | string | Timestamp) (Timestamp): The start time of the animation.props.endTime(number | string | Timestamp | undefined) (Timestamp): The end time of the animation. Defaults toundefined.props.startValue(number): The starting rotation angle in radians.props.endValue(number | undefined): The ending rotation angle in radians. Defaults toundefined.props.easing(Easing | undefined) (Easing): The easing function for the rotate animation. Defaults toundefined.
Returns:
this
color(props)
The virtual light source color on the object. The colors of the pixels on the object are determined subtractively.
Parameters:
props.startTime(number | string | Timestamp) (Timestamp): The start time of the animation.props.endTime(number | string | Timestamp | undefined) (Timestamp): The end time of the animation. Defaults toundefined.props.startValue(IColor3 | Color3Tuple) (Color3): The starting color value.props.endValue(IColor3 | Color3Tuple | undefined) (Color3): The ending color value. Defaults toundefined.props.easing(Easing | undefined) (Easing): The easing function for the color animation. Defaults toundefined.
Returns:
this
flipH(props)
Flip the element horizontally.
Parameters:
Returns:
this
flipV(props)
Flip the element vertically.
Parameters:
Returns:
this
additive(props)
Use additive-color blending instead of alpha-blending.
Parameters:
Returns:
this
startLoopGroup(props)
Start a loop group.
Parameters:
props.startTime(number | string | Timestamp) (Timestamp): The start time of the loop group.props.loopCount(number): The number of times to loop.
Returns:
this
startTriggerGroup(props)
Start a trigger group.
Parameters:
props.startTime(number | string | Timestamp) (Timestamp): The start time of the trigger group.props.endTime(number | string | Timestamp) (Timestamp): The end time of the trigger group.props.triggerType(TriggerType) (TriggerType): The condition to trigger this group.
endGroup()
End the current loop/trigger group.
- Returns:
this