Skip to content

Instantly share code, notes, and snippets.

@llimllib
Created July 23, 2020 02:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save llimllib/d316be97f7ea1f4e6c2cd95cc49e87aa to your computer and use it in GitHub Desktop.
Save llimllib/d316be97f7ea1f4e6c2cd95cc49e87aa to your computer and use it in GitHub Desktop.
import pyglet
class AWindow(pyglet.window.Window):
def __init__(self):
super(AWindow, self).__init__(100, 100)
self.batch = pyglet.graphics.Batch()
self.circle = pyglet.shapes.Circle(
50, 50, 6, color=(255, 255, 255), batch=self.batch
)
pyglet.clock.schedule_interval(self.update, 1 / 60)
def update(self, dt):
self.clear()
self.batch.draw()
if __name__ == "__main__":
window = AWindow()
pyglet.app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment