Skip to content

Camera overhaul simple #1965

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 112 commits into from
Apr 1, 2024

Conversation

DragonMoffon
Copy link
Collaborator

This PR includes an updated Orthographic Camera and Camera2D to replace the old SimpleCamera provided with <3.0 Arcade.

There is a more detailed Draft PR with extra components (#1905).

DragonMoffon and others added 30 commits June 10, 2023 12:45
…nds, and Scenes.

See the
#Possible Scene Improvements
#Cameras
topics in the arcade-dev forum on the Python Arcade discord server.
…s, and started the Camera2DController, and SimpleCamera classes.

See the
#Possible Scene Improvements
#Cameras
topics in the arcade-dev forum on the Python Arcade discord server for more info.
…. Created basic Perspective and Orthographic Cameras.

See the
#Possible Scene Improvements
#Cameras
topics in the arcade-dev forum on the Python Arcade discord server for more info.
…This has been fixed and applied to both of the base cameras. Added a new get map coordinates function (open to change). Placed framework for backwards compatible simple camera.

See the
#Possible Scene Improvements
#Cameras
topics in the arcade-dev forum on the Python Arcade discord server for more info.
Finished Simple Camera. Is backwards compatible with current Simple Camera implementation.
Cleaning up PR to only include camera refactor
Moved experimental code into new "cinematic" folder within arcade.

Also made the default camera in arcade the "DefaultCamera" class. and made it's type be "Projector"
Created files for unit tests, and wrote a few.

Started work on Camera2D (replacement for simple camera)
The basics for Camera2D have been provided with full doc strings. Other helper methods may be added in the future.
Fixed `mypy`, `pyright`, `ruff` errors.

Also added __all__ property to every file
for a better importing experience.

NOTE arcade/camera.py is still there, and it does not match the current system so the code-inspection still complains. Will resolve later.
This included deleting `arcade/camera.py`, and fixing the ui and sections to use either the Default Ortho Projector.

NOTE I removed a quick index to the `camera.rst`. That will need to be fixed.

Hey look I linted before pushing for once!
Made a few function controllers which are mega simple.

Also changed name from arcade.cinematic to arcade.camera.

Also moved the controllers to arcade.camera.controllers.
when I changed the file name it didn't update any imports tsk tsk.
Have not setup camera documentation so removing old ref.

DO NOT PULL PR UNTIL FIXED.
NOTE this is a quick fix. It removed shaking from two examples. CANNOT BE PULLED IN WHILE THIS IS UNRESOLVED.

Weirdly the linters didn't pick up on these errors
@einarf einarf merged commit 6e777fc into pythonarcade:development Apr 1, 2024
7 checks passed
@alejcas alejcas mentioned this pull request Apr 2, 2024
27 tasks
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.

5 participants