Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add cesartevisual/threejs-skills --skill threejs-interaction -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/threejs-interaction/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/threejs-interaction/

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.

threejs-interaction CloudAI-X threejs-interaction teaches your agent how to set up raycasting, camera controls, and object dragging in three.js for WebGL and WebGPU. CX Codex +1 20,100installs threejs-interaction calesthio threejs-interaction is a Claude Code skill for adding object picking, input handling, and camera controls to Three.js scenes. It comes into play when a project needs raycasting or interactive 3D behavior. CX Codex +1 1,200installs threejs-materials CloudAI-X Skill for Claude Code, Codex, Cursor and other platforms: choosing and configuring three.js materials — from basic to PBR, toon shading and point clouds. Runs when you need to style a mesh, tune blending or switch to WebGPU. CX Codex +1 21,100installs threejs-geometry CloudAI-X threejs-geometry teaches your coding agent how to build standard geometries, generate 3D text, and construct custom vertex buffers in three.js. CX Codex +1 20,600installs threejs-scene-setup gamedev-skills threejs-scene-setup — a skill for Claude Code sets up a basic three.js r187 scene, camera, renderer, and animation loop. Runs on import errors, blank canvases, or static frames. CX Codex +1 11,100installs threejs-webgl freshtechbro threejs-webgl configures coding agents to build Three.js scenes, set up WebGL or WebGPU renderers, adjust lighting, and load glTF models for web 3D apps. CX Codex +1 5,300installs threejs-aaa-graphics-builder majidmanzarpour threejs-aaa-graphics-builder — a skill for upgrading Three.js games from rough prototypes to production visuals: builds materials, lighting, VFX, shaders, and evaluates scenes against a scorecard. CX Codex +1 4,300installs threejs nexu-io Guides the agent in building browser 3D scenes, materials, interactive controls, and post-processing with Three.js. CX Codex +1 3,600installs

From the same set24

The whole set →
threejs-animation threejs-animation — a skill for Claude Code guides animation work in Three.js. It covers clips, skeletal motion, transitions, and scroll-driven timelines. CX Codex +1 753installs threejs-lighting The threejs-lighting Claude Code skill guides lighting and shadow work in Three.js scenes. It comes into play when setting up environment maps, direct lights, or shadow maps. CX Codex +1 694installs threejs-shaders threejs-shaders — a Claude Code skill for writing and debugging Three.js GLSL shaders, custom material effects, uniforms, and geometry deformation. CX Codex +1 694installs threejs-testing threejs-testing — a skill for Claude Code defines visual QA and browser testing guidelines for Three.js scenes. Focuses on deterministic fixtures, GPU checks, and teardown lifecycle tests. CX Codex +1 681installs threejs-assets The threejs-assets Claude Code skill guides loading and managing glTF models, textures, and user-provided 3D files. It applies to asset validation, compression, caching, and cleanup in Three.js projects. CX Codex +1 676installs threejs-scene This skill for Claude Code configures Three.js scene hierarchies, camera framing, coordinate transforms, and renderer lifecycles. It enforces proper GPU cleanup and bounds calculations. CX Codex +1 671installs threejs-materials The threejs-materials Claude Code skill configures Three.js PBR materials, textures, transparency, and color handling. It activates when a scene needs a surface setup or a material-related color fix. CX Codex +1 668installs threejs-debugging The threejs-debugging Claude Code skill traces rendering faults in Three.js scenes. It kicks in for blank canvases, missing meshes, color issues, flicker, picking failures, or lost graphics context. CX Codex +1 658installs

Project sponsors

Companies that keep this analytics open