Animation.Base
Hierarchy
- Base
Index
Constructors
constructor
Constructs a new Base animation on the specified coordinates.
Parameters
x: number
y: number
z: number
Returns Base
Methods
createRenderIfNeeded
Creates render if it was not previously created and applies all the parameters from animation description.
Returns void
describe
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.
optionalmesh: RenderMesh
RenderMesh object to be displayed with animation.
optionalrender: number
Numeric ID of the Render object to be displayed with animation. Can be obtained using Render.getId
optionalscale: number = 1
Animation scale.
optionalskin: string
Name of the texture to be used as render's skin.
Returns void
destroy
Destroys animation and releases all the resources.
Returns void
exists
- since: 2.1.0b60
Returns boolean
getAge
- That feature is obsolete
Backwards compatibility, render doesn't have attributes.
Returns void
getShaderUniforms
- since: 2.0.2b20
Returns ShaderUniformSet
Object for current animation's render.
load
Loads animation in the world.
Returns void
loadCustom
- since: 2.3.1b116 (client-side)
Loads animation in the world registering it as an Updatable.
Parameters
func: () => void
function to be used as Updatable.update function
Returns void
newTransform
Creates a set of transformations for the current animation.
Parameters
transformations: { name: string; params: any[] }[]
noClear: boolean
Returns void
refresh
Refreshes the animation.
Returns void
resetBlockLightPos
Resets light measuring position for the animation (to it's coordinates).
Returns void
setBlockLightPos
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
Sets light measuring to match the animation coordinated.
Returns void
setIgnoreBlocklight
- That feature is obsolete
Use setBlockLightPos and related methods instead.
Parameters
ignore: boolean
Returns void
setIgnoreLightMode
Makes the animation ignore light at all.
Returns void
setInterpolationEnabled
Parameters
enabled: boolean
if true, animation position will be interpolated between tick calls
Returns void
setPos
Changes the animation's position.
Parameters
x: number
y: number
z: number
Returns void
setSkylightMode
Sets light measuring position to always match day/night lightning, even when the animation is not directly illuminated.
Returns void
transform
Returns Transform
Object for current animation's render.
updateRender
Refreshes the animation.
Returns void
Base animations are used to display arbitrary model in the world.