一键导入
rgl-gltf
Use @rendergl/headless-three-webgpu-helpers for GLTF/GLB loading, inspection, framing, lighting, environment maps, and convenience rendering.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use @rendergl/headless-three-webgpu-helpers for GLTF/GLB loading, inspection, framing, lighting, environment maps, and convenience rendering.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use the rgl CLI from @rendergl/headless-three-webgpu-cli to render, inspect, and benchmark 3D assets from Node.js.
Use @rendergl/headless-three-webgpu for low-level headless Three.js WebGPU rendering from Node.js.
| name | rgl-gltf |
| description | Use @rendergl/headless-three-webgpu-helpers for GLTF/GLB loading, inspection, framing, lighting, environment maps, and convenience rendering. |
Use this skill when the input is a .gltf or .glb asset and you want a Node.js API instead of the rgl command.
npm install @rendergl/headless-three-webgpu @rendergl/headless-three-webgpu-helpers three
@rendergl/headless-three-webgpu and three are peer dependencies.
renderGltf(options)prepareGltfScene(options)computeGltfFraming(root, options)inspectGltfAsset(path)loadGltfFromFile(path, renderer)loadGltfDocument(path)inlineGltfExternalResources(path)import { renderGltf } from "@rendergl/headless-three-webgpu-helpers";
const result = await renderGltf({
path: "./model.glb",
width: 1024,
height: 1024,
format: "png",
lighting: "studio",
});
result.buffer contains the encoded image. result.diagnostics contains renderer diagnostics. result.inspection contains the GLTF summary.
path: stringwidth: numberheight: numberformat?: "png" | "webp"background?: stringdawnFlags?: string[]lighting?: "studio" | "flat" | "none" | lightingObjectcamera?: { position?, target?, fov?, useEmbeddedCamera? }environment?: environmentObjectLighting object:
preset?: "studio" | "flat" | "none"ambientIntensity?: numberkeyIntensity?: numberfillIntensity?: numberrimIntensity?: numberkeyPosition?: [x, y, z]fillPosition?: [x, y, z]rimPosition?: [x, y, z]lights?: customLight[]Custom light types:
ambientdirectionalhemispherepointLocal equirectangular .hdr and .ktx2 environment maps are supported.
const result = await renderGltf({
path: "./model.glb",
width: 1024,
height: 1024,
format: "png",
lighting: "none",
environment: {
path: "./studio.hdr",
background: true,
blur: 0.2,
intensity: 1.2,
},
});
Environment object:
path: stringbackground?: booleanblur?: numberintensity?: numberimport { inspectGltfAsset } from "@rendergl/headless-three-webgpu-helpers";
const summary = await inspectGltfAsset("./model.glb");
Inspection does not initialize the GPU.
Use prepareGltfScene() for animation, custom camera movement, or multi-frame rendering.
import { prepareGltfScene } from "@rendergl/headless-three-webgpu-helpers";
const prepared = await prepareGltfScene({
path: "./model.glb",
width: 1024,
height: 1024,
});
await prepared.renderer.render(prepared.scene, prepared.camera);
const png = await prepared.renderer.toBuffer("png");
await prepared.dispose();
Always call prepared.dispose() exactly once.