Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Base

Base animations are used to display arbitrary model in the world

Hierarchy

Index

Constructors

constructor

  • 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

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

    Returns void

describe

  • describe(description: { material?: string; mesh?: RenderMesh; render?: Render; 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?: Render; 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?: Render

        Render object to be displayed with animation

      • 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

  • destroy(): void

getAge

  • getAge(): void

getRenderAPI

  • getRenderAPI(base: any): any

getShaderUniforms

load

  • load(): void

loadCustom

  • loadCustom(func: () => void): void

newTransform

  • 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

  • refresh(): void

resetBlockLightPos

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

    Returns void

setBlockLightPos

  • 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

  • setBlocklightMode(): void
  • Sets light measuring to match the animation coordinated

    Returns void

setIgnoreBlocklight

  • setIgnoreBlocklight(ignore: boolean): void

setIgnoreLightMode

  • setIgnoreLightMode(): void

setInterpolationEnabled

  • setInterpolationEnabled(enabled: boolean): void
  • Parameters

    • enabled: boolean

      if true, animation position will be interpolated between tick calls

    Returns void

setPos

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

    Parameters

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

    Returns void

setSkylightMode

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

    Returns void

transform

updateRender

  • updateRender(): void

Generated using TypeDoc