Skip to content

Fullscreen preview, p5 version label, 720p window#6

Merged
vecnode merged 1 commit into
mainfrom
preview-fullscreen-and-version
Jun 28, 2026
Merged

Fullscreen preview, p5 version label, 720p window#6
vecnode merged 1 commit into
mainfrom
preview-fullscreen-and-version

Conversation

@vecnode

@vecnode vecnode commented Jun 28, 2026

Copy link
Copy Markdown
Owner

What & why

A follow-up round of UX refinements.

  • Window size1280×720 (down from 1920×1080).
  • p5.js version label — the left column now shows the bundled p5 version. It's declared once as P5_VERSION in script.js and drives both the label and the <script> URL the sketch iframe loads, so the two can't drift.
  • Fullscreen preview — new side-panel button. It 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 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.
  • Docs — README gains a Fullscreen feature bullet; AGENTS documents the version single-source-of-truth and the fullscreen behaviour.

This PR also carries the canvas-logical-size capture fix from the previous round (PNG/WebM rendered at e.g. 400×400 rather than the 2× backing store) — that change was built but hadn't been merged.

Reviewer notes

  • node --check passes; Debug target builds, links, and re-embeds assets.
  • Re-test worth doing in WebView2: confirm a 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

- 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>
@vecnode vecnode merged commit 415ef3c into main Jun 28, 2026
@vecnode vecnode deleted the preview-fullscreen-and-version branch June 28, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant