Skip to content

Fix member resolving in docs + camera docs #2613

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 1 commit into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
90 changes: 0 additions & 90 deletions arcade/camera/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion arcade/examples/background_blending.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
class GameView(arcade.View):
def __init__(self):
super().__init__()
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

# Load the first background from file. Sized to match the screen
self.background_1 = background.Background.from_file(
Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/background_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self):
# Set the background color to equal to that of the first background.
self.background_color = (5, 44, 70)

self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

# create a background group which will hold all the backgrounds.
self.backgrounds = background.BackgroundGroup()
Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/background_parallax.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self):
# Set the background color to match the sky in the background images
self.background_color = (162, 84, 162, 255)

self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

# Create a background group to hold all the landscape's layers
self.backgrounds = background.ParallaxGroup()
Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/background_scrolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
class GameView(arcade.View):
def __init__(self):
super().__init__()
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

# Load the background from file. Sized to match the screen
self.background = background.Background.from_file(
Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/background_stationary.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class GameView(arcade.View):
def __init__(self):
super().__init__()
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

# Load the background from file. It defaults to the size of the texture
# with the bottom left corner at (0, 0).
Expand Down
4 changes: 2 additions & 2 deletions arcade/examples/camera_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __init__(self):
self.fps_message = None

# Cameras
self.camera: arcade.camera.Camera2D = None
self.camera: arcade.Camera2D = None
self.gui_camera = None

self.camera_shake = None
Expand Down Expand Up @@ -131,7 +131,7 @@ def setup(self):
self.player_sprite.center_y = 128
self.scene.add_sprite("Player", self.player_sprite)

self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

self.camera_shake = arcade.camera.grips.ScreenShake2D(self.camera.view_data,
max_amplitude=12.5,
Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/full_screen_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self):
self.example_image = arcade.load_texture(":resources:images/tiles/boxCrate_double.png")

# The camera used to update the viewport and projection on screen resize.
self.camera = arcade.camera.Camera2D(
self.camera = arcade.Camera2D(
position=(0, 0),
projection=LRBT(left=0, right=WINDOW_WIDTH, bottom=0, top=WINDOW_HEIGHT),
viewport=self.window.rect
Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/gl/custom_sprite.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class GeoSprites(arcade.Window):

def __init__(self):
super().__init__(800, 600, "Custom Sprites", resizable=True)
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()
self.program = self.ctx.program(
vertex_shader="""
#version 330
Expand Down
4 changes: 2 additions & 2 deletions arcade/examples/light_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self):
self.physics_engine = None

# Camera
self.camera: arcade.camera.Camera2D = None
self.camera: arcade.Camera2D = None

# --- Light related ---
# List of all the lights
Expand All @@ -59,7 +59,7 @@ def setup(self):
""" Create everything """

# Create camera
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

# Create sprite lists
self.background_sprite_list = arcade.SpriteList()
Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/line_of_sight.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def setup(self):
""" Set up the game and initialize the variables. """

# Camera
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

# Sprite lists
self.player_list = arcade.SpriteList()
Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/maze_depth_first.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def setup(self):
self.background_color = arcade.color.AMAZON

# Setup Camera
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

def on_draw(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/maze_recursive.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def setup(self):
self.background_color = arcade.color.AMAZON

# setup camera
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

def on_draw(self):
""" Render the screen. """
Expand Down
6 changes: 3 additions & 3 deletions arcade/examples/minimap_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(self):
minimap_projection = arcade.XYWH(
0.0, 0.0, MAP_PROJECTION_WIDTH, MAP_PROJECTION_HEIGHT
)
self.camera_minimap = arcade.camera.Camera2D(
self.camera_minimap = arcade.Camera2D(
viewport=minimap_viewport, projection=minimap_projection
)

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

# Camera for sprites, and one for our GUI
self.camera_sprites = arcade.camera.Camera2D()
self.camera_gui = arcade.camera.Camera2D()
self.camera_sprites = arcade.Camera2D()
self.camera_gui = arcade.Camera2D()
self.selected_camera = self.camera_minimap

# texts
Expand Down
4 changes: 2 additions & 2 deletions arcade/examples/minimap_texture.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def __init__(self):
self.physics_engine = None

# Camera for sprites, and one for our GUI
self.camera_sprites = arcade.camera.Camera2D()
self.camera_gui = arcade.camera.Camera2D()
self.camera_sprites = arcade.Camera2D()
self.camera_gui = arcade.Camera2D()

def setup(self):
""" Set up the game and initialize the variables. """
Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/perspective.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def __init__(self):
# Create a 2D camera for rendering to the fbo
# by setting the camera's render target it will automatically
# size and position itself correctly
self.offscreen_cam = arcade.camera.Camera2D(
self.offscreen_cam = arcade.Camera2D(
render_target=self.fbo
)

Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/platform_tutorial/07_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def setup(self):
)

# Initialize our camera, setting a viewport the size of our window.
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

self.background_color = arcade.csscolor.CORNFLOWER_BLUE

Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/platform_tutorial/08_coins.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def setup(self):
)

# Initialize our camera, setting a viewport the size of our window.
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

self.background_color = arcade.csscolor.CORNFLOWER_BLUE

Expand Down
2 changes: 1 addition & 1 deletion arcade/examples/platform_tutorial/09_sound.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def setup(self):
)

# Initialize our camera, setting a viewport the size of our window.
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

self.background_color = arcade.csscolor.CORNFLOWER_BLUE

Expand Down
4 changes: 2 additions & 2 deletions arcade/examples/platform_tutorial/10_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ def setup(self):
)

# Initialize our camera, setting a viewport the size of our window.
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

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

# Reset our score to 0
self.score = 0
Expand Down
4 changes: 2 additions & 2 deletions arcade/examples/platform_tutorial/11_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ def setup(self):
)

# Initialize our camera, setting a viewport the size of our window.
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

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

# Reset our score to 0
self.score = 0
Expand Down
4 changes: 2 additions & 2 deletions arcade/examples/platform_tutorial/12_tiled.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ def setup(self):
)

# Initialize our camera, setting a viewport the size of our window.
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

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

# Reset our score to 0
self.score = 0
Expand Down
4 changes: 2 additions & 2 deletions arcade/examples/platform_tutorial/13_more_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ def setup(self):
)

# Initialize our camera, setting a viewport the size of our window.
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

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

# Reset our score to 0
self.score = 0
Expand Down
4 changes: 2 additions & 2 deletions arcade/examples/platform_tutorial/14_multiple_levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ def setup(self):
)

# Initialize our camera, setting a viewport the size of our window.
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

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

# Reset the score if we should
if self.reset_score:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ def setup(self):
)

# Initialize our camera, setting a viewport the size of our window.
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

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

# Reset the score if we should
if self.reset_score:
Expand Down
4 changes: 2 additions & 2 deletions arcade/examples/platform_tutorial/16_better_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ def setup(self):
)

# Initialize our camera, setting a viewport the size of our window.
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

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

# Reset the score if we should
if self.reset_score:
Expand Down
4 changes: 2 additions & 2 deletions arcade/examples/platform_tutorial/17_animations.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ def setup(self):
)

# Initialize our camera, setting a viewport the size of our window.
self.camera = arcade.camera.Camera2D()
self.camera = arcade.Camera2D()

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

# Reset the score if we should
if self.reset_score:
Expand Down
Loading
Loading