Blockbench Reference Docs
    Preparing search index...

    Animation class

    BBAnimation is an alias for Animation. Blockbench's Animation class conflicts with libdom's Animation type with its own Animation Class, but TypeScript doesn't include a way to overwrite UMD global types.

    You can use BBAnimation to get around the Typescript conflict, or use Animation.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Adds the animation to the current project and to the interface

      Parameters

      • Optionalundo: boolean

        If true, the addition of the animation will be registered as an edit

      Returns this

    • 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

    • Compiles the JSON tree of the animation for the Minecraft Bedrock Edition animation format.

      Returns any

    • Parameters

      • undo: boolean
      • Optionalremove_from_file: boolean

      Returns this

    Properties

    anim_time_update: string
    animators: { [id: string]: GeneralAnimator }
    blend_weight: string
    effects?: EffectAnimator
    file_menu: Menu
    length: number
    loop: "once" | "hold" | "loop"
    loop_delay: string
    markers: TimelineMarker[]
    menu: Menu
    name: string
    override: boolean
    path: string
    playing: boolean
    saved: boolean
    saved_name?: string
    selected: boolean
    snapping: number
    start_delay: string
    time: number
    type: string
    uuid: string
    selected: BBAnimation