Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (337 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
There was a problem hiding this comment.
Pull request overview
This PR adds a first-person camera implementation to the examples common library and refactors the xor-dev-runner example to use it instead of manually managing camera transforms. The new camera system provides WASD movement controls, mouse look via pointer lock, and scroll-based speed adjustment, offering a more interactive experience compared to the previous static rendering.
Changes:
- Added
setup-first-person-camera.tsproviding a reusable first-person camera with keyboard/mouse controls - Refactored xor-dev-runner to use the new camera system instead of manual uniform-based transforms
- Updated xor-dev-runner test to mock ResizeObserver required by the camera system
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| apps/typegpu-docs/src/examples/common/setup-first-person-camera.ts | New file implementing first-person camera with movement controls, mouse look, and camera matrix calculations |
| apps/typegpu-docs/src/examples/rendering/xor-dev-runner/index.ts | Replaced manual aspect ratio/scale/time uniforms with camera-based ray casting and added auto-move toggle control |
| packages/typegpu/tests/examples/individual/xor-dev-runner.test.ts | Added ResizeObserver mock and updated shader snapshot to reflect camera-based rendering |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Changes:
First person controls activate once the user clicks on the canvas. The controls are as follows:
w, a, s, dfor moving on the Y plane,spaceto ascend,shiftto descend,Controls are not displayed anywhere due to #2180.
There is some code overlap between the two cameras, we can get rid of it when we finish #2038.
This will also be used for Quarrified