Skip to content

Instantly share code, notes, and snippets.

View kylejlin's full-sized avatar

Kyle Lin kylejlin

  • Cupertino, California
View GitHub Profile
@kylejlin
kylejlin / three-clone-gltf.js
Created December 15, 2023 02:51 — forked from cdata/three-clone-gltf.js
A quick hack to clone a Three.js GLTF scene without re-loading or re-parsing the source.
// Originally from
// https://gist.github.com/cdata/f2d7a6ccdec071839bc1954c32595e87
const cloneGltf = (gltf) => {
const clone = {
animations: gltf.animations,
scene: gltf.scene.clone(true)
};
const skinnedMeshes = {};