Clears the parent of the given Node, leaving it attached directly to its Scene. Inherited transforms will be applied to the Node. This operation changes the Node's local transform, but leaves its world transform unchanged.
Example:
import { clearNodeParent } from '@gltf-transform/functions';
scene.traverse((node) => { ... }); // Scene → … → Node
clearNodeParent(node);
scene.traverse((node) => { ... }); // Scene → Node
To clear all transforms of a Node, first clear its inherited transforms with clearNodeParent, then clear the local transform with clearNodeTransform.
Made by Don McCurdy • Documented with greendoc • © 2023 MIT License
clearNodeParent