BaseLayerMixin.moveBefore

Moves this layer immediately before (i.e. visually above) the given sibling in render order.

BaseLayerMixin.moveBefore() method

Moves this layer immediately before (i.e. visually above) the given sibling in render order.

Signature:

moveBefore(sibling: Layer): void;

Parameters

Parameter

Type

Description

sibling

Layer

The layer to place this layer before. Must be in the same scene.

Returns:

void

Remarks

Throws an error if the sibling cannot be resolved or belongs to a different scene.

Example

// Place logo above the background layer
logo.moveBefore(background);
Last updated: October 8, 2026 at 10:45 AMEdit this page