Skip to content

OverlaySystem.layerCount

Summary

OverlaySystem.layerCount returns the number of layers currently registered in the system. Use it for diagnostics or guard logic before updates/removals.

Syntax

OverlaySystem.layerCount: number
const count = overlay.layerCount;

Parameters

This property does not take parameters.

Returns

number - Number of attached layers.

Type Details

// No additional descriptor expansion is required for this signature.

Example

const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);

const overlay = wgpu.createOverlay.system();
overlay.addLayer(wgpu.createOverlay.axisTriad());
console.log(overlay.layerCount);

See Also