skills/threejs-skills/threejs-objects/SKILL.md
three.js scene graph objects: Object3D transforms and hierarchy, Group, Mesh, InstancedMesh, SkinnedMesh, BatchedMesh, LOD, Line/LineLoop/LineSegments, Points, Sprite, Bone, Skeleton, ClippingGroup; interaction via Raycaster, Layers masks, and EventDispatcher patterns. Use when building scene hierarchies, picking objects with Raycaster, or configuring instanced/skinned meshes; for pure vector math use threejs-math; for skeletal clips use threejs-animation.
npx skillsauth add partme-ai/full-stack-skills threejs-objectsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
ALWAYS use this skill when the user mentions:
position/rotation/scale, matrixAutoUpdate, updateMatrixWorldRaycaster.setFromCamera, intersectObjects, recursive flag, face/uv resultsIMPORTANT: objects vs math
| Need | Skill | |------|--------| | Scene graph + picking | threejs-objects | | Box/ray math only | threejs-math |
Trigger phrases include:
Group and transforms; minimize deep hierarchies where possible.count and frustum culling behavior.EventDispatcher on custom objects; patterns only, not DOM frameworks.ClippingGroup usage per docs when user needs sectional cuts.dispose() on geometries/materials/textures when removing objects permanently.import * as THREE from 'three';
const raycaster = new THREE.Raycaster();
const pointer = new THREE.Vector2();
function onPointerMove(event) {
// Normalize device coordinates (-1 to +1)
pointer.x = (event.clientX / window.innerWidth) * 2 - 1;
pointer.y = -(event.clientY / window.innerHeight) * 2 + 1;
}
function pick(camera, scene) {
raycaster.setFromCamera(pointer, camera);
const intersections = raycaster.intersectObjects(scene.children, true);
// Validate: intersections are sorted by distance (nearest first)
if (intersections.length > 0) {
console.log('Nearest hit:', intersections[0].object.name,
'at distance:', intersections[0].distance);
}
return intersections;
}
See examples/workflow-raycaster-pick.md.
| Docs section | Representative links | |--------------|----------------------| | Core | https://threejs.org/docs/Object3D.html | | Objects | https://threejs.org/docs/Mesh.html | | Objects | https://threejs.org/docs/InstancedMesh.html | | Core | https://threejs.org/docs/Raycaster.html |
updateMatrixWorld before world-space ray tests on moved objects.layers set picks unintended objects—set masks consistently on camera and objects.Object3D, mesh types, Raycaster, and Layers are documented under Objects and Core in three.js docs. Behavior of picking and layers can shift slightly—link the exact page for the user’s three.js line.
When answering under this skill, prefer responses that:
Object3D, Mesh, InstancedMesh, Raycaster, or Layers as needed.dispose() for geometries/materials when removing objects permanently.English: object3d, mesh, instancedmesh, skinnedmesh, raycaster, layers, scene graph, three.js
中文: 场景图、Object3D、Mesh、实例化、骨骼网格、射线拾取、图层、three.js
development
Provides per-component and per-API examples with cross-platform compatibility details for uni-app, covering built-in components, uni-ui components, and APIs (network, storage, device, UI, navigation, media). Use when the user needs official uni-app components or APIs, wants per-component examples with doc links, or needs platform compatibility checks.
tools
Creates new uni-app projects via the official CLI or HBuilderX with Vue 2/Vue 3 template selection, manifest.json and pages.json configuration, and directory structure setup. Use when the user wants to scaffold a new uni-app project, initialize project files with a single command, or set up the development environment.
tools
Browses, installs, configures, and manages plugins from the uni-app plugin market (ext.dcloud.net.cn) including component plugins, API plugins, and template plugins with dependency handling. Use when the user needs to find and install uni-app plugins, configure plugin settings, manage plugin dependencies, or integrate third-party components.
tools
Develops native Android and iOS plugins for uni-app including module creation, JavaScript-to-native communication, and plugin packaging for distribution. Use when the user needs to build custom native modules, extend uni-app with native capabilities (camera, Bluetooth, sensors), or create publishable native plugins.