Caching Static Layers in p5.js with createGraphics: A Practical Pattern
Stop redrawing static backgrounds every frame. Use p5.js createGraphics to render once into an offscreen buffer, then composite with a single image() call. Includes a hex-map + HUD example, memory trade-offs, and a verification checklist.