Repository navigation
v4.9
4.9.6
Full Python documentation in English and Spanish is now available!
https://q5js.org/learn?python
Python support now handles global variable use in functions.
4.9.3
Fixed memory leaks when removing (deleting) q5 WebGPU instances, all arrays are zeroed out and the instance is removed from Q5.instances.
Added new buffer size maximums: Q5.MAX_COLORS, Q5.MAX_IMAGES, and Q5.MAX_SHAPE_VERTS.
Previously these limits were not changed on the q5js.org and q5play.org learn pages, so pages with many sketches could require over 1GB of memory, now this has been reduced to 100MB or less.
4.9.2
Upgraded Python support for Brython v3.15.0
4.9.0
Run Lienzo to start using q5 in Spanish!
await Lienzo();
fondo('silver');
q5.dibujar = function () {
circulo(ratonX, ratonY, aleatorio(55));
};For more info on using this feature, see the wiki page on translations.
https://github.com/q5js/q5.js/wiki/Translations
Dev Log
In this update I totally overhauled the API translation system! 😅
Now if localization is required, q5-lang overrides the setter trap of the q proxy created in q5-core, that by default provides a convenient way to change both the value of an instance variable and it's global scope copy, so that it additionally changes the value of the translated copies on the instance and in the global scope. In retrospect, this is an obvious solution that sadly I hadn't considered prior. Previously, I was copying over the value of input event variables like key each frame as a predraw hook, preventing them from being used accurately in event handlers like keyPressed. Keeping translated variables in sync in other places in q5 required similar sync calls, now it all happens via the q proxy, no need to change anything else!