canvas-effects

Design and implement bounded canvas-based visual effects for websites using Canvas2D and WebGL.

Updated Sep 6, 2026
One-click install
npx skills add https://github.com/oxie/prime-agent-skills --skill canvas-effects-oxie
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: canvas-effects
Source: https://github.com/oxie/prime-agent-skills/tree/main/canvas-effects
Command: npx skills add https://github.com/oxie/prime-agent-skills --skill canvas-effects-oxie

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve? Adding decorative canvas effects to a website often leads to unbounded animation loops, hidden content, accessibility failures, and runaway resource use. This Skill provides a disciplined workflow for building particles, ripples, glyph scenes, shader distortion, and interactive 3D that respect lifecycle, reduced-motion, and performance budgets. ## Core Features & Use Cases - Bounded effect recipes: Guidance for ripples, particles, glyph/ASCII scenes, WebGL distortion, fluid, glass, transitions, and interactive 3D, each with explicit resource limits and fallback behavior. - Reusable runtime foundation: Original dependency-free ES module examples (host scheduler, foliage and pointer-trail renderers) with hard caps on DPR, pixel area, entity counts, and run duration. - Verification discipline: Node test suites and browser-check guidance that separate rendered-pixel evidence from source reasoning, plus motion-profiling recipes for diagnosing animation leaks. - Use Case: A designer asks for a falling-leaves hero section. The Skill guides choosing Canvas2D over WebGL, baking leaf sprites once, capping leaf count by viewport area, honoring reduced motion with a static composition, and verifying the result with an authorized browser screenshot. ## Quick Start Ask the agent to add a bounded canvas particle or ripple effect to a specific page section with Play/Stop controls and a static reduced-motion fallback.

Frequently Asked Questions about canvas-effects

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a canvas particle effect to a website?▼

Use bounded position/velocity arrays with time-based integration and Canvas2D drawing, capping particle count and run duration. Keep meaningful HTML content outside the canvas and provide a static fallback for reduced motion or unsupported rendering.

When should I use WebGL instead of Canvas2D for effects?▼

Choose WebGL when the visual contract requires shader-based distortion, refraction, or GPU rendering that Canvas2D cannot deliver. Prefer DOM, CSS, SVG, or Canvas2D when they meet the actual visual requirement with lower complexity.

How do I make canvas animations respect reduced motion preferences?▼

Detect prefers-reduced-motion via matchMedia and render a designed static composition instead of starting animation loops. Disable Play controls in that mode and never restart motion automatically when visibility or preference changes.

Why does my canvas animation keep running after the component unmounts?▼

The requestAnimationFrame loop was not cancelled during teardown. Cancel pending frames, disconnect observers and listeners, release renderer resources in a destroy method, and verify with a leaking negative control test that the detector catches omissions.

What are the limitations of canvas-based visual effects?▼

Canvas content is not semantic HTML, so headings, links, and controls must live outside it. A ripple ring is not a fluid solver, a noise warp is not physics, and a passing demo gallery does not certify performance or accessibility on other sites.