Removes duplicate Accessor, Mesh, Texture, and Material properties. Partially based on a gist by mattdesl. Only accessors in mesh primitives, morph targets, and animation samplers are processed.
Example:
document.getRoot().listMeshes(); // → [Mesh, Mesh, Mesh] await document.transform(dedup({propertyTypes: [PropertyType.MESH]})); document.getRoot().listMeshes(); // → [Mesh]
Made by Don McCurdy. Documentation built with greendoc and published under Creative Commons Attribution 3.0.
Removes duplicate Accessor, Mesh, Texture, and Material properties. Partially based on a gist by mattdesl. Only accessors in mesh primitives, morph targets, and animation samplers are processed.
Example:
document.getRoot().listMeshes(); // → [Mesh, Mesh, Mesh] await document.transform(dedup({propertyTypes: [PropertyType.MESH]})); document.getRoot().listMeshes(); // → [Mesh]