Repository navigation
Conversation
|
pkg.pr.new packages benchmark commit |
fdb90b1 to
685a215
Compare
Bundle size comparison (
|
| 🟢 Decreased | ➖ Unchanged | 🔴 Increased | ❔ Unknown |
|---|---|---|---|
| 0 | 355 | 0 | 0 |
No notable changes.
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [1.04, 2.12, 4.77, 6.96, 9.51, 12.90, 28.07, 30.08]
line [1.05, 2.12, 4.59, 7.14, 8.54, 12.85, 27.30, 29.75]
line [1.09, 2.22, 4.94, 7.57, 7.86, 14.22, 27.24, 26.29]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.29, 0.54, 0.78, 0.98, 1.23, 1.28, 1.58, 1.69]
line [0.37, 0.56, 0.75, 0.88, 1.18, 1.28, 1.47, 1.66]
line [0.36, 0.61, 0.76, 0.89, 1.25, 1.33, 1.58, 1.76]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.94, 2.26, 4.04, 7.94, 14.01, 28.29, 63.12, 127.45]
line [0.91, 2.30, 3.83, 7.57, 14.07, 28.93, 60.39, 123.68]
line [1.02, 2.27, 4.82, 7.81, 15.09, 28.74, 64.11, 127.04]
|
1ff47c0 to
b08e885
Compare
b08e885 to
21cab0c
Compare
21cab0c to
b8f8ab5
Compare
c413681 to
2ce9aa9
Compare
ce8d16f to
baa3a27
Compare
6f5388c to
3c4dffe
Compare
aed94dc to
c9b87cc
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Quality state races and incorrect device-motion axis mapping cause observable behavior errors.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Adds an advanced “Jelly Knob” WebGPU example featuring ray-marched rendering, spring physics, motion input, and configurable quality.
Changes:
- Implements the knob’s rendering, materials, TAA, camera, and physics.
- Adds interaction, phone motion, quality controls, and resource cleanup.
- Registers the example and adds lifecycle tests.
| File | Description |
|---|---|
apps/typegpu-docs/tests/individual-example-tests/jelly-knob-lifecycle.test.ts |
Tests spring behavior and resource cleanup. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/utils.ts |
Adds rendering and texture helpers. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/taa.ts |
Implements temporal anti-aliasing. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/spring.ts |
Implements scalar and 3D springs. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/sdfs.ts |
Defines scene SDF geometry. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/raymarchers.ts |
Implements ray-marched shading. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/motion.ts |
Handles phone motion input. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/meta.json |
Provides example metadata. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/material.ts |
Defines jelly reflection behavior. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/knob.ts |
Manages knob state and physics. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/index.ts |
Integrates rendering, controls, input, and cleanup. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/index.html |
Adds the example canvas. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/dataTypes.ts |
Defines GPU data structures and layouts. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/constants.ts |
Defines rendering and physics constants. |
apps/typegpu-docs/src/examples/rendering/jelly-knob/camera.ts |
Implements camera projection and jitter. |
apps/typegpu-docs/src/components/ExampleShowcase.tsx |
Registers advanced showcase examples. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
ℹ️ No blocking issues — one minor robustness suggestion inline. Two of the existing Copilot findings appear to be false positives.
Reviewed changes
This run read the full 17-file diff of the new jelly-knob example, ran astro check (0 errors), oxlint --type-aware (clean), and the new lifecycle test (3/3 pass), and validated each open Copilot finding.
- New example —
jelly-knob/ray-marched knob: SDF scene, TAA + blue-noise dither, spring physics, phone-motion input, and controls, registered as an advanced example. - Lifecycle —
handleResizedestroys and recreates render + TAA textures and bind groups;onCleanuptears down the root and removes itswindowlistener. - Tests —
jelly-knob-lifecycle.test.tspins spring convergence/substep parity and texture/listener cleanup; it also exercises shader generation indirectly via import + render. - Showcase list — registers
rendering--jelly-knoband, unrelated to this example,rendering--triplanar-mapping.
ℹ️ Two of the prior review's findings don't hold up
Copilot's review raised three points; two are incorrect and shouldn't drive changes.
- Initial quality vs. rendering scale — the controls runner eagerly invokes each control's handler with its
initialvalue on mount (initializeParaminapps/typegpu-docs/src/utils/examples/exampleRunner.ts:7, called fromexecuteExample). SoonSelectChange('Ultra')runshandleResize()withqualityScale = 1.0right after import, and the displayed selector matches the render resolution. rotationRateaxes — per W3C Device Orientation and Motion §6.3.2, theDeviceMotionEventRotationRategetters arealpha→ x-axis,beta→ y-axis,gamma→ z-axis ("The alpha getter steps are to return the value of this's x axis rotation rate").motion.tsmaps them in exactly that order, and its comment is correct. Copilot'salpha = Zmapping is theDeviceOrientationEventEuler-angle convention, which does not apply torotationRate.
Technical details
# Prior-review findings assessment
## Affected sites
- apps/typegpu-docs/src/utils/examples/exampleRunner.ts:7-26 — `initializeParam` dispatches `onSelectChange`/`onToggleChange`/... with `param.initial`; `executeExample` calls it for every control.
- apps/typegpu-docs/src/examples/rendering/jelly-knob/motion.ts:77-85 — passes `alpha, beta, gamma` as x, y, z.
## Required outcome
- Do not change the `Quality` initial value or the `motionToWorld(alpha, beta, gamma, ...)` ordering on account of these two findings.( ◦°^°◦) 🔍
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
c9b87cc to
f2a4898
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run re-reviewed the commits pushed since the prior Pullfrog review (c9b87ccf → f2a48984): a cancellation guard for the Auto-quality benchmark, touch-cancel handling, a shared camera-position constant, and a far-plane fix.
- Superseded
Autobenchmark is cancelled —Quality.onSelectChangetags each selection with a monotonicqualityRequestIdand adisposedflag; a lateautoSetQualityresult neither writesqualityScalenor callshandleResize(), and the benchmark loop breaks early once cancelled. This closes the prior inline finding. - Touch cancel handled —
touchendandtouchcancelnow sharehandleTouchEnd, so a cancelled gesture releases the knob. - Camera position centralised — a new
CAMERA_POSITIONconstant replaces the duplicated(0, 2.7, 0.8)literal inindex.tsandmotion.ts, which now derives its basis from it (same math). - Projection
faraligned —CameraController.updateProjectiondefault changed100 → 10, matching the constructor andMAX_DIST = 10. - Unrelated showcase entry dropped — the branch no longer adds
rendering--triplanar-mappingtoADVANCED_EXAMPLE_KEYS. - Tests extended — the lifecycle test now covers the superseded-
Autoand cleanup-cancel paths and restores globals viavi.unstubAllGlobals().
( ◦°^°◦) 🏴☠️
Ahoy! I re-reviewed the fresh commits on the Jelly Knob PR: the Auto-quality race be fixed with a request-id guard, touch-cancel be handled proper, and the camera position be shared twixt modules. No new leaks nor wrecks spotted — she be ready to sail, matey!
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
b85790f to
4958927
Compare
| }, | ||
| }, | ||
| Quality: { | ||
| initial: 'Ultra', |
There was a problem hiding this comment.
This may not be the best initial
4958927 to
583043e
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run re-reviewed the commit pushed since the prior Pullfrog review (f2a48984 → 583043e0). The only authored delta is the default Quality selection; the remaining 17 files are byte-identical to the previously reviewed version.
- Default quality is now
Auto—Quality.initialchanged from'Ultra'to'Auto'injelly-knob/index.ts. On mount the controls runner eagerly invokesonSelectChange('Auto'), which starts the adaptive benchmark and applies its scale (or the0.5fallback whentimestamp-queryis unavailable). The existingqualityRequestId/disposedguard already covers this async completion path, so no lifecycle regression.
Verification: jelly-knob-lifecycle.test.ts 3/3 pass; oxlint --type-aware on the changed files is clean.
( ◦°^°◦) 🏴☠️
Ahoy! I re-reviewed the fresh commit on the Jelly Knob PR: the default quality be now Auto, settin' the adaptive benchmark to run on mount. The old request-id guard still be holdin' her steady — no new leaks nor wrecks spotted, so I gave her the green flag. The prior review's one thread already be resolved, matey!
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏


Screen.Recording.2026-09-06.at.17.31.51.mov