Skip to main content
在 Manus 中运行任何 Skill
一键导入

threejs-instancing-materials

星标17
分支0
更新时间2026年7月23日 10:56

Keep Three.js / react-three-fiber draw calls low in this project. Use whenever adding repeated 3D objects (props, tiles, foliage, blocks, enemies, particles, greybox/blockout geometry) or creating materials. Enforces two rules: (1) batch repeated meshes with InstancedMesh (drei <Instances>/<Instance>), never one <mesh> per object; (2) define every material and geometry ONCE in the shared registry and reuse it — tint per-instance with instance color — never `new THREE.Material()` / `new THREE.Geometry()` inline. Shared assets register with `@vibegameengine/shader-warmup`'s central warmup service. Trigger on: "too many draw calls", "scene is slow", "add N of these", "spawn", "props", "instancing", "material", "shader warmup", "shader stutter", "warmup splash", "ShaderWarmupRegistry", high draw-call count in r3f-perf.

安装

用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。

SKILL.md
readonly