Canvas Procedural Animation
Designcanvas-procedural-animationCanvas Procedural Animation is an Agent Skill for design published in the video-production-buddy/video-production-buddy repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Use p5.js/canvas for local procedural character effects: particles, weather, squash/stretch, walk cycles, and environmental motion.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/video-production-buddy/video-production-buddy/blob/HEAD/.agents/local/skills/canvas-procedural-animation/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/canvas-procedural-animation, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Canvas Procedural Animation
Use this skill when p5.js or Canvas is used for character-supporting motion: rain, snow, leaves, feathers, ambient particles, squash/stretch, or procedural walk cycles.
Proven Pattern
p5.js runs setup once and redraws continuously through draw(). Keep animation
state deterministic from time/frame values when rendering previews.
function setup() {
createCanvas(1920, 1080);
}
function draw() {
const t = millis() / 1000;
clear();
drawCharacter(width / 2, height / 2 + sin(t * 8) * 8);
}
Use For
- Particle/weather overlays.
- Environmental motion.
- Simple procedural bodies.
- Effects that do not need individually authored SVG parts.
Avoid For
- Complex facial acting where SVG/layered rig parts are easier to inspect.
- Final renders that need exact frame determinism unless the runtime exposes frame-index control.
Sources
- p5.js
setup()reference: https://p5js.org/reference/p5/setup/ - p5.js
draw()reference: https://p5js.org/reference/p5/draw/ - p5.js animation examples: https://p5js.org/examples/