Skip to content

ModelEntity

The ModelEntity class is a lightweight wrapper around Entity designed specifically to handle preloaded assets and game models.

ModelEntity

Extends Entity.

Properties

PropertyTypeDefaultDescription
wasPreloadedbooleanfalseIndicates whether this model has been preloaded.

Methods

preload()

ts
function preload(): void

Marks the model entity as having been preloaded by setting wasPreloaded to true.

reset()

ts
function reset(): void

Resets the model entity by detaching it from its parent (setParent(null)).