Skill library

Agent skill Web motion

Three.js Fundamentals

Use spatial graphics, scenes or materials to support a web experience.

  • 3D / WebGL
  • Three.js
  • Interaction design

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add CloudAI-X/threejs-skills --skill threejs-fundamentals --agent claude-code --yes

Check this file in your project.claude/skills/threejs-fundamentals/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add CloudAI-X/threejs-skills --skill threejs-fundamentals

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Bring an existing Three.js project and a local preview. Check the installed version and renderer first.

View operation manual

What this skill helps with

  • Use spatial graphics, scenes or materials to support a web experience.

Good for

  • 3D on the web
Inputs
A mount element, target object and project render lifecycle
Exercise
Mount and dispose a basic Three.js scene
Acceptance
Resize the container and navigate away and back. Verify the rendered object stays in proportion, the canvas appears only once and teardown releases the old loop and scene resources.
Skill name
threejs-fundamentals

Keep the change to a scene you can compare

Open-ended request

Make the whole 3D scene better.

Without a baseline and scoped inputs, you cannot tell which adjustment solved the problem.

A reproducible outcome

  1. Mount and dispose a basic Three.js scene
  2. A mount element, target object and project render lifecycle

threejs-fundamentals operation manual

Mount and dispose a basic Three.js scene

A mount element, target object and project render lifecycle

  1. Check the current scene

    Check the current scene

    Prompt · Step 1
    Use CloudAI-X’s threejs-fundamentals and read the installed SKILL.md. The scope is [Project and preview route]. Inspect [Local route] and its framework lifecycle. Identify where the canvas should mount and which existing project dependencies and renderer are available.
  2. Apply the documented technique

    Mount and dispose a basic Three.js scene

    Prompt · Step 2
    Use CloudAI-X’s threejs-fundamentals and read the installed SKILL.md. The scope is [Project and preview route]. Mount a scene, PerspectiveCamera, WebGLRenderer and a simple original mesh in [Mount element]. Fit the renderer to the container, update the camera aspect and projection on resize, and connect the existing render loop. Attach cleanup for the loop, listeners and renderer resources.
  3. Verify the rendered behavior

    Verify the rendered behavior

    • Resize the container and navigate away and back. Verify the rendered object stays in proportion, the canvas appears only once and teardown releases the old loop and scene resources.
    Prompt · Step 3
    Use CloudAI-X’s threejs-fundamentals and read the installed SKILL.md. The scope is [Project and preview route]. Resize the container and navigate away and back. Verify the rendered object stays in proportion, the canvas appears only once and teardown releases the old loop and scene resources.

Look up a specific implementation problem

Ask the assistant to use the current preview and installed dependency as evidence.

What inputs are required?threejs-fundamentals
Command or reference
SKILL.md
Examples
A mount element, target object and project render lifecycle
How do I verify the real effect?Browser
Command or reference
Mount and dispose a basic Three.js scene
Examples
Resize the container and navigate away and back. Verify the rendered object stays in proportion, the canvas appears only once and teardown releases the old loop and scene resources.

Troubleshooting and FAQ

Why may an example fail in my project?

Confirm Three.js and its addons use matching versions and check the renderer required by that example.

How do I judge the result?

Resize the container and navigate away and back. Verify the rendered object stays in proportion, the canvas appears only once and teardown releases the old loop and scene resources.