Applies a transform matrix to a Primitive.
When calling transformPrimitive, any un-masked vertices are overwritten directly in the underlying vertex streams. If streams should be detached instead, see transformMesh.
Example:
import { fromTranslation } from 'gl-matrix/mat4'; import { transformPrimitive } from '@gltf-transform/functions'; // offset vertices, y += 10. transformPrimitive(prim, fromTranslation([], [0, 10, 0]));
Made by Don McCurdy. Documentation built with greendoc and published under Creative Commons Attribution 3.0.
Applies a transform matrix to a Primitive.
When calling transformPrimitive, any un-masked vertices are overwritten directly in the underlying vertex streams. If streams should be detached instead, see transformMesh.
Example:
import { fromTranslation } from 'gl-matrix/mat4'; import { transformPrimitive } from '@gltf-transform/functions'; // offset vertices, y += 10. transformPrimitive(prim, fromTranslation([], [0, 10, 0]));