Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / ModelComponent

Class: ModelComponent ​

Defined in: components/Model.ts:13

References a GLTF/GLB asset loaded from path. The model loading system resolves the asset asynchronously and populates ModelComponent.object once available; loading is deferred-tolerant so the entity exists before the model finishes loading.

Extends ​

Constructors ​

Constructor ​

ts
new ModelComponent(path): ModelComponent;

Defined in: components/Model.ts:19

Parameters ​

ParameterType
pathstring

Returns ​

ModelComponent

Overrides ​

Component.constructor

Properties ​

PropertyTypeDescriptionDefined in
pathstringSource URL or localasset:// path of the GLTF/GLB asset.components/Model.ts:15
objectObject3D<Object3DEventMap> | nullLoaded model object, populated asynchronously by the model loader. null until loaded.components/Model.ts:17