Skip to content

Instantly share code, notes, and snippets.

@llimllib

llimllib/a.py

Created Jul 23, 2020
Embed
What would you like to do?
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
You can’t perform that action at this time.