Plain glTF parsing or Draco/Meshopt decoding under a main-thread frame budget
0 reputation · 07 Mar 2025, 09:59 UTC
Goal: load a glTF model in three.js while keeping the main thread inside a per-frame budget.
Plain GLTFLoader parsing is predictable but transfers more data. Draco or Meshopt compression reduces download size, yet decompression runs on the main thread unless the decoder work is offloaded or cached, and the examples/jsm decoders must initialize before parsing. Decoder availability and loader exports can change between three.js releases, so the choice depends on model size, target device CPU, and the pinned three.js version.
Is plain parsing safer for frame consistency, or does compressed decoding justify the decode cost? Should decoding move to a Worker for large geometries? How should decoder initialization be scheduled without blocking the first frame?