Mesh.removeChild¶
Summary¶
Mesh.removeChild operates on a Mesh runtime object to update state, query data, or manage lifecycle.
Syntax¶
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
child |
Mesh |
Yes | Child mesh/transform reference used for hierarchy operations. |
Returns¶
this - The same object instance, returned for fluent chaining.
Type Details¶
Example¶
const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);
const geometry = wgpu.geometry.box(1, 1, 1);
const material = wgpu.material.unlit({ color: [0.9, 0.6, 0.2], opacity: 1.0 });
const mesh = wgpu.createMesh(geometry, material);
const child = {};
const result = mesh.removeChild(child);
console.log(result);