Skip to content
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

Camera Overhaul #1881

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
11cc5c7
Setup primary files for experimental refactor of the Camera, Backgrou…
DragonMoffon Jun 10, 2023
fa06bc2
Merge branch 'pythonarcade:development' into scene-refactor-experiment
DragonMoffon Jun 10, 2023
882c83b
Completed the Camera2DOrthographic class with doc strings and comment…
DragonMoffon Jun 10, 2023
17d1a9b
Slight change to Cameras to allow for a perspective projection matrix…
DragonMoffon Jun 10, 2023
369545a
Completed Orthographic Camera. Had some issues with the view matrix, …
DragonMoffon Jun 16, 2023
1540f60
Update camera_refactor.py
DragonMoffon Jun 17, 2023
23041b2
PR cleanup
DragonMoffon Jun 18, 2023
dd7531c
New Camera Code Integration
DragonMoffon Jun 19, 2023
7bcc802
Code inspection Clean up
DragonMoffon Jun 19, 2023
f573ba8
Inspection Fix 2
DragonMoffon Jun 19, 2023
c741d08
Code inspection fix 3
DragonMoffon Jun 19, 2023
d4e6be5
Round 4
DragonMoffon Jun 19, 2023
05b624e
Writitng initial Unit Tests
DragonMoffon Jul 20, 2023
cd3469d
Merge branch 'pythonarcade:development' into scene-refactor-experiment
DragonMoffon Jul 21, 2023
b3900c0
Finished base of Camera2D class.
DragonMoffon Jul 31, 2023
ebbc606
Merge branch 'scene-refactor-experiment' of https://github.com/Dragon…
DragonMoffon Jul 31, 2023
b3aed09
code-inspection clean-up on Camera2D
DragonMoffon Jul 31, 2023
16bc0b9
Removed all reference to old camera system.
DragonMoffon Aug 1, 2023
69d81c2
whoops circular imports
DragonMoffon Aug 1, 2023
756297d
circular imports 2
DragonMoffon Aug 2, 2023
eb40fba
type checking
DragonMoffon Aug 2, 2023
7068c5f
Started work on some controllers
DragonMoffon Aug 4, 2023
04b6a41
fixing silly pycharm muck-up
DragonMoffon Aug 4, 2023
8d7dd21
removing doc ref
DragonMoffon Aug 4, 2023
0bc95ea
Updated Orthographic Unit Tests
DragonMoffon Aug 4, 2023
61dbbab
Fixed all the examples
DragonMoffon Aug 6, 2023
10c6a70
linting fix 1-million
DragonMoffon Aug 6, 2023
bff0c03
1-million and 1
DragonMoffon Aug 6, 2023
da72942
1-million and 2
DragonMoffon Aug 6, 2023
e2b1693
MOAR example fixing
DragonMoffon Aug 6, 2023
eafa68c
Setup 4 Splines for SplineController
DragonMoffon Aug 6, 2023
8818c22
Removed splines from this PR
DragonMoffon Aug 8, 2023
0d877a5
Merge branch 'pythonarcade:development' into scene-refactor-experiment
DragonMoffon Aug 15, 2023
4a70234
General work
DragonMoffon Aug 15, 2023
7e1659f
Merge branch 'scene-refactor-experiment' of https://github.com/Dragon…
DragonMoffon Aug 15, 2023
c946cc9
Cleaned up Offscreen renderer
DragonMoffon Aug 15, 2023
8daf88b
Merge branch 'pythonarcade:development' into camera-overhaul
DragonMoffon Aug 17, 2023
27066e0
Squashed commit of the following:
DragonMoffon Aug 17, 2023
4d19763
added screen shake doc
DragonMoffon Aug 17, 2023
d117572
lovely useless doc strings
DragonMoffon Aug 19, 2023
f94eed4
improving screen shake
DragonMoffon Sep 9, 2023
166cae3
Merge remote-tracking branch 'upstream/development' into camera-overhaul
DragonMoffon Sep 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions arcade/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def configure_logging(level: Optional[int] = None):
from .window_commands import unschedule
from .window_commands import schedule_once

from .camera import SimpleCamera, Camera
from .sections import Section, SectionManager

from .application import MOUSE_BUTTON_LEFT
Expand Down Expand Up @@ -220,6 +219,7 @@ def configure_logging(level: Optional[int] = None):
# Module imports
from arcade import color as color
from arcade import csscolor as csscolor
from arcade import camera as camera
from arcade import key as key
from arcade import resources as resources
from arcade import types as types
Expand All @@ -241,8 +241,6 @@ def configure_logging(level: Optional[int] = None):
'AnimatedWalkingSprite',
'AnimationKeyframe',
'ArcadeContext',
'Camera',
'SimpleCamera',
'ControllerManager',
'FACE_DOWN',
'FACE_LEFT',
Expand Down
12 changes: 7 additions & 5 deletions arcade/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
from arcade.types import Color, RGBA255, RGBA255OrNormalized
from arcade import SectionManager
from arcade.utils import is_raspberry_pi
from arcade.camera import Projector
from arcade.camera.default import DefaultProjector

LOG = logging.getLogger(__name__)

Expand Down Expand Up @@ -202,17 +204,17 @@ def __init__(
# self.invalid = False
set_window(self)

self._ctx: ArcadeContext = ArcadeContext(self, gc_mode=gc_mode, gl_api=gl_api)
set_viewport(0, self.width, 0, self.height)
self._background_color: Color = TRANSPARENT_BLACK

self._current_view: Optional[View] = None
self.current_camera: Optional[arcade.SimpleCamera] = None
self.current_camera: Projector = DefaultProjector(window=self)
self.textbox_time = 0.0
self.key: Optional[int] = None
self.flip_count: int = 0
self.static_display: bool = False

self._ctx: ArcadeContext = ArcadeContext(self, gc_mode=gc_mode, gl_api=gl_api)
set_viewport(0, self.width, 0, self.height)
self._background_color: Color = TRANSPARENT_BLACK

# See if we should center the window
if center_window:
self.center_window()
Expand Down
Loading
Loading