Skip to content

@relu-interactives/spatial-ecs


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

Class: InstanceSlotComponent

Defined in: components/InstanceSlotComponent.ts:13

Marks an entity as an instance slot owned by an InstancedMeshComponent group entity.

Instance slot entities are lightweight data containers — they carry TransformComponent (the per-instance local transform) and this component, but do not have an Object3DRef. Their transforms are consumed each frame by InstancedMeshSystem to compose the instance matrix.

Extends

Constructors

Constructor

ts
new InstanceSlotComponent(groupEntityId, slotIndex): InstanceSlotComponent;

Defined in: components/InstanceSlotComponent.ts:19

Parameters

ParameterType
groupEntityIdnumber
slotIndexnumber

Returns

InstanceSlotComponent

Overrides

Component.constructor

Properties

PropertyTypeDescriptionDefined in
groupEntityIdnumberEntity ID of the owning instancedMesh group entity.components/InstanceSlotComponent.ts:15
slotIndexnumberZero-based index of this slot within the group's instanceEntityIds array.components/InstanceSlotComponent.ts:17