Skip to content

Camera Touchups for arcade 3.0RC1 #2094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 42 commits into from
May 28, 2024

Conversation

DragonMoffon
Copy link
Collaborator

@DragonMoffon DragonMoffon commented May 26, 2024

Full change list:

  • Added Camera2D to arcade's top level now that its __init__ has been fixed
  • Added generic functions to generate View, and Projection matrices from camera PoDs.
  • Added generic functions to project and unproject coordinates using Matrices
  • Added StaticCamera, which holds view and projection matrices directly for manual/temporary cameras
  • Added Unproject and Project methods to all projectors
  • Added new properties to Camera2D for key points around the visible boundary
  • Added method to Camera2D to quickly test if a point is visible
  • Moved the current and default camera to ArcadeContext so the default camera better behaves with framebuffers, and changing viewports
  • Removed map_screen_to_world_coordinate, use unproject instead.
  • Switching views now resets the active framebuffer to the screen and the active camera to the default
  • Window.viewport now returns the screen's viewport, not the currently active viewport.
  • The render target in Camera2D is now optional
  • Fixed Camera2D activating the render target twice in Camera2D.activate
  • Fixed Camera2D ignoring the viewport when initialising with a RenderTarget
  • Fixed TextureAtlas not using a View matrix when rendering into a texture

DragonMoffon and others added 29 commits April 28, 2024 15:20
* Add docstrings for Projector, Projector.use, and Project.activate

* Add docstring for Projection Protocol

* Move PerspectiveProjector.activate onto Projector protocol & subclass

* Replace Orthographic Projector's activate with Protocol default implementation
sadly it is harder to make generic than anticipated
…they can be reliably updated when viewport is changed
also fix bug in static camera methods
@DragonMoffon DragonMoffon changed the title Camera Touchups for arcade 3.0RC Camera Touchups for arcade 3.0RC1 May 26, 2024
* Fix list-table syntax with newlines

* Fix external intersphinx context manager cross-reference
Copy link
Collaborator

@DigiDuncan DigiDuncan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dragon in the Discord requested we wait to merge this since they found a bug.

Solved!

@eruvanos eruvanos merged commit 70bb3ac into pythonarcade:development May 28, 2024
8 checks passed
@DragonMoffon DragonMoffon deleted the camera-touchups branch June 10, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants