p5js

Generate p5.js generative art sketches and export them as HTML, PNG, GIF, MP4, or SVG.

1|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/ChangZhou-xj/zxj_skill --skill p5js-changzhou-xj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: p5js
Source: https://github.com/ChangZhou-xj/zxj_skill/tree/main/creative/p5js
Command: npx skills add https://github.com/ChangZhou-xj/zxj_skill --skill p5js-changzhou-xj

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

p5.js sketches and generative visuals often require stitching together assets, code structure, and export steps. This Skill provides a production pipeline that unifies concept, design, coding, preview, and export for browser-based art, shaders, and interactive works.

Core Features & Use Cases

  • End-to-end pipeline: single HTML file that can render generative art, data visualizations, interactive experiences, 3D scenes, and shader effects with export options including HTML, PNG, GIF, MP4, or SVG
  • Mode coverage for creative projects: Generative art, Data visualization, Interactive experiences, Animation, 3D scenes, and Audio-reactive visuals
  • Headless/export readiness: supports deterministic rendering, offscreen buffers, and headless export workflows via a Puppeteer-based script

Quick Start

Open the viewer HTML and adjust the sliders to generate and export your artwork.

Frequently Asked Questions about p5js

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

FAQPage Schema
How do I export browser-based generative art sketches as PNG, GIF, MP4, or SVG?

You can export generative art as PNG, GIF, MP4, or SVG using a Puppeteer-based headless export workflow. This process enforces deterministic rendering and offscreen buffers to capture artwork directly from the HTML viewer, ensuring repeatable visual results.

What is the best way to structure a p5.js project for interactive 3D scenes and shader effects?

The best way to structure p5.js projects for 3D scenes and shader effects is using a strict production pipeline: CONCEPT, DESIGN, CODE, PREVIEW, EXPORT, and VERIFY. This workflow unifies asset stitching and code structure within a single HTML file for reliable browser rendering.

Does Puppeteer work with p5.js for headless rendering and exporting animations?

Yes, Puppeteer works with p5.js for headless rendering and exporting animations. It drives the headless export workflow via the scripts folder, allowing you to capture deterministic frames and convert interactive webgl sketches into MP4 or GIF outputs automatically.

Can I generate audio-reactive visuals and data visualizations in a single HTML file?

Yes, you can generate audio-reactive visuals and data visualizations in a single HTML file. The pipeline renders these interactive experiences directly in the browser, allowing you to adjust viewer sliders for real-time parameter tuning before exporting the final artwork.

Why does my generative art export look different from the browser preview?

Generative art exports look different from browser previews when deterministic rendering is not enforced. Using offscreen buffers and a strict VERIFY step in the production workflow ensures the headless export captures the exact visual state, preventing non-repeatable results.