Skip to content

Commit 32cb543

Browse files
authored
Fix member resolving in docs + camera docs (#2613)
1 parent a1cb4ba commit 32cb543

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+95
-88
lines changed

arcade/examples/background_blending.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
class GameView(arcade.View):
2525
def __init__(self):
2626
super().__init__()
27-
self.camera = arcade.camera.Camera2D()
27+
self.camera = arcade.Camera2D()
2828

2929
# Load the first background from file. Sized to match the screen
3030
self.background_1 = background.Background.from_file(

arcade/examples/background_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self):
2929
# Set the background color to equal to that of the first background.
3030
self.background_color = (5, 44, 70)
3131

32-
self.camera = arcade.camera.Camera2D()
32+
self.camera = arcade.Camera2D()
3333

3434
# create a background group which will hold all the backgrounds.
3535
self.backgrounds = background.BackgroundGroup()

arcade/examples/background_parallax.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self):
4040
# Set the background color to match the sky in the background images
4141
self.background_color = (162, 84, 162, 255)
4242

43-
self.camera = arcade.camera.Camera2D()
43+
self.camera = arcade.Camera2D()
4444

4545
# Create a background group to hold all the landscape's layers
4646
self.backgrounds = background.ParallaxGroup()

arcade/examples/background_scrolling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
class GameView(arcade.View):
2525
def __init__(self):
2626
super().__init__()
27-
self.camera = arcade.camera.Camera2D()
27+
self.camera = arcade.Camera2D()
2828

2929
# Load the background from file. Sized to match the screen
3030
self.background = background.Background.from_file(

arcade/examples/background_stationary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
class GameView(arcade.View):
2424
def __init__(self):
2525
super().__init__()
26-
self.camera = arcade.camera.Camera2D()
26+
self.camera = arcade.Camera2D()
2727

2828
# Load the background from file. It defaults to the size of the texture
2929
# with the bottom left corner at (0, 0).

arcade/examples/camera_platform.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(self):
6868
self.fps_message = None
6969

7070
# Cameras
71-
self.camera: arcade.camera.Camera2D = None
71+
self.camera: arcade.Camera2D = None
7272
self.gui_camera = None
7373

7474
self.camera_shake = None
@@ -131,7 +131,7 @@ def setup(self):
131131
self.player_sprite.center_y = 128
132132
self.scene.add_sprite("Player", self.player_sprite)
133133

134-
self.camera = arcade.camera.Camera2D()
134+
self.camera = arcade.Camera2D()
135135

136136
self.camera_shake = arcade.camera.grips.ScreenShake2D(self.camera.view_data,
137137
max_amplitude=12.5,

arcade/examples/full_screen_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self):
4343
self.example_image = arcade.load_texture(":resources:images/tiles/boxCrate_double.png")
4444

4545
# The camera used to update the viewport and projection on screen resize.
46-
self.camera = arcade.camera.Camera2D(
46+
self.camera = arcade.Camera2D(
4747
position=(0, 0),
4848
projection=LRBT(left=0, right=WINDOW_WIDTH, bottom=0, top=WINDOW_HEIGHT),
4949
viewport=self.window.rect

arcade/examples/gl/custom_sprite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class GeoSprites(arcade.Window):
3434

3535
def __init__(self):
3636
super().__init__(800, 600, "Custom Sprites", resizable=True)
37-
self.camera = arcade.camera.Camera2D()
37+
self.camera = arcade.Camera2D()
3838
self.program = self.ctx.program(
3939
vertex_shader="""
4040
#version 330

arcade/examples/light_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(self):
4747
self.physics_engine = None
4848

4949
# Camera
50-
self.camera: arcade.camera.Camera2D = None
50+
self.camera: arcade.Camera2D = None
5151

5252
# --- Light related ---
5353
# List of all the lights
@@ -59,7 +59,7 @@ def setup(self):
5959
""" Create everything """
6060

6161
# Create camera
62-
self.camera = arcade.camera.Camera2D()
62+
self.camera = arcade.Camera2D()
6363

6464
# Create sprite lists
6565
self.background_sprite_list = arcade.SpriteList()

arcade/examples/line_of_sight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def setup(self):
7070
""" Set up the game and initialize the variables. """
7171

7272
# Camera
73-
self.camera = arcade.camera.Camera2D()
73+
self.camera = arcade.Camera2D()
7474

7575
# Sprite lists
7676
self.player_list = arcade.SpriteList()

arcade/examples/maze_depth_first.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def setup(self):
196196
self.background_color = arcade.color.AMAZON
197197

198198
# Setup Camera
199-
self.camera = arcade.camera.Camera2D()
199+
self.camera = arcade.Camera2D()
200200

201201
def on_draw(self):
202202
"""

arcade/examples/maze_recursive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def setup(self):
249249
self.background_color = arcade.color.AMAZON
250250

251251
# setup camera
252-
self.camera = arcade.camera.Camera2D()
252+
self.camera = arcade.Camera2D()
253253

254254
def on_draw(self):
255255
""" Render the screen. """

arcade/examples/minimap_camera.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def __init__(self):
6060
minimap_projection = arcade.XYWH(
6161
0.0, 0.0, MAP_PROJECTION_WIDTH, MAP_PROJECTION_HEIGHT
6262
)
63-
self.camera_minimap = arcade.camera.Camera2D(
63+
self.camera_minimap = arcade.Camera2D(
6464
viewport=minimap_viewport, projection=minimap_projection
6565
)
6666

@@ -70,8 +70,8 @@ def __init__(self):
7070
self.physics_engine = None
7171

7272
# Camera for sprites, and one for our GUI
73-
self.camera_sprites = arcade.camera.Camera2D()
74-
self.camera_gui = arcade.camera.Camera2D()
73+
self.camera_sprites = arcade.Camera2D()
74+
self.camera_gui = arcade.Camera2D()
7575
self.selected_camera = self.camera_minimap
7676

7777
# texts

arcade/examples/minimap_texture.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def __init__(self):
6262
self.physics_engine = None
6363

6464
# Camera for sprites, and one for our GUI
65-
self.camera_sprites = arcade.camera.Camera2D()
66-
self.camera_gui = arcade.camera.Camera2D()
65+
self.camera_sprites = arcade.Camera2D()
66+
self.camera_gui = arcade.Camera2D()
6767

6868
def setup(self):
6969
""" Set up the game and initialize the variables. """

arcade/examples/perspective.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def __init__(self):
112112
# Create a 2D camera for rendering to the fbo
113113
# by setting the camera's render target it will automatically
114114
# size and position itself correctly
115-
self.offscreen_cam = arcade.camera.Camera2D(
115+
self.offscreen_cam = arcade.Camera2D(
116116
render_target=self.fbo
117117
)
118118

arcade/examples/platform_tutorial/07_camera.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def setup(self):
9696
)
9797

9898
# Initialize our camera, setting a viewport the size of our window.
99-
self.camera = arcade.camera.Camera2D()
99+
self.camera = arcade.Camera2D()
100100

101101
self.background_color = arcade.csscolor.CORNFLOWER_BLUE
102102

arcade/examples/platform_tutorial/08_coins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def setup(self):
108108
)
109109

110110
# Initialize our camera, setting a viewport the size of our window.
111-
self.camera = arcade.camera.Camera2D()
111+
self.camera = arcade.Camera2D()
112112

113113
self.background_color = arcade.csscolor.CORNFLOWER_BLUE
114114

arcade/examples/platform_tutorial/09_sound.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def setup(self):
112112
)
113113

114114
# Initialize our camera, setting a viewport the size of our window.
115-
self.camera = arcade.camera.Camera2D()
115+
self.camera = arcade.Camera2D()
116116

117117
self.background_color = arcade.csscolor.CORNFLOWER_BLUE
118118

arcade/examples/platform_tutorial/10_score.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ def setup(self):
121121
)
122122

123123
# Initialize our camera, setting a viewport the size of our window.
124-
self.camera = arcade.camera.Camera2D()
124+
self.camera = arcade.Camera2D()
125125

126126
# Initialize our gui camera, initial settings are the same as our world camera.
127-
self.gui_camera = arcade.camera.Camera2D()
127+
self.gui_camera = arcade.Camera2D()
128128

129129
# Reset our score to 0
130130
self.score = 0

arcade/examples/platform_tutorial/11_scene.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ def setup(self):
110110
)
111111

112112
# Initialize our camera, setting a viewport the size of our window.
113-
self.camera = arcade.camera.Camera2D()
113+
self.camera = arcade.Camera2D()
114114

115115
# Initialize our gui camera, initial settings are the same as our world camera.
116-
self.gui_camera = arcade.camera.Camera2D()
116+
self.gui_camera = arcade.Camera2D()
117117

118118
# Reset our score to 0
119119
self.score = 0

arcade/examples/platform_tutorial/12_tiled.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ def setup(self):
9797
)
9898

9999
# Initialize our camera, setting a viewport the size of our window.
100-
self.camera = arcade.camera.Camera2D()
100+
self.camera = arcade.Camera2D()
101101

102102
# Initialize our gui camera, initial settings are the same as our world camera.
103-
self.gui_camera = arcade.camera.Camera2D()
103+
self.gui_camera = arcade.Camera2D()
104104

105105
# Reset our score to 0
106106
self.score = 0

arcade/examples/platform_tutorial/13_more_layers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ def setup(self):
105105
)
106106

107107
# Initialize our camera, setting a viewport the size of our window.
108-
self.camera = arcade.camera.Camera2D()
108+
self.camera = arcade.Camera2D()
109109

110110
# Initialize our gui camera, initial settings are the same as our world camera.
111-
self.gui_camera = arcade.camera.Camera2D()
111+
self.gui_camera = arcade.Camera2D()
112112

113113
# Reset our score to 0
114114
self.score = 0

arcade/examples/platform_tutorial/14_multiple_levels.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ def setup(self):
114114
)
115115

116116
# Initialize our camera, setting a viewport the size of our window.
117-
self.camera = arcade.camera.Camera2D()
117+
self.camera = arcade.Camera2D()
118118

119119
# Initialize our gui camera, initial settings are the same as our world camera.
120-
self.gui_camera = arcade.camera.Camera2D()
120+
self.gui_camera = arcade.Camera2D()
121121

122122
# Reset the score if we should
123123
if self.reset_score:

arcade/examples/platform_tutorial/15_ladders_moving_platforms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ def setup(self):
114114
)
115115

116116
# Initialize our camera, setting a viewport the size of our window.
117-
self.camera = arcade.camera.Camera2D()
117+
self.camera = arcade.Camera2D()
118118

119119
# Initialize our gui camera, initial settings are the same as our world camera.
120-
self.gui_camera = arcade.camera.Camera2D()
120+
self.gui_camera = arcade.Camera2D()
121121

122122
# Reset the score if we should
123123
if self.reset_score:

arcade/examples/platform_tutorial/16_better_input.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ def setup(self):
120120
)
121121

122122
# Initialize our camera, setting a viewport the size of our window.
123-
self.camera = arcade.camera.Camera2D()
123+
self.camera = arcade.Camera2D()
124124

125125
# Initialize our gui camera, initial settings are the same as our world camera.
126-
self.gui_camera = arcade.camera.Camera2D()
126+
self.gui_camera = arcade.Camera2D()
127127

128128
# Reset the score if we should
129129
if self.reset_score:

arcade/examples/platform_tutorial/17_animations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ def setup(self):
200200
)
201201

202202
# Initialize our camera, setting a viewport the size of our window.
203-
self.camera = arcade.camera.Camera2D()
203+
self.camera = arcade.Camera2D()
204204

205205
# Initialize our gui camera, initial settings are the same as our world camera.
206-
self.gui_camera = arcade.camera.Camera2D()
206+
self.gui_camera = arcade.Camera2D()
207207

208208
# Reset the score if we should
209209
if self.reset_score:

arcade/examples/platform_tutorial/18_enemies.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,10 @@ def setup(self):
277277
)
278278

279279
# Initialize our camera, setting a viewport the size of our window.
280-
self.camera = arcade.camera.Camera2D()
280+
self.camera = arcade.Camera2D()
281281

282282
# Initialize our gui camera, initial settings are the same as our world camera.
283-
self.gui_camera = arcade.camera.Camera2D()
283+
self.gui_camera = arcade.Camera2D()
284284

285285
# Reset the score if we should
286286
if self.reset_score:

arcade/examples/platform_tutorial/19_shooting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,10 @@ def setup(self):
284284
)
285285

286286
# Initialize our camera, setting a viewport the size of our window.
287-
self.camera = arcade.camera.Camera2D()
287+
self.camera = arcade.Camera2D()
288288

289289
# Initialize our gui camera, initial settings are the same as our world camera.
290-
self.gui_camera = arcade.camera.Camera2D()
290+
self.gui_camera = arcade.Camera2D()
291291

292292
# Reset the score if we should
293293
if self.reset_score:

arcade/examples/platform_tutorial/20_views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,10 @@ def setup(self):
305305
)
306306

307307
# Initialize our camera, setting a viewport the size of our window.
308-
self.camera = arcade.camera.Camera2D()
308+
self.camera = arcade.Camera2D()
309309

310310
# Initialize our gui camera, initial settings are the same as our world camera.
311-
self.gui_camera = arcade.camera.Camera2D()
311+
self.gui_camera = arcade.Camera2D()
312312

313313
# Reset the score if we should
314314
if self.reset_score:

arcade/examples/procedural_caves_bsp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ def __init__(self):
287287

288288
# Create the cameras. One for the GUI, one for the sprites.
289289
# We scroll the 'sprite world' but not the GUI.
290-
self.camera_sprites = arcade.camera.Camera2D()
291-
self.camera_gui = arcade.camera.Camera2D()
290+
self.camera_sprites = arcade.Camera2D()
291+
self.camera_gui = arcade.Camera2D()
292292

293293
self.background_color = arcade.color.BLACK
294294

arcade/examples/procedural_caves_cellular.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ def __init__(self):
163163

164164
# Create the cameras. One for the GUI, one for the sprites.
165165
# We scroll the 'sprite world' but not the GUI.
166-
self.camera_sprites = arcade.camera.Camera2D()
167-
self.camera_gui = arcade.camera.Camera2D()
166+
self.camera_sprites = arcade.Camera2D()
167+
self.camera_gui = arcade.Camera2D()
168168

169169
self.window.background_color = arcade.color.BLACK
170170

arcade/examples/sprite_move_scrolling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def __init__(self):
5454

5555
# Create the cameras. One for the GUI, one for the sprites.
5656
# We scroll the 'sprite world' but not the GUI.
57-
self.camera_sprites = arcade.camera.Camera2D()
58-
self.camera_gui = arcade.camera.Camera2D()
57+
self.camera_sprites = arcade.Camera2D()
58+
self.camera_gui = arcade.Camera2D()
5959

6060
def setup(self):
6161
""" Set up the game and initialize the variables. """

arcade/examples/sprite_move_scrolling_box.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ def __init__(self):
6161
self.up_pressed = False
6262
self.down_pressed = False
6363

64-
self.camera_sprites = arcade.camera.Camera2D()
65-
self.camera_gui = arcade.camera.Camera2D()
64+
self.camera_sprites = arcade.Camera2D()
65+
self.camera_gui = arcade.Camera2D()
6666

6767
def setup(self):
6868
""" Set up the game and initialize the variables. """

arcade/examples/sprite_move_scrolling_shake.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(self):
5353
self.physics_engine = None
5454

5555
# Create camera that will follow the player sprite.
56-
self.camera_sprites = arcade.camera.Camera2D()
56+
self.camera_sprites = arcade.Camera2D()
5757

5858
self.camera_shake = arcade.camera.grips.ScreenShake2D(
5959
self.camera_sprites.view_data,

arcade/examples/sprite_moving_platforms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def __init__(self):
5454

5555
# Create the cameras. One for the GUI, one for the sprites.
5656
# We scroll the 'sprite world' but not the GUI.
57-
self.camera_sprites = arcade.camera.Camera2D()
58-
self.camera_gui = arcade.camera.Camera2D()
57+
self.camera_sprites = arcade.Camera2D()
58+
self.camera_gui = arcade.Camera2D()
5959

6060
self.left_down = False
6161
self.right_down = False

0 commit comments

Comments
 (0)