Skip to main content

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

ParameterTypeDescription
entitynumberThe 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

ParameterTypeDescription
entityHandlenumberThe 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

ParameterTypeDescription
entityHandlenumberThe 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

ParameterTypeDescription
entityHandlenumberThe entity with the renderable component
shadowModenumberThe 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

ParameterTypeDescription
entityHandlenumberThe entity with the renderable component
enabledbooleanWhether 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

ParameterTypeDescription
entityHandlenumberThe entity with the renderable component
layerMasknumberThe 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

ParameterTypeDefault valueDescription
entityHandlenumberundefinedThe entity with the renderable component
materialHandlenumberundefinedThe material handle to attach
indexnumber0The 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

ParameterTypeDescription
entityHandlenumberThe entity with the renderable component
meshHandlenumberThe 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

ParameterTypeDescription
entityHandlenumberThe entity with the renderable component
receivebooleanWhether to receive shadows

Returns

boolean

boolean indicating success