Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR aims to close issue #26 by adding a playground demo and test coverage for running glCanvas on an OffscreenCanvas in a web worker, and by hardening parts of the runtime for non-DOM environments.
Changes:
- Add an OffscreenCanvas + worker playground demo and include it in Playwright screenshot runs.
- Change uniform update callbacks to include the changed uniform name/value, and add promise/media-driven re-render handling in
glCanvas. - Rework texture loading to support worker-friendly async image decoding (
createImageBitmap) and update Docker/compose test setup.
Reviewed changes
Copilot reviewed 13 out of 16 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/gl/tests/screenshots.spec.ts | Adds expected render count for the new offscreencanvas demo route. |
| packages/gl/tests/screenshots/offscreencanvas/offscreencanvas-android.png | Adds Android screenshot baseline for the new demo. |
| packages/gl/src/passes/renderPass.ts | Updates UpdatedCallback signature/docs to report per-uniform changes. |
| packages/gl/src/passes/compositeEffectPass.ts | Forwards updated callback args transparently. |
| packages/gl/src/internal/setupUniforms.ts | Emits per-uniform update events (name/value/oldValue + snapshot). |
| packages/gl/src/global/glContext.ts | Avoids accessing document when unavailable (worker/SSR). |
| packages/gl/src/global/glCanvas.ts | Uses globalThis.devicePixelRatio, refactors resize logic, and adds promise/media re-render watching. |
| packages/gl/src/core/texture.ts | Removes placeholder flow, adds async loadTexture via fetch + createImageBitmap, tightens texture param typings. |
| packages/gl/playwright.config.ts | Skips offscreencanvas on Safari/iPhone projects. |
| packages/gl/playground/src/workers/offscreenGradient.worker.ts | Adds worker-side OffscreenCanvas rendering demo. |
| packages/gl/playground/src/pages/textures/texture.astro | Updates texture example to use placeholder data + async texture assignment. |
| packages/gl/playground/src/pages/core/offscreencanvas.astro | Adds the OffscreenCanvas playground page driving the worker and resize messages. |
| packages/gl/compose.yml | Updates docker build context to use additional_contexts. |
| packages/gl/Dockerfile | Updates Docker build to use additional contexts and Corepack tooling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Close #26