InstancingSystem
MRSystem
InstancingSystem ⇐ System that allows for instancing of meshes based on a given entity where the instances can be modified separately.
Kind: global class
Extends: MRSystem
- InstancingSystem ⇐
MRSystem
instancingSystem.InstancingSystem
Kind: instance class of InstancingSystem
new exports.InstancingSystem()
InstancingSystem’s default constructor that sets up default instancing count, transformations, and mesh information.
instancingSystem.update(deltaTime, frame)
The generic system update call. Updates the entity and its instances to their appropriate transformations and visuals based on the picked predefined option.
Kind: instance method of InstancingSystem
Param | Type | Description |
---|---|---|
deltaTime | number |
given timestep to be used for any feature changes |
frame | object |
given frame information to be used for any feature changes |
instancingSystem.attachedComponent(entity)
Determines what meshes are attached from this entity and When a component is attached. Setups up instancing based on the predefined setup option and the entity’s geometry (handling properly whether that be a group or mesh).
Kind: instance method of InstancingSystem
Param | Type | Description |
---|---|---|
entity | MREntity |
the entity with the geometry to be instanced and the chosen setup option |
instancingSystem.random(entity)
An option for default instancing. Places the given entity instancing it at a bunch of random transformation locations.Uses threejs’s InstancedMesh
.
Kind: instance method of InstancingSystem
Param | Type | Description |
---|---|---|
entity | MREntity |
the entity to be instanced in random locations |