一个小巧的、可插入的、纯 JavaScript Draco 网格加载器,用于三.js。
A pure-JavaScript Draco mesh loader for
three.js. It's a drop-in DRACOLoader that decodes Draco-compressed triangle
meshes — both the EdgeBreaker connectivity used by glTF's
KHR_draco_mesh_compression and Draco's sequential connectivity — directly in
JavaScript.
Why a JS port instead of the official WASM build?
draco3d WASM decoder + glue (~5× smaller)..wasm fetch, no worker/glue setup,
no cross-origin or CSP headaches.You trade decode speed for a much smaller, simpler loader. This pays off most on pages with a single model, where the decoder is a one-time cost that isn't amortized across many meshes — the model often displays sooner end-to-end because the network savings outweigh the extra decode time.
Targets Draco bitstream version 2.2 — what current Draco encoders and glTF exporters produce. Older bitstreams ( scene.add( gltf.scene ) );
It can also load standalone `.drc` files:
```js
const geometry = await new DRACOLoader().loadAsync( 'model.drc' ); // BufferGeometry
DRACOLoader.js follows the API of three.js's
DRACOLoader
(MIT) so it drops into GLTFLoader unchanged.暂无开放 Issues,或尚未同步最近议题。