Base animations are used to display arbitrary model in the world.

Hierarchy (view full)

Constructors

  • Constructs a new Base animation on the specified coordinates.

    Parameters

    • x: number
    • y: number
    • z: number

    Returns Base

Methods

  • Creates render if it was not previously created and applies all the parameters from animation description.

    Returns void

  • Describes animation parameters for the future use. Call load or loadCustom to actually launch the animation.

    Parameters

    • description: {
          material?: string;
          mesh?: RenderMesh;
          render?: number;
          scale?: number;
          skin?: string;
      }

      an object containing all the required data about animation

      • Optionalmaterial?: string

        Animation material, can be used to apply custom materials to the animation.

        2.0.2b20

      • Optionalmesh?: RenderMesh

        RenderMesh object to be displayed with animation.

        2.0.2b20

      • Optionalrender?: number

        Numeric ID of the Render object to be displayed with animation. Can be obtained using Render.getId

      • Optionalscale?: number

        Animation scale.

        1
        
      • Optionalskin?: string

        Name of the texture to be used as render's skin.

    Returns void

  • Destroys animation and releases all the resources.

    Returns void

  • Returns void

    Backwards compatibility, render doesn't have attributes.

  • Loads animation in the world registering it as an Updatable.

    Parameters

    • func: (() => void)

      function to be used as Updatable.update function

        • (): void
        • Returns void

    Returns void

    2.3.1b116 (client-side)

  • Creates a set of transformations for the current animation.

    Parameters

    • transformations: {
          name: string;
          params: any[];
      }[]
    • noClear: boolean

    Returns void

  • Resets light measuring position for the animation (to it's coordinates).

    Returns void

  • Sets light measuring to match the animation coordinated.

    Returns void

  • Sets specified coordinates as light measuring position for the animation. In other words, animation lightning will be calculated as if animation was at the specified coordinates.

    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

  • Makes the animation ignore light at all.

    Returns void

  • Parameters

    • enabled: boolean

      if true, animation position will be interpolated between tick calls

    Returns void

  • Changes the animation's position.

    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

  • Sets light measuring position to always match day/night lightning, even when the animation is not directly illuminated.

    Returns void

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.