用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/johnalbertini14-glitch/openclaw-skills --skill three-js命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | Three.js |
| description | Build 3D web experiences with proper resource management and performance patterns. |
| metadata | {"clawdbot":{"emoji":"🎮","requires":{"bins":["node"]},"os":["linux","darwin","win32"]}} |
.dispose() on geometries, materials, and textures before removing objects — Three.js never garbage collects GPU resources automaticallymesh.geometry.dispose(); mesh.material.dispose(); scene.remove(mesh) — missing any step causes memory leaksrenderer.setAnimationLoop(animate) instead of manual requestAnimationFrame — it handles VR, pauses when tab is hidden, and provides proper timingclock.getDelta() for frame-independent movement — raw frame counting breaks on different refresh ratescamera.aspect = width/height; camera.updateProjectionMatrix(); renderer.setSize(width, height)updateProjectionMatrix() after aspect change causes stretched/squished renderingrenderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)) — values above 2 kill performance with minimal visual benefitimport { OrbitControls } from 'three/addons/controls/OrbitControls.js' — the path varies by bundler, check your setupcontrols.enableDamping = true with OrbitControls and call controls.update() in render loop — without this, damping silently failsnew THREE.AmbientLight(0xffffff, 0.5)) as baseline — scenes with only directional lights have pitch-black shadowsBufferGeometryUtils.mergeBufferGeometries() — each mesh is a draw call, fewer meshes = fasterInstancedMesh for many identical objects — hundreds of draw calls become oneobject.frustumCulled = true (default) but verify large objects aren't disappearing at edges — bounding sphere may be wrongrenderer.info to debug draw calls, triangles, and textures in memorymixer.update(delta) every frame with actual delta time — passing 0 or skipping frames breaks animationsSkeletonHelper during development to debug bone issues