Contains the top-level Window and global execution environment.
| Class | |
No class docstring; 6/10 properties, 0/12 instance variable, 0/2 constant, 3/15 methods documented |
| Function | get |
Undocumented |
| Function | get |
@return the one and only window. None if start() hasn't been called. |
| Async Function | next |
Yields control until the next frame is drawn. @return Always True so that this can be used in a cannonical 'forever' loop: ``` while await next_frame(): sprite.turn(1) ``` |
| Function | set |
Convenience to set the current stage on the window. |
| Function | start |
Shows the window and starts the event loop. Never returns. There are many options that are all optional. It is best to always set these using the keyword parameters. @param whenStarted A function to call to perform initialization... |
| Async Function | wait |
Asynchronously wait for the given amount of time, in seconds. At minimum this will wait until the next frame. |
| Class | _ |
Simple class to keep a circular buffer of the last N values and calculate a rolling average on them. The buffer starts out as zeros so that will skew the results at the beginning. |
| Variable | _window |
Undocumented |
Yields control until the next frame is drawn. @return Always True so that this can be used in a cannonical 'forever' loop: ``` while await next_frame(): sprite.turn(1) ```
Shows the window and starts the event loop. Never returns. There are many options that are all optional. It is best to always set these using the keyword parameters. @param whenStarted A function to call to perform initialization. This is usually only used if you are doing a simple functional program. If you're organizing using custom stages, then you'd probably make your sprites in stage.on_init(). @param stage If you make a custom stage, you can supply it here and it will be set as the window's stage. @param windowSize A tuple of (width, height) for how big to make the window. Default (800, 600). @param windowTitle Sets the name in the window title bar. @param fullScreen If true, use the full screen and windowSize is ignored. @param backgroundColor A scratchypy.color or pygame.color to use as the window background, default WHITE. @param asyncioDebug Advanced logging of Python asyncio calls.