Table of Contents

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)
PropertyTypeDescription
namestring
uuidstring
loop"loop" or "once" or "hold"
overrideboolean
anim_time_updatestring
blend_weightstring
lengthnumber
snappingnumber
loop_delaystring
start_delaystring
pathstring
playingboolean
savedboolean
timenumber
effectsEffectAnimator
markersArray of TimelineMarker
animatorsSee types
saved_namestring
selectedboolean
typestring
menuMenu
file_menuMenu

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:

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:

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: boolean
  • remove_from_file: boolean (Optional)

Returns: Animation

getMaxLength()

Returns: number

setLoop( value, undo )

Arguments:
  • value: any
  • undo: 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

PropertyTypeDescription
openboolean
MolangParserMolang
possible_channelsArray of unknown
motion_trailTHREE.Object3D
motion_trail_lockboolean
particle_effectsany
animationsArray of Animation
selectedAnimation 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: string
  • content: string

loadFile( file[, animation_filter] )

Import a Bedrock animation file

Arguments:
  • file: any - File any
  • animation_filter: Array of string (Optional) - List of names of animations to import

exportAnimationFile( path )

Arguments:
  • path: string

resetLastValues()

autocompleteMolang( text, position, type )

Arguments:
  • text: string
  • position: number
  • type: string

Returns: Array of MolangAutoCompletionItem

GeneralAnimator

Extended by: BoneAnimator, NullObjectAnimator, EffectAnimator

new GeneralAnimator( uuid, animation, name )

Creates a new GeneralAnimator

Arguments:
  • uuid: null or string
  • animation: Animation
  • name: string
PropertyTypeDescription
uuidstring
keyframesArray of _Keyframe
animationAnimation
expandedboolean
selectedboolean
channelsSee types
mutedSee types

select()

Returns: GeneralAnimator

addToTimeline()

Returns: GeneralAnimator

addKeyframe( data[, uuid] )

Arguments:
  • data: KeyframeOptions
    • channel: string (Optional)
    • data_points: Array of See types
    • time: number
    • color: 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: string
  • options: AddChannelOptions
    • name: 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 string
  • animation: Animation
  • name: string
PropertyTypeDescription
keyframesArray of _Keyframe
animationAnimation
expandedboolean
selectedboolean
channelsSee types
mutedSee types
namestring
uuidstring
rotationsArray of _Keyframe
positionArray of _Keyframe
scaleArray of _Keyframe

select()

Returns: BoneAnimator

addToTimeline()

Returns: BoneAnimator

addKeyframe( data[, uuid] )

Arguments:
  • data: KeyframeOptions
    • channel: string (Optional)
    • data_points: Array of See types
    • time: number
    • color: 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: string
  • options: AddChannelOptions
    • name: 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:

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: string
  • allow_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 string
  • animation: Animation
  • name: string
PropertyTypeDescription
keyframesArray of _Keyframe
animationAnimation
expandedboolean
selectedboolean
channelsSee types
mutedSee types
namestring
uuidstring
rotationsArray of _Keyframe
positionArray of _Keyframe
scaleArray of _Keyframe

select()

Returns: NullObjectAnimator

addToTimeline()

Returns: NullObjectAnimator

addKeyframe( data[, uuid] )

Arguments:
  • data: KeyframeOptions
    • channel: string (Optional)
    • data_points: Array of See types
    • time: number
    • color: 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: string
  • options: AddChannelOptions
    • name: 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 string
  • animation: Animation
  • name: string
PropertyTypeDescription
keyframesArray of _Keyframe
animationAnimation
expandedboolean
selectedboolean
channelsSee types
mutedSee types
namestring
uuidstring
rotationsArray of _Keyframe
positionArray of _Keyframe
scaleArray of _Keyframe

select()

Returns: EffectAnimator

addToTimeline()

Returns: EffectAnimator

addKeyframe( data[, uuid] )

Arguments:
  • data: KeyframeOptions
    • channel: string (Optional)
    • data_points: Array of See types
    • time: number
    • color: 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: string
  • options: AddChannelOptions
    • name: string (Optional)
    • transform: boolean (Optional)
    • mutable: boolean (Optional)
    • max_data_points: number (Optional)

pushKeyframe( keyframe )

Arguments:

Returns: EffectAnimator

displayFrame( [in_loop] )

Arguments:
  • in_loop: boolean (Optional)

startPreviousSounds()

TimelineMarker

new TimelineMarker()

Creates a new TimelineMarker

PropertyTypeDescription
colornumber
timenumber