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¶
Parameters¶
This property does not take parameters.
Returns¶
number - Number of attached layers.
Type Details¶
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);