Take just this module
modules/world/Object3DUtils.jsCopy it together with its internal dependencies, preserving the relative directory structure.
Factory showroom
threeAuto-rotating showcase — no controls needed.
Source
export function disposeObject3D(object) {
if (!object) return;
object.parent?.remove(object);
object.traverse?.((node) => {
node.geometry?.dispose?.();
if (Array.isArray(node.material)) {
node.material.forEach((material) => material.dispose?.());
} else {
node.material?.dispose?.();
}
});
}