test(examples): VRT automation for stress-tv & viewport-memory; fix shader name#81
Merged
Merged
Conversation
…ix shader name
Adds an `automation` export to stress-tv and viewport-memory so they run in the
visual-regression suite (each waits for the renderer to go idle, then snapshots
the stable final frame). Neither was covered before — the whole dense-grid /
stress family had no visual coverage, and nothing rendered enough quads to
exercise the index-buffer path end to end.
Also fixes a latent bug these snapshots would otherwise have certified: several
examples called `createShader('RoundedRectangle', …)`, but the registered key is
`'Rounded'` (see examples/common/installShaders.ts). The wrong name silently
fell back to the default shader, so "rounded" rectangles rendered with square
corners (and circles rendered as squares). Corrected across all occurrences:
viewport-memory, mount-pivot, scaling-animations, text-events.
stress-tv's default function is renamed to `test` so the new `automation`
export can drive it; interactive behaviour is unchanged.
Verified in the browser: viewport-memory now renders true circles and rounded
corners with no "ShaderType not found" warning; stress-tv renders unchanged.
CI snapshots to be captured manually.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…emory Captured in the Linux `ci` Docker environment (visual-regression:latest, RUNTIME_ENV=ci) so they match the GitHub Actions baseline. 1280x720 PNGs. - stress-tv-1.png: tier-4 grid (rounded cards + images + SDF title/subtitle) - viewport-memory-1.png: rounded shapes — confirms the RoundedRectangle->Rounded fix (true circles + rounded corners, previously squares) Co-Authored-By: Claude Opus 4.8 (1M context) <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
Brings two examples into the visual-regression suite and fixes a latent shader-name bug they'd otherwise certify.
VRT automation
Adds an
automationexport to stress-tv and viewport-memory. Each runstest(settings), waits for the renderer to go idle (waitUntilIdle), thensnapshot()s the stable final frame. Neither was covered before — the whole dense-grid / stress family had zero visual coverage.Shader-name fix
Several examples called
createShader('RoundedRectangle', …), but the registered key is'Rounded'(examples/common/installShaders.ts). The wrong name silently fell back to the default shader — so "rounded" rectangles rendered with square corners, and circles rendered as squares. Adding a VRT for viewport-memory without this fix would have certified the bug. Corrected across all occurrences:viewport-memory.ts(4×) — its red/blue/yellow circles and green rounded rectsmount-pivot.ts(2×)scaling-animations.tstext-events.tsNone of these are currently in VRT, so no existing certified snapshot changes.
Verified in-browser
ShaderType not foundwarning (before: squares).test(so the newautomationexport can drive it); interactive remote controls untouched.Notes for reviewer
pnpm test:visual:update-ci, Docker) — as agreed.RoundedRectangle→Roundedis the same latent bug originally flagged for viewport-memory; fixed everywhere it appears in the examples while here.🤖 Generated with Claude Code