Clears local transform of the Node, applying the transform to children and meshes.
Example:
import { clearNodeTransform } from '@gltf-transform/functions'; node.getTranslation(); // → [ 5, 0, 0 ] node.getMesh(); // → vertex data centered at origin clearNodeTransform(node); node.getTranslation(); // → [ 0, 0, 0 ] node.getMesh(); // → vertex data centered at [ 5, 0, 0 ]
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. Documentation built with greendoc and published under Creative Commons Attribution 3.0.
Clears local transform of the Node, applying the transform to children and meshes.
Example:
import { clearNodeTransform } from '@gltf-transform/functions'; node.getTranslation(); // → [ 5, 0, 0 ] node.getMesh(); // → vertex data centered at origin clearNodeTransform(node); node.getTranslation(); // → [ 0, 0, 0 ] node.getMesh(); // → vertex data centered at [ 5, 0, 0 ]
To clear all transforms of a Node, first clear its inherited transforms with clearNodeParent, then clear the local transform with clearNodeTransform.