p5js

Generate interactive and generative p5.js sketches exported as HTML, PNG, GIF, MP4, or SVG.

Updated Aug 21, 2026
One-click install
npx skills add https://github.com/TylerSimons1127/vibe --skill p5js-tylersimons1127
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: p5js
Source: https://github.com/TylerSimons1127/vibe/tree/main/skills/creative/p5js
Command: npx skills add https://github.com/TylerSimons1127/vibe --skill p5js-tylersimons1127

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires puppeteer, and includes scripts (resource) and references (resource) components.

What problem does it solve? Creating browser-based generative art, interactive visualizations, and canvas animations requires deep knowledge of p5.js APIs, color theory, animation timing, and export pipelines. This Skill provides a complete production pipeline from creative concept to exported output, eliminating the trial-and-error of building visually polished sketches from scratch. ## Core Features & Use Cases - Seven Creation Modes: Generative art, data visualization, interactive experiences, motion graphics, 3D WebGL scenes, image processing, and audio-reactive visuals. - Full Export Pipeline: Output as self-contained HTML, PNG stills, GIF loops, MP4 video via Puppeteer and ffmpeg, or SVG vectors for print. - Deep Reference Library: Ten reference files covering noise fields, particle systems, easing functions, GLSL shaders, color palettes, typography, and performance optimization. - Use Case: Ask for a flow-field particle animation with a custom warm palette, and receive a single HTML file with seeded randomness, keyboard export shortcuts, and layered offscreen-buffer composition that runs in any browser. ## Quick Start Use the p5js skill to create a generative art sketch of flowing particles with a sunset color palette, exported as a self-contained HTML file.

Frequently Asked Questions about p5js

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

FAQPage Schema
How do I create generative art with p5.js?▼

Define a creative concept first, then write a single HTML file with p5.js from CDN, using randomSeed and noiseSeed for reproducibility. Structure code as setup, draw loop, helper classes, and event handlers, then export with saveCanvas or saveGif.

How to export p5.js animation as MP4 video?▼

Capture frames headlessly with Puppeteer using the export-frames.js script, then encode with ffmpeg into H.264 MP4. The sketch must call noLoop() in setup and set window._p5Ready so each redraw corresponds to exactly one captured frame.

Should I use p5.js 1.x or 2.x for my sketch?▼

p5.js 1.11.3 is the default with the broadest library compatibility and stable documentation. Use p5.js 2.x only when you need async setup, OKLCH color modes, splineVertex, shader modify API, or the p5.brush natural media library.

Why is my p5.js sketch running slowly?▼

The Friendly Error System adds up to 10x overhead, so set p5.disableFriendlyErrors = true before setup. Also call pixelDensity(1), use Math functions instead of p5 wrappers in hot loops, and batch particles with beginShape(POINTS) or pixel buffers.

Can p5.js export vector graphics for print?▼

Yes, using the p5.js-svg library with createCanvas(w, h, SVG) renders vector output saved via save(). It requires p5.js 1.x and does not support pixel operations, blend modes, filters, or WebGL, making it suited for line art and geometric patterns.

How do I make p5.js sketches reproducible with seeds?▼

Call randomSeed(seed) and noiseSeed(seed) in setup so all random() and noise() calls become deterministic. Never use Math.random() for visual content. For platforms like fxhash, replace p5's PRNG with the platform's deterministic random function.