Fullscreen preview, p5 version label, 720p window#6
Merged
Conversation
- Window resized to 1280x720 (from 1920x1080). - Left column shows the bundled p5.js version. The version is declared once as P5_VERSION in script.js and drives both the label and the iframe's p5 <script> URL (single source of truth). - New Fullscreen button in the side panel: fullscreens the preview pane (.right-panel, not the sandboxed iframe, so no iframe fullscreen permission is needed). The sketch iframe centres its canvas on a white background, so the canvas shows at exact size in the middle of the screen; Esc exits. - Sketch preview now centres the canvas on white in normal view too. - Docs (README, AGENTS) updated for the version label and fullscreen. 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
A follow-up round of UX refinements.
1280×720(down from 1920×1080).P5_VERSIONinscript.jsand drives both the label and the<script>URL the sketch iframe loads, so the two can't drift..right-panel), not the sandboxed iframe, so no iframe fullscreen permission is needed. The sketch iframe centres its canvas on a white background, so in fullscreen the canvas sits at its exact pixel size in the middle of the screen. Esc exits (browser default). The canvas is now also centred on white in the normal preview.This PR also carries the canvas-logical-size capture fix from the previous round (PNG/WebM rendered at e.g.
400×400rather than the 2× backing store) — that change was built but hadn't been merged.Reviewer notes
node --checkpasses; Debug target builds, links, and re-embeds assets.createCanvas(400,400)sketch now saves a 400×400 PNG/WebM (a pre-fix capture measured 800×800), and that Fullscreen centres the canvas on white and Esc exits.🤖 Generated with Claude Code