一键导入
draco3d
Google Draco 3D geometry compression library. Compresses and decompresses 3D meshes and point clouds, with glTF, Three.js, and Unity integration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Google Draco 3D geometry compression library. Compresses and decompresses 3D meshes and point clouds, with glTF, Three.js, and Unity integration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Crawl and analyze a website's visual design system from a given URL, identifying design style, color system, typography, component styles, and UI patterns. Output a structured design specification document for UI generation. Suitable for competitive design analysis, UI restoration, design system reverse engineering, style migration, and similar scenarios.
Agent Skills standard reference guide. Covers SKILL.md specification format, progressive loading, skill discovery and activation, authoring best practices, quality evaluation, description optimization, and more.
Loop Engineering AI programming paradigm guide. Covers the core concepts of transitioning from single prompt calls to autonomous loop systems, key components, loop patterns, configuration examples, and anti-patterns.
A professional email writing assistant. Based on the user's email purpose and content points, writes clear, concise, and polite emails covering subject, body, and attachment notes, adapted to different audiences and scenarios.
A senior industry research consultant. Conducts in-depth analysis of specified industries, covering development history, industry trends, competitive landscape, and technological innovation, and outputs forward-looking, actionable recommendations.
A professional job description (JD) writing assistant. Based on job title and recruitment requirements, writes precise, professional, and compelling job descriptions covering three modules: job responsibilities, qualifications, and key skills.
| name | draco3d |
| description | Google Draco 3D geometry compression library. Compresses and decompresses 3D meshes and point clouds, with glTF, Three.js, and Unity integration. |
npm i draco3d (WASM codec) | CDN: gstatic.com/draco/versioned/decoders/1.5.7/
Use when compressing 3D models, decoding Draco files, integrating Draco in web projects, using the draco3d npm package, or handling glTF Draco extensions.
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);
const geo = type === d.TRIANGULAR_MESH ? new d.Mesh() : new d.PointCloud();
type === d.TRIANGULAR_MESH
? dec.DecodeBufferToMesh(buf, geo)
: dec.DecodeBufferToPointCloud(buf, geo);
// Read positions
const a = dec.GetAttribute(geo, d.POSITION);
const fa = new d.DracoFloat32Array();
dec.GetAttributeFloatForAllPoints(geo, a, fa);
// Read face indices (mesh only)
const ia = new d.DracoInt32Array();
for (let i = 0; i < geo.num_faces(); i++) {
dec.GetFaceFromMesh(geo, i, ia); // ia.GetValue(0/1/2)
}
// ⚠️ Must manually release
d.destroy(geo); d.destroy(dec); d.destroy(buf); d.destroy(fa);
import DracoEncoderModule from 'draco3d/draco_encoder.js';
const d = await DracoEncoderModule();
const mesh = new d.Mesh();
const b = new d.MeshBuilder();
b.AddFacesToMesh(mesh, numFaces, indices);
b.AddFloatAttributeToMesh(mesh, d.POSITION, numVerts, 3, positions);
b.AddFloatAttributeToMesh(mesh, d.NORMAL, numVerts, 3, normals);
const enc = new d.Encoder();
enc.SetEncodingMethod(d.MESH_EDGEBREAKER_ENCODING);
enc.SetAttributeQuantization(d.POSITION, 11);
const out = new d.DracoInt8Array();
enc.EncodeMeshToDracoBuffer(mesh, out);
d.destroy(mesh); d.destroy(enc); d.destroy(b);
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
const loader = new DRACOLoader();
loader.setDecoderPath('https://www.gstatic.com/draco/versioned/decoders/1.5.7/');
gltfLoader.setDRACOLoader(loader);
| Constant | Quant. Bits | Range |
|---|---|---|
POSITION | 11 | 8–14 |
NORMAL | 7 | 6–10 |
TEX_COORD | 10 | 8–12 |
COLOR | 8 | 6–10 |
GENERIC | 8 | — |
Encoding methods: MESH_EDGEBREAKER_ENCODING (high compression, default) | MESH_SEQUENTIAL_ENCODING (faster decode)
d.destroy(obj), otherwise memory leaks/v1/decoders/ pathreferences/api-reference.md — Decoder/Encoder/MeshBuilder full method signatures, Metadata, ExpertEncoder, Node.js.