百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

draco.js

> 编程语言
开源

一个小巧的、可插入的、纯 JavaScript Draco 网格加载器,用于三.js。

194 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个小巧的、可插入的、纯 JavaScript Draco 网格加载器,用于三.js。

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.

Live demo →

Why a JS port instead of the official WASM build?

  • Small — ~20 KB gzipped (62 KB minified), vs ~100 KB gzipped for the draco3d WASM decoder + glue (~5× smaller).
  • Simple to ship — one ES module. No .wasm fetch, no worker/glue setup, no cross-origin or CSP headaches.
  • Fast — within ~1.0–1.4× of the WASM decoder on substantial meshes, and effectively at parity on the largest, with byte-for-byte identical output.

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.

Status

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

Credits

  • Decoder logic is a port of Google Draco (Apache-2.0); it mirrors the original C++ file structure.
  • DRACOLoader.js follows the API of three.js's DRACOLoader (MIT) so it drops into GLTFLoader unchanged.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScript3ddracogeometrygltf

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言