Libraries panel, 2 more examples, stop tracking outputs/#10
Merged
Conversation
- Libraries section in the right side panel: a dropdown of p5.js builds (from new public/libraries.json) with an inline Apply button. Applying swaps the build the sketch iframe loads, reloads any running sketch, and updates the version label under the editor. The manifest doubles as the injectable-build allow-list (relates to #3). Bundled v1.11.3 is the offline default; online builds load p5 from a CDN. - Two more example sketches: Random walker, Particle swarm (5 total). - Stop tracking outputs/ contents (.gitignore outputs/* with the folder README kept); generated sketches/captures/recordings stay local. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
1. Stop tracking
outputs/Generated sketches, PNG captures, and WebM recordings are local. Added
outputs/*to.gitignore(keepingoutputs/README.mdas the folder placeholder) and removed the four old test.jsfiles from tracking (kept on disk). The app re-createsoutputs/at runtime.2. Two more examples
Added Random walker and Particle swarm to the Examples menu (5 total). Selecting one loads and runs it.
3. Libraries panel (relates to #3)
New Libraries section in the right side panel, under Capture:
public/libraries.jsonmanifest ({ id, name, version, url, isLocal }). The manifest doubles as the allow-list of injectable builds — the JS-first approach proposed in Proposal: JS-First Library Injection Architecture (replace C++ LibraryRegistry) #3.activeLibrary, so future sketch runs load that build's<script>, reloads any running sketch, and updates the version label under the editor to the chosen build.v1.11.3(isLocal: true) is the default and keeps the app fully offline. The three online options load p5 from cdnjs — trading offline-first for version flexibility, loaded inside the same sandboxed, opaque-origin iframe (no access to the parent page or local API).Reviewer notes
node --checkpasses;libraries.jsonis valid JSON; the Debug target builds and re-embeds assets.GET /libraries.jsonreturns 200 with all four entries.🤖 Generated with Claude Code