Skip to content
SkillModel-led5,168 tokens in use

threejs-interaction

Gives an AI coding agent current three.js r186 knowledge of raycasting, camera controls, transform gizmos, dragging, hover and box selection.

4,322 stars on the repository MIT LicenseCloudAI-X/threejs-skills · skills/threejs-interaction
npx skills add cloudai-x/threejs-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing threejs-interaction costs

64tokens idle
5,168tokens in use

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

Nothing detected: no shell, network, file writes, git or credentials in its files.

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Good
  • Frontmatter12/15
  • Structure17/25
  • Examples15/15
  • Output10/15
  • Size11/15
  • Resources10/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Fair
  • Development activity68
  • Maintenance40
  • Community52
  • Maturity32
  • Momentum40

threejs-interaction covers how a three.js scene responds to mouse, touch, pen and keyboard input. It starts with a runnable example that combines OrbitControls with a Raycaster to detect clicks on a mesh, using pointer events and canvas-relative coordinates.

The topics cover picking objects, camera controls, transform gizmos, dragging, hover effects and box selection, and they behave the same under WebGL and WebGPU.

What You Get

  • A runnable example combining OrbitControls and a Raycaster
  • Pointer-to-canvas coordinate handling that works when a page scrolls or embeds the canvas
  • Guidance on using pointer events to cover mouse, touch and pen
  • Coverage of transform gizmos, dragging, hover and box selection
  • A WebGPU and TSL section and a list of common mistakes

Common Use Cases

  • Detecting clicks on a 3D object
  • Adding orbit, pan and zoom camera controls
  • Highlighting objects on hover
  • Letting users drag or transform objects in a scene
  • Selecting several objects with a box

What Makes It Unique

Its coordinate handling is computed from the canvas rectangle, so it works in scrolled and embedded layouts, and its quick start runs the controls with the Timer delta. It is one of thirteen skills pinned to r186 that share a layout and link to each other.

Under The Hood

The skill is a single SKILL.md of explanation and JavaScript examples, with no scripts, and it tells the agent to run no commands. The agent reads it and writes three.js code into your project. It fetches nothing and writes no files itself.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers