step_07.py Diff#

step_06.py to step_07.py diff#
--- /home/docs/checkouts/readthedocs.org/user_builds/arcade-library/checkouts/stable/doc/tutorials/raycasting/step_06.py
+++ /home/docs/checkouts/readthedocs.org/user_builds/arcade-library/checkouts/stable/doc/tutorials/raycasting/step_07.py
@@ -24,7 +24,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
@@ -151,6 +151,10 @@
         # example though.)
         self.physics_engine.update()
 
+    def on_resize(self, width: float, height: float):
+        super().on_resize(width, height)
+        self.shadertoy.resize((width, height))
+
 
 if __name__ == "__main__":
     MyGame(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)