Animation
Animation
Global Variable
Type: See types
AnimationItem
Extended by: Animation, AnimationController
new AnimationItem()
Creates a new AnimationItem
getUndoCopy( [options, save] )
Arguments:
options
: any (Optional)save
: any (Optional)
Returns: AnimationOptions
all
Static Property
Type: Array of Animation
selected
Static Property
Type: null
or Animation
Animation
Extends: AnimationItem
In typescript, use Blockbench.Animation
.
new Animation( [data] )
Creates a new Animation
Arguments:
data
: AnimationOptions (Optional)name
: string (Optional)uuid
: string (Optional)path
: string (Optional)loop
:"loop"
or"once"
or"hold"
(Optional)override
: boolean (Optional)anim_time_update
: string (Optional)blend_weight
: string (Optional)length
: number (Optional)snapping
: number (Optional)animators
: any (Optional)
Property | Type | Description |
---|---|---|
name | string | |
uuid | string | |
loop | "loop" or "once" or "hold" | |
override | boolean | |
anim_time_update | string | |
blend_weight | string | |
length | number | |
snapping | number | |
loop_delay | string | |
start_delay | string | |
path | string | |
playing | boolean | |
saved | boolean | |
time | number | |
effects | EffectAnimator | |
markers | Array of TimelineMarker | |
animators | See types | |
saved_name | string | |
selected | boolean | |
type | string | |
menu | Menu | |
file_menu | Menu |
extend( [data] )
Arguments:
data
: AnimationOptions (Optional)name
: string (Optional)uuid
: string (Optional)path
: string (Optional)loop
:"loop"
or"once"
or"hold"
(Optional)override
: boolean (Optional)anim_time_update
: string (Optional)blend_weight
: string (Optional)length
: number (Optional)snapping
: number (Optional)animators
: any (Optional)
Returns: Animation
getUndoCopy( [options, save] )
Arguments:
options
: See types (Optional)save
: any (Optional)
Returns: AnimationUndoCopy
compileBedrockAnimation()
Compiles the JSON tree of the animation for the Minecraft Bedrock Edition animation format.
Returns: any
save()
Returns: undefined or Animation
select()
Returns: undefined or Animation
setLength( [length] )
Arguments:
length
: number (Optional)
createUniqueName( references )
Arguments:
references
: Array of Animation
Returns: any
rename()
Returns: Animation
togglePlayingState( state )
Arguments:
state
: any
Returns: any
showContextMenu( event )
Arguments:
event
: any
Returns: Animation
getBoneAnimator( [node] )
Returns (if necessary creates) the animator of a specific outliner node of this animation
Arguments:
node
: OutlinerNode (Optional)
Returns: BoneAnimator
add( [undo] )
Adds the animation to the current project and to the interface
Arguments:
undo
: boolean (Optional) - If true, the addition of the animation will be registered as an edit
Returns: Animation
remove( undo[, remove_from_file] )
Arguments:
undo
: booleanremove_from_file
: boolean (Optional)
Returns: Animation
getMaxLength()
Returns: number
setLoop( value, undo )
Arguments:
value
: anyundo
: any
calculateSnappingFromKeyframes()
Calculate the snapping value that the animation should use, based on the time codes of the keyframes that it holds. Directly updates the value, but also returns it as a number (snaps per second)
Returns: number
propertiesDialog()
Opens the properties dialog
all
Static Property
Type: Array of Animation
selected
Static Property
Type: null
or Animation
Animator
Namespace
Property | Type | Description |
---|---|---|
open | boolean | |
MolangParser | Molang | |
possible_channels | Array of unknown | |
motion_trail | THREE.Object3D | |
motion_trail_lock | boolean | |
particle_effects | any | |
animations | Array of Animation | |
selected | Animation or undefined |
showDefaultPose( [no_matrix_update] )
Arguments:
no_matrix_update
: boolean (Optional)
resetParticles()
showMotionTrail( [target] )
Arguments:
target
: Group (Optional)
preview( [in_loop] )
Updates the preview based on the current time
Arguments:
in_loop
: boolean (Optional)
loadParticleEmitter( path, content )
Arguments:
path
: stringcontent
: string
loadFile( file[, animation_filter] )
Import a Bedrock animation file
Arguments:
file
: any - File anyanimation_filter
: Array of string (Optional) - List of names of animations to import
exportAnimationFile( path )
Arguments:
path
: string
resetLastValues()
autocompleteMolang( text, position, type )
Arguments:
text
: stringposition
: numbertype
: string
Returns: Array of MolangAutoCompletionItem
GeneralAnimator
Extended by: BoneAnimator, NullObjectAnimator, EffectAnimator
new GeneralAnimator( uuid, animation, name )
Creates a new GeneralAnimator
Arguments:
uuid
:null
or stringanimation
: Animationname
: string
Property | Type | Description |
---|---|---|
uuid | string | |
keyframes | Array of _Keyframe | |
animation | Animation | |
expanded | boolean | |
selected | boolean | |
channels | See types | |
muted | See types |
select()
Returns: GeneralAnimator
addToTimeline()
Returns: GeneralAnimator
addKeyframe( data[, uuid] )
Arguments:
data
: KeyframeOptionschannel
: string (Optional)data_points
: Array of See typestime
: numbercolor
: number (Optional)uniform
: boolean (Optional)interpolation
: string (Optional)bezier_linked
: boolean (Optional)bezier_left_time
: ArrayVector3 (Optional)bezier_left_value
: ArrayVector3 (Optional)bezier_right_time
: ArrayVector3 (Optional)bezier_right_value
: ArrayVector3 (Optional)
uuid
: string (Optional)
Returns: _Keyframe
createKeyframe()
Returns: _Keyframe
getOrMakeKeyframe()
Returns: See types
toggleMuted( channel )
Arguments:
channel
: string
Returns: GeneralAnimator
scrollTo()
Returns: GeneralAnimator
GeneralAnimator.addChannel( channel, options )
Arguments:
channel
: stringoptions
: AddChannelOptionsname
: string (Optional)transform
: boolean (Optional)mutable
: boolean (Optional)max_data_points
: number (Optional)
BoneAnimator
Extends: GeneralAnimator
new BoneAnimator( uuid, animation, name )
Creates a new BoneAnimator
Arguments:
uuid
:null
or stringanimation
: Animationname
: string
Property | Type | Description |
---|---|---|
keyframes | Array of _Keyframe | |
animation | Animation | |
expanded | boolean | |
selected | boolean | |
channels | See types | |
muted | See types | |
name | string | |
uuid | string | |
rotations | Array of _Keyframe | |
position | Array of _Keyframe | |
scale | Array of _Keyframe |
select()
Returns: BoneAnimator
addToTimeline()
Returns: BoneAnimator
addKeyframe( data[, uuid] )
Arguments:
data
: KeyframeOptionschannel
: string (Optional)data_points
: Array of See typestime
: numbercolor
: number (Optional)uniform
: boolean (Optional)interpolation
: string (Optional)bezier_linked
: boolean (Optional)bezier_left_time
: ArrayVector3 (Optional)bezier_left_value
: ArrayVector3 (Optional)bezier_right_time
: ArrayVector3 (Optional)bezier_right_value
: ArrayVector3 (Optional)
uuid
: string (Optional)
Returns: _Keyframe
createKeyframe()
Returns: _Keyframe
getOrMakeKeyframe()
Returns: See types
toggleMuted( channel )
Arguments:
channel
: string
Returns: BoneAnimator
scrollTo()
Returns: BoneAnimator
BoneAnimator.addChannel( channel, options )
Arguments:
channel
: stringoptions
: AddChannelOptionsname
: string (Optional)transform
: boolean (Optional)mutable
: boolean (Optional)max_data_points
: number (Optional)
getGroup()
Returns: Group
fillValues()
pushKeyframe()
doRender()
Returns: boolean
displayRotation( [arr, multiplier] )
Arguments:
arr
: ArrayVector3 or ArrayVector4 (Optional)multiplier
: number (Optional)
displayPosition( [arr, multiplier] )
Arguments:
arr
: ArrayVector3 (Optional)multiplier
: number (Optional)
Returns: BoneAnimator
displayScale( [arr, multiplier] )
Arguments:
arr
: ArrayVector3 (Optional)multiplier
: number (Optional)
interpolate( channel[, allow_expression, axis] )
Arguments:
channel
: stringallow_expression
: boolean (Optional)axis
: string (Optional)
Returns: false
or ArrayVector3
displayFrame( [multiplier] )
Arguments:
multiplier
: number (Optional)
NullObjectAnimator
Extends: GeneralAnimator
new NullObjectAnimator( uuid, animation, name )
Creates a new NullObjectAnimator
Arguments:
uuid
:null
or stringanimation
: Animationname
: string
Property | Type | Description |
---|---|---|
keyframes | Array of _Keyframe | |
animation | Animation | |
expanded | boolean | |
selected | boolean | |
channels | See types | |
muted | See types | |
name | string | |
uuid | string | |
rotations | Array of _Keyframe | |
position | Array of _Keyframe | |
scale | Array of _Keyframe |
select()
Returns: NullObjectAnimator
addToTimeline()
Returns: NullObjectAnimator
addKeyframe( data[, uuid] )
Arguments:
data
: KeyframeOptionschannel
: string (Optional)data_points
: Array of See typestime
: numbercolor
: number (Optional)uniform
: boolean (Optional)interpolation
: string (Optional)bezier_linked
: boolean (Optional)bezier_left_time
: ArrayVector3 (Optional)bezier_left_value
: ArrayVector3 (Optional)bezier_right_time
: ArrayVector3 (Optional)bezier_right_value
: ArrayVector3 (Optional)
uuid
: string (Optional)
Returns: _Keyframe
createKeyframe()
Returns: _Keyframe
getOrMakeKeyframe()
Returns: See types
toggleMuted( channel )
Arguments:
channel
: string
Returns: NullObjectAnimator
scrollTo()
Returns: NullObjectAnimator
NullObjectAnimator.addChannel( channel, options )
Arguments:
channel
: stringoptions
: AddChannelOptionsname
: string (Optional)transform
: boolean (Optional)mutable
: boolean (Optional)max_data_points
: number (Optional)
getElement()
Returns: NullObject
doRender()
displayIK()
displayFrame()
EffectAnimator
Extends: GeneralAnimator
new EffectAnimator( uuid, animation, name )
Creates a new EffectAnimator
Arguments:
uuid
:null
or stringanimation
: Animationname
: string
Property | Type | Description |
---|---|---|
keyframes | Array of _Keyframe | |
animation | Animation | |
expanded | boolean | |
selected | boolean | |
channels | See types | |
muted | See types | |
name | string | |
uuid | string | |
rotations | Array of _Keyframe | |
position | Array of _Keyframe | |
scale | Array of _Keyframe |
select()
Returns: EffectAnimator
addToTimeline()
Returns: EffectAnimator
addKeyframe( data[, uuid] )
Arguments:
data
: KeyframeOptionschannel
: string (Optional)data_points
: Array of See typestime
: numbercolor
: number (Optional)uniform
: boolean (Optional)interpolation
: string (Optional)bezier_linked
: boolean (Optional)bezier_left_time
: ArrayVector3 (Optional)bezier_left_value
: ArrayVector3 (Optional)bezier_right_time
: ArrayVector3 (Optional)bezier_right_value
: ArrayVector3 (Optional)
uuid
: string (Optional)
Returns: _Keyframe
createKeyframe()
Returns: _Keyframe
getOrMakeKeyframe()
Returns: See types
toggleMuted( channel )
Arguments:
channel
: string
Returns: EffectAnimator
scrollTo()
Returns: EffectAnimator
EffectAnimator.addChannel( channel, options )
Arguments:
channel
: stringoptions
: AddChannelOptionsname
: string (Optional)transform
: boolean (Optional)mutable
: boolean (Optional)max_data_points
: number (Optional)
pushKeyframe( keyframe )
Arguments:
keyframe
: _Keyframe
Returns: EffectAnimator
displayFrame( [in_loop] )
Arguments:
in_loop
: boolean (Optional)
startPreviousSounds()
TimelineMarker
new TimelineMarker()
Creates a new TimelineMarker
Property | Type | Description |
---|---|---|
color | number | |
time | number |