https://github.com/fenjalien/yap5
"Yet Another p5" A slight rewrite of p5py that focuses more on the 2D side of drawing, built ontop of pyglet.
https://github.com/fenjalien/yap5
Last synced: about 1 month ago
JSON representation
"Yet Another p5" A slight rewrite of p5py that focuses more on the 2D side of drawing, built ontop of pyglet.
- Host: GitHub
- URL: https://github.com/fenjalien/yap5
- Owner: fenjalien
- License: gpl-3.0
- Created: 2020-04-08T08:30:30.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-16T20:28:44.000Z (over 4 years ago)
- Last Synced: 2025-01-28T00:37:56.602Z (3 months ago)
- Language: Python
- Homepage:
- Size: 41 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# "Yet Another P5"
A rewrite of p5py/p5 that focuses more on the 2D side of drawing and is built on pyglet.Functions that change global drawing state are gone, instead pass a Theme object to each drawing function. There are defaults.
There are the standard processing style `setup` and `draw` functions. `draw` is set to be the `on_draw` method of the `pyglet` window. However there is an additional `update` function that is passed a `dt` variable.
So:- `setup`: variable/value creation
- `draw`: Only call draw functions, don't change variables such as position.
- `update`: Update variables such as position, don't drawFinally as its built on pyglet you can still run pyglet functions, and the main window is in the variable `window`.
Its going to be a while before I can sit down and write any coherent documentation, so if you get stuck try and read through the code otherwise raise an issue.
## Install
Clone the directory and run `pip install .`.