From 8b27cba85686f34132e92df61bfb7846fddbd5d1 Mon Sep 17 00:00:00 2001 From: Paul V Craven Date: Thu, 8 Oct 2026 10:33:27 -0500 Subject: [PATCH] Remove the unreferenced perspective_parallax demo It was a quick PerspectiveProjector demo from #2052. Nothing refers to it, it doesn't show a parallax effect, and its docstring gave the wrong module path. background_parallax is the parallax example. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + arcade/experimental/perspective_parallax.py | 56 --------------------- 2 files changed, 1 insertion(+), 56 deletions(-) delete mode 100644 arcade/experimental/perspective_parallax.py diff --git a/CHANGELOG.md b/CHANGELOG.md index d57acde16..ebb4b62c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ Arcade [PyPi Release History](https://pypi.org/project/arcade/#history) page. - Documented choosing a spatial hash cell size (`spatial_hash_cell_size`) in the performance tips and the `SpriteList` docs: about the size of the sprites in the list. With 4 pixel sprites, collision checks were 16 times faster with 8 pixel cells than with the default of 128. - Type checking with mypy and pyright now fails the CI check, like formatting and linting. Their existing errors are fixed. - Fixed code excerpts in the docs that highlighted or showed the wrong lines, because the example code had changed since their line numbers were set. This covers 62 excerpts: 48 in the platformer, pymunk platformer, menu, card game, compute shader, raycasting and shader toy glow tutorials, and 14 on example pages. Most now highlight the same code they were written for. Where the code was rewritten, they highlight the code that does the same job now. +- Removed `arcade/experimental/perspective_parallax.py`, an unreferenced demo of `PerspectiveProjector` that didn't show a parallax effect. The `background_parallax` example shows parallax scrolling. ## 4.0.0.dev8 diff --git a/arcade/experimental/perspective_parallax.py b/arcade/experimental/perspective_parallax.py deleted file mode 100644 index 9ab96b1d4..000000000 --- a/arcade/experimental/perspective_parallax.py +++ /dev/null @@ -1,56 +0,0 @@ -""" -Perspective Parallax - -Using a perspective projector and sprites at different depths you can cheaply get a parallax effect. - -If Python and Arcade are installed, this example can be run from the command line with: -python -m arcade.examples.perspective_parallax -""" - -import math - -import arcade - -SCREEN_WIDTH, SCREEN_HEIGHT = 800, 600 -LAYERS = ( - ":assets:/images/cybercity_background/far-buildings.png", - ":assets:/images/cybercity_background/back-buildings.png", - ":assets:/images/cybercity_background/foreground.png", -) - - -class PerspectiveParallax(arcade.Window): - def __init__(self): - super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, "Perspective Parallax") - self.t = 0.0 - self.projector = arcade.camera.PerspectiveProjector() - - self.camera_data = self.projector.view - self.camera_data.zoom = 2.0 - - self.projector.projection.far = 1000 - - self.background_sprites = arcade.SpriteList() - for index, layer_src in enumerate(LAYERS): - layer = arcade.Sprite(layer_src) - layer.depth = -500 + index * 100.0 - self.background_sprites.append(layer) - - def on_draw(self): - self.clear() - with self.projector.activate(): - self.background_sprites.draw(pixelated=True) - - def on_update(self, delta_time: float): - self.t += delta_time - - self.camera_data.position = (math.cos(self.t) * 200.0, math.sin(self.t) * 200.0, 0.0) - - -def main(): - window = PerspectiveParallax() - window.run() - - -if __name__ == "__main__": - main()