Animation

A Blockbench animation

Animation.getName

Returns this animation's name
overload 1:
Animation:getName()
Method Property Fluent Description Representation
Return Value a String

Animation.getLength

Gets the animation's length
overload 1:
Animation:getLength()
Method Property Fluent Description Representation
Return Value a Number

Animation.setPriority

Sets the animation's priority
Instead of blending, low priority animations are overridden by high priority ones
overload 1:
Animation:setPriority(priority)
Method Property Fluent Description Representation
priority accepts an Integer
Return Value an Animation

Animation.getPriority

Gets the animation's priority
overload 1:
Animation:getPriority()
Method Property Fluent Description Representation
Return Value an Integer

Animation.stop

Stop the animation
overload 1:
Animation:stop()
Method Property Fluent Description Representation
Return Value an Animation

Animation.setLength

Set the animation's length, in seconds
overload 1:
Animation:setLength(length)
Method Property Fluent Description Representation
length accepts a Number
Return Value an Animation

Animation.getOffset

Gets the animation's offset time
overload 1:
Animation:getOffset()
Method Property Fluent Description Representation
Return Value a Number

Animation.setOffset

Sets how much time to skip for the animation
The time is skipped on every loop
overload 1:
Animation:setOffset(offset)
Method Property Fluent Description Representation
offset accepts a Number
Return Value an Animation

Animation.getTime

Get the animation's playback current time
overload 1:
Animation:getTime()
Method Property Fluent Description Representation
Return Value a Number

Animation.setTime

Sets the animation's playback current time
overload 1:
Animation:setTime(time)
Method Property Fluent Description Representation
time accepts a Number
Return Value an Animation

Animation.pause

Pause the animation's playback
overload 1:
Animation:pause()
Method Property Fluent Description Representation
Return Value an Animation

Animation.isPlaying

figura.docs.animation.is_playing
overload 1:
Animation:isPlaying()
Method Property Fluent Description Representation
Return Value a Boolean

Animation.setLoop

Sets the animation's loop mode
overload 1:
Animation:setLoop(loop)
Method Property Fluent Description Representation
loop accepts a String
Return Value an Animation

Animation.isPaused

figura.docs.animation.is_paused
overload 1:
Animation:isPaused()
Method Property Fluent Description Representation
Return Value a Boolean

Animation.newCode

Adds a string to run in a determinant time
If there's already code to run at that time,
it is overwritten
overload 1:
Animation:newCode(time, code)
Method Property Fluent Description Representation
time accepts a Number
code accepts a String
Return Value an Animation

Animation.getStartDelay

Gets the animation's start delay
overload 1:
Animation:getStartDelay()
Method Property Fluent Description Representation
Return Value a Number

Animation.getBlend

Gets the animation's keyframe blend factor
overload 1:
Animation:getBlend()
Method Property Fluent Description Representation
Return Value a Number

Animation.setLoopDelay

Set how much time to wait in between the loops of this animation
overload 1:
Animation:setLoopDelay(delay)
Method Property Fluent Description Representation
delay accepts a Number
Return Value an Animation

Animation.getOverridePos

Gets if this animation should override its parts vanilla position
overload 1:
Animation:getOverridePos()
Method Property Fluent Description Representation
Return Value a Boolean

Animation.getOverrideScale

Gets if this animation should override its parts vanilla scale
overload 1:
Animation:getOverrideScale()
Method Property Fluent Description Representation
Return Value a Boolean

Animation.setOverrideRot

Set if this animation should override its parts vanilla rotation
overload 1:
Animation:setOverrideRot(override)
Method Property Fluent Description Representation
override accepts a Boolean
Return Value an Animation

Animation.getOverrideRot

Gets if this animation should override its parts vanilla rotation
overload 1:
Animation:getOverrideRot()
Method Property Fluent Description Representation
Return Value a Boolean

Animation.setStartDelay

Set how much time to wait before this animation is initialized
Note that while it is waiting,
the animation is considered being played
overload 1:
Animation:setStartDelay(delay)
Method Property Fluent Description Representation
delay accepts a Number
Return Value an Animation

Animation.setOverridePos

Set if this animation should override its parts vanilla position
overload 1:
Animation:setOverridePos(override)
Method Property Fluent Description Representation
override accepts a Boolean
Return Value an Animation

Animation.getPlayState

Get the animation's playback state
overload 1:
Animation:getPlayState()
Method Property Fluent Description Representation
Return Value a String

Animation.getLoopDelay

Gets the animation's loop delay
overload 1:
Animation:getLoopDelay()
Method Property Fluent Description Representation
Return Value a Number

Animation.setOverride

Set if this animation should override all of its parts vanilla transforms
Equivalent of calling "overrideRot",
"overridePos" and "overrideScale" altogether
overload 1:
Animation:setOverride(override)
Method Property Fluent Description Representation
override accepts a Boolean
Return Value an Animation

Animation.setBlend

Sets the animation's keyframe blend factor
overload 1:
Animation:setBlend(blend)
Method Property Fluent Description Representation
blend accepts a Number
Return Value an Animation

Animation.setPlaying

A function that merges "play" and "stop" together
Takes a boolean parameter,
where if true, the animation will play, and when false, the animation will stop
overload 1:
Animation:setPlaying()
Method Property Fluent Description Representation
Return Value an Animation
overload 2:
Animation:setPlaying(bool)
Method Property Fluent Description Representation
bool accepts a Boolean
Return Value an Animation

Animation.restart

Restarts the animation
Plays the animation if it was stopped
This behavior can also be reproduced by stopping then playing the animation
overload 1:
Animation:restart()
Method Property Fluent Description Representation
Return Value an Animation

Animation.getLoop

Gets the animation's loop mode
overload 1:
Animation:getLoop()
Method Property Fluent Description Representation
Return Value a String

Animation.getSpeed

Gets the animation's speed
overload 1:
Animation:getSpeed()
Method Property Fluent Description Representation
Return Value a Number

Animation.setSpeed

Sets the animation's playback speed
Negative numbers can be used for an inverted animation
overload 1:
Animation:setSpeed(speed)
Method Property Fluent Description Representation
speed accepts a Number
Return Value an Animation

Animation.setOverrideScale

Set if this animation should override its parts vanilla scale
overload 1:
Animation:setOverrideScale(override)
Method Property Fluent Description Representation
override accepts a Boolean
Return Value an Animation

Animation.play

Example by JimmyHelp:
animations.bbmodelName.animationName:play()
Initializes the animation
Resume the animation if it was paused
overload 1:
Animation:play()
Method Property Fluent Description Representation
Return Value an Animation

Animation.isStopped

figura.docs.animation.is_stopped
overload 1:
Animation:isStopped()
Method Property Fluent Description Representation
Return Value a Boolean

Animation.priority

Sets the animation's priority
Instead of blending, low priority animations are overridden by high priority ones
overload 1:
Animation:priority(priority)
Method Property Fluent Description Representation
priority accepts an Integer
Return Value an Animation

Animation.length

Set the animation's length, in seconds
overload 1:
Animation:length(length)
Method Property Fluent Description Representation
length accepts a Number
Return Value an Animation

Animation.offset

Sets how much time to skip for the animation
The time is skipped on every loop
overload 1:
Animation:offset(offset)
Method Property Fluent Description Representation
offset accepts a Number
Return Value an Animation

Animation.time

Sets the animation's playback current time
overload 1:
Animation:time(time)
Method Property Fluent Description Representation
time accepts a Number
Return Value an Animation

Animation.loop

Sets the animation's loop mode
overload 1:
Animation:loop(loop)
Method Property Fluent Description Representation
loop accepts a String
Return Value an Animation

Animation.code

Adds a string to run in a determinant time
If there's already code to run at that time,
it is overwritten
overload 1:
Animation:code(time, code)
Method Property Fluent Description Representation
time accepts a Number
code accepts a String
Return Value an Animation

Animation.loopDelay

Set how much time to wait in between the loops of this animation
overload 1:
Animation:loopDelay(delay)
Method Property Fluent Description Representation
delay accepts a Number
Return Value an Animation

Animation.overrideRot

Set if this animation should override its parts vanilla rotation
overload 1:
Animation:overrideRot(override)
Method Property Fluent Description Representation
override accepts a Boolean
Return Value an Animation

Animation.startDelay

Set how much time to wait before this animation is initialized
Note that while it is waiting,
the animation is considered being played
overload 1:
Animation:startDelay(delay)
Method Property Fluent Description Representation
delay accepts a Number
Return Value an Animation

Animation.overridePos

Set if this animation should override its parts vanilla position
overload 1:
Animation:overridePos(override)
Method Property Fluent Description Representation
override accepts a Boolean
Return Value an Animation

Animation.override

Set if this animation should override all of its parts vanilla transforms
Equivalent of calling "overrideRot",
"overridePos" and "overrideScale" altogether
overload 1:
Animation:override(override)
Method Property Fluent Description Representation
override accepts a Boolean
Return Value an Animation

Animation.blend

Sets the animation's keyframe blend factor
overload 1:
Animation:blend(blend)
Method Property Fluent Description Representation
blend accepts a Number
Return Value an Animation

Animation.playing

A function that merges "play" and "stop" together
Takes a boolean parameter,
where if true, the animation will play, and when false, the animation will stop
overload 1:
Animation:playing()
Method Property Fluent Description Representation
Return Value an Animation
overload 2:
Animation:playing(bool)
Method Property Fluent Description Representation
bool accepts a Boolean
Return Value an Animation

Animation.speed

Sets the animation's playback speed
Negative numbers can be used for an inverted animation
overload 1:
Animation:speed(speed)
Method Property Fluent Description Representation
speed accepts a Number
Return Value an Animation

Animation.overrideScale

Set if this animation should override its parts vanilla scale
overload 1:
Animation:overrideScale(override)
Method Property Fluent Description Representation
override accepts a Boolean
Return Value an Animation

Animation.name

This animation's name
field signature:
name
Method Property Fluent Description Representation
Field Type a String
a a