home/ atoms/ p5live-panic-fallback

A minimal cleared-and-isolated setup()/draw() skeleton is the safe P5LIVE recovery sketch because it avoids every common failure at once

When a P5LIVE sketch is unrecoverably broken, the fastest recovery is pasting a known-safe minimal sketch that trips no common trap. The canonical fallback: setup() and draw() spelled correctly, one createCanvas(windowWidth, windowHeight) in setup, background(0) as the first draw statement, one element isolated with push()/pop(), no audio dependency, no external assets, and a bounded animation driven by frameCount. For the calmest possible state with no animation, the bare function setup(){ createCanvas(windowWidth, windowHeight) } function draw(){ background(0) } suffices.

Examples

Paste the minimal-animated-base fallback and save — a black canvas with a slowly rotating square confirms the sketch is alive and every common trap (missing draw, no clear, leaked transform, asset load, audio) is avoided.

Assessment

Write a minimal, always-valid P5LIVE recovery sketch from memory, and for each structural element name the class of silent or thrown failure it prevents.

“When an edit throws (P1/P2), the canvas goes blank/blob/frozen (P3–P6), or reactivity is d”
context/ · L5-debug/p5live.md · chunk 1