4.7.0
Added type support for q5 in Python with the new q5.pyi file!
Since Python doesn't support top-level await, I made Canvas() synchronous so there's no Pylance errors shown when editing Python files in VSCode.
Load Python code in your html like this:
<script type="q5-python" src="sketch.py"></script>Canvas()
background('silver')
def draw():
circle(mouseX, mouseY, random(55))But also if you do want to use top-level await with q5 functions like load, and don't want a bunch of squiggly red lines in your Python code, q5-python.js now supports Python Jupyter Notebook (.ipynb) files, which support top-level await.
Removed q5.min.js and q5.min.js.map from the npm package. Since q5.js is already so small, it doesn't make much sense to include a minified version and source map file that are bigger than q5.js itself! So please just use q5.js instead.