/threejs-skills:web3d-model-viewerfrom three.js Skills
Embedding 3D products with the <model-viewer> web component instead of three.js: AR on iOS and Android, posters, hotspots, variants, material edits. Use for product pages and to decide model-viewer versus three.js. Routes to `threejs-model-inspect`.
Ships in three.js Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
<model-viewer> or three.js?<model-viewer> (@google/model-viewer 4.4, Apache-2.0) is one HTML element that shows a glTF with orbit controls,
good default lighting, lazy loading, accessibility, and one-tap AR on Android (Scene Viewer, WebXR) and iOS (Quick
Look). For a product page it is usually the right answer, and hand-written three.js is more code for a worse
result. Decide first:
| Need | Use |
|---|---|
| Show a product, rotate it, view it in AR, swap colors | <model-viewer> |
| Hotspot labels on parts, a few camera presets, play a clip | <model-viewer> |
| Custom shaders, post-processing, physics, many models in one scene, games | three.js or R3F |
| Scroll-driven camera flights | three.js (threejs-scroll) |
Inspect and optimize the model first (threejs-model-inspect, then threejs-model-optimize with web or
configurator). model-viewer decodes Draco, meshopt and KTX2 by itself.
Add the element, from the CDN or npm i @google/model-viewer (import "@google/model-viewer";):
<script type="module" src="https://cdn.jsdelivr.net/npm/@google/[email protected]/dist/model-viewer.min.js"></script>
<model-viewer src="/models/chair.glb" alt="Oak lounge chair, three-quarter view" poster="/models/chair.webp"
camera-controls touch-action="pan-y" shadow-intensity="1" tone-mapping="commerce" ar ar-modes="webxr scene-viewer quick-look"
style="width: 100%; height: 480px"></model-viewer>
alt is required for accessibility; poster shows instantly while the model loads; loading="lazy" (default
auto) defers offscreen models. tone-mapping="commerce" keeps product colors faithful. Size it with CSS; it
has no intrinsic size.
Add features from references/recipes.md as needed: AR setup, hotspots, variants and material colors, camera
presets, animation, events.
Test AR on a real phone of each platform; desktop shows only the button logic.
poster: the area stays blank until a multi-megabyte model arrives..glb alone in old Safari versions; provide ios-src with a USDZ when Quick Look
rejects the generated file.touch-action left at its default on mobile pages that must scroll past the model; set pan-y.Next: threejs-model-inspect before any model goes into the element.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub emiliodominguez/threejs-skills --plugin threejs-skills28 skills in this plugin
/threejsMap of the threejs-* skills for three.js and React Three Fiber work: 3D models, scenes, materials, lighting, animation, shaders, performance and model generation. Use when a 3D web task spans several areas or the right skill is unclear. Routes to `threejs-model-inspect` and the rest of the suite./threejs-animationKeyframe, skeletal and morph-target animation, procedural motion and clip blending, on WebGL or with WebGPU and TSL. Use when animating objects, playing glTF animations, posing bones, driving morph targets, or mixing and crossfading clips./threejs-asset-pipelineShrinking glTF assets for three.js with gltf-transform: inspect, validate and optimize commands, Draco, meshopt and quantization, KTX2, WebP and AVIF textures, the loader setup each output needs, and gltfjsx for React. Use when compressing, optimizing or validating 3D models before loading them.Other plugins' skills for the same job