Skip to main content

Function: addForgeRenderLayers()

addForgeRenderLayers(layerNames, gameContainer, layerService, world): ForgeRenderLayer[]

Defined in: rendering/utilities/add-forge-render-layers.ts:15

Adds multiple Forge render layers to the game container and registers them with the layer service. It also creates a render system and a batching system per layer.

Parameters

layerNames

string[]

The name of the layers.

gameContainer

HTMLElement

The HTML element that will contain the canvas.

layerService

LayerService

The layer service to register the layers with.

world

World

The ECS world to which the systems will be added.

Returns

ForgeRenderLayer[]

An array containing the created layer and canvas details.