OverlaySystem.destroy¶
Summary¶
OverlaySystem.destroy tears down update scheduling, event subscriptions, and all registered layers, then removes the overlay root element. Call this during app cleanup or when replacing an overlay system entirely.
Syntax¶
Parameters¶
This method does not take parameters.
Returns¶
void - No value is returned; overlay resources and DOM nodes are released.
Type Details¶
Example¶
const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);
const overlay = wgpu.createOverlay.system();
overlay.addLayer(wgpu.createOverlay.axisTriad());
overlay.destroy();