step_07.py Diff#

step_06.py to step_07.py diff#
--- /home/docs/checkouts/readthedocs.org/user_builds/arcade-library/checkouts/development/doc/tutorials/raycasting/step_06.py
+++ /home/docs/checkouts/readthedocs.org/user_builds/arcade-library/checkouts/development/doc/tutorials/raycasting/step_07.py
@@ -22,7 +22,7 @@
 class MyGame(arcade.Window):
 
     def __init__(self, width, height, title):
-        super().__init__(width, height, title)
+        super().__init__(width, height, title, resizable=True)
 
         # The shader toy and 'channels' we'll be using
         self.shadertoy = None
@@ -146,6 +146,10 @@
         # example though.)
         self.physics_engine.update()
 
+    def on_resize(self, width: int, height: int):
+        super().on_resize(width, height)
+        self.shadertoy.resize((width, height))
+
 
 if __name__ == "__main__":
     MyGame(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)