Options
All
  • Public
  • Public/Protected
  • All
Menu

Base animations are used to display arbitrary model in the world

Hierarchy

Index

Constructors

  • new Base(x: number, y: number, z: number): Base
  • Constructs a new Base animation on the specified coordinates

    Parameters

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

    Returns Base

Methods

  • createRenderIfNeeded(): void
  • Creates render if it was not previously created and applies all the parameters from animation description

    Returns void

  • describe(description: { material?: string; mesh?: RenderMesh; render?: number; scale?: number; skin?: string }): 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

      • Optional material?: string

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

      • Optional mesh?: RenderMesh

        RenderMesh object to be displayed with animation

      • Optional render?: number

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

      • Optional scale?: number

        Animation scale, default is 1

      • Optional skin?: string

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

    Returns void

  • destroy(): void
  • getAge(): void
  • getRenderAPI(base: any): any
  • load(): void
  • loadCustom(func: (() => void)): void
  • newTransform(transformations: { name: string; params: any[] }[], noClear: boolean): void
  • Creates a set of transformations for the current animation

    Parameters

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

    Returns void

  • refresh(): void
  • resetBlockLightPos(): void
  • Resets light measuring position for the animation (to its coordinates)

    Returns void

  • setBlockLightPos(x: number, y: number, z: number): 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

  • setBlocklightMode(): void
  • setIgnoreBlocklight(ignore: boolean): void
  • setIgnoreLightMode(): void
  • setInterpolationEnabled(enabled: boolean): void
  • Parameters

    • enabled: boolean

      if true, animation position will be interpolated between tick calls

    Returns void

  • setPos(x: number, y: number, z: number): void
  • Changes the animation's position

    Parameters

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

    Returns void

  • setSkylightMode(): void
  • Sets light measuring position to always match day/night lightning, even when the animation is not directly illuminated

    Returns void

  • updateRender(): void

Generated using TypeDoc