Closed RyugaRyuzaki closed 7 months ago
On the v4 alpha release, this has been fixed with a fast path for weld tolerance=0. I'd recommend tolerance=0 for most use cases starting with v4, where it will be the default.
To install the alpha release:
npm install --save @gltf-transform/core@next @gltf-transform/extensions@next @gltf-transform/functions@next
Also note the reorder, quantize, and meshopt steps can all be combined into one:
await doc.transform(
weld(),
simplify({simplifier: MeshoptSimplifier, ratio: 0.75, error: 0.001}),
meshopt({encoder: MeshoptEncoder, level: 'high'}),
sequence()
);
Then explicitly calling doc.createExtension(EXTMeshoptCompression)
is not required.
Based on the instructions here https://github.com/mrdoob/three.js/issues/21492#issuecomment-2029710683 -I configured the glb export function as follows