API Referenceatlas
Model
A resource-backed model containing multiple CoreObjects.
Module: atlas
A resource-backed model containing multiple CoreObjects.
Declaration
export class Model extends GameObject { ... }Extends: GameObject
Methods
fromResource
static fromResource(path: string): Model;getObjects
Returns the mesh objects that make up the model.
getObjects(): CoreObject[];move
Translates by the supplied offset.
override move(position: Position3d): void;setPosition
Sets the position to an absolute value.
override setPosition(position: Position3d): void;setRotation
Replaces the rotation.
override setRotation(rotation: Rotation3d): void;lookAt
Orients toward the target position.
override lookAt(target: Position3d, up?: Normal3d): void;rotate
Applies an incremental rotation.
override rotate(rotation: Rotation3d): void;setScale
Replaces the scale factors.
override setScale(scale: Scale3d): void;scaleBy
Multiplies the current scale component-wise by the supplied factors.
override scaleBy(scale: Scale3d): void;show
Makes the object visible.
override show(): void;hide
Makes the object invisible.
override hide(): void;attachTexture
Attaches a texture to this object.
override attachTexture(texture: Texture): void;