gpu_particle_burst_01.py Full Listing

gpu_particle_burst_01.py
 1"""
 2Example showing how to create particle explosions via the GPU.
 3"""
 4import arcade
 5
 6SCREEN_WIDTH = 1024
 7SCREEN_HEIGHT = 768
 8SCREEN_TITLE = "GPU Particle Explosion"
 9
10
11class MyWindow(arcade.Window):
12    """ Main window"""
13    def __init__(self):
14        super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
15
16    def on_draw(self):
17        """ Draw everything """
18        self.clear()
19
20    def on_update(self, dt):
21        """ Update everything """
22        pass
23
24    def on_mouse_press(self, x: float, y: float, button: int, modifiers: int):
25        """ User clicks mouse """
26        pass
27
28
29if __name__ == "__main__":
30    window = MyWindow()
31    window.center_window()
32    arcade.run()