Class: RenderableManager
Defined in: render/renderable.ts:9
Constructors
Constructor
new RenderableManager(): RenderableManager;
Returns
RenderableManager
Methods
Create()
static Create(entity): boolean;
Defined in: render/renderable.ts:15
Create a renderable component and attach it to the specified entity
Parameters
| Parameter | Type | Description |
|---|---|---|
entity | number | The entity to attach the renderable component to |
Returns
boolean
boolean indicating success
Destroy()
static Destroy(entityHandle): boolean;
Defined in: render/renderable.ts:26
Destroy the Renderable component on this entity.
Parameters
| Parameter | Type | Description |
|---|---|---|
entityHandle | number | The entity to remove the renderable component from |
Returns
boolean
boolean indicating success
HasComponent()
static HasComponent(entityHandle): boolean;
Defined in: render/renderable.ts:35
Returns whether this entity currently has a Renderable.
Parameters
| Parameter | Type | Description |
|---|---|---|
entityHandle | number | The entity to check |
Returns
boolean
boolean indicating if renderable component exists
SetCastShadows()
static SetCastShadows(entityHandle, shadowMode): boolean;
Defined in: render/renderable.ts:114
Control shadow‐casting mode. 0 = Off, 1 = On, 2 = TwoSided, 3 = ShadowsOnly
Parameters
| Parameter | Type | Description |
|---|---|---|
entityHandle | number | The entity with the renderable component |
shadowMode | number | The shadow casting mode |
Returns
boolean
boolean indicating success
SetCulling()
static SetCulling(entityHandle, enabled): boolean;
Defined in: render/renderable.ts:129
Enable or disable frustum‐culling on this Renderable.
Parameters
| Parameter | Type | Description |
|---|---|---|
entityHandle | number | The entity with the renderable component |
enabled | boolean | Whether to enable culling |
Returns
boolean
boolean indicating success
SetLayerMask()
static SetLayerMask(entityHandle, layerMask): boolean;
Defined in: render/renderable.ts:83
Set the layer mask on this Renderable (bitmask of visible layers).
Parameters
| Parameter | Type | Description |
|---|---|---|
entityHandle | number | The entity with the renderable component |
layerMask | number | The layer mask |
Returns
boolean
boolean indicating success
SetMaterial()
static SetMaterial(
entityHandle,
materialHandle,
index): boolean;
Defined in: render/renderable.ts:63
Set the material for the renderable component
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
entityHandle | number | undefined | The entity with the renderable component |
materialHandle | number | undefined | The material handle to attach |
index | number | 0 | The submesh index (default: 0) |
Returns
boolean
boolean indicating success
SetMesh()
static SetMesh(entityHandle, meshHandle): boolean;
Defined in: render/renderable.ts:45
Set the mesh for the renderable component
Parameters
| Parameter | Type | Description |
|---|---|---|
entityHandle | number | The entity with the renderable component |
meshHandle | number | The mesh handle to attach |
Returns
boolean
boolean indicating success
SetReceiveShadows()
static SetReceiveShadows(entityHandle, receive): boolean;
Defined in: render/renderable.ts:98
Enable or disable receiving shadows on this Renderable.
Parameters
| Parameter | Type | Description |
|---|---|---|
entityHandle | number | The entity with the renderable component |
receive | boolean | Whether to receive shadows |
Returns
boolean
boolean indicating success