threejs-interaction · cesartevisual — Claude Code skill: features and setup
This Claude Code skill guides Three.js interaction work, from object picking to orbit controls. It applies when an agent is asked to add dragging, selection, or synchronized HTML controls.
MIT 681 installs ★ 26 updated 2026-09-10
npx skills add cesartevisual/threejs-skills --skill threejs-interaction -a claude-codeWhat threejs-interaction does
The skill guides implementation of pointer-based picking, camera orbit controls, object dragging, and HTML controls that stay in sync with application state. It covers pointer, touch, keyboard, and HTML input for important actions.
Its instructions address viewport-relative coordinates, raycasting relevant scene roots, and separating clicks from drags. They also cover pointer capture, cancellation, and pausing orbit controls while an object is being manipulated. For nested transforms, drag results need conversion into the object's parent space. Shader-deformed visuals may need proxy geometry because CPU raycasting can miss their displayed shape.
The guidance includes checking offset canvases, occlusion, keyboard selection, and instance selection after list updates. It calls for using the project's installed Three.js version and disposing of controls and event listeners when finished.
What it helps with
- add pointer picking to a Three.js scene
- distinguish a click from an object drag
- coordinate orbit controls with object manipulation
- keep HTML controls in sync with scene selection
Example prompts for the agent
- Add click selection and mouse dragging to this Three.js scene.
- Configure orbit controls so they pause while I drag an object.
- Make scene selection work from the keyboard and sync it with the HTML controls.
How to install threejs-interaction
1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-interaction -a claude-code2Manually: put the files in place
~/.claude/skills/threejs-interaction/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/threejs-interaction/
1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-interaction -a codex2Manually: put the files in place
.agents/skills/threejs-interaction/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-interaction -a cursor2Manually: put the files in place
.cursor/skills/threejs-interaction/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install cesartevisual/threejs-skills skills/threejs-interaction2Manually: put the files in place
.github/skills/threejs-interaction/SKILL.md1Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-interaction -a gemini-cli2Platform CLI
gemini skills install https://github.com/cesartevisual/threejs-skills --path skills/threejs-interactionManually: put the files in place
.devin/skills/threejs-interaction/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add cesartevisual/threejs-skills --skill threejs-interaction -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about threejs-interaction
How do I install threejs-interaction in Claude Code?
Run npx skills add cesartevisual/threejs-skills --skill threejs-interaction -a claude-code. The skill file is at ~/.claude/skills/threejs-interaction/SKILL.md.
What does threejs-interaction do?
It guides Three.js work involving object picking, orbit controls, dragging, and selection state shared with HTML controls.
Which input methods does threejs-interaction cover?
Its guidance covers pointer, touch, keyboard, and HTML input. It also addresses pointer cancellation and capture during dragging.
Source text
SKILL.md · MIT
--- name: threejs-interaction description: "Implement Three.js pointer picking, orbit controls, object dragging, selection, and synchronized HTML controls." --- # Picking and Controls Use the project's installed versions and existing architecture. These instructions supplement the user's task; they do not authorize unrelated changes or external actions. Choose controls based on the task and preserve ordinary page scrolling outside the interactive area. Define pointer, touch, keyboard, and HTML equivalents for important actions. Keep selection in application state keyed by stable IDs rather than temporary mesh indices alone. Convert client coordinates using the actual event viewport rectangle: x = 2 * (clientX - left) / width - 1; y = 1 - 2 * (clientY - top) / height. For scissored views use that view's rectangle. Ignore zero-sized views. Raycast only relevant roots/layers and account for descendants, instance IDs, and front/back-face behavior. Distinguish a click from a drag using travel thresholds. Use pointer capture when dragging beyond the canvas; handle pointercancel and lost capture. Temporarily suspend orbit controls while object manipulation owns the gesture, then restore them on every exit path. For drag planes and transform gizmos, convert world results into the object's parent space. Scale constraints and hit tolerances to the use case. Visible shader deformation may not match CPU raycasting; use proxy geometry or another picking method when needed. Throttle expensive hover work to rendered frames, reuse allocations, and dispose controls/listeners. Verify an offset canvas, touch cancellation, nested transforms, occlusion, keyboard selection, and selecting an instance after list updates. ## API reference Consult the [official documentation](https://threejs.org/docs/pages/Raycaster.html) for exact signatures and revision-specific behavior. If documentation access is unavailable, inspect installed types/source and state any remaining uncertainty.
© cesartevisual · MIT · cesartevisual/threejs-skills
Similar skills
All skills for Game dev and 3D: Unity, Unreal, Godot, Blender →threejs-interaction by other authors comes first.