draco3d
Installation
SKILL.md
Draco3D — 3D Geometry Compression
npm i draco3d (WASM codec) | CDN: gstatic.com/draco/versioned/decoders/1.5.7/
Use Cases
Use when compressing 3D models, decoding Draco files, integrating Draco in web projects, using the draco3d npm package, or handling glTF Draco extensions.
Decoding
import DracoDecoderModule from 'draco3d/draco_decoder.js';
const d = await DracoDecoderModule();
const buf = new d.DecoderBuffer();
buf.Init(bytes, bytes.length);
const dec = new d.Decoder();
const type = dec.GetEncodedGeometryType(buf);