Back to Sketch Loop
SOURCE / PINNED RELEASE

Made of little things.

Sketch Loop

Release
14966bba4a2a
Author-recorded commit
e68361295d81…
License
LICENSE
Author’s source reference
nostr://npub1n8ga89w8h6tvwamxusfyzexw8gjy84yxu9rxgnmk955cxtml4ujswzxydd/wss%3A%2F%2Fgit.napplet.soy%2F/n-929bc2a88cb

Archive hash verified: 5e0385e3c08f944f. The source-to-build association is the author’s claim; it has not been independently rebuilt.

docs/build-spec.md
# Sketch Loop build spec

- Purpose: paste a self-contained 2D p5-style sketch, preview it, and render a timed GIF.
- Existing initialized soyLI boilerplate; preserve build, conformance and publishing infrastructure.
- NAPs: optional `theme` for all chrome, `storage` for an explicitly saved draft, `config` for export defaults, `fs` for host-mediated GIF saving. No hard requirements: preview and GIF generation work without host enhancements; saving explains missing file support.
- SDK helpers: themeGet/themeOnChanged, storage.getItem/setItem, config.get/subscribe/openSettings, fs.info/pickSaveFile/write.
- No Nostr, network, relay escape hatches or cross-napplet operations.
- Untrusted sketch source is parsed with Acorn and evaluated by a bounded, allowlisted interpreter. It receives only drawing and math functions, no browser or shell objects. No dynamic code evaluation. Supports a documented 2D subset, not the complete p5 library, assets, DOM or WebGL.
- GIF frames render from a fresh deterministic sketch at the sketch's frame rate, sample at the requested output FPS, and use centisecond delays whose sum equals the requested duration. Start offset allows accumulated artwork to develop. Cancellation yields between frames; limits bound execution, dimensions, frame count and output memory.
- Config schema: default duration, output FPS, starting offset and pixelated display; local controls override defaults for the current session.
- Density: 13px, 28px controls, 4/8/12px spacing. No title chrome. A monospace editor and large artwork viewport share a flat instrument-panel layout.
- Tiers: tiny has icon actions and switchable editor/preview/export views; compact uses tabs; regular/wide show editor plus preview with export controls underneath. Short frames use tabs. No minimum size; all views scroll vertically when needed.
- Theme: optional host background/text/primary mapped to html/body/root and derived controls. Explicit charcoal/mint fallback, light and dark verification.
- States: syntax/runtime errors inline with source line; recording progress and cancellation; generated GIF preview and save result; optional capabilities labeled in a help panel.