curl -fsSL https://Gist.GitHubUserContent.com/GoToLoop/246a31d437aaa8c6eadb7f7186544e0f/raw/thonny-installer.bash -o thonny-installer.bash && chmod +x thonny-installer.bash && ./thonny-installer.bash
🚀 Convert the q5.js
library into an ECMAScript Module (ESM) with ease!
This script reads the local q5.js file from subfolder q5
or fetches it from a remote source,
applies customizable string replacement patterns, and generates the resulting q5.mjs
file
in subfolder q5
.
- Local or Remote Input: Automatically handles local files or fetches from a remote URL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
for (const p of Object.getOwnPropertyNames(Math)) Q5[p] = Math[p]; | |
function Q5(scope, parent) { | |
const | |
$ = this, M = Math, | |
{ _isObj, _isFun, _isNum, _isP5, _val, _argsErr } = Q5; | |
var |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Hacked Movie EoS Event (v2.1.0) | |
* by GoToLoop (2022-Oct-20) | |
* | |
* Gist.GitHub.com/GoToLoop/67023ba3e9ba1d0301c40f7c030d176a | |
* | |
* Discourse.Processing.org/t/hacked-movie-eos-event-library/39375 | |
* Forum.Processing.org/two/discussion/14990/movie-begin-and-end-events#Item_1 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ArrayList Polyfill Shims for JS Arrays (v1.0.1) | |
// GoToLoop (2020/Nov/05) | |
// https://Gist.GitHub.com/GoToLoop/a74c5780667f2610097cfc007e53a559 | |
"use strict"; | |
// Add some useful Java list's methods to JS arrays as polyfills: | |
Object.defineProperties(Array.prototype, { | |
size: { | |
value() { // polyfill hack to add method size() to JS arrays |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
* Push/Pop Limit Workaround (v1.0.5) | |
* GoToLoop (2020/Aug/22) | |
* | |
* Discourse.Processing.org/t/too-many-calls-to-pushmatrix/23411/9 | |
* Gist.GitHub.com/GoToLoop/193d951ef13f212f09e2b2809efc4de0 | |
""" | |
from processing.opengl import PGraphicsOpenGL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Push/Pop Limit Workaround (v1.0.1) | |
* GoToLoop (2020/Aug/22) | |
* | |
* Discourse.Processing.org/t/too-many-calls-to-pushmatrix/23411/8 | |
* Gist.GitHub.com/GoToLoop/e35ac69e9bd4dbbcce557218c3b20588 | |
*/ | |
// Comment out the package statement below if it's inside a ".java" file: | |
package processing.core; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
height: 200 | |
scrolling: no | |
border: no | |
license: cc-by-4.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
height: 610 | |
scrolling: no | |
border: no | |
license: cc-by-4.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
height: 600 | |
scrolling: no | |
border: no | |
license: cc-by-4.0 |
NewerOlder