← 返回 Skills 市场
openlark

Comprehensive Three.js 3D graphics reference

作者 OpenLark · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ pending
13
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install threejs-3d
功能描述
Detailed Three.js 3D graphics reference covering scene setup, cameras, geometries, materials, lights, animations, controls, loaders, math utilities, and debu...
使用说明 (SKILL.md)

Three.js 3D

Quick Start

import * as THREE from 'three';
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, innerWidth/innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer({antialias: true});
renderer.setSize(innerWidth, innerHeight);
document.body.appendChild(renderer.domElement);
scene.add(new THREE.Mesh(
  new THREE.BoxGeometry(1,1,1),
  new THREE.MeshStandardMaterial({color: 0x44aa88})
));
scene.add(new THREE.DirectionalLight(0xffffff, 3));
scene.add(new THREE.AmbientLight(0x404040, 0.5));
camera.position.z = 5;
function animate() { requestAnimationFrame(animate); renderer.render(scene, camera); }
animate();

Import

npm install three
import * as THREE from 'three';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';

Key Patterns

Object3D (everything extends this)

obj.position.set(x,y,z); obj.rotation.set(x,y,z); obj.scale.set(x,y,z); // Euler rad
obj.quaternion.set(x,y,z,w);       // No gimbal lock
obj.lookAt(target);                // -Z → target, +Y up
parent.add(child); parent.remove(child); parent.attach(child); // Reparent w/o visual change
obj.getWorldPosition(v); obj.localToWorld(v); obj.worldToLocal(v);

Color

new THREE.Color(0xff0000); new THREE.Color('#ff0000'); new THREE.Color(1,0,0);
color.setHSL(hue, saturation, lightness); // 0–1

Dispose (always!)

geometry.dispose(); material.dispose(); texture.dispose(); renderTarget.dispose();

Reference Files

Read the relevant file based on the task — each is concise and domain-focused:

File Topic
getting-started.md Responsive design, multi-canvas, render-on-demand, fog, disposal
cameras.md PerspectiveCamera, OrthographicCamera, CubeCamera, gotchas
geometries.md All built-in primitives, BufferGeometry, merge, vertex colors
materials.md Material selection guide, properties, transparency fixes, ShaderMaterial
lights.md Light types, three-point lighting, environment maps, skyboxes
objects.md Object3D API, Mesh, InstancedMesh, SkinnedMesh, LOD, scene graph
textures.md Properties, types, color space, KTX2, memory management
loaders.md GLTF/OBJ/FBX, Draco, KTX2, loading manager, gotchas
animation.md AnimationMixer/Action, skeletal, morph targets, crossfading
controls.md OrbitControls, TransformControls, HTML labels, sprites/facades
math.md Vector/Matrix/Quat/Color/Raycaster patterns + gotchas
renderers.md WebGL/WebGPU setup, post-processing, shadows, render targets, GPU picking
nodes.md TSL node materials, compute shaders
helpers.md Debug helpers, scene graph dump, GLSL debugging, lil-gui patterns
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install threejs-3d
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /threejs-3d 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the threejs-3d skill. - Provides a comprehensive Three.js 3D graphics reference for web apps, games, and visualizations. - Covers key topics: scene setup, cameras, geometries, materials, lights, shadows, post-processing, controls, animation, loaders, textures, node materials, math utilities, and debugging. - Includes a quick start code example and modular, concise reference files for each topic. - Designed for practical usage with relevant code patterns and gotchas highlighted.
元数据
Slug threejs-3d
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Comprehensive Three.js 3D graphics reference 是什么?

Detailed Three.js 3D graphics reference covering scene setup, cameras, geometries, materials, lights, animations, controls, loaders, math utilities, and debu... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 13 次。

如何安装 Comprehensive Three.js 3D graphics reference?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install threejs-3d」即可一键安装,无需额外配置。

Comprehensive Three.js 3D graphics reference 是免费的吗?

是的,Comprehensive Three.js 3D graphics reference 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Comprehensive Three.js 3D graphics reference 支持哪些平台?

Comprehensive Three.js 3D graphics reference 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Comprehensive Three.js 3D graphics reference?

由 OpenLark(@openlark)开发并维护,当前版本 v1.0.0。

💬 留言讨论