diff --git a/.all-contributorsrc b/.all-contributorsrc index 03fa68e0cd..4092714f09 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -6993,6 +6993,15 @@ "code" ] }, + { + "login": "eslteacher902010", + "name": "eslteacher902010", + "avatar_url": "https://avatars.githubusercontent.com/u/210183195?v=4", + "profile": "https://github.com/eslteacher902010", + "contributions": [ + "code" + ] + }, { "login": "nking07049925", "name": "Nikita Korol", @@ -7091,6 +7100,106 @@ "promotion", "tutorial" ] + }, + { + "login": "hana-cho", + "name": "Hana Cho", + "avatar_url": "https://avatars.githubusercontent.com/u/51312538?v=4", + "profile": "https://github.com/hana-cho", + "contributions": [ + "translation" + ] + }, + { + "login": "kangjung", + "name": "JUNGMIN KANG", + "avatar_url": "https://avatars.githubusercontent.com/u/28768760?v=4", + "profile": "https://kangjung.github.io/game/index.html", + "contributions": [ + "translation" + ] + }, + { + "login": "AlzaAlzaki76", + "name": "Alza Alzaki", + "avatar_url": "https://avatars.githubusercontent.com/u/202525131?v=4", + "profile": "https://github.com/AlzaAlzaki76", + "contributions": [ + "doc" + ] + }, + { + "login": "Abhayaj247", + "name": "Abhay M Joshi", + "avatar_url": "https://avatars.githubusercontent.com/u/139991819?v=4", + "profile": "https://github.com/Abhayaj247", + "contributions": [ + "doc" + ] + }, + { + "login": "Homaid", + "name": "Homaid", + "avatar_url": "https://avatars.githubusercontent.com/u/69979731?v=4", + "profile": "https://github.com/Homaid", + "contributions": [ + "a11y", + "code" + ] + }, + { + "login": "junseok44", + "name": "JangJunseok", + "avatar_url": "https://avatars.githubusercontent.com/u/81099627?v=4", + "profile": "https://github.com/junseok44", + "contributions": [ + "code" + ] + }, + { + "login": "tychedelia", + "name": "charlotte 🌸", + "avatar_url": "https://avatars.githubusercontent.com/u/10366310?v=4", + "profile": "http://charlotte.fyi", + "contributions": [ + "code" + ] + }, + { + "login": "reshma045", + "name": "Reshma R", + "avatar_url": "https://avatars.githubusercontent.com/u/77575603?v=4", + "profile": "https://github.com/reshma045", + "contributions": [ + "code" + ] + }, + { + "login": "Somnath-Mishra", + "name": "Somnath Mishra", + "avatar_url": "https://avatars.githubusercontent.com/u/120735604?v=4", + "profile": "https://github.com/Somnath-Mishra", + "contributions": [ + "code" + ] + }, + { + "login": "ayushman1210", + "name": "Ayushman", + "avatar_url": "https://avatars.githubusercontent.com/u/138183570?v=4", + "profile": "https://github.com/ayushman1210", + "contributions": [ + "code" + ] + }, + { + "login": "MannuVilasara", + "name": "Manpreet Singh", + "avatar_url": "https://avatars.githubusercontent.com/u/117009138?v=4", + "profile": "https://mannu.live", + "contributions": [ + "code" + ] } ], "repoType": "github", diff --git a/.github/workflows/auto-close-issues.yml b/.github/workflows/auto-close-issues.yml new file mode 100644 index 0000000000..c882f4a843 --- /dev/null +++ b/.github/workflows/auto-close-issues.yml @@ -0,0 +1,20 @@ +name: Close Linked Issues on PR Merge + +on: + pull_request: + types: [closed] + branches: + - 2.0 + - dev-2.0 + +jobs: + close_issues: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: Close linked issues on non-default branches + uses: processing/branch-pr-close-issue@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: dev-2.0 + diff --git a/.github/workflows/stewards-update.yml b/.github/workflows/stewards-update.yml index 3d2b56ea33..e7d004d595 100644 --- a/.github/workflows/stewards-update.yml +++ b/.github/workflows/stewards-update.yml @@ -9,6 +9,7 @@ on: jobs: build: + if: github.ref == 'refs/heads/main' && github.repository == 'processing/p5.js' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -16,26 +17,26 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '20' + node-version: "20" - name: Install dependencies run: npm install js-yaml - name: Run table generator run: node utils/stewards-table.js - + - name: Reset all changes except README.md run: | git restore --staged . git add README.md git checkout -- . - + - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v7 with: commit-message: "Update README table from stewards.yml" branch: update-readme-table - title: 'chore: update README table from stewards.yml' - body: 'This PR updates the README.md table to reflect changes in stewards.yml.' - add: README.md + title: "chore: update README table from stewards.yml" + body: "This PR updates the README.md table to reflect changes in stewards.yml." + add-paths: README.md token: ${{ secrets.ACCESS_TOKEN }} diff --git a/README.md b/README.md index b8562f168e..19f3a36ead 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ Lead/Mentor Alumni | Friendly Errors | [@IIITM-Jay](https://github.com/IIITM-Jay) | | Graphics (p5.strands) | [@lukeplowden](https://github.com/lukeplowden) | | Graphics (WebGL) | [@RandomGamingDev](https://github.com/RandomGamingDev), [@aferriss](https://github.com/aferriss), [@davepagurek](https://github.com/davepagurek), [@lukeplowden](https://github.com/lukeplowden), [@perminder-17](https://github.com/perminder-17) | +| i18n (es) | [@marioguzzzman](https://github.com/marioguzzzman) | | i18n (hi) | [@Divyansh013](https://github.com/Divyansh013), [@takshittt](https://github.com/takshittt) | | i18n (ko) | [@hana-cho](https://github.com/hana-cho) | | i18n (zh) | [@limzykenneth](https://github.com/limzykenneth), [@lirenjie95](https://github.com/lirenjie95) | @@ -1163,18 +1164,34 @@ We recognize all types of contributions. This project follows the [all-contribut
*
- * // load two soundfile and crossfade beetween them
+ * // load two soundfile and crossfade between them
* let sound1,sound2;
* let sound1Gain, sound2Gain, mixGain;
* function preload(){
diff --git a/package-lock.json b/package-lock.json
index 60127284b1..96c392244f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "p5",
- "version": "1.11.10",
+ "version": "1.11.11",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "p5",
- "version": "1.11.10",
+ "version": "1.11.11",
"license": "LGPL-2.1",
"devDependencies": {
"@babel/core": "^7.7.7",
@@ -2807,6 +2807,22 @@
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
"dev": true
},
+ "node_modules/available-typed-arrays": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
+ "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "possible-typed-array-names": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/aws-sign2": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz",
@@ -3843,16 +3859,47 @@
}
},
"node_modules/call-bind": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
- "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
+ "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
"dev": true,
+ "license": "MIT",
"dependencies": {
+ "call-bind-apply-helpers": "^1.0.0",
"es-define-property": "^1.0.0",
- "es-errors": "^1.3.0",
- "function-bind": "^1.1.2",
"get-intrinsic": "^1.2.4",
- "set-function-length": "^1.2.1"
+ "set-function-length": "^1.2.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/call-bound": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
},
"engines": {
"node": ">= 0.4"
@@ -4027,15 +4074,47 @@
"dev": true
},
"node_modules/cipher-base": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
- "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz",
+ "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "inherits": "^2.0.1",
- "safe-buffer": "^5.0.1"
+ "inherits": "^2.0.4",
+ "safe-buffer": "^5.2.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
}
},
+ "node_modules/cipher-base/node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/cipher-base/node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
"node_modules/clean-stack": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz",
@@ -5318,6 +5397,21 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/duplexer": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
@@ -5444,13 +5538,11 @@
}
},
"node_modules/es-define-property": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
- "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
"dev": true,
- "dependencies": {
- "get-intrinsic": "^1.2.4"
- },
+ "license": "MIT",
"engines": {
"node": ">= 0.4"
}
@@ -5464,6 +5556,19 @@
"node": ">= 0.4"
}
},
+ "node_modules/es-object-atoms": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/es5-ext": {
"version": "0.10.37",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.37.tgz",
@@ -6893,6 +6998,22 @@
"integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==",
"dev": true
},
+ "node_modules/for-each": {
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz",
+ "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-callable": "^1.2.7"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/for-in": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
@@ -7062,16 +7183,22 @@
}
},
"node_modules/get-intrinsic": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
- "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
"es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
"function-bind": "^1.1.2",
- "has-proto": "^1.0.1",
- "has-symbols": "^1.0.3",
- "hasown": "^2.0.0"
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
},
"engines": {
"node": ">= 0.4"
@@ -7086,6 +7213,20 @@
"integrity": "sha512-TtY/sbOemiMKPRUDDanGCSgBYe7Mf0vbRsWnBZ+9yghpZ1MvcpSpuZFjHdEeY/LZjZy0vdLjS77L6HosisFiug==",
"dev": true
},
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/get-stream": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
@@ -7246,12 +7387,13 @@
}
},
"node_modules/gopd": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
- "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
"dev": true,
- "dependencies": {
- "get-intrinsic": "^1.1.3"
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -7946,11 +8088,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/has-proto": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
- "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">= 0.4"
},
@@ -7958,11 +8101,15 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/has-symbols": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
- "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "node_modules/has-tostringtag": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-symbols": "^1.0.3"
+ },
"engines": {
"node": ">= 0.4"
},
@@ -9124,6 +9271,19 @@
"node": ">=0.10.0"
}
},
+ "node_modules/is-callable": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
+ "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-ci": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz",
@@ -9454,6 +9614,22 @@
"node": ">=0.10.0"
}
},
+ "node_modules/is-typed-array": {
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz",
+ "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "which-typed-array": "^1.1.16"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
@@ -10682,6 +10858,16 @@
"node": ">= 12"
}
},
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/maxmin": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/maxmin/-/maxmin-2.1.0.tgz",
@@ -14212,21 +14398,78 @@
}
},
"node_modules/pbkdf2": {
- "version": "3.0.17",
- "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz",
- "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==",
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.3.tgz",
+ "integrity": "sha512-wfRLBZ0feWRhCIkoMB6ete7czJcnNnqRpcoWQBLqatqXXmelSRqfdDK4F3u9T2s2cXas/hQJcryI/4lAL+XTlA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "create-hash": "^1.1.2",
- "create-hmac": "^1.1.4",
- "ripemd160": "^2.0.1",
- "safe-buffer": "^5.0.1",
- "sha.js": "^2.4.8"
+ "create-hash": "~1.1.3",
+ "create-hmac": "^1.1.7",
+ "ripemd160": "=2.0.1",
+ "safe-buffer": "^5.2.1",
+ "sha.js": "^2.4.11",
+ "to-buffer": "^1.2.0"
},
"engines": {
"node": ">=0.12"
}
},
+ "node_modules/pbkdf2/node_modules/create-hash": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz",
+ "integrity": "sha512-snRpch/kwQhcdlnZKYanNF1m0RDlrCdSKQaH87w1FCFPVPNCQ/Il9QJKAX2jVBZddRdaHBMC+zXa9Gw9tmkNUA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "cipher-base": "^1.0.1",
+ "inherits": "^2.0.1",
+ "ripemd160": "^2.0.0",
+ "sha.js": "^2.4.0"
+ }
+ },
+ "node_modules/pbkdf2/node_modules/hash-base": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz",
+ "integrity": "sha512-0TROgQ1/SxE6KmxWSvXHvRj90/Xo1JvZShofnYF+f6ZsGtR4eES7WfrQzPalmyagfKZCXpVnitiRebZulWsbiw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "^2.0.1"
+ }
+ },
+ "node_modules/pbkdf2/node_modules/ripemd160": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz",
+ "integrity": "sha512-J7f4wutN8mdbV08MJnXibYpCOPHR+yzy+iQ/AsjMv2j8cLavQ8VGagDFUwwTAdF8FmRKVeNpbTTEwNHCW1g94w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hash-base": "^2.0.0",
+ "inherits": "^2.0.1"
+ }
+ },
+ "node_modules/pbkdf2/node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
"node_modules/pegjs": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz",
@@ -14346,6 +14589,16 @@
"npm": ">=1.0.0"
}
},
+ "node_modules/possible-typed-array-names": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
+ "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/prelude-ls": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
@@ -15870,18 +16123,54 @@
"dev": true
},
"node_modules/sha.js": {
- "version": "2.4.11",
- "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
- "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
+ "version": "2.4.12",
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz",
+ "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==",
"dev": true,
+ "license": "(MIT AND BSD-3-Clause)",
"dependencies": {
- "inherits": "^2.0.1",
- "safe-buffer": "^5.0.1"
+ "inherits": "^2.0.4",
+ "safe-buffer": "^5.2.1",
+ "to-buffer": "^1.2.0"
},
"bin": {
"sha.js": "bin.js"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/sha.js/node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/sha.js/node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
"node_modules/shasum": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz",
@@ -16781,6 +17070,49 @@
"node": ">=0.6.0"
}
},
+ "node_modules/to-buffer": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz",
+ "integrity": "sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "isarray": "^2.0.5",
+ "safe-buffer": "^5.2.1",
+ "typed-array-buffer": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/to-buffer/node_modules/isarray": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/to-buffer/node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
"node_modules/to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
@@ -16923,6 +17255,21 @@
"node": ">= 0.6"
}
},
+ "node_modules/typed-array-buffer": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",
+ "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "es-errors": "^1.3.0",
+ "is-typed-array": "^1.1.14"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/typedarray": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
@@ -17438,6 +17785,28 @@
"integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=",
"dev": true
},
+ "node_modules/which-typed-array": {
+ "version": "1.1.19",
+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz",
+ "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "for-each": "^0.3.5",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/widest-line": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz",
diff --git a/package.json b/package.json
index 70c6d2fd1e..a604265604 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
"node --require @babel/register ./utils/sample-linter.js"
]
},
- "version": "1.11.10",
+ "version": "1.11.11",
"devDependencies": {
"@babel/core": "^7.7.7",
"@babel/preset-env": "^7.10.2",
diff --git a/src/accessibility/gridOutput.js b/src/accessibility/gridOutput.js
index f5b4936cd5..cbeb03ae50 100644
--- a/src/accessibility/gridOutput.js
+++ b/src/accessibility/gridOutput.js
@@ -10,6 +10,14 @@ import p5 from '../core/main';
//updates gridOutput
p5.prototype._updateGridOutput = function(idT) {
+ // Check if the current rendering mode is WEBGL
+ if (this._renderer && this._renderer instanceof p5.RendererGL) {
+ if (!this._didOutputGridWebGLMessage) {
+ this._didOutputGridWebGLMessage = true;
+ console.error('gridOutput() does not yet work in WebGL mode.');
+ }
+ return;
+ }
//if html structure is not there yet
if (!this.dummyDOM.querySelector(`#${idT}_summary`)) {
return;
diff --git a/src/accessibility/outputs.js b/src/accessibility/outputs.js
index bf203ddfd9..b983af1db5 100644
--- a/src/accessibility/outputs.js
+++ b/src/accessibility/outputs.js
@@ -37,6 +37,15 @@ import p5 from '../core/main';
* Writing accessible canvas descriptions
* to learn more about making sketches accessible.
*
+ * `textOutput()` generates descriptions in English only. Text drawn with
+ * text() is not described. Shapes created with
+ * beginShape() are not described. WEBGL mode
+ * and 3D shapes are not supported.
+ *
+ * Use describe() and
+ * describeElement() for more control
+ * over canvas descriptions.
+ *
* @method textOutput
* @param {Constant} [display] either FALLBACK or LABEL.
*
@@ -82,6 +91,10 @@ import p5 from '../core/main';
*
*
*
+ * function setup() {
+ * createCanvas(100, 100);
+ * }
+ *
* function draw() {
* // Add the text description.
* textOutput();
@@ -102,6 +115,10 @@ import p5 from '../core/main';
*
*
*
+ * function setup() {
+ * createCanvas(100, 100);
+ * }
+ *
* function draw() {
* // Add the text description and
* // display it for debugging.
@@ -172,6 +189,15 @@ p5.prototype.textOutput = function(display) {
* Writing accessible canvas descriptions
* to learn more about making sketches accessible.
*
+ * `gridOutput()` generates descriptions in English only. Text drawn with
+ * text() is not described. Shapes created with
+ * beginShape() are not described. WEBGL mode
+ * and 3D shapes are not supported.
+ *
+ * Use describe() and
+ * describeElement() for more control
+ * over canvas descriptions.
+ *
* @method gridOutput
* @param {Constant} [display] either FALLBACK or LABEL.
*
@@ -217,6 +243,10 @@ p5.prototype.textOutput = function(display) {
*
*
*
+ * function setup() {
+ * createCanvas(100, 100);
+ * }
+ *
* function draw() {
* // Add the grid description.
* gridOutput();
@@ -237,6 +267,10 @@ p5.prototype.textOutput = function(display) {
*
*
*
+ * function setup() {
+ * createCanvas(100, 100);
+ * }
+ *
* function draw() {
* // Add the grid description and
* // display it for debugging.
@@ -492,7 +526,7 @@ p5.prototype._accsOutput = function(f, args) {
if (!this.ingredients.shapes[f]) {
this.ingredients.shapes[f] = [include];
//if other shapes of this type have been created
- } else if (this.ingredients.shapes[f] !== [include]) {
+ } else {
//for every shape of this type
for (let y in this.ingredients.shapes[f]) {
//compare it with current shape and if it already exists make add false
diff --git a/src/accessibility/textOutput.js b/src/accessibility/textOutput.js
index 1fe2dc8137..bc3a7b3134 100644
--- a/src/accessibility/textOutput.js
+++ b/src/accessibility/textOutput.js
@@ -10,6 +10,14 @@ import p5 from '../core/main';
//updates textOutput
p5.prototype._updateTextOutput = function(idT) {
+ // Check if the current rendering mode is WEBGL
+ if (this._renderer && this._renderer instanceof p5.RendererGL) {
+ if (!this._didOutputTextWebGLMessage) {
+ this._didOutputTextWebGLMessage = true;
+ console.error('textOutput() does not yet work in WebGL mode.');
+ }
+ return;
+ }
//if html structure is not there yet
if (!this.dummyDOM.querySelector(`#${idT}_summary`)) {
return;
diff --git a/src/color/setting.js b/src/color/setting.js
index f659f24ee1..0e718879c7 100644
--- a/src/color/setting.js
+++ b/src/color/setting.js
@@ -439,6 +439,11 @@ p5.prototype.clip = function(callback, options) {
* in RGB values. Calling `background(255, 204, 0)` sets the background a bright
* yellow color.
*
+ * The version of `background()` with four parameters interprets them as RGBA,
+ * HSBA, or HSLA colors, depending on the current
+ * colorMode(). The last parameter sets the alpha
+ * (transparency) value.
+ *
* @method background
* @param {p5.Color} color any value created by the color() function
* @chainable
@@ -487,6 +492,19 @@ p5.prototype.clip = function(callback, options) {
* function setup() {
* createCanvas(100, 100);
*
+ * // R, G, B, and Alpha values.
+ * background(255, 0, 0, 128);
+ *
+ * describe('A canvas with a semi-transparent red background.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
* // Use HSB color.
* colorMode(HSB);
*
@@ -996,6 +1014,10 @@ p5.prototype.colorMode = function(mode, max1, max2, max3, maxA) {
* colorMode(). The default color space is RGB,
* with each value in the range from 0 to 255.
*
+ * The version of `fill()` with four parameters interprets them as `RGBA`, `HSBA`,
+ * or `HSLA` colors, depending on the current colorMode(). The last parameter
+ * sets the alpha (transparency) value.
+ *
* @method fill
* @param {Number} v1 red value if color mode is RGB or hue value if color mode is HSB.
* @param {Number} v2 green value if color mode is RGB or saturation value if color mode is HSB.
@@ -1040,6 +1062,22 @@ p5.prototype.colorMode = function(mode, max1, max2, max3, maxA) {
* function setup() {
* createCanvas(100, 100);
*
+ * background(200);
+ *
+ * // R, G, B, and Alpha values.
+ * fill(255, 0, 0, 128);
+ * square(20, 20, 60);
+ *
+ * describe('A semi-transparent red square with a black outline.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
* background(100);
*
* // Use HSB color.
@@ -1336,7 +1374,7 @@ p5.prototype.noStroke = function() {
* Sets the color used to draw points, lines, and the outlines of shapes.
*
* Calling `stroke(255, 165, 0)` or `stroke('orange')` means all shapes drawn
- * after calling `stroke()` will be filled with the color orange. The way
+ * after calling `stroke()` will be outlined with the color orange. The way
* these parameters are interpreted may be changed with the
* colorMode() function.
*
diff --git a/src/core/environment.js b/src/core/environment.js
index d6efe67841..06e678c6b9 100644
--- a/src/core/environment.js
+++ b/src/core/environment.js
@@ -717,7 +717,7 @@ p5.prototype.windowHeight = 0;
* can be used for debugging or other purposes.
*
* @method windowResized
- * @param {UIEvent} [event] optional resize Event.
+ * @param {Event} [event] optional resize Event.
* @example
*
*
diff --git a/src/core/friendly_errors/sketch_reader.js b/src/core/friendly_errors/sketch_reader.js
index b70e86bf96..145f285958 100644
--- a/src/core/friendly_errors/sketch_reader.js
+++ b/src/core/friendly_errors/sketch_reader.js
@@ -380,7 +380,7 @@ if (typeof IS_MINIFIED !== 'undefined') {
const fesCodeReader = () => {
//moveAhead will determine if a match is found outside
//the setup and draw function. If a match is found then
- //to prevent further potential reporting we will exit immidiately
+ //to prevent further potential reporting we will exit immediately
let moveAhead = globalConstFuncCheck();
if (moveAhead) return;
let code = '';
diff --git a/src/core/friendly_errors/stacktrace.js b/src/core/friendly_errors/stacktrace.js
index fe6a1b5722..c4e079ac4b 100644
--- a/src/core/friendly_errors/stacktrace.js
+++ b/src/core/friendly_errors/stacktrace.js
@@ -78,7 +78,7 @@ function ErrorStackParser() {
.replace(/^\s+/, '')
.replace(/\(eval code/g, '(');
- // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in
+ // capture and preserve the parenthesized location "(/foo/my bar.js:12:87)" in
// case it has spaces in it, as the string is split on \s+ later on
let location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/);
diff --git a/src/core/internationalization.js b/src/core/internationalization.js
index e8e140c12c..6a9d9708b7 100644
--- a/src/core/internationalization.js
+++ b/src/core/internationalization.js
@@ -1,5 +1,7 @@
import i18next from 'i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
+import { VERSION } from './constants';
+
let fallbackResources, languages;
if (typeof IS_MINIFIED === 'undefined') {
@@ -149,8 +151,12 @@ export const initialize = () => {
},
backend: {
fallback: 'en',
- loadPath:
- 'https://cdn.jsdelivr.net/npm/p5/translations/{{lng}}/{{ns}}.json'
+
+ // ensure that the FES internationalization strings are loaded
+ // from the latest patch of the current minor version of p5.js
+ loadPath: `https://cdn.jsdelivr.net/npm/p5@${
+ VERSION.replace(/^(\d+\.\d+)\.\d+.*$/, '$1')
+ }/translations/{{lng}}/{{ns}}.json`
},
partialBundledLanguages: true,
resources: fallbackResources
diff --git a/src/core/shape/2d_primitives.js b/src/core/shape/2d_primitives.js
index b1f7d66ae5..7b00125241 100644
--- a/src/core/shape/2d_primitives.js
+++ b/src/core/shape/2d_primitives.js
@@ -111,8 +111,7 @@ p5.prototype._normalizeArcAngles = (
* The fifth and sixth parameters, `start` and `stop`, set the angles
* between which to draw the arc. Arcs are always drawn clockwise from
* `start` to `stop`. The fifth and sixth parameters, start and stop, set the
- * angles between which to draw the arc. Arcs are always drawn clockwise from
- * start to stop. By default, angles are given in radians, but if angleMode
+ * angles between which to draw the arc. By default, angles are given in radians, but if angleMode
* (DEGREES) is set, the function interprets the values in degrees.
*
* The seventh parameter, `mode`, is optional. It determines the arc's fill
diff --git a/src/core/shape/vertex.js b/src/core/shape/vertex.js
index 2a854077d1..54f3e96db5 100644
--- a/src/core/shape/vertex.js
+++ b/src/core/shape/vertex.js
@@ -116,7 +116,7 @@ let isFirstContour = true;
*
*
*/
-p5.prototype.beginContour = function() {
+p5.prototype.beginContour = function () {
if (this._renderer.isP3D) {
this._renderer.beginContour();
} else {
@@ -515,7 +515,7 @@ p5.prototype.beginContour = function() {
*
*
*/
-p5.prototype.beginShape = function(kind) {
+p5.prototype.beginShape = function (kind) {
p5._validateParameters('beginShape', arguments);
if (this._renderer.isP3D) {
this._renderer.beginShape(...arguments);
@@ -802,7 +802,7 @@ p5.prototype.beginShape = function(kind) {
* @param {Number} z4 z-coordinate of the anchor point.
* @chainable
*/
-p5.prototype.bezierVertex = function(...args) {
+p5.prototype.bezierVertex = function (...args) {
p5._validateParameters('bezierVertex', args);
if (this._renderer.isP3D) {
this._renderer.bezierVertex(...args);
@@ -1210,7 +1210,7 @@ p5.prototype.bezierVertex = function(...args) {
*
*
*/
-p5.prototype.curveVertex = function(...args) {
+p5.prototype.curveVertex = function (...args) {
p5._validateParameters('curveVertex', args);
if (this._renderer.isP3D) {
this._renderer.curveVertex(...args);
@@ -1319,7 +1319,7 @@ p5.prototype.curveVertex = function(...args) {
*
*
*/
-p5.prototype.endContour = function() {
+p5.prototype.endContour = function () {
if (this._renderer.isP3D) {
return this;
}
@@ -1342,7 +1342,7 @@ p5.prototype.endContour = function() {
};
/**
- * Begins adding vertices to a custom shape.
+ * Stops adding vertices to a custom shape.
*
* The beginShape() and `endShape()` functions
* allow for creating custom shapes in 2D or 3D.
@@ -1417,6 +1417,37 @@ p5.prototype.endContour = function() {
*
*
*
+ * function setup() {
+ * createCanvas(200, 100);
+ *
+ * background(240);
+ *
+ * noFill();
+ * stroke(0);
+ *
+ * // Open shape (left)
+ * beginShape();
+ * vertex(20, 20);
+ * vertex(80, 20);
+ * vertex(80, 80);
+ * endShape(); // Not closed
+ *
+ * // Closed shape (right)
+ * beginShape();
+ * vertex(120, 20);
+ * vertex(180, 20);
+ * vertex(180, 80);
+ * endShape(CLOSE); // Closed
+ *
+ * describe(
+ * 'Two right-angled shapes on a light gray background. The left shape is open with three lines. The right shape is closed, forming a triangle.'
+ * );
+ * }
+ *
+ *
+ *
+ *
+ *
* // Note: A "uniform" is a global variable within a shader program.
*
* // Create a string with the vertex shader program.
@@ -1504,7 +1535,7 @@ p5.prototype.endContour = function() {
*
*
*/
-p5.prototype.endShape = function(mode, count = 1) {
+p5.prototype.endShape = function (mode, count = 1) {
p5._validateParameters('endShape', arguments);
if (count < 1) {
console.log('🌸 p5.js says: You can not have less than one instance');
@@ -1807,7 +1838,7 @@ p5.prototype.endShape = function(mode, count = 1) {
* @param {Number} y3
* @param {Number} z3 z-coordinate of the anchor point.
*/
-p5.prototype.quadraticVertex = function(...args) {
+p5.prototype.quadraticVertex = function (...args) {
p5._validateParameters('quadraticVertex', args);
if (this._renderer.isP3D) {
this._renderer.quadraticVertex(...args);
@@ -2034,7 +2065,7 @@ p5.prototype.quadraticVertex = function(...args) {
* @param {Number} [v] v-coordinate of the vertex's texture. Defaults to 0.
* @chainable
*/
-p5.prototype.vertex = function(x, y, moveTo, u, v) {
+p5.prototype.vertex = function (x, y, moveTo, u, v) {
if (this._renderer.isP3D) {
this._renderer.vertex(...arguments);
} else {
@@ -2245,7 +2276,7 @@ p5.prototype.vertex = function(x, y, moveTo, u, v) {
* @param {Number} z z-component of the vertex normal.
* @chainable
*/
-p5.prototype.normal = function(x, y, z) {
+p5.prototype.normal = function (x, y, z) {
this._assert3d('normal');
p5._validateParameters('normal', arguments);
this._renderer.normal(...arguments);
diff --git a/src/core/transform.js b/src/core/transform.js
index 911d074d1a..834ac6ad14 100644
--- a/src/core/transform.js
+++ b/src/core/transform.js
@@ -1181,7 +1181,7 @@ p5.prototype.shearX = function(angle) {
* function draw() {
* background(200);
*
- * // Shear the coordinate system along the x-axis.
+ * // Shear the coordinate system along the y-axis.
* shearY(QUARTER_PI);
*
* // Draw the square.
@@ -1204,7 +1204,7 @@ p5.prototype.shearX = function(angle) {
* function draw() {
* background(200);
*
- * // Shear the coordinate system along the x-axis.
+ * // Shear the coordinate system along the y-axis.
* shearY(45);
*
* // Draw the square.
diff --git a/src/typography/p5.Font.js b/src/typography/p5.Font.js
index 5a555120a0..b4a7269003 100644
--- a/src/typography/p5.Font.js
+++ b/src/typography/p5.Font.js
@@ -362,7 +362,7 @@ p5.Font = class {
x = xOriginal;
let line = lines[i];
- line = line.replace('\t', ' ');
+ line = line.replace(/\t/g, ' ');
const glyphs = this._getGlyphs(line);
for (let j = 0; j < glyphs.length; j++) {
diff --git a/stewards.yml b/stewards.yml
index a4f7502422..6ef4bc5e45 100644
--- a/stewards.yml
+++ b/stewards.yml
@@ -89,3 +89,7 @@ coseeian:
hana-cho:
- i18n:
- ko
+
+marioguzzzman:
+ - i18n:
+ - es
diff --git a/test/manual-test-examples/async/loadJSON_callback/sketch.js b/test/manual-test-examples/async/loadJSON_callback/sketch.js
index 85517d7377..43f663f455 100644
--- a/test/manual-test-examples/async/loadJSON_callback/sketch.js
+++ b/test/manual-test-examples/async/loadJSON_callback/sketch.js
@@ -36,9 +36,8 @@ function getWeather() {
var cityName = userInput.value();
var URL =
- 'http://api.openweathermap.org/data/2.5/weather?q=' +
- cityName +
- '&units=metric';
+ 'https://wttr.in/' + encodeURIComponent(cityName) + '?format=j1';
+
result = loadJSON(URL, displayWeather); // displayWeather is the callback
}
@@ -47,9 +46,9 @@ function displayWeather() {
print(result); // result is ready!
var location = result.name;
- var currentTemp = result.main.temp;
+ var avgTemp = result.weather[0].avgtempC;
text(
- 'Current temperature in ' + location + ' is ' + currentTemp + ' celsius',
+ 'Today\'s average temperature in ' + location + ' is ' + avgTemp + ' celsius',
width / 2,
height / 2
);
diff --git a/test/manual-test-examples/async/loadJSON_options/sketch.js b/test/manual-test-examples/async/loadJSON_options/sketch.js
index c3a154920b..170d3d9026 100644
--- a/test/manual-test-examples/async/loadJSON_options/sketch.js
+++ b/test/manual-test-examples/async/loadJSON_options/sketch.js
@@ -1,7 +1,7 @@
function setup() {
noCanvas();
loadJSON(
- 'http://api.openweathermap.org/data/2.5/station?id=5091',
+ 'https://wttr.in/Berlin?format=j1',
parseStuff,
'json'
);
diff --git a/test/manual-test-examples/async/loadJSON_preload/sketch.js b/test/manual-test-examples/async/loadJSON_preload/sketch.js
index 59871f908a..9d63de2e99 100644
--- a/test/manual-test-examples/async/loadJSON_preload/sketch.js
+++ b/test/manual-test-examples/async/loadJSON_preload/sketch.js
@@ -1,5 +1,5 @@
// In this example, we want to load JSON (a JavaScript Object)
-// from a URL at openweathermap.org, and display it in setup().
+// from a URL at wttr.in, and display it in setup().
//
// Since setup() happens faster than you can load a website, the
// data does not have time to properly load before setup() is done.
@@ -13,7 +13,7 @@ var result;
function preload() {
result = loadJSON(
- 'http://api.openweathermap.org/data/2.5/weather?id=5128581&units=imperial'
+ 'https://wttr.in/Berlin?format=j1'
);
console.log('In preload(), the result has not finished loading: ');
console.log(result);
@@ -29,10 +29,10 @@ function setup() {
console.log('In setup(), here is the result: ');
console.log(result);
- var location = result.name;
- var currentTemp = result.main.temp;
+ var location = result.nearest_area[0].areaName[0].value;
+ var avgTemp = result.weather[0].avgtempC;
text(
- 'Current temperature in ' + location + ' is ' + currentTemp + 'F',
+ 'Today\'s average temperature in ' + location + ' is ' + avgTemp + ' celsius',
width / 2,
height / 2
);
diff --git a/test/manual-test-examples/dom/radio_test/sketch.js b/test/manual-test-examples/dom/radio_test/sketch.js
index 33cbbd6105..9b6c804181 100644
--- a/test/manual-test-examples/dom/radio_test/sketch.js
+++ b/test/manual-test-examples/dom/radio_test/sketch.js
@@ -5,13 +5,13 @@ function setup() {
radio.id('test');
//radio = createSelect(); // for comparison
- // just mucking around
+ // The first is the value; the second is the optional label
radio.option('apple', '1');
radio.option('orange', '2');
radio.option('pear');
// Set what it starts as
- radio.selected('2');
+ radio.selected('orange');
radio.changed(mySelectEvent);
}
@@ -24,7 +24,7 @@ function draw() {
}
function mySelectEvent() {
- var selected = this.selected();
+ var selected = this.selected().value;
console.log(this.value());
if (selected === 'pear') {
console.log("it's a pear!");
diff --git a/test/manual-test-examples/keyboard/keyIsPressed.html b/test/manual-test-examples/keyboard/keyIsPressed.html
index 16a7e3b813..ca51f284cc 100644
--- a/test/manual-test-examples/keyboard/keyIsPressed.html
+++ b/test/manual-test-examples/keyboard/keyIsPressed.html
@@ -6,5 +6,6 @@
+ Press the arrow keys, colors should change.