Skip to main content

Class: RenderLayerComponent

Defined in: rendering/render-layers/render-layer-component.ts:19

The ForgeRenderLayer class represents a rendering layer with its own canvas and WebGL context.

Extends

Constructors

Constructor

new RenderLayerComponent(options): RenderLayerComponent

Defined in: rendering/render-layers/render-layer-component.ts:34

Constructs a new instance of the RenderLayerComponent class.

Parameters

options

RenderLayerComponentOptions = {}

The options for configuring the render layer.

Returns

RenderLayerComponent

Throws

An error if the WebGL2 context is not found.

Overrides

Component.constructor

Properties

order

order: number

Defined in: rendering/render-layers/render-layer-component.ts:21

The order of the render layer (lower numbers are rendered first).


renderables

readonly renderables: Map<Renderable, InstanceBatch>

Defined in: rendering/render-layers/render-layer-component.ts:27

The map of renderables to their associated instance batches.


sortEntities

sortEntities: boolean

Defined in: rendering/render-layers/render-layer-component.ts:24

Whether to sort entities by their y position before rendering.

Accessors

id

Get Signature

get static id(): symbol

Defined in: ecs/types/Component.ts:12

The unique id of the component.

Returns

symbol

Inherited from

Component.id

Methods

addEntity()

addEntity(renderable, entity): void

Defined in: rendering/render-layers/render-layer-component.ts:48

Parameters

renderable

Renderable

entity

Entity

Returns

void


removeEntity()

removeEntity(renderable, entity): void

Defined in: rendering/render-layers/render-layer-component.ts:56

Parameters

renderable

Renderable

entity

Entity

Returns

void