peng3d.peng
- Main Engine class¶
-
class
peng3d.peng.
Peng
(cfg={})[source]¶ This Class should only be instatiated once per application, if you want to use multiple windows, see
createWindow()
.An Instance of this class represents the whole Engine, with all accompanying state and window/world objects.
Be sure to keep your instance accessible, as it will be needed to create most other classes.
-
createWindow
(cls=window.PengWindow, *args, **kwargs)[source]¶ Creates a new window using the supplied
cls
.If
cls
is not given,peng3d.window.PengWindow()
will be used.Any other positional or keyword arguments are passed to the class constructor.
Note that this method currently does not support using multiple windows.
Todo
Implement having multiple windows.
-
handleEvent
(event_type, args, window=None)[source]¶ Handles a pyglet event.
This method is called by
PengWindow.dispatch_event()
and handles all events.See
registerEventHandler()
for how to listen to these events.
-