WasmGPU.createTransform().dispose¶
Summary¶
WasmGPU.createTransform().dispose releases the transform's slot in the global transform store. Before release, its children are detached to root-level so the hierarchy remains valid. After disposal, most transform operations throw a use-after-dispose error. Use this when you permanently remove objects and want to reclaim transform capacity.
Syntax¶
Parameters¶
This API does not take parameters.
Returns¶
void - This method does not return a value.
Example¶
const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);
const t = wgpu.createTransform().setPosition(1, 2, 3);
console.log(t.disposed);
t.dispose();
console.log(t.disposed);