Agent skill Web motion
WebGL Components
Use spatial graphics, scenes or materials to support a web experience.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add flornkm/skills --skill webgl-components --agent claude-code --yesCheck this file in your project.claude/skills/webgl-components/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add flornkm/skills --skill webgl-componentsSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Use a local browser and the publisher’s standalone gpu-probe.html. Match its context options to the app before comparing branch results.
View operation manualWhat this skill helps with
- Use spatial graphics, scenes or materials to support a web experience.
Good for
- 3D on the web
- Publisher
- flornkm
- Controls
- shared WebGL context · 2D drawImage · canvas.height - size · failIfMajorPerformanceCaveat
- Result
- The probe identifies both a usable WebGL branch and a forced fallback, and verifies bottom-left coordinates.
- Skill name
webgl-components- Repository
flornkm/skills
Common pitfall
Avoid this prompt
Create a context per swatch and blit after an asynchronous pause.
The browser may evict contexts, and the drawing buffer may become invalid before the delayed blit.
Use these steps
- Read the source and set up the example
- Implement the documented behavior
- Inspect the actual result
Project walkthrough
Render several decorative swatches through one context and verify the useful fallback branch.
Render several decorative swatches through one context and verify the useful fallback branch.
Read the source and set up the example
Use a local browser and the publisher’s standalone gpu-probe.html. Match its context options to the app before comparing branch results.
Prompt · Step 1Use WebGL Components on [my swatch list]. Read Architecture and Robustness in SKILL.md. Decide what remains usable as a plain CSS/DOM swatch. Open scripts/gpu-probe.html locally and match its CONTEXT_OPTIONS to the app’s request.Implement the documented behavior
Render several decorative swatches through one context and verify the useful fallback branch.
Prompt · Step 2Use one offscreen GL context and one 2D canvas per decorative swatch. Draw and blit in the same task using the correct lower-left to upper-left coordinate conversion. Gate on visibility, cancel shared animation when idle, and keep a deterministic CSS/DOM fallback for context denial or loss.Inspect the actual result
The probe identifies both a usable WebGL branch and a forced fallback, and verifies bottom-left coordinates.
- The probe identifies both a usable WebGL branch and a forced fallback, and verifies bottom-left coordinates.
Prompt · Step 3Read the probe JSON and confirm the strict/permissive result and blit orientation. In a separate browser run with WebGL disabled, verify the fallback branch and both the clipped swatches and the actual list controls. Exercise context loss separately when the browser allows it.
Implementation lookup
Compare the required inputs with the local verification result.
Inspect the implementation controlsVerify
- Command or reference
shared WebGL context · 2D drawImage · canvas.height - size · failIfMajorPerformanceCaveat- Examples
- The probe identifies both a usable WebGL branch and a forced fallback, and verifies bottom-left coordinates.
FAQ
What should I prepare first?
Use a local browser and the publisher’s standalone gpu-probe.html. Match its context options to the app before comparing branch results.
How do I verify the result?
The probe identifies both a usable WebGL branch and a forced fallback, and verifies bottom-left coordinates.