agentleFS
Leo-AtienzaLeo-Atienza/atlas-claude/skills/threejs-imperative/SKILL.md

threejs-imperative

Skill4 starsChanged 4 months agoMITView on GitHub

Raw / imperative Three.js reference (vanilla `import * as THREE`, no React) — scene/camera/renderer setup, geometries, materials, lighting, textures, the animation loop, GLTF/loaders, custom GLSL shaders (ShaderMaterial), EffectComposer post-processing, and raycasting/interaction. Use for hand-written WebGL / GLSL work OUTSIDE React Three Fiber. For declarative React 3D in Next.js, use `threejs` (SK-007, R3F + Drei) instead.

The file

Files
SKILL.md

In the ATLAS web-dev system: the raw-WebGL lane. SK-007 threejs (R3F + Drei, SSR-safe Next 16) is the DEFAULT for React 3D and owns the ship path; reach for THIS skill only to hand-write imperative Three.js / GLSL that R3F doesn't wrap (custom render loops, bespoke ShaderMaterial GLSL, EffectComposer passes, low-level raycasting) or to study the underlying API Drei abstracts. Depth must carry meaning — one 3D moment per page ([[principles]] signature-effect gate + reduced-motion fallback still apply).

⚠ License UNCONFIRMED — vendored with no upstream LICENSE file, for the user's local reference only; not for redistribution or shipping. Content is generic Three.js API usage, largely re-derivable from the official docs — prefer Context7 three docs when authority matters. See NOTICE.md.

Three.js (imperative) — reference index

Vendored topic references (raw/vanilla Three.js, r160+ API, three/addons/ import paths):

TopicFileCovers
Fundamentalsreference/threejs-fundamentals.mdScene / camera / renderer, Object3D hierarchy, coordinate systems, the animate() loop, resize
Geometryreference/threejs-geometry.mdBufferGeometry, primitives, custom attributes, instancing
Materialsreference/threejs-materials.mdStandard/Physical/Basic materials, transparency, PBR
Lightingreference/threejs-lighting.mdAmbient/directional/point/spot, shadows, environment
Texturesreference/threejs-textures.mdLoading, wrapping, UVs, mipmaps, color space
Animationreference/threejs-animation.mdAnimationMixer, clips, clock-driven motion
Loadersreference/threejs-loaders.mdGLTFLoader, DRACO, environment/HDR loaders
Shadersreference/threejs-shaders.mdShaderMaterial, GLSL uniforms/varyings, raw shaders
Post-processingreference/threejs-postprocessing.mdEffectComposer, render passes (bloom, FXAA, custom)
Interactionreference/threejs-interaction.mdRaycasting, pointer picking, controls

(Upstream README preserved as reference/_upstream-README.md.)

When to use this vs SK-007 threejs (R3F)

  • Default → SK-007 threejs — declarative React Three Fiber + Drei, SSR-safe in Next 16. Drei already wraps most of the above (useGLTF, OrbitControls, shaderMaterial, @react-three/postprocessing).
  • This skill → only imperative/vanilla Three.js or GLSL outside R3F, or to understand the primitives Drei abstracts. Don't hand-roll a render loop in a Next.js app when R3F will do it.

Reduced motion & performance

Gate autoplaying 3D with prefers-reduced-motion; cap renderer.setPixelRatio(Math.min(devicePixelRatio, 2)); dispose geometries/materials/textures on teardown; one meaningful 3D moment per page (signature-effect restraint, [[principles]]).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.