Repository navigation
Add a Using Camera2D section and share the projector tests - #2962
Merged
Merged
Conversation
The camera guide starts with how to use Camera2D: following the player, zooming, mouse positions and resizing. The duplicated orthographic and perspective projector tests are merged into one parametrized file, and use/activate are now tested for every camera type. Co-Authored-By: Claude Opus 5.5 <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.
Closes #2239
Docs. The camera guide starts with a short "Using Camera2D" section:
unprojectmatch_windowon resizeIt links to the platformer, split screen and minimap examples. The rest of the page is unchanged.
Tests. The orthographic and perspective projector test files were copies of each other. They are merged into
tests/unit/camera/test_projectors.py:useandactivaterun for every camera type: orthographic, perspective, Camera2D, viewport and default. Camera2D had no tests for these before.activateis also checked to restore the previous camera.map_coordinates,moveandrotatetests run for both 3D projectors at three window sizes. The only difference between the two is the expected depth.Camera tests: 118 → 124. The full suite, ruff, mypy, pyright and the docs build all pass.
🤖 Generated with Claude Code