donmccurdy / glTF-Transform

glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.
https://gltf-transform.dev
MIT License
1.42k stars 150 forks source link

feat(functions): Add uninstance() and createInstanceNodes() #1525

Closed donmccurdy closed 1 month ago

donmccurdy commented 1 month ago

Example:

import { uninstance } from '@gltf-transform/functions';

document.getRoot().listNodes(); // → [ Node x 10 ]

await document.transform(uninstance());

document.getRoot().listNodes(); // → [ Node x 1000 ]