diff --git a/.all-contributorsrc b/.all-contributorsrc index 55809f85bd..b4200aed76 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -4,7 +4,7 @@ "files": [ "README.md" ], - "imageSize": 120, + "imageSize": 64, "contributorsPerLine": 6, "commit": true, "contributors": [ @@ -1326,7 +1326,8 @@ "profile": "https://aatishb.com", "contributions": [ "doc", - "bug" + "bug", + "example" ] }, { @@ -1391,7 +1392,8 @@ "contributions": [ "bug", "code", - "doc" + "doc", + "example" ] }, { @@ -1400,7 +1402,8 @@ "avatar_url": "https://avatars2.githubusercontent.com/u/9020979?s=460&v=4", "profile": "https://github.com/hydrosquall", "contributions": [ - "doc" + "doc", + "example" ] }, { @@ -1797,16 +1800,6 @@ "example" ] }, - { - "login": "mjaything", - "name": "Minjun Kim", - "avatar_url": "https://avatars1.githubusercontent.com/u/13192500?v=4", - "profile": "https://github.com/mjaything", - "contributions": [ - "bug", - "translation" - ] - }, { "login": "fisherdiede", "name": "Fisher Diede", @@ -1851,7 +1844,8 @@ "avatar_url": "https://avatars1.githubusercontent.com/u/36653440?v=4", "profile": "https://github.com/sm7515", "contributions": [ - "doc" + "doc", + "example" ] }, { @@ -2174,7 +2168,8 @@ "avatar_url": "https://avatars1.githubusercontent.com/u/56646605?v=4", "profile": "https://berkeozgen.me/", "contributions": [ - "bug" + "bug", + "example" ] }, { @@ -2495,7 +2490,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/43292181?v=4", "profile": "https://github.com/suhascv", "contributions": [ - "doc" + "doc", + "example" ] }, { @@ -2555,7 +2551,8 @@ "profile": "http://www.davepagurek.com", "contributions": [ "code", - "test" + "test", + "example" ] }, { @@ -3323,7 +3320,8 @@ "profile": "https://github.com/Malayvasa", "contributions": [ "design", - "code" + "code", + "example" ] }, { @@ -3659,7 +3657,8 @@ "contributions": [ "ideas", "review", - "plugin" + "plugin", + "example" ] }, { @@ -3767,7 +3766,8 @@ "profile": "http://aceslowman.com", "contributions": [ "code", - "doc" + "doc", + "example" ] }, { @@ -3947,7 +3947,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/74553433?v=4", "profile": "https://github.com/Acha0203", "contributions": [ - "code" + "code", + "example" ] }, { @@ -4091,7 +4092,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/92529?v=4", "profile": "http://jareddonovan.com/", "contributions": [ - "code" + "code", + "example" ] }, { @@ -4460,7 +4462,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/22816171?v=4", "profile": "https://github.com/ihsavru", "contributions": [ - "code" + "code", + "example" ] }, { @@ -4523,7 +4526,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/19987520?v=4", "profile": "https://jithinks.netlify.app/", "contributions": [ - "code" + "code", + "example" ] }, { @@ -5330,7 +5334,16 @@ "avatar_url": "https://avatars.githubusercontent.com/u/127239756?v=4", "profile": "https://github.com/perminder-17", "contributions": [ - "code" + "code", + "bug", + "doc", + "example", + "ideas", + "plugin", + "projectManagement", + "promotion", + "question", + "research" ] }, { @@ -6075,10 +6088,10 @@ ] }, { - "login": "Evorage0", - "name": "Evorage", + "login": "bensgilbert", + "name": "Ben Gilbert", "avatar_url": "https://avatars.githubusercontent.com/u/68397475?v=4", - "profile": "https://github.com/Evorage0", + "profile": "http://bensgilbert.com", "contributions": [ "bug", "code" @@ -6210,7 +6223,8 @@ "avatar_url": "https://avatars.githubusercontent.com/u/7389189?v=4", "profile": "https://github.com/AaratiAkkapeddi", "contributions": [ - "code" + "code", + "ideas" ] }, { @@ -6445,6 +6459,575 @@ "code", "doc" ] + }, + { + "login": "philyawj", + "name": "Jordan Philyaw", + "avatar_url": "https://avatars.githubusercontent.com/u/37485853?v=4", + "profile": "http://jordanphilyaw.com", + "contributions": [ + "doc" + ] + }, + { + "login": "thrly", + "name": "oliver thurley", + "avatar_url": "https://avatars.githubusercontent.com/u/22343302?v=4", + "profile": "http://oliverthurley.co.uk", + "contributions": [ + "doc", + "code" + ] + }, + { + "login": "lirenjie95", + "name": "Renjie Li", + "avatar_url": "https://avatars.githubusercontent.com/u/17038472?v=4", + "profile": "https://github.com/lirenjie95", + "contributions": [ + "doc", + "code" + ] + }, + { + "login": "Vaivaswat2244", + "name": "Vaivaswat Dubey", + "avatar_url": "https://avatars.githubusercontent.com/u/113991324?v=4", + "profile": "https://github.com/Vaivaswat2244", + "contributions": [ + "code" + ] + }, + { + "login": "xinemata", + "name": "Xin Xin", + "avatar_url": "https://avatars.githubusercontent.com/u/9159424?v=4", + "profile": "https://github.com/xinemata", + "contributions": [ + "eventOrganizing", + "tutorial", + "talk", + "mentoring", + "ideas" + ] + }, + { + "login": "akkarn1689", + "name": "Ashish Karn", + "avatar_url": "https://avatars.githubusercontent.com/u/82334486?v=4", + "profile": "https://karn-ashish-16.onrender.com/", + "contributions": [ + "code" + ] + }, + { + "login": "dkessner", + "name": "Darren Kessner", + "avatar_url": "https://avatars.githubusercontent.com/u/1002034?v=4", + "profile": "https://dkessner.github.io/", + "contributions": [ + "example" + ] + }, + { + "login": "AnimeshSinha1309", + "name": "Animesh Sinha", + "avatar_url": "https://avatars.githubusercontent.com/u/9739218?v=4", + "profile": "http://www.facebook.com/AnimeshSinha1309", + "contributions": [ + "example" + ] + }, + { + "login": "katlich112358", + "name": "Kathryn Lichlyter", + "avatar_url": "https://avatars.githubusercontent.com/u/59926191?v=4", + "profile": "https://github.com/katlich112358", + "contributions": [ + "example" + ] + }, + { + "login": "geealbers", + "name": "Greg Albers", + "avatar_url": "https://avatars.githubusercontent.com/u/7796401?v=4", + "profile": "https://geealbers.net/", + "contributions": [ + "example" + ] + }, + { + "login": "macarena", + "name": "Marco Macarena", + "avatar_url": "https://avatars.githubusercontent.com/u/79822?v=4", + "profile": "http://macarena.pro.br", + "contributions": [ + "example" + ] + }, + { + "login": "khamiltonuk", + "name": "Kristian Hamilton", + "avatar_url": "https://avatars.githubusercontent.com/u/4013283?v=4", + "profile": "http://www.khamilton.co.uk", + "contributions": [ + "example" + ] + }, + { + "login": "keshavg2", + "name": "Keshav Gupta", + "avatar_url": "https://avatars.githubusercontent.com/u/34001173?v=4", + "profile": "https://keshav-portfolio-resume.netlify.app/", + "contributions": [ + "example" + ] + }, + { + "login": "riteshsp2000", + "name": "Ritesh Patil", + "avatar_url": "https://avatars.githubusercontent.com/u/56112399?v=4", + "profile": "http://riteshpatil.com", + "contributions": [ + "example" + ] + }, + { + "login": "gabrielsroka", + "name": "Gabriel Sroka", + "avatar_url": "https://avatars.githubusercontent.com/u/14354736?v=4", + "profile": "https://gabrielsroka.github.io", + "contributions": [ + "example" + ] + }, + { + "login": "kcconch", + "name": "Casey Conchinha", + "avatar_url": "https://avatars.githubusercontent.com/u/26172283?v=4", + "profile": "http://kccon.ch", + "contributions": [ + "example" + ] + }, + { + "login": "davidblitz", + "name": "davidblitz", + "avatar_url": "https://avatars.githubusercontent.com/u/13055497?v=4", + "profile": "https://github.com/davidblitz", + "contributions": [ + "example" + ] + }, + { + "login": "crh82", + "name": "crh82", + "avatar_url": "https://avatars.githubusercontent.com/u/103348212?v=4", + "profile": "https://github.com/crh82", + "contributions": [ + "example" + ] + }, + { + "login": "", + "name": "Aaron Welles", + "avatar_url": "https://hello-assets.p5js.org/placeholder_avatar.png", + "profile": "", + "contributions": [ + "example" + ] + }, + { + "login": "seyko1", + "name": "Seyko", + "avatar_url": "https://avatars.githubusercontent.com/u/26870879?v=4", + "profile": "https://github.com/seyko1", + "contributions": [ + "code" + ] + }, + { + "login": "thekinardist", + "name": "Xevi H. Aqeel", + "avatar_url": "https://avatars.githubusercontent.com/u/21345916?v=4", + "profile": "http://kinardist.media", + "contributions": [ + "example", + "design" + ] + }, + { + "login": "GregStanton", + "name": "Greg Stanton", + "avatar_url": "https://avatars.githubusercontent.com/u/51820777?v=4", + "profile": "https://www.youtube.com/c/HigherMathNotes", + "contributions": [ + "bug", + "code", + "doc", + "example", + "ideas", + "plugin", + "projectManagement", + "promotion", + "question", + "research" + ] + }, + { + "login": "bojidar-bg", + "name": "Bojidar Marinov", + "avatar_url": "https://avatars.githubusercontent.com/u/5276727?v=4", + "profile": "https://bojidar-bg.dev/", + "contributions": [ + "code", + "test" + ] + }, + { + "login": "ChloeYanYan", + "name": "Chloe Yan", + "avatar_url": "https://avatars.githubusercontent.com/u/181019103?v=4", + "profile": "https://github.com/ChloeYanYan", + "contributions": [ + "doc" + ] + }, + { + "login": "webermayank", + "name": "Mayank Verma", + "avatar_url": "https://avatars.githubusercontent.com/u/111176033?v=4", + "profile": "https://github.com/webermayank", + "contributions": [ + "code" + ] + }, + { + "login": "lab-mediaArts", + "name": "Lauren Berrios", + "avatar_url": "https://avatars.githubusercontent.com/u/179049131?v=4", + "profile": "https://github.com/lab-mediaArts", + "contributions": [ + "ideas" + ] + }, + { + "login": "roxi09", + "name": "roxi09", + "avatar_url": "https://avatars.githubusercontent.com/u/175943104?v=4", + "profile": "https://github.com/Roxi09", + "contributions": [ + "ideas" + ] + }, + { + "login": "jlliu", + "name": "Jackie Liu", + "avatar_url": "https://avatars.githubusercontent.com/u/8304517?v=4", + "profile": "https://github.com/jlliu", + "contributions": [ + "ideas" + ] + }, + { + "login": "re7l", + "name": "Carrie Wang", + "avatar_url": "https://avatars.githubusercontent.com/u/19353655?v=4", + "profile": "https://github.com/re7l", + "contributions": [ + "ideas" + ] + }, + { + "login": "himanshuukholiya", + "name": "Himanshu Kholiya", + "avatar_url": "https://avatars.githubusercontent.com/u/128818464?v=4", + "profile": "https://github.com/himanshuukholiya", + "contributions": [ + "code" + ] + }, + { + "login": "mclark414", + "name": "mclark414", + "avatar_url": "https://avatars.githubusercontent.com/u/26391144?v=4", + "profile": "https://github.com/mclark414", + "contributions": [ + "ideas" + ] + }, + { + "login": "mxramsey", + "name": "Mx. Ramsey", + "avatar_url": "https://avatars.githubusercontent.com/u/161327383?v=4", + "profile": "https://github.com/mxramsey", + "contributions": [ + "ideas" + ] + }, + { + "login": "franolichdesign", + "name": "Franolich Design", + "avatar_url": "https://avatars.githubusercontent.com/u/74784668?v=4", + "profile": "https://github.com/franolichdesign", + "contributions": [ + "bug", + "code" + ] + }, + { + "login": "HritvikBhatia", + "name": "Vik", + "avatar_url": "https://avatars.githubusercontent.com/u/149999573?v=4", + "profile": "https://github.com/HritvikBhatia", + "contributions": [ + "code", + "bug", + "translation" + ] + }, + { + "login": "Darrenhqf", + "name": "Qingfeng Huang", + "avatar_url": "https://avatars.githubusercontent.com/u/92257843?v=4", + "profile": "https://git.arts.ac.uk/pages/21034426/My_Portfolio_Website/", + "contributions": [ + "translation" + ] + }, + { + "login": "HughJacks", + "name": "HughJacks", + "avatar_url": "https://avatars.githubusercontent.com/u/102194905?v=4", + "profile": "https://github.com/HughJacks", + "contributions": [ + "code" + ] + }, + { + "login": "jackeddielove", + "name": "Jack L", + "avatar_url": "https://avatars.githubusercontent.com/u/130420780?v=4", + "profile": "http://jackeddielove.github.io", + "contributions": [ + "bug", + "doc" + ] + }, + { + "login": "clairep94", + "name": "Claire Peng", + "avatar_url": "https://avatars.githubusercontent.com/u/128436909?v=4", + "profile": "https://github.com/clairep94", + "contributions": [ + "code", + "bug" + ] + }, + { + "login": "IIITM-Jay", + "name": "Jay Dev Jha", + "avatar_url": "https://avatars.githubusercontent.com/u/65283880?v=4", + "profile": "https://github.com/IIITM-Jay", + "contributions": [ + "code" + ] + }, + { + "login": "yugalkaushik", + "name": "Yugal Kaushik", + "avatar_url": "https://avatars.githubusercontent.com/u/138966980?v=4", + "profile": "https://yugalkaushik.vercel.app", + "contributions": [ + "code", + "doc" + ] + }, + { + "login": "LalitNarayanYadav", + "name": "Lalit Narayan Yadav", + "avatar_url": "https://avatars.githubusercontent.com/u/162928571?v=4", + "profile": "https://github.com/LalitNarayanYadav", + "contributions": [ + "doc", + "code" + ] + }, + { + "login": "irina-wang", + "name": "Irina Mengqi Wang", + "avatar_url": "https://avatars.githubusercontent.com/u/59970384?v=4", + "profile": "https://github.com/irina-wang", + "contributions": [ + "example" + ] + }, + { + "login": "jennybkowalski", + "name": "Jenny Biette Kowalski", + "avatar_url": "https://avatars.githubusercontent.com/u/11235412?v=4", + "profile": "http://jennybkowalski.com", + "contributions": [ + "ideas" + ] + }, + { + "login": "Wlaith", + "name": "Laith Alwazani", + "avatar_url": "https://avatars.githubusercontent.com/u/98265005?v=4", + "profile": "https://github.com/wlaith", + "contributions": [ + "ideas" + ] + }, + { + "login": "jep-a", + "name": "jep", + "avatar_url": "https://avatars.githubusercontent.com/u/20326207?v=4", + "profile": "https://github.com/jep-a", + "contributions": [ + "ideas" + ] + }, + { + "login": "dpanshug", + "name": "Dipanshu Gupta", + "avatar_url": "https://avatars.githubusercontent.com/u/97534722?v=4", + "profile": "https://github.com/dpanshug", + "contributions": [ + "doc" + ] + }, + { + "login": "sukrucildirr", + "name": "sukrucildirr", + "avatar_url": "https://avatars.githubusercontent.com/u/32969880?v=4", + "profile": "https://github.com/sukrucildirr", + "contributions": [ + "doc" + ] + }, + { + "login": "andrewmcwhae", + "name": "Andrew McWhae", + "avatar_url": "https://avatars.githubusercontent.com/u/8450380?v=4", + "profile": "https://linktr.ee/andrewmcwhae", + "contributions": [ + "doc" + ] + }, + { + "login": "atmajaa", + "name": "Atmaja P.", + "avatar_url": "https://avatars.githubusercontent.com/u/69838867?v=4", + "profile": "https://github.com/atmajaa", + "contributions": [ + "doc" + ] + }, + { + "login": "SonyaCode", + "name": "SonyaCode", + "avatar_url": "https://avatars.githubusercontent.com/u/99513449?v=4", + "profile": "https://github.com/SonyaCode", + "contributions": [ + "a11y", + "blog", + "bug", + "code", + "design", + "doc" + ] + }, + { + "login": "vtjl10", + "name": "fuder.eth", + "avatar_url": "https://avatars.githubusercontent.com/u/139509124?v=4", + "profile": "https://github.com/vtjl10", + "contributions": [ + "doc" + ] + }, + { + "login": "FerrinThreatt", + "name": "FerrinThreatt", + "avatar_url": "https://avatars.githubusercontent.com/u/51208056?v=4", + "profile": "https://github.com/FerrinThreatt", + "contributions": [ + "doc" + ] + }, + { + "login": "leopardracer", + "name": "leopardracer", + "avatar_url": "https://avatars.githubusercontent.com/u/136604165?v=4", + "profile": "https://github.com/leopardracer", + "contributions": [ + "doc" + ] + }, + { + "login": "kilavvy", + "name": "kilavvy", + "avatar_url": "https://avatars.githubusercontent.com/u/140459108?v=4", + "profile": "https://github.com/kilavvy", + "contributions": [ + "doc" + ] + }, + { + "login": "shivasankaran18", + "name": "Shiva", + "avatar_url": "https://avatars.githubusercontent.com/u/148421597?v=4", + "profile": "https://github.com/shivasankaran18", + "contributions": [ + "doc" + ] + }, + { + "login": "madhav2348", + "name": "Madhav Majumdar", + "avatar_url": "https://avatars.githubusercontent.com/u/161720210?v=4", + "profile": "https://github.com/madhav2348", + "contributions": [ + "code" + ] + }, + { + "login": "nking07049925", + "name": "Nikita Korol", + "avatar_url": "https://avatars.githubusercontent.com/u/11886663?v=4", + "profile": "https://github.com/nking07049925", + "contributions": [ + "code" + ] + }, + { + "login": "mudit06mah", + "name": "Mudit Maheshwari", + "avatar_url": "https://avatars.githubusercontent.com/u/140621191?v=4", + "profile": "https://leetcode.com/u/mudit_mah/", + "contributions": [ + "doc" + ] + }, + { + "login": "acgillette", + "name": "AC", + "avatar_url": "https://avatars.githubusercontent.com/u/18038450?v=4", + "profile": "http://acgillette.net", + "contributions": [ + "code" + ] + }, + { + "login": "shawdm", + "name": "Darren Shaw", + "avatar_url": "https://avatars.githubusercontent.com/u/157414?v=4", + "profile": "https://darrenshaw.org", + "contributions": [ + "doc" + ] } ], "repoType": "github", diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 0779271c57..0000000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -src/core/reference.js diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 06589c1db7..0000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "env": { - "node": true, - "browser": true, - "amd": true, - "es6": true - }, - "globals": { - "p5": true - }, - "root": true, - "extends": ["eslint:recommended"], - "parserOptions": { - "ecmaVersion": 2017, - "sourceType": "module" - }, - "rules": { - "no-cond-assign": [2, "except-parens"], - "eqeqeq": ["error", "smart"], - "no-use-before-define": [ - 2, - { - "functions": false - } - ], - "new-cap": 0, - "no-caller": 2, - "no-undef": 0, - "no-unused-vars": ["error", { "args": "none" }], - "no-empty": ["error", { "allowEmptyCatch": true }], - "no-console": "off", - "max-len": ["error", { - "code": 80, - "ignoreComments": true, - "ignoreStrings": true, - "ignoreTemplateLiterals": true, - "ignoreRegExpLiterals": true - }], - "indent": ["error", 2, { - "SwitchCase": 1 - }], - "semi": ["error", "always"], - "quotes": ["error", "single", { - "avoidEscape": true - }], - "comma-dangle": ["error", "never"], - "object-curly-spacing": ["error", "always"], - "arrow-parens": ["error", "as-needed"], - "linebreak-style": ["error", "unix"], - "no-trailing-spaces": ["error"], - "no-prototype-builtins": "off", - "no-async-promise-executor": "off" - } -} diff --git a/.github/config.yml b/.github/config.yml index c4629c14ed..7a92f38473 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -4,12 +4,26 @@ # Comment to be posted to on first time issues newIssueWelcomeComment: > - Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you! -# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome + Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. + + For guidance on contributing, check out our [contributing guidelines](https://github.com/processing/p5.js/blob/main/CONTRIBUTING.md) and other [resources for contributors](https://p5js.org/contribute/). + + 💬 If you have questions or need support, feel free to join the [Processing Foundation Forum](https://discourse.processing.org/) or visit our [Community page](https://p5js.org/community/). + 📜 Please also review our [Code of Conduct](https://p5js.org/code-of-conduct/) to understand our community standards. + + Thank You! +# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome # Comment to be posted to on PRs from first time contributors in your repository newPRWelcomeComment: > - 🎉 Thanks for opening this pull request! Please check out our [contributing guidelines](https://github.com/processing/p5.js/blob/main/CONTRIBUTING.md) if you haven't already. And be sure to add yourself to the [list of contributors on the readme page](https://github.com/processing/p5.js#contributors)! + 🎉 Thanks for opening this pull request! For guidance on contributing, check out our [contributor guidelines](https://p5js.org/contribute/contributor_guidelines/) and other [resources for contributors](https://p5js.org/contribute)! + + 🤔 Please ensure that your PR links to an issue, which has been approved for work by a maintainer; otherwise, there might already be someone working on it, or still ongoing discussion about implementation. You are welcome to join the discussion in an Issue if you're not sure! + + 🌸 Once your PR is merged, be sure to [add yourself](https://github.com/processing/p5.js/issues/2309) to the [list of contributors on the readme page](https://github.com/processing/p5.js#contributors) ! + + + Thank You! # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge diff --git a/.github/workflows/auto-close-issues.yml b/.github/workflows/auto-close-issues.yml new file mode 100644 index 0000000000..a2b3310aae --- /dev/null +++ b/.github/workflows/auto-close-issues.yml @@ -0,0 +1,18 @@ +name: Close Linked Issues on PR Merge + +on: + pull_request: + types: [closed] + branches: + - 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/ci-test.yml b/.github/workflows/ci-test.yml index ebf61a1d3f..bd3ca55ba0 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - dev-2.0 pull_request: branches: - '*' diff --git a/.github/workflows/release-workflow-v2.yml b/.github/workflows/release-workflow-v2.yml new file mode 100644 index 0000000000..1f488bbe1b --- /dev/null +++ b/.github/workflows/release-workflow-v2.yml @@ -0,0 +1,115 @@ +name: New p5.js 2.x release +# Requires secrets `NPM_TOKEN` and `ACCESS_TOKEN` to be set + +permissions: + contents: write + +on: + push: + tags: + - 'v2.*.*' # Push events to matching v*.*.*, i.e. v20.15.10 + - 'v2.*.*-*' # Push events to matching v*.*.*-*, i.e. v20.15.10-0 + +jobs: + release: + runs-on: ubuntu-latest + name: Release + env: + INPUT_TOKEN: ${{ secrets.NPM_TOKEN }} + steps: + # 1. Setup + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + - name: Get semver info + id: semver + uses: akshens/semver-tag@v4 + with: + version: ${{ github.ref_name }} + + - name: Get version number + id: version-number + run: | + version=$(echo ${{ github.ref_name }} | cut -c 2-) + echo "version=$version" >> $GITHUB_OUTPUT + + - name: Get current date + id: date + run: echo "date=$(date +"%B %Oe, %Y")" >> $GITHUB_OUTPUT + - name: Install dependencies + run: npm ci + env: + CI: true + - name: Run test + run: npm test + env: + CI: true + - name: Run build + run: npm run build + - name: Generate types + run: npm run generate-types + + # 2. Prepare release files + - run: mkdir release && mkdir p5 && cp -r ./lib/* p5/ + - name: Create release zip file + uses: TheDoctor0/zip-release@0.6.2 + with: + type: zip + filename: release/p5.zip + path: ./p5/* + + - name: Copy release files + run: cp lib/p5.js lib/p5.min.js lib/p5.esm.js release/ + + # 3. Release p5.js + - name: Create GitHub release + uses: softprops/action-gh-release@v0.1.15 + with: + draft: true + prerelease: ${{ steps.semver.outputs.is-prerelease == 'true' }} + files: release/* + generate_release_notes: true + token: ${{ secrets.ACCESS_TOKEN }} + - name: Publish to NPM + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + tag: ${{ steps.semver.outputs.is-prerelease != 'true' && 'latest' || 'beta' }} + + # 4. Update p5.js website + - name: Clone p5.js website + if: ${{ steps.semver.outputs.is-prerelease != 'true' }} + uses: actions/checkout@v3 + with: + repository: processing/p5.js-website + ref: '2.0' + path: website + fetch-depth: 0 + token: ${{ secrets.ACCESS_TOKEN }} + - name: Updated website files + if: ${{ steps.semver.outputs.is-prerelease != 'true' }} + run: | + cd website + npm install + npm run build:p5-version + npm run build:contributor-docs + npm run build:contributors + npm run build:reference + npm run build:search + - name: Commit updated website files + if: ${{ steps.semver.outputs.is-prerelease != 'true' }} + run: | + cd website + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add . + git commit -m "Update p5.js to ${{ github.ref_name }}" + - name: Push updated website repo + if: ${{ steps.semver.outputs.is-prerelease != 'true' }} + uses: ad-m/github-push-action@v0.6.0 + with: + github_token: ${{ secrets.ACCESS_TOKEN }} + branch: '2.0' + directory: website/ + repository: processing/p5.js-website diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index 2a3ca4e40d..6c68dd09ff 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -7,8 +7,8 @@ permissions: on: push: tags: - - 'v*.*.*' # Push events to matching v*.*.*, i.e. v20.15.10 - - 'v*.*.*-*' # Push events to matching v*.*.*-*, i.e. v20.15.10-0 + - 'v1.*.*' # Push events to matching v*.*.*, i.e. v20.15.10 + - 'v1.*.*-*' # Push events to matching v*.*.*-*, i.e. v20.15.10-0 jobs: release: @@ -41,11 +41,12 @@ jobs: run: npm ci env: CI: true - - name: Run build + - name: Run test run: npm test env: CI: true - - run: rm ./lib/p5-test.js ./lib/p5.pre-min.js + - name: Run build + run: npm run build # 2. Prepare release files - run: mkdir release && mkdir p5 && cp -r ./lib/* p5/ @@ -88,11 +89,11 @@ jobs: run: | cd website npm install + npm run build:p5-version npm run build:contributor-docs npm run build:contributors npm run build:reference npm run build:search - npm run build:p5-version - name: Commit updated website files if: ${{ steps.semver.outputs.is-prerelease != 'true' }} run: | diff --git a/.gitignore b/.gitignore index 88d97958df..1d75671721 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,31 @@ -*.DS_Store -.project -node_modules/* -experiments/* -lib_old/* -lib/p5.* -lib/modules -docs/reference/* -!*.gitkeep -examples/3d/ -.idea -dist/ -p5.zip -bower-repo/ -p5-website/ -.vscode/settings.json -.nyc_output/* -coverage/ -lib/p5-test.js -release/ -parameterData.json -yarn.lock \ No newline at end of file +!*.gitkeep + +.nyc_output/* +# .vscode/settings.json +node_modules/* + +analyzer/ +bower-repo/ +coverage/ +examples/3d/ +experiments/* +dist/ +docs/reference/* +docs/data.json +lib_old/* +lib/p5.* +lib/p5-test.js +lib/modules +p5-website/ +preview/ +release/ +__screenshots__/ + +*.d.ts +p5.zip +yarn.lock +todo.md + +*.DS_Store +.idea +.project \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..fdf39476cc --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,13 @@ +{ + "prettier.enable": false, + "eslint.enable": true, + "eslint.validate": [ + { "language": "html", "autoFix": false }, + { "language": "javascript", "autoFix": false }, + { "language": "markdown", "autoFix": false }, + ], + "editor.defaultFormatter": null, + "editor.formatOnSave": false, + "editor.codeActionsOnSave": {}, + "javascript.format.enable": false +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6768f8d3cf..3b4567712f 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,5 +1,5 @@ -## [p5.js community statement](http://p5js.org/community/) +## [p5.js community statement](https://p5js.org/community/) p5.js is a community interested in exploring the creation of art and design with technology. diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index b7c30d3f0b..0000000000 --- a/Gruntfile.js +++ /dev/null @@ -1,345 +0,0 @@ -// these requires allow us to use es6 features such as -// `import`/`export` and `async`/`await` in the Grunt tasks -// we load from other files (`tasks/`) -require('regenerator-runtime/runtime'); -require('@babel/register'); - -module.exports = grunt => { - const connectConfig = open => { - return { - options: { - directory: { - path: './', - options: { - icons: true - } - }, - port: 9001, - open, - middleware: function(connect, options, middlewares) { - middlewares.unshift( - require('connect-modrewrite')([ - '^/assets/js/p5(\\.min)?\\.js(.*) /lib/p5$1.js$2 [L]', - '^/assets/js/p5\\.(sound)(\\.min)?\\.js(.*) /lib/addons/p5.$1$2.js$3 [L]' - ]), - function(req, res, next) { - res.setHeader('Access-Control-Allow-Origin', '*'); - res.setHeader('Access-Control-Allow-Methods', '*'); - return next(); - } - ); - return middlewares; - } - } - }; - }; - - const gruntConfig = { - // read in the package, used for knowing the current version, et al. - pkg: grunt.file.readJSON('package.json'), - - // Configure style consistency checking for this file, the source, and the tests. - eslint: { - options: { - format: 'unix' - }, - build: { - src: [ - 'Gruntfile.js', - 'docs/preprocessor.js', - 'utils/**/*.js', - 'tasks/**/*.js' - ] - }, - source: { - src: ['src/**/*.js'] - }, - test: { - src: ['test/**/*.js', '!test/js/*.js'] - }, - fix: { - // src: is calculated below... - options: { - rules: { - 'no-undef': 0, - 'no-unused-vars': 0 - }, - fix: true - } - } - }, - - 'eslint-samples': { - options: { - parserOptions: { - ecmaVersion: 8 - }, - format: 'unix' - }, - source: { - src: ['src/**/*.js'] - }, - fix: { - options: { - fix: true - } - } - }, - - // Set up the watch task, used for live-reloading during development. - // This watches both the codebase and the yuidoc theme. Changing the - // code touches files within the theme, so it will also recompile the - // documentation. - watch: { - quick: { - files: [ - 'src/**/*.js', - 'src/**/*.frag', - 'src/**/*.vert', - 'src/**/*.glsl' - ], - tasks: ['browserify:dev'], - options: { - livereload: true - } - }, - // Watch the codebase for changes - main: { - files: ['src/**/*.js'], - tasks: ['newer:eslint:source', 'test'], - options: { - livereload: true - } - }, - // watch the theme for changes - reference_build: { - files: ['docs/yuidoc-p5-theme/**/*'], - tasks: ['yuidoc'], - options: { - livereload: true, - interrupt: true - } - }, - // Watch the codebase for doc updates - // launch with 'grunt yui connect:yui watch:yui' - yui: { - files: [ - 'src/**/*.js', - 'lib/addons/*.js', - 'src/**/*.frag', - 'src/**/*.vert', - 'src/**/*.glsl' - ], - tasks: [ - 'browserify', - 'browserify:min', - 'yuidoc:prod', - 'clean:reference', - 'minjson', - 'uglify' - ], - options: { - livereload: true - } - } - }, - - // Set up node-side (non-browser) mocha tests. - mochaTest: { - test: { - src: ['test/node/**/*.js'], - options: { - reporter: 'spec', - require: '@babel/register', - ui: 'tdd' - } - } - }, - - // Set up the mocha task, used for running the automated tests. - mochaChrome: { - yui: { - options: { - urls: ['http://localhost:9001/test/test-reference.html'] - } - }, - test: { - options: { - urls: [ - 'http://localhost:9001/test/test.html', - 'http://localhost:9001/test/test-minified.html' - ] - } - } - }, - - nyc: { - report: { - options: { - reporter: ['text-summary', 'html', 'json'] - } - } - }, - babel: { - options: { - presets: ['@babel/preset-env'] - }, - dist: { - files: { - 'lib/p5.pre-min.js': 'lib/p5.js' - } - } - }, - - // This minifies the javascript into a single file and adds a banner to the - // front of the file. - uglify: { - options: { - compress: { - global_defs: { - IS_MINIFIED: true - } - }, - banner: - '/*! p5.js v<%= pkg.version %> <%= grunt.template.today("mmmm dd, yyyy") %> */ ' - }, - dist: { - files: { - 'lib/p5.min.js': ['lib/p5.pre-min.js'], - 'lib/modules/p5Custom.min.js': ['lib/modules/p5Custom.pre-min.js'] - } - } - }, - - // this builds the documentation for the codebase. - yuidoc: { - prod: { - name: '<%= pkg.name %>', - description: '<%= pkg.description %>', - version: '<%= pkg.version %>', - url: '<%= pkg.homepage %>', - options: { - paths: ['src/', 'lib/addons/'], - themedir: 'docs/yuidoc-p5-theme/', - helpers: ['docs/yuidoc-p5-theme/helpers/helpers_prod.js'], - preprocessor: './docs/preprocessor.js', - outdir: 'docs/reference/' - } - } - }, - - clean: { - // Clean up unused files generated by yuidoc - reference: { - src: [ - 'docs/reference/classes/', - 'docs/reference/elements/', - 'docs/reference/files/', - 'docs/reference/modules/', - 'docs/reference/api.js' - ] - } - }, - - // This is a static server which is used when testing connectivity for the - // p5 library. This avoids needing an internet connection to run the tests. - // It serves all the files in the test directory at http://localhost:9001/ - connect: { - server: connectConfig(), - yui: connectConfig('http://127.0.0.1:9001/docs/reference/') - }, - - // This minifies the data.json file created from the inline reference - minjson: { - compile: { - files: { - './docs/reference/data.min.json': './docs/reference/data.json' - } - } - } - }; - - // eslint fixes everything it checks: - gruntConfig.eslint.fix.src = Object.keys(gruntConfig.eslint).reduce( - (acc, key) => { - if (gruntConfig.eslint[key].src) { - acc.push(...gruntConfig.eslint[key].src); - } - return acc; - }, - [] - ); - - /* not yet - gruntConfig['eslint-samples'].fix.src = Object.keys( - gruntConfig['eslint-samples'] - ) - .map(s => gruntConfig['eslint-samples'][s].src) - .reduce((a, b) => a.concat(b), []) - .filter(a => a); - */ - - grunt.initConfig(gruntConfig); - - // Load build tasks. - // This contains the complete build task ("browserify") - // and the task to generate user select modules of p5 - // ("combineModules") which can be invoked directly by - // `grunt combineModules:module_1:module_2` where core - // is included by default in all combinations always. - // NOTE: "module_x" is the name of it's folder in /src. - grunt.loadTasks('tasks/build'); - - // Load tasks for testing - grunt.loadTasks('tasks/test'); - - // Load the external libraries used. - grunt.loadNpmTasks('grunt-contrib-connect'); - grunt.loadNpmTasks('grunt-eslint'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-contrib-yuidoc'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-minjson'); - grunt.loadNpmTasks('grunt-mocha-test'); - grunt.loadNpmTasks('grunt-newer'); - grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-simple-nyc'); - - // Create the multitasks. - grunt.registerTask('build', [ - 'yui', - 'browserify', - 'browserify:min', - 'uglify', - 'browserify:test' - ]); - grunt.registerTask('lint', ['lint:source', 'lint:samples']); - grunt.registerTask('lint:source', [ - 'eslint:build', - 'eslint:source', - 'eslint:test' - ]); - grunt.registerTask('lint:samples', [ - 'yui', // required for eslint-samples - 'eslint-samples:source' - ]); - grunt.registerTask('lint-fix', ['eslint:fix']); - grunt.registerTask('test', [ - 'build', - 'connect:server', - 'mochaChrome', - 'mochaTest', - 'nyc:report' - ]); - grunt.registerTask('test:nobuild', [ - 'eslint:test', - 'connect:server', - 'mochaChrome', - 'mochaTest', - 'nyc:report' - ]); - grunt.registerTask('yui', ['yuidoc:prod', 'clean:reference', 'minjson']); - grunt.registerTask('yui:test', ['yui', 'connect:yui', 'mochaChrome:yui']); - grunt.registerTask('yui:dev', ['yui', 'build', 'connect:yui', 'watch:yui']); - grunt.registerTask('default', ['lint', 'test']); -}; diff --git a/README.md b/README.md index 19505fbabc..8317bb0b98 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,15 @@ The p5.js community shares an interest in exploring the creation of art and desi Learn more about [our community](https://p5js.org/community/) and read our community statement and [code of conduct](https://github.com/processing/p5.js/blob/main/CODE_OF_CONDUCT.md). You can directly support our work with p5.js by donating to [the Processing Foundation](https://processingfoundation.org/support). +## 🌼 p5.js 2.0 Now Available for Community Testing & Development! + +We are releasing p5.js 2.0 to the community for testing and development! Here’s what you need to know. + +* For **reference**: p5.js 1.x reference will stay on [https://p5js.org/](https://p5js.org/), and p5.js 2.x documentation will be on [https://beta.p5js.org/](https://beta.p5js.org/) +* In the p5.js Editor: the **default will continue to be 1.x** until at least August 2026 - more information and discussion on timeline can be found on [this Discourse thread](https://discourse.processing.org/t/dev-updates-p5-js-2-0-you-are-here/46130) or [this GitHub thread](https://github.com/processing/p5.js/issues/7488) +* For updating sketches and add-on libraries: check out [the compatibility add-on libraries and guides](https://github.com/processing/p5.js-compatibility) +* For **contribution**: `npm latest` will default to 2.x, but the git branches are still separated with `main` on 1.x and `dev-2.0` on 2.x. We will switch the branches when we have updated all automations (including deploying updated documentation to the website). Want to contribute ideas or implementation? Check the [2.x project board](https://github.com/orgs/processing/projects/21/views/8) for an overview of what still needs discussion, and what’s ready for work! + ## Issues If you have found a bug in the p5.js library or want to request new features, feel free to file an issue! See our [contributor guidelines](https://p5js.org/contribute/contributor_guidelines) for a full reference of our contribution process. A set of templates for reporting issues and requesting features are provided to assist you (and us!). Different parts of p5.js are in different repositories. You can open an issue on each of them through these links: @@ -54,14 +63,12 @@ If you have found a bug in the p5.js library or want to request new features, fe p5.js is maintained mostly by volunteers, so we thank you for your patience as we try to address your issues as soon as we can. - ## Get Started for Contributors p5.js is a collaborative project with many contributors, mostly volunteers, and you are invited to help. All types of involvement are welcome. See the [contribute](https://p5js.org/contribute) for more in-depth details about contributing to different areas of the project, including code, bug fixes, documentation, discussion, and more. A quick Getting Started with the Build and setting up the repository could be found [here](https://p5js.org/contribute/contributor_guidelines/#quick-get-started-for-developers). - ## Stewards Stewards are contributors who are particularly involved, familiar, or responsive to certain areas of the project. Their role is to help provide context and guidance to others working on p5.js. If you have a question about contributing to a particular area, you can tag the listed steward in an issue or pull request. They may also weigh in on feature requests and guide the overall direction of their area, with the input of the community. You can read more about the organization of the project in our p5.js [Contributor Guidelines](https://p5js.org/contribute/contributor_guidelines) and p5.js [Steward Guidelines](https://p5js.org/contribute/steward_guidelines). @@ -75,35 +82,37 @@ Current Lead/Mentor * [@limzykenneth](https://github.com/limzykenneth) - p5.js Mentor,2023-present Lead/Mentor Alumni -* [@lmccart](https://github.com/lmccart)- p5.js Creator -* [@qianqianye](https://github.com/qianqianye) - p5.js Lead,2021-2024 +* [@lmccart](https://github.com/lmccart) - p5.js Creator +* [@qianqianye](https://github.com/qianqianye) - p5.js Lead,2021-present (on leave) * [@outofambit](https://github.com/outofambit) - p5.js Co-Lead 2021-22, Mentor 2022-2023 * [@mcturner1995](https://github.com/mcturner1995) - p5.js Lead 2020 - -| Area | Steward(s) | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| Overall | [@ksen0](https://github.com/ksen0) | -| [Accessibility](https://github.com/processing/p5.js/tree/main/src/accessibility) | [@calebfoss](https://github.com/calebfoss), [@cosmicbhejafry](https://github.com/cosmicbhejafry), [@apoorva-a98](https://github.com/apoorva-a98), [@tedkmburu](https://github.com/tedkmburu), [@Zarkv](https://github.com/Zarkv), [@SkylerW99](https://github.com/SkylerW99), [@itsjoopark](https://github.com/itsjoopark), [@hannahvy](https://github.com/hannahvy), [@nhasalajoshi](https://github.com/nhasalajoshi)| -| [Color](https://github.com/processing/p5.js/tree/main/src/color) | [@paulaxisabel](https://github.com/paulaxisabel), [@SoundaryaKoutharapu](https://github.com/SoundaryaKoutharapu), [@mrbrack](https://github.com/mrbrack), [@TJ723](https://github.com/TJ723), [@Zarkv](https://github.com/Zarkv), [@SkylerW99](https://github.com/SkylerW99), [@ramya202000](https://github.com/ramya202000), [@hannahvy](https://github.com/hannahvy), [@robin-haxx](https://github.com/robin-haxx), [@hiddenenigma](https://github.com/hiddenenigma) | -| [Core](https://github.com/processing/p5.js/tree/main/src/core)/Environment/Rendering | [@limzykenneth](https://github.com/limzykenneth), [@davepagurek](https://github.com/davepagurek), [@ChihYungChang](https://github.com/ChihYungChang), [@teragramgius](https://github.com/teragramgius), [@tuminzee](https://github.com/tuminzee), [@Zarkv](https://github.com/Zarkv), [@robin-haxx](https://github.com/robin-haxx), [@Gaurav-1306](https://github.com/Gaurav-1306) | -| [Data](https://github.com/processing/p5.js/tree/main/src/data) | [@angelabelle](https://github.com/angelabelle), [@shahankhatch](https://github.com/shahankhatch), [@TanviKumar](https://github.com/TanviKumar), [@SkylerW99](https://github.com/SkylerW99), [@nhasalajoshi](https://github.com/nhasalajoshi) | -| [DOM](https://github.com/processing/p5.js/tree/main/src/dom) | [@SarveshLimaye](https://github.com/SarveshLimaye), [@SoundaryaKoutharapu](https://github.com/SoundaryaKoutharapu), [@ramya202000](https://github.com/ramya202000), [@BamaCharanChhandogi](https://github.com/BamaCharanChhandogi), [@Obi-Engine10](https://github.com/Obi-Engine10), [@MarceloGoncalves](https://github.com/MarceloGoncalves), [@hiddenenigma](https://github.com/hiddenenigma) | -| [Events](https://github.com/processing/p5.js/tree/main/src/events) | [@limzykenneth](https://github.com/limzykenneth), [@richardegil](https://github.com/richardegil), [@angelabelle](https://github.com/angelabelle), [@littlejacinthe](https://github.com/littlejacinthe), [@TanviKumar](https://github.com/TanviKumar), [@tuminzee](https://github.com/tuminzee) | -| [Image](https://github.com/processing/p5.js/tree/main/src/image) | [@cgusb](https://github.com/cgusb), [@albertomancia](https://github.com/albertomancia), [@ramya202000](https://github.com/ramya202000), [@hannahvy](https://github.com/hannahvy), [@robin-haxx](https://github.com/robin-haxx)| -| [IO](https://github.com/processing/p5.js/tree/main/src/io) | [@limzykenneth](https://github.com/limzykenneth), [@Pritam1136](https://github.com/Pritam1136), [@shahankhatch](https://github.com/shahankhatch), [@TanviKumar](https://github.com/TanviKumar), [@jeanetteandrews](https://github.com/jeanetteandrews)| -| [Math](https://github.com/processing/p5.js/tree/main/src/math) | [@limzykenneth](https://github.com/limzykenneth), [@ericnlchen](https://github.com/ericnlchen), [@ChihYungChang](https://github.com/ChihYungChang), [@bsubbaraman](https://github.com/bsubbaraman), [@albertomancia](https://github.com/albertomancia), [@JazerUCSB](https://github.com/JazerUCSB), [@tedkmburu](https://github.com/tedkmburu), [@perminder-17](https://github.com/perminder-17), [@Obi-Engine10](https://github.com/Obi-Engine10), [@jeanetteandrews](https://github.com/jeanetteandrews) | -| [Typography](https://github.com/processing/p5.js/tree/main/src/typography) | [@dhowe](https://github.com/dhowe), [@paulaxisabel](https://github.com/paulaxisabel), [@SarveshLimaye](https://github.com/SarveshLimaye), [@SkylerW99](https://github.com/SkylerW99), [@BamaCharanChhandogi](https://github.com/BamaCharanChhandogi), [@Obi-Engine10](https://github.com/Obi-Engine10), [@hannahvy](https://github.com/hannahvy), [@singshris](https://github.com/singshris), [@hiddenenigma](https://github.com/hiddenenigma) | -| [Utilities](https://github.com/processing/p5.js/tree/main/src/utilities) | [@limzykenneth](https://github.com/limzykenneth), [@glopzel](https://github.com/glopzel) | -| [WebGL](https://github.com/processing/p5.js/tree/main/src/webgl) | [@davepagurek](https://github.com/davepagurek), [@aferriss](https://github.com/aferriss), [@aceslowman](https://github.com/aceslowman), [@ShenpaiSharma](https://github.com/ShenpaiSharma), [@ChihYungChang](https://github.com/ChihYungChang), [@teragramgius](https://github.com/teragramgius), [@JazerUCSB](https://github.com/JazerUCSB), [@richardegil](https://github.com/richardegil), [@itsjoopark](https://github.com/itsjoopark), [@Gaurav-1306](https://github.com/Gaurav-1306), [@jeanetteandrews](https://github.com/jeanetteandrews) | -| [Internalization](https://github.com/processing/p5.js/blob/main/src/core/internationalization.js) | [@limzykenneth](https://github.com/limzykenneth) | -| [Friendly Errors](https://github.com/processing/p5.js/tree/main/src/core/friendly_errors) | [@richardegil](https://github.com/richardegil), [@itsjoopark](https://github.com/itsjoopark), [@hannahvy](https://github.com/hannahvy), [@bisabi-01](https://github.com/bisabi-01), [@singshris](https://github.com/singshris) | -| [Contributor Docs](https://github.com/processing/p5.js/tree/main/contributor_docs) |[@limzykenneth](https://github.com/limzykenneth), [@asukaminato0721](https://github.com/asukaminato0721), [@SoundaryaKoutharapu](https://github.com/SoundaryaKoutharapu), [@richardegil](https://github.com/richardegil), [@hannahvy](https://github.com/hannahvy), [@bayomayo](https://github.com/bayomayo) | -| [p5.sound](https://github.com/processing/p5.sound.js) |[@miguellacorte](https://github.com/miguellacorte), [@JazerUCSB](https://github.com/JazerUCSB), [@angelabelle](https://github.com/angelabelle), [@littlejacinthe](https://github.com/littlejacinthe), [@hannahvy](https://github.com/hannahvy), [@glopzel](https://github.com/glopzel), [@singshris](https://github.com/singshris), [@jeanetteandrews](https://github.com/jeanetteandrews) | -| Build Process/Unit Testing | [@limzykenneth](https://github.com/limzykenneth) | + + + +| Area | Steward(s) | +|------|-------------| +| Maintainers | [@davepagurek](https://github.com/davepagurek), [@ksen0](https://github.com/ksen0), [@limzykenneth](https://github.com/limzykenneth), [@perminder-17](https://github.com/perminder-17), [@qianqianye](https://github.com/qianqianye) | +| Accessibility | [@calebfoss](https://github.com/calebfoss) | +| Accessibility (p5.js-website) | [@coseeian](https://github.com/coseeian) | +| Color | [@limzykenneth](https://github.com/limzykenneth) | +| Core | [@davepagurek](https://github.com/davepagurek) | +| DevOps | [@Vaivaswat2244](https://github.com/Vaivaswat2244), [@error-four-o-four](https://github.com/error-four-o-four), [@limzykenneth](https://github.com/limzykenneth), [@lirenjie95](https://github.com/lirenjie95) | +| Documentation | [@VANSH3104](https://github.com/VANSH3104), [@limzykenneth](https://github.com/limzykenneth), [@perminder-17](https://github.com/perminder-17) | +| 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 (hi) | [@Divyansh013](https://github.com/Divyansh013), [@takshittt](https://github.com/takshittt) | +| i18n (zh) | [@limzykenneth](https://github.com/limzykenneth), [@lirenjie95](https://github.com/lirenjie95) | +| Math | [@GregStanton](https://github.com/GregStanton), [@holomorfo](https://github.com/holomorfo) | +| p5.js-website | [@clairep94](https://github.com/clairep94), [@ksen0](https://github.com/ksen0) | +| p5.sound.js | [@ogbabydiesal](https://github.com/ogbabydiesal) | +| Shapes | [@GregStanton](https://github.com/GregStanton) | +| Typography | [@dhowe](https://github.com/dhowe) | + ## Contributors -We recognize all types of contributions. This project follows the [all-contributors specification](https://github.com/all-contributors/all-contributors) and the [Emoji Key](https://allcontributors.org/docs/en/emoji-key) ✨ for contribution types. Instructions to add yourself or add contribution emojis to your name are [here](https://github.com/processing/p5.js/issues/2309). You can also post an issue or comment on a pull request with the text: `@all-contributors please add @YOUR-USERNAME for THINGS` (where `THINGS` is a comma-separated list of entries from the [list of possible contribution types](https://allcontributors.org/docs/en/emoji-key)) and our nice bot will add you. +We recognize all types of contributions. This project follows the [all-contributors specification](https://github.com/all-contributors/all-contributors) and the [Emoji Key](https://github.com/all-contributors/all-contributors/blob/master/docs/emoji-key.md) ✨ for contribution types. Instructions to add yourself or add contribution emojis to your name are [here](https://github.com/processing/p5.js/issues/2309). You can also post an issue or comment on a pull request with the text: `@all-contributors please add @YOUR-USERNAME for THINGS` (where `THINGS` is a comma-separated list of entries from the [list of possible contribution types](https://github.com/all-contributors/all-contributors/blob/master/docs/emoji-key.md)) and our nice bot will add you. @@ -111,975 +120,1052 @@ We recognize all types of contributions. This project follows the [all-contribut
` tag. In between the opening and closing `` tag, you will insert the relevant example code. The basic principle of writing good example code for the reference is to keep things simple and minimal. The example should be meaningful and explain how the feature works without being too complicated. The example’s canvas should be 100x100 pixels and if the `setup()` function is not included, such as in the example above, the code will be automatically wrapped in a `setup()` function with a default 100x100 pixels gray background canvas created. We won’t go through the details about best practices and code style for the example code here; please see the reference style guide instead.
-You can have multiple examples for one feature.To do so, add an additional `` and `` HTML block right after the first closed, separated by a blank line.
+You can have multiple examples for one feature. To do so, add an additional `` and `` HTML block right after the first closed, separated by a blank line.
```
* @example
diff --git a/contributor_docs/contributor_guidelines.md b/contributor_docs/contributor_guidelines.md
index a75a4101f4..84685141db 100644
--- a/contributor_docs/contributor_guidelines.md
+++ b/contributor_docs/contributor_guidelines.md
@@ -422,7 +422,7 @@ p5.js' code standard or code style is enforced by [ESLlint](https://eslint.org/)
While working on any features of p5.js, it is important to keep in mind the design principles of p5.js. Our priorities may differ from the priorities of other projects, so if you are coming from a different project, we recommend that you familiarize yourself with p5.js' design principles.
-- **Access** We prioritize accessibility first and foremost, and decisions we make must take into account how it increases access to historically marginalized groups. Read more about this in our access statement.
+- **Access** We prioritize accessibility first and foremost, and decisions we make must take into account how they increase access to historically marginalized groups. Read more about this in our access statement.
- **Beginner Friendly** The p5.js API aims to be friendly to beginner coders, offering a low barrier to creating interactive and visual web content with cutting-edge HTML5/Canvas/DOM APIs.
- **Educational** p5.js is focused on an API and curriculum that supports educational use, including a complete reference to the API with supporting examples, as well as tutorials and sample class curricula that introduce core creative coding principles in a clear and engaging order.
- **JavaScript and its community** p5.js aims to make web development practices more accessible to beginners by modeling proper JavaScript design patterns and usage while abstracting them where necessary. As an open-source library, p5.js also includes the wider JavaScript community in its creation, documentation, and dissemination.
diff --git a/contributor_docs/creating_libraries.md b/contributor_docs/creating_libraries.md
index 0ee2c04539..4aadf06858 100644
--- a/contributor_docs/creating_libraries.md
+++ b/contributor_docs/creating_libraries.md
@@ -2,7 +2,9 @@
# Creating an Addon Library
-A p5.js addon library is JavaScript code that extends or adds to the p5.js core functionality. While p5.js itself already provides a wide range of functionality, it doesn’t aim to cover everything you can do with JavaScript and the Web API. Addon libraries let you extend p5.js without needing to incorporate the features into p5.js. This guide will take you through the steps of creating an addon library that loads a simple CSV file by implementing a `loadCSV()` function.
+A p5.js addon library is JavaScript code that extends or adds to the p5.js core functionality. While p5.js itself already provides a wide range of functionality, it doesn’t aim to cover everything you can do with JavaScript and the Web API. Addon libraries let you extend p5.js without needing to incorporate the features into p5.js. Learning how to write an addon library is also a great way to learn how the internals of p5.js works and how it is implemented: all the features of p5.js are implemented in the same way!
+
+This guide will take you through the steps of creating an addon library that loads a simple CSV file by implementing a `loadCSV()` function.
Here are some examples of why you may want to create an addon library:
@@ -30,28 +32,51 @@ Here are some examples of why you may want to create an addon library:
First, let’s create a blank JavaScript file for the addon library. We’ll call this file p5.loadcsv.js.
-The main way to extend p5.js is by adding methods to the p5.prototype object. For example, the following code extends p5 to add a `loadCSV()` method to the p5.prototype object:
+The main way to extend p5.js is to pass an addon function to the static `p5.registerAddon()` function. An addon function is any function that takes three arguments which are usually named `p5`, `fn`, and `lifecycles` respectively. To start writing our addon, put the following code into p5.loadcsv.js.
```js
-p5.prototype.loadCSV = function(){
- console.log('I will load a CSV file soon!');
-};
+function loadCSVAddon(p5, fn, lifecycles){
+
+}
+```
+
+Before we implement our `loadCSV()` function, let's have a look at what the three function arguments are starting with the first two and we will introduce the third later in this article.
+
+* `p5` - This is the `p5` object/constructor. You will use this to access any static `p5` object member or define any static `p5` object member. For example to access `p5.Vector` or `p5.Renderer`.
+* `fn` - This is an alias to `p5.prototype`. For any variable or functions that you wish for p5.js to expose to the `window` in global mode or to the `p5` instance in instance mode, it must be assigned as a member of `fn`. We will look into the usage of `fn` below in more detail as it is likely one of the most used feature of the addon API.
+
+Now let's add a `loadCSV()` function to our addon, we do this by defining an object member named `loadCSV` within `fn`:
+
+```js
+function loadCSVAddon(p5, fn, lifecycles){
+ fn.loadCSV = function(){
+ console.log('I will load a CSV file soon!');
+ }
+}
```
-When someone includes your p5.loadcsv.js file in a project, they can call `loadCSV()` as a global function just like `createCanvas()` or `background()`.
+This `loadCSVAddon()` function that we have just defined in our file is the main addon function that we will pass to the `p5.registerAddon()` static function, let's do this now, add the following to the bottom of the p5.loadcsv.js file under the `loadCSVAddon()` function:
+
+```js
+p5.registerAddon(loadCSVAddon);
+```
+
+When someone includes your p5.loadcsv.js file in a project as a script tag, they can now call `loadCSV()` as a global function just like `createCanvas()` or `background()`.
You can also extend p5.js classes such as` p5.Element` or` p5.Graphics` by adding methods to their prototypes. In the example below, `p5.Element.prototype` is extended with the `shout()` method. It adds an exclamation mark to the end of the element’s inner HTML.
```js
-p5.Element.prototype.shout = function () {
- this.elt.innerHTML += '!';
-};
+function loadCSVAddon(p5, fn, lifecycles){
+ p5.Element.prototype.shout = function () {
+ this.elt.innerHTML += '!';
+ };
+}
```
## Step 2
-You now have a p5.loadcsv.js file with one method attached to the `p5.prototype` object. This method,` loadCSV()`, doesn’t do much currently; it just logs a message to the console. Run the following code in a new sketch that loads both p5.js and p5.loadcsv.js in the` ` tag.
+You now have a p5.loadcsv.js file with one new function created for p5.js. This method,` loadCSV()`, doesn’t do much currently; it just logs a message to the console. Run the following code in a new sketch that loads both p5.js and p5.loadcsv.js in the` ` tag.
```js
function setup() {
@@ -84,13 +109,13 @@ Running the sketch should print a single message in the console saying “I will
To load a CSV file with your `loadCSV()` function, the function needs to accept an argument. This can be defined in the same way as any other function parameter.
```js
-p5.prototype.loadCSV = function (filename) {
- console.log(`I will load the CSV file ${filename} soon!`);
-};
+function loadCSVAddon(p5, fn, lifecycles){
+ fn.loadCSV = function (filename) {
+ console.log(`I will load the CSV file ${filename} soon!`);
+ };
+}
```
-
-
In our test sketch, we can use it like so:
```js
@@ -108,23 +133,27 @@ function setup() {
You can access p5.js functions and variables such as `circle()` and `PI` in your addon code using the “`this`” object. We’ll use the `hour()` and `minute()` functions to further customize the `loadCSV()` function’s console message. This will give us some information about when the function is called.
-You should always use the “function()
” keyword to attach methods to the p5.prototype
object.
Don’t use the arrow function syntax “() =>
” because the value of “this
” when using the “function()
” keyword is the created object (i.e., the p5 sketch), but with the arrow function syntax, the value of “this
” is whatever the value of “this
” is when the arrow function is defined. In the example below, “this
” will refer to “window
” instead of the p5 sketch, which is usually not what we want.
+You should always use the “function()
” keyword to attach methods to the fn
argument object.
Don’t use the arrow function syntax “() =>
” because the value of “this
” when using the “function()
” keyword is the created object (i.e., the p5 sketch), but with the arrow function syntax, the value of “this
” is whatever the value of “this
” is when the arrow function is defined. In the example below, “this
” will refer to “window
” instead of the p5 sketch, which is usually not what we want.
```js
-p5.prototype.loadCSV = (filename) => {
- // this === window is true because
- // "this" refers to the window object.
- // This is almost never what you want.
- console.log(this === window);
-};
-
-
-p5.prototype.loadCSV = function (filename) {
- // Prints 'I will load the CSV file data.csv at 10:30'
- // to the console.
- console.log(`I will load the CSV file ${filename} at ${this.hour()}:${this.minute()}!`);
-};
+function loadCSVAddon(p5, fn, lifecycles){
+ fn.loadCSV = (filename) => {
+ // this === window is true because
+ // "this" refers to the window object.
+ // This is almost never what you want.
+ console.log(this === window);
+ };
+}
+```
+```js
+function loadCSVAddon(p5, fn, lifecycles){
+ fn.loadCSV = function (filename) {
+ // Prints 'I will load the CSV file data.csv at 10:30'
+ // to the console.
+ console.log(`I will load the CSV file ${filename} at ${this.hour()}:${this.minute()}!`);
+ };
+}
```
@@ -137,24 +166,22 @@ However, we have not made our `loadCSV()` function load any CSV file yet! To be
First make the following changes to your `loadCSV()` method:
```js
-p5.prototype.loadCSV = function(filename){
- console.log(`I will load the CSV file ${filename} at ${this.hour()}:${this.minute()}!`);
-
- let result = [];
-
- fetch(filename)
- .then((res) => res.text())
- .then((data) => {
- data.split('\n').forEach((line) => {
- result.push(line.split(','));
- });
+function loadCSVAddon(p5, fn, lifecycles){
+ fn.loadCSV = async function(filename){
+ console.log(`I will load the CSV file ${filename} at ${this.hour()}:${this.minute()}!`);
+
+ let res = await fetch(filename);
+ let data = await res.text();
+ return data.split('\n').map((line) => {
+ return line.split(',');
});
-
- return result;
-};
+ };
+}
```
-The method now creates an empty array in the variable “`result`”, load in the CSV file specified in the filename with the Fetch API, parse the CSV file in a simplified way (split each line into rows, then each row into words) and return the variable “`result`” at the end.
+Note that we have added an `async` keyword before `function(filename)` to mark that this is an asynchronous function. You can read more about asynchronicity in Javascript [here](https://dev.to/limzykenneth/asynchronous-p5js-20-458f).
+
+The function now uses the Fetch API to fetch a CSV file according to the filename provided by the user, parse the CSV file in a simplified way (split each line into rows, then each row into words), and return the parsed data.
Now, when you run the sketch, pass a file path to a simple CSV file to your `loadCSV()` function and log the output:
@@ -166,137 +193,168 @@ function setup(){
}
```
-You will notice that it is logging an empty array instead of an array containing data you have in your CSV file. This is because of the same reason why we need to load in data such as with `loadJSON()` or `loadStrings()` in the `preload()` function; the asynchronous nature of JavaScript makes it so that the “result” variable is returned from the `loadCSV()` function before the `fetch()` function can finish fetching the CSV file so we only get an empty array as it is first defined.
-
-Simply moving where you call `loadCSV()` to `preload()` in this case is not enough to solve this problem.
+You will notice that it is logging something called a Promise instead of the array you containing data you have in your CSV file. This is because of the same reason why we need to use an `async function setup()` with `loadJSON()` or `loadStrings()`, we need to `await` our asynchronous function in an `async` setup function:
```js
-let myCSV;
-
-function preload(){
- myCSV = loadCSV('data.csv');
-}
-
-function setup(){
+async function setup(){
createCanvas(400, 400);
- print(myCSV); // Still prints []
+ let myCSV = await loadCSV('data.csv');
+ print(myCSV);
}
```
-p5 will need to be told that the addon’s `loadCSV()` function is something it should wait for in the `preload()` function for this to work. To do that, we use the “`registerPreloadMethod()`” in the `p5.prototype` object.
-```js
-p5.prototype.loadCSV = function (filename){
- console.log(`I will load the CSV file ${filename} at ${this.hour()}:${this.minute()}!`);
+## Step 6
- let result = [];
+Your `loadCSV()` function should now work as expected and you can add additional features such as callback function support, additional methods attached to `fn`, or anything else you can think of.
- fetch(filename)
- .then((res) => res.text())
- .then((data) => {
- data.split('\n').forEach((line) => {
- result.push(line.split(','));
- });
+There is one more major feature that is available for addon libraries and these are lifecycle hooks. Lifecycle hooks are functions that will be run at certain points in the p5 object’s lifetime. For example, if you want your addon library to run some code just before p5 runs the `setup()` function or if your addon library needs to do some clean up after a sketch is removed using the `remove()` function, hooks are what will enable your addon library to do so.
- this._decrementPreload();
- });
+The available hooks, in order of execution, are:
- return result;
-};
+- `presetup` — Called before the `setup()` function is executed.
+- `postsetup` — Called after the `setup()` function is executed.
+- `predraw` — Called at the beginning of `draw()`. Called repeatedly the same as `draw()`.
+- `postdraw` — Called at the end of `draw()`. Called repeatedly the same as `draw()`.
+- `remove` — Called when `remove()` is called.
-p5.prototype.registerPreloadMethod('loadCSV', p5.prototype);
+You may have noticed that we have not yet introduced the third parameter to our `loadCSVAddon()` which is called `lifecycles`, this is where you will define the lifecycle hooks your addon wish to use, see the snippet below.
+
+```js
+function loadCSVAddon(p5, fn, lifecycles){
+ lifecycles.predraw = function(){
+ // Set background to be p5 pink by default
+ this.background("#ed225d");
+ };
+
+ lifecycles.remove = function(){
+ // Addon library related cleanup
+ }
+}
```
-Note two things from the code above:
+Notice that in the lifecycle functions you have access to `this` which refers to the current `p5` instance same as you would have in the functions attached to `fn`
-1. We call the `p5.prototype.registerPreloadMethod()` function passing in the name of the `loadCSV()` function as a string as the first parameter and `p5.prototype` as the second parameter.
-2. At the end of `fetch()`, after the CSV data has been parsed and pushed into the result array, `this._decrementPreload()` function is called.
-3) Now, if you test your sketch again, you should see that the “`myCSV`” variable is populated with the data from the CSV file!
-4. Note that due to inherent limitations of this technique, the returned “`result`” variable must be an object (array is also a type of object in Javascript) and must not be overwritten in the function body. You can set properties of the object (or push to the array), but you cannot reassign the variable (i.e., you cannot do “``result = data.split(`\n`)``”).
+Here is what your p5.loadcsv.js file should look like at this point in the tutorial:
-
-Quite a bit of magic is happening here: firstly, why does “result
” now contain the additional data when fetch()
code> should still have been asynchronous and thus running after “result
” has returned?
+```js
+function loadCSVAddon(p5, fn, lifecycles){
+ fn.loadCSV = async function(filename){
+ console.log(`I will load the CSV file ${filename} at ${this.hour()}:${this.minute()}!`);
+
+ let res = await fetch(filename);
+ let data = await res.text();
+ return data.split('\n').map((line) => {
+ return line.split(',');
+ });
+ };
-This is related to why the return type must be an object. In Javascript, objects are passed by reference while most other types such as strings and numbers are passed by value. What this means is that when an object is returned from a function, it points to the original object that was created (in this case, the empty array we create in the line “`let result = [];`”.) In contrast, pass by value types, when returning from a function, will be copied and lose their relation to the original reference. This behavior allows us to modify the properties of the returned objects after they have been returned from the function as long as we don’t reassign the variable, which will create a new reference separate from the original object.
-
+ lifecycles.predraw = function(){
+ // Set background to be p5 pink by default
+ this.background("#ed225d");
+ };
-
-Secondly, what is registerPreloadMethod()
doing and what about this._decrementPreload()
?
+ lifecycles.remove = function(){
+ // Addon library related cleanup
+ }
+}
-Without going into all the details, `registerPreloadMethod()` adds the function we specified into an internal list of functions that p5 keeps track of whenever it is called in `preload()`. When p5 detects such a function is called, it will add 1 to an internal counter. If this internal counter is larger than 0, it will keep waiting in `preload()` and defer running `setup()` and starting the `draw()` loop. Loading functions can decrement that internal counter by calling `this._decrementPreload()`, effectively signaling to p5 that a loading function in `preload()` is complete. If the internal counter reaches 0 after the decrement, it means all loadings are complete and the whole sketch can start.
-
+p5.registerAddon(loadCSVAddon);
+```
-## Step 6
+## Step 7
+As a final step, we will add a few more changes to our addon to prepare it for distribution. There are a few options you may wish to distribute your addon:
-Your `loadCSV()` function should now work as expected and you can add additional features such as callback function support, additional methods attached to `p5.prototypes`, or anything else you can think of.
+* As a single JavaScript file which your users will include in their HTML with a `
+```
+
+请注意,`lib/p5.min.js`不支持FE信息,因此请使用`lib/p5.js`进行测试。
+
+然后,编辑`/lib/empty-example/sketch.js`来测试典型的参数错误情况:
+
+1. 缺少参数
+2. 参数数量错误
+3. 参数类型错误
+
+以下是测试`circle()`方法表达式的示例:
+
+```js
+// 缺少参数
+circle(100);
+// 参数数量错误(超过所需数量)
+// 注意这段代码仍然能成功绘制一个圆。
+circle(100, 100, 100, 1000);
+// 参数类型错误
+circle(100, 100, 'hello');
+```
+
+上面的代码应该生成以下FE信息:
+
+```
+🌸 p5.js says: [sketch.js, line 9] circle()需要至少3个参数,但只收到了1个。 (https://p5js.org/reference/p5/circle)
+🌸 p5.js says: [sketch.js, line 14] circle()需要不超过3个参数,但收到了4个。 (https://p5js.org/reference/p5/circle)
+🌸 p5.js says: [sketch.js, line 12] circle()的第三个参数需要Number类型,但收到了string类型。 (https://p5js.org/reference/p5/circle)
+```
+
+恭喜🎈!您现在已经完成了为新方法添加参数验证。
+
+
+## 📥 使用FES处理文件加载错误消息
+
+### 第1步 – 检查文件加载错误情况列表
+
+文件加载错误分为多个不同的情况,以便在错误发生时提供尽可能有帮助的信息。这使p5.js能够在不同情况下显示不同的错误。例如,当它无法读取字体文件中的数据时,它会显示一个与尝试加载过大无法读取的文件时不同的错误。
+
+这些情况都有自己的编号,可以在`core/friendly_errors/file_errors.js`文件的顶部找到。
+
+当您希望添加文件加载错误时,首先查看`core/friendly_errors/file_errors.js`中的`fileLoadErrorCases`,看看是否有适用于您情况的现有案例。
+
+
+
+例如,您可能正在加载基于字符串的文件。这对应于`fileLoadErrorCases`中的`case 3`:
+
+```js
+case 3:
+ return {
+ message: translator('fes.fileLoadError.strings', {
+ suggestion
+ }),
+ method: 'loadStrings'
+ };
+```
+
+如果您正在处理的场景已经有相关的编号,请记住案例编号,并跳至[**第4步**](#step-4)。如果您在`fileLoadErrorCases`中找不到匹配的情况,请转到[**第2步**](#step-2)创建新的情况。
+
+
+### 第2步 – 在问题面板上讨论添加新的错误情况
+
+接下来,您将提交一个问题工单,讨论创建新的情况或确认您的情况不是现有情况的重复。编写一个简短的段落描述您的新方法以及用户可能遇到这种特定文件加载错误的场景。然后再写一个简短的段落描述您方法中的错误处理以及它加载的文件类型。
+
+转到[问题面板](https://github.com/processing/p5.js/issues),按"New Issue"按钮,然后选择"Issue: 💡 Existing Feature Enhancement"选项。应该出现一个空表单。
+
+添加一个标题,如"向`fileLoadErrorCases`添加新情况:\[您的文件加载错误情况的高级描述]"。对于"Increasing access"部分,输入您在此步骤开始时准备的简短段落,描述典型情况。
+
+然后,在"Most appropriate sub-area of p5.js?"问题中勾选"Friendly Errors"框。最后,在"Feature enhancement details"部分,输入详细说明错误处理和加载文件类型的段落。
+
+
+### 第3步 – 向`fileLoadErrorCases`添加新情况
+
+在与维护者确认后,您可以向`fileLoadErrorCases`添加新情况。在`fileLoadErrorCases`的`switch`语句中,转到情况列表的末尾,并按照以下格式添加新情况:
+
+```
+case {{next available case number}}:
+ return {
+ message: translator('fes.fileLoadError.{{tag name}}', {
+ suggestion
+ }),
+ method: '{{name of your method}}'
+ };
+```
+
+在上面的例子中,双尖括号(`{{}}`)中的任何内容都是您应该替换的内容。例如,如果前一个情况编号是11,您的代码应该以`case 12:`开始,最终代码中没有双括号。
+
+
+### 第4步 – 调用`p5._friendlyFileLoadError()`
+
+添加您的情况后,您现在可以在错误处理语句中调用`p5._friendlyFileLoadError([情况编号], [文件路径])`。
+
+例如,请查看`loadStrings()`方法加载基于字符串的文件(对应于`fileLoadErrorCases`中的`case 3`)。`loadStrings()`方法使用[`httpDo.call()`](https://p5js.org/reference/p5/httpDo)和一个在文件错误情况下执行的自定义回调方法:
+
+```js
+p5.prototype.httpDo.call(
+ this,
+ args[0],
+ 'GET',
+ 'text',
+ data => {
+ // [... 省略的代码 ...]
+ },
+ function(err) {
+ // 错误处理
+ p5._friendlyFileLoadError(3, args[0]);
+ // [... 省略的代码 ...]
+ }
+ );
+```
+
+我们可以看到错误回调函数如何调用`p5._friendlyFileLoadError(3, [the first argument, which is a file path])`来生成以下FE信息:
+
+```
+🌸 p5.js says: 看起来加载文本文件时出现了问题。请检查文件路径(assets/wrongname.txt)是否正确,尝试在线托管文件,或运行本地服务器。
++ 更多信息:https://github.com/processing/p5.js/wiki/Local-server
+```
+
+恭喜🎈!您现在已经完成为带有文件加载的方法实现FE。
+
+
+
+## 🐈 使用FES添加库错误信息
+
+### 第1步 – 编写代码检测错误何时发生
+
+首先,查找用户在使用您的方法时可能遇到的典型错误情况,并创建逻辑来捕获这些情况。此外,如果适用,请考虑提供故障保护措施,例如为缺少的参数使用默认值。确定对用户有帮助的FE信息的情况。
+
+[MDN Web文档中的这个指南](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Control_flow_and_error_handling)提供了关于控制流和JavaScript原生错误处理结构的良好概述。
+
+\
+
+
+
+### 第2步 – 调用`p5._friendlyError()`
+
+要生成FE信息,您只需要在错误处理语句中按照以下格式调用`p5._friendlyError('[custom message]', '[method name]');`。将方括号内(包括方括号)的所有内容替换为您自己的值。
+
+例如,以下代码将为`bezierVertex()`生成FE信息:
+
+```js
+p5._friendlyError(
+ '在调用bezierVertex()之前必须先使用vertex()',
+ 'bezierVertex'
+);
+```
+
+这应该生成以下FE信息:
+
+```
+🌸 p5.js says: [sketch.js, line 19] 当调用bezierVertex时,p5js库内部发生了一个错误,错误信息为"在调用bezierVertex()之前必须先使用vertex()"。如果没有特别说明,可能是传递给bezierVertex的参数有问题。 (https://p5js.org/reference/p5/bezierVertex)
+```
+
+恭喜🎈!您现在已经完成了为您的方法添加库错误信息。
+
+
+## ✏️ 为国际受众编写友好错误信息
+
+FES信息编写者应优先降低理解错误信息的障碍,提高调试过程的可访问性。以下是一个例子:
+
+```
+🌸 p5.js says: [sketch.js, line 7] circle() was expecting at least 3 arguments, but received only 1. (https://p5js.org/reference/p5/circle)
+```
+
+如果浏览器设置为`ko-KR`(韩语)区域设置,上述参数验证信息将以韩语显示:
+
+```
+🌸 p5.js says: [sketch.js, 줄7] 최소 3개의 인수(argument)를 받는 함수 circle()에 인수가 1개만 입력되었습니다. (https://p5js.org/reference/p5/circle)
+```
+
+[友好错误i18n指南](https://almchung.github.io/p5-fes-i18n-book/)讨论了在跨文化i18n上下文中编写友好错误信息的挑战和最佳实践。以下是该指南的主要观点:
+
+- 了解您的受众:不要对错误信息的受众做出假设。尝试了解谁在使用我们的库以及他们如何使用它。
+- 保持语言包容性。我们努力使错误信息"友好",这对您意味着什么?寻找语言中可能的偏见和伤害。
+- 尽可能使用简单的句子。考虑将句子分解成更小的块,以最好地利用[i18next的插值功能](https://www.i18next.com/translation-function/interpolation)。
+- 优先考虑跨文化交流,并提供跨语言的良好体验。避免使用比喻手法。
+- 一次只介绍一个技术概念或技术术语。保持技术写作的一致性。尝试链接一个以初学者友好语言编写的外部资源,其中包含大量简短、实用的示例。
+
+[友好错误i18n指南](https://almchung.github.io/p5-fes-i18n-book/)是一个公共项目,您可以通过[这个单独的仓库](https://github.com/almchung/p5-fes-i18n-book)为该指南做出贡献。
+
+
+## 🔍 可选:单元测试
+
+请考虑为您的新FE信息添加单元测试,以便尽早发现错误并确保您的代码向用户传递预期的信息。此外,单元测试是确保其他贡献者的新代码不会意外破坏或干扰您的代码功能的好方法。以下是几个关于单元测试的好指南:
+
+- [单元测试和测试驱动开发](https://archive.p5js.org/learn/tdd.html),作者Andy Timmons
+- [贡献者文档:单元测试](./unit_testing.md)
+
+
+
+示例:
+
+```js
+suite('validateParameters: multi-format', function() {
+ test('color(): 可选参数,类型不正确', function() {
+ assert.validationError(function() {
+ p5._validateParameters('color', [0, 0, 0, 'A']);
+ });
+ });
+}
+```
+
+
+## 结论
+
+在本指南中,我们提供了为多种不同情况添加FE信息的分步说明,包括:
+
+- 添加参数验证,
+- 处理文件加载错误,以及
+- 为方法添加库错误信息。
+
+此外,我们很高兴通过2021-2022年进行的FES调查分享我们社区的见解。调查结果以两种格式提供:
+
+- [21-22 FES调查报告漫画](https://almchung.github.io/p5jsFESsurvey/)
+- [21-22 FES调查完整报告](https://observablehq.com/@almchung/p5-fes-21-survey)
+
+有关FES设计和技术方面的更深入信息,请参阅[FES自述文档](./friendly_error_system.md)。该文档提供了详细的解释和开发说明,对那些寻求更深入了解FES的人有所帮助。
diff --git a/docs/converted.json b/docs/converted.json
new file mode 100644
index 0000000000..9f9576eacc
--- /dev/null
+++ b/docs/converted.json
@@ -0,0 +1,27999 @@
+{
+ "project": {},
+ "files": {},
+ "modules": {
+ "Environment": {
+ "name": "Environment",
+ "submodules": {
+ "Environment": 1
+ },
+ "classes": {}
+ },
+ "Color": {
+ "name": "Color",
+ "submodules": {
+ "Color Conversion": 1,
+ "Creating & Reading": 1,
+ "Setting": 1
+ },
+ "classes": {}
+ },
+ "Constants": {
+ "name": "Constants",
+ "submodules": {
+ "Constants": 1
+ },
+ "classes": {}
+ },
+ "Structure": {
+ "name": "Structure",
+ "submodules": {
+ "Structure": 1
+ },
+ "classes": {}
+ },
+ "DOM": {
+ "name": "DOM",
+ "submodules": {
+ "DOM": 1
+ },
+ "classes": {}
+ },
+ "Rendering": {
+ "name": "Rendering",
+ "submodules": {
+ "Rendering": 1
+ },
+ "classes": {}
+ },
+ "Foundation": {
+ "name": "Foundation",
+ "submodules": {
+ "Foundation": 1
+ },
+ "classes": {}
+ },
+ "Shape": {
+ "name": "Shape",
+ "submodules": {
+ "2D Primitives": 1,
+ "Attributes": 1,
+ "Curves": 1,
+ "Vertex": 1,
+ "3D Primitives": 1,
+ "3D Models": 1
+ },
+ "classes": {}
+ },
+ "Transform": {
+ "name": "Transform",
+ "submodules": {
+ "Transform": 1
+ },
+ "classes": {}
+ },
+ "Data": {
+ "name": "Data",
+ "submodules": {
+ "LocalStorage": 1,
+ "Dictionary": 1,
+ "Array Functions": 1,
+ "Conversion": 1,
+ "String Functions": 1
+ },
+ "classes": {}
+ },
+ "Events": {
+ "name": "Events",
+ "submodules": {
+ "Acceleration": 1,
+ "Keyboard": 1,
+ "Mouse": 1,
+ "Touch": 1
+ },
+ "classes": {}
+ },
+ "Image": {
+ "name": "Image",
+ "submodules": {
+ "Image": 1,
+ "Loading & Displaying": 1,
+ "Pixels": 1
+ },
+ "classes": {}
+ },
+ "IO": {
+ "name": "IO",
+ "submodules": {
+ "Input": 1,
+ "Output": 1,
+ "Table": 1,
+ "Time & Date": 1
+ },
+ "classes": {}
+ },
+ "Math": {
+ "name": "Math",
+ "submodules": {
+ "Calculation": 1,
+ "Vector": 1,
+ "Noise": 1,
+ "Random": 1,
+ "Trigonometry": 1
+ },
+ "classes": {}
+ },
+ "Typography": {
+ "name": "Typography",
+ "submodules": {
+ "Attributes": 1,
+ "Loading & Displaying": 1
+ },
+ "classes": {}
+ },
+ "3D": {
+ "name": "3D",
+ "submodules": {
+ "Interaction": 1,
+ "Lights": 1,
+ "Material": 1,
+ "Camera": 1
+ },
+ "classes": {}
+ },
+ "Color Conversion": {
+ "name": "Color Conversion",
+ "module": "Color",
+ "is_submodule": 1
+ },
+ "Creating & Reading": {
+ "name": "Creating & Reading",
+ "module": "Color",
+ "is_submodule": 1
+ },
+ "Setting": {
+ "name": "Setting",
+ "module": "Color",
+ "is_submodule": 1
+ },
+ "2D Primitives": {
+ "name": "2D Primitives",
+ "module": "Shape",
+ "is_submodule": 1
+ },
+ "Attributes": {
+ "name": "Attributes",
+ "module": "Shape",
+ "is_submodule": 1
+ },
+ "Curves": {
+ "name": "Curves",
+ "module": "Shape",
+ "is_submodule": 1
+ },
+ "Vertex": {
+ "name": "Vertex",
+ "module": "Shape",
+ "is_submodule": 1
+ },
+ "3D Primitives": {
+ "name": "3D Primitives",
+ "module": "Shape",
+ "is_submodule": 1
+ },
+ "3D Models": {
+ "name": "3D Models",
+ "module": "Shape",
+ "is_submodule": 1
+ },
+ "LocalStorage": {
+ "name": "LocalStorage",
+ "module": "Data",
+ "is_submodule": 1
+ },
+ "Dictionary": {
+ "name": "Dictionary",
+ "module": "Data",
+ "is_submodule": 1
+ },
+ "Array Functions": {
+ "name": "Array Functions",
+ "module": "Data",
+ "is_submodule": 1
+ },
+ "Conversion": {
+ "name": "Conversion",
+ "module": "Data",
+ "is_submodule": 1
+ },
+ "String Functions": {
+ "name": "String Functions",
+ "module": "Data",
+ "is_submodule": 1
+ },
+ "Acceleration": {
+ "name": "Acceleration",
+ "module": "Events",
+ "is_submodule": 1
+ },
+ "Keyboard": {
+ "name": "Keyboard",
+ "module": "Events",
+ "is_submodule": 1
+ },
+ "Mouse": {
+ "name": "Mouse",
+ "module": "Events",
+ "is_submodule": 1
+ },
+ "Touch": {
+ "name": "Touch",
+ "module": "Events",
+ "is_submodule": 1
+ },
+ "Loading & Displaying": {
+ "name": "Loading & Displaying",
+ "module": "Image",
+ "is_submodule": 1
+ },
+ "Pixels": {
+ "name": "Pixels",
+ "module": "Image",
+ "is_submodule": 1
+ },
+ "Input": {
+ "name": "Input",
+ "module": "IO",
+ "is_submodule": 1
+ },
+ "Output": {
+ "name": "Output",
+ "module": "IO",
+ "is_submodule": 1
+ },
+ "Table": {
+ "name": "Table",
+ "module": "IO",
+ "is_submodule": 1
+ },
+ "Time & Date": {
+ "name": "Time & Date",
+ "module": "IO",
+ "is_submodule": 1
+ },
+ "Calculation": {
+ "name": "Calculation",
+ "module": "Math",
+ "is_submodule": 1
+ },
+ "Vector": {
+ "name": "Vector",
+ "module": "Math",
+ "is_submodule": 1
+ },
+ "Noise": {
+ "name": "Noise",
+ "module": "Math",
+ "is_submodule": 1
+ },
+ "Random": {
+ "name": "Random",
+ "module": "Math",
+ "is_submodule": 1
+ },
+ "Trigonometry": {
+ "name": "Trigonometry",
+ "module": "Math",
+ "is_submodule": 1
+ },
+ "Interaction": {
+ "name": "Interaction",
+ "module": "3D",
+ "is_submodule": 1
+ },
+ "Lights": {
+ "name": "Lights",
+ "module": "3D",
+ "is_submodule": 1
+ },
+ "Material": {
+ "name": "Material",
+ "module": "3D",
+ "is_submodule": 1
+ },
+ "Camera": {
+ "name": "Camera",
+ "module": "3D",
+ "is_submodule": 1
+ }
+ },
+ "classes": {
+ "p5": {
+ "name": "p5",
+ "file": "src/core/main.js",
+ "line": 32,
+ "description": "This is the p5 instance constructor.
\nA p5 instance holds all the properties and methods related to\na p5 sketch. It expects an incoming sketch closure and it can also\ntake an optional node parameter for attaching the generated p5 canvas\nto a node. The sketch closure takes the newly created p5 instance as\nits sole argument and may optionally set preload(),\nsetup(), and/or\ndraw() properties on it for running a sketch.
\nA p5 sketch can run in \"global\" or \"instance\" mode:\n\"global\" - all properties and methods are attached to the window\n\"instance\" - all properties and methods are bound to this p5 object
\n",
+ "example": [],
+ "params": [
+ {
+ "name": "sketch",
+ "description": "a closure that can set optional preload(),\nsetup(), and/or draw() properties on the\ngiven p5 instance"
+ },
+ {
+ "name": "node",
+ "description": "element to attach canvas to",
+ "optional": 1,
+ "type": "HTMLElement"
+ }
+ ],
+ "return": {
+ "description": "a p5 instance",
+ "type": "p5"
+ },
+ "is_constructor": 1,
+ "module": "Structure",
+ "submodule": "Structure"
+ },
+ "p5.Color": {
+ "name": "p5.Color",
+ "file": "src/color/p5.Color.js",
+ "line": 343,
+ "description": "A class to describe a color. Each p5.Color
object stores the color mode\nand level maxes that were active during its construction. These values are\nused to interpret the arguments passed to the object's constructor. They\nalso determine output formatting such as when\nsaturation() is called.
\nColor is stored internally as an array of ideal RGBA values in floating\npoint form, normalized from 0 to 1. These values are used to calculate the\nclosest screen colors, which are RGBA levels from 0 to 255. Screen colors\nare sent to the renderer.
\nWhen different color representations are calculated, the results are cached\nfor performance. These values are normalized, floating-point numbers.
\ncolor() is the recommended way to create an instance\nof this class.
\n",
+ "example": [],
+ "params": [
+ {
+ "name": "pInst",
+ "description": "pointer to p5 instance.",
+ "optional": 1,
+ "type": "p5"
+ },
+ {
+ "name": "vals",
+ "description": "an array containing the color values\nfor red, green, blue and alpha channel\nor CSS color.",
+ "type": "Number[]|String"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ "FetchResources": {
+ "name": "FetchResources",
+ "file": "src/core/internationalization.js",
+ "line": 30,
+ "description": "This is our i18next \"backend\" plugin. It tries to fetch languages\nfrom a CDN.",
+ "example": [],
+ "params": [],
+ "is_constructor": 1
+ },
+ "p5.Element": {
+ "name": "p5.Element",
+ "file": "src/core/p5.Element.js",
+ "line": 53,
+ "description": "A class to describe an\nHTML element.\nSketches can use many elements. Common elements include the drawing canvas,\nbuttons, sliders, webcam feeds, and so on.
\nAll elements share the methods of the p5.Element
class. They're created\nwith functions such as createCanvas() and\ncreateButton().
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100);\n\n background(200);\n\n // Create a button element and\n // place it beneath the canvas.\n let btn = createButton('change');\n btn.position(0, 100);\n\n // Call randomColor() when\n // the button is pressed.\n btn.mousePressed(randomColor);\n\n describe('A gray square with a button that says \"change\" beneath it. The square changes color when the user presses the button.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n}\n
\n"
+ ],
+ "params": [
+ {
+ "name": "elt",
+ "description": "wrapped DOM element.",
+ "type": "HTMLElement"
+ },
+ {
+ "name": "pInst",
+ "description": "pointer to p5 instance.",
+ "optional": 1,
+ "type": "p5"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ "p5.Graphics": {
+ "name": "p5.Graphics",
+ "file": "src/core/p5.Graphics.js",
+ "line": 25,
+ "extends": "p5.Element",
+ "description": "Thin wrapper around a renderer, to be used for creating a\ngraphics buffer object. Use this class if you need\nto draw into an off-screen graphics buffer. The two parameters define the\nwidth and height in pixels. The fields and methods for this class are\nextensive, but mirror the normal drawing API for p5.",
+ "example": [],
+ "params": [
+ {
+ "name": "w",
+ "description": "width",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "description": "height",
+ "type": "Number"
+ },
+ {
+ "name": "renderer",
+ "description": "the renderer to use, either P2D or WEBGL",
+ "type": "Constant"
+ },
+ {
+ "name": "pInst",
+ "description": "pointer to p5 instance",
+ "optional": 1,
+ "type": "p5"
+ },
+ {
+ "name": "canvas",
+ "description": "existing html canvas element",
+ "optional": 1,
+ "type": "HTMLCanvasElement"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ "p5.Renderer": {
+ "name": "p5.Renderer",
+ "file": "src/core/p5.Renderer.js",
+ "line": 21,
+ "extends": "p5.Element",
+ "description": "Main graphics and rendering context, as well as the base API\nimplementation for p5.js \"core\". To be used as the superclass for\nRenderer2D and Renderer3D classes, respectively.",
+ "example": [],
+ "params": [
+ {
+ "name": "elt",
+ "description": "DOM node that is wrapped",
+ "type": "HTMLElement"
+ },
+ {
+ "name": "pInst",
+ "description": "pointer to p5 instance",
+ "optional": 1,
+ "type": "p5"
+ },
+ {
+ "name": "isMainCanvas",
+ "description": "whether we're using it as main canvas",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ "p5.TypedDict": {
+ "name": "p5.TypedDict",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 89,
+ "description": "Base class for all p5.Dictionary types. Specifically\ntyped Dictionary classes inherit from this class.",
+ "example": [],
+ "params": [],
+ "is_constructor": 1,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ "p5.StringDict": {
+ "name": "p5.StringDict",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 384,
+ "extends": "p5.TypedDict",
+ "description": "A simple Dictionary class for Strings.",
+ "example": [],
+ "params": [],
+ "is_constructor": 1,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ "p5.NumberDict": {
+ "name": "p5.NumberDict",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 402,
+ "extends": "p5.TypedDict",
+ "description": "A simple Dictionary class for Numbers.",
+ "example": [],
+ "params": [],
+ "is_constructor": 1,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ "p5.MediaElement": {
+ "name": "p5.MediaElement",
+ "file": "src/dom/dom.js",
+ "line": 3676,
+ "extends": "p5.Element",
+ "description": "A class to handle audio and video.
\np5.MediaElement
extends p5.Element with\nmethods to handle audio and video. p5.MediaElement
objects are created by\ncalling createVideo,\ncreateAudio, and\ncreateCapture.
\n",
+ "example": [
+ "\n\nlet capture;\n\nfunction setup() {\n createCanvas(100, 100);\n\n // Create a p5.MediaElement using createCapture().\n capture = createCapture(VIDEO);\n capture.hide();\n}\n\nfunction draw() {\n // Display the video stream and invert the colors.\n image(capture, 0, 0, width, width * capture.height / capture.width);\n filter(INVERT);\n}\n
\n"
+ ],
+ "params": [
+ {
+ "name": "elt",
+ "description": "DOM node that is wrapped",
+ "type": "String"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ "p5.File": {
+ "name": "p5.File",
+ "file": "src/dom/dom.js",
+ "line": 4958,
+ "description": "A class to describe a file.
\np5.File
objects are used by\nmyElement.drop() and\ncreated by\ncreateFileInput.
\n",
+ "example": [
+ "\n\n// Use the file input to load a\n// file and display its info.\n\nfunction setup() {\n background(200);\n\n // Create a file input and place it beneath\n // the canvas. Call displayInfo() when\n // the file loads.\n let input = createFileInput(displayInfo);\n input.position(0, 100);\n\n describe('A gray square with a file input beneath it. If the user loads a file, its info is written in black.');\n}\n\n// Display the p5.File's info\n// once it loads.\nfunction displayInfo(file) {\n background(200);\n\n // Display the p5.File's name.\n text(file.name, 10, 10, 80, 40);\n // Display the p5.File's type and subtype.\n text(`${file.type}/${file.subtype}`, 10, 70);\n // Display the p5.File's size in bytes.\n text(file.size, 10, 90);\n}\n
\n\n\n\n\n// Use the file input to select an image to\n// load and display.\nlet img;\n\nfunction setup() {\n // Create a file input and place it beneath\n // the canvas. Call handleImage() when\n // the file image loads.\n let input = createFileInput(handleImage);\n input.position(0, 100);\n\n describe('A gray square with a file input beneath it. If the user selects an image file to load, it is displayed on the square.');\n}\n\nfunction draw() {\n background(200);\n\n // Draw the image if it's ready.\n if (img) {\n image(img, 0, 0, width, height);\n }\n}\n\n// Use the p5.File's data once\n// it loads.\nfunction handleImage(file) {\n // Check the p5.File's type.\n if (file.type === 'image') {\n // Create an image using using\n // the p5.File's data.\n img = createImg(file.data, '');\n\n // Hide the image element so it\n // doesn't appear twice.\n img.hide();\n } else {\n img = null;\n }\n}\n
\n"
+ ],
+ "params": [
+ {
+ "name": "file",
+ "description": "wrapped file.",
+ "type": "File"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ "p5.Image": {
+ "name": "p5.Image",
+ "file": "src/image/p5.Image.js",
+ "line": 87,
+ "description": "A class to describe an image. Images are rectangular grids of pixels that\ncan be displayed and modified.
\nExisting images can be loaded by calling\nloadImage(). Blank images can be created by\ncalling createImage(). p5.Image
objects\nhave methods for common tasks such as applying filters and modifying\npixel values.
\n",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n\n describe('An image of a brick wall.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n img.filter(GRAY);\n image(img, 0, 0);\n\n describe('A grayscale image of a brick wall.');\n}\n
\n\n\n\n\nbackground(200);\nlet img = createImage(66, 66);\nimg.loadPixels();\nfor (let x = 0; x < img.width; x += 1) {\n for (let y = 0; y < img.height; y += 1) {\n img.set(x, y, 0);\n }\n}\nimg.updatePixels();\nimage(img, 17, 17);\n\ndescribe('A black square drawn in the middle of a gray square.');\n
\n"
+ ],
+ "params": [
+ {
+ "name": "width",
+ "type": "Number"
+ },
+ {
+ "name": "height",
+ "type": "Number"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ "p5.Table": {
+ "name": "p5.Table",
+ "file": "src/io/p5.Table.js",
+ "line": 41,
+ "description": "Table objects store data with multiple rows and columns, much\nlike in a traditional spreadsheet. Tables can be generated from\nscratch, dynamically, or using data from an existing file.",
+ "example": [],
+ "params": [
+ {
+ "name": "rows",
+ "description": "An array of p5.TableRow objects",
+ "optional": 1,
+ "type": "p5.TableRow[]"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ "p5.TableRow": {
+ "name": "p5.TableRow",
+ "file": "src/io/p5.TableRow.js",
+ "line": 23,
+ "description": "A TableRow object represents a single row of data values,\nstored in columns, from a table.
\nA Table Row contains both an ordered array, and an unordered\nJSON object.
\n",
+ "example": [],
+ "params": [
+ {
+ "name": "str",
+ "description": "optional: populate the row with a\nstring of values, separated by the\nseparator",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "separator",
+ "description": "comma separated values (csv) by default",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ "p5.XML": {
+ "name": "p5.XML",
+ "file": "src/io/p5.XML.js",
+ "line": 51,
+ "description": "XML is a representation of an XML object, able to parse XML code. Use\nloadXML() to load external XML files and create XML objects.",
+ "example": [
+ "\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let children = xml.getChildren('animal');\n\n for (let i = 0; i < children.length; i++) {\n let id = children[i].getNum('id');\n let coloring = children[i].getString('species');\n let name = children[i].getContent();\n print(id + ', ' + coloring + ', ' + name);\n }\n\n describe('no image displayed');\n}\n\n// Sketch prints:\n// 0, Capra hircus, Goat\n// 1, Panthera pardus, Leopard\n// 2, Equus zebra, Zebra\n
"
+ ],
+ "params": [],
+ "is_constructor": 1,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ "p5.Vector": {
+ "name": "p5.Vector",
+ "file": "src/math/p5.Vector.js",
+ "line": 94,
+ "description": "A class to describe a two or three-dimensional vector. A vector is like an\narrow pointing in space. Vectors have both magnitude (length) and\ndirection.
\np5.Vector
objects are often used to program motion because they simplify\nthe math. For example, a moving ball has a position and a velocity.\nPosition describes where the ball is in space. The ball's position vector\nextends from the origin to the ball's center. Velocity describes the ball's\nspeed and the direction it's moving. If the ball is moving straight up, its\nvelocity vector points straight up. Adding the ball's velocity vector to\nits position vector moves it, as in pos.add(vel)
. Vector math relies on\nmethods inside the p5.Vector
class.
\n",
+ "example": [
+ "\n\nlet p1 = createVector(25, 25);\nlet p2 = createVector(75, 75);\n\nstrokeWeight(5);\npoint(p1);\npoint(p2.x, p2.y);\n\ndescribe('Two black dots on a gray square, one at the top left and the other at the bottom right.');\n
\n\n\n\n\nlet pos;\nlet vel;\n\nfunction setup() {\n createCanvas(100, 100);\n pos = createVector(width / 2, height);\n vel = createVector(0, -1);\n}\n\nfunction draw() {\n background(200);\n\n pos.add(vel);\n\n if (pos.y < 0) {\n pos.y = height;\n }\n\n strokeWeight(5);\n point(pos);\n\n describe('A black dot moves from bottom to top on a gray square. The dot reappears at the bottom when it reaches the top.');\n}\n
\n"
+ ],
+ "params": [
+ {
+ "name": "x",
+ "description": "x component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ "p5.Font": {
+ "name": "p5.Font",
+ "file": "src/typography/p5.Font.js",
+ "line": 38,
+ "description": "A class to describe fonts.",
+ "example": [
+ "\n\nlet font;\n\nfunction preload() {\n // Creates a p5.Font object.\n font = loadFont('assets/inconsolata.otf');\n}\n\nfunction setup() {\n fill('deeppink');\n textFont(font);\n textSize(36);\n text('p5*js', 10, 50);\n\n describe('The text \"p5*js\" written in pink on a white background.');\n}\n
\n"
+ ],
+ "params": [
+ {
+ "name": "pInst",
+ "description": "pointer to p5 instance.",
+ "optional": 1,
+ "type": "p5"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "Typography",
+ "submodule": "Loading & Displaying"
+ },
+ "p5.Camera": {
+ "name": "p5.Camera",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 485,
+ "description": "This class describes a camera for use in p5's\n\nWebGL mode. It contains camera position, orientation, and projection\ninformation necessary for rendering a 3D scene.
\nNew p5.Camera objects can be made through the\ncreateCamera() function and controlled through\nthe methods described below. A camera created in this way will use a default\nposition in the scene and a default perspective projection until these\nproperties are changed through the various methods available. It is possible\nto create multiple cameras, in which case the current camera\ncan be set through the setCamera() method.
\nNote:\nThe methods below operate in two coordinate systems: the 'world' coordinate\nsystem describe positions in terms of their relationship to the origin along\nthe X, Y and Z axes whereas the camera's 'local' coordinate system\ndescribes positions from the camera's point of view: left-right, up-down,\nand forward-backward. The move() method,\nfor instance, moves the camera along its own axes, whereas the\nsetPosition()\nmethod sets the camera's position in world-space.
\nThe camera object properties\neyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ
\nwhich describes camera position, orientation, and projection\nare also accessible via the camera object generated using\ncreateCamera()
\n",
+ "example": [
+ "\n\nlet cam;\nlet delta = 0.01;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n normalMaterial();\n cam = createCamera();\n cam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n cam.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n // set initial pan angle\n cam.pan(-0.8);\n describe(\n 'camera view pans left and right across a series of rotating 3D boxes.'\n );\n}\n\nfunction draw() {\n background(200);\n\n // pan camera according to angle 'delta'\n cam.pan(delta);\n\n // every 160 frames, switch direction\n if (frameCount % 160 === 0) {\n delta *= -1;\n }\n\n rotateX(frameCount * 0.01);\n translate(-100, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n}\n
\n"
+ ],
+ "alt": "camera view pans left and right across a series of rotating 3D boxes.",
+ "params": [
+ {
+ "name": "rendererGL",
+ "description": "instance of WebGL renderer",
+ "type": "rendererGL"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ "p5.Framebuffer": {
+ "name": "p5.Framebuffer",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 80,
+ "description": "An object that one can draw to and then read as a texture. While similar\nto a p5.Graphics, using a p5.Framebuffer as a texture will generally run\nmuch faster, as it lives within the same WebGL context as the canvas it\nis created on. It only works in WebGL mode.",
+ "example": [],
+ "params": [
+ {
+ "name": "target",
+ "description": "A p5 global instance or p5.Graphics",
+ "type": "p5.Graphics|p5"
+ },
+ {
+ "name": "settings",
+ "description": "A settings object",
+ "optional": 1,
+ "type": "Object"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "Rendering"
+ },
+ "p5.Geometry": {
+ "name": "p5.Geometry",
+ "file": "src/webgl/p5.Geometry.js",
+ "line": 21,
+ "description": "p5 Geometry class",
+ "example": [],
+ "params": [
+ {
+ "name": "detailX",
+ "description": "number of vertices along the x-axis.",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "detailY",
+ "description": "number of vertices along the y-axis.",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "callback",
+ "description": "function to call upon object instantiation.",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ "p5.Shader": {
+ "name": "p5.Shader",
+ "file": "src/webgl/p5.Shader.js",
+ "line": 19,
+ "description": "Shader class for WEBGL Mode",
+ "example": [],
+ "params": [
+ {
+ "name": "renderer",
+ "description": "an instance of p5.RendererGL that\nwill provide the GL context for this new p5.Shader",
+ "type": "p5.RendererGL"
+ },
+ {
+ "name": "vertSrc",
+ "description": "source code for the vertex shader (as a string)",
+ "type": "String"
+ },
+ {
+ "name": "fragSrc",
+ "description": "source code for the fragment shader (as a string)",
+ "type": "String"
+ }
+ ],
+ "is_constructor": 1,
+ "module": "3D",
+ "submodule": "Material"
+ }
+ },
+ "classitems": [
+ {
+ "itemtype": "property",
+ "name": "namedColors",
+ "file": "src/color/p5.Color.js",
+ "line": 17,
+ "description": "CSS named colors.",
+ "module": "Color",
+ "submodule": "Creating & Reading",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "WHITESPACE",
+ "file": "src/color/p5.Color.js",
+ "line": 176,
+ "description": "These regular expressions are used to build up the patterns for matching\nviable CSS color strings: fragmenting the regexes in this way increases the\nlegibility and comprehensibility of the code.
\nNote that RGB values of .9 are not parsed by IE, but are supported here for\ncolor string consistency.
\n",
+ "module": "Color",
+ "submodule": "Creating & Reading",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "colorPatterns",
+ "file": "src/color/p5.Color.js",
+ "line": 184,
+ "description": "Full color string patterns. The capture groups are necessary.",
+ "module": "Color",
+ "submodule": "Creating & Reading",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "VERSION",
+ "file": "src/core/constants.js",
+ "line": 14,
+ "type": "string",
+ "description": "Version of this p5.js.",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "P2D",
+ "file": "src/core/constants.js",
+ "line": 23,
+ "description": "The default, two-dimensional renderer.",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "WEBGL",
+ "file": "src/core/constants.js",
+ "line": 44,
+ "description": "One of the two render modes in p5.js, used for computationally intensive tasks like 3D rendering and shaders.
\nWEBGL
differs from the default P2D
renderer in the following ways:
\n- Coordinate System - When drawing in
WEBGL
mode, the origin point (0,0,0) is located at the center of the screen, not the top-left corner. See the learn page about coordinates and transformations. - 3D Shapes -
WEBGL
mode can be used to draw 3-dimensional shapes like box(), sphere(), cone(), and more. See the learn page about custom geometry to make more complex objects. - Shape Detail - When drawing in
WEBGL
mode, you can specify how smooth curves should be drawn by using a detail
parameter. See the wiki section about shapes for a more information and an example. - Textures - A texture is like a skin that wraps onto a shape. See the wiki section about textures for examples of mapping images onto surfaces with textures.
- Materials and Lighting -
WEBGL
offers different types of lights like ambientLight() to place around a scene. Materials like specularMaterial() reflect the lighting to convey shape and depth. See the learn page for styling and appearance to experiment with different combinations. - Camera - The viewport of a
WEBGL
sketch can be adjusted by changing camera attributes. See the learn page section about cameras for an explanation of camera controls. - Text -
WEBGL
requires opentype/truetype font files to be preloaded using loadFont(). See the wiki section about text for details, along with a workaround. - Shaders - Shaders are hardware accelerated programs that can be used for a variety of effects and graphics. See the introduction to shaders to get started with shaders in p5.js.
- Graphics Acceleration -
WEBGL
mode uses the graphics card instead of the CPU, so it may help boost the performance of your sketch (example: drawing more shapes on the screen at once).
To learn more about WEBGL mode, check out all the interactive WEBGL tutorials in the \"Learn\" section of this website, or read the wiki article \"Getting started with WebGL in p5\".
\n",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "WEBGL2",
+ "file": "src/core/constants.js",
+ "line": 52,
+ "description": "One of the two possible values of a WebGL canvas (either WEBGL or WEBGL2),\nwhich can be used to determine what capabilities the rendering environment\nhas.",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "ARROW",
+ "file": "src/core/constants.js",
+ "line": 59,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "CROSS",
+ "file": "src/core/constants.js",
+ "line": 64,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "HAND",
+ "file": "src/core/constants.js",
+ "line": 69,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "MOVE",
+ "file": "src/core/constants.js",
+ "line": 74,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "TEXT",
+ "file": "src/core/constants.js",
+ "line": 79,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "WAIT",
+ "file": "src/core/constants.js",
+ "line": 84,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "HALF_PI",
+ "file": "src/core/constants.js",
+ "line": 105,
+ "description": "HALF_PI is a mathematical constant with the value\n1.57079632679489661923. It is half the ratio of the\ncircumference of a circle to its diameter. It is useful in\ncombination with the trigonometric functions sin() and cos().",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "PI",
+ "file": "src/core/constants.js",
+ "line": 123,
+ "description": "PI is a mathematical constant with the value\n3.14159265358979323846. It is the ratio of the circumference\nof a circle to its diameter. It is useful in combination with\nthe trigonometric functions sin() and cos().",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "QUARTER_PI",
+ "file": "src/core/constants.js",
+ "line": 141,
+ "description": "QUARTER_PI is a mathematical constant with the value 0.7853982.\nIt is one quarter the ratio of the circumference of a circle to\nits diameter. It is useful in combination with the trigonometric\nfunctions sin() and cos().",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "TAU",
+ "file": "src/core/constants.js",
+ "line": 159,
+ "description": "TAU is an alias for TWO_PI, a mathematical constant with the\nvalue 6.28318530717958647693. It is twice the ratio of the\ncircumference of a circle to its diameter. It is useful in\ncombination with the trigonometric functions sin() and cos().",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "TWO_PI",
+ "file": "src/core/constants.js",
+ "line": 177,
+ "description": "TWO_PI is a mathematical constant with the value\n6.28318530717958647693. It is twice the ratio of the\ncircumference of a circle to its diameter. It is useful in\ncombination with the trigonometric functions sin() and cos().",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "DEGREES",
+ "file": "src/core/constants.js",
+ "line": 191,
+ "description": "Constant to be used with the angleMode() function, to set the mode in\nwhich p5.js interprets and calculates angles (either DEGREES or RADIANS).",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "RADIANS",
+ "file": "src/core/constants.js",
+ "line": 205,
+ "description": "Constant to be used with the angleMode() function, to set the mode\nin which p5.js interprets and calculates angles (either RADIANS or DEGREES).",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "CORNER",
+ "file": "src/core/constants.js",
+ "line": 214,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "CORNERS",
+ "file": "src/core/constants.js",
+ "line": 219,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "RADIUS",
+ "file": "src/core/constants.js",
+ "line": 224,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "RIGHT",
+ "file": "src/core/constants.js",
+ "line": 229,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "LEFT",
+ "file": "src/core/constants.js",
+ "line": 234,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "CENTER",
+ "file": "src/core/constants.js",
+ "line": 239,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "TOP",
+ "file": "src/core/constants.js",
+ "line": 244,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "BOTTOM",
+ "file": "src/core/constants.js",
+ "line": 249,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "BASELINE",
+ "file": "src/core/constants.js",
+ "line": 255,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "POINTS",
+ "file": "src/core/constants.js",
+ "line": 261,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "LINES",
+ "file": "src/core/constants.js",
+ "line": 267,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "LINE_STRIP",
+ "file": "src/core/constants.js",
+ "line": 273,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "LINE_LOOP",
+ "file": "src/core/constants.js",
+ "line": 279,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "TRIANGLES",
+ "file": "src/core/constants.js",
+ "line": 285,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "TRIANGLE_FAN",
+ "file": "src/core/constants.js",
+ "line": 291,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "TRIANGLE_STRIP",
+ "file": "src/core/constants.js",
+ "line": 297,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "QUADS",
+ "file": "src/core/constants.js",
+ "line": 302,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "QUAD_STRIP",
+ "file": "src/core/constants.js",
+ "line": 308,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "TESS",
+ "file": "src/core/constants.js",
+ "line": 314,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "CLOSE",
+ "file": "src/core/constants.js",
+ "line": 319,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "OPEN",
+ "file": "src/core/constants.js",
+ "line": 324,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "CHORD",
+ "file": "src/core/constants.js",
+ "line": 329,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "PIE",
+ "file": "src/core/constants.js",
+ "line": 334,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "PROJECT",
+ "file": "src/core/constants.js",
+ "line": 340,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "SQUARE",
+ "file": "src/core/constants.js",
+ "line": 346,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "ROUND",
+ "file": "src/core/constants.js",
+ "line": 351,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "BEVEL",
+ "file": "src/core/constants.js",
+ "line": 356,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "MITER",
+ "file": "src/core/constants.js",
+ "line": 361,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "RGB",
+ "file": "src/core/constants.js",
+ "line": 368,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "HSB",
+ "file": "src/core/constants.js",
+ "line": 377,
+ "type": "string",
+ "description": "HSB (hue, saturation, brightness) is a type of color model.\nYou can learn more about it at\nHSB.",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "HSL",
+ "file": "src/core/constants.js",
+ "line": 382,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "AUTO",
+ "file": "src/core/constants.js",
+ "line": 393,
+ "type": "string",
+ "description": "AUTO allows us to automatically set the width or height of an element (but not both),\nbased on the current height and width of the element. Only one parameter can\nbe passed to the size function as AUTO, at a time.",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "ALT",
+ "file": "src/core/constants.js",
+ "line": 400,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "BACKSPACE",
+ "file": "src/core/constants.js",
+ "line": 405,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "CONTROL",
+ "file": "src/core/constants.js",
+ "line": 410,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "DELETE",
+ "file": "src/core/constants.js",
+ "line": 415,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "DOWN_ARROW",
+ "file": "src/core/constants.js",
+ "line": 420,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "ENTER",
+ "file": "src/core/constants.js",
+ "line": 425,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "ESCAPE",
+ "file": "src/core/constants.js",
+ "line": 430,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "LEFT_ARROW",
+ "file": "src/core/constants.js",
+ "line": 435,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "OPTION",
+ "file": "src/core/constants.js",
+ "line": 440,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "RETURN",
+ "file": "src/core/constants.js",
+ "line": 445,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "RIGHT_ARROW",
+ "file": "src/core/constants.js",
+ "line": 450,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "SHIFT",
+ "file": "src/core/constants.js",
+ "line": 455,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "TAB",
+ "file": "src/core/constants.js",
+ "line": 460,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "UP_ARROW",
+ "file": "src/core/constants.js",
+ "line": 465,
+ "type": "number",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "BLEND",
+ "file": "src/core/constants.js",
+ "line": 473,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "REMOVE",
+ "file": "src/core/constants.js",
+ "line": 479,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "ADD",
+ "file": "src/core/constants.js",
+ "line": 485,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "DARKEST",
+ "file": "src/core/constants.js",
+ "line": 492,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "LIGHTEST",
+ "file": "src/core/constants.js",
+ "line": 498,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "DIFFERENCE",
+ "file": "src/core/constants.js",
+ "line": 503,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "SUBTRACT",
+ "file": "src/core/constants.js",
+ "line": 508,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "EXCLUSION",
+ "file": "src/core/constants.js",
+ "line": 513,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "MULTIPLY",
+ "file": "src/core/constants.js",
+ "line": 518,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "SCREEN",
+ "file": "src/core/constants.js",
+ "line": 523,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "REPLACE",
+ "file": "src/core/constants.js",
+ "line": 529,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "OVERLAY",
+ "file": "src/core/constants.js",
+ "line": 534,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "HARD_LIGHT",
+ "file": "src/core/constants.js",
+ "line": 539,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "SOFT_LIGHT",
+ "file": "src/core/constants.js",
+ "line": 544,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "DODGE",
+ "file": "src/core/constants.js",
+ "line": 550,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "BURN",
+ "file": "src/core/constants.js",
+ "line": 556,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "THRESHOLD",
+ "file": "src/core/constants.js",
+ "line": 563,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "GRAY",
+ "file": "src/core/constants.js",
+ "line": 568,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "OPAQUE",
+ "file": "src/core/constants.js",
+ "line": 573,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "INVERT",
+ "file": "src/core/constants.js",
+ "line": 578,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "POSTERIZE",
+ "file": "src/core/constants.js",
+ "line": 583,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "DILATE",
+ "file": "src/core/constants.js",
+ "line": 588,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "ERODE",
+ "file": "src/core/constants.js",
+ "line": 593,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "BLUR",
+ "file": "src/core/constants.js",
+ "line": 598,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "NORMAL",
+ "file": "src/core/constants.js",
+ "line": 605,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "ITALIC",
+ "file": "src/core/constants.js",
+ "line": 610,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "BOLD",
+ "file": "src/core/constants.js",
+ "line": 615,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "BOLDITALIC",
+ "file": "src/core/constants.js",
+ "line": 620,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "CHAR",
+ "file": "src/core/constants.js",
+ "line": 625,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "WORD",
+ "file": "src/core/constants.js",
+ "line": 630,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "LINEAR",
+ "file": "src/core/constants.js",
+ "line": 642,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "QUADRATIC",
+ "file": "src/core/constants.js",
+ "line": 647,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "BEZIER",
+ "file": "src/core/constants.js",
+ "line": 652,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "CURVE",
+ "file": "src/core/constants.js",
+ "line": 657,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "STROKE",
+ "file": "src/core/constants.js",
+ "line": 664,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "FILL",
+ "file": "src/core/constants.js",
+ "line": 669,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "TEXTURE",
+ "file": "src/core/constants.js",
+ "line": 674,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "IMMEDIATE",
+ "file": "src/core/constants.js",
+ "line": 679,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "IMAGE",
+ "file": "src/core/constants.js",
+ "line": 687,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "NEAREST",
+ "file": "src/core/constants.js",
+ "line": 695,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "REPEAT",
+ "file": "src/core/constants.js",
+ "line": 700,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "CLAMP",
+ "file": "src/core/constants.js",
+ "line": 705,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "MIRROR",
+ "file": "src/core/constants.js",
+ "line": 710,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "FLAT",
+ "file": "src/core/constants.js",
+ "line": 717,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "SMOOTH",
+ "file": "src/core/constants.js",
+ "line": 722,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "LANDSCAPE",
+ "file": "src/core/constants.js",
+ "line": 729,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "PORTRAIT",
+ "file": "src/core/constants.js",
+ "line": 734,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "GRID",
+ "file": "src/core/constants.js",
+ "line": 744,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "AXES",
+ "file": "src/core/constants.js",
+ "line": 750,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "LABEL",
+ "file": "src/core/constants.js",
+ "line": 756,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "FALLBACK",
+ "file": "src/core/constants.js",
+ "line": 761,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "CONTAIN",
+ "file": "src/core/constants.js",
+ "line": 767,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "COVER",
+ "file": "src/core/constants.js",
+ "line": 773,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "UNSIGNED_BYTE",
+ "file": "src/core/constants.js",
+ "line": 779,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "UNSIGNED_INT",
+ "file": "src/core/constants.js",
+ "line": 785,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "FLOAT",
+ "file": "src/core/constants.js",
+ "line": 791,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "HALF_FLOAT",
+ "file": "src/core/constants.js",
+ "line": 797,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "RGBA",
+ "file": "src/core/constants.js",
+ "line": 803,
+ "type": "string",
+ "description": "",
+ "module": "Constants",
+ "submodule": "Constants",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "initialize",
+ "file": "src/core/internationalization.js",
+ "line": 125,
+ "description": "Set up our translation function, with loaded languages",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "availableTranslatorLanguages",
+ "file": "src/core/internationalization.js",
+ "line": 170,
+ "description": "Returns a list of languages we have translations loaded for",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "currentTranslatorLanguage",
+ "file": "src/core/internationalization.js",
+ "line": 177,
+ "description": "Returns the current language selected for translation",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "setTranslatorLanguage",
+ "file": "src/core/internationalization.js",
+ "line": 186,
+ "description": "Sets the current language for translation\nReturns a promise that resolved when loading is finished,\nor rejects if it fails.",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "languages",
+ "file": "s",
+ "line": 24,
+ "description": "This is a list of languages that we have added so far.\nIf you have just added a new language (yay!), add its key to the list below\n(en
is english, es
es español). Also add its export to\ndev.js, which is another file in this folder.",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "styleEmpty",
+ "file": "src/core/p5.Renderer2D.js",
+ "line": 11,
+ "type": "string",
+ "description": "p5.Renderer2D\nThe 2D graphics canvas renderer class.\nextends p5.Renderer",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "Filters",
+ "file": "src/image/filters.js",
+ "line": 16,
+ "description": "This module defines the filters for use with image buffers.
\nThis module is basically a collection of functions stored in an object\nas opposed to modules. The functions are destructive, modifying\nthe passed in canvas rather than creating a copy.
\nGenerally speaking users of this module will use the Filters.apply method\non a canvas to create an effect.
\nA number of functions are borrowed/adapted from\nhttp://www.html5rocks.com/en/tutorials/canvas/imagefilters/\nor the java processing implementation.
\n",
+ "class": "p5"
+ },
+ {
+ "itemtype": "property",
+ "name": "frameCount",
+ "file": "src/core/environment.js",
+ "line": 117,
+ "type": "Integer",
+ "module": "Environment",
+ "submodule": "Environment",
+ "class": "p5",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Display the value of\n // frameCount.\n textSize(30);\n textAlign(CENTER, CENTER);\n text(frameCount, 50, 50);\n\n describe('The number 0 written in black in the middle of a gray square.');\n}\n
\n\n\n\n\nfunction setup() {\n // Set the frameRate to 30.\n frameRate(30);\n\n textSize(30);\n textAlign(CENTER, CENTER);\n}\n\nfunction draw() {\n background(200);\n\n // Display the value of\n // frameCount.\n text(frameCount, 50, 50);\n\n describe('A number written in black in the middle of a gray square. Its value increases rapidly.');\n}\n
\n"
+ ],
+ "description": "Tracks the number of frames drawn since the sketch started.
\nframeCount
's value is 0 inside setup(). It\nincrements by 1 each time the code in draw()\nfinishes executing.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "deltaTime",
+ "file": "src/core/environment.js",
+ "line": 162,
+ "type": "Integer",
+ "module": "Environment",
+ "submodule": "Environment",
+ "class": "p5",
+ "example": [
+ "\n\nlet x = 0;\nlet speed = 0.05;\n\nfunction setup() {\n // Set the frameRate to 30.\n frameRate(30);\n}\n\nfunction draw() {\n background(200);\n\n // Use deltaTime to calculate\n // a change in position.\n let deltaX = speed * deltaTime;\n\n // Update the x variable.\n x += deltaX;\n\n // Reset x to 0 if it's\n // greater than 100.\n if (x > 100) {\n x = 0;\n }\n\n // Use x to set the circle's\n // position.\n circle(x, 50, 20);\n\n describe('A white circle moves from left to right on a gray background. It reappears on the left side when it reaches the right side.');\n}\n
\n"
+ ],
+ "description": "Tracks the amount of time, in milliseconds, it took for\ndraw to draw the previous frame. deltaTime
is\nuseful for simulating physics."
+ },
+ {
+ "itemtype": "property",
+ "name": "focused",
+ "file": "src/core/environment.js",
+ "line": 191,
+ "type": "Boolean",
+ "module": "Environment",
+ "submodule": "Environment",
+ "class": "p5",
+ "example": [
+ "\n\n// Open this example in two separate browser\n// windows placed side-by-side to demonstrate.\n\nfunction draw() {\n // Change the background color\n // when the browser window\n // goes in/out of focus.\n if (focused === true) {\n background(0, 255, 0);\n } else {\n background(255, 0, 0);\n }\n\n describe('A square changes color from green to red when the browser window is out of focus.');\n}\n
\n"
+ ],
+ "description": "Tracks whether the browser window is focused and can receive user input.\nfocused
is true
if the window if focused and false
if not."
+ },
+ {
+ "itemtype": "property",
+ "name": "webglVersion",
+ "file": "src/core/environment.js",
+ "line": 545,
+ "type": "String",
+ "module": "Environment",
+ "submodule": "Environment",
+ "class": "p5",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Display the current WebGL version.\n text(webglVersion, 42, 54);\n\n describe('The text \"p2d\" written in black on a gray background.');\n}\n
\n\n\n\n\nlet font;\n\nfunction preload() {\n // Load a font to use.\n font = loadFont('assets/inconsolata.otf');\n}\n\nfunction setup() {\n // Create a canvas using WEBGL mode.\n createCanvas(100, 50, WEBGL);\n background(200);\n\n // Display the current WebGL version.\n fill(0);\n textFont(font);\n text(webglVersion, -15, 5);\n\n describe('The text \"webgl2\" written in black on a gray background.');\n}\n
\n\n\n\n\nlet font;\n\nfunction preload() {\n // Load a font to use.\n font = loadFont('assets/inconsolata.otf');\n}\n\nfunction setup() {\n // Create a canvas using WEBGL mode.\n createCanvas(100, 50, WEBGL);\n\n // Set WebGL to version 1.\n setAttributes({ version: 1 });\n\n background(200);\n\n // Display the current WebGL version.\n fill(0);\n textFont(font);\n text(webglVersion, -14, 5);\n\n describe('The text \"webgl\" written in black on a gray background.');\n}\n
\n"
+ ],
+ "description": "A string variable with the WebGL version in use. Its value equals one of\nthe followin string constants:
\nWEBGL2
whose value is 'webgl2'
,WEBGL
whose value is 'webgl'
, orP2D
whose value is 'p2d'
. This is the default for 2D sketches.
See setAttributes() for ways to set the\nWebGL version.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "displayWidth",
+ "file": "src/core/environment.js",
+ "line": 575,
+ "type": "Number",
+ "module": "Environment",
+ "submodule": "Environment",
+ "class": "p5",
+ "example": [
+ "\n\nfunction setup() {\n // Set the canvas' width and height\n // using the display's dimensions.\n createCanvas(displayWidth, displayHeight);\n\n background(200);\n\n describe('A gray canvas that is the same size as the display.');\n}\n
\n"
+ ],
+ "alt": "This example does not render anything.",
+ "description": "A numeric variable that stores the width of the screen display. Its value\ndepends on the current pixelDensity().\ndisplayWidth
is useful for running full-screen programs.
\nNote: The actual screen width can be computed as\ndisplayWidth * pixelDensity()
.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "displayHeight",
+ "file": "src/core/environment.js",
+ "line": 605,
+ "type": "Number",
+ "module": "Environment",
+ "submodule": "Environment",
+ "class": "p5",
+ "example": [
+ "\n\nfunction setup() {\n // Set the canvas' width and height\n // using the display's dimensions.\n createCanvas(displayWidth, displayHeight);\n\n background(200);\n\n describe('A gray canvas that is the same size as the display.');\n}\n
\n"
+ ],
+ "alt": "This example does not render anything.",
+ "description": "A numeric variable that stores the height of the screen display. Its value\ndepends on the current pixelDensity().\ndisplayHeight
is useful for running full-screen programs.
\nNote: The actual screen height can be computed as\ndisplayHeight * pixelDensity()
.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "windowWidth",
+ "file": "src/core/environment.js",
+ "line": 632,
+ "type": "Number",
+ "module": "Environment",
+ "submodule": "Environment",
+ "class": "p5",
+ "example": [
+ "\n\nfunction setup() {\n // Set the canvas' width and height\n // using the browser's dimensions.\n createCanvas(windowWidth, windowHeight);\n\n background(200);\n\n describe('A gray canvas that takes up the entire browser window.');\n}\n
\n"
+ ],
+ "alt": "This example does not render anything.",
+ "description": "A numeric variable that stores the width of the browser's\nlayout viewport.\nThis viewport is the area within the browser that's available for drawing."
+ },
+ {
+ "itemtype": "property",
+ "name": "windowHeight",
+ "file": "src/core/environment.js",
+ "line": 659,
+ "type": "Number",
+ "module": "Environment",
+ "submodule": "Environment",
+ "class": "p5",
+ "example": [
+ "\n\nfunction setup() {\n // Set the canvas' width and height\n // using the browser's dimensions.\n createCanvas(windowWidth, windowHeight);\n\n background(200);\n\n describe('A gray canvas that takes up the entire browser window.');\n}\n
\n"
+ ],
+ "alt": "This example does not render anything.",
+ "description": "A numeric variable that stores the height of the browser's\nlayout viewport.\nThis viewport is the area within the browser that's available for drawing."
+ },
+ {
+ "itemtype": "property",
+ "name": "width",
+ "file": "src/core/environment.js",
+ "line": 817,
+ "type": "Number",
+ "module": "Environment",
+ "submodule": "Environment",
+ "class": "p5",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Display the canvas' width.\n text(width, 42, 54);\n\n describe('The number 100 written in black on a gray square.');\n}\n
\n\n\n\n\nfunction setup() {\n createCanvas(50, 100);\n\n background(200);\n\n // Display the canvas' width.\n text(width, 21, 54);\n\n describe('The number 50 written in black on a gray rectangle.');\n}\n
\n\n\n\n\nfunction setup() {\n createCanvas(100, 100);\n\n background(200);\n\n // Display the canvas' width.\n text(width, 42, 54);\n\n describe('The number 100 written in black on a gray square. When the mouse is pressed, the square becomes a rectangle and the number becomes 50.');\n}\n\n// If the mouse is pressed, reisze\n// the canvas and display its new\n// width.\nfunction mousePressed() {\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n resizeCanvas(50, 100);\n background(200);\n text(width, 21, 54);\n }\n}\n
\n"
+ ],
+ "description": "A numeric variable that stores the width of the drawing canvas. Its\ndefault value is 100.
\nCalling createCanvas() or\nresizeCanvas() changes the value of\nwidth
. Calling noCanvas() sets its value to\n0.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "height",
+ "file": "src/core/environment.js",
+ "line": 886,
+ "type": "Number",
+ "module": "Environment",
+ "submodule": "Environment",
+ "class": "p5",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Display the canvas' height.\n text(height, 42, 54);\n\n describe('The number 100 written in black on a gray square.');\n}\n
\n\n\n\n\nfunction setup() {\n createCanvas(100, 50);\n\n background(200);\n\n // Display the canvas' height.\n text(height, 42, 27);\n\n describe('The number 50 written in black on a gray rectangle.');\n}\n
\n\n\n\n\nfunction setup() {\n createCanvas(100, 100);\n\n background(200);\n\n // Display the canvas' height.\n text(height, 42, 54);\n\n describe('The number 100 written in black on a gray square. When the mouse is pressed, the square becomes a rectangle and the number becomes 50.');\n}\n\n// If the mouse is pressed, reisze\n// the canvas and display its new\n// height.\nfunction mousePressed() {\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n resizeCanvas(100, 50);\n background(200);\n text(height, 42, 27);\n }\n}\n
\n"
+ ],
+ "description": "A numeric variable that stores the height of the drawing canvas. Its\ndefault value is 100.
\nCalling createCanvas() or\nresizeCanvas() changes the value of\nheight
. Calling noCanvas() sets its value to\n0.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "deviceOrientation",
+ "file": "src/events/acceleration.js",
+ "line": 21,
+ "type": "Constant",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [],
+ "description": "The system variable deviceOrientation always contains the orientation of\nthe device. The value of this variable will either be set 'landscape'\nor 'portrait'. If no data is available it will be set to 'undefined'.\neither LANDSCAPE or PORTRAIT."
+ },
+ {
+ "itemtype": "property",
+ "name": "accelerationX",
+ "file": "src/events/acceleration.js",
+ "line": 44,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [
+ "\n\n// Move a touchscreen device to register\n// acceleration changes.\nfunction draw() {\n background(220, 50);\n fill('magenta');\n ellipse(width / 2, height / 2, accelerationX);\n describe('Magnitude of device acceleration is displayed as ellipse size.');\n}\n
\n"
+ ],
+ "description": "The system variable accelerationX always contains the acceleration of the\ndevice along the x axis. Value is represented as meters per second squared."
+ },
+ {
+ "itemtype": "property",
+ "name": "accelerationY",
+ "file": "src/events/acceleration.js",
+ "line": 66,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [
+ "\n\n// Move a touchscreen device to register\n// acceleration changes.\nfunction draw() {\n background(220, 50);\n fill('magenta');\n ellipse(width / 2, height / 2, accelerationY);\n describe('Magnitude of device acceleration is displayed as ellipse size');\n}\n
\n"
+ ],
+ "description": "The system variable accelerationY always contains the acceleration of the\ndevice along the y axis. Value is represented as meters per second squared."
+ },
+ {
+ "itemtype": "property",
+ "name": "accelerationZ",
+ "file": "src/events/acceleration.js",
+ "line": 89,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [
+ "\n\n// Move a touchscreen device to register\n// acceleration changes.\nfunction draw() {\n background(220, 50);\n fill('magenta');\n ellipse(width / 2, height / 2, accelerationZ);\n describe('Magnitude of device acceleration is displayed as ellipse size');\n}\n
\n"
+ ],
+ "description": "The system variable accelerationZ always contains the acceleration of the\ndevice along the z axis. Value is represented as meters per second squared."
+ },
+ {
+ "itemtype": "property",
+ "name": "pAccelerationX",
+ "file": "src/events/acceleration.js",
+ "line": 99,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [],
+ "description": "The system variable pAccelerationX always contains the acceleration of the\ndevice along the x axis in the frame previous to the current frame. Value\nis represented as meters per second squared."
+ },
+ {
+ "itemtype": "property",
+ "name": "pAccelerationY",
+ "file": "src/events/acceleration.js",
+ "line": 109,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [],
+ "description": "The system variable pAccelerationY always contains the acceleration of the\ndevice along the y axis in the frame previous to the current frame. Value\nis represented as meters per second squared."
+ },
+ {
+ "itemtype": "property",
+ "name": "pAccelerationZ",
+ "file": "src/events/acceleration.js",
+ "line": 119,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [],
+ "description": "The system variable pAccelerationZ always contains the acceleration of the\ndevice along the z axis in the frame previous to the current frame. Value\nis represented as meters per second squared."
+ },
+ {
+ "itemtype": "property",
+ "name": "rotationX",
+ "file": "src/events/acceleration.js",
+ "line": 163,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n}\n\nfunction draw() {\n background(200);\n //rotateZ(radians(rotationZ));\n rotateX(radians(rotationX));\n //rotateY(radians(rotationY));\n box(200, 200, 200);\n describe(`red horizontal line right, green vertical line bottom.\n black background.`);\n}\n
\n"
+ ],
+ "description": "The system variable rotationX always contains the rotation of the\ndevice along the x axis. If the sketch \nangleMode() is set to DEGREES, the value will be -180 to 180. If\nit is set to RADIANS, the value will be -PI to PI.
\nNote: The order the rotations are called is important, ie. if used\ntogether, it must be called in the order Z-X-Y or there might be\nunexpected behaviour.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "rotationY",
+ "file": "src/events/acceleration.js",
+ "line": 196,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n}\n\nfunction draw() {\n background(200);\n //rotateZ(radians(rotationZ));\n //rotateX(radians(rotationX));\n rotateY(radians(rotationY));\n box(200, 200, 200);\n describe(`red horizontal line right, green vertical line bottom.\n black background.`);\n}\n
\n"
+ ],
+ "description": "The system variable rotationY always contains the rotation of the\ndevice along the y axis. If the sketch \nangleMode() is set to DEGREES, the value will be -90 to 90. If\nit is set to RADIANS, the value will be -PI/2 to PI/2.
\nNote: The order the rotations are called is important, ie. if used\ntogether, it must be called in the order Z-X-Y or there might be\nunexpected behaviour.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "rotationZ",
+ "file": "src/events/acceleration.js",
+ "line": 233,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n}\n\nfunction draw() {\n background(200);\n rotateZ(radians(rotationZ));\n //rotateX(radians(rotationX));\n //rotateY(radians(rotationY));\n box(200, 200, 200);\n describe(`red horizontal line right, green vertical line bottom.\n black background.`);\n}\n
\n"
+ ],
+ "description": "The system variable rotationZ always contains the rotation of the\ndevice along the z axis. If the sketch \nangleMode() is set to DEGREES, the value will be 0 to 360. If\nit is set to RADIANS, the value will be 0 to 2*PI.
\nUnlike rotationX and rotationY, this variable is available for devices\nwith a built-in compass only.
\nNote: The order the rotations are called is important, ie. if used\ntogether, it must be called in the order Z-X-Y or there might be\nunexpected behaviour.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "pRotationX",
+ "file": "src/events/acceleration.js",
+ "line": 277,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [
+ "\n\n// A simple if statement looking at whether\n// rotationX - pRotationX < 0 is true or not will be\n// sufficient for determining the rotate direction\n// in most cases.\n\n// Some extra logic is needed to account for cases where\n// the angles wrap around.\nlet rotateDirection = 'clockwise';\n\n// Simple range conversion to make things simpler.\n// This is not absolutely necessary but the logic\n// will be different in that case.\n\nlet rX = rotationX + 180;\nlet pRX = pRotationX + 180;\n\nif ((rX - pRX > 0 && rX - pRX < 270) || rX - pRX < -270) {\n rotateDirection = 'clockwise';\n} else if (rX - pRX < 0 || rX - pRX > 270) {\n rotateDirection = 'counter-clockwise';\n}\n\nprint(rotateDirection);\ndescribe('no image to display.');\n
\n"
+ ],
+ "description": "The system variable pRotationX always contains the rotation of the\ndevice along the x axis in the frame previous to the current frame.\nIf the sketch angleMode() is set to DEGREES,\nthe value will be -180 to 180. If it is set to RADIANS, the value will\nbe -PI to PI.
\npRotationX can also be used with rotationX to determine the rotate\ndirection of the device along the X-axis.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "pRotationY",
+ "file": "src/events/acceleration.js",
+ "line": 320,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [
+ "\n\n// A simple if statement looking at whether\n// rotationY - pRotationY < 0 is true or not will be\n// sufficient for determining the rotate direction\n// in most cases.\n\n// Some extra logic is needed to account for cases where\n// the angles wrap around.\nlet rotateDirection = 'clockwise';\n\n// Simple range conversion to make things simpler.\n// This is not absolutely necessary but the logic\n// will be different in that case.\n\nlet rY = rotationY + 180;\nlet pRY = pRotationY + 180;\n\nif ((rY - pRY > 0 && rY - pRY < 270) || rY - pRY < -270) {\n rotateDirection = 'clockwise';\n} else if (rY - pRY < 0 || rY - pRY > 270) {\n rotateDirection = 'counter-clockwise';\n}\nprint(rotateDirection);\ndescribe('no image to display.');\n
\n"
+ ],
+ "description": "The system variable pRotationY always contains the rotation of the\ndevice along the y axis in the frame previous to the current frame.\nIf the sketch angleMode() is set to DEGREES,\nthe value will be -90 to 90. If it is set to RADIANS, the value will\nbe -PI/2 to PI/2.
\npRotationY can also be used with rotationY to determine the rotate\ndirection of the device along the Y-axis.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "pRotationZ",
+ "file": "src/events/acceleration.js",
+ "line": 359,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [
+ "\n\n// A simple if statement looking at whether\n// rotationZ - pRotationZ < 0 is true or not will be\n// sufficient for determining the rotate direction\n// in most cases.\n\n// Some extra logic is needed to account for cases where\n// the angles wrap around.\nlet rotateDirection = 'clockwise';\n\nif (\n (rotationZ - pRotationZ > 0 && rotationZ - pRotationZ < 270) ||\n rotationZ - pRotationZ < -270\n) {\n rotateDirection = 'clockwise';\n} else if (rotationZ - pRotationZ < 0 || rotationZ - pRotationZ > 270) {\n rotateDirection = 'counter-clockwise';\n}\nprint(rotateDirection);\ndescribe('no image to display.');\n
\n"
+ ],
+ "description": "The system variable pRotationZ always contains the rotation of the\ndevice along the z axis in the frame previous to the current frame.\nIf the sketch angleMode() is set to DEGREES,\nthe value will be 0 to 360. If it is set to RADIANS, the value will\nbe 0 to 2*PI.
\npRotationZ can also be used with rotationZ to determine the rotate\ndirection of the device along the Z-axis.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "turnAxis",
+ "file": "src/events/acceleration.js",
+ "line": 413,
+ "type": "String",
+ "module": "Events",
+ "submodule": "Acceleration",
+ "class": "p5",
+ "example": [
+ "\n\n// Run this example on a mobile device\n// Rotate the device by 90 degrees in the\n// X-axis to change the value.\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe(`50-by-50 black rect in center of canvas.\n turns white on mobile when device turns`);\n describe(`50-by-50 black rect in center of canvas.\n turns white on mobile when x-axis turns`);\n}\nfunction deviceTurned() {\n if (turnAxis === 'X') {\n if (value === 0) {\n value = 255;\n } else if (value === 255) {\n value = 0;\n }\n }\n}\n
\n"
+ ],
+ "description": "When a device is rotated, the axis that triggers the deviceTurned()\nmethod is stored in the turnAxis variable. The turnAxis variable is only defined within\nthe scope of deviceTurned()."
+ },
+ {
+ "itemtype": "property",
+ "name": "keyIsPressed",
+ "file": "src/events/keyboard.js",
+ "line": 31,
+ "type": "Boolean",
+ "module": "Events",
+ "submodule": "Keyboard",
+ "class": "p5",
+ "example": [
+ "\n\nfunction draw() {\n if (keyIsPressed === true) {\n fill(0);\n } else {\n fill(255);\n }\n rect(25, 25, 50, 50);\n describe('50-by-50 white rect that turns black on keypress.');\n}\n
\n"
+ ],
+ "description": "The boolean system variable keyIsPressed is true if any key is pressed\nand false if no keys are pressed."
+ },
+ {
+ "itemtype": "property",
+ "name": "key",
+ "file": "src/events/keyboard.js",
+ "line": 58,
+ "type": "String",
+ "module": "Events",
+ "submodule": "Keyboard",
+ "class": "p5",
+ "example": [
+ "\n// Click any key to display it!\n// (Not Guaranteed to be Case Sensitive)\nfunction setup() {\n fill(245, 123, 158);\n textSize(50);\n}\n\nfunction draw() {\n background(200);\n text(key, 33, 65); // Display last key pressed.\n describe('canvas displays any key value that is pressed in pink font.');\n}\n
"
+ ],
+ "description": "The system variable key always contains the value of the most recent\nkey on the keyboard that was typed. To get the proper capitalization, it\nis best to use it within keyTyped(). For non-ASCII keys, use the keyCode\nvariable."
+ },
+ {
+ "itemtype": "property",
+ "name": "keyCode",
+ "file": "src/events/keyboard.js",
+ "line": 96,
+ "type": "Integer",
+ "module": "Events",
+ "submodule": "Keyboard",
+ "class": "p5",
+ "example": [
+ "\nlet fillVal = 126;\nfunction draw() {\n fill(fillVal);\n rect(25, 25, 50, 50);\n describe(`Grey rect center. turns white when up arrow pressed and black when down.\n Display key pressed and its keyCode in a yellow box.`);\n}\n\nfunction keyPressed() {\n if (keyCode === UP_ARROW) {\n fillVal = 255;\n } else if (keyCode === DOWN_ARROW) {\n fillVal = 0;\n }\n}\n
\n\nfunction draw() {}\nfunction keyPressed() {\n background('yellow');\n text(`${key} ${keyCode}`, 10, 40);\n print(key, ' ', keyCode);\n}\n
"
+ ],
+ "description": "The variable keyCode is used to detect special keys such as BACKSPACE,\nDELETE, ENTER, RETURN, TAB, ESCAPE, SHIFT, CONTROL, OPTION, ALT, UP_ARROW,\nDOWN_ARROW, LEFT_ARROW, RIGHT_ARROW.\nYou can also check for custom keys by looking up the keyCode of any key\non a site like this: keycode.info."
+ },
+ {
+ "itemtype": "property",
+ "name": "movedX",
+ "file": "src/events/mouse.js",
+ "line": 41,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Mouse",
+ "class": "p5",
+ "example": [
+ "\n\nlet x = 50;\nfunction setup() {\n rectMode(CENTER);\n}\n\nfunction draw() {\n if (x > 48) {\n x -= 2;\n } else if (x < 48) {\n x += 2;\n }\n x += floor(movedX / 5);\n background(237, 34, 93);\n fill(0);\n rect(x, 50, 50, 50);\n describe(`box moves left and right according to mouse movement\n then slowly back towards the center`);\n}\n
\n"
+ ],
+ "description": "The variable movedX contains the horizontal movement of the mouse since the last frame"
+ },
+ {
+ "itemtype": "property",
+ "name": "movedY",
+ "file": "src/events/mouse.js",
+ "line": 71,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Mouse",
+ "class": "p5",
+ "example": [
+ "\n\nlet y = 50;\nfunction setup() {\n rectMode(CENTER);\n}\n\nfunction draw() {\n if (y > 48) {\n y -= 2;\n } else if (y < 48) {\n y += 2;\n }\n y += floor(movedY / 5);\n background(237, 34, 93);\n fill(0);\n rect(50, y, 50, 50);\n describe(`box moves up and down according to mouse movement then\n slowly back towards the center`);\n}\n
\n"
+ ],
+ "description": "The variable movedY contains the vertical movement of the mouse since the last frame"
+ },
+ {
+ "itemtype": "property",
+ "name": "mouseX",
+ "file": "src/events/mouse.js",
+ "line": 102,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Mouse",
+ "class": "p5",
+ "example": [
+ "\n\n// Move the mouse across the canvas\nfunction draw() {\n background(244, 248, 252);\n line(mouseX, 0, mouseX, 100);\n describe('horizontal black line moves left and right with mouse x-position');\n}\n
\n"
+ ],
+ "description": "The system variable mouseX always contains the current horizontal\nposition of the mouse, relative to (0, 0) of the canvas. The value at\nthe top-left corner is (0, 0) for 2-D and (-width/2, -height/2) for WebGL.\nIf touch is used instead of mouse input, mouseX will hold the x value\nof the most recent touch point."
+ },
+ {
+ "itemtype": "property",
+ "name": "mouseY",
+ "file": "src/events/mouse.js",
+ "line": 126,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Mouse",
+ "class": "p5",
+ "example": [
+ "\n\n// Move the mouse across the canvas\nfunction draw() {\n background(244, 248, 252);\n line(0, mouseY, 100, mouseY);\n describe('vertical black line moves up and down with mouse y-position');\n}\n
\n"
+ ],
+ "description": "The system variable mouseY always contains the current vertical\nposition of the mouse, relative to (0, 0) of the canvas. The value at\nthe top-left corner is (0, 0) for 2-D and (-width/2, -height/2) for WebGL.\nIf touch is used instead of mouse input, mouseY will hold the y value\nof the most recent touch point."
+ },
+ {
+ "itemtype": "property",
+ "name": "pmouseX",
+ "file": "src/events/mouse.js",
+ "line": 157,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Mouse",
+ "class": "p5",
+ "example": [
+ "\n\n// Move the mouse across the canvas to leave a trail\nfunction setup() {\n //slow down the frameRate to make it more visible\n frameRate(10);\n}\n\nfunction draw() {\n background(244, 248, 252);\n line(mouseX, mouseY, pmouseX, pmouseY);\n print(pmouseX + ' -> ' + mouseX);\n describe(`line trail is created from cursor movements.\n faster movement make longer line.`);\n}\n
\n"
+ ],
+ "description": "The system variable pmouseX always contains the horizontal position of\nthe mouse or finger in the frame previous to the current frame, relative to\n(0, 0) of the canvas. The value at the top-left corner is (0, 0) for 2-D and\n(-width/2, -height/2) for WebGL. Note: pmouseX will be reset to the current mouseX\nvalue at the start of each touch event."
+ },
+ {
+ "itemtype": "property",
+ "name": "pmouseY",
+ "file": "src/events/mouse.js",
+ "line": 187,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Mouse",
+ "class": "p5",
+ "example": [
+ "\n\nfunction draw() {\n background(237, 34, 93);\n fill(0);\n //draw a square only if the mouse is not moving\n if (mouseY === pmouseY && mouseX === pmouseX) {\n rect(20, 20, 60, 60);\n }\n\n print(pmouseY + ' -> ' + mouseY);\n describe(`60-by-60 black rect center, fuchsia background.\n rect flickers on mouse movement`);\n}\n
\n"
+ ],
+ "description": "The system variable pmouseY always contains the vertical position of\nthe mouse or finger in the frame previous to the current frame, relative to\n(0, 0) of the canvas. The value at the top-left corner is (0, 0) for 2-D and\n(-width/2, -height/2) for WebGL. Note: pmouseY will be reset to the current mouseY\nvalue at the start of each touch event."
+ },
+ {
+ "itemtype": "property",
+ "name": "winMouseX",
+ "file": "src/events/mouse.js",
+ "line": 224,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Mouse",
+ "class": "p5",
+ "example": [
+ "\n\nlet myCanvas;\n\nfunction setup() {\n //use a variable to store a pointer to the canvas\n myCanvas = createCanvas(100, 100);\n let body = document.getElementsByTagName('body')[0];\n myCanvas.parent(body);\n}\n\nfunction draw() {\n background(237, 34, 93);\n fill(0);\n\n //move the canvas to the horizontal mouse position\n //relative to the window\n myCanvas.position(winMouseX + 1, windowHeight / 2);\n\n //the y of the square is relative to the canvas\n rect(20, mouseY, 60, 60);\n describe(`60-by-60 black rect y moves with mouse y and fuchsia\n canvas moves with mouse x`);\n}\n
\n"
+ ],
+ "description": "The system variable winMouseX always contains the current horizontal\nposition of the mouse, relative to (0, 0) of the window."
+ },
+ {
+ "itemtype": "property",
+ "name": "winMouseY",
+ "file": "src/events/mouse.js",
+ "line": 261,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Mouse",
+ "class": "p5",
+ "example": [
+ "\n\nlet myCanvas;\n\nfunction setup() {\n //use a variable to store a pointer to the canvas\n myCanvas = createCanvas(100, 100);\n let body = document.getElementsByTagName('body')[0];\n myCanvas.parent(body);\n}\n\nfunction draw() {\n background(237, 34, 93);\n fill(0);\n\n //move the canvas to the vertical mouse position\n //relative to the window\n myCanvas.position(windowWidth / 2, winMouseY + 1);\n\n //the x of the square is relative to the canvas\n rect(mouseX, 20, 60, 60);\n describe(`60-by-60 black rect x moves with mouse x and\n fuchsia canvas y moves with mouse y`);\n}\n
\n"
+ ],
+ "description": "The system variable winMouseY always contains the current vertical\nposition of the mouse, relative to (0, 0) of the window."
+ },
+ {
+ "itemtype": "property",
+ "name": "pwinMouseX",
+ "file": "src/events/mouse.js",
+ "line": 300,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Mouse",
+ "class": "p5",
+ "example": [
+ "\n\nlet myCanvas;\n\nfunction setup() {\n //use a variable to store a pointer to the canvas\n myCanvas = createCanvas(100, 100);\n noStroke();\n fill(237, 34, 93);\n}\n\nfunction draw() {\n clear();\n //the difference between previous and\n //current x position is the horizontal mouse speed\n let speed = abs(winMouseX - pwinMouseX);\n //change the size of the circle\n //according to the horizontal speed\n ellipse(50, 50, 10 + speed * 5, 10 + speed * 5);\n //move the canvas to the mouse position\n myCanvas.position(winMouseX + 1, winMouseY + 1);\n describe(`fuchsia ellipse moves with mouse x and y.\n Grows and shrinks with mouse speed`);\n}\n
\n"
+ ],
+ "description": "The system variable pwinMouseX always contains the horizontal position\nof the mouse in the frame previous to the current frame, relative to\n(0, 0) of the window. Note: pwinMouseX will be reset to the current winMouseX\nvalue at the start of each touch event."
+ },
+ {
+ "itemtype": "property",
+ "name": "pwinMouseY",
+ "file": "src/events/mouse.js",
+ "line": 339,
+ "type": "Number",
+ "module": "Events",
+ "submodule": "Mouse",
+ "class": "p5",
+ "example": [
+ "\n\nlet myCanvas;\n\nfunction setup() {\n //use a variable to store a pointer to the canvas\n myCanvas = createCanvas(100, 100);\n noStroke();\n fill(237, 34, 93);\n}\n\nfunction draw() {\n clear();\n //the difference between previous and\n //current y position is the vertical mouse speed\n let speed = abs(winMouseY - pwinMouseY);\n //change the size of the circle\n //according to the vertical speed\n ellipse(50, 50, 10 + speed * 5, 10 + speed * 5);\n //move the canvas to the mouse position\n myCanvas.position(winMouseX + 1, winMouseY + 1);\n describe(`fuchsia ellipse moves with mouse x and y.\n Grows and shrinks with mouse speed`);\n}\n
\n"
+ ],
+ "description": "The system variable pwinMouseY always contains the vertical position of\nthe mouse in the frame previous to the current frame, relative to (0, 0)\nof the window. Note: pwinMouseY will be reset to the current winMouseY\nvalue at the start of each touch event."
+ },
+ {
+ "itemtype": "property",
+ "name": "mouseButton",
+ "file": "src/events/mouse.js",
+ "line": 376,
+ "type": "Constant",
+ "module": "Events",
+ "submodule": "Mouse",
+ "class": "p5",
+ "example": [
+ "\n\nfunction draw() {\n background(237, 34, 93);\n fill(0);\n\n if (mouseIsPressed === true) {\n if (mouseButton === LEFT) {\n ellipse(50, 50, 50, 50);\n }\n if (mouseButton === RIGHT) {\n rect(25, 25, 50, 50);\n }\n if (mouseButton === CENTER) {\n triangle(23, 75, 50, 20, 78, 75);\n }\n }\n\n print(mouseButton);\n describe(`50-by-50 black ellipse appears on center of fuchsia\n canvas on mouse click/press.`);\n}\n
\n"
+ ],
+ "description": "p5 automatically tracks if the mouse button is pressed and which\nbutton is pressed. The value of the system variable mouseButton is either\nLEFT, RIGHT, or CENTER depending on which button was pressed last.\nWarning: different browsers may track mouseButton differently."
+ },
+ {
+ "itemtype": "property",
+ "name": "mouseIsPressed",
+ "file": "src/events/mouse.js",
+ "line": 405,
+ "type": "Boolean",
+ "module": "Events",
+ "submodule": "Mouse",
+ "class": "p5",
+ "example": [
+ "\n\nfunction draw() {\n background(237, 34, 93);\n fill(0);\n\n if (mouseIsPressed === true) {\n ellipse(50, 50, 50, 50);\n } else {\n rect(25, 25, 50, 50);\n }\n\n print(mouseIsPressed);\n describe(`black 50-by-50 rect becomes ellipse with mouse click/press.\n fuchsia background.`);\n}\n
\n"
+ ],
+ "description": "The boolean system variable mouseIsPressed is true if the mouse is pressed\nand false if not."
+ },
+ {
+ "itemtype": "property",
+ "name": "touches",
+ "file": "src/events/touch.js",
+ "line": 38,
+ "type": "Object[]",
+ "module": "Events",
+ "submodule": "Touch",
+ "class": "p5",
+ "example": [
+ "\n\n// On a touchscreen device, touch\n// the canvas using one or more fingers\n// at the same time\nfunction draw() {\n clear();\n let display = touches.length + ' touches';\n text(display, 5, 10);\n describe(`Number of touches currently registered are displayed\n on the canvas`);\n}\n
\n"
+ ],
+ "description": "The system variable touches[] contains an array of the positions of all\ncurrent touch points, relative to (0, 0) of the canvas, and IDs identifying a\nunique touch as it moves. Each element in the array is an object with x, y,\nand id properties.
\nThe touches[] array is not supported on Safari and IE on touch-based\ndesktops (laptops).
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "pixels",
+ "file": "src/image/pixels.js",
+ "line": 104,
+ "type": "Number[]",
+ "module": "Image",
+ "submodule": "Pixels",
+ "class": "p5",
+ "example": [
+ "\n\nloadPixels();\nlet x = 50;\nlet y = 50;\nlet d = pixelDensity();\nfor (let i = 0; i < d; i += 1) {\n for (let j = 0; j < d; j += 1) {\n let index = 4 * ((y * d + j) * width * d + (x * d + i));\n // Red.\n pixels[index] = 0;\n // Green.\n pixels[index + 1] = 0;\n // Blue.\n pixels[index + 2] = 0;\n // Alpha.\n pixels[index + 3] = 255;\n }\n}\nupdatePixels();\n\ndescribe('A black dot in the middle of a gray rectangle.');\n
\n\n\n\n\nloadPixels();\nlet d = pixelDensity();\nlet halfImage = 4 * (d * width) * (d * height / 2);\nfor (let i = 0; i < halfImage; i += 4) {\n // Red.\n pixels[i] = 255;\n // Green.\n pixels[i + 1] = 0;\n // Blue.\n pixels[i + 2] = 0;\n // Alpha.\n pixels[i + 3] = 255;\n}\nupdatePixels();\n\ndescribe('A red rectangle drawn above a gray rectangle.');\n
\n\n\n\n\nlet pink = color(255, 102, 204);\nloadPixels();\nlet d = pixelDensity();\nlet halfImage = 4 * (d * width) * (d * height / 2);\nfor (let i = 0; i < halfImage; i += 4) {\n pixels[i] = red(pink);\n pixels[i + 1] = green(pink);\n pixels[i + 2] = blue(pink);\n pixels[i + 3] = alpha(pink);\n}\nupdatePixels();\n\ndescribe('A pink rectangle drawn above a gray rectangle.');\n
\n"
+ ],
+ "description": "An array containing the color of each pixel on the canvas. Colors are\nstored as numbers representing red, green, blue, and alpha (RGBA) values.\npixels
is a one-dimensional array for performance reasons.
\nEach pixel occupies four elements in the pixels
array, one for each RGBA\nvalue. For example, the pixel at coordinates (0, 0) stores its RGBA values\nat pixels[0]
, pixels[1]
, pixels[2]
, and pixels[3]
, respectively.\nThe next pixel at coordinates (1, 0) stores its RGBA values at pixels[4]
,\npixels[5]
, pixels[6]
, and pixels[7]
. And so on. The pixels
array\nfor a 100×100 canvas has 100 × 100 × 4 = 40,000 elements.
\nSome displays use several smaller pixels to set the color at a single\npoint. The pixelDensity() function returns\nthe pixel density of the canvas. High density displays often have a\npixelDensity() of 2. On such a display, the\npixels
array for a 100×100 canvas has 200 × 200 × 4 =\n160,000 elements.
\nAccessing the RGBA values for a point on the canvas requires a little math\nas shown below. The loadPixels() function\nmust be called before accessing the pixels
array. The\nupdatePixels() function must be called\nafter any changes are made.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "disableFriendlyErrors",
+ "file": "src/core/main.js",
+ "line": 777,
+ "type": "Boolean",
+ "module": "Structure",
+ "submodule": "Structure",
+ "class": "p5",
+ "example": [
+ "\np5.disableFriendlyErrors = true;\n\nfunction setup() {\n createCanvas(100, 50);\n}\n
"
+ ],
+ "description": "Turn off some features of the friendly error system (FES), which can give\na significant boost to performance when needed.
\nNote that this will disable the parts of the FES that cause performance\nslowdown (like argument checking). Friendly errors that have no performance\ncost (like giving a descriptive error if a file load fails, or warning you\nif you try to override p5.js functions in the global space),\nwill remain in place.
\nSee \ndisabling the friendly error system.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "src",
+ "file": "src/dom/dom.js",
+ "line": 4958,
+ "module": "DOM",
+ "submodule": "DOM",
+ "class": "p5",
+ "example": [
+ "\n\nlet beat;\n\nfunction setup() {\n // Create a p5.MediaElement using createAudio().\n beat = createAudio('assets/beat.mp3');\n\n describe('The text \"https://p5js.org/reference/assets/beat.mp3\" written in black on a gray background.');\n}\n\nfunction draw() {\n background(200);\n\n textWrap(CHAR);\n text(beat.src, 10, 10, 80, 80);\n}\n
\n"
+ ],
+ "description": "Path to the media element's source as a string."
+ },
+ {
+ "itemtype": "property",
+ "name": "let",
+ "file": "src/core/reference.js",
+ "line": 1,
+ "module": "Foundation",
+ "submodule": "Foundation",
+ "class": "p5",
+ "example": [
+ "\n\nlet x = 2;\nconsole.log(x); // prints 2 to the console\nx = 1;\nconsole.log(x); // prints 1 to the console\n
\n"
+ ],
+ "alt": "This example does not render anything",
+ "description": "Creates and names a new variable. A variable is a container for a value.
\nVariables that are declared with let will have block-scope.\nThis means that the variable only exists within the\n\nblock that it is created within.
\nFrom the MDN entry:\nDeclares a block scope local variable, optionally initializing it to a value.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "const",
+ "file": "src/core/reference.js",
+ "line": 1,
+ "module": "Foundation",
+ "submodule": "Foundation",
+ "class": "p5",
+ "example": [
+ "\n\n// define myFavNumber as a constant and give it the value 7\nconst myFavNumber = 7;\nconsole.log('my favorite number is: ' + myFavNumber);\n
\n\n\n\n\nconst bigCats = ['lion', 'tiger', 'panther'];\nbigCats.push('leopard');\nconsole.log(bigCats);\n// bigCats = ['cat']; // throws error as re-assigning not allowed for const\n
\n\n\n\n\nconst wordFrequency = {};\nwordFrequency['hello'] = 2;\nwordFrequency['bye'] = 1;\nconsole.log(wordFrequency);\n// wordFrequency = { 'a': 2, 'b': 3}; // throws error here\n
\n"
+ ],
+ "alt": "These examples do not render anything",
+ "description": "Creates and names a new constant. Like a variable created with let,\na constant that is created with const is a container for a value,\nhowever constants cannot be reassigned once they are declared. Although it is\nnoteworthy that for non-primitive data types like objects & arrays, their\nelements can still be changeable. So if a variable is assigned an array, you\ncan still add or remove elements from the array but cannot reassign another\narray to it. Also unlike let
, you cannot declare variables without value\nusing const.
\nConstants have block-scope. This means that the constant only exists within\nthe \nblock that it is created within. A constant cannot be redeclared within a scope in which it\nalready exists.
\nFrom the MDN entry:\nDeclares a read-only named constant.\nConstants are block-scoped, much like variables defined using the 'let' statement.\nThe value of a constant can't be changed through reassignment, and it can't be redeclared.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "null",
+ "file": "src/core/reference.js",
+ "line": 1,
+ "module": "Foundation",
+ "submodule": "Foundation",
+ "class": "p5",
+ "example": [
+ "\n\nconsole.log(100 <= 100); // prints true to the console\nconsole.log(99 <= 100); // prints true to the console\n
\n"
+ ],
+ "alt": "This example does not render anything",
+ "description": "The less than or equal to operator <=\nevaluates to true if the left value is less than or equal to\nthe right value.
\nThere is more info on comparison operators on MDN.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "if-else",
+ "file": "src/core/reference.js",
+ "line": 1,
+ "module": "Foundation",
+ "submodule": "Foundation",
+ "class": "p5",
+ "example": [
+ "\n\nlet a = 4;\nif (a > 0) {\n console.log('positive');\n} else {\n console.log('negative');\n}\n
\n"
+ ],
+ "alt": "This example does not render anything",
+ "description": "The if-else statement helps control the flow of your code.
\nA condition is placed between the parenthesis following 'if',\nwhen that condition evalues to truthy,\nthe code between the following curly braces is run.\nAlternatively, when the condition evaluates to falsy,\nthe code between the curly braces of 'else' block is run instead. Writing an\nelse block is optional.
\nFrom the MDN entry:\nThe 'if' statement executes a statement if a specified condition is truthy.\nIf the condition is falsy, another statement can be executed
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "function",
+ "file": "src/core/reference.js",
+ "line": 1,
+ "module": "Foundation",
+ "submodule": "Foundation",
+ "class": "p5",
+ "example": [
+ "\n\nlet myName = 'Hridi';\nfunction sayHello(name) {\n console.log('Hello ' + name + '!');\n}\nsayHello(myName); // calling the function, prints \"Hello Hridi!\" to console.\n
\n\n\n\n\nlet square = number => number * number;\nconsole.log(square(5));\n
\n"
+ ],
+ "alt": "This example does not render anything",
+ "description": "Creates and names a function.\nA function is a set of statements that perform a task.
\nOptionally, functions can have parameters. Parameters\nare variables that are scoped to the function, that can be assigned a value\nwhen calling the function.Multiple parameters can be given by seperating them\nwith commmas.
\nFrom the MDN entry:\nDeclares a function with the specified parameters.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "return",
+ "file": "src/core/reference.js",
+ "line": 1,
+ "module": "Foundation",
+ "submodule": "Foundation",
+ "class": "p5",
+ "example": [
+ "\n\nfunction calculateSquare(x) {\n return x * x;\n}\nconst result = calculateSquare(4); // returns 16\nconsole.log(result); // prints '16' to the console\n
\n"
+ ],
+ "alt": "This example does not render anything",
+ "description": "Specifies the value to be returned by a function.\nFor more info checkout \nthe MDN entry for return."
+ },
+ {
+ "itemtype": "property",
+ "name": "boolean",
+ "file": "src/core/reference.js",
+ "line": 1,
+ "module": "Foundation",
+ "submodule": "Foundation",
+ "class": "p5",
+ "example": [
+ "\n\nlet myBoolean = false;\nconsole.log(typeof myBoolean); // prints 'boolean' to the console\n
\n"
+ ],
+ "alt": "This example does not render anything",
+ "description": "A boolean is one of the 7 primitive data types in Javascript.\nA boolean can only be true
or false
.
\nFrom the MDN entry:\nBoolean represents a logical entity and can have two values: true, and false.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "string",
+ "file": "src/core/reference.js",
+ "line": 1,
+ "module": "Foundation",
+ "submodule": "Foundation",
+ "class": "p5",
+ "example": [
+ "\n\nlet mood = 'chill';\nconsole.log(typeof mood); // prints 'string' to the console\n
\n"
+ ],
+ "alt": "This example does not render anything",
+ "description": "A string is one of the 7 primitive data types in Javascript.\nA string is a series of text characters. In Javascript, a string value must\nbe surrounded by either single-quotation marks(') or double-quotation marks(\").
\nFrom the MDN entry:\nA string is a sequence of characters used to represent text.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "number",
+ "file": "src/core/reference.js",
+ "line": 1,
+ "module": "Foundation",
+ "submodule": "Foundation",
+ "class": "p5",
+ "example": [
+ "\n\nlet num = 46.5;\nconsole.log(typeof num); // prints 'number' to the console\n
\n"
+ ],
+ "alt": "This example does not render anything",
+ "description": "A number is one of the 7 primitive data types in Javascript.\nA number can be a whole number or a decimal number.
\n\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "object",
+ "file": "src/core/reference.js",
+ "line": 1,
+ "module": "Foundation",
+ "submodule": "Foundation",
+ "class": "p5",
+ "example": [
+ "\n\nlet author = {\n name: 'Ursula K Le Guin',\n books: [\n 'The Left Hand of Darkness',\n 'The Dispossessed',\n 'A Wizard of Earthsea'\n ]\n};\nconsole.log(author.name); // prints 'Ursula K Le Guin' to the console\n
\n"
+ ],
+ "alt": "This example does not render anything",
+ "description": "From MDN's object basics:\nAn object is a collection of related data and/or\nfunctionality (which usually consists of several variables and functions —\nwhich are called properties and methods when they are inside objects.)"
+ },
+ {
+ "itemtype": "property",
+ "name": "class",
+ "file": "src/core/reference.js",
+ "line": 1,
+ "module": "Foundation",
+ "submodule": "Foundation",
+ "class": "p5",
+ "example": [
+ "\n\nclass Rectangle {\n constructor(name, height, width) {\n this.name = name;\n this.height = height;\n this.width = width;\n }\n}\nlet square = new Rectangle('square', 1, 1); // creating new instance of Polygon Class.\nconsole.log(square.width); // prints '1' to the console\n
\n"
+ ],
+ "alt": "This example does not render anything",
+ "description": "Creates and names a class which is a template for\nthe creation of objects.
\nFrom the MDN entry:\nThe class declaration creates a new Class with a given name using\nprototype-based inheritance.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "for",
+ "file": "src/core/reference.js",
+ "line": 1,
+ "module": "Foundation",
+ "submodule": "Foundation",
+ "class": "p5",
+ "example": [
+ "\n\nfor (let i = 0; i < 9; i++) {\n console.log(i);\n}\n
\n"
+ ],
+ "alt": "This example does not render anything",
+ "description": "for creates a loop that is useful for executing one\nsection of code multiple times.
\nA 'for loop' consists of three different expressions inside of a parenthesis,\nall of which are optional.These expressions are used to control the number of\ntimes the loop is run.The first expression is a statement that is used to set\nthe initial state for the loop.The second expression is a condition that you\nwould like to check before each loop. If this expression returns false then\nthe loop will exit.The third expression is executed at the end of each loop.\nThese expression are separated by ; (semi-colon).In case of an empty expression,\nonly a semi-colon is written.
\nThe code inside of the loop body (in between the curly braces) is executed between the evaluation of the second\nand third expression.
\nAs with any loop, it is important to ensure that the loop can 'exit', or that\nthe test condition will eventually evaluate to false. The test condition with a for loop\nis the second expression detailed above. Ensuring that this expression can eventually\nbecome false ensures that your loop doesn't attempt to run an infinite amount of times,\nwhich can crash your browser.
\nFrom the MDN entry:\nCreates a loop that executes a specified statement until the test condition evaluates to false.\nThe condition is evaluated after executing the statement, resulting in the specified statement executing at least once.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "while",
+ "file": "src/core/reference.js",
+ "line": 1,
+ "module": "Foundation",
+ "submodule": "Foundation",
+ "class": "p5",
+ "example": [
+ "\n\n// This example logs the lines below to the console\n// 4\n// 3\n// 2\n// 1\n// 0\nlet num = 5;\nwhile (num > 0) {\n num = num - 1;\n console.log(num);\n}\n
\n"
+ ],
+ "alt": "This example does not render anything",
+ "description": "while creates a loop that is useful for executing\none section of code multiple times.
\nWith a 'while loop', the code inside of the loop body (between the curly\nbraces) is run repeatedly until the test condition (inside of the parenthesis)\nevaluates to false. The condition is tested before executing the code body\nwith while, so if the condition is initially false\nthe loop body, or statement, will never execute.
\nAs with any loop, it is important to ensure that the loop can 'exit', or that\nthe test condition will eventually evaluate to false. This is to keep your loop\nfrom trying to run an infinite amount of times, which can crash your browser.
\nFrom the MDN entry:\nThe while statement creates a loop that executes a specified statement as long\nas the test condition evaluates to true.The condition is evaluated before\nexecuting the statement.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "drawingContext",
+ "file": "src/core/rendering.js",
+ "line": 573,
+ "module": "Rendering",
+ "submodule": "Rendering",
+ "class": "p5",
+ "example": [
+ "\n\nfunction setup() {\n drawingContext.shadowOffsetX = 5;\n drawingContext.shadowOffsetY = -5;\n drawingContext.shadowBlur = 10;\n drawingContext.shadowColor = 'black';\n background(200);\n ellipse(width / 2, height / 2, 50, 50);\n}\n
\n"
+ ],
+ "alt": "white ellipse with shadow blur effect around edges",
+ "description": "The p5.js API provides a lot of functionality for creating graphics, but there is\nsome native HTML5 Canvas functionality that is not exposed by p5. You can still call\nit directly using the variable drawingContext
, as in the example shown. This is\nthe equivalent of calling canvas.getContext('2d');
or canvas.getContext('webgl');
.\nSee this\n\nreference for the native canvas API for possible drawing functions you can call."
+ },
+ {
+ "itemtype": "property",
+ "name": "elt",
+ "file": "src/core/p5.Element.js",
+ "line": 83,
+ "module": "DOM",
+ "submodule": "DOM",
+ "class": "p5.Element",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Set the border style for the\n // canvas.\n cnv.elt.style.border = '5px dashed deeppink';\n\n describe('A gray square with a pink border drawn with dashed lines.');\n}\n
\n"
+ ],
+ "description": "Underlying\nHTMLElement\nobject. Its properties and methods can be used directly."
+ },
+ {
+ "itemtype": "property",
+ "name": "width",
+ "file": "src/core/p5.Element.js",
+ "line": 96,
+ "module": "DOM",
+ "submodule": "DOM",
+ "class": "p5.Element",
+ "example": [],
+ "description": ""
+ },
+ {
+ "itemtype": "property",
+ "name": "height",
+ "file": "src/core/p5.Element.js",
+ "line": 102,
+ "module": "DOM",
+ "submodule": "DOM",
+ "class": "p5.Element",
+ "example": [],
+ "description": ""
+ },
+ {
+ "itemtype": "property",
+ "name": "file",
+ "file": "src/dom/dom.js",
+ "line": 5235,
+ "module": "DOM",
+ "submodule": "DOM",
+ "class": "p5.File",
+ "example": [
+ "\n\n// Use the file input to load a\n// file and display its info.\n\nfunction setup() {\n background(200);\n\n // Create a file input and place it beneath\n // the canvas. Call displayInfo() when\n // the file loads.\n let input = createFileInput(displayInfo);\n input.position(0, 100);\n\n describe('A gray square with a file input beneath it. If the user loads a file, its info is written in black.');\n}\n\n// Use the p5.File once\n// it loads.\nfunction displayInfo(file) {\n background(200);\n\n // Display the p5.File's name.\n text(file.name, 10, 10, 80, 40);\n // Display the p5.File's type and subtype.\n text(`${file.type}/${file.subtype}`, 10, 70);\n // Display the p5.File's size in bytes.\n text(file.size, 10, 90);\n}\n
\n"
+ ],
+ "description": "Underlying\nFile\nobject. All File
properties and methods are accessible."
+ },
+ {
+ "itemtype": "property",
+ "name": "type",
+ "file": "src/dom/dom.js",
+ "line": 5235,
+ "module": "DOM",
+ "submodule": "DOM",
+ "class": "p5.File",
+ "example": [
+ "\n\n// Use the file input to load a\n// file and display its info.\n\nfunction setup() {\n background(200);\n\n // Create a file input and place it beneath\n // the canvas. Call displayType() when\n // the file loads.\n let input = createFileInput(displayType);\n input.position(0, 100);\n\n describe('A gray square with a file input beneath it. If the user loads a file, its type is written in black.');\n}\n\n// Display the p5.File's type\n// once it loads.\nfunction displayType(file) {\n background(200);\n\n // Display the p5.File's type.\n text(`This is file's type is: ${file.type}`, 10, 10, 80, 80);\n}\n
\n"
+ ],
+ "description": "The file\nMIME type\nas a string. For example, 'image'
, 'text'
, and so on."
+ },
+ {
+ "itemtype": "property",
+ "name": "subtype",
+ "file": "src/dom/dom.js",
+ "line": 5235,
+ "module": "DOM",
+ "submodule": "DOM",
+ "class": "p5.File",
+ "example": [
+ "\n\n// Use the file input to load a\n// file and display its info.\n\nfunction setup() {\n background(200);\n\n // Create a file input and place it beneath\n // the canvas. Call displaySubtype() when\n // the file loads.\n let input = createFileInput(displaySubtype);\n input.position(0, 100);\n\n describe('A gray square with a file input beneath it. If the user loads a file, its subtype is written in black.');\n}\n\n// Display the p5.File's type\n// once it loads.\nfunction displaySubtype(file) {\n background(200);\n\n // Display the p5.File's subtype.\n text(`This is file's subtype is: ${file.subtype}`, 10, 10, 80, 80);\n}\n
\n"
+ ],
+ "description": "The file subtype as a string. For example, a file with an 'image'
\nMIME type\nmay have a subtype such as png
or jpeg
."
+ },
+ {
+ "itemtype": "property",
+ "name": "name",
+ "file": "src/dom/dom.js",
+ "line": 5235,
+ "module": "DOM",
+ "submodule": "DOM",
+ "class": "p5.File",
+ "example": [
+ "\n\n// Use the file input to load a\n// file and display its info.\n\nfunction setup() {\n background(200);\n\n // Create a file input and place it beneath\n // the canvas. Call displayName() when\n // the file loads.\n let input = createFileInput(displayName);\n input.position(0, 100);\n\n describe('A gray square with a file input beneath it. If the user loads a file, its name is written in black.');\n}\n\n// Display the p5.File's name\n// once it loads.\nfunction displayName(file) {\n background(200);\n\n // Display the p5.File's name.\n text(`This is file's name is: ${file.name}`, 10, 10, 80, 80);\n}\n
\n"
+ ],
+ "description": "The file name as a string."
+ },
+ {
+ "itemtype": "property",
+ "name": "size",
+ "file": "src/dom/dom.js",
+ "line": 5235,
+ "module": "DOM",
+ "submodule": "DOM",
+ "class": "p5.File",
+ "example": [
+ "\n\n// Use the file input to load a\n// file and display its info.\n\nfunction setup() {\n background(200);\n\n // Create a file input and place it beneath\n // the canvas. Call displaySize() when\n // the file loads.\n let input = createFileInput(displaySize);\n input.position(0, 100);\n\n describe('A gray square with a file input beneath it. If the user loads a file, its size in bytes is written in black.');\n}\n\n// Display the p5.File's size\n// in bytes once it loads.\nfunction displaySize(file) {\n background(200);\n\n // Display the p5.File's size.\n text(`This is file has ${file.size} bytes.`, 10, 10, 80, 80);\n}\n
\n"
+ ],
+ "description": "The number of bytes in the file."
+ },
+ {
+ "itemtype": "property",
+ "name": "data",
+ "file": "src/dom/dom.js",
+ "line": 5235,
+ "module": "DOM",
+ "submodule": "DOM",
+ "class": "p5.File",
+ "example": [
+ "\n\n// Use the file input to load a\n// file and display its info.\n\nfunction setup() {\n background(200);\n\n // Create a file input and place it beneath\n // the canvas. Call displayData() when\n // the file loads.\n let input = createFileInput(displayData);\n input.position(0, 100);\n\n describe('A gray square with a file input beneath it. If the user loads a file, its data is written in black.');\n}\n\n// Display the p5.File's data\n// once it loads.\nfunction displayData(file) {\n background(200);\n\n // Display the p5.File's data,\n // which looks like a random\n // string of characters.\n text(file.data, 10, 10, 80, 80);\n}\n
\n"
+ ],
+ "description": "A string containing either the file's image data, text contents, or\na parsed object in the case of JSON and\np5.XML objects."
+ },
+ {
+ "itemtype": "property",
+ "name": "width",
+ "file": "src/image/p5.Image.js",
+ "line": 1573,
+ "type": "Number",
+ "module": "Image",
+ "submodule": "Image",
+ "class": "p5.Image",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n let x = img.width / 2;\n let y = img.height / 2;\n let d = 20;\n circle(x, y, d);\n\n describe('An image of a mountain landscape with a white circle drawn in the middle.');\n}\n
\n"
+ ],
+ "description": "Image width."
+ },
+ {
+ "itemtype": "property",
+ "name": "height",
+ "file": "src/image/p5.Image.js",
+ "line": 1573,
+ "module": "Image",
+ "submodule": "Image",
+ "class": "p5.Image",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n let x = img.width / 2;\n let y = img.height / 2;\n let d = 20;\n circle(x, y, d);\n\n describe('An image of a mountain landscape with a white circle drawn in the middle.');\n}\n
\n"
+ ],
+ "description": "Image height."
+ },
+ {
+ "itemtype": "property",
+ "name": "pixels",
+ "file": "src/image/p5.Image.js",
+ "line": 1573,
+ "type": "Number[]",
+ "module": "Image",
+ "submodule": "Image",
+ "class": "p5.Image",
+ "example": [
+ "\n\nlet img = createImage(66, 66);\nimg.loadPixels();\nlet numPixels = 4 * img.width * img.height;\nfor (let i = 0; i < numPixels; i += 4) {\n // Red.\n img.pixels[i] = 0;\n // Green.\n img.pixels[i + 1] = 0;\n // Blue.\n img.pixels[i + 2] = 0;\n // Alpha.\n img.pixels[i + 3] = 255;\n}\nimg.updatePixels();\nimage(img, 17, 17);\n\ndescribe('A black square drawn in the middle of a gray square.');\n
\n\n\n\n\nlet img = createImage(66, 66);\nimg.loadPixels();\nlet numPixels = 4 * img.width * img.height;\nfor (let i = 0; i < numPixels; i += 4) {\n // Red.\n img.pixels[i] = 255;\n // Green.\n img.pixels[i + 1] = 0;\n // Blue.\n img.pixels[i + 2] = 0;\n // Alpha.\n img.pixels[i + 3] = 255;\n}\nimg.updatePixels();\nimage(img, 17, 17);\n\ndescribe('A red square drawn in the middle of a gray square.');\n
\n"
+ ],
+ "description": "An array containing the color of each pixel in the\np5.Image object. Colors are stored as numbers\nrepresenting red, green, blue, and alpha (RGBA) values. img.pixels
is a\none-dimensional array for performance reasons.
\nEach pixel occupies four elements in the pixels array, one for each\nRGBA value. For example, the pixel at coordinates (0, 0) stores its\nRGBA values at img.pixels[0]
, img.pixels[1]
, img.pixels[2]
,\nand img.pixels[3]
, respectively. The next pixel at coordinates (1, 0)\nstores its RGBA values at img.pixels[4]
, img.pixels[5]
,\nimg.pixels[6]
, and img.pixels[7]
. And so on. The img.pixels
array\nfor a 100×100 p5.Image object has\n100 × 100 × 4 = 40,000 elements.
\nAccessing the RGBA values for a pixel in the\np5.Image object requires a little math as\nshown below. The img.loadPixels()\nmethod must be called before accessing the img.pixels
array. The\nimg.updatePixels() method must be\ncalled after any changes are made.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "columns",
+ "file": "src/io/p5.Table.js",
+ "line": 1306,
+ "module": "IO",
+ "submodule": "Table",
+ "class": "p5.Table",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //print the column names\n for (let c = 0; c < table.getColumnCount(); c++) {\n print('column ' + c + ' is named ' + table.columns[c]);\n }\n}\n
\n"
+ ],
+ "description": "An array containing the names of the columns in the table, if the \"header\" the table is\nloaded with the \"header\" parameter."
+ },
+ {
+ "itemtype": "property",
+ "name": "rows",
+ "file": "src/io/p5.Table.js",
+ "line": 1306,
+ "module": "IO",
+ "submodule": "Table",
+ "class": "p5.Table",
+ "example": [],
+ "description": "An array containing the p5.TableRow objects that make up the\nrows of the table. The same result as calling getRows()"
+ },
+ {
+ "itemtype": "property",
+ "name": "x",
+ "file": "src/math/p5.Vector.js",
+ "line": 94,
+ "module": "Math",
+ "submodule": "Vector",
+ "class": "p5.Vector",
+ "example": [],
+ "description": "The x component of the vector"
+ },
+ {
+ "itemtype": "property",
+ "name": "y",
+ "file": "src/math/p5.Vector.js",
+ "line": 94,
+ "module": "Math",
+ "submodule": "Vector",
+ "class": "p5.Vector",
+ "example": [],
+ "description": "The y component of the vector"
+ },
+ {
+ "itemtype": "property",
+ "name": "z",
+ "file": "src/math/p5.Vector.js",
+ "line": 94,
+ "module": "Math",
+ "submodule": "Vector",
+ "class": "p5.Vector",
+ "example": [],
+ "description": "The z component of the vector"
+ },
+ {
+ "itemtype": "property",
+ "name": "font",
+ "file": "src/typography/p5.Font.js",
+ "line": 577,
+ "module": "Typography",
+ "submodule": "Loading & Displaying",
+ "class": "p5.Font",
+ "example": [],
+ "description": "Underlying\nopentype.js\nfont object."
+ },
+ {
+ "itemtype": "property",
+ "name": "eyeX",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 788,
+ "type": "Number",
+ "module": "3D",
+ "submodule": "Camera",
+ "class": "p5.Camera",
+ "example": [
+ "\nlet cam, div;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n background(0);\n cam = createCamera();\n div = createDiv();\n div.position(0, 0);\n describe('An example showing the use of camera object properties');\n}\n\nfunction draw() {\n orbitControl();\n box(10);\n div.html('eyeX = ' + cam.eyeX);\n}\n
"
+ ],
+ "alt": "An example showing the use of camera object properties",
+ "description": "camera position value on x axis. default value is 0"
+ },
+ {
+ "itemtype": "property",
+ "name": "eyeY",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 788,
+ "type": "Number",
+ "module": "3D",
+ "submodule": "Camera",
+ "class": "p5.Camera",
+ "example": [
+ "\nlet cam, div;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n background(0);\n cam = createCamera();\n div = createDiv();\n div.position(0, 0);\n describe('An example showing the use of camera object properties');\n}\n\nfunction draw() {\n orbitControl();\n box(10);\n div.html('eyeY = ' + cam.eyeY);\n}\n
"
+ ],
+ "alt": "An example showing the use of camera object properties",
+ "description": "camera position value on y axis. default value is 0"
+ },
+ {
+ "itemtype": "property",
+ "name": "eyeZ",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 788,
+ "type": "Number",
+ "module": "3D",
+ "submodule": "Camera",
+ "class": "p5.Camera",
+ "example": [
+ "\nlet cam, div;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n background(0);\n cam = createCamera();\n div = createDiv();\n div.position(0, 0);\n describe('An example showing the use of camera object properties');\n}\n\nfunction draw() {\n orbitControl();\n box(10);\n div.html('eyeZ = ' + cam.eyeZ);\n}\n
"
+ ],
+ "alt": "An example showing the use of camera object properties",
+ "description": "camera position value on z axis. default value is 800"
+ },
+ {
+ "itemtype": "property",
+ "name": "centerX",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 788,
+ "type": "Number",
+ "module": "3D",
+ "submodule": "Camera",
+ "class": "p5.Camera",
+ "example": [
+ "\nlet cam, div;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n background(255);\n cam = createCamera();\n cam.lookAt(1, 0, 0);\n div = createDiv('centerX = ' + cam.centerX);\n div.position(0, 0);\n div.style('color', 'white');\n describe('An example showing the use of camera object properties');\n}\n\nfunction draw() {\n orbitControl();\n box(10);\n}\n
"
+ ],
+ "alt": "An example showing the use of camera object properties",
+ "description": "x coordinate representing center of the sketch"
+ },
+ {
+ "itemtype": "property",
+ "name": "centerY",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 788,
+ "type": "Number",
+ "module": "3D",
+ "submodule": "Camera",
+ "class": "p5.Camera",
+ "example": [
+ "\nlet cam, div;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n background(255);\n cam = createCamera();\n cam.lookAt(0, 1, 0);\n div = createDiv('centerY = ' + cam.centerY);\n div.position(0, 0);\n div.style('color', 'white');\n describe('An example showing the use of camera object properties');\n}\n\nfunction draw() {\n orbitControl();\n box(10);\n}\n
"
+ ],
+ "alt": "An example showing the use of camera object properties",
+ "description": "y coordinate representing center of the sketch"
+ },
+ {
+ "itemtype": "property",
+ "name": "centerZ",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 788,
+ "type": "Number",
+ "module": "3D",
+ "submodule": "Camera",
+ "class": "p5.Camera",
+ "example": [
+ "\nlet cam, div;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n background(255);\n cam = createCamera();\n cam.lookAt(0, 0, 1);\n div = createDiv('centerZ = ' + cam.centerZ);\n div.position(0, 0);\n div.style('color', 'white');\n describe('An example showing the use of camera object properties');\n}\n\nfunction draw() {\n orbitControl();\n box(10);\n}\n
"
+ ],
+ "alt": "An example showing the use of camera object properties",
+ "description": "z coordinate representing center of the sketch"
+ },
+ {
+ "itemtype": "property",
+ "name": "upX",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 788,
+ "type": "Number",
+ "module": "3D",
+ "submodule": "Camera",
+ "class": "p5.Camera",
+ "example": [
+ "\nlet cam, div;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n background(255);\n cam = createCamera();\n div = createDiv('upX = ' + cam.upX);\n div.position(0, 0);\n div.style('color', 'blue');\n div.style('font-size', '18px');\n describe('An example showing the use of camera object properties');\n}\n
"
+ ],
+ "alt": "An example showing the use of camera object properties",
+ "description": "x component of direction 'up' from camera"
+ },
+ {
+ "itemtype": "property",
+ "name": "upY",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 788,
+ "type": "Number",
+ "module": "3D",
+ "submodule": "Camera",
+ "class": "p5.Camera",
+ "example": [
+ "\nlet cam, div;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n background(255);\n cam = createCamera();\n div = createDiv('upY = ' + cam.upY);\n div.position(0, 0);\n div.style('color', 'blue');\n div.style('font-size', '18px');\n describe('An example showing the use of camera object properties');\n}\n
"
+ ],
+ "alt": "An example showing the use of camera object properties",
+ "description": "y component of direction 'up' from camera"
+ },
+ {
+ "itemtype": "property",
+ "name": "upZ",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 788,
+ "type": "Number",
+ "module": "3D",
+ "submodule": "Camera",
+ "class": "p5.Camera",
+ "example": [
+ "\nlet cam, div;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n background(255);\n cam = createCamera();\n div = createDiv('upZ = ' + cam.upZ);\n div.position(0, 0);\n div.style('color', 'blue');\n div.style('font-size', '18px');\n describe('An example showing the use of camera object properties');\n}\n
"
+ ],
+ "alt": "An example showing the use of camera object properties",
+ "description": "z component of direction 'up' from camera"
+ },
+ {
+ "itemtype": "property",
+ "name": "color",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 1379,
+ "type": "p5.FramebufferTexture",
+ "module": "Rendering",
+ "class": "p5.Framebuffer",
+ "example": [
+ "\n\nlet framebuffer;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n framebuffer = createFramebuffer();\n noStroke();\n}\n\nfunction draw() {\n // Draw to the framebuffer\n framebuffer.begin();\n background(255);\n normalMaterial();\n sphere(20);\n framebuffer.end();\n\n // Draw the framebuffer to the main canvas\n image(framebuffer.color, -width/2, -height/2);\n}\n
\n"
+ ],
+ "alt": "A red, green, and blue sphere in the middle of the canvas",
+ "description": "A texture with the color information of the framebuffer. Pass this (or the\nframebuffer itself) to texture() to draw it to\nthe canvas, or pass it to a shader with\nsetUniform() to read its data.
\nSince Framebuffers are controlled by WebGL, their y coordinates are stored\nflipped compared to images and videos. When texturing with a framebuffer\ntexture, you may want to flip vertically, e.g. with\nplane(framebuffer.width, -framebuffer.height)
.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "depth",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 1379,
+ "type": "p5.FramebufferTexture|undefined",
+ "module": "Rendering",
+ "class": "p5.Framebuffer",
+ "example": [
+ "\n\nlet framebuffer;\nlet depthShader;\n\nconst vert = `\nprecision highp float;\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying vec2 vTexCoord;\nvoid main() {\n vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * viewModelPosition;\n vTexCoord = aTexCoord;\n}\n`;\n\nconst frag = `\nprecision highp float;\nvarying vec2 vTexCoord;\nuniform sampler2D depth;\nvoid main() {\n float depthVal = texture2D(depth, vTexCoord).r;\n gl_FragColor = mix(\n vec4(1., 1., 0., 1.), // yellow\n vec4(0., 0., 1., 1.), // blue\n pow(depthVal, 6.)\n );\n}\n`;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n framebuffer = createFramebuffer();\n depthShader = createShader(vert, frag);\n noStroke();\n}\n\nfunction draw() {\n // Draw to the framebuffer\n framebuffer.begin();\n background(255);\n rotateX(frameCount * 0.01);\n box(20, 20, 100);\n framebuffer.end();\n\n push();\n shader(depthShader);\n depthShader.setUniform('depth', framebuffer.depth);\n plane(framebuffer.width, framebuffer.height);\n pop();\n}\n
\n"
+ ],
+ "alt": "A video of a rectangular prism rotating, with parts closest to the camera\nappearing yellow and colors getting progressively more blue the farther\nfrom the camera they go",
+ "description": "A texture with the depth information of the framebuffer. If the framebuffer\nwas created with { depth: false }
in its settings, then this property will\nbe undefined. Pass this to texture() to draw it to\nthe canvas, or pass it to a shader with\nsetUniform() to read its data.
\nSince Framebuffers are controlled by WebGL, their y coordinates are stored\nflipped compared to images and videos. When texturing with a framebuffer\ntexture, you may want to flip vertically, e.g. with\nplane(framebuffer.width, -framebuffer.height)
.
\n"
+ },
+ {
+ "itemtype": "property",
+ "name": "pixels",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 1379,
+ "type": "Number[]",
+ "module": "Rendering",
+ "class": "p5.Framebuffer",
+ "example": [],
+ "description": "A Uint8ClampedArray\ncontaining the values for all the pixels in the Framebuffer.
\nLike the main canvas pixels property, call\nloadPixels() before reading\nit, and call updatePixels()\nafterwards to update its data.
\nNote that updating pixels via this property will be slower than\ndrawing to the framebuffer directly.\nConsider using a shader instead of looping over pixels.
\n"
+ },
+ {
+ "name": "describe",
+ "file": "src/accessibility/describe.js",
+ "line": 120,
+ "itemtype": "method",
+ "description": "Creates a screen reader-accessible description for the canvas.
\nThe first parameter, text
, is the description of the canvas.
\nThe second parameter, display
, is optional. It determines how the\ndescription is displayed. If LABEL
is passed, as in\ndescribe('A description.', LABEL)
, the description will be visible in\na div element next to the canvas. If FALLBACK
is passed, as in\ndescribe('A description.', FALLBACK)
, the description will only be\nvisible to screen readers. This is the default mode.
\nRead\nHow to label your p5.js code to\nlearn more about making sketches accessible.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background('pink');\n\n // Draw a heart.\n fill('red');\n noStroke();\n circle(67, 67, 20);\n circle(83, 67, 20);\n triangle(91, 73, 75, 95, 59, 73);\n\n // Add a general description of the canvas.\n describe('A pink square with a red heart in the bottom-right corner.');\n}\n
\n\n\n\n\nfunction setup() {\n background('pink');\n\n // Draw a heart.\n fill('red');\n noStroke();\n circle(67, 67, 20);\n circle(83, 67, 20);\n triangle(91, 73, 75, 95, 59, 73);\n\n // Add a general description of the canvas\n // and display it for debugging.\n describe('A pink square with a red heart in the bottom-right corner.', LABEL);\n}\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n // The expression\n // frameCount % 100\n // causes x to increase from 0\n // to 99, then restart from 0.\n let x = frameCount % 100;\n\n // Draw the circle.\n fill(0, 255, 0);\n circle(x, 50, 40);\n\n // Add a general description of the canvas.\n describe(`A green circle at (${x}, 50) moves from left to right on a gray square.`);\n}\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n // The expression\n // frameCount % 100\n // causes x to increase from 0\n // to 99, then restart from 0.\n let x = frameCount % 100;\n\n // Draw the circle.\n fill(0, 255, 0);\n circle(x, 50, 40);\n\n // Add a general description of the canvas\n // and display it for debugging.\n describe(`A green circle at (${x}, 50) moves from left to right on a gray square.`, LABEL);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "text",
+ "description": "description of the canvas.",
+ "type": "String"
+ },
+ {
+ "name": "display",
+ "description": "either LABEL or FALLBACK.",
+ "optional": 1,
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "describeElement",
+ "file": "src/accessibility/describe.js",
+ "line": 244,
+ "itemtype": "method",
+ "description": "Creates a screen reader-accessible description for elements in the canvas.\nElements are shapes or groups of shapes that create meaning together.
\nThe first parameter, name
, is the name of the element.
\nThe second parameter, text
, is the description of the element.
\nThe third parameter, display
, is optional. It determines how the\ndescription is displayed. If LABEL
is passed, as in\ndescribe('A description.', LABEL)
, the description will be visible in\na div element next to the canvas. Using LABEL
creates unhelpful\nduplicates for screen readers. Only use LABEL
during development. If\nFALLBACK
is passed, as in describe('A description.', FALLBACK)
, the\ndescription will only be visible to screen readers. This is the default\nmode.
\nRead\nHow to label your p5.js code to\nlearn more about making sketches accessible.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background('pink');\n\n // Describe the first element\n // and draw it.\n describeElement('Circle', 'A yellow circle in the top-left corner.');\n noStroke();\n fill('yellow');\n circle(25, 25, 40);\n\n // Describe the second element\n // and draw it.\n describeElement('Heart', 'A red heart in the bottom-right corner.');\n fill('red');\n circle(66.6, 66.6, 20);\n circle(83.2, 66.6, 20);\n triangle(91.2, 72.6, 75, 95, 58.6, 72.6);\n\n // Add a general description of the canvas.\n describe('A red heart and yellow circle over a pink background.');\n}\n
\n\n\n\n\nfunction setup() {\n background('pink');\n\n // Describe the first element\n // and draw it. Display the\n // description for debugging.\n describeElement('Circle', 'A yellow circle in the top-left corner.', LABEL);\n noStroke();\n fill('yellow');\n circle(25, 25, 40);\n\n // Describe the second element\n // and draw it. Display the\n // description for debugging.\n describeElement('Heart', 'A red heart in the bottom-right corner.', LABEL);\n fill('red');\n circle(66.6, 66.6, 20);\n circle(83.2, 66.6, 20);\n triangle(91.2, 72.6, 75, 95, 58.6, 72.6);\n\n // Add a general description of the canvas.\n describe('A red heart and yellow circle over a pink background.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "name",
+ "description": "name of the element.",
+ "type": "String"
+ },
+ {
+ "name": "text",
+ "description": "description of the element.",
+ "type": "String"
+ },
+ {
+ "name": "display",
+ "description": "either LABEL or FALLBACK.",
+ "optional": 1,
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "textOutput",
+ "file": "src/accessibility/outputs.js",
+ "line": 126,
+ "itemtype": "method",
+ "description": "Creates a screen reader-accessible description for shapes on the canvas.\ntextOutput()
adds a general description, list of shapes, and\ntable of shapes to the web page.
\nThe general description includes the canvas size, canvas color, and number\nof shapes. For example,\nYour output is a, 100 by 100 pixels, gray canvas containing the following 2 shapes:
.
\nA list of shapes follows the general description. The list describes the\ncolor, location, and area of each shape. For example,\na red circle at middle covering 3% of the canvas
. Each shape can be\nselected to get more details.
\ntextOutput()
uses its table of shapes as a list. The table describes the\nshape, color, location, coordinates and area. For example,\nred circle location = middle area = 3%
. This is different from\ngridOutput(), which uses its table as a grid.
\nThe display
parameter is optional. It determines how the description is\ndisplayed. If LABEL
is passed, as in textOutput(LABEL)
, the description\nwill be visible in a div element next to the canvas. Using LABEL
creates\nunhelpful duplicates for screen readers. Only use LABEL
during\ndevelopment. If FALLBACK
is passed, as in textOutput(FALLBACK)
, the\ndescription will only be visible to screen readers. This is the default\nmode.
\nRead\nHow to label your p5.js code to\nlearn more about making sketches accessible.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Add the text description.\n textOutput();\n\n // Draw a couple of shapes.\n background(200);\n fill(255, 0, 0);\n circle(20, 20, 20);\n fill(0, 0, 255);\n square(50, 50, 50);\n\n // Add a general description of the canvas.\n describe('A red circle and a blue square on a gray background.');\n}\n
\n\n\n\n\nfunction setup() {\n // Add the text description and\n // display it for debugging.\n textOutput(LABEL);\n\n // Draw a couple of shapes.\n background(200);\n fill(255, 0, 0);\n circle(20, 20, 20);\n fill(0, 0, 255);\n square(50, 50, 50);\n\n // Add a general description of the canvas.\n describe('A red circle and a blue square on a gray background.');\n}\n
\n\n\n\n\nfunction draw() {\n // Add the text description.\n textOutput();\n\n // Draw a moving circle.\n background(200);\n let x = frameCount * 0.1;\n fill(255, 0, 0);\n circle(x, 20, 20);\n fill(0, 0, 255);\n square(50, 50, 50);\n\n // Add a general description of the canvas.\n describe('A red circle moves from left to right above a blue square.');\n}\n
\n\n\n\n\nfunction draw() {\n // Add the text description and\n // display it for debugging.\n textOutput(LABEL);\n\n // Draw a moving circle.\n background(200);\n let x = frameCount * 0.1;\n fill(255, 0, 0);\n circle(x, 20, 20);\n fill(0, 0, 255);\n square(50, 50, 50);\n\n // Add a general description of the canvas.\n describe('A red circle moves from left to right above a blue square.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "display",
+ "description": "either FALLBACK or LABEL.",
+ "optional": 1,
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "gridOutput",
+ "file": "src/accessibility/outputs.js",
+ "line": 262,
+ "itemtype": "method",
+ "description": "Creates a screen reader-accessible description for shapes on the canvas.\ngridOutput()
adds a general description, table of shapes, and list of\nshapes to the web page.
\nThe general description includes the canvas size, canvas color, and number of\nshapes. For example,\ngray canvas, 100 by 100 pixels, contains 2 shapes: 1 circle 1 square
.
\ngridOutput()
uses its table of shapes as a grid. Each shape in the grid\nis placed in a cell whose row and column correspond to the shape's location\non the canvas. The grid cells describe the color and type of shape at that\nlocation. For example, red circle
. These descriptions can be selected\nindividually to get more details. This is different from\ntextOutput(), which uses its table as a list.
\nA list of shapes follows the table. The list describes the color, type,\nlocation, and area of each shape. For example,\nred circle, location = middle, area = 3 %
.
\nThe display
parameter is optional. It determines how the description is\ndisplayed. If LABEL
is passed, as in gridOutput(LABEL)
, the description\nwill be visible in a div element next to the canvas. Using LABEL
creates\nunhelpful duplicates for screen readers. Only use LABEL
during\ndevelopment. If FALLBACK
is passed, as in gridOutput(FALLBACK)
, the\ndescription will only be visible to screen readers. This is the default\nmode.
\nRead\nHow to label your p5.js code to\nlearn more about making sketches accessible.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Add the grid description.\n gridOutput();\n\n // Draw a couple of shapes.\n background(200);\n fill(255, 0, 0);\n circle(20, 20, 20);\n fill(0, 0, 255);\n square(50, 50, 50);\n\n // Add a general description of the canvas.\n describe('A red circle and a blue square on a gray background.');\n}\n
\n\n\n\n\nfunction setup() {\n // Add the grid description and\n // display it for debugging.\n gridOutput(LABEL);\n\n // Draw a couple of shapes.\n background(200);\n fill(255, 0, 0);\n circle(20, 20, 20);\n fill(0, 0, 255);\n square(50, 50, 50);\n\n // Add a general description of the canvas.\n describe('A red circle and a blue square on a gray background.');\n}\n
\n\n\n\n\nfunction draw() {\n // Add the grid description.\n gridOutput();\n\n // Draw a moving circle.\n background(200);\n let x = frameCount * 0.1;\n fill(255, 0, 0);\n circle(x, 20, 20);\n fill(0, 0, 255);\n square(50, 50, 50);\n\n // Add a general description of the canvas.\n describe('A red circle moves from left to right above a blue square.');\n}\n
\n\n\n\n\nfunction draw() {\n // Add the grid description and\n // display it for debugging.\n gridOutput(LABEL);\n\n // Draw a moving circle.\n background(200);\n let x = frameCount * 0.1;\n fill(255, 0, 0);\n circle(x, 20, 20);\n fill(0, 0, 255);\n square(50, 50, 50);\n\n // Add a general description of the canvas.\n describe('A red circle moves from left to right above a blue square.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "display",
+ "description": "either FALLBACK or LABEL.",
+ "optional": 1,
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "p5",
+ "file": "src/core/structure.js",
+ "line": 544,
+ "itemtype": "method",
+ "description": "The p5()
constructor enables you to activate \"instance mode\" instead of normal\n\"global mode\". This is an advanced topic. A short description and example is\nincluded below. Please see\n\nDan Shiffman's Coding Train video tutorial or this\ntutorial page\nfor more info.
\nBy default, all p5.js functions are in the global namespace (i.e. bound to the window\nobject), meaning you can call them simply ellipse()
, fill()
, etc. However, this\nmight be inconvenient if you are mixing with other JS libraries (synchronously or\nasynchronously) or writing long programs of your own. p5.js currently supports a\nway around this problem called \"instance mode\". In instance mode, all p5 functions\nare bound up in a single variable instead of polluting your global namespace.
\nOptionally, you can specify a default container for the canvas and any other elements\nto append to with a second argument. You can give the ID of an element in your html,\nor an html node itself.
\nNote that creating instances like this also allows you to have more than one p5 sketch on\na single web page, as they will each be wrapped up with their own set up variables. Of\ncourse, you could also use iframes to have multiple sketches in global mode.
\n",
+ "example": [
+ "\nconst s = p => {\n let x = 100;\n let y = 100;\n\n p.setup = function() {\n p.createCanvas(700, 410);\n };\n\n p.draw = function() {\n p.background(0);\n p.fill(255);\n p.rect(x, y, 50, 50);\n };\n};\n\nnew p5(s); // invoke p5\n
"
+ ],
+ "alt": "white rectangle on black background",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "sketch",
+ "description": "a function containing a p5.js sketch",
+ "type": "Object"
+ },
+ {
+ "name": "node",
+ "description": "ID or pointer to HTML DOM node to contain sketch in",
+ "type": "String|Object"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Structure",
+ "submodule": "Structure"
+ },
+ {
+ "name": "alpha",
+ "file": "src/color/creating_reading.js",
+ "line": 41,
+ "itemtype": "method",
+ "description": "Extracts the alpha (transparency) value from a\np5.Color object, array of color components, or\nCSS color string.",
+ "example": [
+ "\n\nnoStroke();\nconst c = color(0, 126, 255, 102);\nfill(c);\nrect(15, 15, 35, 70);\n// Sets 'alphaValue' to 102.\nconst alphaValue = alpha(c);\nfill(alphaValue);\nrect(50, 15, 35, 70);\ndescribe('Two rectangles. The left one is light blue and the right one is charcoal gray.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "p5.Color object, array of\ncolor components, or CSS color string.",
+ "type": "p5.Color|Number[]|String"
+ }
+ ],
+ "return": {
+ "description": "the alpha value.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "the alpha value.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "blue",
+ "file": "src/color/creating_reading.js",
+ "line": 69,
+ "itemtype": "method",
+ "description": "Extracts the blue value from a p5.Color object,\narray of color components, or CSS color string.",
+ "example": [
+ "\n\nconst c = color(175, 100, 220);\nfill(c);\nrect(15, 20, 35, 60);\n// Sets 'blueValue' to 220.\nconst blueValue = blue(c);\nfill(0, 0, blueValue);\nrect(50, 20, 35, 60);\ndescribe('Two rectangles. The left one is light purple and the right one is royal blue.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "p5.Color object, array of\ncolor components, or CSS color string.",
+ "type": "p5.Color|Number[]|String"
+ }
+ ],
+ "return": {
+ "description": "the blue value.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "the blue value.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "brightness",
+ "file": "src/color/creating_reading.js",
+ "line": 115,
+ "itemtype": "method",
+ "description": "Extracts the HSB brightness value from a\np5.Color object, array of color components, or\nCSS color string.",
+ "example": [
+ "\n\nnoStroke();\ncolorMode(HSB, 255);\nconst c = color(0, 126, 255);\nfill(c);\nrect(15, 20, 35, 60);\n// Sets 'brightValue' to 255.\nconst brightValue = brightness(c);\nfill(brightValue);\nrect(50, 20, 35, 60);\ndescribe('Two rectangles. The left one is salmon pink and the right one is white.');\n
\n\n\n\n\nnoStroke();\ncolorMode(HSB, 255);\nconst c = color('hsb(60, 100%, 50%)');\nfill(c);\nrect(15, 20, 35, 60);\n// Sets 'brightValue' to 127.5 (50% of 255)\nconst brightValue = brightness(c);\nfill(brightValue);\nrect(50, 20, 35, 60);\ndescribe('Two rectangles. The left one is olive and the right one is gray.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "p5.Color object, array of\ncolor components, or CSS color string.",
+ "type": "p5.Color|Number[]|String"
+ }
+ ],
+ "return": {
+ "description": "the brightness value.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "the brightness value.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "color",
+ "file": "src/color/creating_reading.js",
+ "line": 293,
+ "itemtype": "method",
+ "description": "Creates a p5.Color object. By default, the\nparameters are interpreted as RGB values. Calling color(255, 204, 0)
will\nreturn a bright yellow color. The way these parameters are interpreted may\nbe changed with the colorMode() function.
\nThe version of color()
with one parameter interprets the value one of two\nways. If the parameter is a number, it's interpreted as a grayscale value.\nIf the parameter is a string, it's interpreted as a CSS color string.
\nThe version of color()
with two parameters interprets the first one as a\ngrayscale value. The second parameter sets the alpha (transparency) value.
\nThe version of color()
with three parameters interprets them as RGB, HSB,\nor HSL colors, depending on the current colorMode()
.
\nThe version of color()
with four parameters interprets them as RGBA, HSBA,\nor HSLA colors, depending on the current colorMode()
. The last parameter\nsets the alpha (transparency) value.
\n",
+ "example": [
+ "\n\nconst c = color(255, 204, 0);\nfill(c);\nnoStroke();\nrect(30, 20, 55, 55);\ndescribe('A yellow rectangle on a gray canvas.');\n
\n\n\n\n\n// RGB values.\nlet c = color(255, 204, 0);\nfill(c);\nnoStroke();\ncircle(25, 25, 80);\n// A grayscale value.\nc = color(65);\nfill(c);\ncircle(75, 75, 80);\ndescribe(\n 'Two ellipses. The circle in the top-left corner is yellow and the one at the bottom-right is gray.'\n);\n
\n\n\n\n\n// A CSS named color.\nconst c = color('magenta');\nfill(c);\nnoStroke();\nsquare(20, 20, 60);\ndescribe('A magenta square on a gray canvas.');\n
\n\n\n\n\n// CSS hex color codes.\nnoStroke();\nlet c = color('#0f0');\nfill(c);\nrect(0, 10, 45, 80);\nc = color('#00ff00');\nfill(c);\nrect(55, 10, 45, 80);\ndescribe('Two bright green rectangles on a gray canvas.');\n
\n\n\n\n\n// RGB and RGBA color strings.\nnoStroke();\nlet c = color('rgb(0,0,255)');\nfill(c);\nsquare(10, 10, 35);\nc = color('rgb(0%, 0%, 100%)');\nfill(c);\nsquare(55, 10, 35);\nc = color('rgba(0, 0, 255, 1)');\nfill(c);\nsquare(10, 55, 35);\nc = color('rgba(0%, 0%, 100%, 1)');\nfill(c);\nsquare(55, 55, 35);\ndescribe('Four blue squares in corners of a gray canvas.');\n
\n\n\n\n\n// HSL and HSLA color strings.\nlet c = color('hsl(160, 100%, 50%)');\nnoStroke();\nfill(c);\nrect(0, 10, 45, 80);\nc = color('hsla(160, 100%, 50%, 0.5)');\nfill(c);\nrect(55, 10, 45, 80);\ndescribe('Two sea green rectangles. A darker rectangle on the left and a brighter one on the right.');\n
\n\n\n\n\n// HSB and HSBA color strings.\nlet c = color('hsb(160, 100%, 50%)');\nnoStroke();\nfill(c);\nrect(0, 10, 45, 80);\nc = color('hsba(160, 100%, 50%, 0.5)');\nfill(c);\nrect(55, 10, 45, 80);\ndescribe('Two green rectangles. A darker rectangle on the left and a brighter one on the right.');\n
\n\n\n\n\n// Changing color modes.\nnoStroke();\nlet c = color(50, 55, 100);\nfill(c);\nrect(0, 10, 45, 80);\ncolorMode(HSB, 100);\nc = color(50, 55, 100);\nfill(c);\nrect(55, 10, 45, 80);\ndescribe('Two blue rectangles. A darker rectangle on the left and a brighter one on the right.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "gray",
+ "description": "number specifying value between white and black.",
+ "type": "Number"
+ },
+ {
+ "name": "alpha",
+ "description": "alpha value relative to current color range\n(default is 0-255).",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "resulting color.",
+ "type": "p5.Color"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "red or hue value relative to\nthe current color range.",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "description": "green or saturation value\nrelative to the current color range.",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "description": "blue or brightness value\nrelative to the current color range.",
+ "type": "Number"
+ },
+ {
+ "name": "alpha",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Color"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "a color string.",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Color"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "values",
+ "description": "an array containing the red, green, blue,\nand alpha components of the color.",
+ "type": "Number[]"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Color"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "type": "p5.Color"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Color"
+ }
+ }
+ ],
+ "return": {
+ "description": "resulting color.",
+ "type": "p5.Color"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "green",
+ "file": "src/color/creating_reading.js",
+ "line": 325,
+ "itemtype": "method",
+ "description": "Extracts the green value from a p5.Color object,\narray of color components, or CSS color string.",
+ "example": [
+ "\n\nconst c = color(20, 75, 200);\nfill(c);\nrect(15, 20, 35, 60);\n// Sets 'greenValue' to 75.\nconst greenValue = green(c);\nfill(0, greenValue, 0);\nrect(50, 20, 35, 60);\ndescribe('Two rectangles. The rectangle on the left is blue and the one on the right is green.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "p5.Color object, array of\ncolor components, or CSS color string.",
+ "type": "p5.Color|Number[]|String"
+ }
+ ],
+ "return": {
+ "description": "the green value.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "the green value.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "hue",
+ "file": "src/color/creating_reading.js",
+ "line": 363,
+ "itemtype": "method",
+ "description": "Extracts the hue value from a\np5.Color object, array of color components, or\nCSS color string.
\nHue exists in both HSB and HSL. It describes a color's position on the\ncolor wheel. By default, this function returns the HSL-normalized hue. If\nthe colorMode() is set to HSB, it returns the\nHSB-normalized hue.
\n",
+ "example": [
+ "\n\nnoStroke();\ncolorMode(HSB, 255);\nconst c = color(0, 126, 255);\nfill(c);\nrect(15, 20, 35, 60);\n// Sets 'hueValue' to 0.\nconst hueValue = hue(c);\nfill(hueValue);\nrect(50, 20, 35, 60);\ndescribe(\n 'Two rectangles. The rectangle on the left is salmon pink and the one on the right is black.'\n);\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "p5.Color object, array of\ncolor components, or CSS color string.",
+ "type": "p5.Color|Number[]|String"
+ }
+ ],
+ "return": {
+ "description": "the hue",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "the hue",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "lerpColor",
+ "file": "src/color/creating_reading.js",
+ "line": 411,
+ "itemtype": "method",
+ "description": "Blends two colors to find a third color between them. The amt
parameter\nspecifies the amount to interpolate between the two values. 0 is equal to\nthe first color, 0.1 is very near the first color, 0.5 is halfway between\nthe two colors, and so on. Negative numbers are set to 0. Numbers greater\nthan 1 are set to 1. This differs from the behavior of\nlerp. It's necessary because numbers outside of the\ninterval [0, 1] will produce strange and unexpected colors.
\nThe way that colors are interpolated depends on the current\ncolorMode().
\n",
+ "example": [
+ "\n\ncolorMode(RGB);\nstroke(255);\nbackground(51);\nconst from = color(218, 165, 32);\nconst to = color(72, 61, 139);\ncolorMode(RGB);\nconst interA = lerpColor(from, to, 0.33);\nconst interB = lerpColor(from, to, 0.66);\nfill(from);\nrect(10, 20, 20, 60);\nfill(interA);\nrect(30, 20, 20, 60);\nfill(interB);\nrect(50, 20, 20, 60);\nfill(to);\nrect(70, 20, 20, 60);\ndescribe(\n 'Four rectangles with white edges. From left to right, the rectangles are tan, brown, brownish purple, and purple.'\n);\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "c1",
+ "description": "interpolate from this color.",
+ "type": "p5.Color"
+ },
+ {
+ "name": "c2",
+ "description": "interpolate to this color.",
+ "type": "p5.Color"
+ },
+ {
+ "name": "amt",
+ "description": "number between 0 and 1.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "interpolated color.",
+ "type": "p5.Color"
+ }
+ }
+ ],
+ "return": {
+ "description": "interpolated color.",
+ "type": "p5.Color"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "lightness",
+ "file": "src/color/creating_reading.js",
+ "line": 494,
+ "itemtype": "method",
+ "description": "Extracts the HSL lightness value from a\np5.Color object, array of color components, or\nCSS color string.",
+ "example": [
+ "\n\nnoStroke();\ncolorMode(HSL);\nconst c = color(156, 100, 50, 1);\nfill(c);\nrect(15, 20, 35, 60);\n// Sets 'lightValue' to 50.\nconst lightValue = lightness(c);\nfill(lightValue);\nrect(50, 20, 35, 60);\ndescribe('Two rectangles. The rectangle on the left is light green and the one on the right is gray.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "p5.Color object, array of\ncolor components, or CSS color string.",
+ "type": "p5.Color|Number[]|String"
+ }
+ ],
+ "return": {
+ "description": "the lightness",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "the lightness",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "red",
+ "file": "src/color/creating_reading.js",
+ "line": 524,
+ "itemtype": "method",
+ "description": "Extracts the red value from a\np5.Color object, array of color components, or\nCSS color string.",
+ "example": [
+ "\n\nconst c = color(255, 204, 0);\nfill(c);\nrect(15, 20, 35, 60);\n// Sets 'redValue' to 255.\nconst redValue = red(c);\nfill(redValue, 0, 0);\nrect(50, 20, 35, 60);\ndescribe(\n 'Two rectangles with black edges. The rectangle on the left is yellow and the one on the right is red.'\n);\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "p5.Color object, array of\ncolor components, or CSS color string.",
+ "type": "p5.Color|Number[]|String"
+ }
+ ],
+ "return": {
+ "description": "the red value.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "the red value.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "saturation",
+ "file": "src/color/creating_reading.js",
+ "line": 560,
+ "itemtype": "method",
+ "description": "Extracts the saturation value from a\np5.Color object, array of color components, or\nCSS color string.
\nSaturation is scaled differently in HSB and HSL. By default, this function\nreturns the HSL saturation. If the colorMode()\nis set to HSB, it returns the HSB saturation.
\n",
+ "example": [
+ "\n\nnoStroke();\ncolorMode(HSB, 255);\nconst c = color(0, 126, 255);\nfill(c);\nrect(15, 20, 35, 60);\n// Sets 'satValue' to 126.\nconst satValue = saturation(c);\nfill(satValue);\nrect(50, 20, 35, 60);\ndescribe(\n 'Two rectangles. The rectangle on the left is deep pink and the one on the right is gray.'\n);\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "p5.Color object, array of\ncolor components, or CSS color string.",
+ "type": "p5.Color|Number[]|String"
+ }
+ ],
+ "return": {
+ "description": "the saturation value",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "the saturation value",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "beginClip",
+ "file": "src/color/setting.js",
+ "line": 104,
+ "itemtype": "method",
+ "description": "Start defining a shape that will mask subsequent things drawn to the canvas.\nOnly opaque regions of the mask shape will allow content to be drawn.\nAny shapes drawn between this and endClip() will\ncontribute to the mask shape.
\nThe mask will apply to anything drawn after this call. To draw without a mask, contain\nthe code to apply the mask and to draw the masked content between\npush() and pop().
\nAlternatively, rather than drawing the mask between this and\nendClip(), draw the mask in a callback function\npassed to clip().
\nOptions can include:
\ninvert
: A boolean specifying whether or not to mask the areas not filled by the mask shape. Defaults to false.
",
+ "example": [
+ "\n\nnoStroke();\n\n// Mask in some shapes\npush();\nbeginClip();\ntriangle(15, 37, 30, 13, 43, 37);\ncircle(45, 45, 7);\nendClip();\n\nfill('red');\nrect(5, 5, 45, 45);\npop();\n\ntranslate(50, 50);\n\n// Mask out the same shapes\npush();\nbeginClip({ invert: true });\ntriangle(15, 37, 30, 13, 43, 37);\ncircle(45, 45, 7);\nendClip();\n\nfill('red');\nrect(5, 5, 45, 45);\npop();\n
\n",
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n}\n\nfunction draw() {\n background(255);\n noStroke();\n\n beginClip();\n push();\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n scale(0.5);\n torus(30, 15);\n pop();\n endClip();\n\n beginShape(QUAD_STRIP);\n fill(0, 255, 255);\n vertex(-width/2, -height/2);\n vertex(width/2, -height/2);\n fill(100, 0, 100);\n vertex(-width/2, height/2);\n vertex(width/2, height/2);\n endShape();\n}\n
\n"
+ ],
+ "alt": "In the top left, a red triangle and circle. In the bottom right, a red\nsquare with a triangle and circle cut out of it.\nA silhouette of a rotating torus colored with a gradient from\ncyan to purple",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "options",
+ "description": "An object containing clip settings.",
+ "optional": 1,
+ "type": "Object"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Setting"
+ },
+ {
+ "name": "endClip",
+ "file": "src/color/setting.js",
+ "line": 116,
+ "itemtype": "method",
+ "description": "Finishes defining a shape that will mask subsequent things drawn to the canvas.\nOnly opaque regions of the mask shape will allow content to be drawn.\nAny shapes drawn between beginClip() and this\nwill contribute to the mask shape.",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Setting"
+ },
+ {
+ "name": "clip",
+ "file": "src/color/setting.js",
+ "line": 209,
+ "itemtype": "method",
+ "description": "Use the shape drawn by a callback function to mask subsequent things drawn to the canvas.\nOnly opaque regions of the mask shape will allow content to be drawn.
\nThe mask will apply to anything drawn after this call. To draw without a mask, contain\nthe code to apply the mask and to draw the masked content between\npush() and pop().
\nAlternatively, rather than drawing the mask shape in a function, draw the\nshape between beginClip() and endClip().
\nOptions can include:
\ninvert
: A boolean specifying whether or not to mask the areas not filled by the mask shape. Defaults to false.
",
+ "example": [
+ "\n\nnoStroke();\n\n// Mask in some shapes\npush();\nclip(() => {\n triangle(15, 37, 30, 13, 43, 37);\n circle(45, 45, 7);\n});\n\nfill('red');\nrect(5, 5, 45, 45);\npop();\n\ntranslate(50, 50);\n\n// Mask out the same shapes\npush();\nclip(() => {\n triangle(15, 37, 30, 13, 43, 37);\n circle(45, 45, 7);\n}, { invert: true });\n\nfill('red');\nrect(5, 5, 45, 45);\npop();\n
\n",
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n}\n\nfunction draw() {\n background(255);\n noStroke();\n\n clip(() => {\n push();\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n scale(0.5);\n torus(30, 15);\n pop();\n });\n\n beginShape(QUAD_STRIP);\n fill(0, 255, 255);\n vertex(-width/2, -height/2);\n vertex(width/2, -height/2);\n fill(100, 0, 100);\n vertex(-width/2, height/2);\n vertex(width/2, height/2);\n endShape();\n}\n
\n"
+ ],
+ "alt": "In the top left, a red triangle and circle. In the bottom right, a red\nsquare with a triangle and circle cut out of it.\nA silhouette of a rotating torus colored with a gradient from\ncyan to purple",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "callback",
+ "description": "A function that draws the mask shape.",
+ "type": "Function"
+ },
+ {
+ "name": "options",
+ "description": "An object containing clip settings.",
+ "optional": 1,
+ "type": "Object"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Setting"
+ },
+ {
+ "name": "background",
+ "file": "src/color/setting.js",
+ "line": 385,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the color used for the background of the canvas. By default, the\nbackground is transparent. This function is typically used within\ndraw() to clear the display window at the beginning\nof each frame. It can also be used inside setup() to\nset the background on the first frame of animation.
\nThe version of background()
with one parameter interprets the value one of four\nways. If the parameter is a number, it's interpreted as a grayscale value.\nIf the parameter is a string, it's interpreted as a CSS color string. RGB, RGBA,\nHSL, HSLA, hex, and named color strings are supported. If the parameter is a\np5.Color object, it will be used as the background color.\nIf the parameter is a p5.Image object, it will be used as\nthe background image.
\nThe version of background()
with two parameters interprets the first one as a\ngrayscale value. The second parameter sets the alpha (transparency) value.
\nThe version of background()
with three parameters interprets them as RGB, HSB,\nor HSL colors, depending on the current colorMode().\nBy default, colors are specified in RGB values. Calling background(255, 204, 0)\nsets the background a bright yellow color.
\n",
+ "example": [
+ "\n\n// A grayscale integer value.\nbackground(51);\ndescribe('A canvas with a dark charcoal gray background.');\n
\n\n\n\n\n// A grayscale integer value and an alpha value.\nbackground(51, 0.4);\ndescribe('A canvas with a transparent gray background.');\n
\n\n\n\n\n// R, G & B integer values.\nbackground(255, 204, 0);\ndescribe('A canvas with a yellow background.');\n
\n\n\n\n\n// H, S & B integer values.\ncolorMode(HSB);\nbackground(255, 204, 100);\ndescribe('A canvas with a royal blue background.');\n
\n\n\n\n\n// A CSS named color.\nbackground('red');\ndescribe('A canvas with a red background.');\n
\n\n\n\n\n// Three-digit hex RGB notation.\nbackground('#fae');\ndescribe('A canvas with a pink background.');\n
\n\n\n\n\n// Six-digit hex RGB notation.\nbackground('#222222');\ndescribe('A canvas with a black background.');\n
\n\n\n\n\n// Integer RGB notation.\nbackground('rgb(0,255,0)');\ndescribe('A canvas with a bright green background.');\n
\n\n\n\n\n// Integer RGBA notation.\nbackground('rgba(0,255,0, 0.25)');\ndescribe('A canvas with a transparent green background.');\n
\n\n\n\n\n// Percentage RGB notation.\nbackground('rgb(100%,0%,10%)');\ndescribe('A canvas with a red background.');\n
\n\n\n\n\n// Percentage RGBA notation.\nbackground('rgba(100%,0%,100%,0.5)');\ndescribe('A canvas with a transparent purple background.');\n
\n\n\n\n\n// A p5.Color object.\nlet c = color(0, 0, 255);\nbackground(c);\ndescribe('A canvas with a blue background.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "any value created by the color() function",
+ "type": "p5.Color"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "colorstring",
+ "description": "color string, possible formats include: integer\nrgb() or rgba(), percentage rgb() or rgba(),\n3-digit hex, 6-digit hex.",
+ "type": "String"
+ },
+ {
+ "name": "a",
+ "description": "opacity of the background relative to current\ncolor range (default is 0-255).",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "gray",
+ "description": "specifies a value between white and black.",
+ "type": "Number"
+ },
+ {
+ "name": "a",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "red value if color mode is RGB, or hue value if color mode is HSB.",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "description": "green value if color mode is RGB, or saturation value if color mode is HSB.",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "description": "blue value if color mode is RGB, or brightness value if color mode is HSB.",
+ "type": "Number"
+ },
+ {
+ "name": "a",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "values",
+ "description": "an array containing the red, green, blue\nand alpha components of the color.",
+ "type": "Number[]"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "image",
+ "description": "image created with loadImage()\nor createImage(),\nto set as background.\n(must be same size as the sketch window).",
+ "type": "p5.Image"
+ },
+ {
+ "name": "a",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Setting"
+ },
+ {
+ "name": "clear",
+ "file": "src/io/files.js",
+ "line": 1299,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Clears the pixels on the canvas. This function makes every pixel 100%\ntransparent. Calling clear()
doesn't clear objects created by createX()
\nfunctions such as createGraphics(),\ncreateVideo(), and\ncreateImg(). These objects will remain\nunchanged after calling clear() and can be redrawn.
\nIn WebGL mode, this function can clear the screen to a specific color. It\ninterprets four numeric parameters as normalized RGBA color values. It also\nclears the depth buffer. If you are not using the WebGL renderer, these\nparameters will have no effect.
\n",
+ "example": [
+ "\n\nfunction draw() {\n circle(mouseX, mouseY, 20);\n describe('A white circle is drawn at the mouse x- and y-coordinates.');\n}\n\nfunction mousePressed() {\n clear();\n background(128);\n describe('The canvas is cleared when the mouse is clicked.');\n}\n
\n\n\n\n\nlet pg;\n\nfunction setup() {\n createCanvas(100, 100);\n background(200);\n\n pg = createGraphics(60, 60);\n pg.background(200);\n pg.noStroke();\n pg.circle(pg.width / 2, pg.height / 2, 15);\n image(pg, 20, 20);\n describe('A white circle drawn on a gray square. The square gets smaller when the mouse is pressed.');\n}\n\nfunction mousePressed() {\n clear();\n image(pg, 20, 20);\n}\n
\n",
+ "\n// create writer object\nlet writer = createWriter('newFile.txt');\nwriter.write(['clear me']);\n// clear writer object here\nwriter.clear();\n// close writer\nwriter.close();\n
\n\n\nfunction setup() {\n button = createButton('CLEAR ME');\n button.position(21, 40);\n button.mousePressed(createFile);\n}\n\nfunction createFile() {\n let writer = createWriter('newFile.txt');\n writer.write(['clear me']);\n writer.clear();\n writer.close();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "r",
+ "description": "normalized red value.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "g",
+ "description": "normalized green value.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "b",
+ "description": "normalized blue value.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "a",
+ "description": "normalized alpha value.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "colorMode",
+ "file": "src/color/setting.js",
+ "line": 558,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Changes the way p5.js interprets color data. By default, the numeric\nparameters for fill(),\nstroke(),\nbackground(), and\ncolor() are defined by values between 0 and 255\nusing the RGB color model. This is equivalent to calling\ncolorMode(RGB, 255)
. Pure red is color(255, 0, 0)
in this model.
\nCalling colorMode(RGB, 100)
sets colors to be interpreted as RGB color\nvalues between 0 and 100. Pure red is color(100, 0, 0)
in this model.
\nCalling colorMode(HSB)
or colorMode(HSL)
changes to HSB or HSL system\ninstead of RGB.
\np5.Color objects remember the mode that they were\ncreated in. Changing modes doesn't affect their appearance.
\n",
+ "example": [
+ "\n\nnoStroke();\ncolorMode(RGB, 100);\nfor (let i = 0; i < 100; i += 1) {\n for (let j = 0; j < 100; j += 1) {\n stroke(i, j, 0);\n point(i, j);\n }\n}\ndescribe(\n 'A diagonal green to red gradient from bottom-left to top-right with shading transitioning to black at top-left corner.'\n);\n
\n\n\n\n\nnoStroke();\ncolorMode(HSB, 100);\nfor (let i = 0; i < 100; i++) {\n for (let j = 0; j < 100; j++) {\n stroke(i, j, 100);\n point(i, j);\n }\n}\ndescribe('A rainbow gradient from left-to-right. Brightness transitions to white at the top.');\n
\n\n\n\n\ncolorMode(RGB, 255);\nlet myColor = color(180, 175, 230);\nbackground(myColor);\ncolorMode(RGB, 1);\nlet redValue = red(myColor);\nlet greenValue = green(myColor);\nlet blueValue = blue(myColor);\ntext(`Red: ${redValue}`, 10, 10, 80, 80);\ntext(`Green: ${greenValue}`, 10, 40, 80, 80);\ntext(`Blue: ${blueValue}`, 10, 70, 80, 80);\ndescribe('A purple canvas with the red, green, and blue decimal values of the color written on it.');\n
\n\n\n\n\nnoFill();\ncolorMode(RGB, 255, 255, 255, 1);\nbackground(255);\nstrokeWeight(4);\nstroke(255, 0, 10, 0.3);\ncircle(40, 40, 50);\ncircle(50, 60, 50);\ndescribe('Two overlapping translucent pink circle outlines.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "mode",
+ "description": "either RGB, HSB or HSL, corresponding to\nRed/Green/Blue and Hue/Saturation/Brightness\n(or Lightness).",
+ "type": "Constant"
+ },
+ {
+ "name": "max",
+ "description": "range for all values.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "mode",
+ "type": "Constant"
+ },
+ {
+ "name": "max1",
+ "description": "range for the red or hue depending on the\ncurrent color mode.",
+ "type": "Number"
+ },
+ {
+ "name": "max2",
+ "description": "range for the green or saturation depending\non the current color mode.",
+ "type": "Number"
+ },
+ {
+ "name": "max3",
+ "description": "range for the blue or brightness/lightness\ndepending on the current color mode.",
+ "type": "Number"
+ },
+ {
+ "name": "maxA",
+ "description": "range for the alpha.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Setting"
+ },
+ {
+ "name": "fill",
+ "file": "src/color/setting.js",
+ "line": 740,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the color used to fill shapes. Calling fill(255, 165, 0)
or\nfill('orange')
means all shapes drawn after the fill command will be\nfilled with the color orange.
\nThe version of fill()
with one parameter interprets the value one of\nthree ways. If the parameter is a number, it's interpreted as a grayscale\nvalue. If the parameter is a string, it's interpreted as a CSS color\nstring. A p5.Color object can also be provided to\nset the fill color.
\nThe version of fill()
with three parameters interprets them as RGB, HSB,\nor HSL colors, depending on the current\ncolorMode(). The default color space is RGB,\nwith each value in the range from 0 to 255.
\n",
+ "example": [
+ "\n\n// Grayscale integer value.\nfill(51);\nsquare(20, 20, 60);\ndescribe('A dark charcoal gray square with a black outline.');\n
\n\n\n\n\n// R, G & B integer values.\nfill(255, 204, 0);\nsquare(20, 20, 60);\ndescribe('A yellow square with a black outline.');\n
\n\n\n\n\n// H, S & B integer values.\ncolorMode(HSB);\nfill(255, 204, 100);\nsquare(20, 20, 60);\ndescribe('A royal blue square with a black outline.');\n
\n\n\n\n\n// A CSS named color.\nfill('red');\nsquare(20, 20, 60);\ndescribe('A red square with a black outline.');\n
\n\n\n\n\n// Three-digit hex RGB notation.\nfill('#fae');\nsquare(20, 20, 60);\ndescribe('A pink square with a black outline.');\n
\n\n\n\n\n// Six-digit hex RGB notation.\nfill('#A251FA');\nsquare(20, 20, 60);\ndescribe('A purple square with a black outline.');\n
\n\n\n\n\n// Integer RGB notation.\nfill('rgb(0,255,0)');\nsquare(20, 20, 60);\ndescribe('A bright green square with a black outline.');\n
\n\n\n\n\n// Integer RGBA notation.\nfill('rgba(0,255,0, 0.25)');\nsquare(20, 20, 60);\ndescribe('A soft green rectange with a black outline.');\n
\n\n\n\n\n// Percentage RGB notation.\nfill('rgb(100%,0%,10%)');\nsquare(20, 20, 60);\ndescribe('A red square with a black outline.');\n
\n\n\n\n\n// Percentage RGBA notation.\nfill('rgba(100%,0%,100%,0.5)');\nsquare(20, 20, 60);\ndescribe('A dark fuchsia square with a black outline.');\n
\n\n\n\n\n// p5.Color object.\nlet c = color(0, 0, 255);\nfill(c);\nsquare(20, 20, 60);\ndescribe('A blue square with a black outline.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "red value if color mode is RGB or hue value if color mode is HSB.",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "description": "green value if color mode is RGB or saturation value if color mode is HSB.",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "description": "blue value if color mode is RGB or brightness value if color mode is HSB.",
+ "type": "Number"
+ },
+ {
+ "name": "alpha",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "a color string.",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "gray",
+ "description": "a grayscale value.",
+ "type": "Number"
+ },
+ {
+ "name": "alpha",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "values",
+ "description": "an array containing the red, green, blue &\nand alpha components of the color.",
+ "type": "Number[]"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "the fill color.",
+ "type": "p5.Color"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Setting"
+ },
+ {
+ "name": "noFill",
+ "file": "src/color/setting.js",
+ "line": 784,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Disables setting the interior color of shapes. This is the same as making\nthe fill completely transparent. If both\nnoStroke() and\nnoFill() are called, nothing will be drawn to the\nscreen.",
+ "example": [
+ "\n\nsquare(32, 10, 35);\nnoFill();\nsquare(32, 55, 35);\ndescribe('A white square on top of an empty square. Both squares have black outlines.');\n
\n\n\n\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n}\n\nfunction draw() {\n background(0);\n noFill();\n stroke(100, 100, 240);\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n box(45, 45, 45);\n describe('A purple cube wireframe spinning on a black canvas.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Setting"
+ },
+ {
+ "name": "noStroke",
+ "file": "src/color/setting.js",
+ "line": 824,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Disables drawing the stroke (outline). If both\nnoStroke() and\nnoFill() are called, nothing will be drawn to the\nscreen.",
+ "example": [
+ "\n\nnoStroke();\nsquare(20, 20, 60);\ndescribe('A white square with no outline.');\n
\n\n\n\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n}\n\nfunction draw() {\n background(0);\n noStroke();\n fill(240, 150, 150);\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n box(45, 45, 45);\n describe('A pink cube with no edge outlines spinning on a black canvas.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Setting"
+ },
+ {
+ "name": "stroke",
+ "file": "src/color/setting.js",
+ "line": 998,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the color used to draw lines and borders around shapes. Calling\nstroke(255, 165, 0)
or stroke('orange')
means all shapes drawn after\nthe stroke()
command will be filled with the color orange. The way these\nparameters are interpreted may be changed with the\ncolorMode() function.
\nThe version of stroke()
with one parameter interprets the value one of\nthree ways. If the parameter is a number, it's interpreted as a grayscale\nvalue. If the parameter is a string, it's interpreted as a CSS color\nstring. A p5.Color object can also be provided to\nset the stroke color.
\nThe version of stroke()
with two parameters interprets the first one as a\ngrayscale value. The second parameter sets the alpha (transparency) value.
\nThe version of stroke()
with three parameters interprets them as RGB, HSB,\nor HSL colors, depending on the current colorMode()
.
\nThe version of stroke()
with four parameters interprets them as RGBA, HSBA,\nor HSLA colors, depending on the current colorMode()
. The last parameter\nsets the alpha (transparency) value.
\n",
+ "example": [
+ "\n\n// Grayscale integer value.\nstrokeWeight(4);\nstroke(51);\nrect(20, 20, 60, 60);\ndescribe('A white rectangle with a dark charcoal gray outline.');\n
\n\n\n\n\n// R, G & B integer values.\nstroke(255, 204, 0);\nstrokeWeight(4);\nrect(20, 20, 60, 60);\ndescribe('A white rectangle with a yellow outline.');\n
\n\n\n\n\n// H, S & B integer values.\ncolorMode(HSB);\nstrokeWeight(4);\nstroke(255, 204, 100);\nrect(20, 20, 60, 60);\ndescribe('A white rectangle with a royal blue outline.');\n
\n\n\n\n\n// A CSS named color.\nstroke('red');\nstrokeWeight(4);\nrect(20, 20, 60, 60);\ndescribe('A white rectangle with a red outline.');\n
\n\n\n\n\n// Three-digit hex RGB notation.\nstroke('#fae');\nstrokeWeight(4);\nrect(20, 20, 60, 60);\ndescribe('A white rectangle with a pink outline.');\n
\n\n\n\n\n// Six-digit hex RGB notation.\nstroke('#222222');\nstrokeWeight(4);\nrect(20, 20, 60, 60);\ndescribe('A white rectangle with a black outline.');\n
\n\n\n\n\n// Integer RGB notation.\nstroke('rgb(0,255,0)');\nstrokeWeight(4);\nrect(20, 20, 60, 60);\ndescribe('A whiite rectangle with a bright green outline.');\n
\n\n\n\n\n// Integer RGBA notation.\nstroke('rgba(0,255,0,0.25)');\nstrokeWeight(4);\nrect(20, 20, 60, 60);\ndescribe('A white rectangle with a soft green outline.');\n
\n\n\n\n\n// Percentage RGB notation.\nstroke('rgb(100%,0%,10%)');\nstrokeWeight(4);\nrect(20, 20, 60, 60);\ndescribe('A white rectangle with a red outline.');\n
\n\n\n\n\n// Percentage RGBA notation.\nstroke('rgba(100%,0%,100%,0.5)');\nstrokeWeight(4);\nrect(20, 20, 60, 60);\ndescribe('A white rectangle with a dark fuchsia outline.');\n
\n\n\n\n\n// p5.Color object.\nstroke(color(0, 0, 255));\nstrokeWeight(4);\nrect(20, 20, 60, 60);\ndescribe('A white rectangle with a blue outline.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "red value if color mode is RGB or hue value if color mode is HSB.",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "description": "green value if color mode is RGB or saturation value if color mode is HSB.",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "description": "blue value if color mode is RGB or brightness value if color mode is HSB.",
+ "type": "Number"
+ },
+ {
+ "name": "alpha",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "a color string.",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "gray",
+ "description": "a grayscale value.",
+ "type": "Number"
+ },
+ {
+ "name": "alpha",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "values",
+ "description": "an array containing the red, green, blue,\nand alpha components of the color.",
+ "type": "Number[]"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "the stroke color.",
+ "type": "p5.Color"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Setting"
+ },
+ {
+ "name": "erase",
+ "file": "src/color/setting.js",
+ "line": 1080,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "All drawing that follows erase() will subtract\nfrom the canvas, revealing the web page underneath. The erased areas will\nbecome transparent, allowing the content behind the canvas to show through.\nThe fill(), stroke(), and\nblendMode() have no effect once erase()
is\ncalled.
\nThe erase()
function has two optional parameters. The first parameter\nsets the strength of erasing by the shape's interior. A value of 0 means\nthat no erasing will occur. A value of 255 means that the shape's interior\nwill fully erase the content underneath. The default value is 255\n(full strength).
\nThe second parameter sets the strength of erasing by the shape's edge. A\nvalue of 0 means that no erasing will occur. A value of 255 means that the\nshape's edge will fully erase the content underneath. The default value is\n255 (full strength).
\nTo cancel the erasing effect, use the noErase()\nfunction.
\nerase()
has no effect on drawing done with the\nimage() and\nbackground() functions.
\n",
+ "example": [
+ "\n\nbackground(100, 100, 250);\nfill(250, 100, 100);\nsquare(20, 20, 60);\nerase();\ncircle(25, 30, 30);\nnoErase();\ndescribe('A purple canvas with a pink square in the middle. A circle is erased from the top-left, leaving a white hole.');\n
\n\n\n\n\nlet p = createP('I am a DOM element');\np.style('font-size', '12px');\np.style('width', '65px');\np.style('text-align', 'center');\np.position(18, 26);\n\nbackground(100, 170, 210);\nerase(200, 100);\ncircle(50, 50, 77);\nnoErase();\ndescribe('A blue canvas with a circular hole in the center that reveals the message \"I am a DOM element\".');\n
\n\n\n\n\nbackground(150, 250, 150);\nfill(100, 100, 250);\nsquare(20, 20, 60);\nstrokeWeight(5);\nerase(150, 255);\ntriangle(50, 10, 70, 50, 90, 10);\nnoErase();\ndescribe('A mint green canvas with a purple square in the center. A triangle in the top-right corner partially erases its interior and a fully erases its outline.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "strengthFill",
+ "description": "a number (0-255) for the strength of erasing under a shape's interior.\nDefaults to 255, which is full strength.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "strengthStroke",
+ "description": "a number (0-255) for the strength of erasing under a shape's edge.\nDefaults to 255, which is full strength.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Setting"
+ },
+ {
+ "name": "noErase",
+ "file": "src/color/setting.js",
+ "line": 1109,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Ends erasing that was started with erase().\nThe fill(), stroke(), and\nblendMode() settings will return to what they\nwere prior to calling erase().",
+ "example": [
+ "\n\nbackground(235, 145, 15);\nnoStroke();\nfill(30, 45, 220);\nrect(30, 10, 10, 80);\nerase();\ncircle(50, 50, 60);\nnoErase();\nrect(70, 10, 10, 80);\ndescribe('An orange canvas with two tall blue rectangles. A circular hole in the center erases the rectangle on the left but not the one on the right.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Color",
+ "submodule": "Setting"
+ },
+ {
+ "name": "print",
+ "file": "src/io/files.js",
+ "line": 1265,
+ "itemtype": "method",
+ "description": "Displays text in the web browser's console.
\nprint()
is helpful for printing values while debugging. Each call to\nprint()
creates a new line of text.
\nNote: Call print('\\n')
to print a blank line. Calling print()
without\nan argument opens the browser's dialog for printing documents.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Prints \"hello, world\" to the console.\n print('hello, world');\n}\n
\n\n\n\n\nfunction setup() {\n let name = 'ada';\n // Prints \"hello, ada\" to the console.\n print(`hello, ${name}`);\n}\n
\n",
+ "\n\n// creates a file called 'newFile.txt'\nlet writer = createWriter('newFile.txt');\n// creates a file containing\n// My name is:\n// Teddy\nwriter.print('My name is:');\nwriter.print('Teddy');\n// close the PrintWriter and save the file\nwriter.close();\n
\n\n\n\nlet writer;\n\nfunction setup() {\n createCanvas(400, 400);\n // create a PrintWriter\n writer = createWriter('newFile.txt');\n}\n\nfunction draw() {\n writer.print([mouseX, mouseY]);\n}\n\nfunction mouseClicked() {\n writer.close();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "contents",
+ "description": "content to print to the console.",
+ "type": "Any"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "data",
+ "description": "all data to be printed by the PrintWriter",
+ "type": "Array"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "cursor",
+ "file": "src/core/environment.js",
+ "line": 272,
+ "itemtype": "method",
+ "description": "Changes the cursor's appearance.
\nThe first parameter, type
, sets the type of cursor to display. The\nbuilt-in options are ARROW
, CROSS
, HAND
, MOVE
, TEXT
, and WAIT
.\ncursor()
also recognizes standard CSS cursor properties passed as\nstrings: 'help'
, 'wait'
, 'crosshair'
, 'not-allowed'
, 'zoom-in'
,\nand 'grab'
. If the path to an image is passed, as in\ncursor('assets/target.png')
, then the image will be used as the cursor.\nImages must be in .cur, .gif, .jpg, .jpeg, or .png format.
\nThe parameters x
and y
are optional. If an image is used for the\ncursor, x
and y
set the location pointed to within the image. They are\nboth 0 by default, so the cursor points to the image's top-left corner. x
\nand y
must be less than the image's width and height, respectively.
\n",
+ "example": [
+ "\n\nfunction draw() {\n background(200);\n\n // Set the cursor to crosshairs: +\n cursor(CROSS);\n\n describe('A gray square. The cursor appears as crosshairs.');\n}\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n // Divide the canvas into quadrants.\n line(50, 0, 50, 100);\n line(0, 50, 100, 50);\n\n // Change cursor based on mouse position.\n if (mouseX < 50 && mouseY < 50) {\n cursor(CROSS);\n } else if (mouseX > 50 && mouseY < 50) {\n cursor('progress');\n } else if (mouseX > 50 && mouseY > 50) {\n cursor('https://avatars0.githubusercontent.com/u/1617169?s=16');\n } else {\n cursor('grab');\n }\n\n describe('A gray square divided into quadrants. The cursor image changes when the mouse moves to each quadrant.');\n}\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n // Change the cursor's active spot\n // when the mouse is pressed.\n if (mouseIsPressed === true) {\n cursor('https://avatars0.githubusercontent.com/u/1617169?s=16', 8, 8);\n } else {\n cursor('https://avatars0.githubusercontent.com/u/1617169?s=16');\n }\n\n describe('An image of three purple curves follows the mouse. The image shifts when the mouse is pressed.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "type",
+ "description": "Built-in: either ARROW, CROSS, HAND, MOVE, TEXT, or WAIT.\nNative CSS properties: 'grab', 'progress', and so on.\nPath to cursor image.",
+ "type": "String|Constant"
+ },
+ {
+ "name": "x",
+ "description": "horizontal active spot of the cursor.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "vertical active spot of the cursor.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "frameRate",
+ "file": "src/core/environment.js",
+ "line": 372,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the number of frames to draw per second.
\nCalling frameRate()
with one numeric argument, as in frameRate(30)
,\nattempts to draw 30 frames per second (FPS). The target frame rate may not\nbe achieved depending on the sketch's processing needs. Most computers\ndefault to a frame rate of 60 FPS. Frame rates of 24 FPS and above are\nfast enough for smooth animations.
\nCalling frameRate()
without an argument returns the current frame rate.\nThe value returned is an approximation.
\n",
+ "example": [
+ "\n\nfunction draw() {\n background(200);\n\n // Set the x variable based\n // on the current frameCount.\n let x = frameCount % 100;\n\n // If the mouse is pressed,\n // decrease the frame rate.\n if (mouseIsPressed === true) {\n frameRate(10);\n } else {\n frameRate(60);\n }\n\n // Use x to set the circle's\n // position.\n circle(x, 50, 20);\n\n describe('A white circle on a gray background. The circle moves from left to right in a loop. It slows down when the mouse is pressed.');\n}\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n // If the mouse is pressed, do lots\n // of math to slow down drawing.\n if (mouseIsPressed === true) {\n for (let i = 0; i < 1000000; i += 1) {\n random();\n }\n }\n\n // Get the current frame rate\n // and display it.\n let fps = frameRate();\n text(fps, 50, 50);\n\n describe('A number written in black written on a gray background. The number decreases when the mouse is pressed.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fps",
+ "description": "number of frames to draw per second.",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "current frame rate.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "current frame rate.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "getTargetFrameRate",
+ "file": "src/core/environment.js",
+ "line": 436,
+ "itemtype": "method",
+ "description": "Returns the target frame rate. The value is either the system frame rate or\nthe last value passed to frameRate().",
+ "example": [
+ "\n\nfunction draw() {\n background(200);\n\n // Set the frame rate to 20.\n frameRate(20);\n\n // Get the target frame rate and\n // display it.\n let fps = getTargetFrameRate();\n text(fps, 43, 54);\n\n describe('The number 20 written in black on a gray background.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "_targetFrameRate",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "_targetFrameRate",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "noCursor",
+ "file": "src/core/environment.js",
+ "line": 462,
+ "itemtype": "method",
+ "description": "Hides the cursor from view.",
+ "example": [
+ "\n\nfunction setup() {\n // Hide the cursor.\n noCursor();\n}\n\nfunction draw() {\n background(200);\n\n circle(mouseX, mouseY, 10);\n\n describe('A white circle on a gray background. The circle follows the mouse as it moves. The cursor is hidden.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "windowResized",
+ "file": "src/core/environment.js",
+ "line": 719,
+ "itemtype": "method",
+ "description": "The code in windowResized()
is called once each time the browser window\nis resized. It's a good place to resize the canvas or make other\nadjustments to accommodate the new window size.
\nThe event
parameter is optional. If added to the function definition, it\ncan be used for debugging or other purposes.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(windowWidth, windowHeight);\n}\n\nfunction draw() {\n background(200);\n\n describe('A gray canvas that takes up the entire browser window. It changes size to match the browser window.');\n}\n\n// Resize the canvas when the\n// browser's size changes.\nfunction windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}\n
\n"
+ ],
+ "alt": "This example does not render anything.\n\n\n\nfunction setup() {\n createCanvas(windowWidth, windowHeight);\n}\n\nfunction draw() {\n background(200);\n\n describe('A gray canvas that takes up the entire browser window. It changes size to match the browser window.');\n}\n\nfunction windowResized(event) {\n // Resize the canvas when the\n // browser's size changes.\n resizeCanvas(windowWidth, windowHeight);\n\n // Print the resize event to the console for debugging.\n print(event);\n}\n
\n\nThis example does not render anything.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional resize Event.",
+ "optional": 1,
+ "type": "UIEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "fullscreen",
+ "file": "src/core/environment.js",
+ "line": 923,
+ "itemtype": "method",
+ "description": "Toggles full-screen mode or returns the current mode.
\nCalling fullscreen(true)
makes the sketch full-screen. Calling\nfullscreen(false)
makes the sketch its original size.
\nCalling fullscreen()
without an argument returns true
if the sketch\nis in full-screen mode and false
if not.
\nNote: Due to browser restrictions, fullscreen()
can only be called with\nuser input such as a mouse press.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n describe('A gray canvas that switches between default and full-screen display when clicked.');\n}\n\n// If the mouse is pressed,\n// toggle full-screen mode.\nfunction mousePressed() {\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n let fs = fullscreen();\n fullscreen(!fs);\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "val",
+ "description": "whether the sketch should be in fullscreen mode.",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ],
+ "return": {
+ "description": "current fullscreen state.",
+ "type": "Boolean"
+ }
+ }
+ ],
+ "return": {
+ "description": "current fullscreen state.",
+ "type": "Boolean"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "pixelDensity",
+ "file": "src/core/environment.js",
+ "line": 995,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the pixel scaling for high pixel density displays.
\nBy default, the pixel density is set to match display density. Calling\npixelDensity(1)
turn this off.
\nCalling pixelDensity()
without an argument returns the current pixel\ndensity.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Set the pixel density to 1.\n pixelDensity(1);\n\n // Create a canvas and draw\n // a circle.\n createCanvas(100, 100);\n background(200);\n circle(50, 50, 70);\n\n describe('A fuzzy white circle on a gray canvas.');\n}\n
\n\n\n\n\nfunction setup() {\n // Set the pixel density to 3.\n pixelDensity(3);\n\n // Create a canvas, paint the\n // background, and draw a\n // circle.\n createCanvas(100, 100);\n background(200);\n circle(50, 50, 70);\n\n describe('A sharp white circle on a gray canvas.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "val",
+ "description": "desired pixel density.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "current pixel density of the sketch.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "current pixel density of the sketch.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "displayDensity",
+ "file": "src/core/environment.js",
+ "line": 1047,
+ "itemtype": "method",
+ "description": "Returns the display's current pixel density.",
+ "example": [
+ "\n\nfunction setup() {\n // Set the pixel density to 1.\n pixelDensity(1);\n\n // Create a canvas and draw\n // a circle.\n createCanvas(100, 100);\n background(200);\n circle(50, 50, 70);\n\n describe('A fuzzy white circle drawn on a gray background. The circle becomes sharper when the mouse is pressed.');\n}\n\nfunction mousePressed() {\n // Get the current display density.\n let d = displayDensity();\n\n // Use the display density to set\n // the sketch's pixel density.\n pixelDensity(d);\n\n // Paint the background and\n // draw a circle.\n background(200);\n circle(50, 50, 70);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "current pixel density of the display.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "current pixel density of the display.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "getURL",
+ "file": "src/core/environment.js",
+ "line": 1105,
+ "itemtype": "method",
+ "description": "Returns the sketch's current\nURL\nas a string.",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Get the sketch's URL\n // and display it.\n let url = getURL();\n textWrap(CHAR);\n text(url, 0, 40, 100);\n\n describe('The URL \"https://p5js.org/reference/#/p5/getURL\" written in black on a gray background.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "url",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "url",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "getURLPath",
+ "file": "src/core/environment.js",
+ "line": 1137,
+ "itemtype": "method",
+ "description": "Returns the current\nURL\npath as an array of strings.
\nFor example, consider a sketch hosted at the URL\nhttps://example.com/sketchbook
. Calling getURLPath()
returns\n['sketchbook']
. For a sketch hosted at the URL\nhttps://example.com/sketchbook/monday
, getURLPath()
returns\n['sketchbook', 'monday']
.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Get the sketch's URL path\n // and display the first\n // part.\n let path = getURLPath();\n text(path[0], 25, 54);\n\n describe('The word \"reference\" written in black on a gray background.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "path components.",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "path components.",
+ "type": "String[]"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "getURLParams",
+ "file": "src/core/environment.js",
+ "line": 1176,
+ "itemtype": "method",
+ "description": "Returns the current\nURL parameters\nin an Object.
\nFor example, calling getURLParams()
in a sketch hosted at the URL\nhttps://p5js.org?year=2014&month=May&day=15
returns\n{ year: 2014, month: 'May', day: 15 }
.
\n",
+ "example": [
+ "\n\n// Imagine this sketch is hosted at the following URL:\n// https://p5js.org?year=2014&month=May&day=15\n\nfunction setup() {\n background(200);\n\n // Get the sketch's URL\n // parameters and display\n // them.\n let params = getURLParams();\n text(params.day, 10, 20);\n text(params.month, 10, 40);\n text(params.year, 10, 60);\n\n describe('The text \"15\", \"May\", and \"2014\" written in black on separate lines.');\n}\n
\n"
+ ],
+ "alt": "This example does not render anything.",
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "URL params",
+ "type": "Object"
+ }
+ }
+ ],
+ "return": {
+ "description": "URL params",
+ "type": "Object"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Environment",
+ "submodule": "Environment"
+ },
+ {
+ "name": "preload",
+ "file": "src/core/main.js",
+ "line": 752,
+ "itemtype": "method",
+ "description": "Called directly before setup(), the preload() function is used to handle\nasynchronous loading of external files in a blocking way. If a preload\nfunction is defined, setup() will wait until any load calls within have\nfinished. Nothing besides load calls (loadImage, loadJSON, loadFont,\nloadStrings, etc.) should be inside the preload function. If asynchronous\nloading is preferred, the load methods can instead be called in setup()\nor anywhere else with the use of a callback parameter.
\nBy default the text \"loading...\" will be displayed. To make your own\nloading page, include an HTML element with id \"p5_loading\" in your\npage. More information here.
\n",
+ "example": [
+ "\nlet img;\nlet c;\nfunction preload() {\n // preload() runs once\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n // setup() waits until preload() is done\n img.loadPixels();\n // get color of middle pixel\n c = img.get(img.width / 2, img.height / 2);\n}\n\nfunction draw() {\n background(c);\n image(img, 25, 25, 50, 50);\n}\n
"
+ ],
+ "alt": "nothing displayed",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Structure",
+ "submodule": "Structure"
+ },
+ {
+ "name": "setup",
+ "file": "src/core/main.js",
+ "line": 752,
+ "itemtype": "method",
+ "description": "The setup() function is called once when the program starts. It's used to\ndefine initial environment properties such as screen size and background\ncolor and to load media such as images and fonts as the program starts.\nThere can only be one setup() function for each program and it shouldn't\nbe called again after its initial execution.
\nNote: Variables declared within setup() are not accessible within other\nfunctions, including draw().
\n",
+ "example": [
+ "\nlet a = 0;\n\nfunction setup() {\n background(0);\n noStroke();\n fill(102);\n}\n\nfunction draw() {\n rect(a++ % width, 10, 2, 80);\n}\n
"
+ ],
+ "alt": "nothing displayed",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Structure",
+ "submodule": "Structure"
+ },
+ {
+ "name": "draw",
+ "file": "src/core/main.js",
+ "line": 752,
+ "itemtype": "method",
+ "description": "Called directly after setup(), the draw() function continuously executes\nthe lines of code contained inside its block until the program is stopped\nor noLoop() is called. Note if noLoop() is called in setup(), draw() will\nstill be executed once before stopping. draw() is called automatically and\nshould never be called explicitly.
\nIt should always be controlled with noLoop(), redraw() and loop(). After\nnoLoop() stops the code in draw() from executing, redraw() causes the\ncode inside draw() to execute once, and loop() will cause the code\ninside draw() to resume executing continuously.
\nThe number of times draw() executes in each second may be controlled with\nthe frameRate() function.
\nThere can only be one draw() function for each sketch, and draw() must\nexist if you want the code to run continuously, or to process events such\nas mousePressed(). Sometimes, you might have an empty call to draw() in\nyour program, as shown in the above example.
\nIt is important to note that the drawing coordinate system will be reset\nat the beginning of each draw() call. If any transformations are performed\nwithin draw() (ex: scale, rotate, translate), their effects will be\nundone at the beginning of draw(), so transformations will not accumulate\nover time. On the other hand, styling applied (ex: fill, stroke, etc) will\nremain in effect.
\n",
+ "example": [
+ "\nlet yPos = 0;\nfunction setup() {\n // setup() runs once\n frameRate(30);\n}\nfunction draw() {\n // draw() loops forever, until stopped\n background(204);\n yPos = yPos - 1;\n if (yPos < 0) {\n yPos = height;\n }\n line(0, yPos, width, yPos);\n}\n
"
+ ],
+ "alt": "nothing displayed",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Structure",
+ "submodule": "Structure"
+ },
+ {
+ "name": "parent",
+ "file": "src/core/p5.Element.js",
+ "line": 216,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Attaches this element to a parent element.
\nFor example, a <div></div>
element may be used as a box to\nhold two pieces of text, a header and a paragraph. The\n<div></div>
is the parent element of both the header and\nparagraph.
\nThe parameter parent
can have one of three types. parent
can be a\nstring with the parent element's ID, as in\nmyElement.parent('container')
. It can also be another\np5.Element object, as in\nmyElement.parent(myDiv)
. Finally, parent
can be an HTMLElement
\nobject, as in myElement.parent(anotherElement)
.
\nCalling myElement.parent()
without an argument returns this element's\nparent.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Create a div element.\n let div = createDiv();\n // Place the div in the top-left corner.\n div.position(10, 20);\n // Set its width and height.\n div.size(80, 60);\n // Set its background color to white\n div.style('background-color', 'white');\n // Align any text to the center.\n div.style('text-align', 'center');\n // Set its ID to \"container\".\n div.id('container');\n\n // Create a paragraph element.\n let p = createP('p5*js');\n // Make the div its parent\n // using its ID \"container\".\n p.parent('container');\n\n describe('The text \"p5*js\" written in black at the center of a white rectangle. The rectangle is inside a gray square.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n // Create rectangular div element.\n let div = createDiv();\n // Place the div in the top-left corner.\n div.position(10, 20);\n // Set its width and height.\n div.size(80, 60);\n // Set its background color and align\n // any text to the center.\n div.style('background-color', 'white');\n div.style('text-align', 'center');\n\n // Create a paragraph element.\n let p = createP('p5*js');\n // Make the div its parent.\n p.parent(div);\n\n describe('The text \"p5*js\" written in black at the center of a white rectangle. The rectangle is inside a gray square.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n // Create rectangular div element.\n let div = createDiv();\n // Place the div in the top-left corner.\n div.position(10, 20);\n // Set its width and height.\n div.size(80, 60);\n // Set its background color and align\n // any text to the center.\n div.style('background-color', 'white');\n div.style('text-align', 'center');\n\n // Create a paragraph element.\n let p = createP('p5*js');\n // Make the div its parent\n // using the underlying\n // HTMLElement.\n p.parent(div.elt);\n\n describe('The text \"p5*js\" written in black at the center of a white rectangle. The rectangle is inside a gray square.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "parent",
+ "description": "ID, p5.Element,\nor HTMLElement of desired parent element.",
+ "type": "String|p5.Element|Object"
+ }
+ ]
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Element"
+ },
+ "class": "p5.Element",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "id",
+ "file": "src/core/p5.Element.js",
+ "line": 269,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets this element's ID using a given string.
\nCalling myElement.id()
without an argument returns its ID as a string.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Set the canvas' ID\n // to \"mycanvas\".\n cnv.id('mycanvas');\n\n // Get the canvas' ID.\n let id = cnv.id();\n text(id, 24, 54);\n\n describe('The text \"mycanvas\" written in black on a gray background.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID of the element.",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "ID of the element.",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "ID of the element.",
+ "type": "String"
+ },
+ "class": "p5.Element",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "class",
+ "file": "src/core/p5.Element.js",
+ "line": 320,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Adds a\nclass attribute\nto the element.
\nCalling myElement.class()
without an argument returns a string with its current classes.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Add the class \"small\" to the\n // canvas element.\n cnv.class('small');\n\n // Get the canvas element's class\n // and display it.\n let c = cnv.class();\n text(c, 35, 54);\n\n describe('The word \"small\" written in black on a gray canvas.');\n\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "class",
+ "description": "class to add.",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "element's classes, if any.",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "element's classes, if any.",
+ "type": "String"
+ },
+ "class": "p5.Element",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "mousePressed",
+ "file": "src/events/mouse.js",
+ "line": 653,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when the mouse is pressed over the element.\nCalling myElement.mousePressed(false)
disables the function.
\nNote: Some mobile browsers may also trigger this event when the element\nreceives a quick tap.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call randomColor() when the canvas\n // is pressed.\n cnv.mousePressed(randomColor);\n\n describe('A gray square changes color when the mouse is pressed.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n}\n
\n\n\n\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Paint the background either\n // red, yellow, blue, or green\n // when the canvas is pressed.\n cnv.mousePressed(() => {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n });\n\n describe('A gray square changes color when the mouse is pressed.');\n}\n
\n",
+ "\n\n// Click anywhere in the webpage to change\n// the color value of the rectangle\n\nlet colorValue = 0;\nfunction draw() {\n fill(colorValue);\n rect(25, 25, 50, 50);\n describe('black 50-by-50 rect turns white with mouse click/press.');\n}\nfunction mousePressed() {\n if (colorValue === 0) {\n colorValue = 255;\n } else {\n colorValue = 0;\n }\n}\n
\n\n\n\n\nfunction mousePressed() {\n ellipse(mouseX, mouseY, 5, 5);\n // prevent default\n return false;\n}\n
\n\n\n\n\n// returns a MouseEvent object\n// as a callback argument\nfunction mousePressed(event) {\n console.log(event);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the mouse is\npressed over the element.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional MouseEvent callback argument.",
+ "optional": 1,
+ "type": "MouseEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "Events",
+ "submodule": "Mouse"
+ },
+ {
+ "name": "doubleClicked",
+ "file": "src/events/mouse.js",
+ "line": 872,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when the mouse is pressed twice over the element.\nCalling myElement.doubleClicked(false)
disables the function.",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call randomColor() when the\n // canvas is double-clicked.\n cnv.doubleClicked(randomColor);\n\n describe('A gray square changes color when the user double-clicks the canvas.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n}\n
\n\n\n\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Paint the background either\n // red, yellow, blue, or green\n // when the canvas is double-clicked.\n cnv.doubleClicked(() => {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n });\n\n describe('A gray square changes color when the user double-clicks the canvas.');\n}\n
\n",
+ "\n\n// Click within the image to change\n// the value of the rectangle\n// after the mouse has been double clicked\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe('black 50-by-50 rect turns white with mouse doubleClick/press.');\n}\n\nfunction doubleClicked() {\n if (value === 0) {\n value = 255;\n } else {\n value = 0;\n }\n}\n
\n\n\n\n\nfunction doubleClicked() {\n ellipse(mouseX, mouseY, 5, 5);\n // prevent default\n return false;\n}\n
\n\n\n\n\n// returns a MouseEvent object\n// as a callback argument\nfunction doubleClicked(event) {\n console.log(event);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the mouse is\ndouble clicked over the element.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional MouseEvent callback argument.",
+ "optional": 1,
+ "type": "MouseEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "Events",
+ "submodule": "Mouse"
+ },
+ {
+ "name": "mouseWheel",
+ "file": "src/events/mouse.js",
+ "line": 938,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when the mouse wheel scrolls over th element.
\nThe callback function, fxn
, is passed an event
object. event
has\ntwo numeric properties, deltaY
and deltaX
. event.deltaY
is\nnegative if the mouse wheel rotates away from the user. It's positive if\nthe mouse wheel rotates toward the user. event.deltaX
is positive if\nthe mouse wheel moves to the right. It's negative if the mouse wheel moves\nto the left.
\nCalling myElement.mouseWheel(false)
disables the function.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call randomColor() when the\n // mouse wheel moves.\n cnv.mouseWheel(randomColor);\n\n describe('A gray square changes color when the user scrolls the mouse wheel over the canvas.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n}\n
\n\n\n\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Paint the background either\n // red, yellow, blue, or green\n // when the mouse wheel moves.\n cnv.mouseWheel(() => {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n });\n\n describe('A gray square changes color when the user scrolls the mouse wheel over the canvas.');\n}\n
\n\n\n\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call changeBackground() when the\n // mouse wheel moves.\n cnv.mouseWheel(changeBackground);\n\n describe('A gray square. When the mouse wheel scrolls over the square, it changes color and displays shapes.');\n}\n\nfunction changeBackground(event) {\n // Change the background color\n // based on deltaY.\n if (event.deltaY > 0) {\n background('deeppink');\n } else if (event.deltaY < 0) {\n background('cornflowerblue');\n } else {\n background(200);\n }\n\n // Draw a shape based on deltaX.\n if (event.deltaX > 0) {\n circle(50, 50, 20);\n } else if (event.deltaX < 0) {\n square(40, 40, 20);\n }\n}\n
\n",
+ "\n\nlet pos = 25;\n\nfunction draw() {\n background(237, 34, 93);\n fill(0);\n rect(25, pos, 50, 50);\n describe(`black 50-by-50 rect moves up and down with vertical scroll.\n fuchsia background`);\n}\n\nfunction mouseWheel(event) {\n print(event.delta);\n //move the square according to the vertical scroll amount\n pos += event.delta;\n //uncomment to block page scrolling\n //return false;\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the mouse wheel is\nscrolled over the element.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional WheelEvent callback argument.",
+ "optional": 1,
+ "type": "WheelEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "Events",
+ "submodule": "Mouse"
+ },
+ {
+ "name": "mouseReleased",
+ "file": "src/events/mouse.js",
+ "line": 730,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when the mouse is released over the element. Calling\nmyElement.mouseReleased(false)
disables the function.
\nNote: Some mobile browsers may also trigger this event when the element\nreceives a quick tap.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call randomColor() when a\n // mouse press ends.\n cnv.mouseReleased(randomColor);\n\n describe('A gray square changes color when the user releases a mouse press.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n}\n
\n\n\n\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Paint the background either\n // red, yellow, blue, or green\n // when a mouse press ends.\n cnv.mouseReleased(() => {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n });\n\n describe('A gray square changes color when the user releases a mouse press.');\n}\n
\n",
+ "\n\n// Click within the image to change\n// the value of the rectangle\n// after the mouse has been clicked\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe('black 50-by-50 rect turns white with mouse click/press.');\n}\nfunction mouseReleased() {\n if (value === 0) {\n value = 255;\n } else {\n value = 0;\n }\n}\n
\n\n\n\n\nfunction mouseReleased() {\n ellipse(mouseX, mouseY, 5, 5);\n // prevent default\n return false;\n}\n
\n\n\n\n\n// returns a MouseEvent object\n// as a callback argument\nfunction mouseReleased(event) {\n console.log(event);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the mouse is\npressed over the element.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional MouseEvent callback argument.",
+ "optional": 1,
+ "type": "MouseEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "Events",
+ "submodule": "Mouse"
+ },
+ {
+ "name": "mouseClicked",
+ "file": "src/events/mouse.js",
+ "line": 806,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when the mouse is pressed and released over the element.\nCalling myElement.mouseReleased(false)
disables the function.
\nNote: Some mobile browsers may also trigger this event when the element\nreceives a quick tap.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call randomColor() when a\n // mouse press ends.\n cnv.mouseClicked(randomColor);\n\n describe('A gray square changes color when the user releases a mouse press.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n}\n
\n\n\n\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Paint the background either\n // red, yellow, blue, or green\n // when a mouse press ends.\n cnv.mouseClicked(() => {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n });\n\n describe('A gray square changes color when the user releases a mouse press.');\n}\n
\n",
+ "\n\n// Click within the image to change\n// the value of the rectangle\n// after the mouse has been clicked\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe('black 50-by-50 rect turns white with mouse click/press.');\n}\n\nfunction mouseClicked() {\n if (value === 0) {\n value = 255;\n } else {\n value = 0;\n }\n}\n
\n\n\n\n\nfunction mouseClicked() {\n ellipse(mouseX, mouseY, 5, 5);\n // prevent default\n return false;\n}\n
\n\n\n\n\n// returns a MouseEvent object\n// as a callback argument\nfunction mouseClicked(event) {\n console.log(event);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the mouse is\npressed and released over the element.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional MouseEvent callback argument.",
+ "optional": 1,
+ "type": "MouseEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "Events",
+ "submodule": "Mouse"
+ },
+ {
+ "name": "mouseMoved",
+ "file": "src/events/mouse.js",
+ "line": 573,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when the mouse moves over the element. Calling\nmyElement.mouseMoved(false)
disables the function.",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call randomColor() when the\n // mouse moves.\n cnv.mouseMoved(randomColor);\n\n describe('A gray square changes color when the mouse moves over the canvas.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n}\n
\n\n\n\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Paint the background either\n // red, yellow, blue, or green\n // when the mouse moves.\n cnv.mouseMoved(() => {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n });\n\n describe('A gray square changes color when the mouse moves over the canvas.');\n}\n
\n",
+ "\n\n// Move the mouse across the page\n// to change its value\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe(`black 50-by-50 rect becomes lighter with mouse movements until\n white then resets no image displayed`);\n}\nfunction mouseMoved() {\n value = value + 5;\n if (value > 255) {\n value = 0;\n }\n}\n
\n\n\n\n\nfunction mouseMoved() {\n ellipse(mouseX, mouseY, 5, 5);\n // prevent default\n return false;\n}\n
\n\n\n\n\n// returns a MouseEvent object\n// as a callback argument\nfunction mouseMoved(event) {\n console.log(event);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the mouse\nmoves over the element.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional MouseEvent callback argument.",
+ "optional": 1,
+ "type": "MouseEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "Events",
+ "submodule": "Mouse"
+ },
+ {
+ "name": "mouseOver",
+ "file": "src/core/p5.Element.js",
+ "line": 823,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when the mouse moves onto the element. Calling\nmyElement.mouseOver(false)
disables the function.",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call randomColor() when the\n // mouse moves onto the canvas.\n cnv.mouseOver(randomColor);\n\n describe('A gray square changes color when the mouse moves onto the canvas.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n}\n
\n\n\n\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Paint the background either\n // red, yellow, blue, or green\n // when the mouse moves onto\n // the canvas.\n cnv.mouseOver(() => {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n });\n\n describe('A gray square changes color when the mouse moves onto the canvas.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the mouse\nmoves onto the element.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "mouseOut",
+ "file": "src/core/p5.Element.js",
+ "line": 886,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when the mouse moves off the element. Calling\nmyElement.mouseOut(false)
disables the function.",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call randomColor() when the\n // mouse moves off the canvas.\n cnv.mouseOut(randomColor);\n\n describe('A gray square changes color when the mouse moves off the canvas.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n}\n
\n\n\n\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Paint the background either\n // red, yellow, blue, or green\n // when the mouse moves off\n // the canvas.\n cnv.mouseOut(() => {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n });\n\n describe('A gray square changes color when the mouse moves off the canvas.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the mouse\nmoves off the element.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "touchStarted",
+ "file": "src/events/touch.js",
+ "line": 124,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when the element is touched. Calling\nmyElement.touchStarted(false)
disables the function.
\nNote: Touch functions only work on mobile devices.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call randomColor() when the\n // user touches the canvas.\n cnv.touchStarted(randomColor);\n\n describe('A gray square changes color when the user touches the canvas.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n}\n
\n\n\n\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Paint the background either\n // red, yellow, blue, or green\n // when the user touches the\n // canvas.\n cnv.touchStarted(() => {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n });\n\n describe('A gray square changes color when the user touches the canvas.');\n}\n
\n",
+ "\n\n// Touch within the image to change\n// the value of the rectangle\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe('50-by-50 black rect turns white with touch event.');\n}\nfunction touchStarted() {\n if (value === 0) {\n value = 255;\n } else {\n value = 0;\n }\n}\n
\n\n\n\n\nfunction touchStarted() {\n ellipse(mouseX, mouseY, 5, 5);\n // prevent default\n return false;\n}\ndescribe('no image displayed');\n
\n\n\n\n\n// returns a TouchEvent object\n// as a callback argument\nfunction touchStarted(event) {\n console.log(event);\n}\ndescribe('no image displayed');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the touch\nstarts.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional TouchEvent callback argument.",
+ "optional": 1,
+ "type": "TouchEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "Events",
+ "submodule": "Touch"
+ },
+ {
+ "name": "touchMoved",
+ "file": "src/events/touch.js",
+ "line": 202,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when the user touches the element and moves their\nfinger. Calling myElement.touchMoved(false)
disables the\nfunction.
\nNote: Touch functions only work on mobile devices.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call randomColor() when the\n // user touches the canvas\n // and moves.\n cnv.touchMoved(randomColor);\n\n describe('A gray square changes color when the user touches the canvas and moves.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n}\n
\n\n\n\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Paint the background either\n // red, yellow, blue, or green\n // when the user touches the\n // canvas and moves.\n cnv.touchMoved(() => {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n });\n\n describe('A gray square changes color when the user touches the canvas and moves.');\n}\n
\n",
+ "\n\n// Move your finger across the page\n// to change its value\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe('50-by-50 black rect turns lighter with touch until white. resets');\n}\nfunction touchMoved() {\n value = value + 5;\n if (value > 255) {\n value = 0;\n }\n}\n
\n\n\n\n\nfunction touchMoved() {\n ellipse(mouseX, mouseY, 5, 5);\n // prevent default\n return false;\n}\ndescribe('no image displayed');\n
\n\n\n\n\n// returns a TouchEvent object\n// as a callback argument\nfunction touchMoved(event) {\n console.log(event);\n}\ndescribe('no image displayed');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the touch\nmoves over the element.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional TouchEvent callback argument.",
+ "optional": 1,
+ "type": "TouchEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "Events",
+ "submodule": "Touch"
+ },
+ {
+ "name": "touchEnded",
+ "file": "src/events/touch.js",
+ "line": 274,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when the user stops touching the element. Calling\nmyElement.touchMoved(false)
disables the function.
\nNote: Touch functions only work on mobile devices.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call randomColor() when the\n // user touches the canvas,\n // then lifts their finger.\n cnv.touchEnded(randomColor);\n\n describe('A gray square changes color when the user touches the canvas, then lifts their finger.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n}\n
\n\n\n\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Paint the background either\n // red, yellow, blue, or green\n // when the user touches the\n // canvas, then lifts their\n // finger.\n cnv.touchEnded(() => {\n let c = random(['red', 'yellow', 'blue', 'green']);\n background(c);\n });\n\n describe('A gray square changes color when the user touches the canvas, then lifts their finger.');\n}\n
\n",
+ "\n\n// Release touch within the image to\n// change the value of the rectangle\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe('50-by-50 black rect turns white with touch.');\n}\nfunction touchEnded() {\n if (value === 0) {\n value = 255;\n } else {\n value = 0;\n }\n}\n
\n\n\n\n\nfunction touchEnded() {\n ellipse(mouseX, mouseY, 5, 5);\n // prevent default\n return false;\n}\ndescribe('no image displayed');\n
\n\n\n\n\n// returns a TouchEvent object\n// as a callback argument\nfunction touchEnded(event) {\n console.log(event);\n}\ndescribe('no image displayed');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the touch\nends.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional TouchEvent callback argument.",
+ "optional": 1,
+ "type": "TouchEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "Events",
+ "submodule": "Touch"
+ },
+ {
+ "name": "dragOver",
+ "file": "src/core/p5.Element.js",
+ "line": 1148,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when a file is dragged over the element. Calling\nmyElement.dragOver(false)
disables the function.",
+ "example": [
+ "\n\n// Drag a file over the canvas to test.\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call helloFile() when a\n // file is dragged over\n // the canvas.\n cnv.dragOver(helloFile);\n\n describe('A gray square. The text \"hello, file\" appears when a file is dragged over the square.');\n}\n\nfunction helloFile() {\n text('hello, file', 50, 50);\n}\n
\n\n\n\n\n// Drag a file over the canvas to test.\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Say \"hello, file\" when a\n // file is dragged over\n // the canvas.\n cnv.dragOver(() => {\n text('hello, file', 50, 50);\n });\n\n describe('A gray square. The text \"hello, file\" appears when a file is dragged over the square.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the file is\ndragged over the element.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "dragLeave",
+ "file": "src/core/p5.Element.js",
+ "line": 1213,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when a file is dragged off the element. Calling\nCalling myElement.dragLeave(false)
disables the function.",
+ "example": [
+ "\n\n// Drag a file over, then off\n// the canvas to test.\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Call byeFile() when a\n // file is dragged over,\n // then off the canvas.\n cnv.dragLeave(byeFile);\n\n describe('A gray square. The text \"bye, file\" appears when a file is dragged over, then off the square.');\n}\n\nfunction byeFile() {\n text('bye, file', 50, 50);\n}\n
\n\n\n\n\n// Drag a file over, then off\n// the canvas to test.\n\nfunction setup() {\n // Create a canvas element and\n // assign it to cnv.\n let cnv = createCanvas(100, 100);\n\n background(200);\n\n // Say \"bye, file\" when a\n // file is dragged over,\n // then off the canvas.\n cnv.dragLeave(() => {\n text('bye, file', 50, 50);\n });\n\n describe('A gray square. The text \"bye, file\" appears when a file is dragged over, then off the square.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the file is\ndragged off the element.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "calculateOffset",
+ "file": "src/core/p5.Renderer.js",
+ "line": 524,
+ "itemtype": "method",
+ "description": "Helper fxn to measure ascent and descent.\nAdapted from http://stackoverflow.com/a/25355178",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ {
+ "name": "log",
+ "file": "src/math/calculation.js",
+ "line": 314,
+ "itemtype": "method",
+ "description": "Calculates the natural logarithm (the base-e logarithm) of a number. This\nfunction expects the n
parameter to be a value greater than 0.0.",
+ "example": [
+ "\n\nfunction draw() {\n // Invert the y-axis.\n scale(1, -1);\n translate(0, -height);\n\n let x = frameCount;\n let y = 15 * log(x);\n point(x, y);\n\n describe('A series of black dots that get higher slowly from left to right.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "number greater than 0.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "natural logarithm of n.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "natural logarithm of n.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "createCanvas",
+ "file": "src/core/rendering.js",
+ "line": 77,
+ "itemtype": "method",
+ "description": "Creates a canvas element in the document and sets its dimensions\nin pixels. This method should be called only once at the start of setup().\nCalling createCanvas more than once in a\nsketch will result in very unpredictable behavior. If you want more than\none drawing canvas you could use createGraphics()\n(hidden by default but it can be shown).
\nImportant note: in 2D mode (i.e. when p5.Renderer
is not set) the origin (0,0)\nis positioned at the top left of the screen. In 3D mode (i.e. when p5.Renderer
\nis set to WEBGL
), the origin is positioned at the center of the canvas.\nSee this issue for more information.
\nA WebGL canvas will use a WebGL2 context if it is supported by the browser.\nCheck the webglVersion property to check what\nversion is being used, or call setAttributes({ version: 1 })\nto create a WebGL1 context.
\nThe system variables width and height are set by the parameters passed to this\nfunction. If createCanvas() is not used, the\nwindow will be given a default size of 100×100 pixels.
\nOptionally, an existing canvas can be passed using a selector, ie. document.getElementById('')
.\nIf specified, avoid using setAttributes()
afterwards, as this will remove and recreate the existing canvas.
\nFor more ways to position the canvas, see the\n\npositioning the canvas wiki page.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 50);\n background(153);\n line(0, 0, width, height);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "w",
+ "description": "width of the canvas",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "description": "height of the canvas",
+ "type": "Number"
+ },
+ {
+ "name": "renderer",
+ "description": "either P2D or WEBGL",
+ "optional": 1,
+ "type": "Constant"
+ },
+ {
+ "name": "canvas",
+ "description": "existing html canvas element",
+ "optional": 1,
+ "type": "HTMLCanvasElement"
+ }
+ ],
+ "return": {
+ "description": "pointer to p5.Renderer holding canvas",
+ "type": "p5.Renderer"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "w",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "type": "Number"
+ },
+ {
+ "name": "canvas",
+ "optional": 1,
+ "type": "HTMLCanvasElement"
+ }
+ ],
+ "return": {
+ "description": "pointer to p5.Renderer holding canvas",
+ "type": "p5.Renderer"
+ }
+ }
+ ],
+ "return": {
+ "description": "pointer to p5.Renderer holding canvas",
+ "type": "p5.Renderer"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ {
+ "name": "resizeCanvas",
+ "file": "src/core/rendering.js",
+ "line": 198,
+ "itemtype": "method",
+ "description": "Resizes the canvas to given width and height. The canvas will be cleared\nand draw will be called immediately, allowing the sketch to re-render itself\nin the resized canvas.",
+ "example": [
+ "\nfunction setup() {\n createCanvas(windowWidth, windowHeight);\n}\n\nfunction draw() {\n background(0, 100, 200);\n}\n\nfunction windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}\n
"
+ ],
+ "alt": "No image displayed.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "w",
+ "description": "width of the canvas",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "description": "height of the canvas",
+ "type": "Number"
+ },
+ {
+ "name": "noRedraw",
+ "description": "don't redraw the canvas immediately",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ {
+ "name": "noCanvas",
+ "file": "src/core/rendering.js",
+ "line": 247,
+ "itemtype": "method",
+ "description": "Removes the default canvas for a p5 sketch that doesn't require a canvas",
+ "example": [
+ "\n\nfunction setup() {\n noCanvas();\n}\n
\n"
+ ],
+ "alt": "no image displayed",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ {
+ "name": "createGraphics",
+ "file": "src/core/rendering.js",
+ "line": 303,
+ "itemtype": "method",
+ "description": "Creates and returns a new p5.Graphics object. Use this class if you need\nto draw into an off-screen graphics buffer. The two parameters define the\nwidth and height in pixels.
\nA WebGL p5.Graphics will use a WebGL2 context if it is supported by the browser.\nCheck the pg.webglVersion property of the renderer\nto check what version is being used, or call pg.setAttributes({ version: 1 })\nto create a WebGL1 context.
\nOptionally, an existing canvas can be passed using a selector, ie. document.getElementById('').\nBy default this canvas will be hidden (offscreen buffer), to make visible, set element's style to display:block;
\n",
+ "example": [
+ "\n\nlet pg;\nfunction setup() {\n createCanvas(100, 100);\n pg = createGraphics(100, 100);\n}\n\nfunction draw() {\n background(200);\n pg.background(100);\n pg.noStroke();\n pg.ellipse(pg.width / 2, pg.height / 2, 50, 50);\n image(pg, 50, 50);\n image(pg, 0, 0, 50, 50);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "w",
+ "description": "width of the offscreen graphics buffer",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "description": "height of the offscreen graphics buffer",
+ "type": "Number"
+ },
+ {
+ "name": "renderer",
+ "description": "either P2D or WEBGL\nundefined defaults to p2d",
+ "optional": 1,
+ "type": "Constant"
+ },
+ {
+ "name": "canvas",
+ "description": "existing html canvas element",
+ "optional": 1,
+ "type": "HTMLCanvasElement"
+ }
+ ],
+ "return": {
+ "description": "offscreen graphics buffer",
+ "type": "p5.Graphics"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "w",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "type": "Number"
+ },
+ {
+ "name": "canvas",
+ "optional": 1,
+ "type": "HTMLCanvasElement"
+ }
+ ],
+ "return": {
+ "description": "offscreen graphics buffer",
+ "type": "p5.Graphics"
+ }
+ }
+ ],
+ "return": {
+ "description": "offscreen graphics buffer",
+ "type": "p5.Graphics"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ {
+ "name": "createFramebuffer",
+ "file": "src/core/rendering.js",
+ "line": 387,
+ "itemtype": "method",
+ "description": "Creates and returns a new p5.Framebuffer, a\nhigh-performance WebGL object that you can draw to and then use as a texture.
\nOptions can include:
\nformat
: The data format of the texture, either UNSIGNED_BYTE
, FLOAT
, or HALF_FLOAT
. The default is UNSIGNED_BYTE
.channels
: What color channels to store, either RGB
or RGBA
. The default is to match the channels in the main canvas (with alpha unless disabled with setAttributes
.)depth
: A boolean, whether or not to include a depth buffer. Defaults to true.depthFormat
: The data format for depth information, either UNSIGNED_INT
or FLOAT
. The default is FLOAT
if available, or UNSIGNED_INT
otherwise.stencil
: A boolean, whether or not to include a stencil buffer, which can be used for masking. This may only be used if also using a depth buffer. Defaults to the value of depth
, which is true if not provided.antialias
: Boolean or Number, whether or not to render with antialiased edges, and if so, optionally the number of samples to use. Defaults to whether or not the main canvas is antialiased, using a default of 2 samples if so. Antialiasing is only supported when WebGL 2 is available.width
: The width of the texture. Defaults to matching the main canvas.height
: The height of the texture. Defaults to matching the main canvas.density
: The pixel density of the texture. Defaults to the pixel density of the main canvas.textureFiltering
: Either LINEAR
(nearby pixels will be interpolated when reading values from the color texture) or NEAREST
(no interpolation.) Generally, use LINEAR
when using the texture as an image, and use NEAREST
if reading the texture as data. Defaults to LINEAR
.
If width
, height
, or density
are specified, then the framebuffer will\nkeep that size until manually changed. Otherwise, it will be autosized, and\nit will update to match the main canvas's size and density when the main\ncanvas changes.
\n",
+ "example": [
+ "\n\nlet prev, next;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n prev = createFramebuffer({ format: FLOAT });\n next = createFramebuffer({ format: FLOAT });\n noStroke();\n}\n\nfunction draw() {\n // Swap prev and next so that we can use the previous\n // frame as a texture when drawing the current frame\n [prev, next] = [next, prev];\n\n // Draw to the framebuffer\n next.begin();\n background(255);\n\n push();\n tint(255, 253);\n image(prev, -width/2, -height/2);\n // Make sure the image plane doesn't block you from seeing any part\n // of the scene\n clearDepth();\n pop();\n\n push();\n normalMaterial();\n translate(25*sin(frameCount * 0.014), 25*sin(frameCount * 0.02), 0);\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n box(12);\n pop();\n next.end();\n\n image(next, -width/2, -height/2);\n}\n
\n"
+ ],
+ "alt": "A red, green, and blue box (using normalMaterial) moves and rotates around\nthe canvas, leaving a trail behind it that slowly grows and fades away.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "options",
+ "description": "An optional object with configuration",
+ "optional": 1,
+ "type": "Object"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Framebuffer"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Framebuffer"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ {
+ "name": "clearDepth",
+ "file": "src/core/rendering.js",
+ "line": 456,
+ "itemtype": "method",
+ "description": "This makes the canvas forget how far from the camera everything that has\nbeen drawn was. Use this if you want to make sure the next thing you draw\nwill not draw behind anything that is already on the canvas.
\nThis is useful for things like feedback effects, where you want the previous\nframe to act like a background for the next frame, and not like a plane in\n3D space in the scene.
\nThis method is only available in WebGL mode. Since 2D mode does not have\n3D depth, anything you draw will always go on top of the previous content on\nthe canvas anyway.
\n",
+ "example": [
+ "\n\nlet prev, next;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n prev = createFramebuffer({ format: FLOAT });\n next = createFramebuffer({ format: FLOAT });\n noStroke();\n}\n\nfunction draw() {\n // Swap prev and next so that we can use the previous\n // frame as a texture when drawing the current frame\n [prev, next] = [next, prev];\n\n // Draw to the framebuffer\n next.begin();\n background(255);\n\n push();\n tint(255, 253);\n image(prev, -width/2, -height/2);\n // Make sure the image plane doesn't block you from seeing any part\n // of the scene\n clearDepth();\n pop();\n\n push();\n normalMaterial();\n translate(25*sin(frameCount * 0.014), 25*sin(frameCount * 0.02), 0);\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n box(12);\n pop();\n next.end();\n\n image(next, -width/2, -height/2);\n}\n
\n"
+ ],
+ "alt": "A red, green, and blue box (using normalMaterial) moves and rotates around\nthe canvas, leaving a trail behind it that slowly grows and fades away.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "depth",
+ "description": "The value, between 0 and 1, to reset the depth to, where\n0 corresponds to a value as close as possible to the camera before getting\nclipped, and 1 corresponds to a value as far away from the camera as possible.\nThe default value is 1.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ {
+ "name": "blendMode",
+ "file": "src/core/rendering.js",
+ "line": 533,
+ "itemtype": "method",
+ "description": "Blends the pixels in the display window according to the defined mode.\nThere is a choice of the following modes to blend the source pixels (A)\nwith the ones of pixels already in the display window (B):
\n\nBLEND
- linear interpolation of colours: C =\nA*factor + B. This is the default blending mode. \nADD
- sum of A and B \nDARKEST
- only the darkest colour succeeds: C =\nmin(A*factor, B). \nLIGHTEST
- only the lightest colour succeeds: C =\nmax(A*factor, B). \nDIFFERENCE
- subtract colors from underlying image.\n(2D) \nEXCLUSION
- similar to DIFFERENCE
, but less\nextreme. \nMULTIPLY
- multiply the colors, result will always be\ndarker. \nSCREEN
- opposite multiply, uses inverse values of the\ncolors. \nREPLACE
- the pixels entirely replace the others and\ndon't utilize alpha (transparency) values. \nREMOVE
- removes pixels from B with the alpha strength of A. \nOVERLAY
- mix of MULTIPLY
and SCREEN\n
. Multiplies dark values, and screens light values. (2D) \nHARD_LIGHT
- SCREEN
when greater than 50%\ngray, MULTIPLY
when lower. (2D) \nSOFT_LIGHT
- mix of DARKEST
and\nLIGHTEST
. Works like OVERLAY
, but not as harsh. (2D)\n \nDODGE
- lightens light tones and increases contrast,\nignores darks. (2D) \nBURN
- darker areas are applied, increasing contrast,\nignores lights. (2D) \nSUBTRACT
- remainder of A and B (3D) \n
(2D) indicates that this blend mode only works in the 2D renderer.
\n(3D) indicates that this blend mode only works in the WEBGL renderer.
\n",
+ "example": [
+ "\n\nblendMode(LIGHTEST);\nstrokeWeight(30);\nstroke(80, 150, 255);\nline(25, 25, 75, 75);\nstroke(255, 50, 50);\nline(75, 25, 25, 75);\n
\n\n\n\n\nblendMode(MULTIPLY);\nstrokeWeight(30);\nstroke(80, 150, 255);\nline(25, 25, 75, 75);\nstroke(255, 50, 50);\nline(75, 25, 25, 75);\n
\n"
+ ],
+ "alt": "translucent image thick red & blue diagonal rounded lines intersecting center\nThick red & blue diagonal rounded lines intersecting center. dark at overlap",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "mode",
+ "description": "blend mode to set for canvas.\neither BLEND, DARKEST, LIGHTEST, DIFFERENCE, MULTIPLY,\nEXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\nSOFT_LIGHT, DODGE, BURN, ADD, REMOVE or SUBTRACT",
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ {
+ "name": "arc",
+ "file": "src/core/shape/2d_primitives.js",
+ "line": 172,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws an arc to the canvas. Arcs are drawn along the outer edge of an ellipse\n(oval) defined by the x
, y
, w
, and h
parameters. Use the start
and stop
\nparameters to specify the angles (in radians) at which to draw the arc. Arcs are\nalways drawn clockwise from start
to stop
. The origin of the arc's ellipse may\nbe changed with the ellipseMode() function.
\nThe optional mode
parameter determines the arc's fill style. The fill modes are\na semi-circle (OPEN
), a closed semi-circle (CHORD
), or a closed pie segment (PIE
).
\n",
+ "example": [
+ "\n\narc(50, 55, 50, 50, 0, HALF_PI);\nnoFill();\narc(50, 55, 60, 60, HALF_PI, PI);\narc(50, 55, 70, 70, PI, PI + QUARTER_PI);\narc(50, 55, 80, 80, PI + QUARTER_PI, TWO_PI);\ndescribe(\n 'A shattered outline of an ellipse with a quarter of a white circle at the bottom-right.'\n);\n
\n\n\n\n\narc(50, 50, 80, 80, 0, PI + QUARTER_PI);\ndescribe('A white ellipse with the top-right third missing. The bottom is outlined in black.');\n
\n\n\n\n\narc(50, 50, 80, 80, 0, PI + QUARTER_PI, OPEN);\ndescribe(\n 'A white ellipse missing a section from the top-right. The bottom is outlined in black.'\n);\n
\n\n\n\n\narc(50, 50, 80, 80, 0, PI + QUARTER_PI, CHORD);\ndescribe('A white ellipse with a black outline missing a section from the top-right.');\n
\n\n\n\n\narc(50, 50, 80, 80, 0, PI + QUARTER_PI, PIE);\ndescribe('A white ellipse with a black outline. The top-right third is missing.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the arc's ellipse.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the arc's ellipse.",
+ "type": "Number"
+ },
+ {
+ "name": "w",
+ "description": "width of the arc's ellipse by default.",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "description": "height of the arc's ellipse by default.",
+ "type": "Number"
+ },
+ {
+ "name": "start",
+ "description": "angle to start the arc, specified in radians.",
+ "type": "Number"
+ },
+ {
+ "name": "stop",
+ "description": "angle to stop the arc, specified in radians.",
+ "type": "Number"
+ },
+ {
+ "name": "mode",
+ "description": "optional parameter to determine the way of drawing\nthe arc. either CHORD, PIE, or OPEN.",
+ "optional": 1,
+ "type": "Constant"
+ },
+ {
+ "name": "detail",
+ "description": "optional parameter for WebGL mode only. This is to\nspecify the number of vertices that makes up the\nperimeter of the arc. Default value is 25. Won't\ndraw a stroke for a detail of more than 50.",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "2D Primitives"
+ },
+ {
+ "name": "ellipse",
+ "file": "src/core/shape/2d_primitives.js",
+ "line": 269,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws an ellipse (oval) to the canvas. An ellipse with equal width and height\nis a circle. By default, the first two parameters set the location of the\ncenter of the ellipse. The third and fourth parameters set the shape's width\nand height, respectively. The origin may be changed with the\nellipseMode() function.
\nIf no height is specified, the value of width is used for both the width and\nheight. If a negative height or width is specified, the absolute value is\ntaken.
\n",
+ "example": [
+ "\n\nellipse(56, 46, 55, 55);\ndescribe('A white ellipse with black outline in middle of a gray canvas.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the center of the ellipse.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the center of the ellipse.",
+ "type": "Number"
+ },
+ {
+ "name": "w",
+ "description": "width of the ellipse.",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "description": "height of the ellipse.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ },
+ {
+ "name": "w",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "type": "Number"
+ },
+ {
+ "name": "detail",
+ "description": "optional parameter for WebGL mode only. This is to\nspecify the number of vertices that makes up the\nperimeter of the ellipse. Default value is 25. Won't\ndraw a stroke for a detail of more than 50.",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "2D Primitives"
+ },
+ {
+ "name": "circle",
+ "file": "src/core/shape/2d_primitives.js",
+ "line": 295,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws a circle to the canvas. A circle is a round shape. Every point on the\nedge of a circle is the same distance from its center. By default, the first\ntwo parameters set the location of the center of the circle. The third\nparameter sets the shape's width and height (diameter). The origin may be\nchanged with the ellipseMode() function.",
+ "example": [
+ "\n\ncircle(30, 30, 20);\ndescribe('A white circle with black outline in the middle of a gray canvas.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the center of the circle.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the center of the circle.",
+ "type": "Number"
+ },
+ {
+ "name": "d",
+ "description": "diameter of the circle.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "2D Primitives"
+ },
+ {
+ "name": "line",
+ "file": "src/core/shape/2d_primitives.js",
+ "line": 401,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws a line, a straight path between two points. Its default width is one pixel.\nThe version of line()
with four parameters draws the line in 2D. To color a line,\nuse the stroke() function. To change its width, use the\nstrokeWeight() function. A line\ncan't be filled, so the fill() function won't affect\nthe color of a line.
\nThe version of line()
with six parameters allows the line to be drawn in 3D\nspace. Doing so requires adding the WEBGL
argument to\ncreateCanvas().
\n",
+ "example": [
+ "\n\nline(30, 20, 85, 75);\ndescribe(\n 'A black line on a gray canvas running from top-center to bottom-right.'\n);\n
\n\n\n\n\nline(30, 20, 85, 20);\nstroke(126);\nline(85, 20, 85, 75);\nstroke(255);\nline(85, 75, 30, 75);\ndescribe(\n 'Three lines drawn in grayscale on a gray canvas. They form the top, right, and bottom sides of a square.'\n);\n
\n\n\n\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('A black line drawn on a gray canvas.');\n}\n\nfunction draw() {\n background(220);\n line(0, 0, 0, 10, 10, 0);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x1",
+ "description": "the x-coordinate of the first point.",
+ "type": "Number"
+ },
+ {
+ "name": "y1",
+ "description": "the y-coordinate of the first point.",
+ "type": "Number"
+ },
+ {
+ "name": "x2",
+ "description": "the x-coordinate of the second point.",
+ "type": "Number"
+ },
+ {
+ "name": "y2",
+ "description": "the y-coordinate of the second point.",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "x1",
+ "type": "Number"
+ },
+ {
+ "name": "y1",
+ "type": "Number"
+ },
+ {
+ "name": "z1",
+ "description": "the z-coordinate of the first point.",
+ "type": "Number"
+ },
+ {
+ "name": "x2",
+ "type": "Number"
+ },
+ {
+ "name": "y2",
+ "type": "Number"
+ },
+ {
+ "name": "z2",
+ "description": "the z-coordinate of the second point.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "2D Primitives"
+ },
+ {
+ "name": "point",
+ "file": "src/core/shape/2d_primitives.js",
+ "line": 484,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws a point, a single coordinate in space. Its default size is one pixel. The first two\nparameters are the point's x- and y-coordinates, respectively. To color a point, use\nthe stroke() function. To change its size, use the\nstrokeWeight() function.
\nThe version of point()
with three parameters allows the point to be drawn in 3D\nspace. Doing so requires adding the WEBGL
argument to\ncreateCanvas().
\nThe version of point() with one parameter allows the point's location to be set with\na p5.Vector object.
\n",
+ "example": [
+ "\n\npoint(30, 20);\npoint(85, 20);\npoint(85, 75);\npoint(30, 75);\ndescribe(\n 'Four small, black points drawn on a gray canvas. The points form the corners of a square.'\n);\n
\n\n\n\n\npoint(30, 20);\npoint(85, 20);\nstroke('purple');\nstrokeWeight(10);\npoint(85, 75);\npoint(30, 75);\ndescribe(\n 'Four points drawn on a gray canvas. Two are black and two are purple. The points form the corners of a square.'\n);\n
\n\n\n\n\nlet a = createVector(10, 10);\npoint(a);\nlet b = createVector(10, 20);\npoint(b);\nlet c = createVector(20, 10);\npoint(c);\nlet d = createVector(20, 20);\npoint(d);\ndescribe(\n 'Four small, black points drawn on a gray canvas. The points form the corners of a square.'\n);\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "the x-coordinate.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "the y-coordinate.",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "the z-coordinate (for WebGL mode).",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "coordinateVector",
+ "description": "the coordinate vector.",
+ "type": "p5.Vector"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "2D Primitives"
+ },
+ {
+ "name": "quad",
+ "file": "src/core/shape/2d_primitives.js",
+ "line": 578,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws a quad to the canvas. A quad is a quadrilateral, a four-sided\npolygon. Some examples of quads include rectangles, squares, rhombuses,\nand trapezoids. The first pair of parameters (x1
,y1
) sets the quad's\nfirst point. The following pairs of parameters set the coordinates for\nits next three points. Parameters should proceed clockwise or\ncounter-clockwise around the shape.
\nThe version of quad()
with twelve parameters allows the quad to be drawn\nin 3D space. Doing so requires adding the WEBGL
argument to\ncreateCanvas().
\n",
+ "example": [
+ "\n\nquad(20, 20, 80, 20, 80, 80, 20, 80);\ndescribe('A white square with a black outline drawn on a gray canvas.');\n
\n\n\n\n\nquad(20, 30, 80, 30, 80, 70, 20, 70);\ndescribe('A white rectangle with a black outline drawn on a gray canvas.');\n
\n\n\n\n\nquad(50, 62, 86, 50, 50, 38, 14, 50);\ndescribe('A white rhombus with a black outline drawn on a gray canvas.');\n
\n\n\n\n\nquad(20, 50, 80, 30, 80, 70, 20, 70);\ndescribe('A white trapezoid with a black outline drawn on a gray canvas.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x1",
+ "description": "the x-coordinate of the first point.",
+ "type": "Number"
+ },
+ {
+ "name": "y1",
+ "description": "the y-coordinate of the first point.",
+ "type": "Number"
+ },
+ {
+ "name": "x2",
+ "description": "the x-coordinate of the second point.",
+ "type": "Number"
+ },
+ {
+ "name": "y2",
+ "description": "the y-coordinate of the second point.",
+ "type": "Number"
+ },
+ {
+ "name": "x3",
+ "description": "the x-coordinate of the third point.",
+ "type": "Number"
+ },
+ {
+ "name": "y3",
+ "description": "the y-coordinate of the third point.",
+ "type": "Number"
+ },
+ {
+ "name": "x4",
+ "description": "the x-coordinate of the fourth point.",
+ "type": "Number"
+ },
+ {
+ "name": "y4",
+ "description": "the y-coordinate of the fourth point.",
+ "type": "Number"
+ },
+ {
+ "name": "detailX",
+ "description": "number of segments in the x-direction.",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "detailY",
+ "description": "number of segments in the y-direction.",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "x1",
+ "type": "Number"
+ },
+ {
+ "name": "y1",
+ "type": "Number"
+ },
+ {
+ "name": "z1",
+ "description": "the z-coordinate of the first point.",
+ "type": "Number"
+ },
+ {
+ "name": "x2",
+ "type": "Number"
+ },
+ {
+ "name": "y2",
+ "type": "Number"
+ },
+ {
+ "name": "z2",
+ "description": "the z-coordinate of the second point.",
+ "type": "Number"
+ },
+ {
+ "name": "x3",
+ "type": "Number"
+ },
+ {
+ "name": "y3",
+ "type": "Number"
+ },
+ {
+ "name": "z3",
+ "description": "the z-coordinate of the third point.",
+ "type": "Number"
+ },
+ {
+ "name": "x4",
+ "type": "Number"
+ },
+ {
+ "name": "y4",
+ "type": "Number"
+ },
+ {
+ "name": "z4",
+ "description": "the z-coordinate of the fourth point.",
+ "type": "Number"
+ },
+ {
+ "name": "detailX",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "detailY",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "2D Primitives"
+ },
+ {
+ "name": "rect",
+ "file": "src/core/shape/2d_primitives.js",
+ "line": 666,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws a rectangle to the canvas. A rectangle is a four-sided polygon with\nevery angle at ninety degrees. By default, the first two parameters set the\nlocation of the rectangle's upper-left corner. The third and fourth set the\nshape's the width and height, respectively. The way these parameters are\ninterpreted may be changed with the rectMode()\nfunction.
\nThe version of rect()
with five parameters creates a rounded rectangle. The\nfifth parameter is used as the radius value for all four corners.
\nThe version of rect()
with eight parameters also creates a rounded rectangle.\nWhen using eight parameters, the latter four set the radius of the arc at\neach corner separately. The radii start with the top-left corner and move\nclockwise around the rectangle. If any of these parameters are omitted, they\nare set to the value of the last specified corner radius.
\n",
+ "example": [
+ "\n\nrect(30, 20, 55, 55);\ndescribe('A white rectangle with a black outline on a gray canvas.');\n
\n\n\n\n\nrect(30, 20, 55, 55, 20);\ndescribe(\n 'A white rectangle with a black outline and round edges on a gray canvas.'\n);\n
\n\n\n\n\nrect(30, 20, 55, 55, 20, 15, 10, 5);\ndescribe('A white rectangle with a black outline and round edges of different radii.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the rectangle.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the rectangle.",
+ "type": "Number"
+ },
+ {
+ "name": "w",
+ "description": "width of the rectangle.",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "description": "height of the rectangle.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "tl",
+ "description": "optional radius of top-left corner.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "tr",
+ "description": "optional radius of top-right corner.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "br",
+ "description": "optional radius of bottom-right corner.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "bl",
+ "description": "optional radius of bottom-left corner.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ },
+ {
+ "name": "w",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "type": "Number"
+ },
+ {
+ "name": "detailX",
+ "description": "number of segments in the x-direction (for WebGL mode).",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "detailY",
+ "description": "number of segments in the y-direction (for WebGL mode).",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "2D Primitives"
+ },
+ {
+ "name": "square",
+ "file": "src/core/shape/2d_primitives.js",
+ "line": 721,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws a square to the canvas. A square is a four-sided polygon with every\nangle at ninety degrees and equal side lengths. By default, the first two\nparameters set the location of the square's upper-left corner. The third\nparameter sets its side size. The way these parameters are interpreted may\nbe changed with the rectMode() function.
\nThe version of square()
with four parameters creates a rounded square. The\nfourth parameter is used as the radius value for all four corners.
\nThe version of square()
with seven parameters also creates a rounded square.\nWhen using seven parameters, the latter four set the radius of the arc at\neach corner separately. The radii start with the top-left corner and move\nclockwise around the square. If any of these parameters are omitted, they\nare set to the value of the last specified corner radius.
\n",
+ "example": [
+ "\n\nsquare(30, 20, 55);\ndescribe('A white square with a black outline in on a gray canvas.');\n
\n\n\n\n\nsquare(30, 20, 55, 20);\ndescribe(\n 'A white square with a black outline and round edges on a gray canvas.'\n);\n
\n\n\n\n\nsquare(30, 20, 55, 20, 15, 10, 5);\ndescribe('A white square with a black outline and round edges of different radii.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the square.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the square.",
+ "type": "Number"
+ },
+ {
+ "name": "s",
+ "description": "side size of the square.",
+ "type": "Number"
+ },
+ {
+ "name": "tl",
+ "description": "optional radius of top-left corner.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "tr",
+ "description": "optional radius of top-right corner.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "br",
+ "description": "optional radius of bottom-right corner.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "bl",
+ "description": "optional radius of bottom-left corner.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "2D Primitives"
+ },
+ {
+ "name": "triangle",
+ "file": "src/core/shape/2d_primitives.js",
+ "line": 782,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws a triangle to the canvas. A triangle is a three-sided polygon. The\nfirst two parameters specify the triangle's first point (x1,y1)
. The middle\ntwo parameters specify its second point (x2,y2)
. And the last two parameters\nspecify its third point (x3, y3)
.",
+ "example": [
+ "\n\ntriangle(30, 75, 58, 20, 86, 75);\ndescribe('A white triangle with a black outline on a gray canvas.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x1",
+ "description": "x-coordinate of the first point.",
+ "type": "Number"
+ },
+ {
+ "name": "y1",
+ "description": "y-coordinate of the first point.",
+ "type": "Number"
+ },
+ {
+ "name": "x2",
+ "description": "x-coordinate of the second point.",
+ "type": "Number"
+ },
+ {
+ "name": "y2",
+ "description": "y-coordinate of the second point.",
+ "type": "Number"
+ },
+ {
+ "name": "x3",
+ "description": "x-coordinate of the third point.",
+ "type": "Number"
+ },
+ {
+ "name": "y3",
+ "description": "y-coordinate of the third point.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "2D Primitives"
+ },
+ {
+ "name": "ellipseMode",
+ "file": "src/core/shape/attributes.js",
+ "line": 60,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Modifies the location from which ellipses, circles, and arcs are drawn. By default, the\nfirst two parameters are the x- and y-coordinates of the shape's center. The next\nparameters are its width and height. This is equivalent to calling ellipseMode(CENTER)
.
\nellipseMode(RADIUS)
also uses the first two parameters to set the x- and y-coordinates\nof the shape's center. The next parameters are half of the shapes's width and height.\nCalling ellipse(0, 0, 10, 15)
draws a shape with a width of 20 and height of 30.
\nellipseMode(CORNER)
uses the first two parameters as the upper-left corner of the\nshape. The next parameters are its width and height.
\nellipseMode(CORNERS)
uses the first two parameters as the location of one corner\nof the ellipse's bounding box. The third and fourth parameters are the location of the\nopposite corner.
\nThe argument passed to ellipseMode()
must be written in ALL CAPS because the constants\nCENTER
, RADIUS
, CORNER
, and CORNERS
are defined this way. JavaScript is a\ncase-sensitive language.
\n",
+ "example": [
+ "\n\nellipseMode(RADIUS);\nfill(255);\nellipse(50, 50, 30, 30);\nellipseMode(CENTER);\nfill(100);\nellipse(50, 50, 30, 30);\ndescribe('A white circle with a gray circle at its center. Both circles have black outlines.');\n
\n\n\n\n\nellipseMode(CORNER);\nfill(255);\nellipse(25, 25, 50, 50);\nellipseMode(CORNERS);\nfill(100);\nellipse(25, 25, 50, 50);\ndescribe('A white circle with a gray circle at its top-left corner. Both circles have black outlines.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "mode",
+ "description": "either CENTER, RADIUS, CORNER, or CORNERS",
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "noSmooth",
+ "file": "src/core/shape/attributes.js",
+ "line": 97,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws all geometry with jagged (aliased) edges.
\nsmooth() is active by default in 2D mode. It's necessary to call\nnoSmooth() to disable smoothing of geometry, images, and fonts.
\nIn WebGL mode, noSmooth() is active by default. It's necessary\nto call smooth() to draw smooth (antialiased) edges.
\n",
+ "example": [
+ "\n\nbackground(0);\nnoStroke();\nsmooth();\nellipse(30, 48, 36, 36);\nnoSmooth();\nellipse(70, 48, 36, 36);\ndescribe('Two pixelated white circles on a black background.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "rectMode",
+ "file": "src/core/shape/attributes.js",
+ "line": 161,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Modifies the location from which rectangles and squares are drawn. By default,\nthe first two parameters are the x- and y-coordinates of the shape's upper-left\ncorner. The next parameters are its width and height. This is equivalent to\ncalling rectMode(CORNER)
.
\nrectMode(CORNERS)
also uses the first two parameters as the location of one of\nthe corners. The third and fourth parameters are the location of the opposite\ncorner.
\nrectMode(CENTER)
uses the first two parameters as the x- and y-coordinates of\nthe shape's center. The next parameters are its width and height.
\nrectMode(RADIUS)
also uses the first two parameters as the x- and y-coordinates\nof the shape's center. The next parameters are half of the shape's width and\nheight.
\nThe argument passed to rectMode()
must be written in ALL CAPS because the\nconstants CENTER
, RADIUS
, CORNER
, and CORNERS
are defined this way.\nJavaScript is a case-sensitive language.
\n",
+ "example": [
+ "\n\nrectMode(CORNER);\nfill(255);\nrect(25, 25, 50, 50);\n\nrectMode(CORNERS);\nfill(100);\nrect(25, 25, 50, 50);\n\ndescribe('A small gray square drawn at the top-left corner of a white square.');\n
\n\n\n\n\nrectMode(RADIUS);\nfill(255);\nrect(50, 50, 30, 30);\n\nrectMode(CENTER);\nfill(100);\nrect(50, 50, 30, 30);\n\ndescribe('A small gray square drawn at the center of a white square.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "mode",
+ "description": "either CORNER, CORNERS, CENTER, or RADIUS",
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "smooth",
+ "file": "src/core/shape/attributes.js",
+ "line": 199,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws all geometry with smooth (anti-aliased) edges. smooth() will also\nimprove image quality of resized images.
\nsmooth() is active by default in 2D mode. It's necessary to call\nnoSmooth() to disable smoothing of geometry, images, and fonts.
\nIn WebGL mode, noSmooth() is active by default. It's necessary\nto call smooth() to draw smooth (antialiased) edges.
\n",
+ "example": [
+ "\n\nbackground(0);\nnoStroke();\nsmooth();\nellipse(30, 48, 36, 36);\nnoSmooth();\nellipse(70, 48, 36, 36);\ndescribe('Two pixelated white circles on a black background.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "strokeCap",
+ "file": "src/core/shape/attributes.js",
+ "line": 235,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the style for rendering line endings. These ends are either rounded\n(ROUND
), squared (SQUARE
), or extended (PROJECT
). The default cap is\nROUND
.
\nThe argument passed to strokeCap()
must be written in ALL CAPS because\nthe constants ROUND
, SQUARE
, and PROJECT
are defined this way.\nJavaScript is a case-sensitive language.
\n",
+ "example": [
+ "\n\nstrokeWeight(12.0);\nstrokeCap(ROUND);\nline(20, 30, 80, 30);\nstrokeCap(SQUARE);\nline(20, 50, 80, 50);\nstrokeCap(PROJECT);\nline(20, 70, 80, 70);\ndescribe('Three horizontal lines. The top line has rounded ends, the middle line has squared ends, and the bottom line has longer, squared ends.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "cap",
+ "description": "either ROUND, SQUARE, or PROJECT",
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "strokeJoin",
+ "file": "src/core/shape/attributes.js",
+ "line": 302,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the style of the joints which connect line segments. These joints are\neither mitered (MITER
), beveled (BEVEL
), or rounded (ROUND
). The default\njoint is MITER
in 2D mode and ROUND
in WebGL mode.
\nThe argument passed to strokeJoin()
must be written in ALL CAPS because\nthe constants MITER
, BEVEL
, and ROUND
are defined this way.\nJavaScript is a case-sensitive language.
\n",
+ "example": [
+ "\n\nnoFill();\nstrokeWeight(10.0);\nstrokeJoin(MITER);\nbeginShape();\nvertex(35, 20);\nvertex(65, 50);\nvertex(35, 80);\nendShape();\ndescribe('A right-facing arrowhead shape with a pointed tip in center of canvas.');\n
\n\n\n\n\nnoFill();\nstrokeWeight(10.0);\nstrokeJoin(BEVEL);\nbeginShape();\nvertex(35, 20);\nvertex(65, 50);\nvertex(35, 80);\nendShape();\ndescribe('A right-facing arrowhead shape with a flat tip in center of canvas.');\n
\n\n\n\n\nnoFill();\nstrokeWeight(10.0);\nstrokeJoin(ROUND);\nbeginShape();\nvertex(35, 20);\nvertex(65, 50);\nvertex(35, 80);\nendShape();\ndescribe('A right-facing arrowhead shape with a rounded tip in center of canvas.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "join",
+ "description": "either MITER, BEVEL, or ROUND",
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "strokeWeight",
+ "file": "src/core/shape/attributes.js",
+ "line": 351,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the width of the stroke used for lines, points, and the border around\nshapes. All widths are set in units of pixels.
\nNote that strokeWeight()
is affected by any transformation or scaling that\nhas been applied previously.
\n",
+ "example": [
+ "\n\n// Default.\nline(20, 20, 80, 20);\n// Thicker.\nstrokeWeight(4);\nline(20, 40, 80, 40);\n// Beastly.\nstrokeWeight(10);\nline(20, 70, 80, 70);\ndescribe('Three horizontal black lines. The top line is thin, the middle is medium, and the bottom is thick.');\n
\n\n\n\n\n// Default.\nline(20, 20, 80, 20);\n// Adding scale transformation.\nscale(5);\n// Coordinates adjusted for scaling.\nline(4, 8, 16, 8);\ndescribe('Two horizontal black lines. The top line is thin and the bottom is five times thicker than the top.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "weight",
+ "description": "the weight of the stroke (in pixels).",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "bezier",
+ "file": "src/core/shape/curves.js",
+ "line": 78,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws a cubic Bezier curve on the screen. These curves are defined by a\nseries of anchor and control points. The first two parameters specify\nthe first anchor point and the last two parameters specify the other\nanchor point, which become the first and last points on the curve. The\nmiddle parameters specify the two control points which define the shape\nof the curve. Approximately speaking, control points \"pull\" the curve\ntowards them.
\nBezier curves were developed by French automotive engineer Pierre Bezier,\nand are commonly used in computer graphics to define gently sloping curves.\nSee also curve().
\n",
+ "example": [
+ "\n\nnoFill();\nstroke(255, 102, 0);\nline(85, 20, 10, 10);\nline(90, 90, 15, 80);\nstroke(0, 0, 0);\nbezier(85, 20, 10, 10, 90, 90, 15, 80);\n
\n\n\n\n\nbackground(0, 0, 0);\nnoFill();\nstroke(255);\nbezier(250, 250, 0, 100, 100, 0, 100, 0, 0, 0, 100, 0);\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x1",
+ "description": "x-coordinate for the first anchor point",
+ "type": "Number"
+ },
+ {
+ "name": "y1",
+ "description": "y-coordinate for the first anchor point",
+ "type": "Number"
+ },
+ {
+ "name": "x2",
+ "description": "x-coordinate for the first control point",
+ "type": "Number"
+ },
+ {
+ "name": "y2",
+ "description": "y-coordinate for the first control point",
+ "type": "Number"
+ },
+ {
+ "name": "x3",
+ "description": "x-coordinate for the second control point",
+ "type": "Number"
+ },
+ {
+ "name": "y3",
+ "description": "y-coordinate for the second control point",
+ "type": "Number"
+ },
+ {
+ "name": "x4",
+ "description": "x-coordinate for the second anchor point",
+ "type": "Number"
+ },
+ {
+ "name": "y4",
+ "description": "y-coordinate for the second anchor point",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "x1",
+ "type": "Number"
+ },
+ {
+ "name": "y1",
+ "type": "Number"
+ },
+ {
+ "name": "z1",
+ "description": "z-coordinate for the first anchor point",
+ "type": "Number"
+ },
+ {
+ "name": "x2",
+ "type": "Number"
+ },
+ {
+ "name": "y2",
+ "type": "Number"
+ },
+ {
+ "name": "z2",
+ "description": "z-coordinate for the first control point",
+ "type": "Number"
+ },
+ {
+ "name": "x3",
+ "type": "Number"
+ },
+ {
+ "name": "y3",
+ "type": "Number"
+ },
+ {
+ "name": "z3",
+ "description": "z-coordinate for the second control point",
+ "type": "Number"
+ },
+ {
+ "name": "x4",
+ "type": "Number"
+ },
+ {
+ "name": "y4",
+ "type": "Number"
+ },
+ {
+ "name": "z4",
+ "description": "z-coordinate for the second anchor point",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Curves"
+ },
+ {
+ "name": "bezierDetail",
+ "file": "src/core/shape/curves.js",
+ "line": 125,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the resolution at which Bezier's curve is displayed. The default value is 20.
\nNote, This function is only useful when using the WEBGL renderer\nas the default canvas renderer does not use this information.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n noFill();\n bezierDetail(5);\n}\n\nfunction draw() {\n background(200);\n bezier(\n -40, -40, 0,\n 90, -40, 0,\n -90, 40, 0,\n 40, 40, 0\n );\n}\n
\n"
+ ],
+ "alt": "stretched black s-shape with a low level of bezier detail",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "detail",
+ "description": "resolution of the curves",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Curves"
+ },
+ {
+ "name": "bezierPoint",
+ "file": "src/core/shape/curves.js",
+ "line": 174,
+ "itemtype": "method",
+ "description": "Given the x or y co-ordinate values of control and anchor points of a bezier\ncurve, it evaluates the x or y coordinate of the bezier at position t. The\nparameters a and d are the x or y coordinates of first and last points on the\ncurve while b and c are of the control points.The final parameter t is the\nposition of the resultant point which is given between 0 and 1.\nThis can be done once with the x coordinates and a second time\nwith the y coordinates to get the location of a bezier curve at t.",
+ "example": [
+ "\n\nnoFill();\nlet x1 = 85,\nx2 = 10,\nx3 = 90,\nx4 = 15;\nlet y1 = 20,\ny2 = 10,\ny3 = 90,\ny4 = 80;\nbezier(x1, y1, x2, y2, x3, y3, x4, y4);\nfill(255);\nlet steps = 10;\nfor (let i = 0; i <= steps; i++) {\n let t = i / steps;\n let x = bezierPoint(x1, x2, x3, x4, t);\n let y = bezierPoint(y1, y2, y3, y4, t);\n circle(x, y, 5);\n}\n
\n"
+ ],
+ "alt": "10 points plotted on a given bezier at equal distances.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "a",
+ "description": "coordinate of first point on the curve",
+ "type": "Number"
+ },
+ {
+ "name": "b",
+ "description": "coordinate of first control point",
+ "type": "Number"
+ },
+ {
+ "name": "c",
+ "description": "coordinate of second control point",
+ "type": "Number"
+ },
+ {
+ "name": "d",
+ "description": "coordinate of second point on the curve",
+ "type": "Number"
+ },
+ {
+ "name": "t",
+ "description": "value between 0 and 1",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "the value of the Bezier at position t",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "the value of the Bezier at position t",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Curves"
+ },
+ {
+ "name": "bezierTangent",
+ "file": "src/core/shape/curves.js",
+ "line": 251,
+ "itemtype": "method",
+ "description": "Evaluates the tangent to the Bezier at position t for points a, b, c, d.\nThe parameters a and d are the first and last points\non the curve, and b and c are the control points.\nThe final parameter t varies between 0 and 1.",
+ "example": [
+ "\n\nnoFill();\nbezier(85, 20, 10, 10, 90, 90, 15, 80);\nlet steps = 6;\nfill(255);\nfor (let i = 0; i <= steps; i++) {\n let t = i / steps;\n // Get the location of the point\n let x = bezierPoint(85, 10, 90, 15, t);\n let y = bezierPoint(20, 10, 90, 80, t);\n // Get the tangent points\n let tx = bezierTangent(85, 10, 90, 15, t);\n let ty = bezierTangent(20, 10, 90, 80, t);\n // Calculate an angle from the tangent points\n let a = atan2(ty, tx);\n a += PI;\n stroke(255, 102, 0);\n line(x, y, cos(a) * 30 + x, sin(a) * 30 + y);\n // The following line of code makes a line\n // inverse of the above line\n //line(x, y, cos(a)*-30 + x, sin(a)*-30 + y);\n stroke(0);\n ellipse(x, y, 5, 5);\n}\n
\n\n\n\n\nnoFill();\nbezier(85, 20, 10, 10, 90, 90, 15, 80);\nstroke(255, 102, 0);\nlet steps = 16;\nfor (let i = 0; i <= steps; i++) {\n let t = i / steps;\n let x = bezierPoint(85, 10, 90, 15, t);\n let y = bezierPoint(20, 10, 90, 80, t);\n let tx = bezierTangent(85, 10, 90, 15, t);\n let ty = bezierTangent(20, 10, 90, 80, t);\n let a = atan2(ty, tx);\n a -= HALF_PI;\n line(x, y, cos(a) * 8 + x, sin(a) * 8 + y);\n}\n
\n"
+ ],
+ "alt": "s-shaped line with 6 short orange lines showing the tangents at those points.\ns-shaped line with 6 short orange lines showing lines coming out the underside of the bezier.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "a",
+ "description": "coordinate of first point on the curve",
+ "type": "Number"
+ },
+ {
+ "name": "b",
+ "description": "coordinate of first control point",
+ "type": "Number"
+ },
+ {
+ "name": "c",
+ "description": "coordinate of second control point",
+ "type": "Number"
+ },
+ {
+ "name": "d",
+ "description": "coordinate of second point on the curve",
+ "type": "Number"
+ },
+ {
+ "name": "t",
+ "description": "value between 0 and 1",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "the tangent at position t",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "the tangent at position t",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Curves"
+ },
+ {
+ "name": "curve",
+ "file": "src/core/shape/curves.js",
+ "line": 349,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws a curved line on the screen between two points, given as the\nmiddle four parameters. The first two parameters are a control point, as\nif the curve came from this point even though it's not drawn. The last\ntwo parameters similarly describe the other control point.
\nLonger curves can be created by putting a series of curve() functions\ntogether or using curveVertex(). An additional function called\ncurveTightness() provides control for the visual quality of the curve.\nThe curve() function is an implementation of Catmull-Rom splines.",
+ "example": [
+ "\n\nnoFill();\nstroke(255, 102, 0);\ncurve(5, 26, 5, 26, 73, 24, 73, 61);\nstroke(0);\ncurve(5, 26, 73, 24, 73, 61, 15, 65);\nstroke(255, 102, 0);\ncurve(73, 24, 73, 61, 15, 65, 15, 65);\n
\n\n\n\n\n// Define the curve points as JavaScript objects\nlet p1 = { x: 5, y: 26 };\nlet p2 = { x: 73, y: 24 };\nlet p3 = { x: 73, y: 61 };\nlet p4 = { x: 15, y: 65 };\nnoFill();\nstroke(255, 102, 0);\ncurve(p1.x, p1.y, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y);\nstroke(0);\ncurve(p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y);\nstroke(255, 102, 0);\ncurve(p2.x, p2.y, p3.x, p3.y, p4.x, p4.y, p4.x, p4.y);\n
\n\n\n\n\nnoFill();\nstroke(255, 102, 0);\ncurve(5, 26, 0, 5, 26, 0, 73, 24, 0, 73, 61, 0);\nstroke(0);\ncurve(5, 26, 0, 73, 24, 0, 73, 61, 0, 15, 65, 0);\nstroke(255, 102, 0);\ncurve(73, 24, 0, 73, 61, 0, 15, 65, 0, 15, 65, 0);\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x1",
+ "description": "x-coordinate for the beginning control point",
+ "type": "Number"
+ },
+ {
+ "name": "y1",
+ "description": "y-coordinate for the beginning control point",
+ "type": "Number"
+ },
+ {
+ "name": "x2",
+ "description": "x-coordinate for the first point",
+ "type": "Number"
+ },
+ {
+ "name": "y2",
+ "description": "y-coordinate for the first point",
+ "type": "Number"
+ },
+ {
+ "name": "x3",
+ "description": "x-coordinate for the second point",
+ "type": "Number"
+ },
+ {
+ "name": "y3",
+ "description": "y-coordinate for the second point",
+ "type": "Number"
+ },
+ {
+ "name": "x4",
+ "description": "x-coordinate for the ending control point",
+ "type": "Number"
+ },
+ {
+ "name": "y4",
+ "description": "y-coordinate for the ending control point",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "x1",
+ "type": "Number"
+ },
+ {
+ "name": "y1",
+ "type": "Number"
+ },
+ {
+ "name": "z1",
+ "description": "z-coordinate for the beginning control point",
+ "type": "Number"
+ },
+ {
+ "name": "x2",
+ "type": "Number"
+ },
+ {
+ "name": "y2",
+ "type": "Number"
+ },
+ {
+ "name": "z2",
+ "description": "z-coordinate for the first point",
+ "type": "Number"
+ },
+ {
+ "name": "x3",
+ "type": "Number"
+ },
+ {
+ "name": "y3",
+ "type": "Number"
+ },
+ {
+ "name": "z3",
+ "description": "z-coordinate for the second point",
+ "type": "Number"
+ },
+ {
+ "name": "x4",
+ "type": "Number"
+ },
+ {
+ "name": "y4",
+ "type": "Number"
+ },
+ {
+ "name": "z4",
+ "description": "z-coordinate for the ending control point",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Curves"
+ },
+ {
+ "name": "curveDetail",
+ "file": "src/core/shape/curves.js",
+ "line": 389,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the resolution at which curves display. The default value is 20 while\nthe minimum value is 3.
\nThis function is only useful when using the WEBGL renderer\nas the default canvas renderer does not use this\ninformation.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n\n curveDetail(5);\n}\nfunction draw() {\n background(200);\n\n curve(250, 600, 0, -30, 40, 0, 30, 30, 0, -250, 600, 0);\n}\n
\n"
+ ],
+ "alt": "white arch shape with a low level of curve detail.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "resolution",
+ "description": "resolution of the curves",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Curves"
+ },
+ {
+ "name": "curveTightness",
+ "file": "src/core/shape/curves.js",
+ "line": 439,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Modifies the quality of forms created with curve()\nand curveVertex().The parameter tightness\ndetermines how the curve fits to the vertex points. The value 0.0 is the\ndefault value for tightness (this value defines the curves to be Catmull-Rom\nsplines) and the value 1.0 connects all the points with straight lines.\nValues within the range -5.0 and 5.0 will deform the curves but will leave\nthem recognizable and as values increase in magnitude, they will continue to deform.",
+ "example": [
+ "\n\n// Move the mouse left and right to see the curve change\nfunction setup() {\n createCanvas(100, 100);\n noFill();\n}\n\nfunction draw() {\n background(204);\n let t = map(mouseX, 0, width, -5, 5);\n curveTightness(t);\n beginShape();\n curveVertex(10, 26);\n curveVertex(10, 26);\n curveVertex(83, 24);\n curveVertex(83, 61);\n curveVertex(25, 65);\n curveVertex(25, 65);\n endShape();\n}\n
\n"
+ ],
+ "alt": "Line shaped like right-facing arrow,points move with mouse-x and warp shape.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "amount",
+ "description": "amount of deformation from the original vertices",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Curves"
+ },
+ {
+ "name": "curvePoint",
+ "file": "src/core/shape/curves.js",
+ "line": 482,
+ "itemtype": "method",
+ "description": "Evaluates the curve at position t for points a, b, c, d.\nThe parameter t varies between 0 and 1, a and d are control points\nof the curve, and b and c are the start and end points of the curve.\nThis can be done once with the x coordinates and a second time\nwith the y coordinates to get the location of a curve at t.",
+ "example": [
+ "\n\nnoFill();\ncurve(5, 26, 5, 26, 73, 24, 73, 61);\ncurve(5, 26, 73, 24, 73, 61, 15, 65);\nfill(255);\nellipseMode(CENTER);\nlet steps = 6;\nfor (let i = 0; i <= steps; i++) {\n let t = i / steps;\n let x = curvePoint(5, 5, 73, 73, t);\n let y = curvePoint(26, 26, 24, 61, t);\n ellipse(x, y, 5, 5);\n x = curvePoint(5, 73, 73, 15, t);\n y = curvePoint(26, 24, 61, 65, t);\n ellipse(x, y, 5, 5);\n}\n
\n\n\nline hooking down to right-bottom with 13 5×5 white ellipse points"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "a",
+ "description": "coordinate of first control point of the curve",
+ "type": "Number"
+ },
+ {
+ "name": "b",
+ "description": "coordinate of first point",
+ "type": "Number"
+ },
+ {
+ "name": "c",
+ "description": "coordinate of second point",
+ "type": "Number"
+ },
+ {
+ "name": "d",
+ "description": "coordinate of second control point",
+ "type": "Number"
+ },
+ {
+ "name": "t",
+ "description": "value between 0 and 1",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "Curve value at position t",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "Curve value at position t",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Curves"
+ },
+ {
+ "name": "curveTangent",
+ "file": "src/core/shape/curves.js",
+ "line": 529,
+ "itemtype": "method",
+ "description": "Evaluates the tangent to the curve at position t for points a, b, c, d.\nThe parameter t varies between 0 and 1, a and d are points on the curve,\nand b and c are the control points.",
+ "example": [
+ "\n\nnoFill();\ncurve(5, 26, 73, 24, 73, 61, 15, 65);\nlet steps = 6;\nfor (let i = 0; i <= steps; i++) {\n let t = i / steps;\n let x = curvePoint(5, 73, 73, 15, t);\n let y = curvePoint(26, 24, 61, 65, t);\n //ellipse(x, y, 5, 5);\n let tx = curveTangent(5, 73, 73, 15, t);\n let ty = curveTangent(26, 24, 61, 65, t);\n let a = atan2(ty, tx);\n a -= PI / 2.0;\n line(x, y, cos(a) * 8 + x, sin(a) * 8 + y);\n}\n
\n"
+ ],
+ "alt": "right curving line mid-right of canvas with 7 short lines radiating from it.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "a",
+ "description": "coordinate of first control point",
+ "type": "Number"
+ },
+ {
+ "name": "b",
+ "description": "coordinate of first point on the curve",
+ "type": "Number"
+ },
+ {
+ "name": "c",
+ "description": "coordinate of second point on the curve",
+ "type": "Number"
+ },
+ {
+ "name": "d",
+ "description": "coordinate of second conrol point",
+ "type": "Number"
+ },
+ {
+ "name": "t",
+ "description": "value between 0 and 1",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "the tangent at position t",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "the tangent at position t",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Curves"
+ },
+ {
+ "name": "beginContour",
+ "file": "src/core/shape/vertex.js",
+ "line": 61,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Use the beginContour() and\nendContour() functions to create negative shapes\nwithin shapes such as the center of the letter 'O'. beginContour()\nbegins recording vertices for the shape and endContour() stops recording.\nThe vertices that define a negative shape must \"wind\" in the opposite direction\nfrom the exterior shape. First draw vertices for the exterior clockwise order, then for internal shapes, draw vertices\nshape in counter-clockwise.
\nThese functions can only be used within a beginShape()/endShape() pair and\ntransformations such as translate(), rotate(), and scale() do not work\nwithin a beginContour()/endContour() pair. It is also not possible to use\nother shapes, such as ellipse() or rect() within.
\n",
+ "example": [
+ "\n\ntranslate(50, 50);\nstroke(255, 0, 0);\nbeginShape();\n// Exterior part of shape, clockwise winding\nvertex(-40, -40);\nvertex(40, -40);\nvertex(40, 40);\nvertex(-40, 40);\n// Interior part of shape, counter-clockwise winding\nbeginContour();\nvertex(-20, -20);\nvertex(-20, 20);\nvertex(20, 20);\nvertex(20, -20);\nendContour();\nendShape(CLOSE);\n
\n"
+ ],
+ "alt": "white rect and smaller grey rect with red outlines in center of canvas.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Vertex"
+ },
+ {
+ "name": "beginShape",
+ "file": "src/core/shape/vertex.js",
+ "line": 272,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Using the beginShape() and endShape() functions allow creating more\ncomplex forms. beginShape() begins recording vertices for a shape and\nendShape() stops recording. The value of the kind parameter tells it which\ntypes of shapes to create from the provided vertices. With no mode\nspecified, the shape can be any irregular polygon.
\nThe parameters available for beginShape() are:
\nPOINTS\nDraw a series of points
\nLINES\nDraw a series of unconnected line segments (individual lines)
\nTRIANGLES\nDraw a series of separate triangles
\nTRIANGLE_FAN\nDraw a series of connected triangles sharing the first vertex in a fan-like fashion
\nTRIANGLE_STRIP\nDraw a series of connected triangles in strip fashion
\nQUADS\nDraw a series of separate quads
\nQUAD_STRIP\nDraw quad strip using adjacent edges to form the next quad
\nTESS (WEBGL only)\nHandle irregular polygon for filling curve by explicit tessellation
\nAfter calling the beginShape() function, a series of vertex() commands must follow. To stop\ndrawing the shape, call endShape(). Each shape will be outlined with the\ncurrent stroke color and filled with the fill color.
\nTransformations such as translate(), rotate(), and scale() do not work\nwithin beginShape(). It is also not possible to use other shapes, such as\nellipse() or rect() within beginShape().
\n",
+ "example": [
+ "\n\nbeginShape();\nvertex(30, 20);\nvertex(85, 20);\nvertex(85, 75);\nvertex(30, 75);\nendShape(CLOSE);\n
\n\n\n\n\nbeginShape(POINTS);\nvertex(30, 20);\nvertex(85, 20);\nvertex(85, 75);\nvertex(30, 75);\nendShape();\n
\n\n\n\n\nbeginShape(LINES);\nvertex(30, 20);\nvertex(85, 20);\nvertex(85, 75);\nvertex(30, 75);\nendShape();\n
\n\n\n\n\nnoFill();\nbeginShape();\nvertex(30, 20);\nvertex(85, 20);\nvertex(85, 75);\nvertex(30, 75);\nendShape();\n
\n\n\n\n\nnoFill();\nbeginShape();\nvertex(30, 20);\nvertex(85, 20);\nvertex(85, 75);\nvertex(30, 75);\nendShape(CLOSE);\n
\n\n\n\n\nbeginShape(TRIANGLES);\nvertex(30, 75);\nvertex(40, 20);\nvertex(50, 75);\nvertex(60, 20);\nvertex(70, 75);\nvertex(80, 20);\nendShape();\n
\n\n\n\n\nbeginShape(TRIANGLE_STRIP);\nvertex(30, 75);\nvertex(40, 20);\nvertex(50, 75);\nvertex(60, 20);\nvertex(70, 75);\nvertex(80, 20);\nvertex(90, 75);\nendShape();\n
\n\n\n\n\nbeginShape(TRIANGLE_FAN);\nvertex(57.5, 50);\nvertex(57.5, 15);\nvertex(92, 50);\nvertex(57.5, 85);\nvertex(22, 50);\nvertex(57.5, 15);\nendShape();\n
\n\n\n\n\nbeginShape(QUADS);\nvertex(30, 20);\nvertex(30, 75);\nvertex(50, 75);\nvertex(50, 20);\nvertex(65, 20);\nvertex(65, 75);\nvertex(85, 75);\nvertex(85, 20);\nendShape();\n
\n\n\n\n\nbeginShape(QUAD_STRIP);\nvertex(30, 20);\nvertex(30, 75);\nvertex(50, 20);\nvertex(50, 75);\nvertex(65, 20);\nvertex(65, 75);\nvertex(85, 20);\nvertex(85, 75);\nendShape();\n
\n\n\n\n\nbeginShape(TESS);\nvertex(20, 20);\nvertex(80, 20);\nvertex(80, 40);\nvertex(40, 40);\nvertex(40, 60);\nvertex(80, 60);\nvertex(80, 80);\nvertex(20, 80);\nendShape(CLOSE);\n
\n"
+ ],
+ "alt": "white square-shape with black outline in middle-right of canvas.\n4 black points in a square shape in middle-right of canvas.\n2 horizontal black lines. In the top-right and bottom-right of canvas.\n3 line shape with horizontal on top, vertical in middle and horizontal bottom.\nsquare line shape in middle-right of canvas.\n2 white triangle shapes mid-right canvas. left one pointing up and right down.\n5 horizontal interlocking and alternating white triangles in mid-right canvas.\n4 interlocking white triangles in 45 degree rotated square-shape.\n2 white rectangle shapes in mid-right canvas. Both 20×55.\n3 side-by-side white rectangles center rect is smaller in mid-right canvas.\nThick white l-shape with black outline mid-top-left of canvas.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "kind",
+ "description": "either POINTS, LINES, TRIANGLES, TRIANGLE_FAN\nTRIANGLE_STRIP, QUADS, QUAD_STRIP or TESS",
+ "optional": 1,
+ "type": "POINTS|LINES|TRIANGLES|TRIANGLE_FAN|TRIANGLE_STRIP|QUADS|QUAD_STRIP|TESS"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Vertex"
+ },
+ {
+ "name": "bezierVertex",
+ "file": "src/core/shape/vertex.js",
+ "line": 392,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Specifies vertex coordinates for Bezier curves. Each call to\nbezierVertex() defines the position of two control points and\none anchor point of a Bezier curve, adding a new segment to a\nline or shape. For WebGL mode bezierVertex() can be used in 2D\nas well as 3D mode. 2D mode expects 6 parameters, while 3D mode\nexpects 9 parameters (including z coordinates).
\nThe first time bezierVertex() is used within a beginShape()\ncall, it must be prefaced with a call to vertex() to set the first anchor\npoint. This function must be used between beginShape() and endShape()\nand only when there is no MODE or POINTS parameter specified to\nbeginShape().
\n",
+ "example": [
+ "\n\nnoFill();\nbeginShape();\nvertex(30, 20);\nbezierVertex(80, 0, 80, 75, 30, 75);\nendShape();\n
\n\n\n\n\nbeginShape();\nvertex(30, 20);\nbezierVertex(80, 0, 80, 75, 30, 75);\nbezierVertex(50, 80, 60, 25, 30, 20);\nendShape();\n
\n\n\n\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n setAttributes('antialias', true);\n}\nfunction draw() {\n orbitControl();\n background(50);\n strokeWeight(4);\n stroke(255);\n point(-25, 30);\n point(25, 30);\n point(25, -30);\n point(-25, -30);\n\n strokeWeight(1);\n noFill();\n\n beginShape();\n vertex(-25, 30);\n bezierVertex(25, 30, 25, -30, -25, -30);\n endShape();\n\n beginShape();\n vertex(-25, 30, 20);\n bezierVertex(25, 30, 20, 25, -30, 20, -25, -30, 20);\n endShape();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x2",
+ "description": "x-coordinate for the first control point",
+ "type": "Number"
+ },
+ {
+ "name": "y2",
+ "description": "y-coordinate for the first control point",
+ "type": "Number"
+ },
+ {
+ "name": "x3",
+ "description": "x-coordinate for the second control point",
+ "type": "Number"
+ },
+ {
+ "name": "y3",
+ "description": "y-coordinate for the second control point",
+ "type": "Number"
+ },
+ {
+ "name": "x4",
+ "description": "x-coordinate for the anchor point",
+ "type": "Number"
+ },
+ {
+ "name": "y4",
+ "description": "y-coordinate for the anchor point",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "x2",
+ "type": "Number"
+ },
+ {
+ "name": "y2",
+ "type": "Number"
+ },
+ {
+ "name": "z2",
+ "description": "z-coordinate for the first control point (for WebGL mode)",
+ "type": "Number"
+ },
+ {
+ "name": "x3",
+ "type": "Number"
+ },
+ {
+ "name": "y3",
+ "type": "Number"
+ },
+ {
+ "name": "z3",
+ "description": "z-coordinate for the second control point (for WebGL mode)",
+ "type": "Number"
+ },
+ {
+ "name": "x4",
+ "type": "Number"
+ },
+ {
+ "name": "y4",
+ "type": "Number"
+ },
+ {
+ "name": "z4",
+ "description": "z-coordinate for the anchor point (for WebGL mode)",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Vertex"
+ },
+ {
+ "name": "curveVertex",
+ "file": "src/core/shape/vertex.js",
+ "line": 517,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Specifies vertex coordinates for curves. This function may only\nbe used between beginShape() and endShape() and only when there\nis no MODE parameter specified to beginShape().\nFor WebGL mode curveVertex() can be used in 2D as well as 3D mode.\n2D mode expects 2 parameters, while 3D mode expects 3 parameters.
\nThe first and last points in a series of curveVertex() lines will be used to\nguide the beginning and end of the curve. A minimum of four\npoints is required to draw a tiny curve between the second and\nthird points. Adding a fifth point with curveVertex() will draw\nthe curve between the second, third, and fourth points. The\ncurveVertex() function is an implementation of Catmull-Rom\nsplines.
\n",
+ "example": [
+ "\n\nstrokeWeight(5);\npoint(84, 91);\npoint(68, 19);\npoint(21, 17);\npoint(32, 91);\nstrokeWeight(1);\n\nnoFill();\nbeginShape();\ncurveVertex(84, 91);\ncurveVertex(84, 91);\ncurveVertex(68, 19);\ncurveVertex(21, 17);\ncurveVertex(32, 91);\ncurveVertex(32, 91);\nendShape();\n
\n",
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n setAttributes('antialias', true);\n}\nfunction draw() {\n orbitControl();\n background(50);\n strokeWeight(4);\n stroke(255);\n\n point(-25, 25);\n point(-25, 25);\n point(-25, -25);\n point(25, -25);\n point(25, 25);\n point(25, 25);\n\n strokeWeight(1);\n noFill();\n\n beginShape();\n curveVertex(-25, 25);\n curveVertex(-25, 25);\n curveVertex(-25, -25);\n curveVertex(25, -25);\n curveVertex(25, 25);\n curveVertex(25, 25);\n endShape();\n\n beginShape();\n curveVertex(-25, 25, 20);\n curveVertex(-25, 25, 20);\n curveVertex(-25, -25, 20);\n curveVertex(25, -25, 20);\n curveVertex(25, 25, 20);\n curveVertex(25, 25, 20);\n endShape();\n}\n
\n"
+ ],
+ "alt": "Upside-down u-shape line, mid canvas with the same shape in positive z-axis.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the vertex",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the vertex",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z-coordinate of the vertex (for WebGL mode)",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Vertex"
+ },
+ {
+ "name": "endContour",
+ "file": "src/core/shape/vertex.js",
+ "line": 569,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Use the beginContour() and endContour() functions to create negative\nshapes within shapes such as the center of the letter 'O'. beginContour()\nbegins recording vertices for the shape and endContour() stops recording.\nThe vertices that define a negative shape must \"wind\" in the opposite\ndirection from the exterior shape. First draw vertices for the exterior\nclockwise order, then for internal shapes, draw vertices\nshape in counter-clockwise.
\nThese functions can only be used within a beginShape()/endShape() pair and\ntransformations such as translate(), rotate(), and scale() do not work\nwithin a beginContour()/endContour() pair. It is also not possible to use\nother shapes, such as ellipse() or rect() within.
\n",
+ "example": [
+ "\n\ntranslate(50, 50);\nstroke(255, 0, 0);\nbeginShape();\n// Exterior part of shape, clockwise winding\nvertex(-40, -40);\nvertex(40, -40);\nvertex(40, 40);\nvertex(-40, 40);\n// Interior part of shape, counter-clockwise winding\nbeginContour();\nvertex(-20, -20);\nvertex(-20, 20);\nvertex(20, 20);\nvertex(20, -20);\nendContour();\nendShape(CLOSE);\n
\n"
+ ],
+ "alt": "white rect and smaller grey rect with red outlines in center of canvas.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Vertex"
+ },
+ {
+ "name": "endShape",
+ "file": "src/core/shape/vertex.js",
+ "line": 710,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "The endShape() function is the companion to beginShape() and may only be\ncalled after beginShape(). When endShape() is called, all of the image\ndata defined since the previous call to beginShape() is written into the image\nbuffer. The constant CLOSE is the value for the mode
parameter to close\nthe shape (to connect the beginning and the end).\nWhen using instancing with endShape() the instancing will not apply to the strokes.\nWhen the count parameter is used with a value greater than 1, it enables instancing for shapes built when in WEBGL mode. Instancing\nis a feature that allows the GPU to efficiently draw multiples of the same shape. It's often used for particle effects or other\ntimes when you need a lot of repetition. In order to take advantage of instancing, you will also need to write your own custom\nshader using the gl_InstanceID keyword. You can read more about instancing\nhere or by working from the example on this\npage.",
+ "example": [
+ "\n\nnoFill();\n\nbeginShape();\nvertex(20, 20);\nvertex(45, 20);\nvertex(45, 80);\nendShape(CLOSE);\n\nbeginShape();\nvertex(50, 20);\nvertex(75, 20);\nvertex(75, 80);\nendShape();\n
\n",
+ "\n\nlet fx;\nlet vs = `#version 300 es\n\nprecision mediump float;\n\nin vec3 aPosition;\nflat out int instanceID;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nvoid main() {\n\n // copy the instance ID to the fragment shader\n instanceID = gl_InstanceID;\n vec4 positionVec4 = vec4(aPosition, 1.0);\n\n // gl_InstanceID represents a numeric value for each instance\n // using gl_InstanceID allows us to move each instance separately\n // here we move each instance horizontally by id * 23\n float xOffset = float(gl_InstanceID) * 23.0;\n\n // apply the offset to the final position\n gl_Position = uProjectionMatrix * uModelViewMatrix * (positionVec4 -\n vec4(xOffset, 0.0, 0.0, 0.0));\n}\n`;\nlet fs = `#version 300 es\n\nprecision mediump float;\n\nout vec4 outColor;\nflat in int instanceID;\nuniform float numInstances;\n\nvoid main() {\n vec4 red = vec4(1.0, 0.0, 0.0, 1.0);\n vec4 blue = vec4(0.0, 0.0, 1.0, 1.0);\n\n // Normalize the instance id\n float normId = float(instanceID) / numInstances;\n\n // Mix between two colors using the normalized instance id\n outColor = mix(red, blue, normId);\n}\n`;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n fx = createShader(vs, fs);\n}\n\nfunction draw() {\n background(220);\n\n // strokes aren't instanced, and are rather used for debug purposes\n shader(fx);\n fx.setUniform('numInstances', 4);\n\n // this doesn't have to do with instancing, this is just for centering the squares\n translate(25, -10);\n\n // here we draw the squares we want to instance\n beginShape();\n vertex(0, 0);\n vertex(0, 20);\n vertex(20, 20);\n vertex(20, 0);\n vertex(0, 0);\n endShape(CLOSE, 4);\n\n resetShader();\n}\n
\n"
+ ],
+ "alt": "Triangle line shape with smallest interior angle on bottom and upside-down L.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "mode",
+ "description": "use CLOSE to close the shape",
+ "optional": 1,
+ "type": "CLOSE"
+ },
+ {
+ "name": "count",
+ "description": "number of times you want to draw/instance the shape (for WebGL mode).",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Vertex"
+ },
+ {
+ "name": "quadraticVertex",
+ "file": "src/core/shape/vertex.js",
+ "line": 890,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Specifies vertex coordinates for quadratic Bezier curves. Each call to\nquadraticVertex() defines the position of one control points and one\nanchor point of a Bezier curve, adding a new segment to a line or shape.\nThe first time quadraticVertex() is used within a beginShape() call, it\nmust be prefaced with a call to vertex() to set the first anchor point.\nFor WebGL mode quadraticVertex() can be used in 2D as well as 3D mode.\n2D mode expects 4 parameters, while 3D mode expects 6 parameters\n(including z coordinates).
\nThis function must be used between beginShape() and endShape()\nand only when there is no MODE or POINTS parameter specified to\nbeginShape().
\n",
+ "example": [
+ "\n\nstrokeWeight(5);\npoint(20, 20);\npoint(80, 20);\npoint(50, 50);\n\nnoFill();\nstrokeWeight(1);\nbeginShape();\nvertex(20, 20);\nquadraticVertex(80, 20, 50, 50);\nendShape();\n
\n\n\n\n\nstrokeWeight(5);\npoint(20, 20);\npoint(80, 20);\npoint(50, 50);\n\npoint(20, 80);\npoint(80, 80);\npoint(80, 60);\n\nnoFill();\nstrokeWeight(1);\nbeginShape();\nvertex(20, 20);\nquadraticVertex(80, 20, 50, 50);\nquadraticVertex(20, 80, 80, 80);\nvertex(80, 60);\nendShape();\n
\n",
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n setAttributes('antialias', true);\n}\nfunction draw() {\n orbitControl();\n background(50);\n strokeWeight(4);\n stroke(255);\n\n point(-35, -35);\n point(35, -35);\n point(0, 0);\n point(-35, 35);\n point(35, 35);\n point(35, 10);\n\n strokeWeight(1);\n noFill();\n\n beginShape();\n vertex(-35, -35);\n quadraticVertex(35, -35, 0, 0);\n quadraticVertex(-35, 35, 35, 35);\n vertex(35, 10);\n endShape();\n\n beginShape();\n vertex(-35, -35, 20);\n quadraticVertex(35, -35, 20, 0, 0, 20);\n quadraticVertex(-35, 35, 20, 35, 35, 20);\n vertex(35, 10, 20);\n endShape();\n}\n
\n"
+ ],
+ "alt": "backwards s-shaped black line with the same s-shaped line in positive z-axis.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "cx",
+ "description": "x-coordinate for the control point",
+ "type": "Number"
+ },
+ {
+ "name": "cy",
+ "description": "y-coordinate for the control point",
+ "type": "Number"
+ },
+ {
+ "name": "x3",
+ "description": "x-coordinate for the anchor point",
+ "type": "Number"
+ },
+ {
+ "name": "y3",
+ "description": "y-coordinate for the anchor point",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "cx",
+ "type": "Number"
+ },
+ {
+ "name": "cy",
+ "type": "Number"
+ },
+ {
+ "name": "cz",
+ "description": "z-coordinate for the control point (for WebGL mode)",
+ "type": "Number"
+ },
+ {
+ "name": "x3",
+ "type": "Number"
+ },
+ {
+ "name": "y3",
+ "type": "Number"
+ },
+ {
+ "name": "z3",
+ "description": "z-coordinate for the anchor point (for WebGL mode)",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Vertex"
+ },
+ {
+ "name": "vertex",
+ "file": "src/core/shape/vertex.js",
+ "line": 1078,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "All shapes are constructed by connecting a series of vertices. vertex()\nis used to specify the vertex coordinates for points, lines, triangles,\nquads, and polygons. It is used exclusively within the beginShape() and\nendShape() functions.",
+ "example": [
+ "\n\nstrokeWeight(3);\nbeginShape(POINTS);\nvertex(30, 20);\nvertex(85, 20);\nvertex(85, 75);\nvertex(30, 75);\nendShape();\n
\n\n\n\n\ncreateCanvas(100, 100, WEBGL);\nbackground(240, 240, 240);\nfill(237, 34, 93);\nnoStroke();\nbeginShape();\nvertex(0, 35);\nvertex(35, 0);\nvertex(0, -35);\nvertex(-35, 0);\nendShape();\n
\n\n\n\n\ncreateCanvas(100, 100, WEBGL);\nbackground(240, 240, 240);\nfill(237, 34, 93);\nnoStroke();\nbeginShape();\nvertex(-10, 10);\nvertex(0, 35);\nvertex(10, 10);\nvertex(35, 0);\nvertex(10, -8);\nvertex(0, -35);\nvertex(-10, -8);\nvertex(-35, 0);\nendShape();\n
\n\n\n\n\nstrokeWeight(3);\nstroke(237, 34, 93);\nbeginShape(LINES);\nvertex(10, 35);\nvertex(90, 35);\nvertex(10, 65);\nvertex(90, 65);\nvertex(35, 10);\nvertex(35, 90);\nvertex(65, 10);\nvertex(65, 90);\nendShape();\n
\n\n\n\n\n// Click to change the number of sides.\n// In WebGL mode, custom shapes will only\n// display hollow fill sections when\n// all calls to vertex() use the same z-value.\n\nlet sides = 3;\nlet angle, px, py;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n setAttributes('antialias', true);\n fill(237, 34, 93);\n strokeWeight(3);\n}\n\nfunction draw() {\n background(200);\n rotateX(frameCount * 0.01);\n rotateZ(frameCount * 0.01);\n ngon(sides, 0, 0, 80);\n}\n\nfunction mouseClicked() {\n if (sides > 6) {\n sides = 3;\n } else {\n sides++;\n }\n}\n\nfunction ngon(n, x, y, d) {\n beginShape(TESS);\n for (let i = 0; i < n + 1; i++) {\n angle = TWO_PI / n * i;\n px = x + sin(angle) * d / 2;\n py = y - cos(angle) * d / 2;\n vertex(px, py, 0);\n }\n for (let i = 0; i < n + 1; i++) {\n angle = TWO_PI / n * i;\n px = x + sin(angle) * d / 4;\n py = y - cos(angle) * d / 4;\n vertex(px, py, 0);\n }\n endShape();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the vertex",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the vertex",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z-coordinate of the vertex.\nDefaults to 0 if not specified.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "u",
+ "description": "the vertex's texture u-coordinate",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "v",
+ "description": "the vertex's texture v-coordinate",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Vertex"
+ },
+ {
+ "name": "normal",
+ "file": "src/core/shape/vertex.js",
+ "line": 1151,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the 3d vertex normal to use for subsequent vertices drawn with\nvertex(). A normal is a vector that is generally\nnearly perpendicular to a shape's surface which controls how much light will\nbe reflected from that part of the surface.",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n noStroke();\n}\n\nfunction draw() {\n background(255);\n rotateY(frameCount / 100);\n normalMaterial();\n beginShape(TRIANGLE_STRIP);\n normal(-0.4, 0.4, 0.8);\n vertex(-30, 30, 0);\n\n normal(0, 0, 1);\n vertex(-30, -30, 30);\n vertex(30, 30, 30);\n\n normal(0.4, -0.4, 0.8);\n vertex(30, -30, 0);\n endShape();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "vector",
+ "description": "A p5.Vector representing the vertex normal.",
+ "type": "Vector"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "The x component of the vertex normal.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "The y component of the vertex normal.",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "The z component of the vertex normal.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "Vertex"
+ },
+ {
+ "name": "noLoop",
+ "file": "src/core/structure.js",
+ "line": 78,
+ "itemtype": "method",
+ "description": "Stops p5.js from continuously executing the code within draw().\nIf loop() is called, the code in draw()\nbegins to run continuously again. If using noLoop()\nin setup(), it should be the last line inside the block.
\nWhen noLoop() is used, it's not possible to manipulate\nor access the screen inside event handling functions such as\nmousePressed() or\nkeyPressed(). Instead, use those functions to\ncall redraw() or loop(),\nwhich will run draw(), which can update the screen\nproperly. This means that when noLoop() has been\ncalled, no drawing can happen, and functions like saveFrames()\nor loadPixels() may not be used.
\nNote that if the sketch is resized, redraw() will\nbe called to update the sketch, even after noLoop()\nhas been specified. Otherwise, the sketch would enter an odd state until\nloop() was called.
\nUse isLooping() to check the current state of loop().
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100);\n background(200);\n noLoop();\n}\n\nfunction draw() {\n line(10, 10, 90, 90);\n}\n
\n\n\n\n\nlet x = 0;\nfunction setup() {\n createCanvas(100, 100);\n}\n\nfunction draw() {\n background(204);\n x = x + 0.1;\n if (x > width) {\n x = 0;\n }\n line(x, 0, x, height);\n}\n\nfunction mousePressed() {\n noLoop();\n}\n\nfunction mouseReleased() {\n loop();\n}\n
\n"
+ ],
+ "alt": "113 pixel long line extending from top-left to bottom right of canvas.\nhorizontal line moves slowly from left. Loops but stops on mouse press.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Structure",
+ "submodule": "Structure"
+ },
+ {
+ "name": "loop",
+ "file": "src/core/structure.js",
+ "line": 124,
+ "itemtype": "method",
+ "description": "By default, p5.js loops through draw() continuously, executing the code within\nit. However, the draw() loop may be stopped by calling\nnoLoop(). In that case, the draw()\nloop can be resumed with loop().
\nAvoid calling loop() from inside setup().
\nUse isLooping() to check the current state of loop().
\n",
+ "example": [
+ "\n\nlet x = 0;\nfunction setup() {\n createCanvas(100, 100);\n noLoop();\n}\n\nfunction draw() {\n background(204);\n x = x + 0.1;\n if (x > width) {\n x = 0;\n }\n line(x, 0, x, height);\n}\n\nfunction mousePressed() {\n loop();\n}\n\nfunction mouseReleased() {\n noLoop();\n}\n
\n"
+ ],
+ "alt": "horizontal line moves slowly from left. Loops but stops on mouse press.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Structure",
+ "submodule": "Structure"
+ },
+ {
+ "name": "isLooping",
+ "file": "src/core/structure.js",
+ "line": 188,
+ "itemtype": "method",
+ "description": "By default, p5.js loops through draw() continuously,\nexecuting the code within it. If the sketch is stopped with\nnoLoop() or resumed with loop(),\nisLooping() returns the current state for use within custom event handlers.",
+ "example": [
+ "\n\nlet checkbox, button, colBG, colFill;\n\nfunction setup() {\n createCanvas(100, 100);\n\n button = createButton('Colorize if loop()');\n button.position(0, 120);\n button.mousePressed(changeBG);\n\n checkbox = createCheckbox('loop()', true);\n checkbox.changed(checkLoop);\n\n colBG = color(0);\n colFill = color(255);\n}\n\nfunction changeBG() {\n if (isLooping()) {\n colBG = color(random(255), random(255), random(255));\n colFill = color(random(255), random(255), random(255));\n }\n}\n\nfunction checkLoop() {\n if (this.checked()) {\n loop();\n } else {\n noLoop();\n }\n}\n\nfunction draw() {\n background(colBG);\n fill(colFill);\n ellipse(frameCount % width, height / 2, 50);\n}\n
\n"
+ ],
+ "alt": "Ellipse moves slowly from left. Checkbox toggles loop()/noLoop().\nButton colorizes sketch if isLooping().",
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "boolean"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "boolean"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Structure",
+ "submodule": "Structure"
+ },
+ {
+ "name": "push",
+ "file": "src/core/structure.js",
+ "line": 281,
+ "itemtype": "method",
+ "description": "The push() function saves the current drawing style\nsettings and transformations, while pop() restores these\nsettings. Note that these functions are always used together. They allow you to\nchange the style and transformation settings and later return to what you had.\nWhen a new state is started with push(), it builds on\nthe current style and transform information. The push()\nand pop() functions can be embedded to provide more\ncontrol. (See the second example for a demonstration.)
\npush() stores information related to the current transformation state\nand style settings controlled by the following functions:\nfill(),\nnoFill(),\nnoStroke(),\nstroke(),\ntint(),\nnoTint(),\nstrokeWeight(),\nstrokeCap(),\nstrokeJoin(),\nimageMode(),\nrectMode(),\nellipseMode(),\ncolorMode(),\ntextAlign(),\ntextFont(),\ntextSize(),\ntextLeading(),\napplyMatrix(),\nresetMatrix(),\nrotate(),\nscale(),\nshearX(),\nshearY(),\ntranslate(),\nnoiseSeed().
\nIn WEBGL mode additional style settings are stored. These are controlled by the\nfollowing functions: setCamera(),\nambientLight(),\ndirectionalLight(),\npointLight(), texture(),\nspecularMaterial(),\nshininess(),\nnormalMaterial()\nand shader().
\n",
+ "example": [
+ "\n\nellipse(0, 50, 33, 33); // Left circle\n\npush(); // Start a new drawing state\nstrokeWeight(10);\nfill(204, 153, 0);\ntranslate(50, 0);\nellipse(0, 50, 33, 33); // Middle circle\npop(); // Restore original state\n\nellipse(100, 50, 33, 33); // Right circle\n
\n\n\n\n\nellipse(0, 50, 33, 33); // Left circle\n\npush(); // Start a new drawing state\nstrokeWeight(10);\nfill(204, 153, 0);\nellipse(33, 50, 33, 33); // Left-middle circle\n\npush(); // Start another new drawing state\nstroke(0, 102, 153);\nellipse(66, 50, 33, 33); // Right-middle circle\npop(); // Restore previous state\n\npop(); // Restore original state\n\nellipse(100, 50, 33, 33); // Right circle\n
\n"
+ ],
+ "alt": "Gold ellipse + thick black outline @center 2 white ellipses on left and right.\n2 Gold ellipses left black right blue stroke. 2 white ellipses on left+right.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Structure",
+ "submodule": "Structure"
+ },
+ {
+ "name": "pop",
+ "file": "src/core/structure.js",
+ "line": 381,
+ "itemtype": "method",
+ "description": "The push() function saves the current drawing style\nsettings and transformations, while pop() restores\nthese settings. Note that these functions are always used together. They allow\nyou to change the style and transformation settings and later return to what\nyou had. When a new state is started with push(), it\nbuilds on the current style and transform information. The push()\nand pop() functions can be embedded to provide more\ncontrol. (See the second example for a demonstration.)
\npush() stores information related to the current transformation state\nand style settings controlled by the following functions:\nfill(),\nnoFill(),\nnoStroke(),\nstroke(),\ntint(),\nnoTint(),\nstrokeWeight(),\nstrokeCap(),\nstrokeJoin(),\nimageMode(),\nrectMode(),\nellipseMode(),\ncolorMode(),\ntextAlign(),\ntextFont(),\ntextSize(),\ntextLeading(),\napplyMatrix(),\nresetMatrix(),\nrotate(),\nscale(),\nshearX(),\nshearY(),\ntranslate(),\nnoiseSeed().
\nIn WEBGL mode additional style settings are stored. These are controlled by\nthe following functions:\nsetCamera(),\nambientLight(),\ndirectionalLight(),\npointLight(),\ntexture(),\nspecularMaterial(),\nshininess(),\nnormalMaterial() and\nshader().
\n",
+ "example": [
+ "\n\nellipse(0, 50, 33, 33); // Left circle\n\npush(); // Start a new drawing state\ntranslate(50, 0);\nstrokeWeight(10);\nfill(204, 153, 0);\nellipse(0, 50, 33, 33); // Middle circle\npop(); // Restore original state\n\nellipse(100, 50, 33, 33); // Right circle\n
\n\n\n\n\nellipse(0, 50, 33, 33); // Left circle\n\npush(); // Start a new drawing state\nstrokeWeight(10);\nfill(204, 153, 0);\nellipse(33, 50, 33, 33); // Left-middle circle\n\npush(); // Start another new drawing state\nstroke(0, 102, 153);\nellipse(66, 50, 33, 33); // Right-middle circle\npop(); // Restore previous state\n\npop(); // Restore original state\n\nellipse(100, 50, 33, 33); // Right circle\n
\n"
+ ],
+ "alt": "Gold ellipse + thick black outline @center 2 white ellipses on left and right.\n2 Gold ellipses left black right blue stroke. 2 white ellipses on left+right.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Structure",
+ "submodule": "Structure"
+ },
+ {
+ "name": "redraw",
+ "file": "src/core/structure.js",
+ "line": 458,
+ "itemtype": "method",
+ "description": "Executes the code within draw() one time. This\nfunction allows the program to update the display window only when necessary,\nfor example when an event registered by mousePressed()\nor keyPressed() occurs.
\nIn structuring a program, it only makes sense to call redraw()\nwithin events such as mousePressed(). This\nis because redraw() does not run\ndraw() immediately (it only sets a flag that indicates\nan update is needed).
\nThe redraw() function does not work properly when\ncalled inside draw().To enable/disable animations,\nuse loop() and noLoop().
\nIn addition you can set the number of redraws per method call. Just\nadd an integer as single parameter for the number of redraws.
\n",
+ "example": [
+ "\nlet x = 0;\n\nfunction setup() {\n createCanvas(100, 100);\n noLoop();\n}\n\nfunction draw() {\n background(204);\n line(x, 0, x, height);\n}\n\nfunction mousePressed() {\n x += 1;\n redraw();\n}\n
\n\n\n\n\nlet x = 0;\n\nfunction setup() {\n createCanvas(100, 100);\n noLoop();\n}\n\nfunction draw() {\n background(204);\n x += 1;\n line(x, 0, x, height);\n}\n\nfunction mousePressed() {\n redraw(5);\n}\n
\n"
+ ],
+ "alt": "black line on far left of canvas\nblack line on far left of canvas",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "Redraw for n-times. The default value is 1.",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Structure",
+ "submodule": "Structure"
+ },
+ {
+ "name": "applyMatrix",
+ "file": "src/core/transform.js",
+ "line": 187,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Multiplies the current matrix by the one specified through the parameters.\nThis is a powerful operation that can perform the equivalent of translate,\nscale, shear and rotate all at once. You can learn more about transformation\nmatrices on \nWikipedia.
\nThe naming of the arguments here follows the naming of the \nWHATWG specification and corresponds to a\ntransformation matrix of the\nform:
\n

\n",
+ "example": [
+ "\n\nfunction setup() {\n frameRate(10);\n rectMode(CENTER);\n}\n\nfunction draw() {\n let step = frameCount % 20;\n background(200);\n // Equivalent to translate(x, y);\n applyMatrix(1, 0, 0, 1, 40 + step, 50);\n rect(0, 0, 50, 50);\n}\n
\n\n\n\n\nfunction setup() {\n frameRate(10);\n rectMode(CENTER);\n}\n\nfunction draw() {\n let step = frameCount % 20;\n background(200);\n translate(50, 50);\n // Equivalent to scale(x, y);\n applyMatrix(1 / step, 0, 0, 1 / step, 0, 0);\n rect(0, 0, 50, 50);\n}\n
\n\n\n\n\nfunction setup() {\n frameRate(10);\n rectMode(CENTER);\n}\n\nfunction draw() {\n let step = frameCount % 20;\n let angle = map(step, 0, 20, 0, TWO_PI);\n let cos_a = cos(angle);\n let sin_a = sin(angle);\n background(200);\n translate(50, 50);\n // Equivalent to rotate(angle);\n applyMatrix(cos_a, sin_a, -sin_a, cos_a, 0, 0);\n rect(0, 0, 50, 50);\n}\n
\n\n\n\n\nfunction setup() {\n frameRate(10);\n rectMode(CENTER);\n}\n\nfunction draw() {\n let step = frameCount % 20;\n let angle = map(step, 0, 20, -PI / 4, PI / 4);\n background(200);\n translate(50, 50);\n // equivalent to shearX(angle);\n let shear_factor = 1 / tan(PI / 2 - angle);\n applyMatrix(1, 0, shear_factor, 1, 0, 0);\n rect(0, 0, 50, 50);\n}\n
\n\n\n\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n noFill();\n}\n\nfunction draw() {\n background(200);\n rotateY(PI / 6);\n stroke(153);\n box(35);\n let rad = millis() / 1000;\n // Set rotation angles\n let ct = cos(rad);\n let st = sin(rad);\n // Matrix for rotation around the Y axis\n applyMatrix(\n ct, 0.0, st, 0.0,\n 0.0, 1.0, 0.0, 0.0,\n -st, 0.0, ct, 0.0,\n 0.0, 0.0, 0.0, 1.0\n );\n stroke(255);\n box(50);\n}\n
\n\n\n\n\nfunction draw() {\n background(200);\n let testMatrix = [1, 0, 0, 1, 0, 0];\n applyMatrix(testMatrix);\n rect(0, 0, 50, 50);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "arr",
+ "description": "an array of numbers - should be 6 or 16 length (2×3 or 4×4 matrix values)",
+ "type": "Array"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "a",
+ "description": "numbers which define the 2×3 or 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "b",
+ "description": "numbers which define the 2×3 or 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "c",
+ "description": "numbers which define the 2×3 or 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "d",
+ "description": "numbers which define the 2×3 or 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "e",
+ "description": "numbers which define the 2×3 or 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "f",
+ "description": "numbers which define the 2×3 or 4×4 matrix to be multiplied",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "a",
+ "type": "Number"
+ },
+ {
+ "name": "b",
+ "type": "Number"
+ },
+ {
+ "name": "c",
+ "type": "Number"
+ },
+ {
+ "name": "d",
+ "type": "Number"
+ },
+ {
+ "name": "e",
+ "type": "Number"
+ },
+ {
+ "name": "f",
+ "type": "Number"
+ },
+ {
+ "name": "g",
+ "description": "numbers which define the 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "description": "numbers which define the 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "i",
+ "description": "numbers which define the 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "j",
+ "description": "numbers which define the 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "k",
+ "description": "numbers which define the 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "l",
+ "description": "numbers which define the 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "m",
+ "description": "numbers which define the 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "n",
+ "description": "numbers which define the 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "o",
+ "description": "numbers which define the 4×4 matrix to be multiplied",
+ "type": "Number"
+ },
+ {
+ "name": "p",
+ "description": "numbers which define the 4×4 matrix to be multiplied",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Transform",
+ "submodule": "Transform"
+ },
+ {
+ "name": "resetMatrix",
+ "file": "src/core/transform.js",
+ "line": 217,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Replaces the current matrix with the identity matrix.",
+ "example": [
+ "\n\ntranslate(50, 50);\napplyMatrix(0.5, 0.5, -0.5, 0.5, 0, 0);\nrect(0, 0, 20, 20);\n// Note that the translate is also reset.\nresetMatrix();\nrect(0, 0, 20, 20);\n
\n"
+ ],
+ "alt": "A rotated rectangle in the center with another at the top left corner",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Transform",
+ "submodule": "Transform"
+ },
+ {
+ "name": "rotate",
+ "file": "src/core/transform.js",
+ "line": 255,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Rotates a shape by the amount specified by the angle parameter. This\nfunction accounts for angleMode, so angles\ncan be entered in either RADIANS or DEGREES.
\nObjects are always rotated around their relative position to the\norigin and positive numbers rotate objects in a clockwise direction.\nTransformations apply to everything that happens after and subsequent\ncalls to the function accumulate the effect. For example, calling\nrotate(HALF_PI) and then rotate(HALF_PI) is the same as rotate(PI).\nAll transformations are reset when draw() begins again.
\nTechnically, rotate() multiplies the current transformation matrix\nby a rotation matrix. This function can be further controlled by\npush() and pop().
\n",
+ "example": [
+ "\n\ntranslate(width / 2, height / 2);\nrotate(PI / 3.0);\nrect(-26, -26, 52, 52);\n
\n"
+ ],
+ "alt": "white 52×52 rect with black outline at center rotated counter 45 degrees",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "the angle of rotation, specified in radians\nor degrees, depending on current angleMode",
+ "type": "Number"
+ },
+ {
+ "name": "axis",
+ "description": "(in 3d) the axis to rotate around",
+ "optional": 1,
+ "type": "p5.Vector|Number[]"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Transform",
+ "submodule": "Transform"
+ },
+ {
+ "name": "rotateX",
+ "file": "src/core/transform.js",
+ "line": 292,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Rotates a shape around X axis by the amount specified in angle parameter.\nThe angles can be entered in either RADIANS or DEGREES.
\nObjects are always rotated around their relative position to the\norigin and positive numbers rotate objects in a clockwise direction.\nAll transformations are reset when draw() begins again.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n}\nfunction draw() {\n background(255);\n rotateX(millis() / 1000);\n box();\n}\n
\n"
+ ],
+ "alt": "3d box rotating around the x axis.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "the angle of rotation, specified in radians\nor degrees, depending on current angleMode",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Transform",
+ "submodule": "Transform"
+ },
+ {
+ "name": "rotateY",
+ "file": "src/core/transform.js",
+ "line": 330,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Rotates a shape around Y axis by the amount specified in angle parameter.\nThe angles can be entered in either RADIANS or DEGREES.
\nObjects are always rotated around their relative position to the\norigin and positive numbers rotate objects in a clockwise direction.\nAll transformations are reset when draw() begins again.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n}\nfunction draw() {\n background(255);\n rotateY(millis() / 1000);\n box();\n}\n
\n"
+ ],
+ "alt": "3d box rotating around the y axis.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "the angle of rotation, specified in radians\nor degrees, depending on current angleMode",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Transform",
+ "submodule": "Transform"
+ },
+ {
+ "name": "rotateZ",
+ "file": "src/core/transform.js",
+ "line": 370,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Rotates a shape around Z axis by the amount specified in angle parameter.\nThe angles can be entered in either RADIANS or DEGREES.
\nThis method works in WEBGL mode only.
\nObjects are always rotated around their relative position to the\norigin and positive numbers rotate objects in a clockwise direction.\nAll transformations are reset when draw() begins again.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n}\nfunction draw() {\n background(255);\n rotateZ(millis() / 1000);\n box();\n}\n
\n"
+ ],
+ "alt": "3d box rotating around the z axis.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "the angle of rotation, specified in radians\nor degrees, depending on current angleMode",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Transform",
+ "submodule": "Transform"
+ },
+ {
+ "name": "scale",
+ "file": "src/core/transform.js",
+ "line": 426,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Increases or decreases the size of a shape by expanding or contracting\nvertices. Objects always scale from their relative origin to the\ncoordinate system. Scale values are specified as decimal percentages.\nFor example, the function call scale(2.0) increases the dimension of a\nshape by 200%.
\nTransformations apply to everything that happens after and subsequent\ncalls to the function multiply the effect. For example, calling scale(2.0)\nand then scale(1.5) is the same as scale(3.0). If scale() is called\nwithin draw(), the transformation is reset when the loop begins again.
\nUsing this function with the z parameter is only available in WEBGL mode.\nThis function can be further controlled with push() and pop().
\n",
+ "example": [
+ "\n\nrect(30, 20, 50, 50);\nscale(0.5);\nrect(30, 20, 50, 50);\n
\n\n\n\n\nrect(30, 20, 50, 50);\nscale(0.5, 1.3);\nrect(30, 20, 50, 50);\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "s",
+ "description": "percent to scale the object, or percentage to\nscale the object in the x-axis if multiple arguments\nare given",
+ "type": "Number|p5.Vector|Number[]"
+ },
+ {
+ "name": "y",
+ "description": "percent to scale the object in the y-axis",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "percent to scale the object in the z-axis (webgl only)",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "scales",
+ "description": "per-axis percents to scale the object",
+ "type": "p5.Vector|Number[]"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Transform",
+ "submodule": "Transform"
+ },
+ {
+ "name": "shearX",
+ "file": "src/core/transform.js",
+ "line": 483,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Shears a shape around the x-axis by the amount specified by the angle\nparameter. Angles should be specified in the current angleMode.\nObjects are always sheared around their relative position to the origin\nand positive numbers shear objects in a clockwise direction.
\nTransformations apply to everything that happens after and subsequent\ncalls to the function accumulates the effect. For example, calling\nshearX(PI/2) and then shearX(PI/2) is the same as shearX(PI).\nIf shearX() is called within the draw(),\nthe transformation is reset when the loop begins again.
\nTechnically, shearX() multiplies the current\ntransformation matrix by a rotation matrix. This function can be further\ncontrolled by the push() and pop() functions.
\n",
+ "example": [
+ "\n\ntranslate(width / 4, height / 4);\nshearX(PI / 4.0);\nrect(0, 0, 30, 30);\n
\n"
+ ],
+ "alt": "white irregular quadrilateral with black outline at top middle.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "angle of shear specified in radians or degrees,\ndepending on current angleMode",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Transform",
+ "submodule": "Transform"
+ },
+ {
+ "name": "shearY",
+ "file": "src/core/transform.js",
+ "line": 522,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Shears a shape around the y-axis the amount specified by the angle\nparameter. Angles should be specified in the current angleMode. Objects\nare always sheared around their relative position to the origin and\npositive numbers shear objects in a clockwise direction.
\nTransformations apply to everything that happens after and subsequent\ncalls to the function accumulates the effect. For example, calling\nshearY(PI/2) and then shearY(PI/2) is the same as shearY(PI). If\nshearY() is called within the draw(), the transformation is reset when\nthe loop begins again.
\nTechnically, shearY() multiplies the current transformation matrix by a\nrotation matrix. This function can be further controlled by the\npush() and pop() functions.
\n",
+ "example": [
+ "\n\ntranslate(width / 4, height / 4);\nshearY(PI / 4.0);\nrect(0, 0, 30, 30);\n
\n"
+ ],
+ "alt": "white irregular quadrilateral with black outline at middle bottom.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "angle of shear specified in radians or degrees,\ndepending on current angleMode",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Transform",
+ "submodule": "Transform"
+ },
+ {
+ "name": "translate",
+ "file": "src/core/transform.js",
+ "line": 587,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Specifies an amount to displace objects within the display window.\nThe x parameter specifies left/right translation, the y parameter\nspecifies up/down translation.
\nTransformations are cumulative and apply to everything that happens after\nand subsequent calls to the function accumulates the effect. For example,\ncalling translate(50, 0) and then translate(20, 0) is the same as\ntranslate(70, 0). If translate() is called within draw(), the\ntransformation is reset when the loop begins again. This function can be\nfurther controlled by using push() and pop().
\n",
+ "example": [
+ "\n\ntranslate(30, 20);\nrect(0, 0, 55, 55);\n
\n\n\n\n\nrect(0, 0, 55, 55); // Draw rect at original 0,0\ntranslate(30, 20);\nrect(0, 0, 55, 55); // Draw rect at new 0,0\ntranslate(14, 14);\nrect(0, 0, 55, 55); // Draw rect at new 0,0\n
\n\n\n\n\n\nfunction draw() {\n background(200);\n rectMode(CENTER);\n translate(width / 2, height / 2);\n translate(p5.Vector.fromAngle(millis() / 1000, 40));\n rect(0, 0, 20, 20);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "left/right translation",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "up/down translation",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "forward/backward translation (WEBGL only)",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "vector",
+ "description": "the vector to translate by",
+ "type": "p5.Vector"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Transform",
+ "submodule": "Transform"
+ },
+ {
+ "name": "storeItem",
+ "file": "src/data/local_storage.js",
+ "line": 58,
+ "itemtype": "method",
+ "description": "Stores a value in local storage under the key name.\nLocal storage is saved in the browser and persists\nbetween browsing sessions and page reloads.\nThe key can be the name of the variable but doesn't\nhave to be. To retrieve stored items\nsee getItem.
\nSensitive data such as passwords or personal information\nshould not be stored in local storage.
\n",
+ "example": [
+ "\n// Type to change the letter in the\n// center of the canvas.\n// If you reload the page, it will\n// still display the last key you entered\n\nlet myText;\n\nfunction setup() {\n createCanvas(100, 100);\n myText = getItem('myText');\n if (myText === null) {\n myText = '';\n }\n describe(`When you type the key name is displayed as black text on white background.\n If you reload the page, the last letter typed is still displaying.`);\n}\n\nfunction draw() {\n textSize(40);\n background(255);\n text(myText, width / 2, height / 2);\n}\n\nfunction keyPressed() {\n myText = key;\n storeItem('myText', myText);\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "key",
+ "type": "String"
+ },
+ {
+ "name": "value",
+ "type": "String|Number|Object|Boolean|p5.Color|p5.Vector"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "LocalStorage"
+ },
+ {
+ "name": "getItem",
+ "file": "src/data/local_storage.js",
+ "line": 139,
+ "itemtype": "method",
+ "description": "Returns the value of an item that was stored in local storage\nusing storeItem()",
+ "example": [
+ "\n// Click the mouse to change\n// the color of the background\n// Once you have changed the color\n// it will stay changed even when you\n// reload the page.\n\nlet myColor;\n\nfunction setup() {\n createCanvas(100, 100);\n myColor = getItem('myColor');\n}\n\nfunction draw() {\n if (myColor !== null) {\n background(myColor);\n }\n describe(`If you click, the canvas changes to a random color.·\n If you reload the page, the canvas is still the color it was when the\n page was previously loaded.`);\n}\n\nfunction mousePressed() {\n myColor = color(random(255), random(255), random(255));\n storeItem('myColor', myColor);\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "key",
+ "description": "name that you wish to use to store in local storage",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "Value of stored item",
+ "type": "Number|Object|String|Boolean|p5.Color|p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "Value of stored item",
+ "type": "Number|Object|String|Boolean|p5.Color|p5.Vector"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "LocalStorage"
+ },
+ {
+ "name": "clearStorage",
+ "file": "src/data/local_storage.js",
+ "line": 197,
+ "itemtype": "method",
+ "description": "Clears all local storage items set with storeItem()\nfor the current domain.",
+ "example": [
+ "\n\nfunction setup() {\n let myNum = 10;\n let myBool = false;\n storeItem('myNum', myNum);\n storeItem('myBool', myBool);\n print(getItem('myNum')); // logs 10 to the console\n print(getItem('myBool')); // logs false to the console\n clearStorage();\n print(getItem('myNum')); // logs null to the console\n print(getItem('myBool')); // logs null to the console\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "LocalStorage"
+ },
+ {
+ "name": "removeItem",
+ "file": "src/data/local_storage.js",
+ "line": 221,
+ "itemtype": "method",
+ "description": "Removes an item that was stored with storeItem()",
+ "example": [
+ "\n\nfunction setup() {\n let myVar = 10;\n storeItem('myVar', myVar);\n print(getItem('myVar')); // logs 10 to the console\n removeItem('myVar');\n print(getItem('myVar')); // logs null to the console\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "key",
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "LocalStorage"
+ },
+ {
+ "name": "createStringDict",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 43,
+ "itemtype": "method",
+ "description": "Creates a new instance of p5.StringDict using the key-value pair\nor the object you provide.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createStringDict('p5', 'js');\n print(myDictionary.hasKey('p5')); // logs true to console\n\n let anotherDictionary = createStringDict({ happy: 'coding' });\n print(anotherDictionary.hasKey('happy')); // logs true to console\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "key",
+ "type": "String"
+ },
+ {
+ "name": "value",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.StringDict"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "object",
+ "description": "object",
+ "type": "Object"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.StringDict"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.StringDict"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "createNumberDict",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 77,
+ "itemtype": "method",
+ "description": "Creates a new instance of p5.NumberDict using the key-value pair\nor object you provide.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createNumberDict(100, 42);\n print(myDictionary.hasKey(100)); // logs true to console\n\n let anotherDictionary = createNumberDict({ 200: 84 });\n print(anotherDictionary.hasKey(200)); // logs true to console\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "key",
+ "type": "Number"
+ },
+ {
+ "name": "value",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.NumberDict"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "object",
+ "description": "object",
+ "type": "Object"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.NumberDict"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.NumberDict"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "select",
+ "file": "src/dom/dom.js",
+ "line": 92,
+ "itemtype": "method",
+ "description": "Searches the page for the first element that matches the given\nCSS selector string.\nThe string can be an ID, class, tag name, or a combination. select()
\nreturns a p5.Element object if it finds a match\nand null
otherwise.
\nThe second parameter, container
, is optional. It specifies a container to\nsearch within. container can be CSS selector string, a\np5.Element object, or an\nHTMLElement object.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100);\n background(200);\n\n // Select the canvas by its tag.\n let cnv = select('canvas');\n cnv.style('border', '5px deeppink dashed');\n\n describe('A gray square with a dashed pink border.');\n}\n
\n\n\n\n\nfunction setup() {\n let cnv = createCanvas(100, 100);\n // Add a class attribute to the canvas.\n cnv.class('pinkborder');\n\n background(200);\n\n // Select the canvas by its class.\n cnv = select('.pinkborder');\n // Style its border.\n cnv.style('border', '5px deeppink dashed');\n\n describe('A gray square with a dashed pink border.');\n}\n
\n\n\n\n\nfunction setup() {\n let cnv = createCanvas(100, 100);\n // Set the canvas ID.\n cnv.id('mycanvas');\n\n background(200);\n\n // Select the canvas by its ID.\n cnv = select('#mycanvas');\n // Style its border.\n cnv.style('border', '5px deeppink dashed');\n\n describe('A gray square with a dashed pink border.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "selectors",
+ "description": "CSS selector string of element to search for.",
+ "type": "String"
+ },
+ {
+ "name": "container",
+ "description": "CSS selector string, p5.Element, or\nHTMLElement to search within.",
+ "optional": 1,
+ "type": "String|p5.Element|HTMLElement"
+ }
+ ],
+ "return": {
+ "description": "p5.Element containing the element.",
+ "type": "p5.Element|"
+ }
+ }
+ ],
+ "return": {
+ "description": "p5.Element containing the element.",
+ "type": "p5.Element|"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "selectAll",
+ "file": "src/dom/dom.js",
+ "line": 177,
+ "itemtype": "method",
+ "description": "Searches the page for all elements that matches the given\nCSS selector string.\nThe string can be an ID, class, tag name, or a combination. selectAll()
\nreturns an array of p5.Element objects if it\nfinds any matches and an empty array otherwise.
\nThe second parameter, container
, is optional. It specifies a container to\nsearch within. container can be CSS selector string, a\np5.Element object, or an\nHTMLElement object.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Create three buttons.\n createButton('1');\n createButton('2');\n createButton('3');\n\n // Select the buttons by their tag.\n let buttons = selectAll('button');\n\n // Position the buttons.\n for (let i = 0; i < 3; i += 1) {\n buttons[i].position(0, i * 30);\n }\n\n describe('Three buttons stacked vertically. The buttons are labeled, \"1\", \"2\", and \"3\".');\n}\n
\n\n\n\n\nfunction setup() {\n // Create three buttons and position them.\n let b1 = createButton('1');\n b1.position(0, 0);\n let b2 = createButton('2');\n b2.position(0, 30);\n let b3 = createButton('3');\n b3.position(0, 60);\n\n // Add a class attribute to each button.\n b1.class('btn');\n b2.class('btn btn-pink');\n b3.class('btn');\n\n // Select the buttons by their class.\n let buttons = selectAll('.btn');\n let pinkButtons = selectAll('.btn-pink');\n\n // Style the selected buttons.\n buttons.forEach(btn => {\n btn.style('font-family', 'Comic Sans MS');\n });\n\n pinkButtons.forEach(btn => {\n btn.style('background', 'deeppink');\n btn.style('color', 'white');\n });\n\n describe('Three buttons stacked vertically. The buttons are labeled, \"1\", \"2\", and \"3\". Buttons \"1\" and \"3\" are gray. Button \"2\" is pink.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "selectors",
+ "description": "CSS selector string of element to search for.",
+ "type": "String"
+ },
+ {
+ "name": "container",
+ "description": "CSS selector string, p5.Element, or\nHTMLElement to search within.",
+ "optional": 1,
+ "type": "String|p5.Element|HTMLElement"
+ }
+ ],
+ "return": {
+ "description": "array of p5.Elements containing any elements found.",
+ "type": "p5.Element[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "array of p5.Elements containing any elements found.",
+ "type": "p5.Element[]"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "removeElements",
+ "file": "src/dom/dom.js",
+ "line": 301,
+ "itemtype": "method",
+ "description": "Removes all elements created by p5.js, including any event handlers.\nThere are two exceptions:\ncanvas elements created by createCanvas\nand p5.Render objects created by\ncreateGraphics.",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100);\n background(200);\n\n // Create a paragraph element and place\n // it in the middle of the canvas.\n let p = createP('p5*js');\n p.position(25, 25);\n\n describe('A gray square with the text \"p5*js\" written in its center. The text disappears when the mouse is pressed.');\n}\n\nfunction mousePressed() {\n removeElements();\n}\n
\n\n\n\n\nlet slider;\n\nfunction setup() {\n createCanvas(100, 100);\n\n // Create a paragraph element and place\n // it at the top of the canvas.\n let p = createP('p5*js');\n p.position(25, 25);\n\n // Create a slider element and place it\n // beneath the canvas.\n slider = createSlider(0, 255, 200);\n slider.position(0, 100);\n\n describe('A gray square with the text \"p5*js\" written in its center and a range slider beneath it. The square changes color when the slider is moved. The text and slider disappear when the square is double-clicked.');\n}\n\nfunction draw() {\n // Use the slider value to change the background color.\n let g = slider.value();\n background(g);\n}\n\nfunction doubleClicked() {\n removeElements();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "changed",
+ "file": "src/dom/dom.js",
+ "line": 366,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "myElement.changed()
sets a function to call when the value of the\np5.Element object changes. Calling\nmyElement.changed(false)
disables the function.",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Create a dropdown menu and add a few color options.\n let drop = createSelect();\n drop.position(0, 0);\n drop.option('red');\n drop.option('green');\n drop.option('blue');\n\n // When the color option changes, paint the background with\n // that color.\n drop.changed(() => {\n let c = drop.value();\n background(c);\n });\n\n describe('A gray square with a dropdown menu at the top. The square changes color when an option is selected.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n // Create a checkbox and place it beneath the canvas.\n let checkbox = createCheckbox(' circle');\n checkbox.position(0, 100);\n\n // When the checkbox changes, paint the background gray\n // and determine whether to draw a circle.\n checkbox.changed(() => {\n background(200);\n if (checkbox.checked() === true) {\n circle(50, 50, 30);\n }\n });\n\n describe('A gray square with a checkbox underneath it that says \"circle\". A white circle appears when the box is checked and disappears otherwise.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when the element changes.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "input",
+ "file": "src/dom/dom.js",
+ "line": 426,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "myElement.input()
sets a function to call when input is detected within\nthe p5.Element object. It's often used to with\ntext inputs and sliders. Calling myElement.input(false)
disables the\nfunction.",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Create a slider and place it beneath the canvas.\n let slider = createSlider(0, 255, 200);\n slider.position(0, 100);\n\n // When the slider changes, use its value to paint\n // the background.\n slider.input(() => {\n let g = slider.value();\n background(g);\n });\n\n describe('A gray square with a range slider underneath it. The background changes shades of gray when the slider is moved.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n // Create an input and place it beneath the canvas.\n let inp = createInput('');\n inp.position(0, 100);\n\n // When input is detected, paint the background gray\n // and display the text.\n inp.input(() => {\n background(200);\n let msg = inp.value();\n text(msg, 5, 50);\n });\n\n describe('A gray square with a text input bar beneath it. Any text written in the input appears in the middle of the square.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fxn",
+ "description": "function to call when input is detected within\nthe element.\nfalse
disables the function.",
+ "type": "Function|Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "addElement",
+ "file": "src/dom/dom.js",
+ "line": 434,
+ "itemtype": "method",
+ "description": "Helpers for create methods.",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createDiv",
+ "file": "src/dom/dom.js",
+ "line": 482,
+ "itemtype": "method",
+ "description": "Creates a <div></div>
element. It's commonly used as a\ncontainer for other elements.
\nThe parameter html
is optional. It accepts a string that sets the\ninner HTML of the new <div></div>
.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n let div = createDiv('p5*js');\n div.position(25, 35);\n\n describe('A gray square with the text \"p5*js\" written in its center.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n // Create an h3 element within the div.\n let div = createDiv('p5*js
');\n div.position(20, 5);\n\n describe('A gray square with the text \"p5*js\" written in its center.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "html",
+ "description": "inner HTML for the new <div></div>
element.",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createP",
+ "file": "src/dom/dom.js",
+ "line": 512,
+ "itemtype": "method",
+ "description": "Creates a <p></p>
element. It's commonly used for\nparagraph-length text.
\nThe parameter html
is optional. It accepts a string that sets the\ninner HTML of the new <p></p>
.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n let p = createP('Tell me a story.');\n p.position(5, 0);\n\n describe('A gray square displaying the text \"Tell me a story.\" written in black.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "html",
+ "description": "inner HTML for the new <p></p>
element.",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createSpan",
+ "file": "src/dom/dom.js",
+ "line": 577,
+ "itemtype": "method",
+ "description": "Creates a <span></span>
element. It's commonly used as a\ncontainer for inline elements. For example, a <span></span>
\ncan hold part of a sentence that's a\ndifferent style.
\nThe parameter html
is optional. It accepts a string that sets the\ninner HTML of the new <span></span>
.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Create a span element.\n let span = createSpan('p5*js');\n span.position(25, 35);\n\n describe('A gray square with the text \"p5*js\" written in its center.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n // Create a div element as\n // a container.\n let div = createDiv();\n // Place the div at the\n // center.\n div.position(25, 35);\n\n // Create a span element.\n let s1 = createSpan('p5');\n // Create a second span element.\n let s2 = createSpan('*');\n // Set the span's font color.\n s2.style('color', 'deeppink');\n // Create a third span element.\n let s3 = createSpan('js');\n\n // Add all the spans to the\n // container div.\n s1.parent(div);\n s2.parent(div);\n s3.parent(div);\n\n describe('A gray square with the text \"p5*js\" written in black at its center. The asterisk is pink.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "html",
+ "description": "inner HTML for the new <span></span>
element.",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createImg",
+ "file": "src/dom/dom.js",
+ "line": 633,
+ "itemtype": "method",
+ "description": "Creates an <img>
element that can appear outside of the canvas.
\nThe first parameter, src
, is a string with the path to the image file.\nsrc
should be a relative path, as in 'assets/image.png'
, or a URL, as\nin 'https://example.com/image.png'
.
\nThe second parameter, alt
, is a string with the\nalternate text\nfor the image. An empty string ''
can be used for images that aren't displayed.
\nThe third parameter, crossOrigin
, is optional. It's a string that sets the\ncrossOrigin property\nof the image. Use 'anonymous'
or 'use-credentials'
to fetch the image\nwith cross-origin access.
\nThe fourth parameter, callback
, is also optional. It sets a function to\ncall after the image loads. The new image is passed to the callback\nfunction as a p5.Element object.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n let img = createImg(\n 'https://p5js.org/assets/img/asterisk-01.png',\n 'The p5.js magenta asterisk.'\n );\n img.position(0, -10);\n\n describe('A gray square with a magenta asterisk in its center.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "src",
+ "description": "relative path or URL for the image.",
+ "type": "String"
+ },
+ {
+ "name": "alt",
+ "description": "alternate text for the image.",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "src",
+ "type": "String"
+ },
+ {
+ "name": "alt",
+ "type": "String"
+ },
+ {
+ "name": "crossOrigin",
+ "description": "crossOrigin property to use when fetching the image.",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "successCallback",
+ "description": "function to call once the image loads. The new image will be passed\nto the function as a p5.Element object.",
+ "optional": 1,
+ "type": "Function"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createA",
+ "file": "src/dom/dom.js",
+ "line": 706,
+ "itemtype": "method",
+ "description": "Creates an <a></a>
element that links to another web page.
\nThe first parmeter, href
, is a string that sets the URL of the linked\npage.
\nThe second parameter, html
, is a string that sets the inner HTML of the\nlink. It's common to use text, images, or buttons as links.
\nThe third parameter, target
, is optional. It's a string that tells the\nweb browser where to open the link. By default, links open in the current\nbrowser tab. Passing '_blank'
will cause the link to open in a new\nbrowser tab. MDN describes a few\nother options.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Create an anchor element that links to p5js.org.\n let a = createA('https://p5js.org/', 'p5*js');\n a.position(25, 35);\n\n describe('The text \"p5*js\" written at the center of a gray square.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n // Create an anchor element that links to p5js.org.\n // Open the link in a new tab.\n let a = createA('https://p5js.org/', 'p5*js', '_blank');\n a.position(25, 35);\n\n describe('The text \"p5*js\" written at the center of a gray square.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "href",
+ "description": "URL of linked page.",
+ "type": "String"
+ },
+ {
+ "name": "html",
+ "description": "inner HTML of link element to display.",
+ "type": "String"
+ },
+ {
+ "name": "target",
+ "description": "target where the new link should open,\neither '_blank'
, '_self'
, '_parent'
, or '_top'
.",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createSlider",
+ "file": "src/dom/dom.js",
+ "line": 827,
+ "itemtype": "method",
+ "description": "Creates a slider <input></input>
element. Range sliders are\nuseful for quickly selecting numbers from a given range.
\nThe first two parameters, min
and max
, are numbers that set the\nslider's minimum and maximum.
\nThe third parameter, value
, is optional. It's a number that sets the\nslider's default value.
\nThe fourth parameter, step
, is also optional. It's a number that sets the\nspacing between each value in the slider's range. Setting step
to 0\nallows the slider to move smoothly from min
to max
.
\n",
+ "example": [
+ "\n\nlet slider;\n\nfunction setup() {\n // Create a slider and place it at the top of the canvas.\n slider = createSlider(0, 255);\n slider.position(10, 10);\n slider.size(80);\n\n describe('A dark gray square with a range slider at the top. The square changes color when the slider is moved.');\n}\n\nfunction draw() {\n // Use the slider as a grayscale value.\n let g = slider.value();\n background(g);\n}\n
\n\n\n\n\nlet slider;\n\nfunction setup() {\n // Create a slider and place it at the top of the canvas.\n // Set its default value to 0.\n slider = createSlider(0, 255, 0);\n slider.position(10, 10);\n slider.size(80);\n\n describe('A black square with a range slider at the top. The square changes color when the slider is moved.');\n}\n\nfunction draw() {\n // Use the slider as a grayscale value.\n let g = slider.value();\n background(g);\n}\n
\n\n\n\n\nlet slider;\n\nfunction setup() {\n // Create a slider and place it at the top of the canvas.\n // Set its default value to 0.\n // Set its step size to 50.\n slider = createSlider(0, 255, 0, 50);\n slider.position(10, 10);\n slider.size(80);\n\n describe('A black square with a range slider at the top. The square changes color when the slider is moved.');\n}\n\nfunction draw() {\n // Use the slider as a grayscale value.\n let g = slider.value();\n background(g);\n}\n
\n\n\n\n\nlet slider;\n\nfunction setup() {\n // Create a slider and place it at the top of the canvas.\n // Set its default value to 0.\n // Set its step size to 0 so that it moves smoothly.\n slider = createSlider(0, 255, 0, 0);\n slider.position(10, 10);\n slider.size(80);\n\n describe('A black square with a range slider at the top. The square changes color when the slider is moved.');\n}\n\nfunction draw() {\n // Use the slider as a grayscale value.\n let g = slider.value();\n background(g);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "min",
+ "description": "minimum value of the slider.",
+ "type": "Number"
+ },
+ {
+ "name": "max",
+ "description": "maximum value of the slider.",
+ "type": "Number"
+ },
+ {
+ "name": "value",
+ "description": "default value of the slider.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "step",
+ "description": "size for each step in the slider's range.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createButton",
+ "file": "src/dom/dom.js",
+ "line": 906,
+ "itemtype": "method",
+ "description": "Creates a <button></button>
element.
\nThe first parameter, label
, is a string that sets the label displayed on\nthe button.
\nThe second parameter, value
, is optional. It's a string that sets the\nbutton's value. See\nMDN\nfor more details.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Create a button and place it beneath the canvas.\n let button = createButton('click me');\n button.position(0, 100);\n\n // Use the button to change the background color.\n button.mousePressed(() => {\n let g = random(255);\n background(g);\n });\n\n describe('A gray square with a button that says \"click me\" beneath it. The square changes color when the button is clicked.');\n}\n
\n\n\n\n\nlet button;\n\nfunction setup() {\n // Create a button and set its value to 0.\n // Place the button beneath the canvas.\n button = createButton('click me', 'red');\n button.position(0, 100);\n\n // Change the button's value when the mouse\n // is pressed.\n button.mousePressed(() => {\n let c = random(['red', 'green', 'blue', 'yellow']);\n button.value(c);\n });\n\n describe('A red square with a button that says \"click me\" beneath it. The square changes color when the button is clicked.');\n}\n\nfunction draw() {\n // Use the button's value to set the background color.\n let c = button.value();\n background(c);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "label",
+ "description": "label displayed on the button.",
+ "type": "String"
+ },
+ {
+ "name": "value",
+ "description": "value of the button.",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createCheckbox",
+ "file": "src/dom/dom.js",
+ "line": 1002,
+ "itemtype": "method",
+ "description": "Creates a checkbox <input></input>
element. Checkboxes extend\nthe p5.Element class with a checked()
method.\nCalling myBox.checked()
returns true
if it the box is checked and\nfalse
otherwise.
\nThe first parameter, label
, is optional. It's a string that sets the label\nto display next to the checkbox.
\nThe second parameter, value
, is also optional. It's a boolean that sets the\ncheckbox's value.
\n",
+ "example": [
+ "\n\nlet checkbox;\n\nfunction setup() {\n // Create a checkbox and place it beneath the canvas.\n checkbox = createCheckbox();\n checkbox.position(0, 100);\n\n describe('A black square with a checkbox beneath it. The square turns white when the box is checked.');\n}\n\nfunction draw() {\n // Use the checkbox to set the background color.\n if (checkbox.checked()) {\n background(255);\n } else {\n background(0);\n }\n}\n
\n\n\n\n\nlet checkbox;\n\nfunction setup() {\n // Create a checkbox and place it beneath the canvas.\n // Label the checkbox \"white\".\n checkbox = createCheckbox(' white');\n checkbox.position(0, 100);\n\n describe('A black square with a checkbox labeled \"white\" beneath it. The square turns white when the box is checked.');\n}\n\nfunction draw() {\n // Use the checkbox to set the background color.\n if (checkbox.checked()) {\n background(255);\n } else {\n background(0);\n }\n}\n
\n\n\n\n\nlet checkbox;\n\nfunction setup() {\n // Create a checkbox and place it beneath the canvas.\n // Label the checkbox \"white\" and set its value to true.\n checkbox = createCheckbox(' white', true);\n checkbox.position(0, 100);\n\n describe('A white square with a checkbox labeled \"white\" beneath it. The square turns black when the box is unchecked.');\n}\n\nfunction draw() {\n // Use the checkbox to set the background color.\n if (checkbox.checked()) {\n background(255);\n } else {\n background(0);\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "label",
+ "description": "label displayed after the checkbox.",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "value",
+ "description": "value of the checkbox. Checked is true
and unchecked is false
.",
+ "optional": 1,
+ "type": "boolean"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createSelect",
+ "file": "src/dom/dom.js",
+ "line": 1214,
+ "itemtype": "method",
+ "description": "Creates a dropdown menu <select></select>
element.
\nThe parameter is optional. If true
is passed, as in\nlet mySelect = createSelect(true)
, then the dropdown will support\nmultiple selections. If an existing <select></select>
element\nis passed, as in let mySelect = createSelect(otherSelect)
, the existing\nelement will be wrapped in a new p5.Element\nobject.
\nDropdowns extend the p5.Element class with a few\nhelpful methods for managing options:
\nmySelect.option(name, [value])
adds an option to the menu. The first paremeter, name
, is a string that sets the option's name and value. The second parameter, value
, is optional. If provided, it sets the value that corresponds to the key name
. If an option with name
already exists, its value is changed to value
.mySelect.value()
returns the currently-selected option's value.mySelect.selected()
returns the currently-selected option.mySelect.selected(option)
selects the given option by default.mySelect.disable()
marks the whole dropdown element as disabled.mySelect.disable(option)
marks a given option as disabled.mySelect.enable()
marks the whole dropdown element as enabled.mySelect.enable(option)
marks a given option as enabled.
",
+ "example": [
+ "\n\nlet mySelect;\n\nfunction setup() {\n // Create a dropdown and place it beneath the canvas.\n mySelect = createSelect();\n mySelect.position(0, 100);\n\n // Add color options.\n mySelect.option('red');\n mySelect.option('green');\n mySelect.option('blue');\n mySelect.option('yellow');\n\n // Set the selected option to \"red\".\n mySelect.selected('red');\n\n describe('A red square with a dropdown menu beneath it. The square changes color when a new color is selected.');\n}\n\nfunction draw() {\n // Use the selected value to paint the background.\n let c = mySelect.selected();\n background(c);\n}\n
\n\n\n\n\nlet mySelect;\n\nfunction setup() {\n // Create a dropdown and place it beneath the canvas.\n mySelect = createSelect();\n mySelect.position(0, 100);\n\n // Add color options.\n mySelect.option('red');\n mySelect.option('green');\n mySelect.option('blue');\n mySelect.option('yellow');\n\n // Set the selected option to \"red\".\n mySelect.selected('red');\n\n // Disable the \"yellow\" option.\n mySelect.disable('yellow');\n\n describe('A red square with a dropdown menu beneath it. The square changes color when a new color is selected.');\n}\n\nfunction draw() {\n // Use the selected value to paint the background.\n let c = mySelect.selected();\n background(c);\n}\n
\n\n\n\n\nlet mySelect;\n\nfunction setup() {\n // Create a dropdown and place it beneath the canvas.\n mySelect = createSelect();\n mySelect.position(0, 100);\n\n // Add color options with names and values.\n mySelect.option('one', 'red');\n mySelect.option('two', 'green');\n mySelect.option('three', 'blue');\n mySelect.option('four', 'yellow');\n\n // Set the selected option to \"one\".\n mySelect.selected('one');\n\n describe('A red square with a dropdown menu beneath it. The square changes color when a new color is selected.');\n}\n\nfunction draw() {\n // Use the selected value to paint the background.\n let c = mySelect.selected();\n background(c);\n}\n
\n\n\n\n\n// Hold CTRL to select multiple options on Windows and Linux.\n// Hold CMD to select multiple options on macOS.\nlet mySelect;\n\nfunction setup() {\n // Create a dropdown and allow multiple selections.\n // Place it beneath the canvas.\n mySelect = createSelect(true);\n mySelect.position(0, 100);\n\n // Add color options.\n mySelect.option('red');\n mySelect.option('green');\n mySelect.option('blue');\n mySelect.option('yellow');\n\n describe('A gray square with a dropdown menu beneath it. Colorful circles appear when their color is selected.');\n}\n\nfunction draw() {\n background(200);\n\n // Use the selected value(s) to draw circles.\n let colors = mySelect.selected();\n colors.forEach((c, index) => {\n let x = 10 + index * 20;\n fill(c);\n circle(x, 50, 20);\n });\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "multiple",
+ "description": "support multiple selections.",
+ "optional": 1,
+ "type": "boolean"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "existing",
+ "description": "select element to wrap, either as a p5.Element or\na HTMLSelectElement.",
+ "type": "Object"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createRadio",
+ "file": "src/dom/dom.js",
+ "line": 1456,
+ "itemtype": "method",
+ "description": "Creates a radio button element.
\nThe parameter is optional. If a string is passed, as in\nlet myRadio = createSelect('food')
, then each radio option will\nhave \"food\"
as its name
parameter: <input name=\"food\"></input>
.\nIf an existing <div></div>
or <span></span>
\nelement is passed, as in let myRadio = createSelect(container)
, it will\nbecome the radio button's parent element.
\nRadio buttons extend the p5.Element class with a few\nhelpful methods for managing options:
\nmyRadio.option(value, [label])
adds an option to the menu. The first paremeter, value
, is a string that sets the option's value and label. The second parameter, label
, is optional. If provided, it sets the label displayed for the value
. If an option with value
already exists, its label is changed and its value is returned.myRadio.value()
returns the currently-selected option's value.myRadio.selected()
returns the currently-selected option.myRadio.selected(value)
selects the given option and returns it as an HTMLInputElement
.myRadio.disable(shouldDisable)
enables the entire radio button if true
is passed and disables it if false
is passed.
",
+ "example": [
+ "\n\nlet myRadio;\n\nfunction setup() {\n // Create a radio button element and place it\n // in the top-left corner.\n myRadio = createRadio();\n myRadio.position(0, 0);\n myRadio.size(60);\n\n // Add a few color options.\n myRadio.option('red');\n myRadio.option('yellow');\n myRadio.option('blue');\n\n // Choose a default option.\n myRadio.selected('yellow');\n\n describe('A yellow square with three color options listed, \"red\", \"yellow\", and \"blue\". The square changes color when the user selects a new option.');\n}\n\nfunction draw() {\n // Set the background color using the radio button.\n let g = myRadio.value();\n background(g);\n}\n
\n\n\n\n\nlet myRadio;\n\nfunction setup() {\n // Create a radio button element and place it\n // in the top-left corner.\n myRadio = createRadio();\n myRadio.position(0, 0);\n myRadio.size(50);\n\n // Add a few color options.\n // Color values are labeled with\n // emotions they evoke.\n myRadio.option('red', 'love');\n myRadio.option('yellow', 'joy');\n myRadio.option('blue', 'trust');\n\n // Choose a default option.\n myRadio.selected('yellow');\n\n describe('A yellow square with three options listed, \"love\", \"joy\", and \"trust\". The square changes color when the user selects a new option.');\n}\n\nfunction draw() {\n // Set the background color using the radio button.\n let c = myRadio.value();\n background(c);\n}\n
\n\n\n\n\nlet myRadio;\n\nfunction setup() {\n // Create a radio button element and place it\n // in the top-left corner.\n myRadio = createRadio();\n myRadio.position(0, 0);\n myRadio.size(50);\n\n // Add a few color options.\n myRadio.option('red');\n myRadio.option('yellow');\n myRadio.option('blue');\n\n // Choose a default option.\n myRadio.selected('yellow');\n\n // Create a button and place it beneath the canvas.\n let btn = createButton('disable');\n btn.position(0, 100);\n\n // Use the button to disable the radio button.\n btn.mousePressed(() => {\n myRadio.disable(true);\n });\n\n describe('A yellow square with three options listed, \"red\", \"yellow\", and \"blue\". The square changes color when the user selects a new option. A \"disable\" button beneath the canvas disables the color options when pressed.');\n}\n\nfunction draw() {\n // Set the background color using the radio button.\n let c = myRadio.value();\n background(c);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "containerElement",
+ "description": "container HTML Element, either a <div></div>
\nor <span></span>
.",
+ "optional": 1,
+ "type": "Object"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "name",
+ "description": "name parameter assigned to each option's <input></input>
element.",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createColorPicker",
+ "file": "src/dom/dom.js",
+ "line": 1672,
+ "itemtype": "method",
+ "description": "Creates a color picker element.
\nThe parameter, value
, is optional. If a color string or\np5.Color object is passed, it will set the default\ncolor.
\nColor pickers extend the p5.Element class with a\ncouple of helpful methods for managing colors:
\nmyPicker.value()
returns the current color as a hex string in the format '#rrggbb'
.myPicker.color()
returns the current color as a p5.Color object.
",
+ "example": [
+ "\n\nlet myPicker;\n\nfunction setup() {\n myPicker = createColorPicker('deeppink');\n myPicker.position(0, 100);\n\n describe('A pink square with a color picker beneath it. The square changes color when the user picks a new color.');\n}\n\nfunction draw() {\n // Use the color picker to paint the background.\n let c = myPicker.color();\n background(c);\n}\n
\n\n\n\n\nlet myPicker;\n\nfunction setup() {\n myPicker = createColorPicker('deeppink');\n myPicker.position(0, 100);\n\n describe('A number with the format \"#rrggbb\" is displayed on a pink canvas. The background color and number change when the user picks a new color.');\n}\n\nfunction draw() {\n // Use the color picker to paint the background.\n let c = myPicker.value();\n background(c);\n\n // Display the current color as a hex string.\n text(c, 25, 55);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "default color as a CSS color string.",
+ "optional": 1,
+ "type": "String|p5.Color"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createInput",
+ "file": "src/dom/dom.js",
+ "line": 1777,
+ "itemtype": "method",
+ "description": "Creates a text <input></input>
element. Call myInput.size()
\nto set the length of the text box.
\nThe first parameter, value
, is optional. It's a string that sets the\ninput's default value. The input is blank by default.
\nThe second parameter, type
, is also optional. It's a string that\nspecifies the type of text being input. See MDN for a full\nlist of options.\nThe default is 'text'
.
\n",
+ "example": [
+ "\n\nlet myInput;\n\nfunction setup() {\n // Create an input element and place it\n // beneath the canvas.\n myInput = createInput();\n myInput.position(0, 100);\n\n describe('A gray square with a text box beneath it. The text in the square changes when the user types something new in the input bar.');\n}\n\nfunction draw() {\n background(200);\n\n // Use the input to display a message.\n let msg = myInput.value();\n text(msg, 25, 55);\n}\n
\n\n\n\n\nlet myInput;\n\nfunction setup() {\n // Create an input element and place it\n // beneath the canvas. Set its default\n // text to \"hello!\".\n myInput = createInput('hello!');\n myInput.position(0, 100);\n\n describe('The text \"hello!\" written at the center of a gray square. A text box beneath the square also says \"hello!\". The text in the square changes when the user types something new in the input bar.');\n}\n\nfunction draw() {\n background(200);\n\n // Use the input to display a message.\n let msg = myInput.value();\n text(msg, 25, 55);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "default value of the input box. Defaults to an empty string ''
.",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "type",
+ "description": "type of input. Defaults to 'text'
.",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createFileInput",
+ "file": "src/dom/dom.js",
+ "line": 1879,
+ "itemtype": "method",
+ "description": "Creates an <input></input>
element of type 'file'
.\nThis allows users to select local files for use in a sketch.
\nThe first parameter, callback
, is a function that's called when the file\nloads. The callback function should have one parameter, file
, that's a\np5.File object.
\nThe second parameter, multiple
, is optional. It's a boolean value that\nallows loading multiple files if set to true
. If true
, callback
\nwill be called once per file.
\n",
+ "example": [
+ "\n\n// Use the file input to select an image to\n// load and display.\nlet input;\nlet img;\n\nfunction setup() {\n // Create a file input and place it beneath\n // the canvas.\n input = createFileInput(handleImage);\n input.position(0, 100);\n\n describe('A gray square with a file input beneath it. If the user selects an image file to load, it is displayed on the square.');\n}\n\nfunction draw() {\n background(200);\n\n // Draw the image if loaded.\n if (img) {\n image(img, 0, 0, width, height);\n }\n}\n\n// Create an image if the file is an image.\nfunction handleImage(file) {\n if (file.type === 'image') {\n img = createImg(file.data, '');\n img.hide();\n } else {\n img = null;\n }\n}\n
\n\n\n\n\n// Use the file input to select multiple images\n// to load and display.\nlet input;\nlet images = [];\n\nfunction setup() {\n // Create a file input and place it beneath\n // the canvas. Allow it to load multiple files.\n input = createFileInput(handleImage, true);\n input.position(0, 100);\n}\n\nfunction draw() {\n background(200);\n\n // Draw the images if loaded. Each image\n // is drawn 20 pixels lower than the\n // previous image.\n images.forEach((img, index) => {\n let y = index * 20;\n image(img, 0, y, width, height);\n });\n\n describe('A gray square with a file input beneath it. If the user selects multiple image files to load, they are displayed on the square.');\n}\n\n// Create an image if the file is an image,\n// then add it to the images array.\nfunction handleImage(file) {\n if (file.type === 'image') {\n let img = createImg(file.data, '');\n img.hide();\n images.push(img);\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "callback",
+ "description": "function to call once the file loads.",
+ "type": "Function"
+ },
+ {
+ "name": "multiple",
+ "description": "allow multiple files to be selected.",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createMedia",
+ "file": "src/dom/dom.js",
+ "line": 1906,
+ "itemtype": "method",
+ "description": "VIDEO STUFF *",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createVideo",
+ "file": "src/dom/dom.js",
+ "line": 2036,
+ "itemtype": "method",
+ "description": "Creates a <video>
element for simple audio/video playback.\nReturns a new p5.MediaElement object.
\nVideos are shown by default. They can be hidden by calling video.hide()
\nand drawn to the canvas using image().
\nThe first parameter, src
, is the path the video. If a single string is\npassed, as in 'assets/topsecret.mp4'
, a single video is loaded. An array\nof strings can be used to load the same video in different formats. For\nexample, ['assets/topsecret.mp4', 'assets/topsecret.ogv', 'assets/topsecret.webm']
.\nThis is useful for ensuring that the video can play across different browsers with\ndifferent capabilities. See\nMDN\nfor more information about supported formats.
\nThe second parameter, callback
, is optional. It's a function to call once\nthe video is ready to play.
\n",
+ "example": [
+ "\n\nfunction setup() {\n noCanvas();\n\n // Load a video and add it to the page.\n // Note: this may not work in some browsers.\n let video = createVideo('assets/small.mp4');\n // Show the default video controls.\n video.showControls();\n\n describe('A video of a toy robot with playback controls beneath it.');\n}\n
\n\n\n\n\nfunction setup() {\n noCanvas();\n\n // Load a video and add it to the page.\n // Provide an array options for different file formats.\n let video = createVideo(\n ['assets/small.mp4', 'assets/small.ogv', 'assets/small.webm']\n );\n // Show the default video controls.\n video.showControls();\n\n describe('A video of a toy robot with playback controls beneath it.');\n}\n
\n\n\n\n\nlet video;\n\nfunction setup() {\n noCanvas();\n\n // Load a video and add it to the page.\n // Provide an array options for different file formats.\n // Call mute() once the video loads.\n video = createVideo(\n ['assets/small.mp4', 'assets/small.ogv', 'assets/small.webm'],\n muteVideo\n );\n // Show the default video controls.\n video.showControls();\n\n describe('A video of a toy robot with playback controls beneath it.');\n}\n\n// Mute the video once it loads.\nfunction muteVideo() {\n video.volume(0);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "src",
+ "description": "path to a video file, or an array of paths for\nsupporting different browsers.",
+ "type": "String|String[]"
+ },
+ {
+ "name": "callback",
+ "description": "function to call once the video is ready to play.",
+ "optional": 1,
+ "type": "Function"
+ }
+ ],
+ "return": {
+ "description": "new p5.MediaElement object.",
+ "type": "p5.MediaElement"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.MediaElement object.",
+ "type": "p5.MediaElement"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createAudio",
+ "file": "src/dom/dom.js",
+ "line": 2080,
+ "itemtype": "method",
+ "description": "Creates a hidden <audio>
element for simple audio playback.\nReturns a new p5.MediaElement object.
\nThe first parameter, src
, is the path the video. If a single string is\npassed, as in 'assets/video.mp4'
, a single video is loaded. An array\nof strings can be used to load the same video in different formats. For\nexample, ['assets/video.mp4', 'assets/video.ogv', 'assets/video.webm']
.\nThis is useful for ensuring that the video can play across different\nbrowsers with different capabilities. See\nMDN\nfor more information about supported formats.
\nThe second parameter, callback
, is optional. It's a function to call once\nthe audio is ready to play.
\n",
+ "example": [
+ "\n\nfunction setup() {\n noCanvas();\n\n // Load the audio.\n let beat = createAudio('assets/beat.mp3');\n // Show the default audio controls.\n beat.showControls();\n\n describe('An audio beat plays when the user double-clicks the square.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "src",
+ "description": "path to an audio file, or an array of paths\nfor supporting different browsers.",
+ "optional": 1,
+ "type": "String|String[]"
+ },
+ {
+ "name": "callback",
+ "description": "function to call once the audio is ready to play.",
+ "optional": 1,
+ "type": "Function"
+ }
+ ],
+ "return": {
+ "description": "new p5.MediaElement object.",
+ "type": "p5.MediaElement"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.MediaElement object.",
+ "type": "p5.MediaElement"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createCapture",
+ "file": "src/dom/dom.js",
+ "line": 2212,
+ "itemtype": "method",
+ "description": "Creates a <video>
element that \"captures\" the audio/video stream from\nthe webcam and microphone. Returns a new\np5.Element object.
\nVideos are shown by default. They can be hidden by calling capture.hide()
\nand drawn to the canvas using image().
\nThe first parameter, type
, is optional. It sets the type of capture to\nuse. By default, createCapture()
captures both audio and video. If VIDEO
\nis passed, as in createCapture(VIDEO)
, only video will be captured.\nIf AUDIO
is passed, as in createCapture(AUDIO)
, only audio will be\ncaptured. A constraints object can also be passed to customize the stream.\nSee the \nW3C documentation for possible properties. Different browsers support different\nproperties.
\nThe second parameter, callback
, is optional. It's a function to call once\nthe capture is ready for use. The callback function should have one\nparameter, stream
, that's a\nMediaStream object.
\nNote: createCapture()
only works when running a sketch locally or using HTTPS. Learn more\nhere\nand here.
\n",
+ "example": [
+ "\n\nfunction setup() {\n noCanvas();\n createCapture(VIDEO);\n\n describe('A video stream from the webcam.');\n}\n
\n\n\n\n\nlet capture;\n\nfunction setup() {\n // Create the video capture and hide the element.\n capture = createCapture(VIDEO);\n capture.hide();\n\n describe('A video stream from the webcam with inverted colors.');\n}\n\nfunction draw() {\n // Draw the video capture within the canvas.\n image(capture, 0, 0, width, width * capture.height / capture.width);\n // Invert the colors in the stream.\n filter(INVERT);\n}\n
\n\n\n\n\nfunction setup() {\n createCanvas(480, 120);\n\n // Create a constraints object.\n let constraints = {\n video: {\n mandatory: {\n minWidth: 1280,\n minHeight: 720\n },\n optional: [{ maxFrameRate: 10 }]\n },\n audio: false\n };\n\n // Create the video capture.\n createCapture(constraints);\n\n describe('A video stream from the webcam.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "type",
+ "description": "type of capture, either AUDIO or VIDEO,\nor a constraints object. Both video and audio\naudio streams are captured by default.",
+ "optional": 1,
+ "type": "String|Constant|Object"
+ },
+ {
+ "name": "callback",
+ "description": "function to call once the stream\nhas loaded.",
+ "optional": 1,
+ "type": "Function"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createElement",
+ "file": "src/dom/dom.js",
+ "line": 2311,
+ "itemtype": "method",
+ "description": "Creates a new p5.Element object.
\nThe first parameter, tag
, is a string an HTML tag such as 'h5'
.
\nThe second parameter, content
, is optional. It's a string that sets the\nHTML content to insert into the new element. New elements have no content\nby default.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Create an h5 element with nothing in it.\n createElement('h5');\n\n describe('A gray square.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n // Create an h5 element with the content\n // \"p5*js\".\n let h5 = createElement('h5', 'p5*js');\n // Set the element's style and position.\n h5.style('color', 'deeppink');\n h5.position(30, 15);\n\n describe('The text \"p5*js\" written in pink in the middle of a gray square.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "tag",
+ "description": "tag for the new element.",
+ "type": "String"
+ },
+ {
+ "name": "content",
+ "description": "HTML content to insert into the element.",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Element object.",
+ "type": "p5.Element"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "addClass",
+ "file": "src/dom/dom.js",
+ "line": 2337,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Adds specified class to the element.",
+ "example": [
+ "\nlet div = createDiv('div');\ndiv.addClass('myClass');\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "class",
+ "description": "name of class to add",
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Element",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "removeClass",
+ "file": "src/dom/dom.js",
+ "line": 2373,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Removes specified class from the element.",
+ "example": [
+ "\n// In this example, a class is set when the div is created\n// and removed when mouse is pressed. This could link up\n// with a CSS style rule to toggle style properties.\n\nlet div;\n\nfunction setup() {\n div = createDiv('div');\n div.addClass('myClass');\n}\n\nfunction mousePressed() {\n div.removeClass('myClass');\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "class",
+ "description": "name of class to remove",
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "hasClass",
+ "file": "src/dom/dom.js",
+ "line": 2404,
+ "itemtype": "method",
+ "description": "Checks if specified class is already applied to element.",
+ "example": [
+ "\nlet div;\n\nfunction setup() {\n div = createDiv('div');\n div.addClass('show');\n}\n\nfunction mousePressed() {\n if (div.hasClass('show')) {\n div.addClass('show');\n } else {\n div.removeClass('show');\n }\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "c",
+ "description": "{String} class name of class to check"
+ }
+ ],
+ "return": {
+ "description": "a boolean value if element has specified class",
+ "type": "boolean"
+ }
+ }
+ ],
+ "return": {
+ "description": "a boolean value if element has specified class",
+ "type": "boolean"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "toggleClass",
+ "file": "src/dom/dom.js",
+ "line": 2429,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Toggles element class.",
+ "example": [
+ "\nlet div;\n\nfunction setup() {\n div = createDiv('div');\n div.addClass('show');\n}\n\nfunction mousePressed() {\n div.toggleClass('show');\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "c",
+ "description": "{String} class name to toggle"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "child",
+ "file": "src/dom/dom.js",
+ "line": 2475,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Attaches the element as a child to the parent specified.\nAccepts either a string ID, DOM node, or p5.Element.\nIf no argument is specified, an array of children DOM nodes is returned.",
+ "example": [
+ "\nlet div0 = createDiv('this is the parent');\nlet div1 = createDiv('this is the child');\ndiv0.child(div1); // use p5.Element\n
\n\nlet div0 = createDiv('this is the parent');\nlet div1 = createDiv('this is the child');\ndiv1.id('apples');\ndiv0.child('apples'); // use id\n
\n\n// this example assumes there is a div already on the page\n// with id \"myChildDiv\"\nlet div0 = createDiv('this is the parent');\nlet elt = document.getElementById('myChildDiv');\ndiv0.child(elt); // use element from page\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "an array of child nodes",
+ "type": "Node[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "child",
+ "description": "the ID, DOM node, or p5.Element\nto add to the current element",
+ "optional": 1,
+ "type": "String|p5.Element"
+ }
+ ]
+ }
+ ],
+ "return": {
+ "description": "an array of child nodes",
+ "type": "Node[]"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "center",
+ "file": "src/dom/dom.js",
+ "line": 2513,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Centers a p5.Element either vertically, horizontally,\nor both, relative to its parent or according to\nthe body if the p5.Element has no parent. If no argument is passed\nthe p5.Element is aligned both vertically and horizontally.",
+ "example": [
+ "\nfunction setup() {\n let div = createDiv('').size(10, 10);\n div.style('background-color', 'orange');\n div.center();\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "align",
+ "description": "passing 'vertical', 'horizontal' aligns element accordingly",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "html",
+ "file": "src/dom/dom.js",
+ "line": 2572,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "If an argument is given, sets the inner HTML of the element,\nreplacing any existing HTML. If true is included as a second\nargument, HTML is appended instead of replacing existing HTML.\nIf no arguments are given, returns\nthe inner HTML of the element.",
+ "example": [
+ "\nlet div = createDiv('').size(100, 100);\ndiv.html('hi');\n
\n\nlet div = createDiv('Hello ').size(100, 100);\ndiv.html('World', true);\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "the inner HTML of the element",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "html",
+ "description": "the HTML to be placed inside the element",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "append",
+ "description": "whether to append HTML to existing",
+ "optional": 1,
+ "type": "boolean"
+ }
+ ]
+ }
+ ],
+ "return": {
+ "description": "the inner HTML of the element",
+ "type": "String"
+ },
+ "class": "p5.Element",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "position",
+ "file": "src/dom/dom.js",
+ "line": 2624,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the position of the element. If no position type argument is given, the\nposition will be relative to (0, 0) of the window.\nEssentially, this sets position:absolute and left and top\nproperties of style. If an optional third argument specifying position type is given,\nthe x and y-coordinates will be interpreted based on the positioning scheme.\nIf no arguments given, the function returns the x and y position of the element.
\nfound documentation on how to be more specific with object type\nhttps://stackoverflow.com/questions/14714314/how-do-i-comment-object-literals-in-yuidoc
\n",
+ "example": [
+ "\nfunction setup() {\n let cnv = createCanvas(100, 100);\n // positions canvas 50px to the right and 100px\n // below upper left corner of the window\n cnv.position(50, 100);\n}\n
\n\nfunction setup() {\n let cnv = createCanvas(100, 100);\n // positions canvas at upper left corner of the window\n // with a 'fixed' position type\n cnv.position(0, 0, 'fixed');\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "object of form { x: 0, y: 0 } containing the position of the element in an object",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-position relative to upper left of window (optional)",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-position relative to upper left of window (optional)",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "positionType",
+ "description": "it can be static, fixed, relative, sticky, initial or inherit (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "return": {
+ "description": "object of form { x: 0, y: 0 } containing the position of the element in an object",
+ "type": "Object"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "style",
+ "file": "src/dom/dom.js",
+ "line": 2809,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Applies a style to an element by adding a\nCSS declaration.
\nThe first parameter, property
, is a string. If the name of a style\nproperty is passed, as in myElement.style('color')
, the method returns\nthe current value as a string or null
if it hasn't been set. If a\nproperty:style
string is passed, as in\nmyElement.style('color:deeppink')
, the method sets property
to\nvalue
.
\nThe second parameter, value
, is optional. It sets the property's value.\nvalue
can be a string, as in\nmyElement.style('color', 'deeppink')
, or a\np5.Color object, as in\nmyElement.style('color', myColor)
.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Create a paragraph element and\n // set its font color to \"deeppink\".\n let p = createP('p5*js');\n p.position(25, 20);\n p.style('color', 'deeppink');\n\n describe('The text p5*js written in pink on a gray background.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n // Create a p5.Color object.\n let c = color('deeppink');\n\n // Create a paragraph element and\n // set its font color using a\n // p5.Color object.\n let p = createP('p5*js');\n p.position(25, 20);\n p.style('color', c);\n\n describe('The text p5*js written in pink on a gray background.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n // Create a paragraph element and\n // set its font color to \"deeppink\"\n // using property:value syntax.\n let p = createP('p5*js');\n p.position(25, 20);\n p.style('color:deeppink');\n\n describe('The text p5*js written in pink on a gray background.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n // Create an empty paragraph element\n // and set its font color to \"deeppink\".\n let p = createP();\n p.position(5, 5);\n p.style('color', 'deeppink');\n\n // Get the element's color as an\n // RGB color string.\n let c = p.style('color');\n\n // Set the element's inner HTML\n // using the RGB color string.\n p.html(c);\n\n describe('The text \"rgb(255, 20, 147)\" written in pink on a gray background.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "property",
+ "description": "style property to set.",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "value of the property.",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "property",
+ "type": "String"
+ },
+ {
+ "name": "value",
+ "description": "value to assign to the property.",
+ "type": "String|p5.Color"
+ }
+ ],
+ "return": {
+ "description": "value of the property.",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "value of the property.",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "attribute",
+ "file": "src/dom/dom.js",
+ "line": 2925,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Adds an\nattribute\nto the element. This method is useful for advanced tasks.
\nMost commonly-used attributes, such as id
, can be set with their\ndedicated methods. For example, nextButton.id('next')
sets an element's\nid
attribute.
\nThe first parameter, attr
, is the attribute's name as a string. Calling\nmyElement.attribute('align')
returns the attribute's current value as a\nstring or null
if it hasn't been set.
\nThe second parameter, value
, is optional. It's a string used to set the\nattribute's value. For example, calling\nmyElement.attribute('align', 'center')
sets the element's horizontal\nalignment to center
.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Create a container div and\n // place it at the top-left\n // corner.\n let container = createDiv();\n container.position(0, 0);\n\n // Create a paragraph element\n // and place it within the container.\n // Set its horizontal alignment to\n // \"left\".\n let p1 = createP('hi');\n p1.parent(container);\n p1.attribute('align', 'left');\n\n // Create a paragraph element\n // and place it within the container.\n // Set its horizontal alignment to\n // \"center\".\n let p2 = createP('hi');\n p2.parent(container);\n p2.attribute('align', 'center');\n\n // Create a paragraph element\n // and place it within the container.\n // Set its horizontal alignment to\n // \"right\".\n let p3 = createP('hi');\n p3.parent(container);\n p3.attribute('align', 'right');\n\n describe('A gray square with the text \"hi\" written on three separate lines, each placed further to the right.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "value of the attribute.",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "attr",
+ "description": "attribute to set.",
+ "type": "String"
+ },
+ {
+ "name": "value",
+ "description": "value to assign to the attribute.",
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "return": {
+ "description": "value of the attribute.",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "removeAttribute",
+ "file": "src/dom/dom.js",
+ "line": 2983,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Removes an attribute from the element.
\nThe parameter attr
is the attribute's name as a string. For example,\ncalling myElement.removeAttribute('align')
removes its align
\nattribute if it's been set.
\n",
+ "example": [
+ "\n\nlet p;\n\nfunction setup() {\n background(200);\n\n // Create a paragraph element and place it\n // in the center of the canvas.\n // Set its \"align\" attribute to \"center\".\n p = createP('hi');\n p.position(0, 20);\n p.attribute('align', 'center');\n\n describe('The text \"hi\" written in black at the center of a gray square. The text moves to the left edge when double-clicked.');\n}\n\nfunction doubleClicked() {\n p.removeAttribute('align');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "attr",
+ "description": "attribute to remove.",
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "value",
+ "file": "src/dom/dom.js",
+ "line": 3066,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Returns or sets the element's value.
\nCalling myElement.value()
returns the element's current value.
\nThe parameter, value
, is an optional number or string. If provided,\nas in myElement.value(123)
, it's used to set the element's value.
\n",
+ "example": [
+ "\n\nlet inp;\n\nfunction setup() {\n // Create a text input and place it\n // beneath the canvas. Set its default\n // value to \"hello\".\n inp = createInput('hello');\n inp.position(0, 100);\n\n describe('The text from an input box is displayed on a gray square.');\n}\n\nfunction draw() {\n background(200);\n\n // Use the input's value to display a message.\n let msg = inp.value();\n text(msg, 0, 55);\n}\n
\n\n\n\n\nlet inp;\n\nfunction setup() {\n // Create a text input and place it\n // beneath the canvas. Set its default\n // value to \"hello\".\n inp = createInput('hello');\n inp.position(0, 100);\n\n describe('The text from an input box is displayed on a gray square. The text resets to \"hello\" when the user double-clicks the square.');\n}\n\nfunction draw() {\n background(200);\n\n // Use the input's value to display a message.\n let msg = inp.value();\n text(msg, 0, 55);\n}\n\n// Reset the input's value.\nfunction doubleClicked() {\n inp.value('hello');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "value of the element.",
+ "type": "String|Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "type": "String|Number"
+ }
+ ]
+ }
+ ],
+ "return": {
+ "description": "value of the element.",
+ "type": "String|Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "show",
+ "file": "src/dom/dom.js",
+ "line": 3105,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Shows the current element.",
+ "example": [
+ "\n\nlet p;\n\nfunction setup() {\n background(200);\n\n // Create a paragraph element and hide it.\n p = createP('p5*js');\n p.position(10, 10);\n p.hide();\n\n describe('A gray square. The text \"p5*js\" appears when the user double-clicks the square.');\n}\n\n// Show the paragraph when double-clicked.\nfunction doubleClicked() {\n p.show();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "hide",
+ "file": "src/dom/dom.js",
+ "line": 3135,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Hides the current element.",
+ "example": [
+ "let p;\n\nfunction setup() {\n background(200);\n\n // Create a paragraph element.\n p = createP('p5*js');\n p.position(10, 10);\n\n describe('The text \"p5*js\" at the center of a gray square. The text disappears when the user double-clicks the square.');\n}\n\n// Hide the paragraph when double-clicked.\nfunction doubleClicked() {\n p.hide();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "size",
+ "file": "src/dom/dom.js",
+ "line": 3250,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the element's width and height.
\nCalling myElement.size()
without an argument returns the element's size\nas an object with the properties width
and height
. For example,\n{ width: 20, height: 10 }
.
\nThe first parameter, width
, is optional. It's a number used to set the\nelement's width. Calling myElement.size(10)
\nThe second parameter, 'height, is also optional. It's a\nnumber used to set the element's height. For example, calling\n
myElement.size(20, 10)` sets the element's width to 20 pixels and height\nto 10 pixels.
\nThe constant AUTO
can be used to adjust one dimension at a time while\nmaintaining the aspect ratio, which is width / height
. For example,\nconsider an element that's 200 pixels wide and 100 pixels tall. Calling\nmyElement.size(20, AUTO)
sets the width to 20 pixels and height to 10\npixels.
\nNote: In the case of elements that need to load data, such as images, wait\nto call myElement.size()
until after the data loads.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n // Create a pink div element and place it at\n // the top-left corner.\n let div = createDiv();\n div.position(10, 10);\n div.style('background-color', 'deeppink');\n\n // Set the div's width to 80 pixels and\n // height to 20 pixels.\n div.size(80, 20);\n\n describe('A gray square with a pink rectangle near its top.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n // Create a pink div element and place it at\n // the top-left corner.\n let div = createDiv();\n div.position(10, 10);\n div.style('background-color', 'deeppink');\n\n // Set the div's width to 80 pixels and\n // height to 40 pixels.\n div.size(80, 40);\n\n // Get the div's size as an object.\n let s = div.size();\n // Write the div's dimensions.\n div.html(`${s.width} x ${s.height}`);\n\n describe('A gray square with a pink rectangle near its top. The text \"80 x 40\" is written within the rectangle.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n // Load an image of an astronaut on the moon\n // and place it at the top-left of the canvas.\n let img1 = createImg(\n 'assets/moonwalk.jpg',\n 'An astronaut walking on the moon',\n ''\n );\n img1.position(0, 0);\n\n // Load an image of an astronaut on the moon\n // and place it at the top-left of the canvas.\n // Resize the image once it's loaded.\n let img2 = createImg(\n 'assets/moonwalk.jpg',\n 'An astronaut walking on the moon',\n '',\n () => {\n img2.size(50, AUTO);\n }\n );\n img2.position(0, 0);\n\n describe('A gray square two copies of a space image at the top-left. The copy in front is smaller.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "width and height of the element in an object.",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "w",
+ "description": "width of the element, either AUTO, or a number.",
+ "type": "Number|Constant"
+ },
+ {
+ "name": "h",
+ "description": "height of the element, either AUTO, or a number.",
+ "optional": 1,
+ "type": "Number|Constant"
+ }
+ ]
+ }
+ ],
+ "return": {
+ "description": "width and height of the element in an object.",
+ "type": "Object"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "remove",
+ "file": "src/dom/dom.js",
+ "line": 3326,
+ "itemtype": "method",
+ "description": "Removes the element, stops all audio/video streams, and removes all\ncallback functions.",
+ "example": [
+ "\n\nlet p;\n\nfunction setup() {\n background(200);\n\n // Create a paragraph element.\n p = createP('p5*js');\n p.position(10, 10);\n\n describe('The text \"p5*js\" written at the center of a gray square. ');\n}\n\n// Remove the paragraph when double-clicked.\nfunction doubleClicked() {\n p.remove();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "drop",
+ "file": "src/dom/dom.js",
+ "line": 3466,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets a function to call when the user drops a file on the element.
\nThe first parameter, callback
, is a function to call once the file loads.\nThe callback function should have one parameter, file
, that's a\np5.File object. If the user drops multiple files on\nthe element, callback
, is called once for each file.
\nThe second parameter, fxn
, is a function to call when the browser detects\none or more dropped files. The callback function should have one\nparameter, event
, that's a\nDragEvent.
\n",
+ "example": [
+ "\n\n// Drop an image on the canvas to view\n// this example.\nlet img;\n\nfunction setup() {\n let c = createCanvas(100, 100);\n\n background(200);\n\n // Call a function when a file\n // dropped on the canvas has\n // loaded.\n c.drop(file => {\n // Remove the current image, if any.\n if (img) {\n img.remove();\n }\n\n // Create an
element with the\n // dropped file.\n img = createImg(file.data, '');\n img.hide();\n\n // Draw the image.\n image(img, 0, 0, width, height);\n });\n\n describe('A gray square. When the user drops an image on the square, it is displayed.');\n}\n
\n\n\n\n\n// Drop an image on the canvas to view\n// this example.\nlet img;\nlet msg;\n\nfunction setup() {\n let c = createCanvas(100, 100);\n\n background(200);\n\n // Call functions when the user\n // drops a file on the canvas\n // and when the file loads.\n c.drop(handleFile, handleDrop);\n\n describe('A gray square. When the user drops an image on the square, it is displayed. The id attribute of canvas element is also displayed.');\n}\n\nfunction handleFile(file) {\n // Remove the current image, if any.\n if (img) {\n img.remove();\n }\n\n // Create an
element with the\n // dropped file.\n img = createImg(file.data, '');\n img.hide();\n\n // Draw the image.\n image(img, 0, 0, width, height);\n}\n\nfunction handleDrop(event) {\n // Remove current paragraph, if any.\n if (msg) {\n msg.remove();\n }\n\n // Use event to get the drop\n // target's id.\n let id = event.target.id;\n\n // Write the canvas' id\n // beneath it.\n msg = createP(id);\n msg.position(0, 100);\n\n // Set the font color\n // randomly for each drop.\n let c = random(['red', 'green', 'blue']);\n msg.style('color', c);\n msg.style('font-size', '12px');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "callback",
+ "description": "called when a file loads. Called once for each file dropped.",
+ "type": "Function"
+ },
+ {
+ "name": "fxn",
+ "description": "called once when any files are dropped.",
+ "optional": 1,
+ "type": "Function"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "draggable",
+ "file": "src/dom/dom.js",
+ "line": 3557,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Turns p5.Element into a draggable item. If an argument is given, it will drag that p5.Element instead, ie. drag a entire GUI panel (parent container) with the panel's title bar.",
+ "example": [
+ "\nfunction setup() {\n createCanvas(100, 100);\n background(200);\n\n createDiv('Post-It')\n .position(5, 5)\n .size(75, 20)\n .style('font-size', '16px')\n .style('background', 'yellow')\n .style('color', '#000')\n .style('border', '1px solid #aaaa00')\n .style('padding', '5px')\n .draggable();\n // .style('cursor', 'help') // override cursor\n\n let gui = createDiv('')\n .position(5, 40)\n .size(85, 50)\n .style('font-size', '16px')\n .style('background', 'yellow')\n .style('z-index', '100')\n .style('border', '1px solid #00aaaa');\n\n createDiv('= PANEL =')\n .parent(gui)\n .style('background', 'cyan')\n .style('padding', '2px')\n .style('text-align', 'center')\n .draggable(gui);\n\n createSlider(0, 100, random(100))\n .style('cursor', 'pointer')\n .size(80, 5)\n .parent(gui);\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "elmnt",
+ "description": "pass another p5.Element",
+ "optional": 1,
+ "type": "p5.Element"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "volume",
+ "file": "src/dom/dom.js",
+ "line": 4145,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "",
+ "example": [],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "val",
+ "description": "volume between 0.0 and 1.0.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "setMoveThreshold",
+ "file": "src/events/acceleration.js",
+ "line": 455,
+ "itemtype": "method",
+ "description": "The setMoveThreshold() function is used to set the movement threshold for\nthe deviceMoved() function. The default threshold is set to 0.5.",
+ "example": [
+ "\n\n// Run this example on a mobile device\n// You will need to move the device incrementally further\n// the closer the square's color gets to white in order to change the value.\n\nlet value = 0;\nlet threshold = 0.5;\nfunction setup() {\n setMoveThreshold(threshold);\n}\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe(`50-by-50 black rect in center of canvas.\n turns white on mobile when device moves`);\n}\nfunction deviceMoved() {\n value = value + 5;\n threshold = threshold + 0.1;\n if (value > 255) {\n value = 0;\n threshold = 30;\n }\n setMoveThreshold(threshold);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The threshold value",
+ "type": "number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Events",
+ "submodule": "Acceleration"
+ },
+ {
+ "name": "setShakeThreshold",
+ "file": "src/events/acceleration.js",
+ "line": 497,
+ "itemtype": "method",
+ "description": "The setShakeThreshold() function is used to set the movement threshold for\nthe deviceShaken() function. The default threshold is set to 30.",
+ "example": [
+ "\n\n// Run this example on a mobile device\n// You will need to shake the device more firmly\n// the closer the box's fill gets to white in order to change the value.\n\nlet value = 0;\nlet threshold = 30;\nfunction setup() {\n setShakeThreshold(threshold);\n}\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe(`50-by-50 black rect in center of canvas.\n turns white on mobile when device is being shaked`);\n}\nfunction deviceMoved() {\n value = value + 5;\n threshold = threshold + 5;\n if (value > 255) {\n value = 0;\n threshold = 30;\n }\n setShakeThreshold(threshold);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The threshold value",
+ "type": "number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Events",
+ "submodule": "Acceleration"
+ },
+ {
+ "name": "deviceMoved",
+ "file": "src/events/acceleration.js",
+ "line": 620,
+ "itemtype": "method",
+ "description": "The deviceMoved() function is called when the device is moved by more than\nthe threshold value along X, Y or Z axis. The default threshold is set to 0.5.\nThe threshold value can be changed using setMoveThreshold().",
+ "example": [
+ "\n\n// Run this example on a mobile device\n// Move the device around\n// to change the value.\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe(`50-by-50 black rect in center of canvas.\n turns white on mobile when device moves`);\n}\nfunction deviceMoved() {\n value = value + 5;\n if (value > 255) {\n value = 0;\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Events",
+ "submodule": "Acceleration"
+ },
+ {
+ "name": "deviceTurned",
+ "file": "src/events/acceleration.js",
+ "line": 620,
+ "itemtype": "method",
+ "description": "The deviceTurned() function is called when the device rotates by\nmore than 90 degrees continuously.
\nThe axis that triggers the deviceTurned() method is stored in the turnAxis\nvariable. The deviceTurned() method can be locked to trigger on any axis:\nX, Y or Z by comparing the turnAxis variable to 'X', 'Y' or 'Z'.
\n",
+ "example": [
+ "\n\n// Run this example on a mobile device\n// Rotate the device by 90 degrees\n// to change the value.\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe(`50-by-50 black rect in center of canvas.\n turns white on mobile when device turns`);\n}\nfunction deviceTurned() {\n if (value === 0) {\n value = 255;\n } else if (value === 255) {\n value = 0;\n }\n}\n
\n\n\n\n// Run this example on a mobile device\n// Rotate the device by 90 degrees in the\n// X-axis to change the value.\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe(`50-by-50 black rect in center of canvas.\n turns white on mobile when x-axis turns`);\n}\nfunction deviceTurned() {\n if (turnAxis === 'X') {\n if (value === 0) {\n value = 255;\n } else if (value === 255) {\n value = 0;\n }\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Events",
+ "submodule": "Acceleration"
+ },
+ {
+ "name": "deviceShaken",
+ "file": "src/events/acceleration.js",
+ "line": 620,
+ "itemtype": "method",
+ "description": "The deviceShaken() function is called when the device total acceleration\nchanges of accelerationX and accelerationY values is more than\nthe threshold value. The default threshold is set to 30.\nThe threshold value can be changed using setShakeThreshold().",
+ "example": [
+ "\n\n// Run this example on a mobile device\n// Shake the device to change the value.\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe(`50-by-50 black rect in center of canvas.\n turns white on mobile when device shakes`);\n}\nfunction deviceShaken() {\n value = value + 5;\n if (value > 255) {\n value = 0;\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Events",
+ "submodule": "Acceleration"
+ },
+ {
+ "name": "keyPressed",
+ "file": "src/events/keyboard.js",
+ "line": 167,
+ "itemtype": "method",
+ "description": "The keyPressed() function is called once every time a key is pressed. The\nkeyCode for the key that was pressed is stored in the keyCode variable.
\nFor non-ASCII keys, use the keyCode variable. You can check if the keyCode\nequals BACKSPACE, DELETE, ENTER, RETURN, TAB, ESCAPE, SHIFT, CONTROL,\nOPTION, ALT, UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW.
\nFor ASCII keys, the key that was pressed is stored in the key variable. However, it\ndoes not distinguish between uppercase and lowercase. For this reason, it\nis recommended to use keyTyped() to read the key variable, in which the\ncase of the variable will be distinguished.
\nBecause of how operating systems handle key repeats, holding down a key\nmay cause multiple calls to keyTyped() (and keyReleased() as well). The\nrate of repeat is set by the operating system and how each computer is\nconfigured.
\nBrowsers may have different default\nbehaviors attached to various key events. To prevent any default\nbehavior for this event, add \"return false\" to the end of the method.
\n",
+ "example": [
+ "\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe(`black rect center. turns white when key pressed and black\n when released.`);\n}\nfunction keyPressed() {\n if (value === 0) {\n value = 255;\n } else {\n value = 0;\n }\n}\n
\n\n\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe(`black rect center. turns white when left arrow pressed and\n black when right.`);\n}\nfunction keyPressed() {\n if (keyCode === LEFT_ARROW) {\n value = 255;\n } else if (keyCode === RIGHT_ARROW) {\n value = 0;\n }\n}\n
\n\n\n\nfunction keyPressed() {\n // Do something\n return false; // prevent any default behaviour\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional KeyboardEvent callback argument.",
+ "optional": 1,
+ "type": "KeyboardEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Events",
+ "submodule": "Keyboard"
+ },
+ {
+ "name": "keyReleased",
+ "file": "src/events/keyboard.js",
+ "line": 215,
+ "itemtype": "method",
+ "description": "The keyReleased() function is called once every time a key is released.\nSee key and keyCode for more information.
\nBrowsers may have different default\nbehaviors attached to various key events. To prevent any default\nbehavior for this event, add \"return false\" to the end of the function.",
+ "example": [
+ "\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe(`black rect center. turns white when key pressed and black\n when pressed again`);\n}\nfunction keyReleased() {\n if (value === 0) {\n value = 255;\n } else {\n value = 0;\n }\n return false; // prevent any default behavior\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional KeyboardEvent callback argument.",
+ "optional": 1,
+ "type": "KeyboardEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Events",
+ "submodule": "Keyboard"
+ },
+ {
+ "name": "keyTyped",
+ "file": "src/events/keyboard.js",
+ "line": 275,
+ "itemtype": "method",
+ "description": "The keyTyped() function is called once every time a key is pressed, but\naction keys such as Backspace, Delete, Ctrl, Shift, and Alt are ignored. If you are trying to detect\na keyCode for one of these keys, use the keyPressed() function instead.\nThe most recent key typed will be stored in the key variable.
\nBecause of how operating systems handle key repeats, holding down a key\nwill cause multiple calls to keyTyped() (and keyReleased() as well). The\nrate of repeat is set by the operating system and how each computer is\nconfigured.
\nBrowsers may have different default behaviors attached to various key\nevents. To prevent any default behavior for this event, add \"return false\"\nto the end of the function.
\n",
+ "example": [
+ "\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe(`black rect center. turns white when 'a' key typed and\n black when 'b' pressed`);\n}\nfunction keyTyped() {\n if (key === 'a') {\n value = 255;\n } else if (key === 'b') {\n value = 0;\n }\n // uncomment to prevent any default behavior\n // return false;\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional KeyboardEvent callback argument.",
+ "optional": 1,
+ "type": "KeyboardEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Events",
+ "submodule": "Keyboard"
+ },
+ {
+ "name": "keyIsDown",
+ "file": "src/events/keyboard.js",
+ "line": 372,
+ "itemtype": "method",
+ "description": "The keyIsDown() function checks if the key is currently down, i.e. pressed.\nIt can be used if you have an object that moves, and you want several keys\nto be able to affect its behaviour simultaneously, such as moving a\nsprite diagonally. You can put in any number representing the keyCode of\nthe key, or use any of the variable keyCode names listed\nhere.",
+ "example": [
+ "\nlet x = 100;\nlet y = 100;\n\nfunction setup() {\n createCanvas(512, 512);\n fill(255, 0, 0);\n}\n\nfunction draw() {\n if (keyIsDown(LEFT_ARROW)) {\n x -= 5;\n }\n\n if (keyIsDown(RIGHT_ARROW)) {\n x += 5;\n }\n\n if (keyIsDown(UP_ARROW)) {\n y -= 5;\n }\n\n if (keyIsDown(DOWN_ARROW)) {\n y += 5;\n }\n\n clear();\n ellipse(x, y, 50, 50);\n describe(`50-by-50 red ellipse moves left, right, up, and\n down with arrow presses.`);\n}\n
\n\n\nlet diameter = 50;\n\nfunction setup() {\n createCanvas(512, 512);\n}\n\nfunction draw() {\n // 107 and 187 are keyCodes for \"+\"\n if (keyIsDown(107) || keyIsDown(187)) {\n diameter += 1;\n }\n\n // 109 and 189 are keyCodes for \"-\"\n if (keyIsDown(109) || keyIsDown(189)) {\n diameter -= 1;\n }\n\n clear();\n fill(255, 0, 0);\n ellipse(50, 50, diameter, diameter);\n describe(`50-by-50 red ellipse gets bigger or smaller when\n + or - are pressed.`);\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "code",
+ "description": "The key to check for.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "whether key is down or not",
+ "type": "Boolean"
+ }
+ }
+ ],
+ "return": {
+ "description": "whether key is down or not",
+ "type": "Boolean"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Events",
+ "submodule": "Keyboard"
+ },
+ {
+ "name": "mouseDragged",
+ "file": "src/events/mouse.js",
+ "line": 573,
+ "itemtype": "method",
+ "description": "The mouseDragged() function is called once every time the mouse moves and\na mouse button is pressed. If no mouseDragged() function is defined, the\ntouchMoved() function will be called instead if it is defined.
\nBrowsers may have different default\nbehaviors attached to various mouse events. To prevent any default\nbehavior for this event, add \"return false\" to the end of the function.",
+ "example": [
+ "\n\n// Drag the mouse across the page\n// to change its value\n\nlet value = 0;\nfunction draw() {\n fill(value);\n rect(25, 25, 50, 50);\n describe(`black 50-by-50 rect turns lighter with mouse click and\n drag until white, resets`);\n}\nfunction mouseDragged() {\n value = value + 5;\n if (value > 255) {\n value = 0;\n }\n}\n
\n\n\n\n\nfunction mouseDragged() {\n ellipse(mouseX, mouseY, 5, 5);\n // prevent default\n return false;\n}\n
\n\n\n\n\n// returns a MouseEvent object\n// as a callback argument\nfunction mouseDragged(event) {\n console.log(event);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "event",
+ "description": "optional MouseEvent callback argument.",
+ "optional": 1,
+ "type": "MouseEvent"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Events",
+ "submodule": "Mouse"
+ },
+ {
+ "name": "requestPointerLock",
+ "file": "src/events/mouse.js",
+ "line": 982,
+ "itemtype": "method",
+ "description": "The function requestPointerLock()\nlocks the pointer to its current position and makes it invisible.\nUse movedX and movedY to get the difference the mouse was moved since\nthe last call of draw.\nNote that not all browsers support this feature.\nThis enables you to create experiences that aren't limited by the mouse moving out of the screen\neven if it is repeatedly moved into one direction.\nFor example, a first person perspective experience.",
+ "example": [
+ "\n\nlet cam;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n requestPointerLock();\n cam = createCamera();\n}\n\nfunction draw() {\n background(255);\n cam.pan(-movedX * 0.001);\n cam.tilt(movedY * 0.001);\n sphere(25);\n describe(`3D scene moves according to mouse mouse movement in a\n first person perspective`);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Events",
+ "submodule": "Mouse"
+ },
+ {
+ "name": "exitPointerLock",
+ "file": "src/events/mouse.js",
+ "line": 1023,
+ "itemtype": "method",
+ "description": "The function exitPointerLock()\nexits a previously triggered pointer Lock\nfor example to make ui elements usable etc",
+ "example": [
+ "\n\n//click the canvas to lock the pointer\n//click again to exit (otherwise escape)\nlet locked = false;\nfunction draw() {\n background(237, 34, 93);\n describe('cursor gets locked / unlocked on mouse-click');\n}\nfunction mouseClicked() {\n if (!locked) {\n locked = true;\n requestPointerLock();\n } else {\n exitPointerLock();\n locked = false;\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Events",
+ "submodule": "Mouse"
+ },
+ {
+ "name": "createImage",
+ "file": "src/image/image.js",
+ "line": 92,
+ "itemtype": "method",
+ "description": "Creates a new p5.Image object. The new image is\ntransparent by default.
\ncreateImage()
uses the width
and height
paremeters to set the new\np5.Image object's dimensions in pixels. The new\np5.Image can be modified by updating its\npixels array or by calling its\nget() and\nset() methods. The\nloadPixels() method must be called\nbefore reading or modifying pixel values. The\nupdatePixels() method must be called\nfor updates to take effect.
\n",
+ "example": [
+ "\n\nlet img = createImage(66, 66);\nimg.loadPixels();\nfor (let x = 0; x < img.width; x += 1) {\n for (let y = 0; y < img.height; y += 1) {\n img.set(x, y, 0);\n }\n}\nimg.updatePixels();\nimage(img, 17, 17);\n\ndescribe('A black square drawn in the middle of a gray square.');\n
\n\n\n\n\nlet img = createImage(66, 66);\nimg.loadPixels();\nfor (let x = 0; x < img.width; x += 1) {\n for (let y = 0; y < img.height; y += 1) {\n let a = map(x, 0, img.width, 0, 255);\n let c = color(0, a);\n img.set(x, y, c);\n }\n}\nimg.updatePixels();\nimage(img, 17, 17);\n\ndescribe('A square with a horizontal color gradient that transitions from gray to black.');\n
\n\n\n\n\nlet img = createImage(66, 66);\nimg.loadPixels();\nlet d = pixelDensity();\nlet halfImage = 4 * (d * img.width) * (d * img.height / 2);\nfor (let i = 0; i < halfImage; i += 4) {\n // Red.\n img.pixels[i] = 0;\n // Green.\n img.pixels[i + 1] = 0;\n // Blue.\n img.pixels[i + 2] = 0;\n // Alpha.\n img.pixels[i + 3] = 255;\n}\nimg.updatePixels();\nimage(img, 17, 17);\n\ndescribe('A black square drawn in the middle of a gray square.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "width",
+ "description": "width in pixels.",
+ "type": "Integer"
+ },
+ {
+ "name": "height",
+ "description": "height in pixels.",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "new p5.Image object.",
+ "type": "p5.Image"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Image object.",
+ "type": "p5.Image"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "saveCanvas",
+ "file": "src/image/image.js",
+ "line": 173,
+ "itemtype": "method",
+ "description": "Saves the current canvas as an image. The browser will either save the\nfile immediately or prompt the user with a dialogue window.",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100);\n background(255);\n saveCanvas();\n}\n
\n\n\n\n\nfunction setup() {\n createCanvas(100, 100);\n background(255);\n saveCanvas('myCanvas.jpg');\n}\n
\n\n\n\n\nfunction setup() {\n createCanvas(100, 100);\n background(255);\n saveCanvas('myCanvas', 'jpg');\n}\n
\n\n\n\n\nfunction setup() {\n let cnv = createCanvas(100, 100);\n background(255);\n saveCanvas(cnv);\n}\n
\n\n\n\n\nfunction setup() {\n let cnv = createCanvas(100, 100);\n background(255);\n saveCanvas(cnv, 'myCanvas.jpg');\n}\n
\n\n\n\n\nfunction setup() {\n let cnv = createCanvas(100, 100);\n background(255);\n saveCanvas(cnv, 'myCanvas', 'jpg');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "selectedCanvas",
+ "description": "reference to a\nspecific HTML5 canvas element.",
+ "type": "p5.Framebuffer|p5.Element|HTMLCanvasElement"
+ },
+ {
+ "name": "filename",
+ "description": "file name. Defaults to 'untitled'.",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "extension",
+ "description": "file extension, either 'jpg' or 'png'. Defaults to 'png'.",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "filename",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "extension",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "saveFrames",
+ "file": "src/image/image.js",
+ "line": 534,
+ "itemtype": "method",
+ "description": "Captures a sequence of frames from the canvas that can be used to create a\nmovie. Frames are downloaded as individual image files by default.
\nThe first parameter, filename
, sets the prefix for the file names. For\nexample, setting the prefix to 'frame'
would generate the image files\nframe0.png
, frame1.png
, and so on. The second parameter, extension
,\nsets the file type to either 'png'
or 'jpg'
.
\nThe third parameter, duration
, sets the duration to record in seconds.\nThe maximum duration is 15 seconds. The fourth parameter, framerate
, sets\nthe number of frames to record per second. The maximum frame rate value is\n22. Limits are placed on duration
and framerate
to avoid using too much\nmemory. Recording large canvases can easily crash sketches or even web\nbrowsers.
\nThe fifth parameter, callback
, is optional. If a function is passed,\nimage files won't be saved by default. The callback function can be used\nto process an array containing the data for each captured frame. The array\nof image data contains a sequence of objects with three properties for each\nframe: imageData
, filename
, and extension
.
\n",
+ "example": [
+ "\n\nfunction draw() {\n let r = frameCount % 255;\n let g = 50;\n let b = 100;\n background(r, g, b);\n\n describe('A square repeatedly changes color from blue to pink.');\n}\n\nfunction keyPressed() {\n if (key === 's') {\n saveFrames('frame', 'png', 1, 5);\n }\n}\n
\n\n\n\n\nfunction draw() {\n let r = frameCount % 255;\n let g = 50;\n let b = 100;\n background(r, g, b);\n\n describe('A square repeatedly changes color from blue to pink.');\n}\n\nfunction mousePressed() {\n saveFrames('frame', 'png', 1, 5, data => {\n // Prints an array of objects containing raw image data,\n // filenames, and extensions.\n print(data);\n });\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "filename",
+ "description": "prefix of file name.",
+ "type": "String"
+ },
+ {
+ "name": "extension",
+ "description": "file extension, either 'jpg' or 'png'.",
+ "type": "String"
+ },
+ {
+ "name": "duration",
+ "description": "duration in seconds to record. This parameter will be constrained to be less or equal to 15.",
+ "type": "Number"
+ },
+ {
+ "name": "framerate",
+ "description": "number of frames to save per second. This parameter will be constrained to be less or equal to 22.",
+ "type": "Number"
+ },
+ {
+ "name": "callback",
+ "description": "callback function that will be executed\nto handle the image data. This function\nshould accept an array as argument. The\narray will contain the specified number of\nframes of objects. Each object has three\nproperties: imageData
, filename
, and extension
.",
+ "optional": 1
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "loadImage",
+ "file": "src/image/loading_displaying.js",
+ "line": 92,
+ "itemtype": "method",
+ "description": "Loads an image to create a p5.Image object.
\nloadImage()
interprets the first parameter one of three ways. If the path\nto an image file is provided, loadImage()
will load it. Paths to local\nfiles should be relative, such as 'assets/thundercat.jpg'
. URLs such as\n'https://example.com/thundercat.jpg'
may be blocked due to browser\nsecurity. Raw image data can also be passed as a base64 encoded image in\nthe form 'data:image/png;base64,arandomsequenceofcharacters'
.
\nThe second parameter is optional. If a function is passed, it will be\ncalled once the image has loaded. The callback function can optionally use\nthe new p5.Image object.
\nThe third parameter is also optional. If a function is passed, it will be\ncalled if the image fails to load. The callback function can optionally use\nthe event error.
\nImages can take time to load. Calling loadImage()
in\npreload() ensures images load before they're\nused in setup() or draw().
\n",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n describe('Image of the underside of a white umbrella and a gridded ceiling.');\n}\n
\n\n\n\n\nfunction setup() {\n loadImage('assets/laDefense.jpg', img => {\n image(img, 0, 0);\n });\n describe('Image of the underside of a white umbrella and a gridded ceiling.');\n}\n
\n\n\n\n\nfunction setup() {\n loadImage('assets/laDefense.jpg', success, failure);\n}\n\nfunction success(img) {\n image(img, 0, 0);\n describe('Image of the underside of a white umbrella and a gridded ceiling.');\n}\n\nfunction failure(event) {\n console.error('Oops!', event);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "path",
+ "description": "path of the image to be loaded or base64 encoded image.",
+ "type": "String"
+ },
+ {
+ "name": "successCallback",
+ "description": "function called with\np5.Image once it\nloads.",
+ "optional": 1
+ },
+ {
+ "name": "failureCallback",
+ "description": "function called with event\nerror if the image fails to load.",
+ "optional": 1
+ }
+ ],
+ "return": {
+ "description": "the p5.Image object.",
+ "type": "p5.Image"
+ }
+ }
+ ],
+ "return": {
+ "description": "the p5.Image object.",
+ "type": "p5.Image"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Loading & Displaying"
+ },
+ {
+ "name": "saveGif",
+ "file": "src/image/loading_displaying.js",
+ "line": 247,
+ "itemtype": "method",
+ "description": "Generates a gif from a sketch and saves it to a file. saveGif()
may be\ncalled in setup() or at any point while a sketch\nis running.
\nThe first parameter, fileName
, sets the gif's file name. The second\nparameter, duration
, sets the gif's duration in seconds.
\nThe third parameter, options
, is optional. If an object is passed,\nsaveGif()
will use its properties to customize the gif. saveGif()
\nrecognizes the properties delay
, units
, silent
,\nnotificationDuration
, and notificationID
.
\n",
+ "example": [
+ "\n\nfunction draw() {\n background(200);\n let c = frameCount % 255;\n fill(c);\n circle(50, 50, 25);\n\n describe('A circle drawn in the middle of a gray square. The circle changes color from black to white, then repeats.');\n}\n\nfunction keyPressed() {\n if (key === 's') {\n saveGif('mySketch', 5);\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "filename",
+ "description": "file name of gif.",
+ "type": "String"
+ },
+ {
+ "name": "duration",
+ "description": "duration in seconds to capture from the sketch.",
+ "type": "Number"
+ },
+ {
+ "name": "options",
+ "description": "an object that can contain five more properties:\ndelay
, a Number specifying how much time to wait before recording;\nunits
, a String that can be either 'seconds' or 'frames'. By default it's 'seconds’;\nsilent
, a Boolean that defines presence of progress notifications. By default it’s false
;\nnotificationDuration
, a Number that defines how long in seconds the final notification\nwill live. By default it's 0
, meaning the notification will never be removed;\nnotificationID
, a String that specifies the id of the notification's DOM element. By default it’s 'progressBar’
.",
+ "optional": 1,
+ "type": "Object"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Loading & Displaying"
+ },
+ {
+ "name": "image",
+ "file": "src/image/loading_displaying.js",
+ "line": 1017,
+ "itemtype": "method",
+ "description": "Draws a source image to the canvas.
\nThe first parameter, img
, is the source image to be drawn. The second and\nthird parameters, dx
and dy
, set the coordinates of the destination\nimage's top left corner. See imageMode() for\nother ways to position images.
\nHere's a diagram that explains how optional parameters work in image()
:
\n
\nThe fourth and fifth parameters, dw
and dh
, are optional. They set the\nthe width and height to draw the destination image. By default, image()
\ndraws the full source image at its original size.
\nThe sixth and seventh parameters, sx
and sy
, are also optional.\nThese coordinates define the top left corner of a subsection to draw from\nthe source image.
\nThe eighth and ninth parameters, sw
and sh
, are also optional.\nThey define the width and height of a subsection to draw from the source\nimage. By default, image()
draws the full subsection that begins at\n(sx
, sy
) and extends to the edges of the source image.
\nThe ninth parameter, fit
, is also optional. It enables a subsection of\nthe source image to be drawn without affecting its aspect ratio. If\nCONTAIN
is passed, the full subsection will appear within the destination\nrectangle. If COVER
is passed, the subsection will completely cover the\ndestination rectangle. This may have the effect of zooming into the\nsubsection.
\nThe tenth and eleventh paremeters, xAlign
and yAlign
, are also\noptional. They determine how to align the fitted subsection. xAlign
can\nbe set to either LEFT
, RIGHT
, or CENTER
. yAlign
can be set to\neither TOP
, BOTTOM
, or CENTER
. By default, both xAlign
and yAlign
\nare set to CENTER
.
\n",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n background(50);\n image(img, 0, 0);\n\n describe('An image of the underside of a white umbrella with a gridded ceiling above.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n background(50);\n image(img, 10, 10);\n\n describe('An image of the underside of a white umbrella with a gridded ceiling above. The image has dark gray borders on its left and top.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n background(50);\n image(img, 0, 0, 50, 50);\n\n describe('An image of the underside of a white umbrella with a gridded ceiling above. The image is drawn in the top left corner of a dark gray square.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n background(50);\n image(img, 25, 25, 50, 50, 25, 25, 50, 50);\n\n describe('An image of a gridded ceiling drawn in the center of a dark gray square.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/moonwalk.jpg');\n}\n\nfunction setup() {\n background(50);\n image(img, 0, 0, width, height, 0, 0, img.width, img.height, CONTAIN);\n\n describe('An image of an astronaut on the moon. The top and bottom borders of the image are dark gray.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n // Image is 50 x 50 pixels.\n img = loadImage('assets/laDefense50.png');\n}\n\nfunction setup() {\n background(50);\n image(img, 0, 0, width, height, 0, 0, img.width, img.height, COVER);\n\n describe('A pixelated image of the underside of a white umbrella with a gridded ceiling above.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "img",
+ "description": "image to display.",
+ "type": "p5.Image|p5.Element|p5.Texture|p5.Framebuffer|p5.FramebufferTexture"
+ },
+ {
+ "name": "x",
+ "description": "x-coordinate of the top-left corner of the image.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the top-left corner of the image.",
+ "type": "Number"
+ },
+ {
+ "name": "width",
+ "description": "width to draw the image.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "height",
+ "description": "height to draw the image.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "img",
+ "type": "p5.Image|p5.Element|p5.Texture|p5.Framebuffer|p5.FramebufferTexture"
+ },
+ {
+ "name": "dx",
+ "description": "the x-coordinate of the destination\nrectangle in which to draw the source image",
+ "type": "Number"
+ },
+ {
+ "name": "dy",
+ "description": "the y-coordinate of the destination\nrectangle in which to draw the source image",
+ "type": "Number"
+ },
+ {
+ "name": "dWidth",
+ "description": "the width of the destination rectangle",
+ "type": "Number"
+ },
+ {
+ "name": "dHeight",
+ "description": "the height of the destination rectangle",
+ "type": "Number"
+ },
+ {
+ "name": "sx",
+ "description": "the x-coordinate of the subsection of the source\nimage to draw into the destination rectangle",
+ "type": "Number"
+ },
+ {
+ "name": "sy",
+ "description": "the y-coordinate of the subsection of the source\nimage to draw into the destination rectangle",
+ "type": "Number"
+ },
+ {
+ "name": "sWidth",
+ "description": "the width of the subsection of the\nsource image to draw into the destination\nrectangle",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "sHeight",
+ "description": "the height of the subsection of the\nsource image to draw into the destination rectangle",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "fit",
+ "description": "either CONTAIN or COVER",
+ "optional": 1,
+ "type": "Constant"
+ },
+ {
+ "name": "xAlign",
+ "description": "either LEFT, RIGHT or CENTER default is CENTER",
+ "optional": 1,
+ "type": "Constant"
+ },
+ {
+ "name": "yAlign",
+ "description": "either TOP, BOTTOM or CENTER default is CENTER",
+ "optional": 1,
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Loading & Displaying"
+ },
+ {
+ "name": "tint",
+ "file": "src/image/loading_displaying.js",
+ "line": 1232,
+ "itemtype": "method",
+ "description": "Tints images using a specified color.
\nThe version of tint()
with one parameter interprets it one of four ways.\nIf the parameter is a number, it's interpreted as a grayscale value. If the\nparameter is a string, it's interpreted as a CSS color string. An array of\n[R, G, B, A]
values or a p5.Color object can\nalso be used to set the tint color.
\nThe version of tint()
with two parameters uses the first one as a\ngrayscale value and the second as an alpha value. For example, calling\ntint(255, 128)
will make an image 50% transparent.
\nThe version of tint()
with three parameters interprets them as RGB or\nHSB values, depending on the current\ncolorMode(). The optional fourth parameter\nsets the alpha value. For example, tint(255, 0, 0, 100)
will give images\na red tint and make them transparent.
\n",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n tint('red');\n image(img, 50, 0);\n\n describe('Two images of an umbrella and a ceiling side-by-side. The image on the right has a red tint.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n tint(255, 0, 0);\n image(img, 50, 0);\n\n describe('Two images of an umbrella and a ceiling side-by-side. The image on the right has a red tint.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n tint(255, 0, 0, 100);\n image(img, 50, 0);\n\n describe('Two images of an umbrella and a ceiling side-by-side. The image on the right has a transparent red tint.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n tint(255, 180);\n image(img, 50, 0);\n\n describe('Two images of an umbrella and a ceiling side-by-side. The image on the right is transparent.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "red or hue value.",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "description": "green or saturation value.",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "description": "blue or brightness.",
+ "type": "Number"
+ },
+ {
+ "name": "alpha",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "CSS color string.",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "gray",
+ "description": "grayscale value.",
+ "type": "Number"
+ },
+ {
+ "name": "alpha",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "values",
+ "description": "array containing the red, green, blue &\nalpha components of the color.",
+ "type": "Number[]"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "the tint color",
+ "type": "p5.Color"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Loading & Displaying"
+ },
+ {
+ "name": "noTint",
+ "file": "src/image/loading_displaying.js",
+ "line": 1262,
+ "itemtype": "method",
+ "description": "Removes the current tint set by tint() and restores\nimages to their original colors.",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\nfunction setup() {\n tint('red');\n image(img, 0, 0);\n noTint();\n image(img, 50, 0);\n\n describe('Two images of an umbrella and a ceiling side-by-side. The image on the left has a red tint.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Loading & Displaying"
+ },
+ {
+ "name": "imageMode",
+ "file": "src/image/loading_displaying.js",
+ "line": 1353,
+ "itemtype": "method",
+ "description": "Changes the location from which images are drawn when\nimage() is called.
\nBy default, the first\ntwo parameters of image() are the x- and\ny-coordinates of the image's upper-left corner. The next parameters are\nits width and height. This is the same as calling imageMode(CORNER)
.
\nimageMode(CORNERS)
also uses the first two parameters of\nimage() as the x- and y-coordinates of the image's\ntop-left corner. The third and fourth parameters are the coordinates of its\nbottom-right corner.
\nimageMode(CENTER)
uses the first two parameters of\nimage() as the x- and y-coordinates of the image's\ncenter. The next parameters are its width and height.
\n",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n background(200);\n imageMode(CORNER);\n image(img, 10, 10, 50, 50);\n\n describe('A square image of a brick wall is drawn at the top left of a gray square.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n background(200);\n imageMode(CORNERS);\n image(img, 10, 10, 90, 40);\n\n describe('An image of a brick wall is drawn on a gray square. The image is squeezed into a small rectangular area.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n background(200);\n imageMode(CENTER);\n image(img, 50, 50, 80, 80);\n\n describe('A square image of a brick wall is drawn on a gray square.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "mode",
+ "description": "either CORNER, CORNERS, or CENTER.",
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Loading & Displaying"
+ },
+ {
+ "name": "blend",
+ "file": "src/image/pixels.js",
+ "line": 198,
+ "itemtype": "method",
+ "description": "Copies a region of pixels from one image to another. The blendMode
\nparameter blends the images' colors to create different effects.",
+ "example": [
+ "\n\nlet img0;\nlet img1;\n\nfunction preload() {\n img0 = loadImage('assets/rockies.jpg');\n img1 = loadImage('assets/bricks_third.jpg');\n}\n\nfunction setup() {\n background(img0);\n image(img1, 0, 0);\n blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\n\n describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears faded on the right of the image.');\n}\n
\n\n\n\n\nlet img0;\nlet img1;\n\nfunction preload() {\n img0 = loadImage('assets/rockies.jpg');\n img1 = loadImage('assets/bricks_third.jpg');\n}\n\nfunction setup() {\n background(img0);\n image(img1, 0, 0);\n blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\n\n describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears transparent on the right of the image.');\n}\n
\n\n\n\n\nlet img0;\nlet img1;\n\nfunction preload() {\n img0 = loadImage('assets/rockies.jpg');\n img1 = loadImage('assets/bricks_third.jpg');\n}\n\nfunction setup() {\n background(img0);\n image(img1, 0, 0);\n blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\n\n describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears washed out on the right of the image.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "srcImage",
+ "description": "source image.",
+ "type": "p5.Image"
+ },
+ {
+ "name": "sx",
+ "description": "x-coordinate of the source's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "sy",
+ "description": "y-coordinate of the source's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "sw",
+ "description": "source image width.",
+ "type": "Integer"
+ },
+ {
+ "name": "sh",
+ "description": "source image height.",
+ "type": "Integer"
+ },
+ {
+ "name": "dx",
+ "description": "x-coordinate of the destination's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "dy",
+ "description": "y-coordinate of the destination's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "dw",
+ "description": "destination image width.",
+ "type": "Integer"
+ },
+ {
+ "name": "dh",
+ "description": "destination image height.",
+ "type": "Integer"
+ },
+ {
+ "name": "blendMode",
+ "description": "the blend mode. either\nBLEND, DARKEST, LIGHTEST, DIFFERENCE,\nMULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\nSOFT_LIGHT, DODGE, BURN, ADD or NORMAL.",
+ "type": "Constant"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "sx",
+ "type": "Integer"
+ },
+ {
+ "name": "sy",
+ "type": "Integer"
+ },
+ {
+ "name": "sw",
+ "type": "Integer"
+ },
+ {
+ "name": "sh",
+ "type": "Integer"
+ },
+ {
+ "name": "dx",
+ "type": "Integer"
+ },
+ {
+ "name": "dy",
+ "type": "Integer"
+ },
+ {
+ "name": "dw",
+ "type": "Integer"
+ },
+ {
+ "name": "dh",
+ "type": "Integer"
+ },
+ {
+ "name": "blendMode",
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Pixels"
+ },
+ {
+ "name": "copy",
+ "file": "src/image/pixels.js",
+ "line": 257,
+ "itemtype": "method",
+ "description": "Copies pixels from a source image to a region of the canvas. The source\nimage can be the canvas itself or a p5.Image\nobject. copy()
will scale pixels from the source region if it isn't the\nsame size as the destination region.",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n background(img);\n copy(img, 7, 22, 10, 10, 35, 25, 50, 50);\n // Show copied region.\n stroke(255);\n noFill();\n square(7, 22, 10);\n\n describe('An image of a mountain landscape. A square region is outlined in white. A larger square contains a pixelated view of the outlined region.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "srcImage",
+ "description": "source image.",
+ "type": "p5.Image|p5.Element"
+ },
+ {
+ "name": "sx",
+ "description": "x-coordinate of the source's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "sy",
+ "description": "y-coordinate of the source's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "sw",
+ "description": "source image width.",
+ "type": "Integer"
+ },
+ {
+ "name": "sh",
+ "description": "source image height.",
+ "type": "Integer"
+ },
+ {
+ "name": "dx",
+ "description": "x-coordinate of the destination's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "dy",
+ "description": "y-coordinate of the destination's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "dw",
+ "description": "destination image width.",
+ "type": "Integer"
+ },
+ {
+ "name": "dh",
+ "description": "destination image height.",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "sx",
+ "type": "Integer"
+ },
+ {
+ "name": "sy",
+ "type": "Integer"
+ },
+ {
+ "name": "sw",
+ "type": "Integer"
+ },
+ {
+ "name": "sh",
+ "type": "Integer"
+ },
+ {
+ "name": "dx",
+ "type": "Integer"
+ },
+ {
+ "name": "dy",
+ "type": "Integer"
+ },
+ {
+ "name": "dw",
+ "type": "Integer"
+ },
+ {
+ "name": "dh",
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Pixels"
+ },
+ {
+ "name": "filter",
+ "file": "src/image/pixels.js",
+ "line": 571,
+ "itemtype": "method",
+ "description": "Applies an image filter to the canvas. The preset options are:
\nINVERT
\nInverts the colors in the image. No parameter is used.
\nGRAY
\nConverts the image to grayscale. No parameter is used.
\nTHRESHOLD
\nConverts the image to black and white. Pixels with a grayscale value\nabove a given threshold are converted to white. The rest are converted to\nblack. The threshold must be between 0.0 (black) and 1.0 (white). If no\nvalue is specified, 0.5 is used.
\nOPAQUE
\nSets the alpha channel to entirely opaque. No parameter is used.
\nPOSTERIZE
\nLimits the number of colors in the image. Each color channel is limited to\nthe number of colors specified. Values between 2 and 255 are valid, but\nresults are most noticeable with lower values. The default value is 4.
\nBLUR
\nBlurs the image. The level of blurring is specified by a blur radius. Larger\nvalues increase the blur. The default value is 4. A gaussian blur is used\nin P2D
mode. A box blur is used in WEBGL
mode.
\nERODE
\nReduces the light areas. No parameter is used.
\nDILATE
\nIncreases the light areas. No parameter is used.
\nfilter()
uses WebGL in the background by default because it's faster.\nThis can be disabled in P2D
mode by adding a false
argument, as in\nfilter(BLUR, false)
. This may be useful to keep computation off the GPU\nor to work around a lack of WebGL support.
\nIn WEBGL
mode, filter()
can also use custom shaders. See\ncreateFilterShader() for more\ninformation.
\n",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n filter(INVERT);\n\n describe('A blue brick wall.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n filter(GRAY);\n\n describe('A brick wall drawn in grayscale.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n filter(THRESHOLD);\n\n describe('A brick wall drawn in black and white.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n filter(OPAQUE);\n\n describe('A red brick wall.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n filter(POSTERIZE, 3);\n\n describe('An image of a red brick wall drawn with limited color palette.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n filter(BLUR, 3);\n\n describe('A blurry image of a red brick wall.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n filter(DILATE);\n\n describe('A red brick wall with bright lines between each brick.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n filter(ERODE);\n\n describe('A red brick wall with faint lines between each brick.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n // Don't use WebGL.\n filter(BLUR, 3, false);\n\n describe('A blurry image of a red brick wall.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "filterType",
+ "description": "either THRESHOLD, GRAY, OPAQUE, INVERT,\nPOSTERIZE, BLUR, ERODE, DILATE or BLUR.",
+ "type": "Constant"
+ },
+ {
+ "name": "filterParam",
+ "description": "parameter unique to each filter.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "useWebGL",
+ "description": "flag to control whether to use fast\nWebGL filters (GPU) or original image\nfilters (CPU); defaults to true
.",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "filterType",
+ "type": "Constant"
+ },
+ {
+ "name": "filterParam",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "useWebGL",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "shaderFilter",
+ "description": "shader that's been loaded, with the\nfrag shader using a tex0
uniform.",
+ "type": "p5.Shader"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Pixels"
+ },
+ {
+ "name": "get",
+ "file": "src/io/p5.TableRow.js",
+ "line": 223,
+ "itemtype": "method",
+ "description": "Gets a pixel or a region of pixels from the canvas.
\nget()
is easy to use but it's not as fast as\npixels. Use pixels\nto read many pixel values.
\nThe version of get()
with no parameters returns the entire canvas.
\nThe version of get()
with two parameters interprets them as\ncoordinates. It returns an array with the [R, G, B, A]
values of the\npixel at the given point.
\nThe version of get()
with four parameters interprets them as coordinates\nand dimensions. It returns a subsection of the canvas as a\np5.Image object. The first two parameters are the\ncoordinates for the upper-left corner of the subsection. The last two\nparameters are the width and height of the subsection.
\nUse p5.Image.get() to work directly with\np5.Image objects.
\n",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n let c = get();\n image(c, width / 2, 0);\n\n describe('Two identical mountain landscapes shown side-by-side.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n let c = get(50, 90);\n fill(c);\n noStroke();\n square(25, 25, 50);\n\n describe('A mountain landscape with an olive green square in its center.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n let c = get(0, 0, width / 2, height / 2);\n image(c, width / 2, height / 2);\n\n describe('A mountain landscape drawn on top of another mountain landscape.');\n}\n
\n",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let names = [];\n let rows = table.getRows();\n for (let r = 0; r < rows.length; r++) {\n names.push(rows[r].get('name'));\n }\n\n print(names);\n\n describe('no image displayed');\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the pixel.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the pixel.",
+ "type": "Number"
+ },
+ {
+ "name": "w",
+ "description": "width of the subsection to be returned.",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "description": "height of the subsection to be returned.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "subsection as a p5.Image object.",
+ "type": "p5.Image"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "whole canvas as a p5.Image.",
+ "type": "p5.Image"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "color of the pixel at (x, y) in array format [R, G, B, A]
.",
+ "type": "Number[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "subsection as a p5.Image object.",
+ "type": "p5.Image"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "loadPixels",
+ "file": "src/image/pixels.js",
+ "line": 797,
+ "itemtype": "method",
+ "description": "Loads the current value of each pixel on the canvas into the\npixels array. This\nfunction must be called before reading from or writing to\npixels.",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0, width, height);\n let d = pixelDensity();\n let halfImage = 4 * (d * width) * (d * height / 2);\n loadPixels();\n for (let i = 0; i < halfImage; i += 1) {\n pixels[i + halfImage] = pixels[i];\n }\n updatePixels();\n\n describe('Two identical images of mountain landscapes, one on top of the other.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Pixels"
+ },
+ {
+ "name": "set",
+ "file": "src/io/p5.TableRow.js",
+ "line": 75,
+ "itemtype": "method",
+ "description": "Sets the color of a pixel or draws an image to the canvas.
\nset()
is easy to use but it's not as fast as\npixels. Use pixels\nto set many pixel values.
\nset()
interprets the first two parameters as x- and y-coordinates. It\ninterprets the last parameter as a grayscale value, a [R, G, B, A]
pixel\narray, a p5.Color object, or a\np5.Image object. If an image is passed, the first\ntwo parameters set the coordinates for the image's upper-left corner,\nregardless of the current imageMode().
\nupdatePixels() must be called after using\nset()
for changes to appear.
\n",
+ "example": [
+ "\n\nset(30, 20, 0);\nset(85, 20, 0);\nset(85, 75, 0);\nset(30, 75, 0);\nupdatePixels();\n\ndescribe('Four black dots arranged in a square drawn on a gray background.');\n
\n\n\n\n\nlet black = color(0);\nset(30, 20, black);\nset(85, 20, black);\nset(85, 75, black);\nset(30, 75, black);\nupdatePixels();\n\ndescribe('Four black dots arranged in a square drawn on a gray background.');\n
\n\n\n\n\nfor (let x = 0; x < width; x += 1) {\n for (let y = 0; y < height; y += 1) {\n let c = map(x, 0, width, 0, 255);\n set(x, y, c);\n }\n}\nupdatePixels();\n\ndescribe('A horiztonal color gradient from black to white.');\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n set(0, 0, img);\n updatePixels();\n\n describe('An image of a mountain landscape.');\n}\n
\n",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n print(table.getArray());\n\n describe('no image displayed');\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the pixel.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the pixel.",
+ "type": "Number"
+ },
+ {
+ "name": "c",
+ "description": "grayscale value | pixel array |\np5.Color object | p5.Image to copy.",
+ "type": "Number|Number[]|Object"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (Number)\nor Title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "The value to be stored",
+ "type": "String|Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "updatePixels",
+ "file": "src/image/pixels.js",
+ "line": 925,
+ "itemtype": "method",
+ "description": "Updates the canvas with the RGBA values in the\npixels array.
\nupdatePixels()
only needs to be called after changing values in the\npixels array. Such changes can be made directly\nafter calling loadPixels() or by calling\nset().
\n",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0, width, height);\n let d = pixelDensity();\n let halfImage = 4 * (d * width) * (d * height / 2);\n loadPixels();\n for (let i = 0; i < halfImage; i += 1) {\n pixels[i + halfImage] = pixels[i];\n }\n updatePixels();\n\n describe('Two identical images of mountain landscapes, one on top of the other.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the upper-left corner of region\nto update.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the upper-left corner of region\nto update.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "w",
+ "description": "width of region to update.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "description": "height of region to update.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Image",
+ "submodule": "Pixels"
+ },
+ {
+ "name": "loadJSON",
+ "file": "src/io/files.js",
+ "line": 114,
+ "itemtype": "method",
+ "description": "Loads a JSON file from a file or a URL, and returns an Object.\nNote that even if the JSON file contains an Array, an Object will be\nreturned with index numbers as keys.
\nThis method is asynchronous, meaning it may not finish before the next\nline in your sketch is executed. JSONP is supported via a polyfill and you\ncan pass in as the second argument an object with definitions of the json\ncallback following the syntax specified here.
\nThis method is suitable for fetching files up to size of 64MB.
\n",
+ "example": [
+ "Calling loadJSON() inside preload() guarantees to complete the\noperation before setup() and draw() are called.\n\n\n// Examples use USGS Earthquake API:\n// https://earthquake.usgs.gov/fdsnws/event/1/#methods\nlet earthquakes;\nfunction preload() {\n // Get the most recent earthquake in the database\n let url =\n'https://earthquake.usgs.gov/earthquakes/feed/v1.0/' +\n 'summary/all_day.geojson';\n earthquakes = loadJSON(url);\n}\n\nfunction setup() {\n noLoop();\n}\n\nfunction draw() {\n background(200);\n // Get the magnitude and name of the earthquake out of the loaded JSON\n let earthquakeMag = earthquakes.features[0].properties.mag;\n let earthquakeName = earthquakes.features[0].properties.place;\n ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\n textAlign(CENTER);\n text(earthquakeName, 0, height - 30, width, 30);\n describe(`50×50 ellipse that changes from black to white\n depending on the current humidity`);\n}\n
\n\nOutside of preload(), you may supply a callback function to handle the\nobject:\n\nfunction setup() {\n noLoop();\n let url =\n'https://earthquake.usgs.gov/earthquakes/feed/v1.0/' +\n 'summary/all_day.geojson';\n loadJSON(url, drawEarthquake);\n}\n\nfunction draw() {\n background(200);\n describe(`50×50 ellipse that changes from black to white\n depending on the current humidity`);\n}\n\nfunction drawEarthquake(earthquakes) {\n // Get the magnitude and name of the earthquake out of the loaded JSON\n let earthquakeMag = earthquakes.features[0].properties.mag;\n let earthquakeName = earthquakes.features[0].properties.place;\n ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\n textAlign(CENTER);\n text(earthquakeName, 0, height - 30, width, 30);\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "path",
+ "description": "name of the file or url to load",
+ "type": "String"
+ },
+ {
+ "name": "jsonpOptions",
+ "description": "options object for jsonp related settings",
+ "optional": 1,
+ "type": "Object"
+ },
+ {
+ "name": "datatype",
+ "description": "\"json\" or \"jsonp\"",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "callback",
+ "description": "function to be executed after\nloadJSON() completes, data is passed\nin as first argument",
+ "optional": 1,
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "description": "function to be executed if\nthere is an error, response is passed\nin as first argument",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "JSON data",
+ "type": "Object|Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "path",
+ "type": "String"
+ },
+ {
+ "name": "datatype",
+ "type": "String"
+ },
+ {
+ "name": "callback",
+ "optional": 1,
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object|Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "path",
+ "type": "String"
+ },
+ {
+ "name": "callback",
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object|Array"
+ }
+ }
+ ],
+ "return": {
+ "description": "JSON data",
+ "type": "Object|Array"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "loadStrings",
+ "file": "src/io/files.js",
+ "line": 229,
+ "itemtype": "method",
+ "description": "Reads the contents of a file and creates a String array of its individual\nlines. If the name of the file is used as the parameter, as in the above\nexample, the file must be located in the sketch directory/folder.
\nAlternatively, the file may be loaded from anywhere on the local\ncomputer using an absolute path (something that starts with / on Unix and\nLinux, or a drive letter on Windows), or the filename parameter can be a\nURL for a file found on a network.
\nThis method is asynchronous, meaning it may not finish before the next\nline in your sketch is executed.
\nThis method is suitable for fetching files up to size of 64MB.
\n",
+ "example": [
+ "Calling loadStrings() inside preload() guarantees to complete the\noperation before setup() and draw() are called.\n\n\nlet result;\nfunction preload() {\n result = loadStrings('assets/test.txt');\n}\n\nfunction setup() {\n background(200);\n text(random(result), 10, 10, 80, 80);\n describe(`randomly generated text from a file,\n for example \"i smell like butter\"`);\n}\n
\n\nOutside of preload(), you may supply a callback function to handle the\nobject:\n\n\nfunction setup() {\n loadStrings('assets/test.txt', pickString);\n describe(`randomly generated text from a file,\n for example \"i have three feet\"`);\n}\n\nfunction pickString(result) {\n background(200);\n text(random(result), 10, 10, 80, 80);\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "filename",
+ "description": "name of the file or url to load",
+ "type": "String"
+ },
+ {
+ "name": "callback",
+ "description": "function to be executed after loadStrings()\ncompletes, Array is passed in as first\nargument",
+ "optional": 1,
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "description": "function to be executed if\nthere is an error, response is passed\nin as first argument",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "Array of Strings",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "Array of Strings",
+ "type": "String[]"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "loadTable",
+ "file": "src/io/files.js",
+ "line": 361,
+ "itemtype": "method",
+ "description": "Reads the contents of a file or URL and creates a p5.Table object with\nits values. If a file is specified, it must be located in the sketch's\n\"data\" folder. The filename parameter can also be a URL to a file found\nonline. By default, the file is assumed to be comma-separated (in CSV\nformat). Table only looks for a header row if the 'header' option is\nincluded.
\nThis method is asynchronous, meaning it may not finish before the next\nline in your sketch is executed. Calling loadTable() inside preload()\nguarantees to complete the operation before setup() and draw() are called.\nOutside of preload(), you may supply a callback function to handle the\nobject:
\nAll files loaded and saved use UTF-8 encoding. This method is suitable for fetching files up to size of 64MB.
\n",
+ "example": [
+ "\n\n// Given the following CSV file called \"mammals.csv\"\n// located in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n //the file can be remote\n //table = loadTable(\"https://p5js.org/reference/assets/mammals.csv\",\n // \"csv\", \"header\");\n}\n\nfunction setup() {\n //count the columns\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n\n print(table.getColumn('name'));\n //[\"Goat\", \"Leopard\", \"Zebra\"]\n\n //cycle through the table\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(table.getString(r, c));\n }\n describe(`randomly generated text from a file,\n for example \"i smell like butter\"`);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "filename",
+ "description": "name of the file or URL to load",
+ "type": "String"
+ },
+ {
+ "name": "extension",
+ "description": "parse the table by comma-separated values \"csv\", semicolon-separated\nvalues \"ssv\", or tab-separated values \"tsv\"",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "header",
+ "description": "\"header\" to indicate table has header row",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "callback",
+ "description": "function to be executed after\nloadTable() completes. On success, the\nTable object is passed in as the\nfirst argument.",
+ "optional": 1,
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "description": "function to be executed if\nthere is an error, response is passed\nin as first argument",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "Table object containing data",
+ "type": "Object"
+ }
+ }
+ ],
+ "return": {
+ "description": "Table object containing data",
+ "type": "Object"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "loadXML",
+ "file": "src/io/files.js",
+ "line": 629,
+ "itemtype": "method",
+ "description": "Reads the contents of a file and creates an XML object with its values.\nIf the name of the file is used as the parameter, as in the above example,\nthe file must be located in the sketch directory/folder.
\nAlternatively, the file maybe be loaded from anywhere on the local\ncomputer using an absolute path (something that starts with / on Unix and\nLinux, or a drive letter on Windows), or the filename parameter can be a\nURL for a file found on a network.
\nThis method is asynchronous, meaning it may not finish before the next\nline in your sketch is executed. Calling loadXML() inside preload()\nguarantees to complete the operation before setup() and draw() are called.
\nOutside of preload(), you may supply a callback function to handle the\nobject.
\nThis method is suitable for fetching files up to size of 64MB.
\n",
+ "example": [
+ "\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let children = xml.getChildren('animal');\n\n for (let i = 0; i < children.length; i++) {\n let id = children[i].getNum('id');\n let coloring = children[i].getString('species');\n let name = children[i].getContent();\n print(id + ', ' + coloring + ', ' + name);\n }\n describe('no image displayed');\n}\n\n// Sketch prints:\n// 0, Capra hircus, Goat\n// 1, Panthera pardus, Leopard\n// 2, Equus zebra, Zebra\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "filename",
+ "description": "name of the file or URL to load",
+ "type": "String"
+ },
+ {
+ "name": "callback",
+ "description": "function to be executed after loadXML()\ncompletes, XML object is passed in as\nfirst argument",
+ "optional": 1,
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "description": "function to be executed if\nthere is an error, response is passed\nin as first argument",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "XML object containing data",
+ "type": "Object"
+ }
+ }
+ ],
+ "return": {
+ "description": "XML object containing data",
+ "type": "Object"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "loadBytes",
+ "file": "src/io/files.js",
+ "line": 700,
+ "itemtype": "method",
+ "description": "This method is suitable for fetching files up to size of 64MB.",
+ "example": [
+ "\nlet data;\n\nfunction preload() {\n data = loadBytes('assets/mammals.xml');\n}\n\nfunction setup() {\n for (let i = 0; i < 5; i++) {\n console.log(data.bytes[i].toString(16));\n }\n describe('no image displayed');\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "file",
+ "description": "name of the file or URL to load",
+ "type": "string"
+ },
+ {
+ "name": "callback",
+ "description": "function to be executed after loadBytes()\ncompletes",
+ "optional": 1,
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "description": "function to be executed if there\nis an error",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "an object whose 'bytes' property will be the loaded buffer",
+ "type": "Object"
+ }
+ }
+ ],
+ "return": {
+ "description": "an object whose 'bytes' property will be the loaded buffer",
+ "type": "Object"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "httpGet",
+ "file": "src/io/files.js",
+ "line": 800,
+ "itemtype": "method",
+ "description": "Method for executing an HTTP GET request. If data type is not specified,\np5 will try to guess based on the URL, defaulting to text. This is equivalent to\ncalling httpDo(path, 'GET')
. The 'binary' datatype will return\na Blob object, and the 'arrayBuffer' datatype will return an ArrayBuffer\nwhich can be used to initialize typed arrays (such as Uint8Array).",
+ "example": [
+ "\n// Examples use USGS Earthquake API:\n// https://earthquake.usgs.gov/fdsnws/event/1/#methods\nlet earthquakes;\nfunction preload() {\n // Get the most recent earthquake in the database\n let url =\n'https://earthquake.usgs.gov/fdsnws/event/1/query?' +\n 'format=geojson&limit=1&orderby=time';\n httpGet(url, 'json', function(response) {\n // when the HTTP request completes, populate the variable that holds the\n // earthquake data used in the visualization.\n earthquakes = response;\n });\n}\n\nfunction draw() {\n if (!earthquakes) {\n // Wait until the earthquake data has loaded before drawing.\n return;\n }\n background(200);\n // Get the magnitude and name of the earthquake out of the loaded JSON\n let earthquakeMag = earthquakes.features[0].properties.mag;\n let earthquakeName = earthquakes.features[0].properties.place;\n ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\n textAlign(CENTER);\n text(earthquakeName, 0, height - 30, width, 30);\n noLoop();\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "path",
+ "description": "name of the file or url to load",
+ "type": "String"
+ },
+ {
+ "name": "datatype",
+ "description": "\"json\", \"jsonp\", \"binary\", \"arrayBuffer\",\n\"xml\", or \"text\"",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "data",
+ "description": "param data passed sent with request",
+ "optional": 1,
+ "type": "Object|Boolean"
+ },
+ {
+ "name": "callback",
+ "description": "function to be executed after\nhttpGet() completes, data is passed in\nas first argument",
+ "optional": 1,
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "description": "function to be executed if\nthere is an error, response is passed\nin as first argument",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "A promise that resolves with the data when the operation\ncompletes successfully or rejects with the error after\none occurs.",
+ "type": "Promise"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "path",
+ "type": "String"
+ },
+ {
+ "name": "data",
+ "type": "Object|Boolean"
+ },
+ {
+ "name": "callback",
+ "optional": 1,
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Promise"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "path",
+ "type": "String"
+ },
+ {
+ "name": "callback",
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Promise"
+ }
+ }
+ ],
+ "return": {
+ "description": "A promise that resolves with the data when the operation\ncompletes successfully or rejects with the error after\none occurs.",
+ "type": "Promise"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "httpPost",
+ "file": "src/io/files.js",
+ "line": 890,
+ "itemtype": "method",
+ "description": "Method for executing an HTTP POST request. If data type is not specified,\np5 will try to guess based on the URL, defaulting to text. This is equivalent to\ncalling httpDo(path, 'POST')
.",
+ "example": [
+ "\n\n// Examples use jsonplaceholder.typicode.com for a Mock Data API\n\nlet url = 'https://jsonplaceholder.typicode.com/posts';\nlet postData = { userId: 1, title: 'p5 Clicked!', body: 'p5.js is very cool.' };\n\nfunction setup() {\n createCanvas(100, 100);\n background(200);\n}\n\nfunction mousePressed() {\n httpPost(url, 'json', postData, function(result) {\n strokeWeight(2);\n text(result.body, mouseX, mouseY);\n });\n}\n
\n\n\n\nlet url = 'ttps://invalidURL'; // A bad URL that will cause errors\nlet postData = { title: 'p5 Clicked!', body: 'p5.js is very cool.' };\n\nfunction setup() {\n createCanvas(100, 100);\n background(200);\n}\n\nfunction mousePressed() {\n httpPost(\n url,\n 'json',\n postData,\n function(result) {\n // ... won't be called\n },\n function(error) {\n strokeWeight(2);\n text(error.toString(), mouseX, mouseY);\n }\n );\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "path",
+ "description": "name of the file or url to load",
+ "type": "String"
+ },
+ {
+ "name": "datatype",
+ "description": "\"json\", \"jsonp\", \"xml\", or \"text\".\nIf omitted, httpPost() will guess.",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "data",
+ "description": "param data passed sent with request",
+ "optional": 1,
+ "type": "Object|Boolean"
+ },
+ {
+ "name": "callback",
+ "description": "function to be executed after\nhttpPost() completes, data is passed in\nas first argument",
+ "optional": 1,
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "description": "function to be executed if\nthere is an error, response is passed\nin as first argument",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "A promise that resolves with the data when the operation\ncompletes successfully or rejects with the error after\none occurs.",
+ "type": "Promise"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "path",
+ "type": "String"
+ },
+ {
+ "name": "data",
+ "type": "Object|Boolean"
+ },
+ {
+ "name": "callback",
+ "optional": 1,
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Promise"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "path",
+ "type": "String"
+ },
+ {
+ "name": "callback",
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Promise"
+ }
+ }
+ ],
+ "return": {
+ "description": "A promise that resolves with the data when the operation\ncompletes successfully or rejects with the error after\none occurs.",
+ "type": "Promise"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "httpDo",
+ "file": "src/io/files.js",
+ "line": 979,
+ "itemtype": "method",
+ "description": "Method for executing an HTTP request. If data type is not specified,\np5 will try to guess based on the URL, defaulting to text.
\nFor more advanced use, you may also pass in the path as the first argument\nand a object as the second argument, the signature follows the one specified\nin the Fetch API specification.\nThis method is suitable for fetching files up to size of 64MB when \"GET\" is used.",
+ "example": [
+ "\n\n// Examples use USGS Earthquake API:\n// https://earthquake.usgs.gov/fdsnws/event/1/#methods\n\n// displays an animation of all USGS earthquakes\nlet earthquakes;\nlet eqFeatureIndex = 0;\n\nfunction preload() {\n let url = 'https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson';\n httpDo(\n url,\n {\n method: 'GET',\n // Other Request options, like special headers for apis\n headers: { authorization: 'Bearer secretKey' }\n },\n function(res) {\n earthquakes = res;\n }\n );\n}\n\nfunction draw() {\n // wait until the data is loaded\n if (!earthquakes || !earthquakes.features[eqFeatureIndex]) {\n return;\n }\n clear();\n\n let feature = earthquakes.features[eqFeatureIndex];\n let mag = feature.properties.mag;\n let rad = mag / 11 * ((width + height) / 2);\n fill(255, 0, 0, 100);\n ellipse(width / 2 + random(-2, 2), height / 2 + random(-2, 2), rad, rad);\n\n if (eqFeatureIndex >= earthquakes.features.length) {\n eqFeatureIndex = 0;\n } else {\n eqFeatureIndex += 1;\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "path",
+ "description": "name of the file or url to load",
+ "type": "String"
+ },
+ {
+ "name": "method",
+ "description": "either \"GET\", \"POST\", or \"PUT\",\ndefaults to \"GET\"",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "datatype",
+ "description": "\"json\", \"jsonp\", \"xml\", or \"text\"",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "data",
+ "description": "param data passed sent with request",
+ "optional": 1,
+ "type": "Object"
+ },
+ {
+ "name": "callback",
+ "description": "function to be executed after\nhttpGet() completes, data is passed in\nas first argument",
+ "optional": 1,
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "description": "function to be executed if\nthere is an error, response is passed\nin as first argument",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "A promise that resolves with the data when the operation\ncompletes successfully or rejects with the error after\none occurs.",
+ "type": "Promise"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "path",
+ "type": "String"
+ },
+ {
+ "name": "options",
+ "description": "Request object options as documented in the\n\"fetch\" API\nreference",
+ "type": "Object"
+ },
+ {
+ "name": "callback",
+ "optional": 1,
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Promise"
+ }
+ }
+ ],
+ "return": {
+ "description": "A promise that resolves with the data when the operation\ncompletes successfully or rejects with the error after\none occurs.",
+ "type": "Promise"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "createWriter",
+ "file": "src/io/files.js",
+ "line": 1140,
+ "itemtype": "method",
+ "description": "",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100);\n background(200);\n text('click here to save', 10, 10, 70, 80);\n}\n\nfunction mousePressed() {\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n const writer = createWriter('squares.txt');\n for (let i = 0; i < 10; i++) {\n writer.print(i * i);\n }\n writer.close();\n writer.clear();\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "name",
+ "description": "name of the file to be created",
+ "type": "String"
+ },
+ {
+ "name": "extension",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.PrintWriter"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.PrintWriter"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "write",
+ "file": "src/io/files.js",
+ "line": 1224,
+ "itemtype": "method",
+ "description": "Writes data to the PrintWriter stream",
+ "example": [
+ "\n\n// creates a file called 'newFile.txt'\nlet writer = createWriter('newFile.txt');\n// write 'Hello world!'' to the file\nwriter.write(['Hello world!']);\n// close the PrintWriter and save the file\nwriter.close();\n
\n\n\n\n// creates a file called 'newFile2.txt'\nlet writer = createWriter('newFile2.txt');\n// write 'apples,bananas,123' to the file\nwriter.write(['apples', 'bananas', 123]);\n// close the PrintWriter and save the file\nwriter.close();\n
\n\n\n\n// creates a file called 'newFile3.txt'\nlet writer = createWriter('newFile3.txt');\n// write 'My name is: Teddy' to the file\nwriter.write('My name is:');\nwriter.write(' Teddy');\n// close the PrintWriter and save the file\nwriter.close();\n
\n\n\n\nfunction setup() {\n createCanvas(100, 100);\n button = createButton('SAVE FILE');\n button.position(21, 40);\n button.mousePressed(createFile);\n}\n\nfunction createFile() {\n // creates a file called 'newFile.txt'\n let writer = createWriter('newFile.txt');\n // write 'Hello world!'' to the file\n writer.write(['Hello world!']);\n // close the PrintWriter and save the file\n writer.close();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "data",
+ "description": "all data to be written by the PrintWriter",
+ "type": "Array"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "close",
+ "file": "src/io/files.js",
+ "line": 1325,
+ "itemtype": "method",
+ "description": "Closes the PrintWriter",
+ "example": [
+ "\n\n// create a file called 'newFile.txt'\nlet writer = createWriter('newFile.txt');\n// close the PrintWriter and save the file\nwriter.close();\n
\n\n\n\n// create a file called 'newFile2.txt'\nlet writer = createWriter('newFile2.txt');\n// write some data to the file\nwriter.write([100, 101, 102]);\n// close the PrintWriter and save the file\nwriter.close();\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "save",
+ "file": "src/io/files.js",
+ "line": 1448,
+ "itemtype": "method",
+ "description": "Saves a given element(image, text, json, csv, wav, or html) to the client's\ncomputer. The first parameter can be a pointer to element we want to save.\nThe element can be one of p5.Element,an Array of\nStrings, an Array of JSON, a JSON object, a p5.Table\n, a p5.Image, or a p5.SoundFile (requires\np5.sound). The second parameter is a filename (including extension).The\nthird parameter is for options specific to this type of object. This method\nwill save a file that fits the given parameters.\nIf it is called without specifying an element, by default it will save the\nwhole canvas as an image file. You can optionally specify a filename as\nthe first parameter in such a case.\nNote that it is not recommended to\ncall this method within draw, as it will open a new save dialog on every\nrender.",
+ "example": [
+ "\n// Saves the canvas as an image\ncnv = createCanvas(300, 300);\nsave(cnv, 'myCanvas.jpg');\n\n// Saves the canvas as an image by default\nsave('myCanvas.jpg');\ndescribe('An example for saving a canvas as an image.');\n
\n\n\n// Saves p5.Image as an image\nimg = createImage(10, 10);\nsave(img, 'myImage.png');\ndescribe('An example for saving a p5.Image element as an image.');\n
\n\n\n// Saves p5.Renderer object as an image\nobj = createGraphics(100, 100);\nsave(obj, 'myObject.png');\ndescribe('An example for saving a p5.Renderer element.');\n
\n\n\nlet myTable = new p5.Table();\n// Saves table as html file\nsave(myTable, 'myTable.html');\n\n// Comma Separated Values\nsave(myTable, 'myTable.csv');\n\n// Tab Separated Values\nsave(myTable, 'myTable.tsv');\n\ndescribe(`An example showing how to save a table in formats of\n HTML, CSV and TSV.`);\n
\n\n\nlet myJSON = { a: 1, b: true };\n\n// Saves pretty JSON\nsave(myJSON, 'my.json');\n\n// Optimizes JSON filesize\nsave(myJSON, 'my.json', true);\n\ndescribe('An example for saving JSON to a txt file with some extra arguments.');\n
\n\n\n// Saves array of strings to text file with line breaks after each item\nlet arrayOfStrings = ['a', 'b'];\nsave(arrayOfStrings, 'my.txt');\ndescribe(`An example for saving an array of strings to text file\n with line breaks.`);\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "objectOrFilename",
+ "description": "If filename is provided, will\nsave canvas as an image with\neither png or jpg extension\ndepending on the filename.\nIf object is provided, will\nsave depending on the object\nand filename (see examples\nabove).",
+ "optional": 1,
+ "type": "Object|String"
+ },
+ {
+ "name": "filename",
+ "description": "If an object is provided as the first\nparameter, then the second parameter\nindicates the filename,\nand should include an appropriate\nfile extension (see examples above).",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "options",
+ "description": "Additional options depend on\nfiletype. For example, when saving JSON,\ntrue
indicates that the\noutput will be optimized for filesize,\nrather than readability.",
+ "optional": 1,
+ "type": "Boolean|String"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "saveJSON",
+ "file": "src/io/files.js",
+ "line": 1536,
+ "itemtype": "method",
+ "description": "Writes the contents of an Array or a JSON object to a .json file.\nThe file saving process and location of the saved file will\nvary between web browsers.",
+ "example": [
+ "\nlet json = {}; // new JSON Object\n\njson.id = 0;\njson.species = 'Panthera leo';\njson.name = 'Lion';\n\nfunction setup() {\n createCanvas(100, 100);\n background(200);\n text('click here to save', 10, 10, 70, 80);\n describe('no image displayed');\n}\n\nfunction mousePressed() {\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n saveJSON(json, 'lion.json');\n }\n}\n\n// saves the following to a file called \"lion.json\":\n// {\n// \"id\": 0,\n// \"species\": \"Panthera leo\",\n// \"name\": \"Lion\"\n// }\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "json",
+ "type": "Array|Object"
+ },
+ {
+ "name": "filename",
+ "type": "String"
+ },
+ {
+ "name": "optimize",
+ "description": "If true, removes line breaks\nand spaces from the output\nfile to optimize filesize\n(but not readability).",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "saveStrings",
+ "file": "src/io/files.js",
+ "line": 1588,
+ "itemtype": "method",
+ "description": "Writes an array of Strings to a text file, one line per String.\nThe file saving process and location of the saved file will\nvary between web browsers.",
+ "example": [
+ "\nlet words = 'apple bear cat dog';\n\n// .split() outputs an Array\nlet list = split(words, ' ');\n\nfunction setup() {\n createCanvas(100, 100);\n background(200);\n text('click here to save', 10, 10, 70, 80);\n describe('no image displayed');\n}\n\nfunction mousePressed() {\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n saveStrings(list, 'nouns.txt');\n }\n}\n\n// Saves the following to a file called 'nouns.txt':\n//\n// apple\n// bear\n// cat\n// dog\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "list",
+ "description": "string array to be written",
+ "type": "String[]"
+ },
+ {
+ "name": "filename",
+ "description": "filename for output",
+ "type": "String"
+ },
+ {
+ "name": "extension",
+ "description": "the filename's extension",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "isCRLF",
+ "description": "if true, change line-break to CRLF",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "saveTable",
+ "file": "src/io/files.js",
+ "line": 1650,
+ "itemtype": "method",
+ "description": "Writes the contents of a Table object to a file. Defaults to a\ntext file with comma-separated-values ('csv') but can also\nuse tab separation ('tsv'), or generate an HTML table ('html').\nThe file saving process and location of the saved file will\nvary between web browsers.",
+ "example": [
+ "\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('id');\n table.addColumn('species');\n table.addColumn('name');\n\n let newRow = table.addRow();\n newRow.setNum('id', table.getRowCount() - 1);\n newRow.setString('species', 'Panthera leo');\n newRow.setString('name', 'Lion');\n\n // To save, un-comment next line then click 'run'\n // saveTable(table, 'new.csv');\n\n describe('no image displayed');\n}\n\n// Saves the following to a file called 'new.csv':\n// id,species,name\n// 0,Panthera leo,Lion\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "Table",
+ "description": "the Table object to save to a file",
+ "type": "p5.Table"
+ },
+ {
+ "name": "filename",
+ "description": "the filename to which the Table should be saved",
+ "type": "String"
+ },
+ {
+ "name": "options",
+ "description": "can be one of \"tsv\", \"csv\", or \"html\"",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "abs",
+ "file": "src/math/calculation.js",
+ "line": 36,
+ "itemtype": "method",
+ "description": "Calculates the absolute value of a number. A number's absolute value is its\ndistance from zero on the number line. -5 and 5 are both five units away\nfrom zero, so calling abs(-5)
and abs(5)
both return 5. The absolute\nvalue of a number is always positive.",
+ "example": [
+ "\n\nfunction draw() {\n // Invert the y-axis.\n scale(1, -1);\n translate(0, -height);\n\n let centerX = width / 2;\n let x = frameCount;\n let y = abs(x - centerX);\n point(x, y);\n\n describe('A series of black dots that form a \"V\" shape.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "number to compute.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "absolute value of given number.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "absolute value of given number.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "ceil",
+ "file": "src/math/calculation.js",
+ "line": 66,
+ "itemtype": "method",
+ "description": "Calculates the closest integer value that is greater than or equal to the\nparameter's value. For example, calling ceil(9.03)
returns the value\n10.",
+ "example": [
+ "\n\n// Set the range for RGB values from 0 to 1.\ncolorMode(RGB, 1);\nnoStroke();\n\nlet r = 0.3;\nfill(r, 0, 0);\nrect(0, 0, width / 2, height);\n\n// Round r up to 1.\nr = ceil(r);\nfill(r, 0, 0);\nrect(width / 2, 0, width / 2, height);\n\ndescribe('Two rectangles. The one on the left is dark red and the one on the right is bright red.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "number to round up.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "rounded up number.",
+ "type": "Integer"
+ }
+ }
+ ],
+ "return": {
+ "description": "rounded up number.",
+ "type": "Integer"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "constrain",
+ "file": "src/math/calculation.js",
+ "line": 118,
+ "itemtype": "method",
+ "description": "Constrains a number between a minimum and maximum value.",
+ "example": [
+ "\n\nfunction draw() {\n background(200);\n\n let x = constrain(mouseX, 33, 67);\n let y = 50;\n\n strokeWeight(5);\n point(x, y);\n\n describe('A black dot drawn on a gray square follows the mouse from left to right. Its movement is constrained to the middle third of the square.');\n}\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n // Set boundaries and draw them.\n let leftWall = width * 0.25;\n let rightWall = width * 0.75;\n line(leftWall, 0, leftWall, height);\n line(rightWall, 0, rightWall, height);\n\n // Draw a circle that follows the mouse freely.\n fill(255);\n circle(mouseX, height / 3, 9);\n\n // Draw a circle that's constrained.\n let xc = constrain(mouseX, leftWall, rightWall);\n fill(0);\n circle(xc, 2 * height / 3, 9);\n\n describe('Two vertical lines. Two circles move horizontally with the mouse. One circle stops at the vertical lines.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "number to constrain.",
+ "type": "Number"
+ },
+ {
+ "name": "low",
+ "description": "minimum limit.",
+ "type": "Number"
+ },
+ {
+ "name": "high",
+ "description": "maximum limit.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "constrained number.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "constrained number.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "dist",
+ "file": "src/math/calculation.js",
+ "line": 172,
+ "itemtype": "method",
+ "description": "Calculates the distance between two points.
\nThe version of dist()
with four parameters calculates distance in two\ndimensions.
\nThe version of dist()
with six parameters calculates distance in three\ndimensions.
\nUse p5.Vector.dist() to calculate the\ndistance between two p5.Vector objects.
\n",
+ "example": [
+ "\n\nlet x1 = 10;\nlet y1 = 50;\nlet x2 = 90;\nlet y2 = 50;\n\nline(x1, y1, x2, y2);\nstrokeWeight(5);\npoint(x1, y1);\npoint(x2, y2);\n\nlet d = dist(x1, y1, x2, y2);\ntext(d, 43, 40);\n\ndescribe('Two dots connected by a horizontal line. The number 80 is written above the center of the line.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x1",
+ "description": "x-coordinate of the first point.",
+ "type": "Number"
+ },
+ {
+ "name": "y1",
+ "description": "y-coordinate of the first point.",
+ "type": "Number"
+ },
+ {
+ "name": "x2",
+ "description": "x-coordinate of the second point.",
+ "type": "Number"
+ },
+ {
+ "name": "y2",
+ "description": "y-coordinate of the second point.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "distance between the two points.",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "x1",
+ "type": "Number"
+ },
+ {
+ "name": "y1",
+ "type": "Number"
+ },
+ {
+ "name": "z1",
+ "description": "z-coordinate of the first point.",
+ "type": "Number"
+ },
+ {
+ "name": "x2",
+ "type": "Number"
+ },
+ {
+ "name": "y2",
+ "type": "Number"
+ },
+ {
+ "name": "z2",
+ "description": "z-coordinate of the second point.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "distance between the two points.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "distance between the two points.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "exp",
+ "file": "src/math/calculation.js",
+ "line": 209,
+ "itemtype": "method",
+ "description": "Returns Euler's number e (2.71828...) raised to the power of the n
\nparameter.",
+ "example": [
+ "\n\nfunction draw() {\n // Invert the y-axis.\n scale(1, -1);\n translate(0, -height);\n\n let x = frameCount;\n let y = 0.005 * exp(x * 0.1);\n point(x, y);\n\n describe('A series of black dots that grow exponentially from left to right.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "exponent to raise.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "e^n",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "e^n",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "floor",
+ "file": "src/math/calculation.js",
+ "line": 238,
+ "itemtype": "method",
+ "description": "Calculates the closest integer value that is less than or equal to the\nvalue of the n
parameter.",
+ "example": [
+ "\n\n// Set the range for RGB values from 0 to 1.\ncolorMode(RGB, 1);\nnoStroke();\n\nlet r = 0.8;\nfill(r, 0, 0);\nrect(0, 0, width / 2, height);\n\n// Round r down to 0.\nr = floor(r);\nfill(r, 0, 0);\nrect(width / 2, 0, width / 2, height);\n\ndescribe('Two rectangles. The one on the left is bright red and the one on the right is black.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "number to round down.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "rounded down number.",
+ "type": "Integer"
+ }
+ }
+ ],
+ "return": {
+ "description": "rounded down number.",
+ "type": "Integer"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "lerp",
+ "file": "src/math/calculation.js",
+ "line": 285,
+ "itemtype": "method",
+ "description": "Calculates a number between two numbers at a specific increment. The amt
\nparameter is the amount to interpolate between the two numbers. 0.0 is\nequal to the first number, 0.1 is very near the first number, 0.5 is\nhalf-way in between, and 1.0 is equal to the second number. The lerp()
\nfunction is convenient for creating motion along a straight path and for\ndrawing dotted lines.
\nIf the value of amt
is less than 0 or more than 1, lerp()
will return a\nnumber outside of the original interval. For example, calling\nlerp(0, 10, 1.5)
will return 15.
\n",
+ "example": [
+ "\n\nlet a = 20;\nlet b = 80;\nlet c = lerp(a, b, 0.2);\nlet d = lerp(a, b, 0.5);\nlet e = lerp(a, b, 0.8);\n\nlet y = 50;\n\nstrokeWeight(5);\n\n// Draw the original points in black.\nstroke(0);\npoint(a, y);\npoint(b, y);\n\n// Draw the lerped points in gray.\nstroke(100);\npoint(c, y);\npoint(d, y);\npoint(e, y);\n\ndescribe('Five points in a horizontal line. The outer points are black and the inner points are gray.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "start",
+ "description": "first value.",
+ "type": "Number"
+ },
+ {
+ "name": "stop",
+ "description": "second value.",
+ "type": "Number"
+ },
+ {
+ "name": "amt",
+ "description": "number.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "lerped value.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "lerped value.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "mag",
+ "file": "src/math/calculation.js",
+ "line": 343,
+ "itemtype": "method",
+ "description": "Calculates the magnitude, or length, of a vector. A vector is like an arrow\npointing in space. Vectors are commonly used for programming motion.
\nVectors don't have a \"start\" position because the same arrow can be drawn\nanywhere. A vector's magnitude can be thought of as the distance from the\norigin (0, 0) to its tip at (x, y). mag(x, y)
is a shortcut for calling\ndist(0, 0, x, y)
.
\n",
+ "example": [
+ "\n\nlet x = 30;\nlet y = 40;\nlet m = mag(x, y);\n\nline(0, 0, x, y);\ntext(m, x, y);\n\ndescribe('A diagonal line is drawn from the top left of the canvas. The number 50 is written at the end of the line.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "first component.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "second component.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "magnitude of vector from (0,0) to (x,y).",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "magnitude of vector from (0,0) to (x,y).",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "map",
+ "file": "src/math/calculation.js",
+ "line": 398,
+ "itemtype": "method",
+ "description": "Re-maps a number from one range to another.
\nFor example, calling map(2, 0, 10, 0, 100)
returns 20. The first three\narguments set the original value to 2 and the original range from 0 to 10.\nThe last two arguments set the target range from 0 to 100. 20's position\nin the target range [0, 100] is proportional to 2's position in the\noriginal range [0, 10].
\n",
+ "example": [
+ "\n\nlet n = map(7, 0, 10, 0, 100);\ntext(n, 50, 50);\n\ndescribe('The number 70 written in the middle of a gray square.');\n
\n\n\n\n\nlet x = map(2, 0, 10, 0, width);\ncircle(x, 50, 10);\n\ndescribe('A white circle drawn on the left side of a gray square.');\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let c = map(mouseX, 0, width, 0, 255);\n fill(c);\n circle(50, 50, 20);\n\n describe('A circle changes color from black to white as the mouse moves from left to right.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "the incoming value to be converted.",
+ "type": "Number"
+ },
+ {
+ "name": "start1",
+ "description": "lower bound of the value's current range.",
+ "type": "Number"
+ },
+ {
+ "name": "stop1",
+ "description": "upper bound of the value's current range.",
+ "type": "Number"
+ },
+ {
+ "name": "start2",
+ "description": "lower bound of the value's target range.",
+ "type": "Number"
+ },
+ {
+ "name": "stop2",
+ "description": "upper bound of the value's target range.",
+ "type": "Number"
+ },
+ {
+ "name": "withinBounds",
+ "description": "constrain the value to the newly mapped range.",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ],
+ "return": {
+ "description": "remapped number.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "remapped number.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "max",
+ "file": "src/math/calculation.js",
+ "line": 473,
+ "itemtype": "method",
+ "description": "Returns the largest value in a sequence of numbers.
\nThe version of max()
with one parameter interprets it as an array of\nnumbers and returns the largest number.
\nThe version of max()
with two or more parameters interprets them as\nindividual numbers and returns the largest number.
\n",
+ "example": [
+ "\n\nlet m = max(10, 20);\ntext(m, 50, 50);\n\ndescribe('The number 20 written in the middle of a gray square.');\n
\n\n\n\n\nlet m = max([10, 20]);\ntext(m, 50, 50);\n\ndescribe('The number 20 written in the middle of a gray square.');\n
\n\n\n\n\nlet numbers = [2, 1, 5, 4, 8, 9];\n\n// Draw all of the numbers in the array.\nnoStroke();\nlet spacing = 15;\nnumbers.forEach((n, index) => {\n let x = index * spacing;\n let y = 25;\n text(n, x, y);\n});\n\n// Draw the maximum value in the array.\nlet m = max(numbers);\nlet maxX = 33;\nlet maxY = 80;\n\ntextSize(32);\ntext(m, maxX, maxY);\n\ndescribe('The numbers 2 1 5 4 8 9 are written in small text at the top of a gray square. The number 9 is written in large text at the center of the square.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n0",
+ "description": "first number to compare.",
+ "type": "Number"
+ },
+ {
+ "name": "n1",
+ "description": "second number to compare.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "maximum number.",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "nums",
+ "description": "numbers to compare.",
+ "type": "Number[]"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "maximum number.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "min",
+ "file": "src/math/calculation.js",
+ "line": 551,
+ "itemtype": "method",
+ "description": "Returns the smallest value in a sequence of numbers.
\nThe version of min()
with one parameter interprets it as an array of\nnumbers and returns the smallest number.
\nThe version of min()
with two or more parameters interprets them as\nindividual numbers and returns the smallest number.
\n",
+ "example": [
+ "\n\nlet m = min(10, 20);\ntext(m, 50, 50);\n\ndescribe('The number 10 written in the middle of a gray square.');\n
\n\n\n\n\nlet m = min([10, 20]);\ntext(m, 50, 50);\n\ndescribe('The number 10 written in the middle of a gray square.');\n
\n\n\n\n\nlet numbers = [2, 1, 5, 4, 8, 9];\n\n// Draw all of the numbers in the array.\nnoStroke();\nlet spacing = 15;\nnumbers.forEach((n, index) => {\n let x = index * spacing;\n let y = 25;\n text(n, x, y);\n});\n\n// Draw the minimum value in the array.\nlet m = min(numbers);\nlet minX = 33;\nlet minY = 80;\n\ntextSize(32);\ntext(m, minX, minY);\n\ndescribe('The numbers 2 1 5 4 8 9 are written in small text at the top of a gray square. The number 1 is written in large text at the center of the square.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n0",
+ "description": "first number to compare.",
+ "type": "Number"
+ },
+ {
+ "name": "n1",
+ "description": "second number to compare.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "minimum number.",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "nums",
+ "description": "numbers to compare.",
+ "type": "Number[]"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "minimum number.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "norm",
+ "file": "src/math/calculation.js",
+ "line": 597,
+ "itemtype": "method",
+ "description": "Maps a number from one range to a value between 0 and 1.
\nFor example, norm(2, 0, 10)
returns 0.2. 2's position in the original\nrange [0, 10] is proportional to 0.2's position in the range [0, 1]. This\nis equivalent to calling map(2, 0, 10, 0, 1)
.
\nNumbers outside of the original range are not constrained between 0 and 1.\nOut-of-range values are often intentional and useful.
\n",
+ "example": [
+ "\n\nfunction draw() {\n // Set the range for RGB values from 0 to 1.\n colorMode(RGB, 1);\n\n let r = norm(mouseX, 0, width);\n background(r, 0, 0);\n\n describe('A square changes color from black to red as the mouse moves from left to right.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "incoming value to be normalized.",
+ "type": "Number"
+ },
+ {
+ "name": "start",
+ "description": "lower bound of the value's current range.",
+ "type": "Number"
+ },
+ {
+ "name": "stop",
+ "description": "upper bound of the value's current range.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "normalized number.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "normalized number.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "pow",
+ "file": "src/math/calculation.js",
+ "line": 634,
+ "itemtype": "method",
+ "description": "Calculates exponential expressions such as 2^3.
\nFor example, pow(2, 3)
is equivalent to the expression\n2 × 2 × 2. pow(2, -3)
is equivalent to 1 ÷\n(2 × 2 × 2).
\n",
+ "example": [
+ "\n\nlet base = 3;\n\nlet d = pow(base, 1);\ncircle(10, 10, d);\n\nd = pow(base, 2);\ncircle(20, 20, d);\n\nd = pow(base, 3);\ncircle(40, 40, d);\n\nd = pow(base, 4);\ncircle(80, 80, d);\n\ndescribe('A series of circles that grow exponentially from top left to bottom right.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "base of the exponential expression.",
+ "type": "Number"
+ },
+ {
+ "name": "e",
+ "description": "power by which to raise the base.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "n^e.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "n^e.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "round",
+ "file": "src/math/calculation.js",
+ "line": 663,
+ "itemtype": "method",
+ "description": "Calculates the integer closest to the n
parameter. For example,\nround(133.8)
returns the value 134.",
+ "example": [
+ "\n\nlet x = round(3.7);\ntext(x, width / 2, height / 2);\n\ndescribe('The number 4 written in middle of canvas.');\n
\n\n\n\n\nlet x = round(12.782383, 2);\ntext(x, width / 2, height / 2);\n\ndescribe('The number 12.78 written in middle of canvas.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "number to round.",
+ "type": "Number"
+ },
+ {
+ "name": "decimals",
+ "description": "number of decimal places to round to, default is 0.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "rounded number.",
+ "type": "Integer"
+ }
+ }
+ ],
+ "return": {
+ "description": "rounded number.",
+ "type": "Integer"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "sq",
+ "file": "src/math/calculation.js",
+ "line": 699,
+ "itemtype": "method",
+ "description": "Squares a number, which means multiplying the number by itself. The value\nreturned is always a positive number.
\nFor example, sq(3)
evaluates 3 × 3 which is 9. sq(-3)
evaluates\n-3 × -3 which is also 9. Multiplying two negative numbers produces\na positive number.
\n",
+ "example": [
+ "\n\nfunction draw() {\n // Invert the y-axis.\n scale(1, -1);\n translate(0, -height);\n\n let x = frameCount;\n let y = 0.01 * sq(x);\n point(x, y);\n\n describe('A series of black dots that get higher quickly from left to right.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "number to square.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "squared number.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "squared number.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "sqrt",
+ "file": "src/math/calculation.js",
+ "line": 729,
+ "itemtype": "method",
+ "description": "Calculates the square root of a number. A number's square root can be\nmultiplied by itself to produce the original number.
\nFor example, sqrt(9)
returns 3 because 3 × 3 = 9. sqrt()
always\nreturns a positive value. sqrt()
doesn't work with negative arguments\nsuch as sqrt(-9)
.
\n",
+ "example": [
+ "\n\nfunction draw() {\n // Invert the y-axis.\n scale(1, -1);\n translate(0, -height);\n\n let x = frameCount;\n let y = 5 * sqrt(x);\n point(x, y);\n\n describe('A series of black dots that get higher slowly from left to right.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "non-negative number to square root.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "square root of number.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "square root of number.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "fract",
+ "file": "src/math/calculation.js",
+ "line": 750,
+ "itemtype": "method",
+ "description": "Calculates the fractional part of a number. For example,\nfract(12.34)
returns 0.34.",
+ "example": [
+ "\n\nlet n = 56.78;\ntext(n, 20, 33);\nlet f = fract(n);\ntext(f, 20, 66);\n\ndescribe('The number 56.78 written above the number 0.78.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "number whose fractional part will be found.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "fractional part of n.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "fractional part of n.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Calculation"
+ },
+ {
+ "name": "createVector",
+ "file": "src/math/math.js",
+ "line": 74,
+ "itemtype": "method",
+ "description": "Creates a new p5.Vector object. A vector is like\nan arrow pointing in space. Vectors have both magnitude (length)\nand direction. Calling createVector()
without arguments sets the new\nvector's components to 0.
\np5.Vector objects are often used to program\nmotion because they simplify the math. For example, a moving ball has a\nposition and a velocity. Position describes where the ball is in space. The\nball's position vector extends from the origin to the ball's center.\nVelocity describes the ball's speed and the direction it's moving. If the\nball is moving straight up, its velocity vector points straight up. Adding\nthe ball's velocity vector to its position vector moves it, as in\npos.add(vel)
. Vector math relies on methods inside the\np5.Vector class.
\n",
+ "example": [
+ "\n\nlet p1 = createVector(25, 25);\nlet p2 = createVector(50, 50);\nlet p3 = createVector(75, 75);\n\nstrokeWeight(5);\npoint(p1);\npoint(p2);\npoint(p3);\n\ndescribe('Three black dots form a diagonal line from top left to bottom right.');\n
\n\n\n\n\nlet pos;\nlet vel;\n\nfunction setup() {\n createCanvas(100, 100);\n pos = createVector(width / 2, height);\n vel = createVector(0, -1);\n}\n\nfunction draw() {\n background(200);\n\n pos.add(vel);\n\n if (pos.y < 0) {\n pos.y = height;\n }\n\n strokeWeight(5);\n point(pos);\n\n describe('A black dot moves from bottom to top on a gray square. The dot reappears at the bottom when it reaches the top.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "new p5.Vector object.",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Vector object.",
+ "type": "p5.Vector"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "noise",
+ "file": "src/math/noise.js",
+ "line": 198,
+ "itemtype": "method",
+ "description": "Returns random numbers that can be tuned to feel more organic. The values\nreturned will always be between 0 and 1.
\nValues returned by random() and\nrandomGaussian() can change by large\namounts between function calls. By contrast, values returned by noise()
\ncan be made \"smooth\". Calls to noise()
with similar inputs will produce\nsimilar outputs. noise()
is used to create textures, motion, shapes,\nterrains, and so on. Ken Perlin invented noise()
while animating the\noriginal Tron film in the 1980s.
\nnoise()
returns the same value for a given input while a sketch is\nrunning. It produces different results each time a sketch runs. The\nnoiseSeed() function can be used to generate\nthe same sequence of Perlin noise values each time a sketch runs.
\nThe character of the noise can be adjusted in two ways. The first way is to\nscale the inputs. noise()
interprets inputs as coordinates. The sequence\nof noise values will be smoother when the input coordinates are closer. The\nsecond way is to use the noiseDetail()\nfunction.
\nThe version of noise()
with one parameter computes noise values in one\ndimension. This dimension can be thought of as space, as in noise(x)
, or\ntime, as in noise(t)
.
\nThe version of noise()
with two parameters computes noise values in two\ndimensions. These dimensions can be thought of as space, as in\nnoise(x, y)
, or space and time, as in noise(x, t)
.
\nThe version of noise()
with three parameters computes noise values in\nthree dimensions. These dimensions can be thought of as space, as in\nnoise(x, y, z)
, or space and time, as in noise(x, y, t)
.
\n",
+ "example": [
+ "\n\nfunction draw() {\n background(200);\n\n let x = 100 * noise(0.005 * frameCount);\n let y = 100 * noise(0.005 * frameCount + 10000);\n\n strokeWeight(5);\n point(x, y);\n\n describe('A black dot moves randomly on a gray square.');\n}\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let noiseLevel = 100;\n let noiseScale = 0.005;\n // Scale input coordinate.\n let nt = noiseScale * frameCount;\n // Compute noise value.\n let x = noiseLevel * noise(nt);\n let y = noiseLevel * noise(nt + 10000);\n // Render.\n strokeWeight(5);\n point(x, y);\n\n describe('A black dot moves randomly on a gray square.');\n}\n
\n\n\n\n\nfunction draw() {\n let noiseLevel = 100;\n let noiseScale = 0.02;\n // Scale input coordinate.\n let x = frameCount;\n let nx = noiseScale * x;\n // Compute noise value.\n let y = noiseLevel * noise(nx);\n // Render.\n line(x, 0, x, y);\n\n describe('A hilly terrain drawn in gray against a black sky.');\n}\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let noiseLevel = 100;\n let noiseScale = 0.002;\n for (let x = 0; x < width; x += 1) {\n // Scale input coordinates.\n let nx = noiseScale * x;\n let nt = noiseScale * frameCount;\n // Compute noise value.\n let y = noiseLevel * noise(nx, nt);\n // Render.\n line(x, 0, x, y);\n }\n\n describe('A calm sea drawn in gray against a black sky.');\n}\n
\n\n\n\n\nlet noiseLevel = 255;\nlet noiseScale = 0.01;\nfor (let y = 0; y < height; y += 1) {\n for (let x = 0; x < width; x += 1) {\n // Scale input coordinates.\n let nx = noiseScale * x;\n let ny = noiseScale * y;\n // Compute noise value.\n let c = noiseLevel * noise(nx, ny);\n // Render.\n stroke(c);\n point(x, y);\n }\n}\n\ndescribe('A gray cloudy pattern.');\n
\n\n\n\n\nfunction draw() {\n let noiseLevel = 255;\n let noiseScale = 0.009;\n for (let y = 0; y < height; y += 1) {\n for (let x = 0; x < width; x += 1) {\n // Scale input coordinates.\n let nx = noiseScale * x;\n let ny = noiseScale * y;\n let nt = noiseScale * frameCount;\n // Compute noise value.\n let c = noiseLevel * noise(nx, ny, nt);\n // Render.\n stroke(c);\n point(x, y);\n }\n }\n\n describe('A gray cloudy pattern that changes.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate in noise space.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate in noise space.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z-coordinate in noise space.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "Perlin noise value at specified coordinates.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "Perlin noise value at specified coordinates.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Noise"
+ },
+ {
+ "name": "noiseDetail",
+ "file": "src/math/noise.js",
+ "line": 327,
+ "itemtype": "method",
+ "description": "Adjusts the character of the noise produced by the\nnoise() function.
\nPerlin noise values are created by adding layers of noise together. The\nnoise layers, called octaves, are similar to harmonics in music. Lower\noctaves contribute more to the output signal. They define the overall\nintensity of the noise. Higher octaves create finer-grained details.
\nBy default, noise values are created by combining four octaves. Each higher\noctave contributes half as much (50% less) compared to its predecessor.\nnoiseDetail()
changes the number of octaves and the falloff amount. For\nexample, calling noiseDetail(6, 0.25)
ensures that\nnoise() will use six octaves. Each higher octave\nwill contribute 25% as much (75% less) compared to its predecessor. Falloff\nvalues between 0 and 1 are valid. However, falloff values greater than 0.5\nmight result in noise values greater than 1.
\n",
+ "example": [
+ "\n\nlet noiseLevel = 255;\nlet noiseScale = 0.02;\nfor (let y = 0; y < height; y += 1) {\n for (let x = 0; x < width / 2; x += 1) {\n // Scale input coordinates.\n let nx = noiseScale * x;\n let ny = noiseScale * y;\n\n // Compute noise value.\n noiseDetail(6, 0.25);\n let c = noiseLevel * noise(nx, ny);\n // Render left side.\n stroke(c);\n point(x, y);\n\n // Compute noise value.\n noiseDetail(4, 0.5);\n c = noiseLevel * noise(nx, ny);\n // Render right side.\n stroke(c);\n point(x + width / 2, y);\n }\n}\n\ndescribe('Two gray cloudy patterns. The pattern on the right is cloudier than the pattern on the left.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "lod",
+ "description": "number of octaves to be used by the noise.",
+ "type": "Number"
+ },
+ {
+ "name": "falloff",
+ "description": "falloff factor for each octave.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Noise"
+ },
+ {
+ "name": "noiseSeed",
+ "file": "src/math/noise.js",
+ "line": 368,
+ "itemtype": "method",
+ "description": "Sets the seed value for noise(). By default,\nnoise() produces different results each time\na sketch is run. Calling noiseSeed()
with a constant\nargument, such as noiseSeed(99)
, makes noise()\nproduce the same results each time a sketch is run.",
+ "example": [
+ "\n\nfunction setup() {\n noiseSeed(99);\n background(255);\n}\n\nfunction draw() {\n let noiseLevel = 100;\n let noiseScale = 0.005;\n // Scale input coordinate.\n let nt = noiseScale * frameCount;\n // Compute noise value.\n let x = noiseLevel * noise(nt);\n // Render.\n line(x, 0, x, height);\n\n describe('A black rectangle that grows randomly, first to the right and then to the left.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "seed",
+ "description": "seed value.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Noise"
+ },
+ {
+ "name": "randomSeed",
+ "file": "src/math/random.js",
+ "line": 64,
+ "itemtype": "method",
+ "description": "Sets the seed value for random() and\nrandomGaussian(). By default,\nrandom() and\nrandomGaussian() produce different\nresults each time a sketch is run. Calling randomSeed()
with a constant\nargument, such as randomSeed(99)
, makes these functions produce the same\nresults each time a sketch is run.",
+ "example": [
+ "\n\nlet x = random(width);\nlet y = random(height);\ncircle(x, y, 10);\n\nrandomSeed(99);\nx = random(width);\ny = random(height);\nfill(0);\ncircle(x, y, 10);\n\ndescribe('A white circle appears at a random position. A black circle appears at (27.4, 25.8).');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "seed",
+ "description": "seed value.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Random"
+ },
+ {
+ "name": "random",
+ "file": "src/math/random.js",
+ "line": 164,
+ "itemtype": "method",
+ "description": "Returns a random number or a random element from an array.
\nrandom()
follows uniform distribution, which means that all outcomes are\nequally likely. When random()
is used to generate numbers, all\nnumbers in the output range are equally likely to be returned. When\nrandom()
is used to select elements from an array, all elements are\nequally likely to be chosen.
\nBy default, random()
produces different results each time a sketch runs.\nThe randomSeed() function can be used to\ngenerate the same sequence of numbers or choices each time a sketch runs.
\nThe version of random()
with no parameters returns a random number from 0\nup to but not including 1.
\nThe version of random()
with one parameter works one of two ways. If the\nargument passed is a number, random()
returns a random number from 0 up\nto but not including the number. For example, calling random(5)
returns\nvalues between 0 and 5. If the argument passed is an array, random()
\nreturns a random element from that array. For example, calling\nrandom(['🦁', '🐯', '🐻'])
returns either a lion, tiger, or bear emoji.
\nThe version of random()
with two parameters returns a random number from\na given range. The arguments passed set the range's lower and upper bounds.\nFor example, calling random(-5, 10.2)
returns values from -5 up to but\nnot including 10.2.
\n",
+ "example": [
+ "\n\nlet x = random(width);\nlet y = random(height);\n\nstrokeWeight(5);\npoint(x, y);\n\ndescribe('A black dot appears in a random position on a gray square.');\n
\n\n\n\n\nlet animals = ['🦁', '🐯', '🐻'];\nlet animal = random(animals);\ntext(animal, 50, 50);\n\ndescribe('An animal face is displayed at random. Either a lion, tiger, or bear.');\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n frameRate(5);\n let x = random(width);\n let y = random(height);\n\n strokeWeight(5);\n point(x, y);\n\n describe('A black dot moves around randomly on a gray square.');\n}\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n frameRate(5);\n let x = random(45, 55);\n let y = random(45, 55);\n\n strokeWeight(5);\n point(x, y);\n\n describe('A black dot moves around randomly in the middle of a gray square.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "min",
+ "description": "lower bound (inclusive).",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "max",
+ "description": "upper bound (exclusive).",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "random number.",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "choices",
+ "description": "array to choose from.",
+ "type": "Array"
+ }
+ ],
+ "return": {
+ "description": "random element from the array."
+ }
+ }
+ ],
+ "return": {
+ "description": "random number.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Random"
+ },
+ {
+ "name": "randomGaussian",
+ "file": "src/math/random.js",
+ "line": 246,
+ "itemtype": "method",
+ "description": "Returns a random number fitting a Gaussian, or normal, distribution. Normal\ndistributions look like bell curves when plotted. Values from a normal\ndistribution cluster around a central value called the mean. The cluster's\nstandard deviation describes its spread.
\nBy default, randomGaussian()
produces different results each time a\nsketch runs. The randomSeed() function can be\nused to generate the same sequence of numbers each time a sketch runs.
\nThere's no minimum or maximum value that randomGaussian()
might return.\nValues far from the mean are very unlikely and values near the mean are\nvery likely.
\nThe version of randomGaussian()
with no parameters returns values with a\nmean of 0 and standard deviation of 1.
\nThe version of randomGaussian()
with one parameter interprets the\nargument passed as the mean. The standard deviation is 1.
\nThe version of randomGaussian()
with two parameters interprets the first\nargument passed as the mean and the second as the standard deviation.
\n",
+ "example": [
+ "\n\nfunction draw() {\n noStroke();\n fill(0, 10);\n\n // Uniform distribution.\n let x = random(width);\n let y = 25;\n circle(x, y, 5);\n\n // Gaussian distribution with sd = 1.\n x = randomGaussian(50);\n y = 50;\n circle(x, y, 5);\n\n // Gaussian distribution with sd = 10.\n x = randomGaussian(50, 10);\n y = 75;\n circle(x, y, 5);\n\n describe('Three horizontal black lines are filled in randomly. The top line spans entire canvas. The middle line is very short. The bottom line spans two-thirds of the canvas.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "mean",
+ "description": "mean.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "sd",
+ "description": "standard deviation.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "random number.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "random number.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Random"
+ },
+ {
+ "name": "acos",
+ "file": "src/math/trigonometry.js",
+ "line": 56,
+ "itemtype": "method",
+ "description": "The inverse of cos(), returns the arc cosine of a\nvalue. This function expects arguments in the range -1 to 1. By default,\nacos()
returns values in the range 0 to π (about 3.14). If the\nangleMode() is DEGREES
, then values are\nreturned in the range 0 to 180.",
+ "example": [
+ "\n\nlet a = PI + QUARTER_PI;\nlet c = cos(a);\nlet ac = acos(c);\ntext(`${round(a, 3)}`, 35, 25);\ntext(`${round(c, 3)}`, 35, 50);\ntext(`${round(ac, 3)}`, 35, 75);\n\ndescribe('The numbers 3.142, -1, and 3.142 written on separate rows.');\n
\n\n\n\n\nlet a = PI;\nlet c = cos(a);\nlet ac = acos(c);\ntext(`${round(a, 3)}`, 35, 25);\ntext(`${round(c, 3)}`, 35, 50);\ntext(`${round(ac, 3)}`, 35, 75);\n\ndescribe('The numbers 3.927, -0.707, and 2.356 written on separate rows.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "value whose arc cosine is to be returned.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "arc cosine of the given value.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "arc cosine of the given value.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Trigonometry"
+ },
+ {
+ "name": "asin",
+ "file": "src/math/trigonometry.js",
+ "line": 99,
+ "itemtype": "method",
+ "description": "The inverse of sin(), returns the arc sine of a\nvalue. This function expects input values in the range of -1 to 1. By\ndefault, asin()
returns values in the range -π ÷ 2\n(about -1.57) to π ÷ 2 (about 1.57). If the\nangleMode() is DEGREES
then values are\nreturned in the range -90 to 90.",
+ "example": [
+ "\n\nlet a = PI / 3;\nlet s = sin(a);\nlet as = asin(s);\ntext(`${round(a, 3)}`, 35, 25);\ntext(`${round(s, 3)}`, 35, 50);\ntext(`${round(as, 3)}`, 35, 75);\n\ndescribe('The numbers 1.047, 0.866, and 1.047 written on separate rows.');\n
\n\n\n\n\nlet a = PI + PI / 3;\nlet s = sin(a);\nlet as = asin(s);\ntext(`${round(a, 3)}`, 35, 25);\ntext(`${round(s, 3)}`, 35, 50);\ntext(`${round(as, 3)}`, 35, 75);\n\ndescribe('The numbers 4.189, -0.866, and -1.047 written on separate rows.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "value whose arc sine is to be returned.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "arc sine of the given value.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "arc sine of the given value.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Trigonometry"
+ },
+ {
+ "name": "atan",
+ "file": "src/math/trigonometry.js",
+ "line": 142,
+ "itemtype": "method",
+ "description": "The inverse of tan(), returns the arc tangent of a\nvalue. This function expects input values in the range of -Infinity to\nInfinity. By default, atan()
returns values in the range -π ÷ 2\n(about -1.57) to π ÷ 2 (about 1.57). If the\nangleMode() is DEGREES
then values are\nreturned in the range -90 to 90.",
+ "example": [
+ "\n\nlet a = PI / 3;\nlet t = tan(a);\nlet at = atan(t);\ntext(`${round(a, 3)}`, 35, 25);\ntext(`${round(t, 3)}`, 35, 50);\ntext(`${round(at, 3)}`, 35, 75);\n\ndescribe('The numbers 1.047, 1.732, and 1.047 written on separate rows.');\n
\n\n\n\n\nlet a = PI + PI / 3;\nlet t = tan(a);\nlet at = atan(t);\ntext(`${round(a, 3)}`, 35, 25);\ntext(`${round(t, 3)}`, 35, 50);\ntext(`${round(at, 3)}`, 35, 75);\n\ndescribe('The numbers 4.189, 1.732, and 1.047 written on separate rows.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "value whose arc tangent is to be returned.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "arc tangent of the given value.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "arc tangent of the given value.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Trigonometry"
+ },
+ {
+ "name": "atan2",
+ "file": "src/math/trigonometry.js",
+ "line": 179,
+ "itemtype": "method",
+ "description": "Calculates the angle formed by a specified point, the origin, and the\npositive x-axis. By default, atan2()
returns values in the range\n-π (about -3.14) to π (3.14). If the\nangleMode() is DEGREES
, then values are\nreturned in the range -180 to 180. The atan2()
function is most often\nused for orienting geometry to the mouse's position.
\nNote: The y-coordinate of the point is the first parameter and the\nx-coordinate is the second parameter.
\n",
+ "example": [
+ "\n\nfunction draw() {\n background(200);\n translate(width / 2, height / 2);\n let x = mouseX - width / 2;\n let y = mouseY - height / 2;\n let a = atan2(y, x);\n rotate(a);\n rect(-30, -5, 60, 10);\n\n describe('A rectangle at the center of the canvas rotates with mouse movements.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "y",
+ "description": "y-coordinate of the point.",
+ "type": "Number"
+ },
+ {
+ "name": "x",
+ "description": "x-coordinate of the point.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "arc tangent of the given point.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "arc tangent of the given point.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Trigonometry"
+ },
+ {
+ "name": "cos",
+ "file": "src/math/trigonometry.js",
+ "line": 235,
+ "itemtype": "method",
+ "description": "Calculates the cosine of an angle. cos()
is useful for many geometric\ntasks in creative coding. The values returned oscillate between -1 and 1\nas the input angle increases. cos()
takes into account the current\nangleMode.",
+ "example": [
+ "\n\nfunction draw() {\n background(200);\n\n let t = frameCount;\n let x = 30 * cos(t * 0.05) + 50;\n let y = 50;\n line(50, y, x, y);\n circle(x, y, 20);\n\n describe('A white ball on a string oscillates left and right.');\n}\n
\n\n\n\n\nfunction draw() {\n let x = frameCount;\n let y = 30 * cos(x * 0.1) + 50;\n point(x, y);\n\n describe('A series of black dots form a wave pattern.');\n}\n
\n\n\n\n\nfunction draw() {\n let t = frameCount;\n let x = 30 * cos(t * 0.1) + 50;\n let y = 10 * sin(t * 0.2) + 50;\n point(x, y);\n\n describe('A series of black dots form an infinity symbol.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "the angle.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "cosine of the angle.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "cosine of the angle.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Trigonometry"
+ },
+ {
+ "name": "sin",
+ "file": "src/math/trigonometry.js",
+ "line": 291,
+ "itemtype": "method",
+ "description": "Calculates the sine of an angle. sin()
is useful for many geometric tasks\nin creative coding. The values returned oscillate between -1 and 1 as the\ninput angle increases. sin()
takes into account the current\nangleMode.",
+ "example": [
+ "\n\nfunction draw() {\n background(200);\n\n let t = frameCount;\n let x = 50;\n let y = 30 * sin(t * 0.05) + 50;\n line(x, 50, x, y);\n circle(x, y, 20);\n\n describe('A white ball on a string oscillates up and down.');\n}\n
\n\n\n\n\nfunction draw() {\n let x = frameCount;\n let y = 30 * sin(x * 0.1) + 50;\n point(x, y);\n\n describe('A series of black dots form a wave pattern.');\n}\n
\n\n\n\n\nfunction draw() {\n let t = frameCount;\n let x = 30 * cos(t * 0.1) + 50;\n let y = 10 * sin(t * 0.2) + 50;\n point(x, y);\n\n describe('A series of black dots form an infinity symbol.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "the angle.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "sine of the angle.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "sine of the angle.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Trigonometry"
+ },
+ {
+ "name": "tan",
+ "file": "src/math/trigonometry.js",
+ "line": 318,
+ "itemtype": "method",
+ "description": "Calculates the tangent of an angle. tan()
is useful for many geometric\ntasks in creative coding. The values returned range from -Infinity\nto Infinity and repeat periodically as the input angle increases. tan()
\ntakes into account the current angleMode.",
+ "example": [
+ "\n\nfunction draw() {\n let x = frameCount;\n let y = 5 * tan(x * 0.1) + 50;\n point(x, y);\n\n describe('A series of identical curves drawn with black dots. Each curve starts from the top of the canvas, continues down at a slight angle, flattens out at the middle of the canvas, then continues to the bottom.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "the angle.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "tangent of the angle.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "tangent of the angle.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Trigonometry"
+ },
+ {
+ "name": "degrees",
+ "file": "src/math/trigonometry.js",
+ "line": 345,
+ "itemtype": "method",
+ "description": "Converts an angle measurement in radians to its corresponding value in\ndegrees. Degrees and radians are two ways of measuring the same thing.\nThere are 360 degrees in a circle and 2 × π (about 6.28)\nradians in a circle. For example, 90° = π ÷ 2 (about 1.57)\nradians. This function doesn't take into account the current\nangleMode().",
+ "example": [
+ "\n\nlet rad = QUARTER_PI;\nlet deg = degrees(rad);\ntext(`${round(rad, 2)} rad = ${deg}˚`, 10, 50);\n\ndescribe('The text \"0.79 rad = 45˚\".');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "radians",
+ "description": "radians value to convert to degrees.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "converted angle.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "converted angle.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Trigonometry"
+ },
+ {
+ "name": "radians",
+ "file": "src/math/trigonometry.js",
+ "line": 370,
+ "itemtype": "method",
+ "description": "Converts an angle measurement in degrees to its corresponding value in\nradians. Degrees and radians are two ways of measuring the same thing.\nThere are 360 degrees in a circle and 2 × π (about 6.28)\nradians in a circle. For example, 90° = π ÷ 2 (about 1.57)\nradians. This function doesn't take into account the current\nangleMode().",
+ "example": [
+ "\n\nlet deg = 45;\nlet rad = radians(deg);\ntext(`${deg}˚ = ${round(rad, 3)} rad`, 10, 50);\n\ndescribe('The text \"45˚ = 0.785 rad\".');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "degrees",
+ "description": "degree value to convert to radians.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "converted angle.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "converted angle.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Trigonometry"
+ },
+ {
+ "name": "angleMode",
+ "file": "src/math/trigonometry.js",
+ "line": 405,
+ "itemtype": "method",
+ "description": "Changes the way trigonometric functions interpret angle values. By default,\nthe mode is RADIANS
.
\nCalling angleMode()
with no arguments returns current angle mode.
\n",
+ "example": [
+ "\n\nlet r = 40;\npush();\nrotate(PI / 6);\nline(0, 0, r, 0);\ntext('0.524 rad', r, 0);\npop();\n\nangleMode(DEGREES);\npush();\nrotate(60);\nline(0, 0, r, 0);\ntext('60˚', r, 0);\npop();\n\ndescribe('Two diagonal lines radiating from the top left corner of a square. The lines are oriented 30 degrees from the edges of the square and 30 degrees apart from each other.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "mode",
+ "description": "either RADIANS or DEGREES.",
+ "type": "Constant"
+ }
+ ]
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "mode either RADIANS or DEGREES",
+ "type": "Constant"
+ }
+ }
+ ],
+ "return": {
+ "description": "mode either RADIANS or DEGREES",
+ "type": "Constant"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Math",
+ "submodule": "Trigonometry"
+ },
+ {
+ "name": "textAlign",
+ "file": "src/typography/attributes.js",
+ "line": 80,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the way text is aligned when text() is called.
\nBy default, calling text('hi', 10, 20)
places the bottom-left corner of\nthe text's bounding box at (10, 20).
\nThe first parameter, horizAlign
, changes the way\ntext() interprets x-coordinates. By default, the\nx-coordinate sets the left edge of the bounding box. textAlign()
accepts\nthe following values for horizAlign
: LEFT
, CENTER
, or RIGHT
.
\nThe second parameter, vertAlign
, is optional. It changes the way\ntext() interprets y-coordinates. By default, the\ny-coordinate sets the bottom edge of the bounding box. textAlign()
\naccepts the following values for vertAlign
: TOP
, BOTTOM
, CENTER
,\nor BASELINE
.
\n",
+ "example": [
+ "\n\nstrokeWeight(0.5);\nline(50, 0, 50, 100);\n\ntextSize(16);\ntextAlign(RIGHT);\ntext('ABCD', 50, 30);\ntextAlign(CENTER);\ntext('EFGH', 50, 50);\ntextAlign(LEFT);\ntext('IJKL', 50, 70);\n\ndescribe('The letters ABCD displayed at top-left, EFGH at center, and IJKL at bottom-right. A vertical line divides the canvas in half.');\n
\n\n\n\n\nstrokeWeight(0.5);\n\nline(0, 12, width, 12);\ntextAlign(CENTER, TOP);\ntext('TOP', 50, 12);\n\nline(0, 37, width, 37);\ntextAlign(CENTER, CENTER);\ntext('CENTER', 50, 37);\n\nline(0, 62, width, 62);\ntextAlign(CENTER, BASELINE);\ntext('BASELINE', 50, 62);\n\nline(0, 97, width, 97);\ntextAlign(CENTER, BOTTOM);\ntext('BOTTOM', 50, 97);\n\ndescribe('The words \"TOP\", \"CENTER\", \"BASELINE\", and \"BOTTOM\" each drawn relative to a horizontal line. Their positions demonstrate different vertical alignments.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "horizAlign",
+ "description": "horizontal alignment, either LEFT,\nCENTER, or RIGHT.",
+ "type": "Constant"
+ },
+ {
+ "name": "vertAlign",
+ "description": "vertical alignment, either TOP,\nBOTTOM, CENTER, or BASELINE.",
+ "optional": 1,
+ "type": "Constant"
+ }
+ ]
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Typography",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "textLeading",
+ "file": "src/typography/attributes.js",
+ "line": 114,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the spacing between lines of text when\ntext() is called. Spacing is measured in pixels.
\nCalling textLeading()
without an argument returns the current spacing.
\n",
+ "example": [
+ "\n\n// \"\\n\" starts a new line of text.\nlet lines = 'one\\ntwo';\n\ntext(lines, 10, 25);\n\ntextLeading(30);\ntext(lines, 70, 25);\n\ndescribe('The words \"one\" and \"two\" written on separate lines twice. The words on the left have less vertical spacing than the words on the right.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "leading",
+ "description": "spacing between lines of text in units of pixels.",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Typography",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "textSize",
+ "file": "src/typography/attributes.js",
+ "line": 147,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the font size when\ntext() is called. Font size is measured in pixels.
\nCalling textSize()
without an arugment returns the current size.
\n",
+ "example": [
+ "\n\ntextSize(12);\ntext('Font Size 12', 10, 30);\ntextSize(14);\ntext('Font Size 14', 10, 60);\ntextSize(16);\ntext('Font Size 16', 10, 90);\n\ndescribe('The text \"Font Size 12\" drawn small, \"Font Size 14\" drawn medium, and \"Font Size 16\" drawn large.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "size",
+ "description": "size of the letters in units of pixels",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Typography",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "textStyle",
+ "file": "src/typography/attributes.js",
+ "line": 187,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the style for system fonts when\ntext() is called. textStyle()
accepts the\nfollowing values: NORMAL
, ITALIC
, BOLD
or BOLDITALIC
.
\ntextStyle()
may be overridden by CSS styling. This function doesn't\naffect fonts loaded with loadFont().
\n",
+ "example": [
+ "\n\ntextSize(12);\ntextAlign(CENTER);\n\ntextStyle(NORMAL);\ntext('Normal', 50, 15);\ntextStyle(ITALIC);\ntext('Italic', 50, 40);\ntextStyle(BOLD);\ntext('Bold', 50, 65);\ntextStyle(BOLDITALIC);\ntext('Bold Italic', 50, 90);\n\ndescribe('The words \"Normal\" displayed normally, \"Italic\" in italic, \"Bold\" in bold, and \"Bold Italic\" in bold italics.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "style",
+ "description": "styling for text, either NORMAL,\nITALIC, BOLD or BOLDITALIC",
+ "type": "Constant"
+ }
+ ]
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Typography",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "textWidth",
+ "file": "src/typography/attributes.js",
+ "line": 235,
+ "itemtype": "method",
+ "description": "Returns the maximum width of a string of text drawn when\ntext() is called.",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n\n textSize(28);\n strokeWeight(0.5);\n let s = 'yoyo';\n let w = textWidth(s);\n text(s, 22, 55);\n line(22, 55, 22 + w, 55);\n\n describe('The word \"yoyo\" underlined.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n\n textSize(28);\n strokeWeight(0.5);\n // \"\\n\" starts a new line.\n let s = 'yo\\nyo';\n let w = textWidth(s);\n text(s, 22, 55);\n line(22, 55, 22 + w, 55);\n\n describe('The word \"yo\" written twice, one copy beneath the other. The words are divided by a horizontal line.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "str",
+ "description": "string of text to measure.",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "width measured in units of pixels.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "width measured in units of pixels.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Typography",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "textAscent",
+ "file": "src/typography/attributes.js",
+ "line": 305,
+ "itemtype": "method",
+ "description": "Returns the ascent of the current font at its current size. The ascent\nrepresents the distance, in pixels, of the tallest character above\nthe baseline.",
+ "example": [
+ "\n\nlet font;\n\nfunction preload() {\n font = loadFont('assets/inconsolata.otf');\n}\n\nfunction setup() {\n background(200);\n textFont(font);\n\n // Different for each font.\n let fontScale = 0.8;\n\n let baseY = 75;\n strokeWeight(0.5);\n\n // Draw small text.\n textSize(24);\n text('dp', 0, baseY);\n // Draw baseline and ascent.\n let a = textAscent() * fontScale;\n line(0, baseY, 23, baseY);\n line(23, baseY - a, 23, baseY);\n\n // Draw large text.\n textSize(48);\n text('dp', 45, baseY);\n // Draw baseline and ascent.\n a = textAscent() * fontScale;\n line(45, baseY, 91, baseY);\n line(91, baseY - a, 91, baseY);\n\n describe('The letters \"dp\" written twice in different sizes. Each version has a horizontal baseline. A vertical line extends upward from each baseline to the top of the \"d\".');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "ascent measured in units of pixels.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "ascent measured in units of pixels.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Typography",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "textDescent",
+ "file": "src/typography/attributes.js",
+ "line": 357,
+ "itemtype": "method",
+ "description": "Returns the descent of the current font at its current size. The descent\nrepresents the distance, in pixels, of the character with the longest\ndescender below the baseline.",
+ "example": [
+ "\n\nlet font;\n\nfunction preload() {\n font = loadFont('assets/inconsolata.otf');\n}\n\nfunction setup() {\n background(200);\n textFont(font);\n\n // Different for each font.\n let fontScale = 0.9;\n\n let baseY = 75;\n strokeWeight(0.5);\n\n // Draw small text.\n textSize(24);\n text('dp', 0, baseY);\n // Draw baseline and descent.\n let d = textDescent() * fontScale;\n line(0, baseY, 23, baseY);\n line(23, baseY, 23, baseY + d);\n\n // Draw large text.\n textSize(48);\n text('dp', 45, baseY);\n // Draw baseline and descent.\n d = textDescent() * fontScale;\n line(45, baseY, 91, baseY);\n line(91, baseY, 91, baseY + d);\n\n describe('The letters \"dp\" written twice in different sizes. Each version has a horizontal baseline. A vertical line extends downward from each baseline to the bottom of the \"p\".');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "descent measured in units of pixels.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "descent measured in units of pixels.",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Typography",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "textWrap",
+ "file": "src/typography/attributes.js",
+ "line": 414,
+ "itemtype": "method",
+ "description": "Sets the style for wrapping text when\ntext() is called. textWrap()
accepts the\nfollowing values:
\nWORD
starts new lines of text at spaces. If a string of text doesn't\nhave spaces, it may overflow the text box and the canvas. This is the\ndefault style.
\nCHAR
starts new lines as needed to stay within the text box.
\ntextWrap()
only works when the maximum width is set for a text box. For\nexample, calling text('Have a wonderful day', 0, 10, 100)
sets the\nmaximum width to 100 pixels.
\nCalling textWrap()
without an argument returns the current style.
\n",
+ "example": [
+ "\n\ntextSize(20);\ntextWrap(WORD);\ntext('Have a wonderful day', 0, 10, 100);\n
\n\n\n\n\ntextSize(20);\ntextWrap(CHAR);\ntext('Have a wonderful day', 0, 10, 100);\n
\n\n\n\n\ntextSize(20);\ntextWrap(CHAR);\ntext('祝你有美好的一天', 0, 10, 100);\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "style",
+ "description": "text wrapping style, either WORD or CHAR.",
+ "type": "Constant"
+ }
+ ],
+ "return": {
+ "description": "style",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "style",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Typography",
+ "submodule": "Attributes"
+ },
+ {
+ "name": "loadFont",
+ "file": "src/typography/loading_displaying.js",
+ "line": 129,
+ "itemtype": "method",
+ "description": "Loads a font and creates a p5.Font object.\nloadFont()
can load fonts in either .otf or .ttf format. Loaded fonts can\nbe used to style text on the canvas and in HTML elements.
\nThe first parameter, path
, is the path to a font file.\nPaths to local files should be relative. For example,\n'assets/inconsolata.otf'
. The Inconsolata font used in the following\nexamples can be downloaded for free\nhere.\nPaths to remote files should be URLs. For example,\n'https://example.com/inconsolata.otf'
. URLs may be blocked due to browser\nsecurity.
\nThe second parameter, successCallback
, is optional. If a function is\npassed, it will be called once the font has loaded. The callback function\nmay use the new p5.Font object if needed.
\nThe third parameter, failureCallback
, is also optional. If a function is\npassed, it will be called if the font fails to load. The callback function\nmay use the error\nEvent\nobject if needed.
\nFonts can take time to load. Calling loadFont()
in\npreload() ensures fonts load before they're\nused in setup() or\ndraw().
\n",
+ "example": [
+ "\n\nlet font;\n\nfunction preload() {\n font = loadFont('assets/inconsolata.otf');\n}\n\nfunction setup() {\n fill('deeppink');\n textFont(font);\n textSize(36);\n text('p5*js', 10, 50);\n\n describe('The text \"p5*js\" written in pink on a white background.');\n}\n
\n\n\n\n\nfunction setup() {\n loadFont('assets/inconsolata.otf', font => {\n fill('deeppink');\n textFont(font);\n textSize(36);\n text('p5*js', 10, 50);\n\n describe('The text \"p5*js\" written in pink on a white background.');\n });\n}\n
\n\n\n\n\nfunction setup() {\n loadFont('assets/inconsolata.otf', success, failure);\n}\n\nfunction success(font) {\n fill('deeppink');\n textFont(font);\n textSize(36);\n text('p5*js', 10, 50);\n\n describe('The text \"p5*js\" written in pink on a white background.');\n}\n\nfunction failure(event) {\n console.error('Oops!', event);\n}\n
\n\n\n\n\nfunction preload() {\n loadFont('assets/inconsolata.otf');\n}\n\nfunction setup() {\n let p = createP('p5*js');\n p.style('color', 'deeppink');\n p.style('font-family', 'Inconsolata');\n p.style('font-size', '36px');\n p.position(10, 50);\n\n describe('The text \"p5*js\" written in pink on a white background.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "path",
+ "description": "path of the font to be loaded.",
+ "type": "String"
+ },
+ {
+ "name": "successCallback",
+ "description": "function called with the\np5.Font object after it\nloads.",
+ "optional": 1,
+ "type": "Function"
+ },
+ {
+ "name": "failureCallback",
+ "description": "function called with the error\nEvent\nobject if the font fails to load.",
+ "optional": 1,
+ "type": "Function"
+ }
+ ],
+ "return": {
+ "description": "p5.Font object.",
+ "type": "p5.Font"
+ }
+ }
+ ],
+ "return": {
+ "description": "p5.Font object.",
+ "type": "p5.Font"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Typography",
+ "submodule": "Loading & Displaying"
+ },
+ {
+ "name": "text",
+ "file": "src/typography/loading_displaying.js",
+ "line": 328,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draws text to the canvas.
\nThe first parameter, str
, is the text to be drawn. The second and third\nparameters, x
and y
, set the coordinates of the text's bottom-left\ncorner. See textAlign() for other ways to\nalign text.
\nThe fourth and fifth parameters, maxWidth
and maxHeight
, are optional.\nThey set the dimensions of the invisible rectangle containing the text. By\ndefault, they set its maximum width and height. See\nrectMode() for other ways to define the\nrectangular text box. Text will wrap to fit within the text box. Text\noutside of the box won't be drawn.
\nText can be styled a few ways. Call the fill()\nfunction to set the text's fill color. Call\nstroke() and\nstrokeWeight() to set the text's outline.\nCall textSize() and\ntextFont() to set the text's size and font,\nrespectively.
\nNote: WEBGL
mode only supports fonts loaded with\nloadFont(). Calling\nstroke() has no effect in WEBGL
mode.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n text('hi', 50, 50);\n\n describe('The text \"hi\" written in black in the middle of a gray square.');\n}\n
\n\n\n\n\nfunction setup() {\n background('skyblue');\n textSize(100);\n text('🌈', 0, 100);\n\n describe('A rainbow in a blue sky.');\n}\n
\n\n\n\n\nfunction setup() {\n textSize(32);\n fill(255);\n stroke(0);\n strokeWeight(4);\n text('hi', 50, 50);\n\n describe('The text \"hi\" written in white with a black outline.');\n}\n
\n\n\n\n\nfunction setup() {\n background('black');\n textSize(22);\n fill('yellow');\n text('rainbows', 6, 20);\n fill('cornflowerblue');\n text('rainbows', 6, 45);\n fill('tomato');\n text('rainbows', 6, 70);\n fill('limegreen');\n text('rainbows', 6, 95);\n\n describe('The text \"rainbows\" written on several lines, each in a different color.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n let s = 'The quick brown fox jumps over the lazy dog.';\n text(s, 10, 10, 70, 80);\n\n describe('The sample text \"The quick brown fox...\" written in black across several lines.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n rectMode(CENTER);\n let s = 'The quick brown fox jumps over the lazy dog.';\n text(s, 50, 50, 70, 80);\n\n describe('The sample text \"The quick brown fox...\" written in black across several lines.');\n}\n
\n\n\n\n\nlet font;\n\nfunction preload() {\n font = loadFont('assets/inconsolata.otf');\n}\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n textFont(font);\n textSize(32);\n textAlign(CENTER, CENTER);\n}\n\nfunction draw() {\n background(0);\n rotateY(frameCount / 30);\n text('p5*js', 0, 0);\n\n describe('The text \"p5*js\" written in white and spinning in 3D.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "str",
+ "description": "text to be displayed.",
+ "type": "String|Object|Array|Number|Boolean"
+ },
+ {
+ "name": "x",
+ "description": "x-coordinate of the text box.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the text box.",
+ "type": "Number"
+ },
+ {
+ "name": "maxWidth",
+ "description": "maximum width of the text box. See\nrectMode() for\nother options.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "maxHeight",
+ "description": "maximum height of the text box. See\nrectMode() for\nother options.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Typography",
+ "submodule": "Loading & Displaying"
+ },
+ {
+ "name": "textFont",
+ "file": "src/typography/loading_displaying.js",
+ "line": 424,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the font used by the text() function.
\nThe first parameter, font
, sets the font. textFont()
recognizes either\na p5.Font object or a string with the name of a\nsystem font. For example, 'Courier New'
.
\nThe second parameter, size
, is optional. It sets the font size in pixels.\nThis has the same effect as calling textSize().
\nNote: WEBGL
mode only supports fonts loaded with\nloadFont().
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n textFont('Courier New');\n textSize(24);\n text('hi', 35, 55);\n\n describe('The text \"hi\" written in a black, monospace font on a gray background.');\n}\n
\n\n\n\n\nfunction setup() {\n background('black');\n fill('palegreen');\n textFont('Courier New', 10);\n text('You turn to the left and see a door. Do you enter?', 5, 5, 90, 90);\n text('>', 5, 70);\n\n describe('A text prompt from a game is written in a green, monospace font on a black background.');\n}\n
\n\n\n\n\nfunction setup() {\n background(200);\n textFont('Verdana');\n let currentFont = textFont();\n text(currentFont, 25, 50);\n\n describe('The text \"Verdana\" written in a black, sans-serif font on a gray background.');\n}\n
\n\n\n\n\nlet fontRegular;\nlet fontItalic;\nlet fontBold;\n\nfunction preload() {\n fontRegular = loadFont('assets/Regular.otf');\n fontItalic = loadFont('assets/Italic.ttf');\n fontBold = loadFont('assets/Bold.ttf');\n}\n\nfunction setup() {\n background(200);\n textFont(fontRegular);\n text('I am Normal', 10, 30);\n textFont(fontItalic);\n text('I am Italic', 10, 50);\n textFont(fontBold);\n text('I am Bold', 10, 70);\n\n describe('The statements \"I am Normal\", \"I am Italic\", and \"I am Bold\" written in black on separate lines. The statements have normal, italic, and bold fonts, respectively.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "current font or p5 Object.",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "font",
+ "description": "font as a p5.Font object or a string.",
+ "type": "Object|String"
+ },
+ {
+ "name": "size",
+ "description": "font size in pixels.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "return": {
+ "description": "current font or p5 Object.",
+ "type": "Object"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Typography",
+ "submodule": "Loading & Displaying"
+ },
+ {
+ "name": "append",
+ "file": "src/utilities/array_functions.js",
+ "line": 30,
+ "itemtype": "method",
+ "description": "Adds a value to the end of an array. Extends the length of\nthe array by one. Maps to Array.push().",
+ "example": [
+ "\nfunction setup() {\n let myArray = ['Mango', 'Apple', 'Papaya'];\n print(myArray); // ['Mango', 'Apple', 'Papaya']\n\n append(myArray, 'Peach');\n print(myArray); // ['Mango', 'Apple', 'Papaya', 'Peach']\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "array",
+ "description": "Array to append",
+ "type": "Array"
+ },
+ {
+ "name": "value",
+ "description": "to be added to the Array",
+ "type": "any"
+ }
+ ],
+ "return": {
+ "description": "the array that was appended to",
+ "type": "Array"
+ }
+ }
+ ],
+ "return": {
+ "description": "the array that was appended to",
+ "type": "Array"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Array Functions"
+ },
+ {
+ "name": "arrayCopy",
+ "file": "src/utilities/array_functions.js",
+ "line": 80,
+ "itemtype": "method",
+ "description": "Copies an array (or part of an array) to another array. The src array is\ncopied to the dst array, beginning at the position specified by\nsrcPosition and into the position specified by dstPosition. The number of\nelements to copy is determined by length. Note that copying values\noverwrites existing values in the destination array. To append values\ninstead of overwriting them, use concat().
\nThe simplified version with only two arguments, arrayCopy(src, dst),\ncopies an entire array to another of the same size. It is equivalent to\narrayCopy(src, 0, dst, 0, src.length).
\nUsing this function is far more efficient for copying array data than\niterating through a for() loop and copying each element individually.
\n",
+ "example": [
+ "\nlet src = ['A', 'B', 'C'];\nlet dst = [1, 2, 3];\nlet srcPosition = 1;\nlet dstPosition = 0;\nlet length = 2;\n\nprint(src); // ['A', 'B', 'C']\nprint(dst); // [ 1 , 2 , 3 ]\n\narrayCopy(src, srcPosition, dst, dstPosition, length);\nprint(dst); // ['B', 'C', 3]\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "src",
+ "description": "the source Array",
+ "type": "Array"
+ },
+ {
+ "name": "srcPosition",
+ "description": "starting position in the source Array",
+ "type": "Integer"
+ },
+ {
+ "name": "dst",
+ "description": "the destination Array",
+ "type": "Array"
+ },
+ {
+ "name": "dstPosition",
+ "description": "starting position in the destination Array",
+ "type": "Integer"
+ },
+ {
+ "name": "length",
+ "description": "number of Array elements to be copied",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "src",
+ "type": "Array"
+ },
+ {
+ "name": "dst",
+ "type": "Array"
+ },
+ {
+ "name": "length",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Array Functions"
+ },
+ {
+ "name": "concat",
+ "file": "src/utilities/array_functions.js",
+ "line": 139,
+ "itemtype": "method",
+ "description": "Concatenates two arrays, maps to Array.concat(). Does not modify the\ninput arrays.",
+ "example": [
+ "\nfunction setup() {\n let arr1 = ['A', 'B', 'C'];\n let arr2 = [1, 2, 3];\n\n print(arr1); // ['A','B','C']\n print(arr2); // [1,2,3]\n\n let arr3 = concat(arr1, arr2);\n\n print(arr1); // ['A','B','C']\n print(arr2); // [1, 2, 3]\n print(arr3); // ['A','B','C', 1, 2, 3]\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "a",
+ "description": "first Array to concatenate",
+ "type": "Array"
+ },
+ {
+ "name": "b",
+ "description": "second Array to concatenate",
+ "type": "Array"
+ }
+ ],
+ "return": {
+ "description": "concatenated array",
+ "type": "Array"
+ }
+ }
+ ],
+ "return": {
+ "description": "concatenated array",
+ "type": "Array"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Array Functions"
+ },
+ {
+ "name": "reverse",
+ "file": "src/utilities/array_functions.js",
+ "line": 159,
+ "itemtype": "method",
+ "description": "Reverses the order of an array, maps to Array.reverse()",
+ "example": [
+ "\nfunction setup() {\n let myArray = ['A', 'B', 'C'];\n print(myArray); // ['A','B','C']\n\n reverse(myArray);\n print(myArray); // ['C','B','A']\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "list",
+ "description": "Array to reverse",
+ "type": "Array"
+ }
+ ],
+ "return": {
+ "description": "the reversed list",
+ "type": "Array"
+ }
+ }
+ ],
+ "return": {
+ "description": "the reversed list",
+ "type": "Array"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Array Functions"
+ },
+ {
+ "name": "shorten",
+ "file": "src/utilities/array_functions.js",
+ "line": 180,
+ "itemtype": "method",
+ "description": "Decreases an array by one element and returns the shortened array,\nmaps to Array.pop().",
+ "example": [
+ "\nfunction setup() {\n let myArray = ['A', 'B', 'C'];\n print(myArray); // ['A', 'B', 'C']\n let newArray = shorten(myArray);\n print(myArray); // ['A','B','C']\n print(newArray); // ['A','B']\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "list",
+ "description": "Array to shorten",
+ "type": "Array"
+ }
+ ],
+ "return": {
+ "description": "shortened Array",
+ "type": "Array"
+ }
+ }
+ ],
+ "return": {
+ "description": "shortened Array",
+ "type": "Array"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Array Functions"
+ },
+ {
+ "name": "shuffle",
+ "file": "src/utilities/array_functions.js",
+ "line": 209,
+ "itemtype": "method",
+ "description": "Randomizes the order of the elements of an array. Implements\n\nFisher-Yates Shuffle Algorithm.",
+ "example": [
+ "\nfunction setup() {\n let regularArr = ['ABC', 'def', createVector(), TAU, Math.E];\n print(regularArr);\n shuffle(regularArr, true); // force modifications to passed array\n print(regularArr);\n\n // By default shuffle() returns a shuffled cloned array:\n let newArr = shuffle(regularArr);\n print(regularArr);\n print(newArr);\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "array",
+ "description": "Array to shuffle",
+ "type": "Array"
+ },
+ {
+ "name": "bool",
+ "description": "modify passed array",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ],
+ "return": {
+ "description": "shuffled Array",
+ "type": "Array"
+ }
+ }
+ ],
+ "return": {
+ "description": "shuffled Array",
+ "type": "Array"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Array Functions"
+ },
+ {
+ "name": "sort",
+ "file": "src/utilities/array_functions.js",
+ "line": 262,
+ "itemtype": "method",
+ "description": "Sorts an array of numbers from smallest to largest, or puts an array of\nwords in alphabetical order. The original array is not modified; a\nre-ordered array is returned. The count parameter states the number of\nelements to sort. For example, if there are 12 elements in an array and\ncount is set to 5, only the first 5 elements in the array will be sorted.",
+ "example": [
+ "\nfunction setup() {\n let words = ['banana', 'apple', 'pear', 'lime'];\n print(words); // ['banana', 'apple', 'pear', 'lime']\n let count = 4; // length of array\n\n words = sort(words, count);\n print(words); // ['apple', 'banana', 'lime', 'pear']\n}\n
\n\nfunction setup() {\n let numbers = [2, 6, 1, 5, 14, 9, 8, 12];\n print(numbers); // [2, 6, 1, 5, 14, 9, 8, 12]\n let count = 5; // Less than the length of the array\n\n numbers = sort(numbers, count);\n print(numbers); // [1,2,5,6,14,9,8,12]\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "list",
+ "description": "Array to sort",
+ "type": "Array"
+ },
+ {
+ "name": "count",
+ "description": "number of elements to sort, starting from 0",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "the sorted list",
+ "type": "Array"
+ }
+ }
+ ],
+ "return": {
+ "description": "the sorted list",
+ "type": "Array"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Array Functions"
+ },
+ {
+ "name": "splice",
+ "file": "src/utilities/array_functions.js",
+ "line": 301,
+ "itemtype": "method",
+ "description": "Inserts a value or an array of values into an existing array. The first\nparameter specifies the initial array to be modified, and the second\nparameter defines the data to be inserted. The third parameter is an index\nvalue which specifies the array position from which to insert data.\n(Remember that array index numbering starts at zero, so the first position\nis 0, the second position is 1, and so on.)",
+ "example": [
+ "\nfunction setup() {\n let myArray = [0, 1, 2, 3, 4];\n let insArray = ['A', 'B', 'C'];\n print(myArray); // [0, 1, 2, 3, 4]\n print(insArray); // ['A','B','C']\n\n splice(myArray, insArray, 3);\n print(myArray); // [0,1,2,'A','B','C',3,4]\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "list",
+ "description": "Array to splice into",
+ "type": "Array"
+ },
+ {
+ "name": "value",
+ "description": "value to be spliced in",
+ "type": "any"
+ },
+ {
+ "name": "position",
+ "description": "in the array from which to insert data",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "the list",
+ "type": "Array"
+ }
+ }
+ ],
+ "return": {
+ "description": "the list",
+ "type": "Array"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Array Functions"
+ },
+ {
+ "name": "subset",
+ "file": "src/utilities/array_functions.js",
+ "line": 336,
+ "itemtype": "method",
+ "description": "Extracts an array of elements from an existing array. The list parameter\ndefines the array from which the elements will be copied, and the start\nand count parameters specify which elements to extract. If no count is\ngiven, elements will be extracted from the start to the end of the array.\nWhen specifying the start, remember that the first array element is 0.\nThis function does not change the source array.",
+ "example": [
+ "\nfunction setup() {\n let myArray = [1, 2, 3, 4, 5];\n print(myArray); // [1, 2, 3, 4, 5]\n\n let sub1 = subset(myArray, 0, 3);\n let sub2 = subset(myArray, 2, 2);\n print(sub1); // [1,2,3]\n print(sub2); // [3,4]\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "list",
+ "description": "Array to extract from",
+ "type": "Array"
+ },
+ {
+ "name": "start",
+ "description": "position to begin",
+ "type": "Integer"
+ },
+ {
+ "name": "count",
+ "description": "number of values to extract",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "Array of extracted elements",
+ "type": "Array"
+ }
+ }
+ ],
+ "return": {
+ "description": "Array of extracted elements",
+ "type": "Array"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Array Functions"
+ },
+ {
+ "name": "float",
+ "file": "src/utilities/conversion.js",
+ "line": 35,
+ "itemtype": "method",
+ "description": "Converts a string to its floating point representation. The contents of a\nstring must resemble a number, or NaN (not a number) will be returned.\nFor example, float(\"1234.56\") evaluates to 1234.56, but float(\"giraffe\")\nwill return NaN.
\nWhen an array of values is passed in, then an array of floats of the same\nlength is returned.
\n",
+ "example": [
+ "\nlet str = '20';\nlet diameter = float(str);\nellipse(width / 2, height / 2, diameter, diameter);\ndescribe('20-by-20 white ellipse in the center of the canvas');\n
\n\nprint(float('10.31')); // 10.31\nprint(float('Infinity')); // Infinity\nprint(float('-Infinity')); // -Infinity\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "str",
+ "description": "float string to parse",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "floating point representation of string",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "floating point representation of string",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Conversion"
+ },
+ {
+ "name": "int",
+ "file": "src/utilities/conversion.js",
+ "line": 70,
+ "itemtype": "method",
+ "description": "Converts a boolean, string, or float to its integer representation.\nWhen an array of values is passed in, then an int array of the same length\nis returned.",
+ "example": [
+ "\nprint(int('10')); // 10\nprint(int(10.31)); // 10\nprint(int(-10)); // -10\nprint(int(true)); // 1\nprint(int(false)); // 0\nprint(int([false, true, '10.3', 9.8])); // [0, 1, 10, 9]\nprint(int(Infinity)); // Infinity\nprint(int('-Infinity')); // -Infinity\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "value to parse",
+ "type": "String|Boolean|Number"
+ },
+ {
+ "name": "radix",
+ "description": "the radix to convert to (default: 10)",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "integer representation of value",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "ns",
+ "description": "values to parse",
+ "type": "Array"
+ },
+ {
+ "name": "radix",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "integer representation of values",
+ "type": "Number[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "integer representation of value",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Conversion"
+ },
+ {
+ "name": "str",
+ "file": "src/utilities/conversion.js",
+ "line": 104,
+ "itemtype": "method",
+ "description": "Converts a boolean, string or number to its string representation.\nWhen an array of values is passed in, then an array of strings of the same\nlength is returned.",
+ "example": [
+ "\nprint(str('10')); // \"10\"\nprint(str(10.31)); // \"10.31\"\nprint(str(-10)); // \"-10\"\nprint(str(true)); // \"true\"\nprint(str(false)); // \"false\"\nprint(str([true, '10.3', 9.8])); // [ \"true\", \"10.3\", \"9.8\" ]\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "value to parse",
+ "type": "String|Boolean|Number|Array"
+ }
+ ],
+ "return": {
+ "description": "string representation of value",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "string representation of value",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Conversion"
+ },
+ {
+ "name": "boolean",
+ "file": "src/utilities/conversion.js",
+ "line": 132,
+ "itemtype": "method",
+ "description": "Converts a number or string to its boolean representation.\nFor a number, any non-zero value (positive or negative) evaluates to true,\nwhile zero evaluates to false. For a string, the value \"true\" evaluates to\ntrue, while any other value evaluates to false. When an array of number or\nstring values is passed in, then a array of booleans of the same length is\nreturned.",
+ "example": [
+ "\nprint(boolean(0)); // false\nprint(boolean(1)); // true\nprint(boolean('true')); // true\nprint(boolean('abcd')); // false\nprint(boolean([0, 12, 'true'])); // [false, true, true]\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "value to parse",
+ "type": "String|Boolean|Number|Array"
+ }
+ ],
+ "return": {
+ "description": "boolean representation of value",
+ "type": "Boolean"
+ }
+ }
+ ],
+ "return": {
+ "description": "boolean representation of value",
+ "type": "Boolean"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Conversion"
+ },
+ {
+ "name": "byte",
+ "file": "src/utilities/conversion.js",
+ "line": 171,
+ "itemtype": "method",
+ "description": "Converts a number, string representation of a number, or boolean to its byte\nrepresentation. A byte can be only a whole number between -128 and 127, so\nwhen a value outside of this range is converted, it wraps around to the\ncorresponding byte representation. When an array of number, string or boolean\nvalues is passed in, then an array of bytes the same length is returned.",
+ "example": [
+ "\nprint(byte(127)); // 127\nprint(byte(128)); // -128\nprint(byte(23.4)); // 23\nprint(byte('23.4')); // 23\nprint(byte('hello')); // NaN\nprint(byte(true)); // 1\nprint(byte([0, 255, '100'])); // [0, -1, 100]\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "value to parse",
+ "type": "String|Boolean|Number"
+ }
+ ],
+ "return": {
+ "description": "byte representation of value",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "ns",
+ "description": "values to parse",
+ "type": "Array"
+ }
+ ],
+ "return": {
+ "description": "array of byte representation of values",
+ "type": "Number[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "byte representation of value",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Conversion"
+ },
+ {
+ "name": "char",
+ "file": "src/utilities/conversion.js",
+ "line": 204,
+ "itemtype": "method",
+ "description": "Converts a number or string to its corresponding single-character\nstring representation. If a string parameter is provided, it is first\nparsed as an integer and then translated into a single-character string.\nWhen an array of number or string values is passed in, then an array of\nsingle-character strings of the same length is returned.",
+ "example": [
+ "\nprint(char(65)); // \"A\"\nprint(char('65')); // \"A\"\nprint(char([65, 66, 67])); // [ \"A\", \"B\", \"C\" ]\nprint(join(char([65, 66, 67]), '')); // \"ABC\"\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "value to parse",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "string representation of value",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "ns",
+ "description": "values to parse",
+ "type": "Array"
+ }
+ ],
+ "return": {
+ "description": "array of string representation of values",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "string representation of value",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Conversion"
+ },
+ {
+ "name": "unchar",
+ "file": "src/utilities/conversion.js",
+ "line": 235,
+ "itemtype": "method",
+ "description": "Converts a single-character string to its corresponding integer\nrepresentation. When an array of single-character string values is passed\nin, then an array of integers of the same length is returned.",
+ "example": [
+ "\nprint(unchar('A')); // 65\nprint(unchar(['A', 'B', 'C'])); // [ 65, 66, 67 ]\nprint(unchar(split('ABC', ''))); // [ 65, 66, 67 ]\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "value to parse",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "integer representation of value",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "ns",
+ "description": "values to parse",
+ "type": "Array"
+ }
+ ],
+ "return": {
+ "description": "integer representation of values",
+ "type": "Number[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "integer representation of value",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Conversion"
+ },
+ {
+ "name": "hex",
+ "file": "src/utilities/conversion.js",
+ "line": 269,
+ "itemtype": "method",
+ "description": "Converts a number to a string in its equivalent hexadecimal notation. If a\nsecond parameter is passed, it is used to set the number of characters to\ngenerate in the hexadecimal notation. When an array is passed in, an\narray of strings in hexadecimal notation of the same length is returned.",
+ "example": [
+ "\nprint(hex(255)); // \"000000FF\"\nprint(hex(255, 6)); // \"0000FF\"\nprint(hex([0, 127, 255], 6)); // [ \"000000\", \"00007F\", \"0000FF\" ]\nprint(Infinity); // \"FFFFFFFF\"\nprint(-Infinity); // \"00000000\"\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "value to parse",
+ "type": "Number"
+ },
+ {
+ "name": "digits",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "hexadecimal string representation of value",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "ns",
+ "description": "array of values to parse",
+ "type": "Number[]"
+ },
+ {
+ "name": "digits",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "hexadecimal string representation of values",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "hexadecimal string representation of value",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Conversion"
+ },
+ {
+ "name": "unhex",
+ "file": "src/utilities/conversion.js",
+ "line": 314,
+ "itemtype": "method",
+ "description": "Converts a string representation of a hexadecimal number to its equivalent\ninteger value. When an array of strings in hexadecimal notation is passed\nin, an array of integers of the same length is returned.",
+ "example": [
+ "\nprint(unhex('A')); // 10\nprint(unhex('FF')); // 255\nprint(unhex(['FF', 'AA', '00'])); // [ 255, 170, 0 ]\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "value to parse",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "integer representation of hexadecimal value",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "ns",
+ "description": "values to parse",
+ "type": "Array"
+ }
+ ],
+ "return": {
+ "description": "integer representations of hexadecimal value",
+ "type": "Number[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "integer representation of hexadecimal value",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "Conversion"
+ },
+ {
+ "name": "join",
+ "file": "src/utilities/string_functions.js",
+ "line": 34,
+ "itemtype": "method",
+ "description": "Combines an array of Strings into one String, each separated by the\ncharacter(s) used for the separator parameter. To join arrays of ints or\nfloats, it's necessary to first convert them to Strings using nf() or\nnfs().",
+ "example": [
+ "\n\nlet array = ['Hello', 'world!'];\nlet separator = ' ';\nlet message = join(array, separator);\ntext(message, 5, 50);\ndescribe('“Hello world!” displayed middle left of canvas.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "list",
+ "description": "array of Strings to be joined",
+ "type": "Array"
+ },
+ {
+ "name": "separator",
+ "description": "String to be placed between each item",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "joined String",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "joined String",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "String Functions"
+ },
+ {
+ "name": "match",
+ "file": "src/utilities/string_functions.js",
+ "line": 72,
+ "itemtype": "method",
+ "description": "This function is used to apply a regular expression to a piece of text,\nand return matching groups (elements found inside parentheses) as a\nString array. If there are no matches, a null value will be returned.\nIf no groups are specified in the regular expression, but the sequence\nmatches, an array of length 1 (with the matched text as the first element\nof the array) will be returned.
\nTo use the function, first check to see if the result is null. If the\nresult is null, then the sequence did not match at all. If the sequence\ndid match, an array is returned.
\nIf there are groups (specified by sets of parentheses) in the regular\nexpression, then the contents of each will be returned in the array.\nElement [0] of a regular expression match returns the entire matching\nstring, and the match groups start at element [1] (the first group is [1],\nthe second [2], and so on).
\n",
+ "example": [
+ "\n\nlet string = 'Hello p5js*!';\nlet regexp = 'p5js\\\\*';\nlet m = match(string, regexp);\ntext(m, 5, 50);\ndescribe('“p5js*” displayed middle left of canvas.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "str",
+ "description": "the String to be searched",
+ "type": "String"
+ },
+ {
+ "name": "regexp",
+ "description": "the regexp to be used for matching",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "Array of Strings found",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "Array of Strings found",
+ "type": "String[]"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "String Functions"
+ },
+ {
+ "name": "matchAll",
+ "file": "src/utilities/string_functions.js",
+ "line": 109,
+ "itemtype": "method",
+ "description": "This function is used to apply a regular expression to a piece of text,\nand return a list of matching groups (elements found inside parentheses)\nas a two-dimensional String array. If there are no matches, a null value\nwill be returned. If no groups are specified in the regular expression,\nbut the sequence matches, a two dimensional array is still returned, but\nthe second dimension is only of length one.
\nTo use the function, first check to see if the result is null. If the\nresult is null, then the sequence did not match at all. If the sequence\ndid match, a 2D array is returned.
\nIf there are groups (specified by sets of parentheses) in the regular\nexpression, then the contents of each will be returned in the array.\nAssuming a loop with counter variable i, element [i][0] of a regular\nexpression match returns the entire matching string, and the match groups\nstart at element [i][1] (the first group is [i][1], the second [i][2],\nand so on).
\n",
+ "example": [
+ "\n\nlet string = 'Hello p5js*! Hello world!';\nlet regexp = 'Hello';\nmatchAll(string, regexp);\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "str",
+ "description": "the String to be searched",
+ "type": "String"
+ },
+ {
+ "name": "regexp",
+ "description": "the regexp to be used for matching",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "2d Array of Strings found",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "2d Array of Strings found",
+ "type": "String[]"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "String Functions"
+ },
+ {
+ "name": "nf",
+ "file": "src/utilities/string_functions.js",
+ "line": 176,
+ "itemtype": "method",
+ "description": "Utility function for formatting numbers into strings. There are two\nversions: one for formatting floats, and one for formatting ints.
\nThe values for the digits, left, and right parameters should always\nbe positive integers.
\n(NOTE): Be cautious when using left and right parameters as it prepends numbers of 0's if the parameter\nif greater than the current length of the number.
\nFor example if number is 123.2 and left parameter passed is 4 which is greater than length of 123\n(integer part) i.e 3 than result will be 0123.2. Same case for right parameter i.e. if right is 3 than\nthe result will be 123.200.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n let num1 = 321;\n let num2 = -1321;\n\n noStroke();\n fill(0);\n textSize(16);\n\n text(nf(num1, 4, 2), 10, 30);\n text(nf(num2, 4, 2), 10, 80);\n // Draw dividing line\n stroke(120);\n line(0, 50, width, 50);\n\n describe('“0321.00” middle top, “-1321.00” middle bottom canvas');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "num",
+ "description": "the Number to format",
+ "type": "Number|String"
+ },
+ {
+ "name": "left",
+ "description": "number of digits to the left of the\ndecimal point",
+ "optional": 1,
+ "type": "Integer|String"
+ },
+ {
+ "name": "right",
+ "description": "number of digits to the right of the\ndecimal point",
+ "optional": 1,
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "formatted String",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "nums",
+ "description": "the Numbers to format",
+ "type": "Array"
+ },
+ {
+ "name": "left",
+ "optional": 1,
+ "type": "Integer|String"
+ },
+ {
+ "name": "right",
+ "optional": 1,
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "formatted Strings",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "formatted String",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "String Functions"
+ },
+ {
+ "name": "nfc",
+ "file": "src/utilities/string_functions.js",
+ "line": 257,
+ "itemtype": "method",
+ "description": "Utility function for formatting numbers into strings and placing\nappropriate commas to mark units of 1000. There are two versions: one\nfor formatting ints, and one for formatting an array of ints. The value\nfor the right parameter should always be a positive integer.",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n let num = 11253106.115;\n let numArr = [1, 1, 2];\n\n noStroke();\n fill(0);\n textSize(12);\n\n // Draw formatted numbers\n text(nfc(num, 4), 10, 30);\n text(nfc(numArr, 2), 10, 80);\n\n // Draw dividing line\n stroke(120);\n line(0, 50, width, 50);\n\n describe('“11,253,106.115” top middle and “1.00,1.00,2.00” displayed bottom mid');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "num",
+ "description": "the Number to format",
+ "type": "Number|String"
+ },
+ {
+ "name": "right",
+ "description": "number of digits to the right of the\ndecimal point",
+ "optional": 1,
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "formatted String",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "nums",
+ "description": "the Numbers to format",
+ "type": "Array"
+ },
+ {
+ "name": "right",
+ "optional": 1,
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "formatted Strings",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "formatted String",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "String Functions"
+ },
+ {
+ "name": "nfp",
+ "file": "src/utilities/string_functions.js",
+ "line": 334,
+ "itemtype": "method",
+ "description": "Utility function for formatting numbers into strings. Similar to nf() but\nputs a \"+\" in front of positive numbers and a \"-\" in front of negative\nnumbers. There are two versions: one for formatting floats, and one for\nformatting ints. The values for left, and right parameters\nshould always be positive integers.",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n let num1 = 11253106.115;\n let num2 = -11253106.115;\n\n noStroke();\n fill(0);\n textSize(12);\n\n // Draw formatted numbers\n text(nfp(num1, 4, 2), 10, 30);\n text(nfp(num2, 4, 2), 10, 80);\n\n // Draw dividing line\n stroke(120);\n line(0, 50, width, 50);\n\n describe('“+11253106.11” top middle and “-11253106.11” displayed bottom middle');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "num",
+ "description": "the Number to format",
+ "type": "Number"
+ },
+ {
+ "name": "left",
+ "description": "number of digits to the left of the decimal\npoint",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "right",
+ "description": "number of digits to the right of the\ndecimal point",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "formatted String",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "nums",
+ "description": "the Numbers to format",
+ "type": "Number[]"
+ },
+ {
+ "name": "left",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "right",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "formatted Strings",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "formatted String",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "String Functions"
+ },
+ {
+ "name": "nfs",
+ "file": "src/utilities/string_functions.js",
+ "line": 411,
+ "itemtype": "method",
+ "description": "Utility function for formatting numbers into strings. Similar to nf() but\nputs an additional \"_\" (space) in front of positive numbers just in case to align it with negative\nnumbers which includes \"-\" (minus) sign.
\nThe main usecase of nfs() can be seen when one wants to align the digits (place values) of a non-negative\nnumber with some negative number (See the example to get a clear picture).\nThere are two versions: one for formatting float, and one for formatting int.
\nThe values for the digits, left, and right parameters should always be positive integers.
\n(IMP): The result on the canvas basically the expected alignment can vary based on the typeface you are using.
\n(NOTE): Be cautious when using left and right parameters as it prepends numbers of 0's if the parameter\nif greater than the current length of the number.
\nFor example if number is 123.2 and left parameter passed is 4 which is greater than length of 123\n(integer part) i.e 3 than result will be 0123.2. Same case for right parameter i.e. if right is 3 than\nthe result will be 123.200.
\n",
+ "example": [
+ "\n\nfunction setup() {\n background(200);\n let num1 = 321;\n let num2 = -1321;\n\n noStroke();\n fill(0);\n textSize(16);\n\n // nfs() aligns num1 (positive number) with num2 (negative number) by\n // adding a blank space in front of the num1 (positive number)\n // [left = 4] in num1 add one 0 in front, to align the digits with num2\n // [right = 2] in num1 and num2 adds two 0's after both numbers\n // To see the differences check the example of nf() too.\n text(nfs(num1, 4, 2), 10, 30);\n text(nfs(num2, 4, 2), 10, 80);\n // Draw dividing line\n stroke(120);\n line(0, 50, width, 50);\n\n describe('“0321.00” top middle and “-1321.00” displayed bottom middle');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "num",
+ "description": "the Number to format",
+ "type": "Number"
+ },
+ {
+ "name": "left",
+ "description": "number of digits to the left of the decimal\npoint",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "right",
+ "description": "number of digits to the right of the\ndecimal point",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "formatted String",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "nums",
+ "description": "the Numbers to format",
+ "type": "Array"
+ },
+ {
+ "name": "left",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "right",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "formatted Strings",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "formatted String",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "String Functions"
+ },
+ {
+ "name": "split",
+ "file": "src/utilities/string_functions.js",
+ "line": 451,
+ "itemtype": "method",
+ "description": "The split() function maps to String.split(), it breaks a String into\npieces using a character or string as the delimiter. The delim parameter\nspecifies the character or characters that mark the boundaries between\neach piece. A String[] array is returned that contains each of the pieces.
\nThe splitTokens() function works in a similar fashion, except that it\nsplits using a range of characters instead of a specific character or\nsequence.
\n",
+ "example": [
+ "\n\nlet names = 'Pat,Xio,Alex';\nlet splitString = split(names, ',');\ntext(splitString[0], 5, 30);\ntext(splitString[1], 5, 50);\ntext(splitString[2], 5, 70);\ndescribe('“Pat” top left, “Xio” mid left, and “Alex” displayed bottom left');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "the String to be split",
+ "type": "String"
+ },
+ {
+ "name": "delim",
+ "description": "the String used to separate the data",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "Array of Strings",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "Array of Strings",
+ "type": "String[]"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "String Functions"
+ },
+ {
+ "name": "splitTokens",
+ "file": "src/utilities/string_functions.js",
+ "line": 482,
+ "itemtype": "method",
+ "description": "The splitTokens() function splits a String at one or many character\ndelimiters or \"tokens.\" The delim parameter specifies the character or\ncharacters to be used as a boundary.
\nIf no delim characters are specified, any whitespace character is used to\nsplit. Whitespace characters include tab (\\t), line feed (\\n), carriage\nreturn (\\r), form feed (\\f), and space.
\n",
+ "example": [
+ "\n\nfunction setup() {\n let myStr = 'Mango, Banana, Lime';\n let myStrArr = splitTokens(myStr, ',');\n\n print(myStrArr); // prints : [\"Mango\",\" Banana\",\" Lime\"]\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "the String to be split",
+ "type": "String"
+ },
+ {
+ "name": "delim",
+ "description": "list of individual Strings that will be used as\nseparators",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "Array of Strings",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "Array of Strings",
+ "type": "String[]"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "String Functions"
+ },
+ {
+ "name": "trim",
+ "file": "src/utilities/string_functions.js",
+ "line": 532,
+ "itemtype": "method",
+ "description": "Removes whitespace characters from the beginning and end of a String. In\naddition to standard whitespace characters such as space, carriage return,\nand tab, this function also removes the Unicode \"nbsp\" character.",
+ "example": [
+ "\n\nlet string = trim(' No new lines\\n ');\ntext(string + ' here', 2, 50);\ndescribe('“No new lines here” displayed center canvas');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "str",
+ "description": "a String to be trimmed",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "a trimmed String",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "strs",
+ "description": "an Array of Strings to be trimmed",
+ "type": "Array"
+ }
+ ],
+ "return": {
+ "description": "an Array of trimmed Strings",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "a trimmed String",
+ "type": "String"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Data",
+ "submodule": "String Functions"
+ },
+ {
+ "name": "day",
+ "file": "src/utilities/time_date.js",
+ "line": 25,
+ "itemtype": "method",
+ "description": "p5.js communicates with the clock on your computer. The day() function\nreturns the current day as a value from 1 - 31.",
+ "example": [
+ "\n\nlet d = day();\ntext('Current day: \\n' + d, 5, 50);\ndescribe('Current day is displayed');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "the current day",
+ "type": "Integer"
+ }
+ }
+ ],
+ "return": {
+ "description": "the current day",
+ "type": "Integer"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Time & Date"
+ },
+ {
+ "name": "hour",
+ "file": "src/utilities/time_date.js",
+ "line": 44,
+ "itemtype": "method",
+ "description": "p5.js communicates with the clock on your computer. The hour() function\nreturns the current hour as a value from 0 - 23.",
+ "example": [
+ "\n\nlet h = hour();\ntext('Current hour:\\n' + h, 5, 50);\ndescribe('Current hour is displayed');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "the current hour",
+ "type": "Integer"
+ }
+ }
+ ],
+ "return": {
+ "description": "the current hour",
+ "type": "Integer"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Time & Date"
+ },
+ {
+ "name": "minute",
+ "file": "src/utilities/time_date.js",
+ "line": 63,
+ "itemtype": "method",
+ "description": "p5.js communicates with the clock on your computer. The minute() function\nreturns the current minute as a value from 0 - 59.",
+ "example": [
+ "\n\nlet m = minute();\ntext('Current minute: \\n' + m, 5, 50);\ndescribe('Current minute is displayed');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "the current minute",
+ "type": "Integer"
+ }
+ }
+ ],
+ "return": {
+ "description": "the current minute",
+ "type": "Integer"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Time & Date"
+ },
+ {
+ "name": "millis",
+ "file": "src/utilities/time_date.js",
+ "line": 83,
+ "itemtype": "method",
+ "description": "Returns the number of milliseconds (thousandths of a second) since\nstarting the sketch (when setup()
is called). This information is often\nused for timing events and animation sequences.",
+ "example": [
+ "\n\nlet millisecond = millis();\ntext('Milliseconds \\nrunning: \\n' + millisecond, 5, 40);\ndescribe('number of milliseconds since sketch has started displayed');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "the number of milliseconds since starting the sketch",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "the number of milliseconds since starting the sketch",
+ "type": "Number"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Time & Date"
+ },
+ {
+ "name": "month",
+ "file": "src/utilities/time_date.js",
+ "line": 107,
+ "itemtype": "method",
+ "description": "p5.js communicates with the clock on your computer. The month() function\nreturns the current month as a value from 1 - 12.",
+ "example": [
+ "\n\nlet m = month();\ntext('Current month: \\n' + m, 5, 50);\ndescribe('Current month is displayed');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "the current month",
+ "type": "Integer"
+ }
+ }
+ ],
+ "return": {
+ "description": "the current month",
+ "type": "Integer"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Time & Date"
+ },
+ {
+ "name": "second",
+ "file": "src/utilities/time_date.js",
+ "line": 127,
+ "itemtype": "method",
+ "description": "p5.js communicates with the clock on your computer. The second() function\nreturns the current second as a value from 0 - 59.",
+ "example": [
+ "\n\nlet s = second();\ntext('Current second: \\n' + s, 5, 50);\ndescribe('Current second is displayed');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "the current second",
+ "type": "Integer"
+ }
+ }
+ ],
+ "return": {
+ "description": "the current second",
+ "type": "Integer"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Time & Date"
+ },
+ {
+ "name": "year",
+ "file": "src/utilities/time_date.js",
+ "line": 146,
+ "itemtype": "method",
+ "description": "p5.js communicates with the clock on your computer. The year() function\nreturns the current year as an integer (2014, 2015, 2016, etc).",
+ "example": [
+ "\n\nlet y = year();\ntext('Current year: \\n' + y, 5, 50);\ndescribe('Current year is displayed');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "the current year",
+ "type": "Integer"
+ }
+ }
+ ],
+ "return": {
+ "description": "the current year",
+ "type": "Integer"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "IO",
+ "submodule": "Time & Date"
+ },
+ {
+ "name": "beginGeometry",
+ "file": "src/webgl/3d_primitives.js",
+ "line": 85,
+ "itemtype": "method",
+ "description": "Starts creating a new p5.Geometry. Subsequent shapes drawn will be added\nto the geometry and then returned when\nendGeometry() is called. One can also use\nbuildGeometry() to pass a function that\ndraws shapes.
\nIf you need to draw complex shapes every frame which don't change over time,\ncombining them upfront with beginGeometry()
and endGeometry()
and then\ndrawing that will run faster than repeatedly drawing the individual pieces.
\n",
+ "example": [
+ "\n\nlet shapes;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n makeShapes();\n}\n\nfunction makeShapes() {\n beginGeometry();\n scale(0.18);\n\n push();\n translate(100, -50);\n scale(0.5);\n rotateX(PI/4);\n cone();\n pop();\n cone();\n\n beginShape();\n vertex(-20, -50);\n quadraticVertex(\n -40, -70,\n 0, -60\n );\n endShape();\n\n beginShape(TRIANGLE_STRIP);\n for (let y = 20; y <= 60; y += 10) {\n for (let x of [20, 60]) {\n vertex(x, y);\n }\n }\n endShape();\n\n beginShape();\n vertex(-100, -120);\n vertex(-120, -110);\n vertex(-105, -100);\n endShape();\n\n shapes = endGeometry();\n}\n\nfunction draw() {\n background(255);\n lights();\n orbitControl();\n model(shapes);\n}\n
\n"
+ ],
+ "alt": "A series of different flat, curved, and 3D shapes floating in space.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "endGeometry",
+ "file": "src/webgl/3d_primitives.js",
+ "line": 98,
+ "itemtype": "method",
+ "description": "Finishes creating a new p5.Geometry that was\nstarted using beginGeometry(). One can also\nuse buildGeometry() to pass a function that\ndraws shapes.",
+ "example": [],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "The model that was built.",
+ "type": "p5.Geometry"
+ }
+ }
+ ],
+ "return": {
+ "description": "The model that was built.",
+ "type": "p5.Geometry"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "buildGeometry",
+ "file": "src/webgl/3d_primitives.js",
+ "line": 163,
+ "itemtype": "method",
+ "description": "Creates a new p5.Geometry that contains all\nthe shapes drawn in a provided callback function. The returned combined shape\ncan then be drawn all at once using model().
\nIf you need to draw complex shapes every frame which don't change over time,\ncombining them with buildGeometry()
once and then drawing that will run\nfaster than repeatedly drawing the individual pieces.
\nOne can also draw shapes directly between\nbeginGeometry() and\nendGeometry() instead of using a callback\nfunction.
\n",
+ "example": [
+ "\n\nlet particles;\nlet button;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n button = createButton('New');\n button.mousePressed(makeParticles);\n makeParticles();\n}\n\nfunction makeParticles() {\n if (particles) freeGeometry(particles);\n\n particles = buildGeometry(() => {\n for (let i = 0; i < 60; i++) {\n push();\n translate(\n randomGaussian(0, 20),\n randomGaussian(0, 20),\n randomGaussian(0, 20)\n );\n sphere(5);\n pop();\n }\n });\n}\n\nfunction draw() {\n background(255);\n noStroke();\n lights();\n orbitControl();\n model(particles);\n}\n
\n"
+ ],
+ "alt": "A cluster of spheres.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "callback",
+ "description": "A function that draws shapes.",
+ "type": "Function"
+ }
+ ],
+ "return": {
+ "description": "The model that was built from the callback function.",
+ "type": "p5.Geometry"
+ }
+ }
+ ],
+ "return": {
+ "description": "The model that was built from the callback function.",
+ "type": "p5.Geometry"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "freeGeometry",
+ "file": "src/webgl/3d_primitives.js",
+ "line": 179,
+ "itemtype": "method",
+ "description": "Clears the resources of a model to free up browser memory. A model whose\nresources have been cleared can still be drawn, but the first time it is\ndrawn again, it might take longer.
\nThis method works on models generated with\nbuildGeometry() as well as those loaded\nfrom loadModel().
\n",
+ "example": [],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "geometry",
+ "description": "The geometry whose resources should be freed",
+ "type": "p5.Geometry"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "plane",
+ "file": "src/webgl/3d_primitives.js",
+ "line": 219,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draw a plane with given a width and height",
+ "example": [
+ "\n\n// draw a plane\n// with width 50 and height 50\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('a white plane with black wireframe lines');\n}\n\nfunction draw() {\n background(200);\n plane(50, 50);\n}\n
\n"
+ ],
+ "alt": "Nothing displayed on canvas\nRotating interior view of a box with sides that change color.\n3d red and green gradient.\nRotating interior view of a cylinder with sides that change color.\nRotating view of a cylinder with sides that change color.\n3d red and green gradient.\nrotating view of a multi-colored cylinder with concave sides.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "width",
+ "description": "width of the plane",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "height",
+ "description": "height of the plane",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "detailX",
+ "description": "Optional number of triangle\nsubdivisions in x-dimension",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "detailY",
+ "description": "Optional number of triangle\nsubdivisions in y-dimension",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "box",
+ "file": "src/webgl/3d_primitives.js",
+ "line": 300,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draw a box with given width, height and depth",
+ "example": [
+ "\n\n// draw a spinning box\n// with width, height and depth of 50\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n describe('a white box rotating in 3D space');\n}\n\nfunction draw() {\n background(200);\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n box(50);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "width",
+ "description": "width of the box",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "height",
+ "description": "height of the box",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "depth",
+ "description": "depth of the box",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "detailX",
+ "description": "Optional number of triangle\nsubdivisions in x-dimension",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "detailY",
+ "description": "Optional number of triangle\nsubdivisions in y-dimension",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "sphere",
+ "file": "src/webgl/3d_primitives.js",
+ "line": 464,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draw a sphere with given radius.
\nDetailX and detailY determines the number of subdivisions in the x-dimension\nand the y-dimension of a sphere. More subdivisions make the sphere seem\nsmoother. The recommended maximum values are both 24. Using a value greater\nthan 24 may cause a warning or slow down the browser.
\n",
+ "example": [
+ "\n\n// draw a sphere with radius 40\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('a white sphere with black wireframe lines');\n}\n\nfunction draw() {\n background(205, 102, 94);\n sphere(40);\n}\n
\n",
+ "\n\nlet detailX;\n// slide to see how detailX works\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n detailX = createSlider(3, 24, 3);\n detailX.position(10, height + 5);\n detailX.style('width', '80px');\n describe(\n 'a white sphere with low detail on the x-axis, including a slider to adjust detailX'\n );\n}\n\nfunction draw() {\n background(205, 105, 94);\n rotateY(millis() / 1000);\n sphere(40, detailX.value(), 16);\n}\n
\n",
+ "\n\nlet detailY;\n// slide to see how detailY works\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n detailY = createSlider(3, 16, 3);\n detailY.position(10, height + 5);\n detailY.style('width', '80px');\n describe(\n 'a white sphere with low detail on the y-axis, including a slider to adjust detailY'\n );\n}\n\nfunction draw() {\n background(205, 105, 94);\n rotateY(millis() / 1000);\n sphere(40, 16, detailY.value());\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "radius",
+ "description": "radius of circle",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "detailX",
+ "description": "optional number of subdivisions in x-dimension",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "detailY",
+ "description": "optional number of subdivisions in y-dimension",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "cylinder",
+ "file": "src/webgl/3d_primitives.js",
+ "line": 683,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draw a cylinder with given radius and height
\nDetailX and detailY determines the number of subdivisions in the x-dimension\nand the y-dimension of a cylinder. More subdivisions make the cylinder seem smoother.\nThe recommended maximum value for detailX is 24. Using a value greater than 24\nmay cause a warning or slow down the browser.
\n",
+ "example": [
+ "\n\n// draw a spinning cylinder\n// with radius 20 and height 50\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('a rotating white cylinder');\n}\n\nfunction draw() {\n background(205, 105, 94);\n rotateX(frameCount * 0.01);\n rotateZ(frameCount * 0.01);\n cylinder(20, 50);\n}\n
\n",
+ "\n\n// slide to see how detailX works\nlet detailX;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n detailX = createSlider(3, 24, 3);\n detailX.position(10, height + 5);\n detailX.style('width', '80px');\n describe(\n 'a rotating white cylinder with limited X detail, with a slider that adjusts detailX'\n );\n}\n\nfunction draw() {\n background(205, 105, 94);\n rotateY(millis() / 1000);\n cylinder(20, 75, detailX.value(), 1);\n}\n
\n",
+ "\n\n// slide to see how detailY works\nlet detailY;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n detailY = createSlider(1, 16, 1);\n detailY.position(10, height + 5);\n detailY.style('width', '80px');\n describe(\n 'a rotating white cylinder with limited Y detail, with a slider that adjusts detailY'\n );\n}\n\nfunction draw() {\n background(205, 105, 94);\n rotateY(millis() / 1000);\n cylinder(20, 75, 16, detailY.value());\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "radius",
+ "description": "radius of the surface",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "height",
+ "description": "height of the cylinder",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "detailX",
+ "description": "number of subdivisions in x-dimension;\ndefault is 24",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "detailY",
+ "description": "number of subdivisions in y-dimension;\ndefault is 1",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "bottomCap",
+ "description": "whether to draw the bottom of the cylinder",
+ "optional": 1,
+ "type": "Boolean"
+ },
+ {
+ "name": "topCap",
+ "description": "whether to draw the top of the cylinder",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "cone",
+ "file": "src/webgl/3d_primitives.js",
+ "line": 825,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draw a cone with given radius and height
\nDetailX and detailY determine the number of subdivisions in the x-dimension and\nthe y-dimension of a cone. More subdivisions make the cone seem smoother. The\nrecommended maximum value for detailX is 24. Using a value greater than 24\nmay cause a warning or slow down the browser.
\n",
+ "example": [
+ "\n\n// draw a spinning cone\n// with radius 40 and height 70\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('a rotating white cone');\n}\n\nfunction draw() {\n background(200);\n rotateX(frameCount * 0.01);\n rotateZ(frameCount * 0.01);\n cone(40, 70);\n}\n
\n",
+ "\n\n// slide to see how detailx works\nlet detailX;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n detailX = createSlider(3, 16, 3);\n detailX.position(10, height + 5);\n detailX.style('width', '80px');\n describe(\n 'a rotating white cone with limited X detail, with a slider that adjusts detailX'\n );\n}\n\nfunction draw() {\n background(205, 102, 94);\n rotateY(millis() / 1000);\n cone(30, 65, detailX.value(), 16);\n}\n
\n",
+ "\n\n// slide to see how detailY works\nlet detailY;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n detailY = createSlider(3, 16, 3);\n detailY.position(10, height + 5);\n detailY.style('width', '80px');\n describe(\n 'a rotating white cone with limited Y detail, with a slider that adjusts detailY'\n );\n}\n\nfunction draw() {\n background(205, 102, 94);\n rotateY(millis() / 1000);\n cone(30, 65, 16, detailY.value());\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "radius",
+ "description": "radius of the bottom surface",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "height",
+ "description": "height of the cone",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "detailX",
+ "description": "number of segments,\nthe more segments the smoother geometry\ndefault is 24",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "detailY",
+ "description": "number of segments,\nthe more segments the smoother geometry\ndefault is 1",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "cap",
+ "description": "whether to draw the base of the cone",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "ellipsoid",
+ "file": "src/webgl/3d_primitives.js",
+ "line": 946,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draw an ellipsoid with given radius
\nDetailX and detailY determine the number of subdivisions in the x-dimension and\nthe y-dimension of a cone. More subdivisions make the ellipsoid appear to be smoother.\nAvoid detail number above 150, it may crash the browser.
\n",
+ "example": [
+ "\n\n// draw an ellipsoid\n// with radius 30, 40 and 40.\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('a white 3d ellipsoid');\n}\n\nfunction draw() {\n background(205, 105, 94);\n ellipsoid(30, 40, 40);\n}\n
\n",
+ "\n\n// slide to see how detailX works\nlet detailX;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n detailX = createSlider(2, 24, 12);\n detailX.position(10, height + 5);\n detailX.style('width', '80px');\n describe(\n 'a rotating white ellipsoid with limited X detail, with a slider that adjusts detailX'\n );\n}\n\nfunction draw() {\n background(205, 105, 94);\n rotateY(millis() / 1000);\n ellipsoid(30, 40, 40, detailX.value(), 8);\n}\n
\n",
+ "\n\n// slide to see how detailY works\nlet detailY;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n detailY = createSlider(2, 24, 6);\n detailY.position(10, height + 5);\n detailY.style('width', '80px');\n describe(\n 'a rotating white ellipsoid with limited Y detail, with a slider that adjusts detailY'\n );\n}\n\nfunction draw() {\n background(205, 105, 9);\n rotateY(millis() / 1000);\n ellipsoid(30, 40, 40, 12, detailY.value());\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "radiusx",
+ "description": "x-radius of ellipsoid",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "radiusy",
+ "description": "y-radius of ellipsoid",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "radiusz",
+ "description": "z-radius of ellipsoid",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "detailX",
+ "description": "number of segments,\nthe more segments the smoother geometry\ndefault is 24. Avoid detail number above\n150, it may crash the browser.",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "detailY",
+ "description": "number of segments,\nthe more segments the smoother geometry\ndefault is 16. Avoid detail number above\n150, it may crash the browser.",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "torus",
+ "file": "src/webgl/3d_primitives.js",
+ "line": 1095,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Draw a torus with given radius and tube radius
\nDetailX and detailY determine the number of subdivisions in the x-dimension and\nthe y-dimension of a torus. More subdivisions make the torus appear to be smoother.\nThe default and maximum values for detailX and detailY are 24 and 16, respectively.\nSetting them to relatively small values like 4 and 6 allows you to create new\nshapes other than a torus.
\n",
+ "example": [
+ "\n\n// draw a spinning torus\n// with ring radius 30 and tube radius 15\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n describe('a rotating white torus');\n}\n\nfunction draw() {\n background(205, 102, 94);\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n torus(30, 15);\n}\n
\n",
+ "\n\n// slide to see how detailX works\nlet detailX;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n detailX = createSlider(3, 24, 3);\n detailX.position(10, height + 5);\n detailX.style('width', '80px');\n describe(\n 'a rotating white torus with limited X detail, with a slider that adjusts detailX'\n );\n}\n\nfunction draw() {\n background(205, 102, 94);\n rotateY(millis() / 1000);\n torus(30, 15, detailX.value(), 12);\n}\n
\n",
+ "\n\n// slide to see how detailY works\nlet detailY;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n detailY = createSlider(3, 16, 3);\n detailY.position(10, height + 5);\n detailY.style('width', '80px');\n describe(\n 'a rotating white torus with limited Y detail, with a slider that adjusts detailY'\n );\n}\n\nfunction draw() {\n background(205, 102, 94);\n rotateY(millis() / 1000);\n torus(30, 15, 16, detailY.value());\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "radius",
+ "description": "radius of the whole ring",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "tubeRadius",
+ "description": "radius of the tube",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "detailX",
+ "description": "number of segments in x-dimension,\nthe more segments the smoother geometry\ndefault is 24",
+ "optional": 1,
+ "type": "Integer"
+ },
+ {
+ "name": "detailY",
+ "description": "number of segments in y-dimension,\nthe more segments the smoother geometry\ndefault is 16",
+ "optional": 1,
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "orbitControl",
+ "file": "src/webgl/interaction.js",
+ "line": 71,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Allows movement around a 3D sketch using a mouse or trackpad or touch.\nLeft-clicking and dragging or swipe motion will rotate the camera position\nabout the center of the sketch, right-clicking and dragging or multi-swipe\nwill pan the camera position without rotation, and using the mouse wheel\n(scrolling) or pinch in/out will move the camera further or closer\nfrom the center of the sketch. This function can be called with parameters\ndictating sensitivity to mouse/touch movement along the X and Y axes.\nCalling this function without parameters is equivalent to calling\norbitControl(1,1). To reverse direction of movement in either axis,\nenter a negative number for sensitivity.",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n normalMaterial();\n describe(\n 'Camera orbits around a box when mouse is hold-clicked & then moved.'\n );\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n}\nfunction draw() {\n background(200);\n\n // If you execute the line commented out instead of next line, the direction of rotation\n // will be the direction the mouse or touch pointer moves, not around the X or Y axis.\n orbitControl();\n // orbitControl(1, 1, 1, {freeRotation: true});\n\n rotateY(0.5);\n box(30, 50);\n}\n
\n"
+ ],
+ "alt": "Camera orbits around a box when mouse is hold-clicked & then moved.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "sensitivityX",
+ "description": "sensitivity to mouse movement along X axis",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "sensitivityY",
+ "description": "sensitivity to mouse movement along Y axis",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "sensitivityZ",
+ "description": "sensitivity to scroll movement along Z axis",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "options",
+ "description": "An optional object that can contain additional settings,\ndisableTouchActions - Boolean, default value is true.\nSetting this to true makes mobile interactions smoother by preventing\naccidental interactions with the page while orbiting. But if you're already\ndoing it via css or want the default touch actions, consider setting it to false.\nfreeRotation - Boolean, default value is false.\nBy default, horizontal movement of the mouse or touch pointer rotates the camera\naround the y-axis, and vertical movement rotates the camera around the x-axis.\nBut if setting this option to true, the camera always rotates in the direction\nthe pointer is moving. For zoom and move, the behavior is the same regardless of\ntrue/false.",
+ "optional": 1,
+ "type": "Object"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Interaction"
+ },
+ {
+ "name": "debugMode",
+ "file": "src/webgl/interaction.js",
+ "line": 564,
+ "itemtype": "method",
+ "description": "debugMode() helps visualize 3D space by adding a grid to indicate where the\n‘ground’ is in a sketch and an axes icon which indicates the +X, +Y, and +Z\ndirections. This function can be called without parameters to create a\ndefault grid and axes icon, or it can be called according to the examples\nabove to customize the size and position of the grid and/or axes icon. The\ngrid is drawn using the most recently set stroke color and weight. To\nspecify these parameters, add a call to stroke() and strokeWeight()\njust before the end of the draw() loop.
\nBy default, the grid will run through the origin (0,0,0) of the sketch\nalong the XZ plane\nand the axes icon will be offset from the origin. Both the grid and axes\nicon will be sized according to the current canvas size. Note that because the\ngrid runs parallel to the default camera view, it is often helpful to use\ndebugMode along with orbitControl to allow full view of the grid.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n normalMaterial();\n debugMode();\n describe(\n 'a 3D box is centered on a grid in a 3D sketch. an icon indicates the direction of each axis: a red line points +X, a green line +Y, and a blue line +Z. the grid and icon disappear when the spacebar is pressed.'\n );\n}\n\nfunction draw() {\n background(200);\n orbitControl();\n box(15, 30);\n // Press the spacebar to turn debugMode off!\n if (keyIsDown(32)) {\n noDebugMode();\n }\n}\n
\n",
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n normalMaterial();\n debugMode(GRID);\n describe('a 3D box is centered on a grid in a 3D sketch.');\n}\n\nfunction draw() {\n background(200);\n orbitControl();\n box(15, 30);\n}\n
\n",
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n normalMaterial();\n debugMode(AXES);\n describe(\n 'a 3D box is centered in a 3D sketch. an icon indicates the direction of each axis: a red line points +X, a green line +Y, and a blue line +Z.'\n );\n}\n\nfunction draw() {\n background(200);\n orbitControl();\n box(15, 30);\n}\n
\n",
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n normalMaterial();\n debugMode(GRID, 100, 10, 0, 0, 0);\n describe('a 3D box is centered on a grid in a 3D sketch');\n}\n\nfunction draw() {\n background(200);\n orbitControl();\n box(15, 30);\n}\n
\n",
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n normalMaterial();\n debugMode(100, 10, 0, 0, 0, 20, 0, -40, 0);\n describe(\n 'a 3D box is centered on a grid in a 3D sketch. an icon indicates the direction of each axis: a red line points +X, a green line +Y, and a blue line +Z.'\n );\n}\n\nfunction draw() {\n noStroke();\n background(200);\n orbitControl();\n box(15, 30);\n // set the stroke color and weight for the grid!\n stroke(255, 0, 150);\n strokeWeight(0.8);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "mode",
+ "description": "either GRID or AXES",
+ "type": "Constant"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "mode",
+ "type": "Constant"
+ },
+ {
+ "name": "gridSize",
+ "description": "size of one side of the grid",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "gridDivisions",
+ "description": "number of divisions in the grid",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "xOff",
+ "description": "X axis offset from origin (0,0,0)",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "yOff",
+ "description": "Y axis offset from origin (0,0,0)",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "zOff",
+ "description": "Z axis offset from origin (0,0,0)",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "mode",
+ "type": "Constant"
+ },
+ {
+ "name": "axesSize",
+ "description": "size of axes icon",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "xOff",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "yOff",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "zOff",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "gridSize",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "gridDivisions",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "gridXOff",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "gridYOff",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "gridZOff",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "axesSize",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "axesXOff",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "axesYOff",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "axesZOff",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Interaction"
+ },
+ {
+ "name": "noDebugMode",
+ "file": "src/webgl/interaction.js",
+ "line": 636,
+ "itemtype": "method",
+ "description": "Turns off debugMode() in a 3D sketch.",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n normalMaterial();\n debugMode();\n describe(\n 'a 3D box is centered on a grid in a 3D sketch. an icon indicates the direction of each axis: a red line points +X, a green line +Y, and a blue line +Z. the grid and icon disappear when the spacebar is pressed.'\n );\n}\n\nfunction draw() {\n background(200);\n orbitControl();\n box(15, 30);\n // Press the spacebar to turn debugMode off!\n if (keyIsDown(32)) {\n noDebugMode();\n }\n}\n
\n"
+ ],
+ "alt": "a 3D box is centered on a grid in a 3D sketch. an icon\nindicates the direction of each axis: a red line points +X,\na green line +Y, and a blue line +Z. the grid and icon disappear when the\nspacebar is pressed.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Interaction"
+ },
+ {
+ "name": "ambientLight",
+ "file": "src/webgl/light.js",
+ "line": 118,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Creates an ambient light with the given color.
\nAmbient light does not come from a specific direction.\nObjects are evenly lit from all sides. Ambient lights are\nalmost always used in combination with other types of lights.
\nNote: lights need to be called (whether directly or indirectly)\nwithin draw() to remain persistent in a looping program.\nPlacing them in setup() will cause them to only have an effect\nthe first time through the loop.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n noStroke();\n describe('sphere with coral color under black light');\n}\nfunction draw() {\n background(100);\n ambientLight(0); // black light (no light)\n ambientMaterial(255, 127, 80); // coral material\n sphere(40);\n}\n
\n",
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n noStroke();\n describe('sphere with coral color under white light');\n}\nfunction draw() {\n background(100);\n ambientLight(255); // white light\n ambientMaterial(255, 127, 80); // coral material\n sphere(40);\n}\n
\n",
+ "\n\nfunction setup() {\n createCanvas(100,100,WEBGL);\n camera(0,-100,300);\n}\nfunction draw() {\n background(230);\n ambientMaterial(237,34,93); //Pink Material\n ambientLight(mouseY);\n //As you move the mouse up to down it changes from no ambient light to full ambient light.\n rotateY(millis()/2000);\n box(100);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "red or hue value relative to\nthe current color range",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "description": "green or saturation value\nrelative to the current color range",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "description": "blue or brightness value\nrelative to the current color range",
+ "type": "Number"
+ },
+ {
+ "name": "alpha",
+ "description": "alpha value relative to current\ncolor range (default is 0-255)",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "gray",
+ "description": "number specifying value between\nwhite and black",
+ "type": "Number"
+ },
+ {
+ "name": "alpha",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "a color string",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "values",
+ "description": "an array containing the red,green,blue &\nand alpha components of the color",
+ "type": "Number[]"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "color as a p5.Color",
+ "type": "p5.Color"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Lights"
+ },
+ {
+ "name": "specularColor",
+ "file": "src/webgl/light.js",
+ "line": 232,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the color of the specular highlight of a non-ambient light\n(i.e. all lights except ambientLight()).
\nspecularColor() affects only the lights which are created after\nit in the code.
\nThis function is used in combination with\nspecularMaterial().\nIf a geometry does not use specularMaterial(), this function\nwill have no effect.
\nThe default color is white (255, 255, 255), which is used if\nspecularColor() is not explicitly called.
\nNote: specularColor is equivalent to the Processing function\nlightSpecular.
\n",
+ "example": [
+ "\n\nlet setRedSpecularColor = true;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n noStroke();\n describe(\n 'Sphere with specular highlight. Clicking the mouse toggles the specular highlight color between red and the default white.'\n );\n}\n\nfunction draw() {\n background(0);\n\n ambientLight(60);\n\n // add a point light to showcase specular color\n // -- use mouse location to position the light\n let lightPosX = mouseX - width / 2;\n let lightPosY = mouseY - height / 2;\n // -- set the light's specular color\n if (setRedSpecularColor) {\n specularColor(255, 0, 0); // red specular highlight\n }\n // -- create the light\n pointLight(200, 200, 200, lightPosX, lightPosY, 50); // white light\n\n // use specular material with high shininess\n specularMaterial(150);\n shininess(50);\n\n sphere(30, 64, 64);\n}\n\nfunction mouseClicked() {\n setRedSpecularColor = !setRedSpecularColor;\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "red or hue value relative to\nthe current color range",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "description": "green or saturation value\nrelative to the current color range",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "description": "blue or brightness value\nrelative to the current color range",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "gray",
+ "description": "number specifying value between\nwhite and black",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "color as a CSS string",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "values",
+ "description": "color as an array containing the\nred, green, and blue components",
+ "type": "Number[]"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "color as a p5.Color",
+ "type": "p5.Color"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Lights"
+ },
+ {
+ "name": "directionalLight",
+ "file": "src/webgl/light.js",
+ "line": 330,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Creates a directional light with the given color and direction.
\nDirectional light comes from one direction.\nThe direction is specified as numbers inclusively between -1 and 1.\nFor example, setting the direction as (0, -1, 0) will cause the\ngeometry to be lit from below (since the light will be facing\ndirectly upwards). Similarly, setting the direction as (1, 0, 0)\nwill cause the geometry to be lit from the left (since the light\nwill be facing directly rightwards).
\nDirectional lights do not have a specific point of origin, and\ntherefore cannot be positioned closer or farther away from a geometry.
\nA maximum of 5 directional lights can be active at once.
\nNote: lights need to be called (whether directly or indirectly)\nwithin draw() to remain persistent in a looping program.\nPlacing them in setup() will cause them to only have an effect\nthe first time through the loop.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe(\n 'scene with sphere and directional light. The direction of the light is controlled with the mouse position.'\n );\n}\nfunction draw() {\n background(0);\n //move your mouse to change light direction\n let dirX = (mouseX / width - 0.5) * 2;\n let dirY = (mouseY / height - 0.5) * 2;\n directionalLight(250, 250, 250, -dirX, -dirY, -1);\n noStroke();\n sphere(40);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "red or hue value relative to the current\ncolor range",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "description": "green or saturation value relative to the\ncurrent color range",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "description": "blue or brightness value relative to the\ncurrent color range",
+ "type": "Number"
+ },
+ {
+ "name": "x",
+ "description": "x component of direction (inclusive range of -1 to 1)",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y component of direction (inclusive range of -1 to 1)",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z component of direction (inclusive range of -1 to 1)",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "type": "Number"
+ },
+ {
+ "name": "direction",
+ "description": "direction of light as a\np5.Vector",
+ "type": "p5.Vector"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "color as a p5.Color,\nas an array, or as a CSS string",
+ "type": "p5.Color|Number[]|String"
+ },
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "type": "p5.Color|Number[]|String"
+ },
+ {
+ "name": "direction",
+ "type": "p5.Vector"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Lights"
+ },
+ {
+ "name": "pointLight",
+ "file": "src/webgl/light.js",
+ "line": 457,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Creates a point light with the given color and position.
\nA point light emits light from a single point in all directions.\nBecause the light is emitted from a specific point (position),\nit has a different effect when it is positioned farther vs. nearer\nan object.
\nA maximum of 5 point lights can be active at once.
\nNote: lights need to be called (whether directly or indirectly)\nwithin draw() to remain persistent in a looping program.\nPlacing them in setup() will cause them to only have an effect\nthe first time through the loop.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe(\n 'scene with sphere and point light. The position of the light is controlled with the mouse position.'\n );\n}\nfunction draw() {\n background(0);\n // move your mouse to change light position\n let locX = mouseX - width / 2;\n let locY = mouseY - height / 2;\n // to set the light position,\n // think of the world's coordinate as:\n // -width/2,-height/2 ----------- width/2,-height/2\n // | |\n // | 0,0 |\n // | |\n // -width/2,height/2 ----------- width/2,height/2\n pointLight(250, 250, 250, locX, locY, 50);\n noStroke();\n sphere(40);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "red or hue value relative to the current\ncolor range",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "description": "green or saturation value relative to the\ncurrent color range",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "description": "blue or brightness value relative to the\ncurrent color range",
+ "type": "Number"
+ },
+ {
+ "name": "x",
+ "description": "x component of position",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y component of position",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z component of position",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "type": "Number"
+ },
+ {
+ "name": "position",
+ "description": "of light as a p5.Vector",
+ "type": "p5.Vector"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "color as a p5.Color,\nas an array, or as a CSS string",
+ "type": "p5.Color|Number[]|String"
+ },
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "type": "p5.Color|Number[]|String"
+ },
+ {
+ "name": "position",
+ "type": "p5.Vector"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Lights"
+ },
+ {
+ "name": "imageLight",
+ "file": "src/webgl/light.js",
+ "line": 595,
+ "itemtype": "method",
+ "description": "Creates an image light with the given image.
\nThe image light simulates light from all the directions.\nThis is done by using the image as a texture for an infinitely\nlarge sphere light. This sphere contains\nor encapsulates the whole scene/drawing.\nIt will have different effect for varying shininess of the\nobject in the drawing.\nUnder the hood it is mainly doing 2 types of calculations,\nthe first one is creating an irradiance map the\nenvironment map of the input image.\nThe second one is managing reflections based on the shininess\nor roughness of the material used in the scene.
\nNote: The image's diffuse light will be affected by fill()\nand the specular reflections will be affected by specularMaterial()\nand shininess().
\n",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/outdoor_image.jpg');\n}\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0 ,1, 0);\n perspective(PI/3, 1, 5, 500);\n}\nfunction draw() {\n background(220);\n\n push();\n camera(0, 0, 1, 0, 0, 0, 0, 1, 0);\n ortho(-1, 1, -1, 1, 0, 1);\n noLights();\n noStroke();\n texture(img);\n plane(2);\n pop();\n\n ambientLight(50);\n imageLight(img);\n specularMaterial(20);\n noStroke();\n rotateX(frameCount * 0.005);\n rotateY(frameCount * 0.005);\n box(50);\n}\n
\n",
+ "\n\nlet img;\nlet slider;\n\nfunction preload() {\n img = loadImage('assets/outdoor_spheremap.jpg');\n}\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n slider = createSlider(0, 400, 100, 1);\n slider.position(0, height);\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0 ,1, 0);\n perspective(PI/3, 1, 5, 500);\n}\nfunction draw() {\n background(220);\n\n push();\n camera(0, 0, 1, 0, 0, 0, 0, 1, 0);\n ortho(-1, 1, -1, 1, 0, 1);\n noLights();\n noStroke();\n texture(img);\n plane(2);\n pop();\n\n ambientLight(50);\n imageLight(img);\n specularMaterial(20);\n shininess(slider.value());\n noStroke();\n sphere(30);\n}\n
\n"
+ ],
+ "alt": "image light example\nlight with slider having a slider for varying roughness",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "img",
+ "description": "image for the background",
+ "type": "p5.image"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Lights"
+ },
+ {
+ "name": "lights",
+ "file": "src/webgl/light.js",
+ "line": 637,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Places an ambient and directional light in the scene.\nThe lights are set to ambientLight(128, 128, 128) and\ndirectionalLight(128, 128, 128, 0, 0, -1).
\nNote: lights need to be called (whether directly or indirectly)\nwithin draw() to remain persistent in a looping program.\nPlacing them in setup() will cause them to only have an effect\nthe first time through the loop.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n describe('the light is partially ambient and partially directional');\n}\nfunction draw() {\n background(0);\n lights();\n rotateX(millis() / 1000);\n rotateY(millis() / 1000);\n rotateZ(millis() / 1000);\n box();\n}\n
\n"
+ ],
+ "alt": "the light is partially ambient and partially directional",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Lights"
+ },
+ {
+ "name": "lightFalloff",
+ "file": "src/webgl/light.js",
+ "line": 702,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the falloff rate for pointLight()\nand spotLight().
\nlightFalloff() affects only the lights which are created after it\nin the code.
\nThe constant
, linear
, an quadratic
parameters are used to calculate falloff as follows:
\nd = distance from light position to vertex position
\nfalloff = 1 / (CONSTANT + d * LINEAR + (d * d) * QUADRATIC)
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n noStroke();\n describe(\n 'Two spheres with different falloff values show different intensity of light'\n );\n}\nfunction draw() {\n ortho();\n background(0);\n\n let locX = mouseX - width / 2;\n let locY = mouseY - height / 2;\n locX /= 2; // half scale\n\n lightFalloff(1, 0, 0);\n push();\n translate(-25, 0, 0);\n pointLight(250, 250, 250, locX - 25, locY, 50);\n sphere(20);\n pop();\n\n lightFalloff(0.97, 0.03, 0);\n push();\n translate(25, 0, 0);\n pointLight(250, 250, 250, locX + 25, locY, 50);\n sphere(20);\n pop();\n}\n
\n"
+ ],
+ "alt": "Two spheres with different falloff values show different intensity of light",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "constant",
+ "description": "CONSTANT value for determining falloff",
+ "type": "Number"
+ },
+ {
+ "name": "linear",
+ "description": "LINEAR value for determining falloff",
+ "type": "Number"
+ },
+ {
+ "name": "quadratic",
+ "description": "QUADRATIC value for determining falloff",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Lights"
+ },
+ {
+ "name": "spotLight",
+ "file": "src/webgl/light.js",
+ "line": 896,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Creates a spot light with the given color, position,\nlight direction, angle, and concentration.
\nLike a pointLight(), a spotLight()\nemits light from a specific point (position). It has a different effect\nwhen it is positioned farther vs. nearer an object.
\nHowever, unlike a pointLight(), the light is emitted in one direction\nalong a conical shape. The shape of the cone can be controlled using\nthe angle
and concentration
parameters.
\nThe angle
parameter is used to\ndetermine the radius of the cone. And the concentration
\nparameter is used to focus the light towards the center of\nthe cone. Both parameters are optional, however if you want\nto specify concentration
, you must also specify angle
.\nThe minimum concentration value is 1.
\nA maximum of 5 spot lights can be active at once.
\nNote: lights need to be called (whether directly or indirectly)\nwithin draw() to remain persistent in a looping program.\nPlacing them in setup() will cause them to only have an effect\nthe first time through the loop.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe(\n 'scene with sphere and spot light. The position of the light is controlled with the mouse position.'\n );\n}\nfunction draw() {\n background(0);\n // move your mouse to change light position\n let locX = mouseX - width / 2;\n let locY = mouseY - height / 2;\n // to set the light position,\n // think of the world's coordinate as:\n // -width/2,-height/2 ----------- width/2,-height/2\n // | |\n // | 0,0 |\n // | |\n // -width/2,height/2 ----------- width/2,height/2\n ambientLight(50);\n spotLight(0, 250, 0, locX, locY, 100, 0, 0, -1, Math.PI / 16);\n noStroke();\n sphere(40);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "red or hue value relative to the current color range",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "description": "green or saturation value relative to the current color range",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "description": "blue or brightness value relative to the current color range",
+ "type": "Number"
+ },
+ {
+ "name": "x",
+ "description": "x component of position",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y component of position",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z component of position",
+ "type": "Number"
+ },
+ {
+ "name": "rx",
+ "description": "x component of light direction (inclusive range of -1 to 1)",
+ "type": "Number"
+ },
+ {
+ "name": "ry",
+ "description": "y component of light direction (inclusive range of -1 to 1)",
+ "type": "Number"
+ },
+ {
+ "name": "rz",
+ "description": "z component of light direction (inclusive range of -1 to 1)",
+ "type": "Number"
+ },
+ {
+ "name": "angle",
+ "description": "angle of cone. Defaults to PI/3",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "concentration",
+ "description": "concentration of cone. Defaults to 100",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "color as a p5.Color,\nas an array, or as a CSS string",
+ "type": "p5.Color|Number[]|String"
+ },
+ {
+ "name": "position",
+ "description": "position of light as a p5.Vector",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "direction",
+ "description": "direction of light as a p5.Vector",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "angle",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "concentration",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "type": "Number"
+ },
+ {
+ "name": "position",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "direction",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "angle",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "concentration",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "type": "p5.Color|Number[]|String"
+ },
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "type": "Number"
+ },
+ {
+ "name": "direction",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "angle",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "concentration",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "type": "p5.Color|Number[]|String"
+ },
+ {
+ "name": "position",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "rx",
+ "type": "Number"
+ },
+ {
+ "name": "ry",
+ "type": "Number"
+ },
+ {
+ "name": "rz",
+ "type": "Number"
+ },
+ {
+ "name": "angle",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "concentration",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "type": "Number"
+ },
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "type": "Number"
+ },
+ {
+ "name": "direction",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "angle",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "concentration",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "type": "Number"
+ },
+ {
+ "name": "position",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "rx",
+ "type": "Number"
+ },
+ {
+ "name": "ry",
+ "type": "Number"
+ },
+ {
+ "name": "rz",
+ "type": "Number"
+ },
+ {
+ "name": "angle",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "concentration",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "type": "p5.Color|Number[]|String"
+ },
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "type": "Number"
+ },
+ {
+ "name": "rx",
+ "type": "Number"
+ },
+ {
+ "name": "ry",
+ "type": "Number"
+ },
+ {
+ "name": "rz",
+ "type": "Number"
+ },
+ {
+ "name": "angle",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "concentration",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Lights"
+ },
+ {
+ "name": "noLights",
+ "file": "src/webgl/light.js",
+ "line": 1157,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Removes all lights present in a sketch.
\nAll subsequent geometry is rendered without lighting (until a new\nlight is created with a call to one of the lighting functions\n(lights(),\nambientLight(),\ndirectionalLight(),\npointLight(),\nspotLight()).
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe(\n 'Three white spheres. Each appears as a different color due to lighting.'\n );\n}\nfunction draw() {\n background(200);\n noStroke();\n\n ambientLight(255, 0, 0);\n translate(-30, 0, 0);\n ambientMaterial(255);\n sphere(13);\n\n noLights();\n translate(30, 0, 0);\n ambientMaterial(255);\n sphere(13);\n\n ambientLight(0, 255, 0);\n translate(30, 0, 0);\n ambientMaterial(255);\n sphere(13);\n}\n
\n"
+ ],
+ "alt": "Three white spheres. Each appears as a different\ncolor due to lighting.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Lights"
+ },
+ {
+ "name": "loadModel",
+ "file": "src/webgl/loading.js",
+ "line": 127,
+ "itemtype": "method",
+ "description": "Load a 3d model from an OBJ or STL file.
\nloadModel() should be placed inside of preload().\nThis allows the model to load fully before the rest of your code is run.
\nOne of the limitations of the OBJ and STL format is that it doesn't have a built-in\nsense of scale. This means that models exported from different programs might\nbe very different sizes. If your model isn't displaying, try calling\nloadModel() with the normalized parameter set to true. This will resize the\nmodel to a scale appropriate for p5. You can also make additional changes to\nthe final size of your model with the scale() function.
\nAlso, the support for colored STL files is not present. STL files with color will be\nrendered without color properties.
\nOptions can include:
\npath
: Specifies the location or path of the 3D model file for loading.normalize
: Enables standardized size scaling during loading if set to true.successCallback
: Callback for post-loading actions with the 3D model object.failureCallback
: Handles errors if model loading fails, receiving an event error.fileType
: Defines the file extension of the model.flipU
: Flips the U texture coordinates of the model.flipV
: Flips the V texture coordinates of the model.
",
+ "example": [
+ "\n\n//draw a spinning octahedron\nlet octahedron;\n\nfunction preload() {\n octahedron = loadModel('assets/octahedron.obj');\n}\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('Vertically rotating 3-d octahedron.');\n}\n\nfunction draw() {\n background(200);\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n model(octahedron);\n}\n
\n",
+ "\n\n//draw a spinning teapot\nlet teapot;\n\nfunction preload() {\n // Load model with normalise parameter set to true\n teapot = loadModel('assets/teapot.obj', true);\n}\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('Vertically rotating 3-d teapot with red, green and blue gradient.');\n}\n\nfunction draw() {\n background(200);\n scale(0.4); // Scaled to make model fit into canvas\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n normalMaterial(); // For effect\n model(teapot);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "path",
+ "description": "Path of the model to be loaded",
+ "type": "String"
+ },
+ {
+ "name": "normalize",
+ "description": "If true, scale the model to a\nstandardized size when loading",
+ "type": "Boolean"
+ },
+ {
+ "name": "successCallback",
+ "description": "Function to be called\nonce the model is loaded. Will be passed\nthe 3D model object.",
+ "optional": 1
+ },
+ {
+ "name": "failureCallback",
+ "description": "called with event error if\nthe model fails to load.",
+ "optional": 1
+ },
+ {
+ "name": "fileType",
+ "description": "The file extension of the model\n(.stl
, .obj
).",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "the p5.Geometry object",
+ "type": "p5.Geometry"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "path",
+ "type": "String"
+ },
+ {
+ "name": "successCallback",
+ "optional": 1
+ },
+ {
+ "name": "failureCallback",
+ "optional": 1
+ },
+ {
+ "name": "fileType",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "the p5.Geometry object",
+ "type": "p5.Geometry"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "path",
+ "type": "String"
+ },
+ {
+ "name": "options",
+ "optional": 1,
+ "type": "Object"
+ },
+ {
+ "name": "options.successCallback",
+ "description": "",
+ "optional": 1
+ },
+ {
+ "name": "options.failureCallback",
+ "description": "",
+ "optional": 1
+ },
+ {
+ "name": "options.fileType",
+ "description": "",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "options.normalize",
+ "description": "",
+ "optional": 1,
+ "type": "boolean"
+ },
+ {
+ "name": "options.flipU",
+ "description": "",
+ "optional": 1,
+ "type": "boolean"
+ },
+ {
+ "name": "options.flipV",
+ "description": "",
+ "optional": 1,
+ "type": "boolean"
+ }
+ ],
+ "return": {
+ "description": "the p5.Geometry object",
+ "type": "p5.Geometry"
+ }
+ }
+ ],
+ "return": {
+ "description": "the p5.Geometry object",
+ "type": "p5.Geometry"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Models"
+ },
+ {
+ "name": "parseObj",
+ "file": "src/webgl/loading.js",
+ "line": 238,
+ "itemtype": "method",
+ "description": "Parse OBJ lines into model. For reference, this is what a simple model of a\nsquare might look like:
\nv -0.5 -0.5 0.5\nv -0.5 -0.5 -0.5\nv -0.5 0.5 -0.5\nv -0.5 0.5 0.5
\nf 4 3 2 1
\n",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Models"
+ },
+ {
+ "name": "parseSTL",
+ "file": "src/webgl/loading.js",
+ "line": 344,
+ "itemtype": "method",
+ "description": "STL files can be of two types, ASCII and Binary,
\nWe need to convert the arrayBuffer to an array of strings,\nto parse it as an ASCII file.
\n",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Models"
+ },
+ {
+ "name": "isBinary",
+ "file": "src/webgl/loading.js",
+ "line": 378,
+ "itemtype": "method",
+ "description": "This function checks if the file is in ASCII format or in Binary format
\nIt is done by searching keyword solid
at the start of the file.
\nAn ASCII STL data must begin with solid
as the first six bytes.\nHowever, ASCII STLs lacking the SPACE after the d
are known to be\nplentiful. So, check the first 5 bytes for solid
.
\nSeveral encodings, such as UTF-8, precede the text with up to 5 bytes:\nhttps://en.wikipedia.org/wiki/Byte_order_mark#Byte_order_marks_by_encoding\nSearch for solid
to start anywhere after those prefixes.
\n",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Models"
+ },
+ {
+ "name": "matchDataViewAt",
+ "file": "src/webgl/loading.js",
+ "line": 395,
+ "itemtype": "method",
+ "description": "This function matches the query
at the provided offset
",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Models"
+ },
+ {
+ "name": "parseBinarySTL",
+ "file": "src/webgl/loading.js",
+ "line": 410,
+ "itemtype": "method",
+ "description": "This function parses the Binary STL files.\nhttps://en.wikipedia.org/wiki/STL_%28file_format%29#Binary_STL
\nCurrently there is no support for the colors provided in STL files.
\n",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Models"
+ },
+ {
+ "name": "parseASCIISTL",
+ "file": "src/webgl/loading.js",
+ "line": 502,
+ "itemtype": "method",
+ "description": "ASCII STL file starts with solid 'nameOfFile'
\nThen contain the normal of the face, starting with facet normal
\nNext contain a keyword indicating the start of face vertex, outer loop
\nNext comes the three vertex, starting with vertex x y z
\nVertices ends with endloop
\nFace ends with endfacet
\nNext face starts with facet normal
\nThe end of the file is indicated by endsolid
",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Models"
+ },
+ {
+ "name": "model",
+ "file": "src/webgl/loading.js",
+ "line": 668,
+ "itemtype": "method",
+ "description": "Render a 3d model to the screen.",
+ "example": [
+ "\n\n//draw a spinning octahedron\nlet octahedron;\n\nfunction preload() {\n octahedron = loadModel('assets/octahedron.obj');\n}\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('Vertically rotating 3-d octahedron.');\n}\n\nfunction draw() {\n background(200);\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n model(octahedron);\n}\n
\n"
+ ],
+ "alt": "Vertically rotating 3-d octahedron.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "model",
+ "description": "Loaded 3d model to be rendered",
+ "type": "p5.Geometry"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Models"
+ },
+ {
+ "name": "loadShader",
+ "file": "src/webgl/material.js",
+ "line": 64,
+ "itemtype": "method",
+ "description": "Creates a new p5.Shader object\nfrom the provided vertex and fragment shader files.
\nThe shader files are loaded asynchronously in the\nbackground, so this method should be used in preload().
\nShaders can alter the positioning of shapes drawn with them.\nTo ensure consistency in rendering, it's recommended to use the vertex shader in the createShader example.
\nNote, shaders can only be used in WEBGL mode.
\n",
+ "example": [
+ "\n\nlet mandel;\nfunction preload() {\n // load the shader definitions from files\n mandel = loadShader('assets/shader.vert', 'assets/shader.frag');\n}\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n // use the shader\n shader(mandel);\n noStroke();\n mandel.setUniform('p', [-0.74364388703, 0.13182590421]);\n describe('zooming Mandelbrot set. a colorful, infinitely detailed fractal.');\n}\n\nfunction draw() {\n mandel.setUniform('r', 1.5 * exp(-6.5 * (1 + sin(millis() / 2000))));\n quad(-1, -1, 1, -1, 1, 1, -1, 1);\n}\n
\n"
+ ],
+ "alt": "zooming Mandelbrot set. a colorful, infinitely detailed fractal.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "vertFilename",
+ "description": "path to file containing vertex shader\nsource code",
+ "type": "String"
+ },
+ {
+ "name": "fragFilename",
+ "description": "path to file containing fragment shader\nsource code",
+ "type": "String"
+ },
+ {
+ "name": "callback",
+ "description": "callback to be executed after loadShader\ncompletes. On success, the p5.Shader object is passed as the first argument.",
+ "optional": 1,
+ "type": "function"
+ },
+ {
+ "name": "errorCallback",
+ "description": "callback to be executed when an error\noccurs inside loadShader. On error, the error is passed as the first\nargument.",
+ "optional": 1,
+ "type": "function"
+ }
+ ],
+ "return": {
+ "description": "a shader object created from the provided\nvertex and fragment shader files.",
+ "type": "p5.Shader"
+ }
+ }
+ ],
+ "return": {
+ "description": "a shader object created from the provided\nvertex and fragment shader files.",
+ "type": "p5.Shader"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "createShader",
+ "file": "src/webgl/material.js",
+ "line": 197,
+ "itemtype": "method",
+ "description": "Creates a new p5.Shader object\nfrom the provided vertex and fragment shader code.
\nNote, shaders can only be used in WEBGL mode.
\nShaders can alter the positioning of shapes drawn with them.\nTo ensure consistency in rendering, it's recommended to use the vertex shader shown in the example below.
\n",
+ "example": [
+ "\n\n\n// the vertex shader is called for each vertex\nlet vs = `\nprecision highp float;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n vTexCoord = aTexCoord;\n vec4 positionVec4 = vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n }\n`;\n\n\n// the fragment shader is called for each pixel\nlet fs = `\n precision highp float;\n uniform vec2 p;\n uniform float r;\n const int I = 500;\n varying vec2 vTexCoord;\n void main() {\n vec2 c = p + gl_FragCoord.xy * r, z = c;\n float n = 0.0;\n for (int i = I; i > 0; i --) {\n if(z.x*z.x+z.y*z.y > 4.0) {\n n = float(i)/float(I);\n break;\n }\n z = vec2(z.x*z.x-z.y*z.y, 2.0*z.x*z.y) + c;\n }\n gl_FragColor = vec4(0.5-cos(n*17.0)/2.0,0.5-cos(n*13.0)/2.0,0.5-cos(n*23.0)/2.0,1.0);\n }`;\n\nlet mandel;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n\n // create and initialize the shader\n mandel = createShader(vs, fs);\n shader(mandel);\n noStroke();\n\n // 'p' is the center point of the Mandelbrot image\n mandel.setUniform('p', [-0.74364388703, 0.13182590421]);\n describe('zooming Mandelbrot set. a colorful, infinitely detailed fractal.');\n}\n\nfunction draw() {\n // 'r' is the size of the image in Mandelbrot-space\n mandel.setUniform('r', 1.5 * exp(-6.5 * (1 + sin(millis() / 2000))));\n plane(width, height);\n}\n
\n"
+ ],
+ "alt": "zooming Mandelbrot set. a colorful, infinitely detailed fractal.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "vertSrc",
+ "description": "source code for the vertex shader",
+ "type": "String"
+ },
+ {
+ "name": "fragSrc",
+ "description": "source code for the fragment shader",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "a shader object created from the provided\nvertex and fragment shaders.",
+ "type": "p5.Shader"
+ }
+ }
+ ],
+ "return": {
+ "description": "a shader object created from the provided\nvertex and fragment shaders.",
+ "type": "p5.Shader"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "createFilterShader",
+ "file": "src/webgl/material.js",
+ "line": 279,
+ "itemtype": "method",
+ "description": "Creates a new p5.Shader using only a fragment shader, as a convenience method for creating image effects.\nIt's like createShader() but with a default vertex shader included.
\ncreateFilterShader() is intended to be used along with filter() for filtering the contents of a canvas.\nA filter shader will not be applied to any geometries.
\nThe fragment shader receives some uniforms:
\nsampler2D tex0
, which contains the canvas contents as a texturevec2 canvasSize
, which is the p5 width and height of the canvas (not including pixel density)vec2 texelSize
, which is the size of a physical pixel including pixel density (1.0/(width*density)
, 1.0/(height*density)
)
For more info about filters and shaders, see Adam Ferriss' repo of shader examples\nor the introduction to shaders page.
\n",
+ "example": [
+ "\n\nfunction setup() {\n let fragSrc = `precision highp float;\n void main() {\n gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n }`;\n\n createCanvas(100, 100, WEBGL);\n let s = createFilterShader(fragSrc);\n filter(s);\n describe('a yellow canvas');\n}\n
\n\n\n\n\nlet img, s;\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\nfunction setup() {\n let fragSrc = `precision highp float;\n\n // x,y coordinates, given from the vertex shader\n varying vec2 vTexCoord;\n\n // the canvas contents, given from filter()\n uniform sampler2D tex0;\n // other useful information from the canvas\n uniform vec2 texelSize;\n uniform vec2 canvasSize;\n // a custom variable from this sketch\n uniform float darkness;\n\n void main() {\n // get the color at current pixel\n vec4 color = texture2D(tex0, vTexCoord);\n // set the output color\n color.b = 1.0;\n color *= darkness;\n gl_FragColor = vec4(color.rgb, 1.0);\n }`;\n\n createCanvas(100, 100, WEBGL);\n s = createFilterShader(fragSrc);\n}\nfunction draw() {\n image(img, -50, -50);\n s.setUniform('darkness', 0.5);\n filter(s);\n describe('a image of bricks tinted dark blue');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fragSrc",
+ "description": "source code for the fragment shader",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "a shader object created from the provided\nfragment shader.",
+ "type": "p5.Shader"
+ }
+ }
+ ],
+ "return": {
+ "description": "a shader object created from the provided\nfragment shader.",
+ "type": "p5.Shader"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "shader",
+ "file": "src/webgl/material.js",
+ "line": 424,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the p5.Shader object to\nbe used to render subsequent shapes.
\nShaders can alter the positioning of shapes drawn with them.\nTo ensure consistency in rendering, it's recommended to use the vertex shader in the createShader example.
\nCustom shaders can be created using the\ncreateShader() and\nloadShader() functions.
\nUse resetShader() to\nrestore the default shaders.
\nAdditional Information:\nThe shader will be used for:
\n- Fills when a texture is enabled if it includes a uniform
sampler2D
. - Fills when lights are enabled if it includes the attribute
aNormal
, or if it has any of the following uniforms: uUseLighting
, uAmbientLightCount
, uDirectionalLightCount
, uPointLightCount
, uAmbientColor
, uDirectionalDiffuseColors
, uDirectionalSpecularColors
, uPointLightLocation
, uPointLightDiffuseColors
, uPointLightSpecularColors
, uLightingDirection
, or uSpecular
. - Fills whenever there are no lights or textures.
- Strokes if it includes the uniform
uStrokeWeight
.\nNote: This behavior is considered experimental, and changes are planned in future releases.
Note, shaders can only be used in WEBGL mode.
\n",
+ "example": [
+ "\n\n// Click within the image to toggle\n// the shader used by the quad shape\n// Note: for an alternative approach to the same example,\n// involving changing uniforms please refer to:\n// https://p5js.org/reference/#/p5.Shader/setUniform\n\nlet redGreen;\nlet orangeBlue;\nlet showRedGreen = false;\n\nfunction preload() {\n // note that we are using two instances\n // of the same vertex and fragment shaders\n redGreen = loadShader('assets/shader.vert', 'assets/shader-gradient.frag');\n orangeBlue = loadShader('assets/shader.vert', 'assets/shader-gradient.frag');\n}\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n\n // initialize the colors for redGreen shader\n shader(redGreen);\n redGreen.setUniform('colorCenter', [1.0, 0.0, 0.0]);\n redGreen.setUniform('colorBackground', [0.0, 1.0, 0.0]);\n\n // initialize the colors for orangeBlue shader\n shader(orangeBlue);\n orangeBlue.setUniform('colorCenter', [1.0, 0.5, 0.0]);\n orangeBlue.setUniform('colorBackground', [0.226, 0.0, 0.615]);\n\n noStroke();\n\n describe(\n 'canvas toggles between a circular gradient of orange and blue vertically. and a circular gradient of red and green moving horizontally when mouse is clicked/pressed.'\n );\n}\n\nfunction draw() {\n // update the offset values for each shader,\n // moving orangeBlue in vertical and redGreen\n // in horizontal direction\n orangeBlue.setUniform('offset', [0, sin(millis() / 2000) + 1]);\n redGreen.setUniform('offset', [sin(millis() / 2000), 1]);\n\n if (showRedGreen === true) {\n shader(redGreen);\n } else {\n shader(orangeBlue);\n }\n quad(-1, -1, 1, -1, 1, 1, -1, 1);\n}\n\nfunction mouseClicked() {\n showRedGreen = !showRedGreen;\n}\n
\n"
+ ],
+ "alt": "canvas toggles between a circular gradient of orange and blue vertically. and a circular gradient of red and green moving horizontally when mouse is clicked/pressed.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "s",
+ "description": "the p5.Shader object\nto use for rendering shapes.",
+ "type": "p5.Shader"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "resetShader",
+ "file": "src/webgl/material.js",
+ "line": 524,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Restores the default shaders. Code that runs after resetShader()\nwill not be affected by the shader previously set by\nshader()",
+ "example": [
+ "\n\n// This variable will hold our shader object\nlet shaderProgram;\n\n// This variable will hold our vertex shader source code\nlet vertSrc = `\n attribute vec3 aPosition;\n attribute vec2 aTexCoord;\n uniform mat4 uProjectionMatrix;\n uniform mat4 uModelViewMatrix;\n varying vec2 vTexCoord;\n\n void main() {\n vTexCoord = aTexCoord;\n vec4 position = vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * position;\n }\n`;\n\n// This variable will hold our fragment shader source code\nlet fragSrc = `\n precision mediump float;\n\n varying vec2 vTexCoord;\n\n void main() {\n vec2 uv = vTexCoord;\n vec3 color = vec3(uv.x, uv.y, min(uv.x + uv.y, 1.0));\n gl_FragColor = vec4(color, 1.0);\n }\n`;\n\nfunction setup() {\n // Shaders require WEBGL mode to work\n createCanvas(100, 100, WEBGL);\n\n // Create our shader\n shaderProgram = createShader(vertSrc, fragSrc);\n\n describe(\n 'Two rotating cubes. The left one is painted using a custom (user-defined) shader, while the right one is painted using the default fill shader.'\n );\n}\n\nfunction draw() {\n // Clear the scene\n background(200);\n\n // Draw a box using our shader\n // shader() sets the active shader with our shader\n shader(shaderProgram);\n push();\n translate(-width / 4, 0, 0);\n rotateX(millis() * 0.00025);\n rotateY(millis() * 0.0005);\n box(width / 4);\n pop();\n\n // Draw a box using the default fill shader\n // resetShader() restores the default fill shader\n resetShader();\n fill(255, 0, 0);\n push();\n translate(width / 4, 0, 0);\n rotateX(millis() * 0.00025);\n rotateY(millis() * 0.0005);\n box(width / 4);\n pop();\n}\n
\n"
+ ],
+ "alt": "Two rotating cubes. The left one is painted using a custom (user-defined) shader,\nwhile the right one is painted using the default fill shader.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "texture",
+ "file": "src/webgl/material.js",
+ "line": 659,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the texture that will be used to render subsequent shapes.
\nA texture is like a \"skin\" that wraps around a 3D geometry. Currently\nsupported textures are images, video, and offscreen renders.
\nTo texture a geometry created with beginShape(),\nyou will need to specify uv coordinates in vertex().
\nNote, texture() can only be used in WEBGL mode.
\nYou can view more materials in this\nexample.
\n",
+ "example": [
+ "\n\nlet img;\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('spinning cube with a texture from an image');\n}\n\nfunction draw() {\n background(0);\n rotateZ(frameCount * 0.01);\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n //pass image as texture\n texture(img);\n box(width / 2);\n}\n
\n",
+ "\n\nlet pg;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n pg = createGraphics(200, 200);\n pg.textSize(75);\n describe('plane with a texture from an image created by createGraphics()');\n}\n\nfunction draw() {\n background(0);\n pg.background(255);\n pg.text('hello!', 0, 100);\n //pass image as texture\n texture(pg);\n rotateX(0.5);\n noStroke();\n plane(50);\n}\n
\n",
+ "\n\nlet vid;\nfunction preload() {\n vid = createVideo('assets/fingers.mov');\n vid.hide();\n}\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('rectangle with video as texture');\n}\n\nfunction draw() {\n background(0);\n //pass video frame as texture\n texture(vid);\n rect(-40, -40, 80, 80);\n}\n\nfunction mousePressed() {\n vid.loop();\n}\n
\n",
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('quad with a texture, mapped using normalized coordinates');\n}\n\nfunction draw() {\n background(0);\n texture(img);\n textureMode(NORMAL);\n beginShape();\n vertex(-40, -40, 0, 0);\n vertex(40, -40, 1, 0);\n vertex(40, 40, 1, 1);\n vertex(-40, 40, 0, 1);\n endShape();\n}\n
\n"
+ ],
+ "alt": "spinning cube with a texture from an image\nplane with a texture from an image created by createGraphics()\nrectangle with video as texture\nquad with a texture, mapped using normalized coordinates",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "tex",
+ "description": "image to use as texture",
+ "type": "p5.Image|p5.MediaElement|p5.Graphics|p5.Texture|p5.Framebuffer|p5.FramebufferTexture"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "textureMode",
+ "file": "src/webgl/material.js",
+ "line": 742,
+ "itemtype": "method",
+ "description": "Sets the coordinate space for texture mapping. The default mode is IMAGE\nwhich refers to the actual coordinates of the image.\nNORMAL refers to a normalized space of values ranging from 0 to 1.
\nWith IMAGE, if an image is 100×200 pixels, mapping the image onto the entire\nsize of a quad would require the points (0,0) (100, 0) (100,200) (0,200).\nThe same mapping in NORMAL is (0,0) (1,0) (1,1) (0,1).
\n",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('quad with a texture, mapped using normalized coordinates');\n}\n\nfunction draw() {\n texture(img);\n textureMode(NORMAL);\n beginShape();\n vertex(-50, -50, 0, 0);\n vertex(50, -50, 1, 0);\n vertex(50, 50, 1, 1);\n vertex(-50, 50, 0, 1);\n endShape();\n}\n
\n",
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('quad with a texture, mapped using image coordinates');\n}\n\nfunction draw() {\n texture(img);\n textureMode(IMAGE);\n beginShape();\n vertex(-50, -50, 0, 0);\n vertex(50, -50, img.width, 0);\n vertex(50, 50, img.width, img.height);\n vertex(-50, 50, 0, img.height);\n endShape();\n}\n
\n"
+ ],
+ "alt": "quad with a texture, mapped using normalized coordinates\nquad with a texture, mapped using image coordinates",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "mode",
+ "description": "either IMAGE or NORMAL",
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "textureWrap",
+ "file": "src/webgl/material.js",
+ "line": 815,
+ "itemtype": "method",
+ "description": "Sets the global texture wrapping mode. This controls how textures behave\nwhen their uv's go outside of the 0 to 1 range. There are three options:\nCLAMP, REPEAT, and MIRROR.
\nCLAMP causes the pixels at the edge of the texture to extend to the bounds.\nREPEAT causes the texture to tile repeatedly until reaching the bounds.\nMIRROR works similarly to REPEAT but it flips the texture with every new tile.
\nREPEAT & MIRROR are only available if the texture\nis a power of two size (128, 256, 512, 1024, etc.).
\nThis method will affect all textures in your sketch until a subsequent\ntextureWrap() call is made.
\nIf only one argument is provided, it will be applied to both the\nhorizontal and vertical axes.
\n",
+ "example": [
+ "\n\nlet img;\nfunction preload() {\n img = loadImage('assets/rockies128.jpg');\n}\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n textureWrap(MIRROR);\n describe('an image of the rocky mountains repeated in mirrored tiles');\n}\n\nfunction draw() {\n background(0);\n\n let dX = mouseX;\n let dY = mouseY;\n\n let u = lerp(1.0, 2.0, dX);\n let v = lerp(1.0, 2.0, dY);\n\n scale(width / 2);\n\n texture(img);\n\n beginShape(TRIANGLES);\n vertex(-1, -1, 0, 0, 0);\n vertex(1, -1, 0, u, 0);\n vertex(1, 1, 0, u, v);\n\n vertex(1, 1, 0, u, v);\n vertex(-1, 1, 0, 0, v);\n vertex(-1, -1, 0, 0, 0);\n endShape();\n}\n
\n"
+ ],
+ "alt": "an image of the rocky mountains repeated in mirrored tiles",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "wrapX",
+ "description": "either CLAMP, REPEAT, or MIRROR",
+ "type": "Constant"
+ },
+ {
+ "name": "wrapY",
+ "description": "either CLAMP, REPEAT, or MIRROR",
+ "optional": 1,
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "normalMaterial",
+ "file": "src/webgl/material.js",
+ "line": 856,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the current material as a normal material.
\nA normal material is not affected by light. It is often used as\na placeholder material when debugging.
\nSurfaces facing the X-axis become red, those facing the Y-axis\nbecome green, and those facing the Z-axis become blue.
\nYou can view more materials in this\nexample.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('Sphere with normal material');\n}\n\nfunction draw() {\n background(200);\n normalMaterial();\n sphere(40);\n}\n
\n"
+ ],
+ "alt": "Sphere with normal material",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "ambientMaterial",
+ "file": "src/webgl/material.js",
+ "line": 969,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the ambient color of the material.
\nThe ambientMaterial() color represents the components\nof the ambientLight() color that the object reflects.
\nConsider an ambientMaterial() with the color yellow (255, 255, 0).\nIf the ambientLight() emits the color white (255, 255, 255), then the object\nwill appear yellow as it will reflect the red and green components\nof the light. If the ambientLight() emits the color red (255, 0, 0), then\nthe object will appear red as it will reflect the red component\nof the light. If the ambientLight() emits the color blue (0, 0, 255),\nthen the object will appear black, as there is no component of\nthe light that it can reflect.
\nYou can view more materials in this\nexample.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('sphere reflecting red, blue, and green light');\n}\nfunction draw() {\n background(0);\n noStroke();\n ambientLight(255);\n ambientMaterial(70, 130, 230);\n sphere(40);\n}\n
\n",
+ "\n\n// ambientLight is both red and blue (magenta),\n// so object only reflects it's red and blue components\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('box reflecting only red and blue light');\n}\nfunction draw() {\n background(70);\n ambientLight(255, 0, 255); // magenta light\n ambientMaterial(255); // white material\n box(30);\n}\n
\n",
+ "\n\n// ambientLight is green. Since object does not contain\n// green, it does not reflect any light\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('box reflecting no light');\n}\nfunction draw() {\n background(70);\n ambientLight(0, 255, 0); // green light\n ambientMaterial(255, 0, 255); // magenta material\n box(30);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "red or hue value relative to the current\ncolor range",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "description": "green or saturation value relative to the\ncurrent color range",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "description": "blue or brightness value relative to the\ncurrent color range",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "gray",
+ "description": "number specifying value between\nwhite and black",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "color as a p5.Color,\nas an array, or as a CSS string",
+ "type": "p5.Color|Number[]|String"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "emissiveMaterial",
+ "file": "src/webgl/material.js",
+ "line": 1040,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the emissive color of the material.
\nAn emissive material will display the emissive color at\nfull strength regardless of lighting. This can give the\nappearance that the object is glowing.
\nNote, \"emissive\" is a misnomer in the sense that the material\ndoes not actually emit light that will affect surrounding objects.
\nYou can view more materials in this\nexample.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('sphere with green emissive material');\n}\nfunction draw() {\n background(0);\n noStroke();\n ambientLight(0);\n emissiveMaterial(130, 230, 0);\n sphere(40);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "red or hue value relative to the current\ncolor range",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "description": "green or saturation value relative to the\ncurrent color range",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "description": "blue or brightness value relative to the\ncurrent color range",
+ "type": "Number"
+ },
+ {
+ "name": "alpha",
+ "description": "alpha value relative to current color\nrange (default is 0-255)",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "gray",
+ "description": "number specifying value between\nwhite and black",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "color as a p5.Color,\nas an array, or as a CSS string",
+ "type": "p5.Color|Number[]|String"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "specularMaterial",
+ "file": "src/webgl/material.js",
+ "line": 1126,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the specular color of the material.
\nA specular material is reflective (shiny). The shininess can be\ncontrolled by the shininess() function.
\nLike ambientMaterial(),\nthe specularMaterial() color is the color the object will reflect\nunder ambientLight().\nHowever unlike ambientMaterial(), for all other types of lights\n(directionalLight(),\npointLight(),\nspotLight()),\na specular material will reflect the color of the light source.\nThis is what gives it its \"shiny\" appearance.
\nYou can view more materials in this\nexample.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n noStroke();\n describe('torus with specular material');\n}\n\nfunction draw() {\n background(0);\n\n ambientLight(60);\n\n // add point light to showcase specular material\n let locX = mouseX - width / 2;\n let locY = mouseY - height / 2;\n pointLight(255, 255, 255, locX, locY, 50);\n\n specularMaterial(250);\n shininess(50);\n torus(30, 10, 64, 64);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "gray",
+ "description": "number specifying value between white and black.",
+ "type": "Number"
+ },
+ {
+ "name": "alpha",
+ "description": "alpha value relative to current color range\n(default is 0-255)",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "red or hue value relative to\nthe current color range",
+ "type": "Number"
+ },
+ {
+ "name": "v2",
+ "description": "green or saturation value\nrelative to the current color range",
+ "type": "Number"
+ },
+ {
+ "name": "v3",
+ "description": "blue or brightness value\nrelative to the current color range",
+ "type": "Number"
+ },
+ {
+ "name": "alpha",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "color",
+ "description": "color as a p5.Color,\nas an array, or as a CSS string",
+ "type": "p5.Color|Number[]|String"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "shininess",
+ "file": "src/webgl/material.js",
+ "line": 1175,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the amount of gloss (\"shininess\") of a\nspecularMaterial().
\nThe default and minimum value is 1.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n describe('two spheres, one more shiny than the other');\n}\nfunction draw() {\n background(0);\n noStroke();\n let locX = mouseX - width / 2;\n let locY = mouseY - height / 2;\n ambientLight(60, 60, 60);\n pointLight(255, 255, 255, locX, locY, 50);\n specularMaterial(250);\n translate(-25, 0, 0);\n shininess(1);\n sphere(20);\n translate(50, 0, 0);\n shininess(20);\n sphere(20);\n}\n
\n"
+ ],
+ "alt": "two spheres, one more shiny than the other",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "shine",
+ "description": "degree of shininess",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "metalness",
+ "file": "src/webgl/material.js",
+ "line": 1271,
+ "itemtype": "method",
+ "description": "Sets the metalness property of a material used in 3D rendering.
\nThe metalness property controls the degree to which the material\nappears metallic. A higher metalness value makes the material look\nmore metallic, while a lower value makes it appear less metallic.
\nThe default and minimum value is 0, indicating a non-metallic appearance.
\nUnlike other materials, metals exclusively rely on reflections, particularly\nthose produced by specular lights (mirrorLike lights). They don't incorporate\ndiffuse or ambient lighting. Metals use a fill color to influence the overall\ncolor of their reflections. Pick a fill color, and you can easily change the\nappearance of the metal surfaces. When no fill color is provided, it defaults\nto using white.
\n",
+ "example": [
+ "\n\nlet img;\nlet slider;\nlet slider2;\nfunction preload() {\n img = loadImage('assets/outdoor_spheremap.jpg');\n}\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n slider = createSlider(0, 300, 100, 1);\n let sliderLabel = createP('Metalness');\n sliderLabel.position(100, height - 25);\n slider2 = createSlider(0, 350, 100);\n slider2.position(0, height + 20);\n slider2Label = createP('Shininess');\n slider2Label.position(100, height);\n}\nfunction draw() {\n background(220);\n imageMode(CENTER);\n push();\n image(img, 0, 0, width, height);\n clearDepth();\n pop();\n imageLight(img);\n fill('gray');\n specularMaterial('gray');\n shininess(slider2.value());\n metalness(slider.value());\n noStroke();\n sphere(30);\n}\n
\n",
+ "\n\nlet slider;\nlet slider2;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n slider = createSlider(0, 200, 100);\n let sliderLabel = createP('Metalness');\n sliderLabel.position(100, height - 25);\n slider2 = createSlider(0, 200, 2);\n slider2.position(0, height + 25);\n let slider2Label = createP('Shininess');\n slider2Label.position(100, height);\n}\nfunction draw() {\n noStroke();\n background(100);\n fill(255, 215, 0);\n pointLight(255, 255, 255, 5000, 5000, 75);\n specularMaterial('gray');\n ambientLight(100);\n shininess(slider2.value());\n metalness(slider.value());\n rotateY(frameCount * 0.01);\n torus(20, 10);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "metallic",
+ "description": "The degree of metalness.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "camera",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 113,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the position of the current camera in a 3D sketch.\nParameters for this function define the camera's position,\nthe center of the sketch (where the camera is pointing),\nand an up direction (the orientation of the camera).
\nThis function simulates the movements of the camera, allowing objects to be\nviewed from various angles. Remember, it does not move the objects themselves\nbut the camera instead. For example when the centerX value is positive,\nand the camera is rotating to the right side of the sketch,\nthe object will seem like it's moving to the left.
\nSee this example\nto view the position of your camera.
\nIf no parameters are given, the following default is used:\ncamera(0, 0, 800, 0, 0, 0, 0, 1, 0)
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n describe('a square moving closer and then away from the camera.');\n}\nfunction draw() {\n background(204);\n //move the camera away from the plane by a sin wave\n camera(0, 0, 20 + sin(frameCount * 0.01) * 10, 0, 0, 0, 0, 1, 0);\n plane(10, 10);\n}\n
\n",
+ "\n\n//move slider to see changes!\n//sliders control the first 6 parameters of camera()\nlet sliderGroup = [];\nlet X;\nlet Y;\nlet Z;\nlet centerX;\nlet centerY;\nlet centerZ;\nlet h = 20;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n //create sliders\n for (var i = 0; i < 6; i++) {\n if (i === 2) {\n sliderGroup[i] = createSlider(10, 400, 200);\n } else {\n sliderGroup[i] = createSlider(-400, 400, 0);\n }\n h = map(i, 0, 6, 5, 85);\n sliderGroup[i].position(10, height + h);\n sliderGroup[i].style('width', '80px');\n }\n describe(\n 'White square repeatedly grows to fill canvas and then shrinks. An interactive example of a red cube with 3 sliders for moving it across x, y, z axis and 3 sliders for shifting its center.'\n );\n}\n\nfunction draw() {\n background(60);\n // assigning sliders' value to each parameters\n X = sliderGroup[0].value();\n Y = sliderGroup[1].value();\n Z = sliderGroup[2].value();\n centerX = sliderGroup[3].value();\n centerY = sliderGroup[4].value();\n centerZ = sliderGroup[5].value();\n camera(X, Y, Z, centerX, centerY, centerZ, 0, 1, 0);\n stroke(255);\n fill(255, 102, 94);\n box(85);\n}\n
\n"
+ ],
+ "alt": "White square repeatedly grows to fill canvas and then shrinks.\nAn interactive example of a red cube with 3 sliders for moving it across x, y,\nz axis and 3 sliders for shifting its center.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "camera position value on x axis",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "camera position value on y axis",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "camera position value on z axis",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "centerX",
+ "description": "x coordinate representing center of the sketch",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "centerY",
+ "description": "y coordinate representing center of the sketch",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "centerZ",
+ "description": "z coordinate representing center of the sketch",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "upX",
+ "description": "x component of direction 'up' from camera",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "upY",
+ "description": "y component of direction 'up' from camera",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "upZ",
+ "description": "z component of direction 'up' from camera",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "perspective",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 188,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets a perspective projection for the current camera in a 3D sketch.\nThis projection represents depth through foreshortening: objects\nthat are close to the camera appear their actual size while those\nthat are further away from the camera appear smaller.
\nThe parameters to this function define the viewing frustum\n(the truncated pyramid within which objects are seen by the camera) through\nvertical field of view, aspect ratio (usually width/height), and near and far\nclipping planes.
\nIf no parameters are given, the default values are used as:
\nfov
: The default field of view for the camera is such that the full height of renderer is visible when it is positioned at a default distance of 800 units from the camera.aspect
: The default aspect ratio is the ratio of renderer's width to renderer's height.near
: The default value for the near clipping plane is 80, which is 0.1 times the default distance from the camera to its subject.far
: The default value for the far clipping plane is 8000, which is 10 times the default distance from the camera to its subject.
If you prefer a fixed field of view, follow these steps:
\n- Choose your desired field of view angle (
fovy
). This is how wide the camera can see. - To ensure that you can see the entire width across horizontally and height across vertically, place the camera a distance of
(height / 2) / tan(fovy / 2)
back from its subject. - Call perspective with the chosen field of view, canvas aspect ratio, and near/far values:\n
perspective(fovy, width / height, cameraDistance / 10, cameraDistance * 10);
",
+ "example": [
+ "\n\n//drag the mouse to look around!\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n perspective(PI / 3.0, width / height, 0.1, 500);\n describe(\n 'two colored 3D boxes move back and forth, rotating as mouse is dragged.'\n );\n}\nfunction draw() {\n background(200);\n orbitControl();\n normalMaterial();\n\n rotateX(-0.3);\n rotateY(-0.2);\n translate(0, 0, -50);\n\n push();\n translate(-15, 0, sin(frameCount / 30) * 65);\n box(30);\n pop();\n push();\n translate(15, 0, sin(frameCount / 30 + PI) * 65);\n box(30);\n pop();\n}\n
\n"
+ ],
+ "alt": "two colored 3D boxes move back and forth, rotating as mouse is dragged.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "fovy",
+ "description": "camera frustum vertical field of view,\nfrom bottom to top of view, in angleMode units",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "aspect",
+ "description": "camera frustum aspect ratio",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "near",
+ "description": "frustum near plane length",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "far",
+ "description": "frustum far plane length",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "ortho",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 252,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets an orthographic projection for the current camera in a 3D sketch\nand defines a box-shaped viewing frustum within which objects are seen.\nIn this projection, all objects with the same dimension appear the same\nsize, regardless of whether they are near or far from the camera.
\nThe parameters to this function specify the viewing frustum where\nleft and right are the minimum and maximum x values, top and bottom are\nthe minimum and maximum y values, and near and far are the minimum and\nmaximum z values.
\nIf no parameters are given, the following default is used:\northo(-width/2, width/2, -height/2, height/2, 0, max(width, height)).
\n",
+ "example": [
+ "\n\n//drag the mouse to look around!\n//there's no vanishing point\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n ortho(-width / 2, width / 2, height / 2, -height / 2, 0, 500);\n describe(\n 'two 3D boxes move back and forth along same plane, rotating as mouse is dragged.'\n );\n}\nfunction draw() {\n background(200);\n orbitControl();\n normalMaterial();\n\n rotateX(0.2);\n rotateY(-0.2);\n push();\n translate(-15, 0, sin(frameCount / 30) * 65);\n box(30);\n pop();\n push();\n translate(15, 0, sin(frameCount / 30 + PI) * 65);\n box(30);\n pop();\n}\n
\n"
+ ],
+ "alt": "two 3D boxes move back and forth along same plane, rotating as mouse is dragged.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "left",
+ "description": "camera frustum left plane",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "right",
+ "description": "camera frustum right plane",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "bottom",
+ "description": "camera frustum bottom plane",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "top",
+ "description": "camera frustum top plane",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "near",
+ "description": "camera frustum near plane",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "far",
+ "description": "camera frustum far plane",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "frustum",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 320,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the frustum of the current camera as defined by\nthe parameters.
\nA frustum is a geometric form: a pyramid with its top\ncut off. With the viewer's eye at the imaginary top of\nthe pyramid, the six planes of the frustum act as clipping\nplanes when rendering a 3D view. Thus, any form inside the\nclipping planes is visible; anything outside\nthose planes is not visible.
\nSetting the frustum changes the perspective of the scene being rendered.\nThis can be achieved more simply in many cases by using\nperspective().
\nIf no parameters are given, the following default is used:\nfrustum(-width/20, width/20, height/20, -height/20, eyeZ/10, eyeZ*10),\nwhere eyeZ is equal to 800.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n setAttributes('antialias', true);\n camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n frustum(-0.1, 0.1, -0.1, 0.1, 0.1, 200);\n describe(\n 'two 3D boxes move back and forth along same plane, rotating as mouse is dragged.'\n );\n}\nfunction draw() {\n background(200);\n orbitControl();\n normalMaterial();\n\n rotateY(-0.2);\n rotateX(-0.3);\n push();\n translate(-15, 0, sin(frameCount / 30) * 25);\n box(30);\n pop();\n push();\n translate(15, 0, sin(frameCount / 30 + PI) * 25);\n box(30);\n pop();\n}\n
\n"
+ ],
+ "alt": "two 3D boxes move back and forth along same plane, rotating as mouse is dragged.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "left",
+ "description": "camera frustum left plane",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "right",
+ "description": "camera frustum right plane",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "bottom",
+ "description": "camera frustum bottom plane",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "top",
+ "description": "camera frustum top plane",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "near",
+ "description": "camera frustum near plane",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "far",
+ "description": "camera frustum far plane",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "createCamera",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 387,
+ "itemtype": "method",
+ "description": "Creates a new p5.Camera object and sets it\nas the current (active) camera.
\nThe new camera is initialized with a default position\n(see camera())\nand a default perspective projection\n(see perspective()).\nIts properties can be controlled with the p5.Camera\nmethods.
\nNote: Every 3D sketch starts with a default camera initialized.\nThis camera can be controlled with the global methods\ncamera(),\nperspective(), ortho(),\nand frustum() if it is the only camera\nin the scene.
\n",
+ "example": [
+ "\n// Creates a camera object and animates it around a box.\nlet camera;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n background(0);\n camera = createCamera();\n camera.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n camera.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n describe('An example that creates a camera and moves it around the box.');\n}\n\nfunction draw() {\n background(0);\n // The camera will automatically\n // rotate to look at [0, 0, 0].\n camera.lookAt(0, 0, 0);\n\n // The camera will move on the\n // x axis.\n camera.setPosition(sin(frameCount / 60) * 200, 0, 100);\n box(20);\n\n // A 'ground' box to give the viewer\n // a better idea of where the camera\n // is looking.\n translate(0, 50, 0);\n rotateX(HALF_PI);\n box(150, 150, 20);\n}\n
"
+ ],
+ "alt": "An example that creates a camera and moves it around the box.",
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "The newly created camera object.",
+ "type": "p5.Camera"
+ }
+ }
+ ],
+ "return": {
+ "description": "The newly created camera object.",
+ "type": "p5.Camera"
+ },
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "setCamera",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 2282,
+ "itemtype": "method",
+ "description": "Sets the current (active) camera of a 3D sketch.\nAllows for switching between multiple cameras.",
+ "example": [
+ "\n\nlet cam1, cam2;\nlet currentCamera;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n normalMaterial();\n\n cam1 = createCamera();\n cam1.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n cam1.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n cam2 = createCamera();\n cam2.setPosition(30, 0, 50);\n cam2.lookAt(0, 0, 0);\n cam2.ortho(-50, 50, -50, 50, 0, 200);\n\n // set variable for previously active camera:\n currentCamera = 1;\n\n describe(\n 'Canvas switches between two camera views, each showing a series of spinning 3D boxes.'\n );\n}\n\nfunction draw() {\n background(200);\n\n // every 100 frames, switch between the two cameras\n if (frameCount % 100 === 0) {\n if (currentCamera === 1) {\n setCamera(cam1);\n currentCamera = 0;\n } else {\n setCamera(cam2);\n currentCamera = 1;\n }\n }\n\n // camera 1:\n cam1.lookAt(0, 0, 0);\n cam1.setPosition(sin(frameCount / 60) * 200, 0, 100);\n\n drawBoxes();\n}\n\nfunction drawBoxes() {\n rotateX(frameCount * 0.01);\n translate(-100, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n}\n
\n"
+ ],
+ "alt": "Canvas switches between two camera views, each showing a series of spinning\n3D boxes.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "cam",
+ "description": "p5.Camera object",
+ "type": "p5.Camera"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "flipU",
+ "file": "src/webgl/p5.Geometry.js",
+ "line": 205,
+ "itemtype": "method",
+ "description": "Flips the U texture coordinates of the model.",
+ "example": [
+ "\n\nlet img;\nlet model1;\nlet model2;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n createCanvas(150, 150, WEBGL);\n background(200);\n\n model1 = createShape(50, 50);\n model2 = createShape(50, 50);\n model2.flipU();\n}\n\nfunction draw() {\n background(0);\n\n // original\n push();\n translate(-40, 0, 0);\n texture(img);\n noStroke();\n plane(50);\n model(model1);\n pop();\n\n // flipped\n push();\n translate(40, 0, 0);\n texture(img);\n noStroke();\n plane(50);\n model(model2);\n pop();\n}\n\nfunction createShape(w, h) {\n return buildGeometry(() => {\n textureMode(NORMAL);\n beginShape();\n vertex(-w / 2, -h / 2, 0, 0);\n vertex(w / 2, -h / 2, 1, 0);\n vertex(w / 2, h / 2, 1, 1);\n vertex(-w / 2, h / 2, 0, 1);\n endShape(CLOSE);\n });\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "p5.Geometry"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Geometry"
+ },
+ "class": "p5.Geometry",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "flipV",
+ "file": "src/webgl/p5.Geometry.js",
+ "line": 277,
+ "itemtype": "method",
+ "description": "Flips the V texture coordinates of the model.",
+ "example": [
+ "\n\nlet img;\nlet model1;\nlet model2;\n\nfunction preload() {\n img = loadImage('assets/laDefense.jpg');\n}\n\nfunction setup() {\n createCanvas(150, 150, WEBGL);\n background(200);\n\n model1 = createShape(50, 50);\n model2 = createShape(50, 50);\n model2.flipV();\n}\n\nfunction draw() {\n background(0);\n\n // original\n push();\n translate(-40, 0, 0);\n texture(img);\n noStroke();\n plane(50);\n model(model1);\n pop();\n\n // flipped\n push();\n translate(40, 0, 0);\n texture(img);\n noStroke();\n plane(50);\n model(model2);\n pop();\n}\n\nfunction createShape(w, h) {\n return buildGeometry(() => {\n textureMode(NORMAL);\n beginShape();\n vertex(-w / 2, -h / 2, 0, 0);\n vertex(w / 2, -h / 2, 1, 0);\n vertex(w / 2, h / 2, 1, 1);\n vertex(-w / 2, h / 2, 0, 1);\n endShape(CLOSE);\n });\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "p5.Geometry"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Geometry"
+ },
+ "class": "p5.Geometry",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "setAttributes",
+ "file": "src/webgl/p5.RendererGL.js",
+ "line": 261,
+ "itemtype": "method",
+ "description": "Set attributes for the WebGL Drawing context.\nThis is a way of adjusting how the WebGL\nrenderer works to fine-tune the display and performance.
\nNote that this will reinitialize the drawing context\nif called after the WebGL canvas is made.
\nIf an object is passed as the parameter, all attributes\nnot declared in the object will be set to defaults.
\nThe available attributes are:\n
\nalpha - indicates if the canvas contains an alpha buffer\ndefault is true
\ndepth - indicates whether the drawing buffer has a depth buffer\nof at least 16 bits - default is true
\nstencil - indicates whether the drawing buffer has a stencil buffer\nof at least 8 bits
\nantialias - indicates whether or not to perform anti-aliasing\ndefault is false (true in Safari)
\npremultipliedAlpha - indicates that the page compositor will assume\nthe drawing buffer contains colors with pre-multiplied alpha\ndefault is true
\npreserveDrawingBuffer - if true the buffers will not be cleared and\nand will preserve their values until cleared or overwritten by author\n(note that p5 clears automatically on draw loop)\ndefault is true
\nperPixelLighting - if true, per-pixel lighting will be used in the\nlighting shader otherwise per-vertex lighting is used.\ndefault is true.
\nversion - either 1 or 2, to specify which WebGL version to ask for. By\ndefault, WebGL 2 will be requested. If WebGL2 is not available, it will\nfall back to WebGL 1. You can check what version is used with by looking at\nthe global webglVersion
property.
\n",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n}\n\nfunction draw() {\n background(255);\n push();\n rotateZ(frameCount * 0.02);\n rotateX(frameCount * 0.02);\n rotateY(frameCount * 0.02);\n fill(0, 0, 0);\n box(50);\n pop();\n}\n
\n\n
\nNow with the antialias attribute set to true.\n
\n\n\nfunction setup() {\n setAttributes('antialias', true);\n createCanvas(100, 100, WEBGL);\n}\n\nfunction draw() {\n background(255);\n push();\n rotateZ(frameCount * 0.02);\n rotateX(frameCount * 0.02);\n rotateY(frameCount * 0.02);\n fill(0, 0, 0);\n box(50);\n pop();\n}\n
\n\n\n\n\n// press the mouse button to disable perPixelLighting\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n noStroke();\n fill(255);\n}\n\nlet lights = [\n { c: '#f00', t: 1.12, p: 1.91, r: 0.2 },\n { c: '#0f0', t: 1.21, p: 1.31, r: 0.2 },\n { c: '#00f', t: 1.37, p: 1.57, r: 0.2 },\n { c: '#ff0', t: 1.12, p: 1.91, r: 0.7 },\n { c: '#0ff', t: 1.21, p: 1.31, r: 0.7 },\n { c: '#f0f', t: 1.37, p: 1.57, r: 0.7 }\n];\n\nfunction draw() {\n let t = millis() / 1000 + 1000;\n background(0);\n directionalLight(color('#222'), 1, 1, 1);\n\n for (let i = 0; i < lights.length; i++) {\n let light = lights[i];\n pointLight(\n color(light.c),\n p5.Vector.fromAngles(t * light.t, t * light.p, width * light.r)\n );\n }\n\n specularMaterial(255);\n sphere(width * 0.1);\n\n rotateX(t * 0.77);\n rotateY(t * 0.83);\n rotateZ(t * 0.91);\n torus(width * 0.3, width * 0.07, 24, 10);\n}\n\nfunction mousePressed() {\n setAttributes('perPixelLighting', false);\n noStroke();\n fill(255);\n}\nfunction mouseReleased() {\n setAttributes('perPixelLighting', true);\n noStroke();\n fill(255);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "key",
+ "description": "Name of attribute",
+ "type": "String"
+ },
+ {
+ "name": "value",
+ "description": "New value of named attribute",
+ "type": "Boolean"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "obj",
+ "description": "object with key-value pairs",
+ "type": "Object"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ {
+ "name": "update",
+ "file": "src/webgl/p5.Texture.js",
+ "line": 201,
+ "itemtype": "method",
+ "description": "Checks if the source data for this texture has changed (if it's\neasy to do so) and reuploads the texture if necessary. If it's not\npossible or to expensive to do a calculation to determine wheter or\nnot the data has occurred, this method simply re-uploads the texture.",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "bindTexture",
+ "file": "src/webgl/p5.Texture.js",
+ "line": 300,
+ "itemtype": "method",
+ "description": "Binds the texture to the appropriate GL target.",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "unbindTexture",
+ "file": "src/webgl/p5.Texture.js",
+ "line": 313,
+ "itemtype": "method",
+ "description": "Unbinds the texture from the appropriate GL target.",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "setInterpolation",
+ "file": "src/webgl/p5.Texture.js",
+ "line": 338,
+ "itemtype": "method",
+ "description": "Sets how a texture is be interpolated when upscaled or downscaled.\nNearest filtering uses nearest neighbor scaling when interpolating\nLinear filtering uses WebGL's linear scaling when interpolating",
+ "example": [],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "downScale",
+ "description": "Specifies the texture filtering when\ntextures are shrunk. Options are LINEAR or NEAREST",
+ "type": "String"
+ },
+ {
+ "name": "upScale",
+ "description": "Specifies the texture filtering when\ntextures are magnified. Options are LINEAR or NEAREST",
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "setWrapMode",
+ "file": "src/webgl/p5.Texture.js",
+ "line": 368,
+ "itemtype": "method",
+ "description": "Sets the texture wrapping mode. This controls how textures behave\nwhen their uv's go outside of the 0 - 1 range. There are three options:\nCLAMP, REPEAT, and MIRROR. REPEAT & MIRROR are only available if the texture\nis a power of two size (128, 256, 512, 1024, etc.).",
+ "example": [],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "wrapX",
+ "description": "Controls the horizontal texture wrapping behavior",
+ "type": "String"
+ },
+ {
+ "name": "wrapY",
+ "description": "Controls the vertical texture wrapping behavior",
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "toString",
+ "file": "src/color/p5.Color.js",
+ "line": 394,
+ "itemtype": "method",
+ "description": "Returns the color formatted as a string. Doing so can be useful for\ndebugging, or for using p5.js with other libraries.",
+ "example": [
+ "\n\ncreateCanvas(200, 100);\nstroke(255);\nconst myColor = color(100, 100, 250);\nfill(myColor);\nrotate(HALF_PI);\ntext(myColor.toString(), 0, -5);\ntext(myColor.toString('#rrggbb'), 0, -30);\ntext(myColor.toString('rgba%'), 0, -55);\ndescribe('Three text representation of a color written sideways.');\n
\n\n\n\n\nconst myColor = color(100, 130, 250);\ntext(myColor.toString('#rrggbb'), 25, 25);\ndescribe('A hexadecimal representation of a color.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "format",
+ "description": "how the color string will be formatted.\nLeaving this empty formats the string as rgba(r, g, b, a).\n'#rgb' '#rgba' '#rrggbb' and '#rrggbbaa' format as hexadecimal color codes.\n'rgb' 'hsb' and 'hsl' return the color formatted in the specified color mode.\n'rgba' 'hsba' and 'hsla' are the same as above but with alpha channels.\n'rgb%' 'hsb%' 'hsl%' 'rgba%' 'hsba%' and 'hsla%' format as percentages.",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "the formatted string.",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "the formatted string.",
+ "type": "String"
+ },
+ "class": "p5.Color",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "setRed",
+ "file": "src/color/p5.Color.js",
+ "line": 585,
+ "itemtype": "method",
+ "description": "Sets the red component of a color. The range depends on the\ncolorMode(). In the default RGB mode it's\nbetween 0 and 255.",
+ "example": [
+ "\n\nlet backgroundColor;\n\nfunction setup() {\n backgroundColor = color(100, 50, 150);\n}\n\nfunction draw() {\n backgroundColor.setRed(128 + 128 * sin(millis() / 1000));\n background(backgroundColor);\n describe('A canvas with a gradually changing background color.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "red",
+ "description": "the new red value.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Color",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "setGreen",
+ "file": "src/color/p5.Color.js",
+ "line": 614,
+ "itemtype": "method",
+ "description": "Sets the green component of a color. The range depends on the\ncolorMode(). In the default RGB mode it's\nbetween 0 and 255.",
+ "example": [
+ "\n\nlet backgroundColor;\n\nfunction setup() {\n backgroundColor = color(100, 50, 150);\n}\n\nfunction draw() {\n backgroundColor.setGreen(128 + 128 * sin(millis() / 1000));\n background(backgroundColor);\n describe('A canvas with a gradually changing background color.');\n}\n
\n\n*"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "green",
+ "description": "the new green value.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Color",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "setBlue",
+ "file": "src/color/p5.Color.js",
+ "line": 643,
+ "itemtype": "method",
+ "description": "Sets the blue component of a color. The range depends on the\ncolorMode(). In the default RGB mode it's\nbetween 0 and 255.",
+ "example": [
+ "\n\nlet backgroundColor;\n\nfunction setup() {\n backgroundColor = color(100, 50, 150);\n}\n\nfunction draw() {\n backgroundColor.setBlue(128 + 128 * sin(millis() / 1000));\n background(backgroundColor);\n describe('A canvas with a gradually changing background color.');\n}\n
\n\n*"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "blue",
+ "description": "the new blue value.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Color",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "setAlpha",
+ "file": "src/color/p5.Color.js",
+ "line": 672,
+ "itemtype": "method",
+ "description": "Sets the alpha (transparency) value of a color. The range depends on the\ncolorMode(). In the default RGB mode it's\nbetween 0 and 255.",
+ "example": [
+ "\n\nfunction draw() {\n clear();\n background(200);\n const squareColor = color(100, 50, 100);\n squareColor.setAlpha(128 + 128 * sin(millis() / 1000));\n fill(squareColor);\n rect(13, 13, width - 26, height - 26);\n describe(\n 'A purple square with gradually changing opacity drawn on a gray background.'\n );\n}\n
\n\n*"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "alpha",
+ "description": "the new alpha value.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Color",
+ "static": false,
+ "module": "Color",
+ "submodule": "Creating & Reading"
+ },
+ {
+ "name": "reset",
+ "file": "src/core/p5.Graphics.js",
+ "line": 117,
+ "itemtype": "method",
+ "description": "Resets certain values such as those modified by functions in the Transform category\nand in the Lights category that are not automatically reset\nwith graphics buffer objects. Calling this in draw() will copy the behavior\nof the standard canvas.",
+ "example": [
+ "\nlet pg;\nfunction setup() {\n createCanvas(100, 100);\n background(0);\n pg = createGraphics(50, 100);\n pg.fill(0);\n frameRate(5);\n}\n\nfunction draw() {\n image(pg, width / 2, 0);\n pg.background(255);\n // p5.Graphics object behave a bit differently in some cases\n // The normal canvas on the left resets the translate\n // with every loop through draw()\n // the graphics object on the right doesn't automatically reset\n // so translate() is additive and it moves down the screen\n rect(0, 0, width / 2, 5);\n pg.rect(0, 0, width / 2, 5);\n translate(0, 5, 0);\n pg.translate(0, 5, 0);\n}\nfunction mouseClicked() {\n // if you click you will see that\n // reset() resets the translate back to the initial state\n // of the Graphics object\n pg.reset();\n}\n
"
+ ],
+ "alt": "A white line on a black background stays still on the top-left half.\nA black line animates from top to bottom on a white background on the right half.\nWhen clicked, the black line starts back over at the top.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Graphics",
+ "static": false,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ {
+ "name": "remove",
+ "file": "src/core/p5.Graphics.js",
+ "line": 176,
+ "itemtype": "method",
+ "description": "Removes a Graphics object from the page and frees any resources\nassociated with it.",
+ "example": [
+ "\nlet bg;\nfunction setup() {\n bg = createCanvas(100, 100);\n bg.background(0);\n image(bg, 0, 0);\n bg.remove();\n}\n
\n\n\nlet bg;\nfunction setup() {\n pixelDensity(1);\n createCanvas(100, 100);\n stroke(255);\n fill(0);\n\n // create and draw the background image\n bg = createGraphics(100, 100);\n bg.background(200);\n bg.ellipse(50, 50, 80, 80);\n}\nfunction draw() {\n let t = millis() / 1000;\n // draw the background\n if (bg) {\n image(bg, frameCount % 100, 0);\n image(bg, frameCount % 100 - 100, 0);\n }\n // draw the foreground\n let p = p5.Vector.fromAngle(t, 35).add(50, 50);\n ellipse(p.x, p.y, 30);\n}\nfunction mouseClicked() {\n // remove the background\n if (bg) {\n bg.remove();\n bg = null;\n }\n}\n
"
+ ],
+ "alt": "no image\na multi-colored circle moving back and forth over a scrolling background.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Graphics",
+ "static": false,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ {
+ "name": "createFramebuffer",
+ "file": "src/core/p5.Graphics.js",
+ "line": 198,
+ "itemtype": "method",
+ "description": "Creates and returns a new p5.Framebuffer\ninside a p5.Graphics WebGL context.
\nThis takes the same parameters as the global\ncreateFramebuffer function.
\n",
+ "example": [],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "p5.Framebuffer"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Framebuffer"
+ },
+ "class": "p5.Graphics",
+ "static": false,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ {
+ "name": "resize",
+ "file": "src/core/p5.Renderer.js",
+ "line": 122,
+ "itemtype": "method",
+ "description": "Resize our canvas element.",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Renderer",
+ "static": false,
+ "module": "Rendering",
+ "submodule": "Rendering"
+ },
+ {
+ "name": "size",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 116,
+ "itemtype": "method",
+ "description": "Returns the number of key-value pairs currently stored in the Dictionary.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createNumberDict(1, 10);\n myDictionary.create(2, 20);\n myDictionary.create(3, 30);\n print(myDictionary.size()); // logs 3 to the console\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "the number of key-value pairs in the Dictionary",
+ "type": "Integer"
+ }
+ }
+ ],
+ "return": {
+ "description": "the number of key-value pairs in the Dictionary",
+ "type": "Integer"
+ },
+ "class": "p5.TypedDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "hasKey",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 137,
+ "itemtype": "method",
+ "description": "Returns true if the given key exists in the Dictionary,\notherwise returns false.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createStringDict('p5', 'js');\n print(myDictionary.hasKey('p5')); // logs true to console\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "key",
+ "description": "that you want to look up",
+ "type": "Number|String"
+ }
+ ],
+ "return": {
+ "description": "whether that key exists in Dictionary",
+ "type": "Boolean"
+ }
+ }
+ ],
+ "return": {
+ "description": "whether that key exists in Dictionary",
+ "type": "Boolean"
+ },
+ "class": "p5.TypedDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "get",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 158,
+ "itemtype": "method",
+ "description": "Returns the value stored at the given key.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createStringDict('p5', 'js');\n let myValue = myDictionary.get('p5');\n print(myValue === 'js'); // logs true to console\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "the",
+ "description": "key you want to access",
+ "type": "Number|String"
+ }
+ ],
+ "return": {
+ "description": "the value stored at that key",
+ "type": "Number|String"
+ }
+ }
+ ],
+ "return": {
+ "description": "the value stored at that key",
+ "type": "Number|String"
+ },
+ "class": "p5.TypedDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "set",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 184,
+ "itemtype": "method",
+ "description": "Updates the value associated with the given key in case it already exists\nin the Dictionary. Otherwise a new key-value pair is added.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createStringDict('p5', 'js');\n myDictionary.set('p5', 'JS');\n myDictionary.print(); // logs \"key: p5 - value: JS\" to console\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "key",
+ "type": "Number|String"
+ },
+ {
+ "name": "value",
+ "type": "Number|String"
+ }
+ ]
+ }
+ ],
+ "class": "p5.TypedDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "create",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 223,
+ "itemtype": "method",
+ "description": "Creates a new key-value pair in the Dictionary.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createStringDict('p5', 'js');\n myDictionary.create('happy', 'coding');\n myDictionary.print();\n // above logs \"key: p5 - value: js, key: happy - value: coding\" to console\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "key",
+ "type": "Number|String"
+ },
+ {
+ "name": "value",
+ "type": "Number|String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "obj",
+ "description": "key/value pair",
+ "type": "Object"
+ }
+ ]
+ }
+ ],
+ "class": "p5.TypedDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "clear",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 251,
+ "itemtype": "method",
+ "description": "Removes all previously stored key-value pairs from the Dictionary.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createStringDict('p5', 'js');\n print(myDictionary.hasKey('p5')); // prints 'true'\n myDictionary.clear();\n print(myDictionary.hasKey('p5')); // prints 'false'\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.TypedDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "remove",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 274,
+ "itemtype": "method",
+ "description": "Removes the key-value pair stored at the given key from the Dictionary.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createStringDict('p5', 'js');\n myDictionary.create('happy', 'coding');\n myDictionary.print();\n // above logs \"key: p5 - value: js, key: happy - value: coding\" to console\n myDictionary.remove('p5');\n myDictionary.print();\n // above logs \"key: happy value: coding\" to console\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "key",
+ "description": "for the pair to remove",
+ "type": "Number|String"
+ }
+ ]
+ }
+ ],
+ "class": "p5.TypedDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "print",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 297,
+ "itemtype": "method",
+ "description": "Logs the set of items currently stored in the Dictionary to the console.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createStringDict('p5', 'js');\n myDictionary.create('happy', 'coding');\n myDictionary.print();\n // above logs \"key: p5 - value: js, key: happy - value: coding\" to console\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.TypedDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "saveTable",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 328,
+ "itemtype": "method",
+ "description": "Converts the Dictionary into a CSV file for local download.",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100);\n background(200);\n text('click here to save', 10, 10, 70, 80);\n}\n\nfunction mousePressed() {\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n createStringDict({\n john: 1940,\n paul: 1942,\n george: 1943,\n ringo: 1940\n }).saveTable('beatles');\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.TypedDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "saveJSON",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 364,
+ "itemtype": "method",
+ "description": "Converts the Dictionary into a JSON file for local download.",
+ "example": [
+ "\n\nfunction setup() {\n createCanvas(100, 100);\n background(200);\n text('click here to save', 10, 10, 70, 80);\n}\n\nfunction mousePressed() {\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n createStringDict({\n john: 1940,\n paul: 1942,\n george: 1943,\n ringo: 1940\n }).saveJSON('beatles');\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.TypedDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "add",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 432,
+ "itemtype": "method",
+ "description": "Add the given number to the value currently stored at the given key.\nThe sum then replaces the value previously stored in the Dictionary.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createNumberDict(2, 5);\n myDictionary.add(2, 2);\n print(myDictionary.get(2)); // logs 7 to console.\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "Key",
+ "description": "for the value you wish to add to",
+ "type": "Number"
+ },
+ {
+ "name": "Number",
+ "description": "to add to the value",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.NumberDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "sub",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 457,
+ "itemtype": "method",
+ "description": "Subtract the given number from the value currently stored at the given key.\nThe difference then replaces the value previously stored in the Dictionary.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createNumberDict(2, 5);\n myDictionary.sub(2, 2);\n print(myDictionary.get(2)); // logs 3 to console.\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "Key",
+ "description": "for the value you wish to subtract from",
+ "type": "Number"
+ },
+ {
+ "name": "Number",
+ "description": "to subtract from the value",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.NumberDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "mult",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 478,
+ "itemtype": "method",
+ "description": "Multiply the given number with the value currently stored at the given key.\nThe product then replaces the value previously stored in the Dictionary.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createNumberDict(2, 4);\n myDictionary.mult(2, 2);\n print(myDictionary.get(2)); // logs 8 to console.\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "Key",
+ "description": "for value you wish to multiply",
+ "type": "Number"
+ },
+ {
+ "name": "Amount",
+ "description": "to multiply the value by",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.NumberDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "div",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 503,
+ "itemtype": "method",
+ "description": "Divide the given number with the value currently stored at the given key.\nThe quotient then replaces the value previously stored in the Dictionary.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createNumberDict(2, 8);\n myDictionary.div(2, 2);\n print(myDictionary.get(2)); // logs 4 to console.\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "Key",
+ "description": "for value you wish to divide",
+ "type": "Number"
+ },
+ {
+ "name": "Amount",
+ "description": "to divide the value by",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.NumberDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "minValue",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 548,
+ "itemtype": "method",
+ "description": "Return the lowest number currently stored in the Dictionary.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createNumberDict({ 2: -10, 4: 0.65, 1.2: 3 });\n let lowestValue = myDictionary.minValue(); // value is -10\n print(lowestValue);\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ },
+ "class": "p5.NumberDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "maxValue",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 566,
+ "itemtype": "method",
+ "description": "Return the highest number currently stored in the Dictionary.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createNumberDict({ 2: -10, 4: 0.65, 1.2: 3 });\n let highestValue = myDictionary.maxValue(); // value is 3\n print(highestValue);\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ },
+ "class": "p5.NumberDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "minKey",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 605,
+ "itemtype": "method",
+ "description": "Return the lowest key currently used in the Dictionary.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createNumberDict({ 2: 4, 4: 6, 1.2: 3 });\n let lowestKey = myDictionary.minKey(); // value is 1.2\n print(lowestKey);\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ },
+ "class": "p5.NumberDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "maxKey",
+ "file": "src/data/p5.TypedDict.js",
+ "line": 623,
+ "itemtype": "method",
+ "description": "Return the highest key currently used in the Dictionary.",
+ "example": [
+ "\n\nfunction setup() {\n let myDictionary = createNumberDict({ 2: 4, 4: 6, 1.2: 3 });\n let highestKey = myDictionary.maxKey(); // value is 4\n print(highestKey);\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ },
+ "class": "p5.NumberDict",
+ "static": false,
+ "module": "Data",
+ "submodule": "Dictionary"
+ },
+ {
+ "name": "play",
+ "file": "src/dom/dom.js",
+ "line": 3755,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Play audio or video from a media element.",
+ "example": [
+ "\n\nlet beat;\n\nfunction setup() {\n background(200);\n\n textAlign(CENTER);\n text('Click to play', 50, 50);\n\n // Create a p5.MediaElement using createAudio().\n beat = createAudio('assets/beat.mp3');\n\n describe('The text \"Click to play\" written in black on a gray background. A beat plays when the user clicks the square.');\n}\n\n// Play the beat when the user\n// presses the mouse.\nfunction mousePressed() {\n beat.play();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "stop",
+ "file": "src/dom/dom.js",
+ "line": 3832,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Stops a media element and sets its current time to zero. Calling\nmedia.play()
will restart playing audio/video from the beginning.",
+ "example": [
+ "\n\nlet beat;\nlet isStopped = true;\n\nfunction setup() {\n // Create a p5.MediaElement using createAudio().\n beat = createAudio('assets/beat.mp3');\n\n describe('The text \"Click to start\" written in black on a gray background. The beat starts or stops when the user presses the mouse.');\n}\n\nfunction draw() {\n background(200);\n\n textAlign(CENTER);\n if (isStopped === true) {\n text('Click to start', 50, 50);\n } else {\n text('Click to stop', 50, 50);\n }\n}\n\n// Adjust playback when the user\n// presses the mouse.\nfunction mousePressed() {\n if (isStopped === true) {\n // If the beat is stopped,\n // play it.\n beat.play();\n isStopped = false;\n } else {\n // If the beat is playing,\n // stop it.\n beat.stop();\n isStopped = true;\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "pause",
+ "file": "src/dom/dom.js",
+ "line": 3887,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Pauses a media element. Calling media.play()
will resume playing\naudio/video from the moment it paused.",
+ "example": [
+ "\n\nlet beat;\nlet isPaused = true;\n\nfunction setup() {\n // Create a p5.MediaElement using createAudio().\n beat = createAudio('assets/beat.mp3');\n\n describe('The text \"Click to play\" written in black on a gray background. The beat plays or pauses when the user clicks the square.');\n}\n\nfunction draw() {\n background(200);\n\n // Display different instructions\n // based on playback.\n textAlign(CENTER);\n if (isPaused === true) {\n text('Click to play', 50, 50);\n } else {\n text('Click to pause', 50, 50);\n }\n}\n\n// Adjust playback when the user\n// presses the mouse.\nfunction mousePressed() {\n if (isPaused === true) {\n // If the beat is paused,\n // play it.\n beat.play();\n isPaused = false;\n } else {\n // If the beat is playing,\n // pause it.\n beat.pause();\n isPaused = true;\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "loop",
+ "file": "src/dom/dom.js",
+ "line": 3942,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Play the audio/video repeatedly in a loop.",
+ "example": [
+ "\n\nlet beat;\nlet isLooping = false;\n\nfunction setup() {\n background(200);\n\n // Create a p5.MediaElement using createAudio().\n beat = createAudio('assets/beat.mp3');\n\n describe('The text \"Click to loop\" written in black on a gray background. A beat plays repeatedly in a loop when the user clicks. The beat stops when the user clicks again.');\n}\n\nfunction draw() {\n background(200);\n\n // Display different instructions\n // based on playback.\n textAlign(CENTER);\n if (isLooping === true) {\n text('Click to stop', 50, 50);\n } else {\n text('Click to loop', 50, 50);\n }\n}\n\n// Adjust playback when the user\n// presses the mouse.\nfunction mousePressed() {\n if (isLooping === true) {\n // If the beat is looping,\n // stop it.\n beat.stop();\n isLooping = false;\n } else {\n // If the beat is stopped,\n // loop it.\n beat.loop();\n isLooping = true;\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "noLoop",
+ "file": "src/dom/dom.js",
+ "line": 3998,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Stops the audio/video from playing in a loop. It will stop when it\nreaches the end.",
+ "example": [
+ "\n\nlet beat;\nlet isPlaying = false;\n\nfunction setup() {\n background(200);\n\n // Create a p5.MediaElement using createAudio().\n beat = createAudio('assets/beat.mp3');\n\n describe('The text \"Click to play\" written in black on a gray background. A beat plays when the user clicks. The beat stops when the user clicks again.');\n}\n\nfunction draw() {\n background(200);\n\n // Display different instructions\n // based on playback.\n textAlign(CENTER);\n if (isPlaying === true) {\n text('Click to stop', 50, 50);\n } else {\n text('Click to play', 50, 50);\n }\n}\n\n// Adjust playback when the user\n// presses the mouse.\nfunction mousePressed() {\n if (isPlaying === true) {\n // If the beat is playing,\n // stop it.\n beat.stop();\n isPlaying = false;\n } else {\n // If the beat is stopped,\n // play it.\n beat.play();\n isPlaying = true;\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "autoplay",
+ "file": "src/dom/dom.js",
+ "line": 4071,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the audio/video to play once it's loaded.
\nThe parameter, shouldAutoplay
, is optional. Calling\nmedia.autoplay()
without an argument causes the media to play\nautomatically. If true
is passed, as in media.autoplay(true)
, the\nmedia will automatically play. If false
is passed, as in\nmedia.autoPlay(false)
, it won't play automatically.
\n",
+ "example": [
+ "\n\nfunction setup() {\n noCanvas();\n\n // Load a video and play it automatically.\n let video = createVideo('assets/fingers.mov', () => {\n video.autoplay();\n video.size(100, 100);\n });\n\n describe('A video of fingers walking on a treadmill.');\n}\n
\n\n\n\n\nfunction setup() {\n noCanvas();\n\n // Load a video, but don't play it automatically.\n let video = createVideo('assets/fingers.mov', () => {\n video.autoplay(false);\n video.size(100, 100);\n });\n\n // Play the video when the user clicks on it.\n video.mousePressed(() => {\n video.play();\n });\n\n describe('An image of fingers on a treadmill. They start walking when the user double-clicks on them.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "shouldAutoplay",
+ "description": "whether the element should autoplay.",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "volume",
+ "file": "src/dom/dom.js",
+ "line": 4145,
+ "itemtype": "method",
+ "description": "Manages the audio/video volume.
\nCalling media.volume()
without an argument returns the current volume\nas a number in the range 0 (off) to 1 (maximum).
\nThe parameter, val
, is optional. It's a number that sets the volume\nfrom 0 (off) to 1 (maximum). For example, calling media.volume(0.5)
\nsets the volume to half of its maximum.
\n",
+ "example": [
+ "\n\nlet dragon;\n\nfunction setup() {\n // Create a p5.MediaElement using createAudio().\n dragon = createAudio('assets/lucky_dragons.mp3');\n // Show the default media controls.\n dragon.showControls();\n\n describe('The text \"Volume: V\" on a gray square with media controls beneath it. The number \"V\" oscillates between 0 and 1 as the music plays.');\n}\n\nfunction draw() {\n background(200);\n\n // Produce a number between 0 and 1.\n let n = 0.5 * sin(frameCount * 0.01) + 0.5;\n // Use n to set the volume.\n dragon.volume(n);\n\n // Get the current volume\n // and display it.\n let v = dragon.volume();\n // Round v to 1 decimal place\n // for display.\n v = round(v, 1);\n textAlign(CENTER);\n text(`Volume: ${v}`, 50, 50);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "current volume.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "current volume.",
+ "type": "Number"
+ },
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "speed",
+ "file": "src/dom/dom.js",
+ "line": 4205,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Manages the audio/video playback speed. Calling media.speed()
returns\nthe current speed as a number.
\nThe parameter, val
, is optional. It's a number that sets the playback\nspeed. 1 plays the media at normal speed, 0.5 plays it at half speed, 2\nplays it at double speed, and so on. -1 plays the media at normal speed\nin reverse.
\nNote: Not all browsers support backward playback. Even if they do,\nplayback might not be smooth.
\n",
+ "example": [
+ "\n\nlet dragon;\n\nfunction setup() {\n // Create a p5.MediaElement using createAudio().\n dragon = createAudio('assets/lucky_dragons.mp3');\n\n // Show the default media controls.\n dragon.showControls();\n\n describe('The text \"Speed: S\" on a gray square with media controls beneath it. The number \"S\" oscillates between 0 and 1 as the music plays.');\n}\n\nfunction draw() {\n background(200);\n\n // Produce a number between 0 and 2.\n let n = sin(frameCount * 0.01) + 1;\n // Use n to set the playback speed.\n dragon.speed(n);\n\n // Get the current speed\n // and display it.\n let s = dragon.speed();\n // Round s to 1 decimal place\n // for display.\n s = round(s, 1);\n textAlign(CENTER);\n text(`Speed: ${s}`, 50, 50);\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "current playback speed.",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "speed",
+ "description": "speed multiplier for playback.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "return": {
+ "description": "current playback speed.",
+ "type": "Number"
+ },
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "time",
+ "file": "src/dom/dom.js",
+ "line": 4290,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Manages the media element's playback time. Calling media.time()
\nreturns the number of seconds the audio/video has played. Time resets to\n0 when the looping media restarts.
\nThe parameter, time
, is optional. It's a number that specifies the\ntime, in seconds, to jump to when playback begins.
\n",
+ "example": [
+ "\n\nlet dragon;\n\nfunction setup() {\n // Create a p5.MediaElement using createAudio().\n dragon = createAudio('assets/lucky_dragons.mp3');\n // Show the default media controls.\n dragon.showControls();\n\n describe('The text \"S seconds\" on a gray square with media controls beneath it. The number \"S\" increases as the song plays.');\n}\n\nfunction draw() {\n background(200);\n\n // Display the current time.\n let s = dragon.time();\n // Round s to 1 decimal place\n // for display.\n s = round(s, 1);\n textAlign(CENTER);\n text(`${s} seconds`, 50, 50);\n}\n
\n\n\n\n\nlet dragon;\n\nfunction setup() {\n // Create a p5.MediaElement using createAudio().\n dragon = createAudio('assets/lucky_dragons.mp3');\n // Show the default media controls.\n dragon.showControls();\n\n // Jump to 2 seconds\n // to start.\n dragon.time(2);\n\n describe('The text \"S seconds\" on a gray square with media controls beneath it. The number \"S\" increases as the song plays.');\n}\n\nfunction draw() {\n background(200);\n\n // Display the current time.\n let s = dragon.time();\n // Round s to 1 decimal place\n // for display.\n s = round(s, 1);\n textAlign(CENTER);\n text(`${s} seconds`, 50, 50);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "current time (in seconds).",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "time",
+ "description": "time to jump to (in seconds).",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "return": {
+ "description": "current time (in seconds).",
+ "type": "Number"
+ },
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "duration",
+ "file": "src/dom/dom.js",
+ "line": 4336,
+ "itemtype": "method",
+ "description": "Returns the audio/video's duration in seconds.",
+ "example": [
+ "\n\nlet dragon;\n\nfunction setup() {\n background(200);\n\n // Create a p5.MediaElement using createAudio().\n dragon = createAudio('assets/lucky_dragons.mp3');\n // Show the default media controls.\n dragon.showControls();\n\n describe('The text \"S seconds left\" on a gray square with media controls beneath it. The number \"S\" decreases as the song plays.');\n}\n\nfunction draw() {\n background(200);\n\n // Calculate the time remaining.\n let s = dragon.duration() - dragon.time();\n // Round s to 1 decimal place\n // for display.\n s = round(s, 1);\n\n // Display the time remaining.\n textAlign(CENTER);\n text(`${s} seconds left`, 50, 50);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "duration (in seconds).",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "duration (in seconds).",
+ "type": "Number"
+ },
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "onended",
+ "file": "src/dom/dom.js",
+ "line": 4496,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calls a function when the audio/video reaches the end of its playback\nThe function won't be called if the media is looping.
\nThe p5.MediaElement
is passed as an argument to the callback function.
\n",
+ "example": [
+ "\n\nlet beat;\nlet isPlaying = false;\nlet isDone = false;\n\nfunction setup() {\n\n // Create a p5.MediaElement using createAudio().\n beat = createAudio('assets/beat.mp3');\n\n // Set isDone to false when\n // the beat finishes.\n beat.onended(() => {\n isDone = true;\n });\n\n describe('The text \"Click to play\" written in black on a gray square. A beat plays when the user clicks. The text \"Done!\" appears when the beat finishes playing.');\n}\n\nfunction draw() {\n background(200);\n\n // Display different messages\n // based on playback.\n textAlign(CENTER);\n if (isDone === true) {\n text('Done!', 50, 50);\n } else if (isPlaying === false) {\n text('Click to play', 50, 50);\n } else {\n text('Playing...', 50, 50);\n }\n}\n\n// Play the beat when the\n// user presses the mouse.\nfunction mousePressed() {\n if (isPlaying === false) {\n isPlaying = true;\n beat.play();\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "callback",
+ "description": "function to call when playback ends.\nThe p5.MediaElement
is passed as\nthe argument.",
+ "type": "Function"
+ }
+ ]
+ }
+ ],
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "connect",
+ "file": "src/dom/dom.js",
+ "line": 4514,
+ "itemtype": "method",
+ "description": "Send the audio output of this element to a specified audioNode or\np5.sound object. If no element is provided, connects to p5's main\noutput. That connection is established when this method is first called.\nAll connections are removed by the .disconnect() method.
\nThis method is meant to be used with the p5.sound.js addon library.
\n",
+ "example": [],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "audioNode",
+ "description": "AudioNode from the Web Audio API,\nor an object from the p5.sound library",
+ "type": "AudioNode|Object"
+ }
+ ]
+ }
+ ],
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "disconnect",
+ "file": "src/dom/dom.js",
+ "line": 4556,
+ "itemtype": "method",
+ "description": "Disconnect all Web Audio routing, including to main output.\nThis is useful if you want to re-route the output through\naudio effects, for example.",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "showControls",
+ "file": "src/dom/dom.js",
+ "line": 4591,
+ "itemtype": "method",
+ "description": "Show the default\nHTMLMediaElement\ncontrols. These vary between web browser.",
+ "example": [
+ "\n\nfunction setup() {\n background('cornflowerblue');\n\n textAlign(CENTER);\n textSize(50);\n text('🐉', 50, 50);\n\n // Create a p5.MediaElement using createAudio().\n let dragon = createAudio('assets/lucky_dragons.mp3');\n // Show the default media controls.\n dragon.showControls();\n\n describe('A dragon emoji, 🐉, drawn in the center of a blue square. A song plays in the background. Audio controls are displayed beneath the canvas.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "hideControls",
+ "file": "src/dom/dom.js",
+ "line": 4643,
+ "itemtype": "method",
+ "description": "Hide the default\nHTMLMediaElement\ncontrols.",
+ "example": [
+ "\n\nlet dragon;\nlet isHidden = false;\n\nfunction setup() {\n // Create a p5.MediaElement using createAudio().\n dragon = createAudio('assets/lucky_dragons.mp3');\n // Show the default media controls.\n dragon.showControls();\n\n describe('The text \"Double-click to hide controls\" written in the middle of a gray square. A song plays in the background. Audio controls are displayed beneath the canvas. The controls appear/disappear when the user double-clicks the square.');\n}\n\nfunction draw() {\n background(200);\n\n // Display a different message when\n // controls are hidden or shown.\n textAlign(CENTER);\n if (isHidden === true) {\n text('Double-click to show controls', 10, 20, 80, 80);\n } else {\n text('Double-click to hide controls', 10, 20, 80, 80);\n }\n}\n\n// Show/hide controls based on a double-click.\nfunction doubleClicked() {\n if (isHidden === true) {\n dragon.showControls();\n isHidden = false;\n } else {\n dragon.hideControls();\n isHidden = true;\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "addCue",
+ "file": "src/dom/dom.js",
+ "line": 4693,
+ "itemtype": "method",
+ "description": "Schedules a function to call when the audio/video reaches a specific time\nduring its playback.
\nThe first parameter, time
, is the time, in seconds, when the function\nshould run. This value is passed to callback
as its first argument.
\nThe second parameter, callback
, is the function to call at the specified\ncue time.
\nThe third parameter, value
, is optional and can be any type of value.\nvalue
is passed to callback
.
\nCalling media.addCue()
returns an ID as a string. This is useful for\nremoving the cue later.
\n",
+ "example": [
+ "\n\nfunction setup() {\n // Create a p5.MediaElement using createAudio().\n let beat = createAudio('assets/beat.mp3');\n // Play the beat in a loop.\n beat.loop();\n\n // Schedule a few events.\n beat.addCue(0, changeBackground, 'red');\n beat.addCue(2, changeBackground, 'deeppink');\n beat.addCue(4, changeBackground, 'orchid');\n beat.addCue(6, changeBackground, 'lavender');\n\n describe('A red square with a beat playing in the background. Its color changes every 2 seconds while the audio plays.');\n}\n\nfunction changeBackground(c) {\n background(c);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "time",
+ "description": "cue time to run the callback function.",
+ "type": "Number"
+ },
+ {
+ "name": "callback",
+ "description": "function to call at the cue time.",
+ "type": "Function"
+ },
+ {
+ "name": "value",
+ "description": "object to pass as the argument to\ncallback
.",
+ "optional": 1,
+ "type": "Object"
+ }
+ ],
+ "return": {
+ "description": "id ID of this cue,\nuseful for media.removeCue(id)
.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "id ID of this cue,\nuseful for media.removeCue(id)
.",
+ "type": "Number"
+ },
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "removeCue",
+ "file": "src/dom/dom.js",
+ "line": 4756,
+ "itemtype": "method",
+ "description": "Remove a callback based on its ID.",
+ "example": [
+ "\n\nlet lavenderID;\nlet isRemoved = false;\n\nfunction setup() {\n // Create a p5.MediaElement using createAudio().\n let beat = createAudio('assets/beat.mp3');\n // Play the beat in a loop.\n beat.loop();\n\n // Schedule a few events.\n beat.addCue(0, changeBackground, 'red');\n beat.addCue(2, changeBackground, 'deeppink');\n beat.addCue(4, changeBackground, 'orchid');\n\n // Record the ID of the \"lavender\" callback.\n lavenderID = beat.addCue(6, changeBackground, 'lavender');\n\n describe('The text \"Double-click to remove lavender.\" written on a red square. The color changes every 2 seconds while the audio plays. The lavender option is removed when the user double-clicks the square.');\n}\n\nfunction draw() {\n if (isRemoved === false) {\n text('Double-click to remove lavender.', 10, 10, 80, 80);\n } else {\n text('No more lavender.', 10, 10, 80, 80);\n }\n}\n\nfunction changeBackground(c) {\n background(c);\n}\n\n// Remove the lavender color-change cue\n// when the user double-clicks.\nfunction doubleClicked() {\n if (isRemoved === false) {\n beat.removeCue(lavenderID);\n isRemoved = true;\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID of the cue, created by media.addCue()
.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "clearCues",
+ "file": "src/dom/dom.js",
+ "line": 4818,
+ "itemtype": "method",
+ "description": "Removes all functions scheduled with media.addCue()
.",
+ "example": [
+ "\n\nlet isChanging = true;\n\nfunction setup() {\n background(200);\n\n // Create a p5.MediaElement using createAudio().\n let beat = createAudio('assets/beat.mp3');\n // Play the beat in a loop.\n beat.loop();\n\n // Schedule a few events.\n beat.addCue(0, changeBackground, 'red');\n beat.addCue(2, changeBackground, 'deeppink');\n beat.addCue(4, changeBackground, 'orchid');\n beat.addCue(6, changeBackground, 'lavender');\n\n describe('The text \"Double-click to stop changing.\" written on a square. The color changes every 2 seconds while the audio plays. The color stops changing when the user double-clicks the square.');\n}\n\nfunction draw() {\n if (isChanging === true) {\n text('Double-click to stop changing.', 10, 10, 80, 80);\n } else {\n text('No more changes.', 10, 10, 80, 80);\n }\n}\n\nfunction changeBackground(c) {\n background(c);\n}\n\n// Remove cued functions and stop\n// changing colors when the user\n// double-clicks.\nfunction doubleClicked() {\n if (isChanging === true) {\n beat.clearCues();\n isChanging = false;\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.MediaElement",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "pixelDensity",
+ "file": "src/image/p5.Image.js",
+ "line": 116,
+ "itemtype": "method",
+ "description": "Gets or sets the pixel density for high pixel density displays. By default,\nthe density will be set to 1.
\nCall this method with no arguments to get the default density, or pass\nin a number to set the density. If a non-positive number is provided,\nit defaults to 1.
\n",
+ "example": [],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "density",
+ "description": "A scaling factor for the number of pixels per\nside",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "The current density if called without arguments, or the instance for chaining if setting density.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "The current density if called without arguments, or the instance for chaining if setting density.",
+ "type": "Number"
+ },
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "loadPixels",
+ "file": "src/image/p5.Image.js",
+ "line": 228,
+ "itemtype": "method",
+ "description": "Loads the current value of each pixel in the\np5.Image object into the img.pixels
array.\nThis method must be called before reading or modifying pixel values.",
+ "example": [
+ "\n\nlet img = createImage(66, 66);\nimg.loadPixels();\nfor (let x = 0; x < img.width; x += 1) {\n for (let y = 0; y < img.height; y += 1) {\n img.set(x, y, 0);\n }\n}\nimg.updatePixels();\nimage(img, 17, 17);\n\ndescribe('A black square drawn in the middle of a gray square.');\n
\n\n\n\n\nlet img = createImage(66, 66);\nimg.loadPixels();\nlet numPixels = 4 * img.width * img.height;\nfor (let i = 0; i < numPixels; i += 4) {\n // Red.\n img.pixels[i] = 0;\n // Green.\n img.pixels[i + 1] = 0;\n // Blue.\n img.pixels[i + 2] = 0;\n // Alpha.\n img.pixels[i + 3] = 255;\n}\nimg.updatePixels();\nimage(img, 17, 17);\n\ndescribe('A black square drawn in the middle of a gray square.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "updatePixels",
+ "file": "src/image/p5.Image.js",
+ "line": 298,
+ "itemtype": "method",
+ "description": "Updates the canvas with the RGBA values in the\nimg.pixels array.
\nimg.updatePixels()
only needs to be called after changing values in\nthe img.pixels array. Such changes can be\nmade directly after calling\nimg.loadPixels() or by calling\nimg.set().
\nThe optional parameters x
, y
, width
, and height
define a\nsubsection of the p5.Image object to update.\nDoing so can improve performance in some cases.
\nIf the p5.Image object was loaded from a GIF,\nthen calling img.updatePixels()
will update the pixels in current\nframe.
\n",
+ "example": [
+ "\n\nlet img = createImage(66, 66);\nimg.loadPixels();\nfor (let x = 0; x < img.width; x += 1) {\n for (let y = 0; y < img.height; y += 1) {\n img.set(x, y, 0);\n }\n}\nimg.updatePixels();\nimage(img, 17, 17);\n\ndescribe('A black square drawn in the middle of a gray square.');\n
\n\n\n\n\nlet img = createImage(66, 66);\nimg.loadPixels();\nlet numPixels = 4 * img.width * img.height;\nfor (let i = 0; i < numPixels; i += 4) {\n // Red.\n img.pixels[i] = 0;\n // Green.\n img.pixels[i + 1] = 0;\n // Blue.\n img.pixels[i + 2] = 0;\n // Alpha.\n img.pixels[i + 3] = 255;\n}\nimg.updatePixels();\nimage(img, 17, 17);\n\ndescribe('A black square drawn in the middle of a gray square.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the upper-left corner\nof the subsection to update.",
+ "type": "Integer"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the upper-left corner\nof the subsection to update.",
+ "type": "Integer"
+ },
+ {
+ "name": "w",
+ "description": "width of the subsection to update.",
+ "type": "Integer"
+ },
+ {
+ "name": "h",
+ "description": "height of the subsection to update.",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "get",
+ "file": "src/image/p5.Image.js",
+ "line": 396,
+ "itemtype": "method",
+ "description": "Gets a pixel or a region of pixels from a\np5.Image object.
\nimg.get()
is easy to use but it's not as fast as\nimg.pixels. Use\nimg.pixels to read many pixel values.
\nThe version of img.get()
with no parameters returns the entire image.
\nThe version of img.get()
with two parameters interprets them as\ncoordinates. It returns an array with the [R, G, B, A]
values of the\npixel at the given point.
\nThe version of img.get()
with four parameters interprets them as\ncoordinates and dimensions. It returns a subsection of the canvas as a\np5.Image object. The first two parameters are\nthe coordinates for the upper-left corner of the subsection. The last two\nparameters are the width and height of the subsection.
\nUse img.get() to work directly with\np5.Image objects.
\n",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n let img2 = get();\n image(img2, width / 2, 0);\n\n describe('Two identical mountain landscapes shown side-by-side.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n let c = img.get(50, 90);\n fill(c);\n noStroke();\n square(25, 25, 50);\n\n describe('A mountain landscape with an olive green square in its center.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n let img2 = img.get(0, 0, img.width / 2, img.height / 2);\n image(img2, width / 2, height / 2);\n\n describe('A mountain landscape drawn on top of another mountain landscape.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the pixel.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the pixel.",
+ "type": "Number"
+ },
+ {
+ "name": "w",
+ "description": "width of the subsection to be returned.",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "description": "height of the subsection to be returned.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "subsection as a p5.Image object.",
+ "type": "p5.Image"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "whole p5.Image",
+ "type": "p5.Image"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "color of the pixel at (x, y) in array format [R, G, B, A]
.",
+ "type": "Number[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "subsection as a p5.Image object.",
+ "type": "p5.Image"
+ },
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "set",
+ "file": "src/image/p5.Image.js",
+ "line": 490,
+ "itemtype": "method",
+ "description": "Sets the color of one or more pixels within a\np5.Image object.
\nimg.set()
is easy to use but it's not as fast as\nimg.pixels. Use\nimg.pixels to set many pixel values.
\nimg.set()
interprets the first two parameters as x- and y-coordinates. It\ninterprets the last parameter as a grayscale value, a [R, G, B, A]
pixel\narray, a p5.Color object, or another\np5.Image object.
\nimg.updatePixels() must be called\nafter using img.set()
for changes to appear.
\n",
+ "example": [
+ "\n\nlet img = createImage(100, 100);\nimg.set(30, 20, 0);\nimg.set(85, 20, 0);\nimg.set(85, 75, 0);\nimg.set(30, 75, 0);\nimg.updatePixels();\nimage(img, 0, 0);\n\ndescribe('Four black dots arranged in a square drawn on a gray background.');\n
\n\n\n\n\nlet img = createImage(100, 100);\nlet black = color(0);\nimg.set(30, 20, black);\nimg.set(85, 20, black);\nimg.set(85, 75, black);\nimg.set(30, 75, black);\nimg.updatePixels();\nimage(img, 0, 0);\n\ndescribe('Four black dots arranged in a square drawn on a gray background.');\n
\n\n\n\n\nlet img = createImage(66, 66);\nfor (let x = 0; x < img.width; x += 1) {\n for (let y = 0; y < img.height; y += 1) {\n let c = map(x, 0, img.width, 0, 255);\n img.set(x, y, c);\n }\n}\nimg.updatePixels();\nimage(img, 17, 17);\n\ndescribe('A square with a horiztonal color gradient from black to white drawn on a gray background.');\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n let img2 = createImage(100, 100);\n img2.set(0, 0, img);\n image(img2, 0, 0);\n\n describe('An image of a mountain landscape.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the pixel.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the pixel.",
+ "type": "Number"
+ },
+ {
+ "name": "a",
+ "description": "grayscale value | pixel array |\np5.Color object |\np5.Image to copy.",
+ "type": "Number|Number[]|Object"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "resize",
+ "file": "src/image/p5.Image.js",
+ "line": 559,
+ "itemtype": "method",
+ "description": "Resizes the p5.Image object to a given width
\nand height
. The image's original aspect ratio can be kept by passing 0\nfor either width
or height
. For example, calling img.resize(50, 0)
\non an image that was 500 × 300 pixels will resize it to\n50 × 30 pixels.",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n img.resize(50, 100);\n image(img, 0, 0);\n\n describe('Two images of a mountain landscape. One copy of the image is squeezed horizontally.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n img.resize(0, 30);\n image(img, 0, 0);\n\n describe('Two images of a mountain landscape. The small copy of the image covers the top-left corner of the larger image.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n image(img, 0, 0);\n img.resize(60, 0);\n image(img, 0, 0);\n\n describe('Two images of a mountain landscape. The small copy of the image covers the top-left corner of the larger image.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "width",
+ "description": "resized image width.",
+ "type": "Number"
+ },
+ {
+ "name": "height",
+ "description": "resized image height.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "copy",
+ "file": "src/image/p5.Image.js",
+ "line": 707,
+ "itemtype": "method",
+ "description": "Copies pixels from a source p5.Image\nto this one. Calling img.copy()
will scale pixels from the source\nregion if it isn't the same size as the destination region.",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\n img.copy(7, 22, 10, 10, 35, 25, 50, 50);\n image(img, 0, 0);\n // Outline copied region.\n stroke(255);\n noFill();\n square(7, 22, 10);\n\n describe('An image of a mountain landscape. A square region is outlined in white. A larger square contains a pixelated view of the outlined region.');\n}\n
\n\n\n\n\nlet mountains;\nlet bricks;\n\nfunction preload() {\n mountains = loadImage('assets/rockies.jpg');\n bricks = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n let x = bricks.width / 2;\n let y = bricks.height / 2;\n mountains.copy(bricks, 0, 0, x, y, 0, 0, x, y);\n image(mountains, 0, 0);\n\n describe('An image of a brick wall drawn at the top-left of an image of a mountain landscape.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "srcImage",
+ "description": "source image.",
+ "type": "p5.Image|p5.Element"
+ },
+ {
+ "name": "sx",
+ "description": "x-coordinate of the source's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "sy",
+ "description": "y-coordinate of the source's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "sw",
+ "description": "source image width.",
+ "type": "Integer"
+ },
+ {
+ "name": "sh",
+ "description": "source image height.",
+ "type": "Integer"
+ },
+ {
+ "name": "dx",
+ "description": "x-coordinate of the destination's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "dy",
+ "description": "y-coordinate of the destination's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "dw",
+ "description": "destination image width.",
+ "type": "Integer"
+ },
+ {
+ "name": "dh",
+ "description": "destination image height.",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "sx",
+ "type": "Integer"
+ },
+ {
+ "name": "sy",
+ "type": "Integer"
+ },
+ {
+ "name": "sw",
+ "type": "Integer"
+ },
+ {
+ "name": "sh",
+ "type": "Integer"
+ },
+ {
+ "name": "dx",
+ "type": "Integer"
+ },
+ {
+ "name": "dy",
+ "type": "Integer"
+ },
+ {
+ "name": "dw",
+ "type": "Integer"
+ },
+ {
+ "name": "dh",
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "mask",
+ "file": "src/image/p5.Image.js",
+ "line": 740,
+ "itemtype": "method",
+ "description": "Masks part of an image from displaying by loading another\nimage and using its alpha channel as an alpha channel for\nthis image. Masks are cumulative, once applied to an image\nobject, they cannot be removed.",
+ "example": [
+ "\n\nlet photo;\nlet maskImage;\n\nfunction preload() {\n photo = loadImage('assets/rockies.jpg');\n maskImage = loadImage('assets/mask2.png');\n}\n\nfunction setup() {\n photo.mask(maskImage);\n image(photo, 0, 0);\n\n describe('An image of a mountain landscape. The right side of the image has a faded patch of white.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "srcImage",
+ "description": "source image.",
+ "type": "p5.Image"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "filter",
+ "file": "src/image/p5.Image.js",
+ "line": 966,
+ "itemtype": "method",
+ "description": "Applies an image filter to the p5.Image object.\nThe preset options are:
\nINVERT
\nInverts the colors in the image. No parameter is used.
\nGRAY
\nConverts the image to grayscale. No parameter is used.
\nTHRESHOLD
\nConverts the image to black and white. Pixels with a grayscale value\nabove a given threshold are converted to white. The rest are converted to\nblack. The threshold must be between 0.0 (black) and 1.0 (white). If no\nvalue is specified, 0.5 is used.
\nOPAQUE
\nSets the alpha channel to be entirely opaque. No parameter is used.
\nPOSTERIZE
\nLimits the number of colors in the image. Each color channel is limited to\nthe number of colors specified. Values between 2 and 255 are valid, but\nresults are most noticeable with lower values. The default value is 4.
\nBLUR
\nBlurs the image. The level of blurring is specified by a blur radius. Larger\nvalues increase the blur. The default value is 4. A gaussian blur is used\nin P2D
mode. A box blur is used in WEBGL
mode.
\nERODE
\nReduces the light areas. No parameter is used.
\nDILATE
\nIncreases the light areas. No parameter is used.
\n",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n img.filter(INVERT);\n image(img, 0, 0);\n\n describe('A blue brick wall.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n img.filter(GRAY);\n image(img, 0, 0);\n\n describe('A brick wall drawn in grayscale.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n img.filter(THRESHOLD);\n image(img, 0, 0);\n\n describe('A brick wall drawn in black and white.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n img.filter(OPAQUE);\n image(img, 0, 0);\n\n describe('A red brick wall.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n img.filter(POSTERIZE, 3);\n image(img, 0, 0);\n\n describe('An image of a red brick wall drawn with a limited color palette.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n img.filter(BLUR, 3);\n image(img, 0, 0);\n\n describe('A blurry image of a red brick wall.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n img.filter(DILATE);\n image(img, 0, 0);\n\n describe('A red brick wall with bright lines between each brick.');\n}\n
\n\n\n\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/bricks.jpg');\n}\n\nfunction setup() {\n img.filter(ERODE);\n image(img, 0, 0);\n\n describe('A red brick wall with faint lines between each brick.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "filterType",
+ "description": "either THRESHOLD, GRAY, OPAQUE, INVERT,\nPOSTERIZE, ERODE, DILATE or BLUR.",
+ "type": "Constant"
+ },
+ {
+ "name": "filterParam",
+ "description": "parameter unique to each filter.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "blend",
+ "file": "src/image/p5.Image.js",
+ "line": 1068,
+ "itemtype": "method",
+ "description": "Copies a region of pixels from another\np5.Image object into this one. The blendMode
\nparameter blends the images' colors to create different effects.",
+ "example": [
+ "\n\nlet mountains;\nlet bricks;\n\nfunction preload() {\n mountains = loadImage('assets/rockies.jpg');\n bricks = loadImage('assets/bricks_third.jpg');\n}\n\nfunction setup() {\n mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\n image(mountains, 0, 0);\n image(bricks, 0, 0);\n\n describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears faded on the right of the image.');\n}\n
\n\n\n\n\nlet mountains;\nlet bricks;\n\nfunction preload() {\n mountains = loadImage('assets/rockies.jpg');\n bricks = loadImage('assets/bricks_third.jpg');\n}\n\nfunction setup() {\n mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\n image(mountains, 0, 0);\n image(bricks, 0, 0);\n\n describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears transparent on the right of the image.');\n}\n
\n\n\n\n\nlet mountains;\nlet bricks;\n\nfunction preload() {\n mountains = loadImage('assets/rockies.jpg');\n bricks = loadImage('assets/bricks_third.jpg');\n}\n\nfunction setup() {\n mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\n image(mountains, 0, 0);\n image(bricks, 0, 0);\n\n describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears washed out on the right of the image.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "srcImage",
+ "description": "source image",
+ "type": "p5.Image"
+ },
+ {
+ "name": "sx",
+ "description": "x-coordinate of the source's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "sy",
+ "description": "y-coordinate of the source's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "sw",
+ "description": "source image width.",
+ "type": "Integer"
+ },
+ {
+ "name": "sh",
+ "description": "source image height.",
+ "type": "Integer"
+ },
+ {
+ "name": "dx",
+ "description": "x-coordinate of the destination's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "dy",
+ "description": "y-coordinate of the destination's upper-left corner.",
+ "type": "Integer"
+ },
+ {
+ "name": "dw",
+ "description": "destination image width.",
+ "type": "Integer"
+ },
+ {
+ "name": "dh",
+ "description": "destination image height.",
+ "type": "Integer"
+ },
+ {
+ "name": "blendMode",
+ "description": "the blend mode. either\nBLEND, DARKEST, LIGHTEST, DIFFERENCE,\nMULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\nSOFT_LIGHT, DODGE, BURN, ADD or NORMAL.
\nAvailable blend modes are: normal | multiply | screen | overlay |\ndarken | lighten | color-dodge | color-burn | hard-light |\nsoft-light | difference | exclusion | hue | saturation |\ncolor | luminosity
\nhttp://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/
\n",
+ "type": "Constant"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "sx",
+ "type": "Integer"
+ },
+ {
+ "name": "sy",
+ "type": "Integer"
+ },
+ {
+ "name": "sw",
+ "type": "Integer"
+ },
+ {
+ "name": "sh",
+ "type": "Integer"
+ },
+ {
+ "name": "dx",
+ "type": "Integer"
+ },
+ {
+ "name": "dy",
+ "type": "Integer"
+ },
+ {
+ "name": "dw",
+ "type": "Integer"
+ },
+ {
+ "name": "dh",
+ "type": "Integer"
+ },
+ {
+ "name": "blendMode",
+ "type": "Constant"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "save",
+ "file": "src/image/p5.Image.js",
+ "line": 1145,
+ "itemtype": "method",
+ "description": "Saves the p5.Image object to a file.\nThe browser will either save the file immediately or prompt the user\nwith a dialogue window.
\nBy default, calling img.save()
will save the image as untitled.png
.
\nCalling img.save()
with one argument, as in img.save('photo.png')
,\nwill set the image's filename and type together.
\nCalling img.save()
with two arguments, as in\nimage.save('photo', 'png')
, will set the image's filename and type\nseparately.
\nThe image will only be downloaded as an animated GIF if the\np5.Image object was loaded from a GIF file.\nSee saveGif() to create new GIFs.
\n",
+ "example": [
+ "\n\nlet img;\n\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction draw() {\n image(img, 0, 0);\n\n describe('An image of a mountain landscape.');\n}\n\nfunction keyPressed() {\n if (key === 's') {\n img.save();\n } else if (key === 'j') {\n img.save('rockies.jpg');\n } else if (key === 'p') {\n img.save('rockies', 'png');\n }\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "filename",
+ "description": "filename. Defaults to 'untitled'.",
+ "type": "String"
+ },
+ {
+ "name": "extension",
+ "description": "file extension, either 'png' or 'jpg'.\nDefaults to 'png'.",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "reset",
+ "file": "src/image/p5.Image.js",
+ "line": 1179,
+ "itemtype": "method",
+ "description": "Restarts an animated GIF at its first frame.",
+ "example": [
+ "\n\nlet gif;\n\nfunction preload() {\n gif = loadImage('assets/arnott-wallace-wink-loop-once.gif');\n}\n\nfunction draw() {\n background(255);\n image(gif, 0, 0);\n\n describe('A cartoon face winks once and then freezes. Clicking resets the face and makes it wink again.');\n}\n\nfunction mousePressed() {\n gif.reset();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "getCurrentFrame",
+ "file": "src/image/p5.Image.js",
+ "line": 1215,
+ "itemtype": "method",
+ "description": "Gets the index of the current frame in an animated GIF.",
+ "example": [
+ "\n\nlet gif;\n\nfunction preload() {\n gif = loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n}\n\nfunction draw() {\n let index = gif.getCurrentFrame();\n image(gif, 0, 0);\n text(index, 10, 90);\n\n describe('A cartoon eye repeatedly looks around, then outwards. A number displayed in the bottom-left corner increases from 0 to 124, then repeats.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "index of the GIF's current frame.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "index of the GIF's current frame.",
+ "type": "Number"
+ },
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "setFrame",
+ "file": "src/image/p5.Image.js",
+ "line": 1253,
+ "itemtype": "method",
+ "description": "Sets the current frame in an animated GIF.",
+ "example": [
+ "\n\nlet gif;\nlet frameSlider;\n\nfunction preload() {\n gif = loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n}\n\nfunction setup() {\n let maxFrame = gif.numFrames() - 1;\n frameSlider = createSlider(0, maxFrame);\n frameSlider.position(10, 80);\n frameSlider.size(80);\n}\n\nfunction draw() {\n let index = frameSlider.value();\n gif.setFrame(index);\n image(gif, 0, 0);\n\n describe('A cartoon eye looks around when a slider is moved.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "index",
+ "description": "index of the frame to display.",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "numFrames",
+ "file": "src/image/p5.Image.js",
+ "line": 1294,
+ "itemtype": "method",
+ "description": "Returns the number of frames in an animated GIF.",
+ "example": [
+ "\n\nlet gif;\n\nfunction preload() {\n gif = loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n}\n\nfunction draw() {\n image(gif, 0, 0);\n let total = gif.numFrames();\n let index = gif.getCurrentFrame();\n text(`${index} / ${total}`, 30, 90);\n\n describe('A cartoon eye looks around. The text \"n / 125\" is shown at the bottom of the canvas.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "number of frames in the GIF.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "number of frames in the GIF.",
+ "type": "Number"
+ },
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "play",
+ "file": "src/image/p5.Image.js",
+ "line": 1330,
+ "itemtype": "method",
+ "description": "Plays an animated GIF that was paused with\nimg.pause().",
+ "example": [
+ "\n\nlet gif;\n\nfunction preload() {\n gif = loadImage('assets/nancy-liang-wind-loop-forever.gif');\n}\n\nfunction draw() {\n background(255);\n image(gif, 0, 0);\n\n describe('A drawing of a child with hair blowing in the wind. The animation freezes when clicked and resumes when released.');\n}\n\nfunction mousePressed() {\n gif.pause();\n}\n\nfunction mouseReleased() {\n gif.play();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "pause",
+ "file": "src/image/p5.Image.js",
+ "line": 1366,
+ "itemtype": "method",
+ "description": "Pauses an animated GIF. The GIF can be resumed by calling\nimg.play().",
+ "example": [
+ "\n\nlet gif;\n\nfunction preload() {\n gif = loadImage('assets/nancy-liang-wind-loop-forever.gif');\n}\n\nfunction draw() {\n background(255);\n image(gif, 0, 0);\n\n describe('A drawing of a child with hair blowing in the wind. The animation freezes when clicked and resumes when released.');\n}\n\nfunction mousePressed() {\n gif.pause();\n}\n\nfunction mouseReleased() {\n gif.play();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "delay",
+ "file": "src/image/p5.Image.js",
+ "line": 1429,
+ "itemtype": "method",
+ "description": "Changes the delay between frames in an animated GIF.
\nThe second parameter, index
, is optional. If provided, only the frame\nat index
will have its delay modified. All other frames will keep\ntheir default delay.
\n",
+ "example": [
+ "\n\nlet gifFast;\nlet gifSlow;\n\nfunction preload() {\n gifFast = loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n gifSlow = loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n}\n\nfunction setup() {\n gifFast.resize(50, 50);\n gifSlow.resize(50, 50);\n gifFast.delay(10);\n gifSlow.delay(100);\n}\n\nfunction draw() {\n image(gifFast, 0, 0);\n image(gifSlow, 50, 0);\n\n describe('Two animated eyes looking around. The eye on the left moves faster than the eye on the right.');\n}\n
\n\n\n\n\nlet gif;\n\nfunction preload() {\n gif = loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n}\n\nfunction setup() {\n gif.delay(3000, 67);\n}\n\nfunction draw() {\n image(gif, 0, 0);\n\n describe('An animated eye looking around. It pauses for three seconds while it looks down.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "d",
+ "description": "delay in milliseconds between switching frames.",
+ "type": "Number"
+ },
+ {
+ "name": "index",
+ "description": "index of the frame that will have its delay modified.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Image",
+ "static": false,
+ "module": "Image",
+ "submodule": "Image"
+ },
+ {
+ "name": "getParent",
+ "file": "src/io/p5.XML.js",
+ "line": 94,
+ "itemtype": "method",
+ "description": "Gets a copy of the element's parent. Returns the parent as another\np5.XML object.",
+ "example": [
+ "\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let children = xml.getChildren('animal');\n let parent = children[1].getParent();\n print(parent.getName());\n}\n\n// Sketch prints:\n// mammals\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "element parent",
+ "type": "p5.XML"
+ }
+ }
+ ],
+ "return": {
+ "description": "element parent",
+ "type": "p5.XML"
+ },
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "getName",
+ "file": "src/io/p5.XML.js",
+ "line": 128,
+ "itemtype": "method",
+ "description": "Gets the element's full name, which is returned as a String.",
+ "example": [
+ "<animal\n\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n print(xml.getName());\n}\n\n// Sketch prints:\n// mammals\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "the name of the node",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "the name of the node",
+ "type": "String"
+ },
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "setName",
+ "file": "src/io/p5.XML.js",
+ "line": 165,
+ "itemtype": "method",
+ "description": "Sets the element's name, which is specified as a String.",
+ "example": [
+ "<animal\n\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n print(xml.getName());\n xml.setName('fish');\n print(xml.getName());\n}\n\n// Sketch prints:\n// mammals\n// fish\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "the",
+ "description": "new name of the node",
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "hasChildren",
+ "file": "src/io/p5.XML.js",
+ "line": 208,
+ "itemtype": "method",
+ "description": "Checks whether or not the element has any children, and returns the result\nas a boolean.",
+ "example": [
+ "<animal\n\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n print(xml.hasChildren());\n}\n\n// Sketch prints:\n// true\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "boolean"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "boolean"
+ },
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "listChildren",
+ "file": "src/io/p5.XML.js",
+ "line": 244,
+ "itemtype": "method",
+ "description": "Get the names of all of the element's children, and returns the names as an\narray of Strings. This is the same as looping through and calling getName()\non each child element individually.",
+ "example": [
+ "<animal\n\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n print(xml.listChildren());\n}\n\n// Sketch prints:\n// [\"animal\", \"animal\", \"animal\"]\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "names of the children of the element",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "names of the children of the element",
+ "type": "String[]"
+ },
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "getChildren",
+ "file": "src/io/p5.XML.js",
+ "line": 291,
+ "itemtype": "method",
+ "description": "Returns all of the element's children as an array of p5.XML objects. When\nthe name parameter is specified, then it will return all children that match\nthat name.",
+ "example": [
+ "<animal\n\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let animals = xml.getChildren('animal');\n\n for (let i = 0; i < animals.length; i++) {\n print(animals[i].getContent());\n }\n}\n\n// Sketch prints:\n// \"Goat\"\n// \"Leopard\"\n// \"Zebra\"\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "name",
+ "description": "element name",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "children of the element",
+ "type": "p5.XML[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "children of the element",
+ "type": "p5.XML[]"
+ },
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "getChild",
+ "file": "src/io/p5.XML.js",
+ "line": 350,
+ "itemtype": "method",
+ "description": "Returns the first of the element's children that matches the name parameter\nor the child of the given index.It returns undefined if no matching\nchild is found.",
+ "example": [
+ "<animal\n\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let firstChild = xml.getChild('animal');\n print(firstChild.getContent());\n}\n\n// Sketch prints:\n// \"Goat\"\n
\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let secondChild = xml.getChild(1);\n print(secondChild.getContent());\n}\n\n// Sketch prints:\n// \"Leopard\"\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "name",
+ "description": "element name or index",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.XML"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.XML"
+ },
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "addChild",
+ "file": "src/io/p5.XML.js",
+ "line": 403,
+ "itemtype": "method",
+ "description": "Appends a new child to the element. The child can be specified with\neither a String, which will be used as the new tag's name, or as a\nreference to an existing p5.XML object.\nA reference to the newly created child is returned as an p5.XML object.",
+ "example": [
+ "\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let child = new p5.XML();\n child.setName('animal');\n child.setAttribute('id', '3');\n child.setAttribute('species', 'Ornithorhynchus anatinus');\n child.setContent('Platypus');\n xml.addChild(child);\n\n let animals = xml.getChildren('animal');\n print(animals[animals.length - 1].getContent());\n}\n\n// Sketch prints:\n// \"Goat\"\n// \"Leopard\"\n// \"Zebra\"\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "node",
+ "description": "a p5.XML Object which will be the child to be added",
+ "type": "p5.XML"
+ }
+ ]
+ }
+ ],
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "removeChild",
+ "file": "src/io/p5.XML.js",
+ "line": 465,
+ "itemtype": "method",
+ "description": "Removes the element specified by name or index.",
+ "example": [
+ "\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n xml.removeChild('animal');\n let children = xml.getChildren();\n for (let i = 0; i < children.length; i++) {\n print(children[i].getContent());\n }\n}\n\n// Sketch prints:\n// \"Leopard\"\n// \"Zebra\"\n
\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n xml.removeChild(1);\n let children = xml.getChildren();\n for (let i = 0; i < children.length; i++) {\n print(children[i].getContent());\n }\n}\n\n// Sketch prints:\n// \"Goat\"\n// \"Zebra\"\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "name",
+ "description": "element name or index",
+ "type": "String|Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "getAttributeCount",
+ "file": "src/io/p5.XML.js",
+ "line": 513,
+ "itemtype": "method",
+ "description": "Counts the specified element's number of attributes, returned as an Number.",
+ "example": [
+ "\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let firstChild = xml.getChild('animal');\n print(firstChild.getAttributeCount());\n}\n\n// Sketch prints:\n// 2\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Integer"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Integer"
+ },
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "listAttributes",
+ "file": "src/io/p5.XML.js",
+ "line": 549,
+ "itemtype": "method",
+ "description": "Gets all of the specified element's attributes, and returns them as an\narray of Strings.",
+ "example": [
+ "\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let firstChild = xml.getChild('animal');\n print(firstChild.listAttributes());\n}\n\n// Sketch prints:\n// [\"id\", \"species\"]\n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "an array of strings containing the names of attributes",
+ "type": "String[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "an array of strings containing the names of attributes",
+ "type": "String[]"
+ },
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "hasAttribute",
+ "file": "src/io/p5.XML.js",
+ "line": 593,
+ "itemtype": "method",
+ "description": "Checks whether or not an element has the specified attribute.",
+ "example": [
+ "\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let firstChild = xml.getChild('animal');\n print(firstChild.hasAttribute('species'));\n print(firstChild.hasAttribute('color'));\n}\n\n// Sketch prints:\n// true\n// false\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "the",
+ "description": "attribute to be checked",
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "true if attribute found else false",
+ "type": "boolean"
+ }
+ }
+ ],
+ "return": {
+ "description": "true if attribute found else false",
+ "type": "boolean"
+ },
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "getNum",
+ "file": "src/io/p5.XML.js",
+ "line": 639,
+ "itemtype": "method",
+ "description": "Returns an attribute value of the element as an Number. If the defaultValue\nparameter is specified and the attribute doesn't exist, then defaultValue\nis returned. If no defaultValue is specified and the attribute doesn't\nexist, the value 0 is returned.",
+ "example": [
+ "\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let firstChild = xml.getChild('animal');\n print(firstChild.getNum('id'));\n}\n\n// Sketch prints:\n// 0\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "name",
+ "description": "the non-null full name of the attribute",
+ "type": "String"
+ },
+ {
+ "name": "defaultValue",
+ "description": "the default value of the attribute",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ },
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "getString",
+ "file": "src/io/p5.XML.js",
+ "line": 685,
+ "itemtype": "method",
+ "description": "Returns an attribute value of the element as an String. If the defaultValue\nparameter is specified and the attribute doesn't exist, then defaultValue\nis returned. If no defaultValue is specified and the attribute doesn't\nexist, null is returned.",
+ "example": [
+ "\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let firstChild = xml.getChild('animal');\n print(firstChild.getString('species'));\n}\n\n// Sketch prints:\n// \"Capra hircus\"\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "name",
+ "description": "the non-null full name of the attribute",
+ "type": "String"
+ },
+ {
+ "name": "defaultValue",
+ "description": "the default value of the attribute",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ },
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "setAttribute",
+ "file": "src/io/p5.XML.js",
+ "line": 731,
+ "itemtype": "method",
+ "description": "Sets the content of an element's attribute. The first parameter specifies\nthe attribute name, while the second specifies the new content.",
+ "example": [
+ "\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let firstChild = xml.getChild('animal');\n print(firstChild.getString('species'));\n firstChild.setAttribute('species', 'Jamides zebra');\n print(firstChild.getString('species'));\n}\n\n// Sketch prints:\n// \"Capra hircus\"\n// \"Jamides zebra\"\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "name",
+ "description": "the full name of the attribute",
+ "type": "String"
+ },
+ {
+ "name": "value",
+ "description": "the value of the attribute",
+ "type": "Number|String|Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "getContent",
+ "file": "src/io/p5.XML.js",
+ "line": 768,
+ "itemtype": "method",
+ "description": "Returns the content of an element. If there is no such content,\ndefaultValue is returned if specified, otherwise null is returned.",
+ "example": [
+ "\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let firstChild = xml.getChild('animal');\n print(firstChild.getContent());\n}\n\n// Sketch prints:\n// \"Goat\"\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "defaultValue",
+ "description": "value returned if no content is found",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ },
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "setContent",
+ "file": "src/io/p5.XML.js",
+ "line": 809,
+ "itemtype": "method",
+ "description": "Sets the element's content.",
+ "example": [
+ "\n// The following short XML file called \"mammals.xml\" is parsed\n// in the code below.\n//\n// \n// <mammals>\n// <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n// <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n// <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n// </mammals>\n\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n let firstChild = xml.getChild('animal');\n print(firstChild.getContent());\n firstChild.setContent('Mountain Goat');\n print(firstChild.getContent());\n}\n\n// Sketch prints:\n// \"Goat\"\n// \"Mountain Goat\"\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "text",
+ "description": "the new content",
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "serialize",
+ "file": "src/io/p5.XML.js",
+ "line": 840,
+ "itemtype": "method",
+ "description": "Serializes the element into a string. This function is useful for preparing\nthe content to be sent over a http request or saved to file.",
+ "example": [
+ "\nlet xml;\n\nfunction preload() {\n xml = loadXML('assets/mammals.xml');\n}\n\nfunction setup() {\n print(xml.serialize());\n}\n\n// Sketch prints:\n// \n// Goat \n// Leopard \n// Zebra \n// \n
"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "Serialized string of the element",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "Serialized string of the element",
+ "type": "String"
+ },
+ "class": "p5.XML",
+ "static": false,
+ "module": "IO",
+ "submodule": "Input"
+ },
+ {
+ "name": "toString",
+ "file": "src/math/p5.Vector.js",
+ "line": 132,
+ "itemtype": "method",
+ "description": "Returns a string representation of a vector. This method is useful for\nprinting vectors to the console while debugging.",
+ "example": [
+ "\n\nfunction setup() {\n let v = createVector(20, 30);\n // Prints 'p5.Vector Object : [20, 30, 0]'.\n print(v.toString());\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "string representation of the vector.",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "string representation of the vector.",
+ "type": "String"
+ },
+ "class": "p5.Vector",
+ "static": false,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "set",
+ "file": "src/math/p5.Vector.js",
+ "line": 176,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets the x
, y
, and z
components of the vector using separate numbers,\na p5.Vector object, or an array of numbers.\nCalling set()
with no arguments sets the vector's components to 0.",
+ "example": [
+ "\n\nstrokeWeight(5);\n\n// Top left.\nlet pos = createVector(25, 25);\npoint(pos);\n\n// Top right.\npos.set(75, 25);\npoint(pos);\n\n// Bottom right.\nlet p2 = createVector(75, 75);\npos.set(p2);\npoint(pos);\n\n// Bottom left.\nlet arr = [25, 75];\npos.set(arr);\npoint(pos);\n\ndescribe('Four black dots arranged in a square on a gray background.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "vector to set.",
+ "type": "p5.Vector|Number[]"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Vector",
+ "static": false,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "copy",
+ "file": "src/math/p5.Vector.js",
+ "line": 2491,
+ "itemtype": "method",
+ "description": "Returns a copy of the p5.Vector object.",
+ "example": [
+ "\n\nlet pos = createVector(50, 50);\nlet pc = pos.copy();\n\nstrokeWeight(5);\npoint(pc);\n\ndescribe('A black point drawn in the middle of a gray square.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "copy of the p5.Vector object.",
+ "type": "p5.Vector"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "v",
+ "description": "the p5.Vector to create a copy of",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "the copy of the p5.Vector object",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "copy of the p5.Vector object.",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "add",
+ "file": "src/math/p5.Vector.js",
+ "line": 2504,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Adds to a vector's x
, y
, and z
components using separate numbers,\nanother p5.Vector object, or an array of numbers.\nCalling add()
with no arguments has no effect.
\nThe static version of add()
, as in p5.Vector.add(v2, v1)
, returns a new\np5.Vector object and doesn't change the\noriginals.
\n",
+ "example": [
+ "\n\nstrokeWeight(5);\n\n// Top left.\nlet pos = createVector(25, 25);\npoint(pos);\n\n// Top right.\npos.add(50, 0);\npoint(pos);\n\n// Bottom right.\nlet p2 = createVector(0, 50);\npos.add(p2);\npoint(pos);\n\n// Bottom left.\nlet arr = [-50, 0];\npos.add(arr);\npoint(pos);\n\ndescribe('Four black dots arranged in a square on a gray background.');\n
\n\n\n\n\n// Top left.\nlet p1 = createVector(25, 25);\n\n// Center.\nlet p2 = createVector(50, 50);\n\n// Bottom right.\nlet p3 = p5.Vector.add(p1, p2);\n\nstrokeWeight(5);\npoint(p1);\npoint(p2);\npoint(p3);\n\ndescribe('Three black dots in a diagonal line from top left to bottom right.');\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let origin = createVector(0, 0);\n let v1 = createVector(50, 50);\n drawArrow(origin, v1, 'red');\n\n let v2 = createVector(-30, 20);\n drawArrow(v1, v2, 'blue');\n\n let v3 = p5.Vector.add(v1, v2);\n drawArrow(origin, v3, 'purple');\n\n describe('Three arrows drawn on a gray square. A red arrow extends from the top left corner to the center. A blue arrow extends from the tip of the red arrow. A purple arrow extends from the origin to the tip of the blue arrow.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x component of the vector to be added.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y component of the vector to be added.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z component of the vector to be added.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The vector to add",
+ "type": "p5.Vector|Number[]"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "A p5.Vector to add",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "v2",
+ "description": "A p5.Vector to add",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "target",
+ "description": "vector to receive the result.",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "resulting p5.Vector.",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "resulting p5.Vector.",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "rem",
+ "file": "src/math/p5.Vector.js",
+ "line": 2532,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Performs modulo (remainder) division with a vector's x
, y
, and z
\ncomponents using separate numbers, another\np5.Vector object, or an array of numbers.
\nThe static version of rem()
as in p5.Vector.rem(v2, v1)
, returns a new\np5.Vector object and doesn't change the\noriginals.
\n",
+ "example": [
+ "\n\nlet v = createVector(3, 4, 5);\nv.rem(2, 3, 4);\n// Prints 'p5.Vector Object : [1, 1, 1]'.\nprint(v.toString());\n
\n\n\n\n\nlet v1 = createVector(3, 4, 5);\nlet v2 = createVector(2, 3, 4);\nv1.rem(v2);\n\n// Prints 'p5.Vector Object : [1, 1, 1]'.\nprint(v1.toString());\n
\n\n\n\n\nlet v = createVector(3, 4, 5);\nlet arr = [2, 3, 4];\nv.rem(arr);\n\n// Prints 'p5.Vector Object : [1, 1, 1]'.\nprint(v.toString());\n
\n\n\n\n\nlet v1 = createVector(3, 4, 5);\nlet v2 = createVector(2, 3, 4);\nlet v3 = p5.Vector.rem(v1, v2);\n\n// Prints 'p5.Vector Object : [1, 1, 1]'.\nprint(v3.toString());\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x component of divisor vector.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y component of divisor vector.",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z component of divisor vector.",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "divisor vector.",
+ "type": "p5.Vector|Number[]"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "The dividend p5.Vector",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "v2",
+ "description": "The divisor p5.Vector",
+ "type": "p5.Vector"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "v2",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "The resulting p5.Vector",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "The resulting p5.Vector",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "sub",
+ "file": "src/math/p5.Vector.js",
+ "line": 2552,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Subtracts from a vector's x
, y
, and z
components using separate\nnumbers, another p5.Vector object, or an array of\nnumbers. Calling sub()
with no arguments has no effect.
\nThe static version of sub()
, as in p5.Vector.sub(v2, v1)
, returns a new\np5.Vector object and doesn't change the\noriginals.
\n",
+ "example": [
+ "\n\nstrokeWeight(5);\n\n// Bottom right.\nlet pos = createVector(75, 75);\npoint(pos);\n\n// Top right.\npos.sub(0, 50);\npoint(pos);\n\n// Top left.\nlet p2 = createVector(50, 0);\npos.sub(p2);\npoint(pos);\n\n// Bottom left.\nlet arr = [0, -50];\npos.sub(arr);\npoint(pos);\n\ndescribe('Four black dots arranged in a square on a gray background.');\n
\n\n\n\n\n// Bottom right.\nlet p1 = createVector(75, 75);\n\n// Center.\nlet p2 = createVector(50, 50);\n\n// Top left.\nlet p3 = p5.Vector.sub(p1, p2);\n\nstrokeWeight(5);\npoint(p1);\npoint(p2);\npoint(p3);\n\ndescribe('Three black dots in a diagonal line from top left to bottom right.');\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let origin = createVector(0, 0);\n let v1 = createVector(50, 50);\n drawArrow(origin, v1, 'red');\n\n let v2 = createVector(20, 70);\n drawArrow(origin, v2, 'blue');\n\n let v3 = p5.Vector.sub(v2, v1);\n drawArrow(v1, v3, 'purple');\n\n describe('Three arrows drawn on a gray square. A red and a blue arrow extend from the top left. A purple arrow extends from the tip of the red arrow to the tip of the blue arrow.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x component of the vector to subtract.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y component of the vector to subtract.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z component of the vector to subtract.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "the vector to subtract",
+ "type": "p5.Vector|Number[]"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "A p5.Vector to subtract from",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "v2",
+ "description": "A p5.Vector to subtract",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "target",
+ "description": "vector to receive the result.",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "The resulting p5.Vector",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "The resulting p5.Vector",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "mult",
+ "file": "src/math/p5.Vector.js",
+ "line": 2600,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Multiplies a vector's x
, y
, and z
components by the same number,\nseparate numbers, the components of another\np5.Vector object, or an array of numbers. Calling\nmult()
with no arguments has no effect.
\nThe static version of mult()
, as in p5.Vector.mult(v, 2)
, returns a new\np5.Vector object and doesn't change the\noriginals.
\n",
+ "example": [
+ "\n\nstrokeWeight(5);\n\nlet p = createVector(25, 25);\npoint(p);\n\np.mult(2);\npoint(p);\n\ndescribe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the center.');\n
\n\n\n\n\nstrokeWeight(5);\n\nlet p = createVector(25, 25);\npoint(p);\n\np.mult(2, 3);\npoint(p);\n\ndescribe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n
\n\n\n\n\nstrokeWeight(5);\n\nlet p = createVector(25, 25);\npoint(p);\n\nlet arr = [2, 3];\np.mult(arr);\npoint(p);\n\ndescribe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n
\n\n\n\n\nstrokeWeight(5);\n\nlet p = createVector(25, 25);\npoint(p);\n\nlet p2 = createVector(2, 3);\np.mult(p2);\npoint(p);\n\ndescribe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n
\n\n\n\n\nstrokeWeight(5);\n\nlet p = createVector(25, 25);\npoint(p);\n\nlet p2 = createVector(2, 3);\nlet p3 = p5.Vector.mult(p, p2);\npoint(p3);\n\ndescribe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let origin = createVector(0, 0);\n let v1 = createVector(25, 25);\n drawArrow(origin, v1, 'red');\n\n let v2 = p5.Vector.mult(v1, 2);\n drawArrow(origin, v2, 'blue');\n\n describe('Two arrows extending from the top left corner. The blue arrow is twice the length of the red arrow.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "The number to multiply with the vector",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "number to multiply with the x component of the vector.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "number to multiply with the y component of the vector.",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "number to multiply with the z component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "arr",
+ "description": "array to multiply with the components of the vector.",
+ "type": "Number[]"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v",
+ "description": "vector to multiply with the components of the original vector.",
+ "type": "p5.Vector"
+ }
+ ]
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "resulting new p5.Vector.",
+ "type": "p5.Vector"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "v",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "n",
+ "type": "Number"
+ },
+ {
+ "name": "target",
+ "description": "vector to receive the result.",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v0",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "v1",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "target",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v0",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "arr",
+ "type": "Number[]"
+ },
+ {
+ "name": "target",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ]
+ }
+ ],
+ "return": {
+ "description": "resulting new p5.Vector.",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "div",
+ "file": "src/math/p5.Vector.js",
+ "line": 2674,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Divides a vector's x
, y
, and z
components by the same number,\nseparate numbers, the components of another\np5.Vector object, or an array of numbers. Calling\ndiv()
with no arguments has no effect.
\nThe static version of div()
, as in p5.Vector.div(v, 2)
, returns a new\np5.Vector object and doesn't change the\noriginals.
\n",
+ "example": [
+ "\n\nstrokeWeight(5);\n\nlet p = createVector(50, 50);\npoint(p);\n\np.div(2);\npoint(p);\n\ndescribe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the center.');\n
\n\n\n\n\nstrokeWeight(5);\n\nlet p = createVector(50, 75);\npoint(p);\n\np.div(2, 3);\npoint(p);\n\ndescribe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n
\n\n\n\n\nstrokeWeight(5);\n\nlet p = createVector(50, 75);\npoint(p);\n\nlet arr = [2, 3];\np.div(arr);\npoint(p);\n\ndescribe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n
\n\n\n\n\nstrokeWeight(5);\n\nlet p = createVector(50, 75);\npoint(p);\n\nlet p2 = createVector(2, 3);\np.div(p2);\npoint(p);\n\ndescribe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n
\n\n\n\n\nstrokeWeight(5);\n\nlet p = createVector(50, 75);\npoint(p);\n\nlet p2 = createVector(2, 3);\nlet p3 = p5.Vector.div(p, p2);\npoint(p3);\n\ndescribe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let origin = createVector(0, 0);\n let v1 = createVector(50, 50);\n drawArrow(origin, v1, 'red');\n\n let v2 = p5.Vector.div(v1, 2);\n drawArrow(origin, v2, 'blue');\n\n describe('Two arrows extending from the top left corner. The blue arrow is half the length of the red arrow.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "n",
+ "description": "The number to divide the vector by",
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "number to divide with the x component of the vector.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "number to divide with the y component of the vector.",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "number to divide with the z component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "arr",
+ "description": "array to divide the components of the vector by.",
+ "type": "Number[]"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v",
+ "description": "vector to divide the components of the original vector by.",
+ "type": "p5.Vector"
+ }
+ ]
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "The resulting new p5.Vector",
+ "type": "p5.Vector"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "v",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "n",
+ "type": "Number"
+ },
+ {
+ "name": "target",
+ "description": "The vector to receive the result",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v0",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "v1",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "target",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v0",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "arr",
+ "type": "Number[]"
+ },
+ {
+ "name": "target",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ]
+ }
+ ],
+ "return": {
+ "description": "The resulting new p5.Vector",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "mag",
+ "file": "src/math/p5.Vector.js",
+ "line": 2798,
+ "itemtype": "method",
+ "description": "Returns the magnitude (length) of the vector.",
+ "example": [
+ "\n\nlet p = createVector(30, 40);\nline(0, 0, p.x, p.y);\n\nlet m = p.mag();\ntext(m, p.x, p.y);\n\ndescribe('A diagonal black line extends from the top left corner of a gray square. The number 50 is written at the end of the line.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "magnitude of the vector.",
+ "type": "Number"
+ }
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "vecT",
+ "description": "The vector to return the magnitude of",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "The magnitude of vecT",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "magnitude of the vector.",
+ "type": "Number"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "magSq",
+ "file": "src/math/p5.Vector.js",
+ "line": 2813,
+ "itemtype": "method",
+ "description": "Returns the magnitude (length) of the vector squared.",
+ "example": [
+ "\n\nlet p = createVector(30, 40);\nline(0, 0, p.x, p.y);\n\nlet m = p.magSq();\ntext(m, p.x, p.y);\n\ndescribe('A diagonal black line extends from the top left corner of a gray square. The number 2500 is written at the end of the line.');\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "squared magnitude of the vector.",
+ "type": "number"
+ }
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "vecT",
+ "description": "the vector to return the squared magnitude of",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "the squared magnitude of vecT",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "squared magnitude of the vector.",
+ "type": "number"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "dot",
+ "file": "src/math/p5.Vector.js",
+ "line": 2700,
+ "itemtype": "method",
+ "description": "Returns the dot product of two vectors. The dot product is a number that\ndescribes the overlap between two vectors. Visually, the dot product can be\nthought of as the \"shadow\" one vector casts on another. The dot product's\nmagnitude is largest when two vectors point in the same or opposite\ndirections. Its magnitude is 0 when two vectors form a right angle.
\nThe version of dot()
with one parameter interprets it as another\np5.Vector object.
\nThe version of dot()
with multiple parameters interprets them as the\nx
, y
, and z
components of another vector.
\nThe static version of dot()
, as in p5.Vector.dot(v1, v2)
, is the same\nas calling v1.dot(v2)
.
\n",
+ "example": [
+ "\n\nlet v1 = createVector(3, 4);\nlet v2 = createVector(3, 0);\nlet dp = v1.dot(v2);\n// Prints \"9\" to the console.\nprint(dp);\n
\n\n\n\n\nlet v1 = createVector(1, 0);\nlet v2 = createVector(0, 1);\nlet dp = p5.Vector.dot(v1, v2);\n// Prints \"0\" to the console.\nprint(dp);\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let v0 = createVector(width / 2, height / 2);\n let v1 = createVector(30, 0);\n drawArrow(v0, v1, 'black');\n\n let v2 = createVector(mouseX - width / 2, mouseY - height / 2);\n drawArrow(v0, v2, 'red');\n\n let dp = v2.dot(v1);\n text(`v2 • v1 = ${dp}`, 15, 20);\n\n describe('Two arrows drawn on a gray square. A black arrow points to the right and a red arrow follows the mouse. The text \"v1 • v2 = something\" changes as the mouse moves.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x component of the vector.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "dot product.",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "v",
+ "description": "p5.Vector to be dotted.",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "first p5.Vector.",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "v2",
+ "description": "second p5.Vector.",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "dot product.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "dot product.",
+ "type": "Number"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "cross",
+ "file": "src/math/p5.Vector.js",
+ "line": 2713,
+ "itemtype": "method",
+ "description": "Returns the cross product of two vectors. The cross product is a vector\nthat points straight out of the plane created by two vectors. The cross\nproduct's magnitude is the area of the parallelogram formed by the original\ntwo vectors.
\nThe static version of cross()
, as in p5.Vector.cross(v1, v2)
, is the same\nas calling v1.cross(v2)
.
\n",
+ "example": [
+ "\n\nlet v1 = createVector(1, 0);\nlet v2 = createVector(3, 4);\nlet cp = v1.cross(v2);\n// Prints \"p5.Vector Object : [0, 0, 4]\" to the console.\nprint(cp.toString());\n
\n\n\n\n\nlet v1 = createVector(1, 0);\nlet v2 = createVector(3, 4);\nlet cp = p5.Vector.cross(v1, v2);\n// Prints \"p5.Vector Object : [0, 0, 4]\" to the console.\nprint(cp.toString());\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "v",
+ "description": "p5.Vector to be crossed.",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "cross product as a p5.Vector.",
+ "type": "p5.Vector"
+ }
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "first p5.Vector.",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "v2",
+ "description": "second p5.Vector.",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "cross product.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "cross product as a p5.Vector.",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "dist",
+ "file": "src/math/p5.Vector.js",
+ "line": 2727,
+ "itemtype": "method",
+ "description": "Returns the distance between two points represented by vectors. A point's\ncoordinates can be thought of as a vector's components.
\nThe static version of dist()
, as in p5.Vector.dist(v1, v2)
, is the same\nas calling v1.dist(v2)
.
\nUse dist() to calculate the distance between points\nusing coordinates as in dist(x1, y1, x2, y2)
.
\n",
+ "example": [
+ "\n\nlet v1 = createVector(1, 0);\nlet v2 = createVector(0, 1);\nlet d = v1.dist(v2);\n// Prints \"1.414...\" to the console.\nprint(d);\n
\n\n\n\n\nlet v1 = createVector(1, 0);\nlet v2 = createVector(0, 1);\nlet d = p5.Vector.dist(v1, v2);\n// Prints \"1.414...\" to the console.\nprint(d);\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let origin = createVector(0, 0);\n let v1 = createVector(50, 50);\n drawArrow(origin, v1, 'red');\n\n let v2 = createVector(20, 70);\n drawArrow(origin, v2, 'blue');\n\n let v3 = p5.Vector.sub(v2, v1);\n drawArrow(v1, v3, 'purple');\n\n let m = floor(v3.mag());\n text(m, 50, 75);\n\n describe('Three arrows drawn on a gray square. A red and a blue arrow extend from the top left. A purple arrow extends from the tip of the red arrow to the tip of the blue arrow. The number 36 is written in black near the purple arrow.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "v",
+ "description": "x, y, and z coordinates of a p5.Vector.",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "distance.",
+ "type": "Number"
+ }
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "The first p5.Vector",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "v2",
+ "description": "The second p5.Vector",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "The distance",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "distance.",
+ "type": "Number"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "normalize",
+ "file": "src/math/p5.Vector.js",
+ "line": 2826,
+ "itemtype": "method",
+ "description": "Scales the components of a p5.Vector object so\nthat its magnitude is 1.
\nThe static version of normalize()
, as in p5.Vector.normalize(v)
,\nreturns a new p5.Vector object and doesn't change\nthe original.
\n",
+ "example": [
+ "\n\nlet v = createVector(10, 20, 2);\nv.normalize();\n// Prints \"p5.Vector Object : [0.445..., 0.890..., 0.089...]\" to the console.\nprint(v.toString());\n
\n\n\n\n\nlet v0 = createVector(10, 20, 2);\nlet v1 = p5.Vector.normalize(v0);\n// Prints \"p5.Vector Object : [10, 20, 2]\" to the console.\nprint(v0.toString());\n// Prints \"p5.Vector Object : [0.445..., 0.890..., 0.089...]\" to the console.\nprint(v1.toString());\n
\n\n\n\n\nfunction draw() {\n background(240);\n\n let v0 = createVector(50, 50);\n let v1 = createVector(mouseX - 50, mouseY - 50);\n\n let r = 25;\n drawArrow(v0, v1, 'red');\n v1.normalize();\n drawArrow(v0, v1.mult(r), 'blue');\n\n noFill();\n circle(50, 50, r * 2);\n\n describe(\"A red and blue arrow extend from the center of a circle. Both arrows follow the mouse, but the blue arrow's length is fixed to the circle's radius.\");\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "normalized p5.Vector.",
+ "type": "p5.Vector"
+ }
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "v",
+ "description": "The vector to normalize",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "target",
+ "description": "The vector to receive the result",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "The vector v, normalized to a length of 1",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "normalized p5.Vector.",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "limit",
+ "file": "src/math/p5.Vector.js",
+ "line": 2852,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Limits a vector's magnitude to a maximum value.
\nThe static version of limit()
, as in p5.Vector.limit(v, 5)
, returns a\nnew p5.Vector object and doesn't change the\noriginal.
\n",
+ "example": [
+ "\n\nlet v = createVector(10, 20, 2);\nv.limit(5);\n// Prints \"p5.Vector Object : [2.227..., 4.454..., 0.445...]\" to the console.\nprint(v.toString());\n
\n\n\n\n\nlet v0 = createVector(10, 20, 2);\nlet v1 = p5.Vector.limit(v0, 5);\n// Prints \"p5.Vector Object : [2.227..., 4.454..., 0.445...]\" to the console.\nprint(v1.toString());\n
\n\n\n\n\nfunction draw() {\n background(240);\n\n let v0 = createVector(50, 50);\n let v1 = createVector(mouseX - 50, mouseY - 50);\n\n let r = 25;\n drawArrow(v0, v1, 'red');\n drawArrow(v0, v1.limit(r), 'blue');\n\n noFill();\n circle(50, 50, r * 2);\n\n describe(\"A red and blue arrow extend from the center of a circle. Both arrows follow the mouse, but the blue arrow never crosses the circle's edge.\");\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "max",
+ "description": "maximum magnitude for the vector.",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "v",
+ "description": "the vector to limit",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "max",
+ "type": "Number"
+ },
+ {
+ "name": "target",
+ "description": "the vector to receive the result (Optional)",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "v with a magnitude limited to max",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "v with a magnitude limited to max",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "setMag",
+ "file": "src/math/p5.Vector.js",
+ "line": 2878,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Sets a vector's magnitude to a given value.
\nThe static version of setMag()
, as in p5.Vector.setMag(v, 10)
, returns\na new p5.Vector object and doesn't change the\noriginal.
\n",
+ "example": [
+ "\n\nlet v = createVector(3, 4, 0);\n// Prints \"5\" to the console.\nprint(v.mag());\n\nv.setMag(10);\n// Prints \"p5.Vector Object : [6, 8, 0]\" to the console.\nprint(v.toString());\n
\n\n\n\n\nlet v0 = createVector(3, 4, 0);\nlet v1 = p5.Vector.setMag(v0, 10);\n// Prints \"5\" to the console.\nprint(v0.mag());\n// Prints \"p5.Vector Object : [6, 8, 0]\" to the console.\nprint(v1.toString());\n
\n\n\n\n\nfunction draw() {\n background(240);\n\n let origin = createVector(0, 0);\n let v = createVector(50, 50);\n\n drawArrow(origin, v, 'red');\n\n v.setMag(30);\n drawArrow(origin, v, 'blue');\n\n describe('Two arrows extend from the top left corner of a square toward its center. The red arrow reaches the center and the blue arrow only extends part of the way.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "len",
+ "description": "new length for this vector.",
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "v",
+ "description": "the vector to set the magnitude of",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "len",
+ "type": "number"
+ },
+ {
+ "name": "target",
+ "description": "the vector to receive the result (Optional)",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "v with a magnitude set to len",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "v with a magnitude set to len",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "heading",
+ "file": "src/math/p5.Vector.js",
+ "line": 2904,
+ "itemtype": "method",
+ "description": "Calculates the angle a 2D vector makes with the positive x-axis. Angles\nincrease in the clockwise direction.
\nIf the vector was created with\ncreateVector(), heading()
returns angles\nin the units of the current angleMode().
\nThe static version of heading()
, as in p5.Vector.heading(v)
, works the\nsame way.
\n",
+ "example": [
+ "\n\nlet v = createVector(1, 1);\n// Prints \"0.785...\" to the console.\nprint(v.heading());\n\nangleMode(DEGREES);\n// Prints \"45\" to the console.\nprint(v.heading());\n
\n\n\n\n\nlet v = createVector(1, 1);\n// Prints \"0.785...\" to the console.\nprint(p5.Vector.heading(v));\n\nangleMode(DEGREES);\n// Prints \"45\" to the console.\nprint(p5.Vector.heading(v));\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let origin = createVector(0, 0);\n let v = createVector(50, 50);\n\n drawArrow(origin, v, 'black');\n\n angleMode(RADIANS);\n let h = round(v.heading(), 2);\n text(`Radians: ${h}`, 20, 70);\n angleMode(DEGREES);\n h = v.heading();\n text(`Degrees: ${h}`, 20, 85);\n\n describe('A black arrow extends from the top left of a square to its center. The text \"Radians: 0.79\" and \"Degrees: 45\" is written near the tip of the arrow.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "angle of rotation.",
+ "type": "Number"
+ }
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "v",
+ "description": "the vector to find the angle of",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "the angle of rotation",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "angle of rotation.",
+ "type": "Number"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "setHeading",
+ "file": "src/math/p5.Vector.js",
+ "line": 1633,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Rotates a 2D vector to a specific angle without changing its magnitude.\nBy convention, the positive x-axis has an angle of 0. Angles increase in\nthe clockwise direction.
\nIf the vector was created with\ncreateVector(), setHeading()
uses\nthe units of the current angleMode().
\n",
+ "example": [
+ "\n\nlet v = createVector(0, 1);\n// Prints \"1.570...\" to the console.\nprint(v.heading());\n\nv.setHeading(PI);\n// Prints \"3.141...\" to the console.\nprint(v.heading());\n
\n\n\n\n\nangleMode(DEGREES);\nlet v = createVector(0, 1);\n// Prints \"90\" to the console.\nprint(v.heading());\n\nv.setHeading(180);\n// Prints \"180\" to the console.\nprint(v.heading());\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let v0 = createVector(50, 50);\n let v1 = createVector(30, 0);\n\n drawArrow(v0, v1, 'red');\n\n v1.setHeading(HALF_PI);\n drawArrow(v0, v1, 'blue');\n\n describe('Two arrows extend from the center of a gray square. The red arrow points to the right and the blue arrow points down.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "angle of rotation.",
+ "type": "number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Vector",
+ "static": false,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "rotate",
+ "file": "src/math/p5.Vector.js",
+ "line": 2626,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Rotates a 2D vector by an angle without changing its magnitude.\nBy convention, the positive x-axis has an angle of 0. Angles increase in\nthe clockwise direction.
\nIf the vector was created with\ncreateVector(), rotate()
uses\nthe units of the current angleMode().
\nThe static version of rotate()
, as in p5.Vector.rotate(v, PI)
,\nreturns a new p5.Vector object and doesn't change\nthe original.
\n",
+ "example": [
+ "\n\nlet v = createVector(1, 0);\n// Prints \"p5.Vector Object : [1, 0, 0]\" to the console.\nprint(v.toString());\nv.rotate(HALF_PI);\n// Prints \"p5.Vector Object : [0, 1, 0]\" to the console.\nprint(v.toString());\n
\n\n\n\n\nangleMode(DEGREES);\nlet v = createVector(1, 0);\n// Prints \"p5.Vector Object : [1, 0, 0]\" to the console.\nprint(v.toString());\nv.rotate(90);\n// Prints \"p5.Vector Object : [0, 1, 0]\" to the console.\nprint(v.toString());\n
\n\n\n\n\nlet v0 = createVector(1, 0);\nlet v1 = p5.Vector.rotate(v0, HALF_PI);\n// Prints \"p5.Vector Object : [1, 0, 0]\" to the console.\nprint(v0.toString());\n// Prints \"p5.Vector Object : [0, 1, 0]\" to the console.\nprint(v1.toString());\n
\n\n\n\n\nangleMode(DEGREES);\nlet v0 = createVector(1, 0);\nlet v1 = p5.Vector.rotate(v0, 90);\n// Prints \"p5.Vector Object : [1, 0, 0]\" to the console.\nprint(v0.toString());\n// Prints \"p5.Vector Object : [0, 1, 0]\" to the console.\nprint(v1.toString());\n
\n\n\n\n\nlet v0;\nlet v1;\n\nfunction setup() {\n v0 = createVector(50, 50);\n v1 = createVector(30, 0);\n}\n\nfunction draw() {\n background(240);\n\n v1.rotate(0.01);\n\n drawArrow(v0, v1, 'black');\n\n describe('A black arrow extends from the center of a gray square. The arrow rotates counterclockwise.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "angle of rotation.",
+ "type": "number"
+ }
+ ]
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "v",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "angle",
+ "type": "Number"
+ },
+ {
+ "name": "target",
+ "description": "The vector to receive the result",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "angleBetween",
+ "file": "src/math/p5.Vector.js",
+ "line": 2919,
+ "itemtype": "method",
+ "description": "Returns the angle between two vectors. The angles returned are signed,\nwhich means that v1.angleBetween(v2) === -v2.angleBetween(v1)
.
\nIf the vector was created with\ncreateVector(), angleBetween()
returns\nangles in the units of the current\nangleMode().
\n",
+ "example": [
+ "\n\nlet v0 = createVector(1, 0);\nlet v1 = createVector(0, 1);\n// Prints \"1.570...\" to the console.\nprint(v0.angleBetween(v1));\n// Prints \"-1.570...\" to the console.\nprint(v1.angleBetween(v0));\n
\n\n\n\n\nangleMode(DEGREES);\nlet v0 = createVector(1, 0);\nlet v1 = createVector(0, 1);\n// Prints \"90\" to the console.\nprint(v0.angleBetween(v1));\n// Prints \"-90\" to the console.\nprint(v1.angleBetween(v0));\n
\n\n\n\n\nlet v0 = createVector(1, 0);\nlet v1 = createVector(0, 1);\n// Prints \"1.570...\" to the console.\nprint(p5.Vector.angleBetween(v0, v1));\n// Prints \"-1.570...\" to the console.\nprint(p5.Vector.angleBetween(v1, v0));\n
\n\n\n\n\nangleMode(DEGREES);\nlet v0 = createVector(1, 0);\nlet v1 = createVector(0, 1);\n// Prints \"90\" to the console.\nprint(p5.Vector.angleBetween(v0, v1));\n// Prints \"-90\" to the console.\nprint(p5.Vector.angleBetween(v1, v0));\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let v0 = createVector(50, 50);\n let v1 = createVector(30, 0);\n let v2 = createVector(0, 30);\n\n drawArrow(v0, v1, 'red');\n drawArrow(v0, v2, 'blue');\n\n angleMode(RADIANS);\n let angle = round(v1.angleBetween(v2), 2);\n text(`Radians: ${angle}`, 20, 20);\n angleMode(DEGREES);\n angle = round(v1.angleBetween(v2), 2);\n text(`Degrees: ${angle}`, 20, 35);\n\n describe('Two arrows extend from the center of a gray square. A red arrow points to the right and a blue arrow points down. The text \"Radians: 1.57\" and \"Degrees: 90\" is written above the arrows.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "x, y, and z components of a p5.Vector.",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "angle between the vectors.",
+ "type": "Number"
+ }
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "the first vector.",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "v2",
+ "description": "the second vector.",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "angle between the two vectors.",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "angle between the vectors.",
+ "type": "Number"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "lerp",
+ "file": "src/math/p5.Vector.js",
+ "line": 2743,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Calculates new x
, y
, and z
components that are proportionally the\nsame distance between two vectors. The amt
parameter is the amount to\ninterpolate between the old vector and the new vector. 0.0 keeps all\ncomponents equal to the old vector's, 0.5 is halfway between, and 1.0 sets\nall components equal to the new vector's.
\nThe static version of lerp()
, as in p5.Vector.lerp(v0, v1, 0.5)
,\nreturns a new p5.Vector object and doesn't change\nthe original.
\n",
+ "example": [
+ "\n\nlet v0 = createVector(1, 1, 1);\nlet v1 = createVector(3, 3, 3);\nv0.lerp(v1, 0.5);\n// Prints \"p5.Vector Object : [2, 2, 2]\" to the console.\nprint(v0.toString());\n
\n\n\n\n\nlet v = createVector(1, 1, 1);\nv.lerp(3, 3, 3, 0.5);\n// Prints \"p5.Vector Object : [2, 2, 2]\" to the console.\nprint(v.toString());\n
\n\n\n\n\nlet v0 = createVector(1, 1, 1);\nlet v1 = createVector(3, 3, 3);\nlet v2 = p5.Vector.lerp(v0, v1, 0.5);\n// Prints \"p5.Vector Object : [2, 2, 2]\" to the console.\nprint(v2.toString());\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let v0 = createVector(50, 50);\n let v1 = createVector(30, 0);\n let v2 = createVector(0, 30);\n let v3 = p5.Vector.lerp(v1, v2, 0.5);\n\n drawArrow(v0, v1, 'red');\n drawArrow(v0, v2, 'blue');\n drawArrow(v0, v3, 'purple');\n\n describe('Three arrows extend from the center of a gray square. A red arrow points to the right, a blue arrow points down, and a purple arrow points to the bottom right.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x component.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y component.",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z component.",
+ "type": "Number"
+ },
+ {
+ "name": "amt",
+ "description": "amount of interpolation between 0.0 (old vector)\nand 1.0 (new vector). 0.5 is halfway between.",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "v",
+ "description": "p5.Vector to lerp toward.",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "amt",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "v2",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "amt",
+ "type": "Number"
+ },
+ {
+ "name": "target",
+ "description": "The vector to receive the result",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "The lerped value",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "The lerped value",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "slerp",
+ "file": "src/math/p5.Vector.js",
+ "line": 2773,
+ "itemtype": "method",
+ "description": "Calculates a new heading and magnitude that are between two vectors. The\namt
parameter is the amount to interpolate between the old vector and\nthe new vector. 0.0 keeps the heading and magnitude equal to the old\nvector's, 0.5 sets them halfway between, and 1.0 sets the heading and\nmagnitude equal to the new vector's.
\nslerp()
differs from lerp() because\nit interpolates magnitude. Calling v0.slerp(v1, 0.5)
sets v0
's\nmagnitude to a value halfway between its original magnitude and v1
's.\nCalling v0.lerp(v1, 0.5)
makes no such guarantee.
\nThe static version of slerp()
, as in p5.Vector.slerp(v0, v1, 0.5)
,\nreturns a new p5.Vector object and doesn't change\nthe original.
\n",
+ "example": [
+ "\n\nlet v0 = createVector(3, 0);\n// Prints \"3\" to the console.\nprint(v0.mag());\n// Prints \"0\" to the console.\nprint(v0.heading());\n\nlet v1 = createVector(0, 1);\n// Prints \"1\" to the console.\nprint(v1.mag());\n// Prints \"1.570...\" to the console.\nprint(v1.heading());\n\nv0.slerp(v1, 0.5);\n// Prints \"2\" to the console.\nprint(v0.mag());\n// Prints \"0.785...\" to the console.\nprint(v0.heading());\n
\n\n\n\n\nlet v0 = createVector(3, 0);\n// Prints \"3\" to the console.\nprint(v0.mag());\n// Prints \"0\" to the console.\nprint(v0.heading());\n\nlet v1 = createVector(0, 1);\n// Prints \"1\" to the console.\nprint(v1.mag());\n// Prints \"1.570...\" to the console.\nprint(v1.heading());\n\nlet v3 = p5.Vector.slerp(v0, v1, 0.5);\n// Prints \"2\" to the console.\nprint(v3.mag());\n// Prints \"0.785...\" to the console.\nprint(v3.heading());\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let v0 = createVector(50, 50);\n let v1 = createVector(20, 0);\n let v2 = createVector(-40, 0);\n let v3 = p5.Vector.slerp(v1, v2, 0.5);\n\n drawArrow(v0, v1, 'red');\n drawArrow(v0, v2, 'blue');\n drawArrow(v0, v3, 'purple');\n\n describe('Three arrows extend from the center of a gray square. A red arrow points to the right, a blue arrow points to the left, and a purple arrow points down.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "v",
+ "description": "p5.Vector to slerp toward.",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "amt",
+ "description": "amount of interpolation between 0.0 (old vector)\nand 1.0 (new vector). 0.5 is halfway between.",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Vector"
+ }
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "old vector.",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "v2",
+ "description": "new vector.",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "amt",
+ "type": "Number"
+ },
+ {
+ "name": "target",
+ "description": "vector to receive the result.",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "slerped vector between v1 and v2",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "reflect",
+ "file": "src/math/p5.Vector.js",
+ "line": 2934,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Reflects a vector about a line in 2D or a plane in 3D. The orientation of\nthe line or plane is described by a normal vector that points away from the\nshape.
\nThe static version of reflect()
, as in p5.Vector.reflect(v, n)
,\nreturns a new p5.Vector object and doesn't change\nthe original.
\n",
+ "example": [
+ "\n\nlet n = createVector(0, 1);\nlet v = createVector(4, 6);\nv.reflect(n);\n// Prints \"p5.Vector Object : [4, -6, 0]\" to the console.\nprint(v.toString());\n
\n\n\n\n\nlet n = createVector(0, 1);\nlet v0 = createVector(4, 6);\nlet v1 = p5.Vector.reflect(v0, n);\n// Prints \"p5.Vector Object : [4, -6, 0]\" to the console.\nprint(v1.toString());\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n line(50, 0, 50, 100);\n let n = createVector(1, 0);\n\n let v0 = createVector(50, 50);\n let v1 = createVector(30, 40);\n let v2 = p5.Vector.reflect(v1, n);\n\n n.setMag(30);\n drawArrow(v0, n, 'black');\n drawArrow(v0, v1, 'red');\n drawArrow(v0, v2, 'blue');\n\n describe('Three arrows extend from the center of a gray square with a vertical line down its middle. A black arrow points to the right, a blue arrow points to the bottom left, and a red arrow points to the bottom right.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "surfaceNormal",
+ "description": "p5.Vector\nto reflect about.",
+ "type": "p5.Vector"
+ }
+ ]
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "incidentVector",
+ "description": "vector to be reflected.",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "surfaceNormal",
+ "type": "p5.Vector"
+ },
+ {
+ "name": "target",
+ "description": "vector to receive the result.",
+ "optional": 1,
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "the reflected vector",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "the reflected vector",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "array",
+ "file": "src/math/p5.Vector.js",
+ "line": 2960,
+ "itemtype": "method",
+ "description": "Returns the vector's components as an array of numbers.",
+ "example": [
+ "\n\nlet v = createVector(20, 30);\n// Prints \"[20, 30, 0]\" to the console.\nprint(v.array());\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "array with the vector's components.",
+ "type": "Number[]"
+ }
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "v",
+ "description": "the vector to convert to an array",
+ "type": "p5.Vector"
+ }
+ ],
+ "return": {
+ "description": "an Array with the 3 values",
+ "type": "Number[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "array with the vector's components.",
+ "type": "Number[]"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "equals",
+ "file": "src/math/p5.Vector.js",
+ "line": 2973,
+ "itemtype": "method",
+ "description": "Returns true
if the vector's components are all the same as another\nvector's and false
if not.
\nThe version of equals()
with one parameter interprets it as another\np5.Vector object.
\nThe version of equals()
with multiple parameters interprets them as the\ncomponents of another vector. Any missing parameters are assigned the value\n0.
\nThe static version of equals()
, as in p5.Vector.equals(v0, v1)
,\ninterprets both parameters as p5.Vector objects.
\n",
+ "example": [
+ "\n\nlet v0 = createVector(10, 20, 30);\nlet v1 = createVector(10, 20, 30);\nlet v2 = createVector(0, 0, 0);\n\n// Prints \"true\" to the console.\nprint(v0.equals(v1));\n// Prints \"false\" to the console.\nprint(v0.equals(v2));\n
\n\n\n\n\nlet v0 = createVector(5, 10, 20);\nlet v1 = createVector(5, 10, 20);\nlet v2 = createVector(13, 10, 19);\n\n// Prints \"true\" to the console.\nprint(v0.equals(v1.x, v1.y, v1.z));\n// Prints \"false\" to the console.\nprint(v0.equals(v2.x, v2.y, v2.z));\n
\n\n\n\n\nlet v0 = createVector(10, 20, 30);\nlet v1 = createVector(10, 20, 30);\nlet v2 = createVector(0, 0, 0);\n\n// Prints \"true\" to the console.\nprint(p5.Vector.equals(v0, v1));\n// Prints \"false\" to the console.\nprint(p5.Vector.equals(v0, v2));\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z component of the vector.",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "whether the vectors are equal.",
+ "type": "Boolean"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "vector to compare.",
+ "type": "p5.Vector|Array"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Boolean"
+ }
+ },
+ {
+ "params": []
+ },
+ {
+ "params": [
+ {
+ "name": "v1",
+ "description": "the first vector to compare",
+ "type": "p5.Vector|Array"
+ },
+ {
+ "name": "v2",
+ "description": "the second vector to compare",
+ "type": "p5.Vector|Array"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Boolean"
+ }
+ }
+ ],
+ "return": {
+ "description": "whether the vectors are equal.",
+ "type": "Boolean"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "fromAngle",
+ "file": "src/math/p5.Vector.js",
+ "line": 2340,
+ "itemtype": "method",
+ "description": "Make a new 2D vector from an angle.",
+ "example": [
+ "\n\nlet v = p5.Vector.fromAngle(0);\n// Prints \"p5.Vector Object : [1, 0, 0]\" to the console.\nprint(v.toString());\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n let v0 = createVector(50, 50);\n let v1 = p5.Vector.fromAngle(0, 30);\n\n drawArrow(v0, v1, 'black');\n\n describe('A black arrow extends from the center of a gray square. It points to the right.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "desired angle, in radians. Unaffected by angleMode().",
+ "type": "Number"
+ },
+ {
+ "name": "length",
+ "description": "length of the new vector (defaults to 1).",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "new p5.Vector object.",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Vector object.",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "fromAngles",
+ "file": "src/math/p5.Vector.js",
+ "line": 2394,
+ "itemtype": "method",
+ "description": "Make a new 3D vector from a pair of ISO spherical angles.",
+ "example": [
+ "\n\nlet v = p5.Vector.fromAngles(0, 0);\n// Prints \"p5.Vector Object : [0, -1, 0]\" to the console.\nprint(v.toString());\n
\n\n\n\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n}\n\nfunction draw() {\n background(0);\n\n fill(255);\n noStroke();\n\n let theta = frameCount * 0.05;\n let phi = 0;\n let v = p5.Vector.fromAngles(theta, phi, 100);\n let c = color('deeppink');\n pointLight(c, v);\n\n sphere(35);\n\n describe('A light shines on a pink sphere as it orbits.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "theta",
+ "description": "polar angle in radians (zero is up).",
+ "type": "Number"
+ },
+ {
+ "name": "phi",
+ "description": "azimuthal angle in radians\n(zero is out of the screen).",
+ "type": "Number"
+ },
+ {
+ "name": "length",
+ "description": "length of the new vector (defaults to 1).",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "new p5.Vector object.",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Vector object.",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "random2D",
+ "file": "src/math/p5.Vector.js",
+ "line": 2456,
+ "itemtype": "method",
+ "description": "Make a new 2D unit vector with a random heading.",
+ "example": [
+ "\n\nlet v = p5.Vector.random2D();\n// Prints \"p5.Vector Object : [x, y, 0]\" to the console\n// where x and y are small random numbers.\nprint(v.toString());\n
\n\n\n\n\nfunction draw() {\n background(200);\n\n frameRate(1);\n\n let v0 = createVector(50, 50);\n let v1 = p5.Vector.random2D();\n v1.mult(30);\n drawArrow(v0, v1, 'black');\n\n describe('A black arrow in extends from the center of a gray square. It changes direction once per second.');\n}\n\nfunction drawArrow(base, vec, myColor) {\n push();\n stroke(myColor);\n strokeWeight(3);\n fill(myColor);\n translate(base.x, base.y);\n line(0, 0, vec.x, vec.y);\n rotate(vec.heading());\n let arrowSize = 7;\n translate(vec.mag() - arrowSize, 0);\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n pop();\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "new p5.Vector object.",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Vector object.",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "random3D",
+ "file": "src/math/p5.Vector.js",
+ "line": 2475,
+ "itemtype": "method",
+ "description": "Make a new 3D unit vector with a random heading.",
+ "example": [
+ "\n\nlet v = p5.Vector.random3D();\n// Prints \"p5.Vector Object : [x, y, z]\" to the console\n// where x, y, and z are small random numbers.\nprint(v.toString());\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "new p5.Vector object.",
+ "type": "p5.Vector"
+ }
+ }
+ ],
+ "return": {
+ "description": "new p5.Vector object.",
+ "type": "p5.Vector"
+ },
+ "class": "p5.Vector",
+ "static": 1,
+ "module": "Math",
+ "submodule": "Vector"
+ },
+ {
+ "name": "textBounds",
+ "file": "src/typography/p5.Font.js",
+ "line": 139,
+ "itemtype": "method",
+ "description": "Returns the bounding box for a string of text written using this\np5.Font.
\nThe first parameter, str
, is a string of text. The second and third\nparameters, x
and y
, are the text's position. By default, they set the\ncoordinates of the bounding box's bottom-left corner. See\ntextAlign() for more ways to align text.
\nThe fourth parameter, fontSize
, is optional. It sets the font size used to\ndetermine the bounding box. By default, font.textBounds()
will use the\ncurrent textSize().
\n",
+ "example": [
+ "\n\nlet font;\n\nfunction preload() {\n font = loadFont('assets/inconsolata.otf');\n}\n\nfunction setup() {\n background(200);\n\n let bbox = font.textBounds('p5*js', 35, 53);\n rect(bbox.x, bbox.y, bbox.w, bbox.h);\n\n textFont(font);\n text('p5*js', 35, 53);\n\n describe('The text \"p5*js\" written in black inside a white rectangle.');\n}\n
\n\n\n\n\nlet font;\n\nfunction preload() {\n font = loadFont('assets/inconsolata.otf');\n}\n\nfunction setup() {\n background(200);\n\n textFont(font);\n textSize(15);\n textAlign(CENTER, CENTER);\n\n let bbox = font.textBounds('p5*js', 50, 50);\n rect(bbox.x, bbox.y, bbox.w, bbox.h);\n\n text('p5*js', 50, 50);\n\n describe('The text \"p5*js\" written in black inside a white rectangle.');\n}\n
\n\n\n\n\nlet font;\n\nfunction preload() {\n font = loadFont('assets/inconsolata.otf');\n}\n\nfunction setup() {\n background(200);\n\n let bbox = font.textBounds('p5*js', 31, 53, 15);\n rect(bbox.x, bbox.y, bbox.w, bbox.h);\n\n textFont(font);\n textSize(15);\n text('p5*js', 31, 53);\n\n describe('The text \"p5*js\" written in black inside a white rectangle.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "str",
+ "description": "string of text.",
+ "type": "String"
+ },
+ {
+ "name": "x",
+ "description": "x-coordinate of the text.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the text.",
+ "type": "Number"
+ },
+ {
+ "name": "fontSize",
+ "description": "font size. Defaults to the current\ntextSize().",
+ "optional": 1,
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "object describing the bounding box with\nproperties x, y, w, and h.",
+ "type": "Object"
+ }
+ }
+ ],
+ "return": {
+ "description": "object describing the bounding box with\nproperties x, y, w, and h.",
+ "type": "Object"
+ },
+ "class": "p5.Font",
+ "static": false,
+ "module": "Typography",
+ "submodule": "Loading & Displaying"
+ },
+ {
+ "name": "textToPoints",
+ "file": "src/typography/p5.Font.js",
+ "line": 293,
+ "itemtype": "method",
+ "description": "Returns an array of points outlining a string of text written using this\np5.Font.
\nThe first parameter, str
, is a string of text. The second and third\nparameters, x
and y
, are the text's position. By default, they set the\ncoordinates of the bounding box's bottom-left corner. See\ntextAlign() for more ways to align text.
\nThe fourth parameter, fontSize
, is optional. It sets the text's font\nsize. By default, font.textToPoints()
will use the current\ntextSize().
\nThe fifth parameter, options
, is also optional. font.textToPoints()
\nexpects an object with the following properties:
\nsampleFactor
is the ratio of the text's path length to the number of\nsamples. It defaults to 0.1. Higher values produce more points along the\npath and are more precise.
\nsimplifyThreshold
removes collinear points if it's set to a number other\nthan 0. The value represents the threshold angle to use when determining\nwhether two edges are collinear.
\n",
+ "example": [
+ "\n\nlet font;\n\nfunction preload() {\n font = loadFont('assets/inconsolata.otf');\n}\n\nfunction setup() {\n background(200);\n let points = font.textToPoints('p5*js', 6, 60, 35, { sampleFactor: 0.5 });\n points.forEach(p => {\n point(p.x, p.y);\n });\n\n describe('A set of black dots outlining the text \"p5*js\" on a gray background.');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "str",
+ "description": "string of text.",
+ "type": "String"
+ },
+ {
+ "name": "x",
+ "description": "x-coordinate of the text.",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the text.",
+ "type": "Number"
+ },
+ {
+ "name": "fontSize",
+ "description": "font size. Defaults to the current\ntextSize().",
+ "optional": 1,
+ "type": "Number"
+ },
+ {
+ "name": "options",
+ "description": "object with sampleFactor and simplifyThreshold\nproperties.",
+ "optional": 1,
+ "type": "Object"
+ }
+ ],
+ "return": {
+ "description": "array of point objects, each with x, y, and alpha (path angle) properties.",
+ "type": "Array"
+ }
+ }
+ ],
+ "return": {
+ "description": "array of point objects, each with x, y, and alpha (path angle) properties.",
+ "type": "Array"
+ },
+ "class": "p5.Font",
+ "static": false,
+ "module": "Typography",
+ "submodule": "Loading & Displaying"
+ },
+ {
+ "name": "perspective",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 788,
+ "itemtype": "method",
+ "description": "Sets a perspective projection.\nAccepts the same parameters as the global\nperspective().\nMore information on this function can be found there.",
+ "example": [
+ "\n\n// drag the mouse to look around!\n\nlet cam;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n // create a camera\n cam = createCamera();\n cam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n // give it a perspective projection\n cam.perspective(PI / 3.0, width / height, 0.1, 500);\n}\n\nfunction draw() {\n background(200);\n orbitControl();\n normalMaterial();\n\n rotateX(-0.3);\n rotateY(-0.2);\n translate(0, 0, -50);\n\n push();\n translate(-15, 0, sin(frameCount / 30) * 65);\n box(30);\n pop();\n push();\n translate(15, 0, sin(frameCount / 30 + PI) * 65);\n box(30);\n pop();\n}\n
\n"
+ ],
+ "alt": "two colored 3D boxes move back and forth, rotating as mouse is dragged.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Camera",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "ortho",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 888,
+ "itemtype": "method",
+ "description": "Sets an orthographic projection.\nAccepts the same parameters as the global\northo().\nMore information on this function can be found there.",
+ "example": [
+ "\n\n// drag the mouse to look around!\n// there's no vanishing point\n\nlet cam;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n // create a camera\n cam = createCamera();\n cam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n // give it an orthographic projection\n cam.ortho(-width / 2, width / 2, height / 2, -height / 2, 0, 500);\n}\nfunction draw() {\n background(200);\n orbitControl();\n normalMaterial();\n\n rotateX(0.2);\n rotateY(-0.2);\n push();\n translate(-15, 0, sin(frameCount / 30) * 65);\n box(30);\n pop();\n push();\n translate(15, 0, sin(frameCount / 30 + PI) * 65);\n box(30);\n pop();\n}\n
\n"
+ ],
+ "alt": "two 3D boxes move back and forth along same plane, rotating as mouse is dragged.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Camera",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "frustum",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 970,
+ "itemtype": "method",
+ "description": "Sets the camera's frustum.\nAccepts the same parameters as the global\nfrustum().\nMore information on this function can be found there.",
+ "example": [
+ "\n\nlet cam;\n\nfunction setup() {\n x = createCanvas(100, 100, WEBGL);\n setAttributes('antialias', true);\n // create a camera\n cam = createCamera();\n cam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n // set its frustum\n cam.frustum(-0.1, 0.1, -0.1, 0.1, 0.1, 200);\n}\n\nfunction draw() {\n background(200);\n orbitControl();\n normalMaterial();\n\n rotateY(-0.2);\n rotateX(-0.3);\n push();\n translate(-15, 0, sin(frameCount / 30) * 25);\n box(30);\n pop();\n push();\n translate(15, 0, sin(frameCount / 30 + PI) * 25);\n box(30);\n pop();\n}\n
\n"
+ ],
+ "alt": "two 3D boxes move back and forth along same plane, rotating as mouse is dragged.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Camera",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "pan",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 1111,
+ "itemtype": "method",
+ "description": "Panning rotates the camera view to the left and right.",
+ "example": [
+ "\n\nlet cam;\nlet delta = 0.01;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n normalMaterial();\n cam = createCamera();\n cam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n cam.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n // set initial pan angle\n cam.pan(-0.8);\n}\n\nfunction draw() {\n background(200);\n\n // pan camera according to angle 'delta'\n cam.pan(delta);\n\n // every 160 frames, switch direction\n if (frameCount % 160 === 0) {\n delta *= -1;\n }\n\n rotateX(frameCount * 0.01);\n translate(-100, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n}\n
\n"
+ ],
+ "alt": "camera view pans left and right across a series of rotating 3D boxes.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "amount to rotate camera in current\nangleMode units.\nGreater than 0 values rotate counterclockwise (to the left).",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Camera",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "tilt",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 1170,
+ "itemtype": "method",
+ "description": "Tilting rotates the camera view up and down.",
+ "example": [
+ "\n\nlet cam;\nlet delta = 0.01;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n normalMaterial();\n cam = createCamera();\n cam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n cam.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n // set initial tilt\n cam.tilt(-0.8);\n}\n\nfunction draw() {\n background(200);\n\n // pan camera according to angle 'delta'\n cam.tilt(delta);\n\n // every 160 frames, switch direction\n if (frameCount % 160 === 0) {\n delta *= -1;\n }\n\n rotateY(frameCount * 0.01);\n translate(0, -100, 0);\n box(20);\n translate(0, 35, 0);\n box(20);\n translate(0, 35, 0);\n box(20);\n translate(0, 35, 0);\n box(20);\n translate(0, 35, 0);\n box(20);\n translate(0, 35, 0);\n box(20);\n translate(0, 35, 0);\n box(20);\n}\n
\n"
+ ],
+ "alt": "camera view tilts up and down across a series of rotating 3D boxes.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "angle",
+ "description": "amount to rotate camera in current\nangleMode units.\nGreater than 0 values rotate counterclockwise (to the left).",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Camera",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "lookAt",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 1225,
+ "itemtype": "method",
+ "description": "Reorients the camera to look at a position in world space.",
+ "example": [
+ "\n\nlet cam;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n normalMaterial();\n cam = createCamera();\n cam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n cam.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n}\n\nfunction draw() {\n background(200);\n\n // look at a new random point every 60 frames\n if (frameCount % 60 === 0) {\n cam.lookAt(random(-100, 100), random(-50, 50), 0);\n }\n\n rotateX(frameCount * 0.01);\n translate(-100, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n translate(35, 0, 0);\n box(20);\n}\n
\n"
+ ],
+ "alt": "camera view of rotating 3D cubes changes to look at a new random\npoint every second .",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x position of a point in world space",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y position of a point in world space",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z position of a point in world space",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Camera",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "camera",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 1327,
+ "itemtype": "method",
+ "description": "Sets the camera's position and orientation.\nAccepts the same parameters as the global\ncamera().\nMore information on this function can be found there.",
+ "example": [
+ "\n\nlet cam;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n // Create a camera.\n // createCamera() sets the newly created camera as\n // the current (active) camera.\n cam = createCamera();\n}\n\nfunction draw() {\n background(204);\n // Move the camera away from the plane by a sin wave\n cam.camera(0, 0, 20 + sin(frameCount * 0.01) * 10, 0, 0, 0, 0, 1, 0);\n plane(10, 10);\n}\n
\n",
+ "\n\n// move slider to see changes!\n// sliders control the first 6 parameters of camera()\n\nlet sliderGroup = [];\nlet X;\nlet Y;\nlet Z;\nlet centerX;\nlet centerY;\nlet centerZ;\nlet h = 20;\nlet cam;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n // create a camera\n cam = createCamera();\n cam.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n // create sliders\n for (var i = 0; i < 6; i++) {\n if (i === 2) {\n sliderGroup[i] = createSlider(10, 400, 200);\n } else {\n sliderGroup[i] = createSlider(-400, 400, 0);\n }\n h = map(i, 0, 6, 5, 85);\n sliderGroup[i].position(10, height + h);\n sliderGroup[i].style('width', '80px');\n }\n}\n\nfunction draw() {\n background(60);\n // assigning sliders' value to each parameters\n X = sliderGroup[0].value();\n Y = sliderGroup[1].value();\n Z = sliderGroup[2].value();\n centerX = sliderGroup[3].value();\n centerY = sliderGroup[4].value();\n centerZ = sliderGroup[5].value();\n cam.camera(X, Y, Z, centerX, centerY, centerZ, 0, 1, 0);\n stroke(255);\n fill(255, 102, 94);\n box(85);\n}\n
\n"
+ ],
+ "alt": "White square repeatedly grows to fill canvas and then shrinks.\nAn interactive example of a red cube with 3 sliders for moving it across x, y,\nz axis and 3 sliders for shifting its center.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Camera",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "move",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 1441,
+ "itemtype": "method",
+ "description": "Move camera along its local axes while maintaining current camera orientation.",
+ "example": [
+ "\n\n// see the camera move along its own axes while maintaining its orientation\nlet cam;\nlet delta = 0.5;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n normalMaterial();\n cam = createCamera();\n cam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n cam.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n}\n\nfunction draw() {\n background(200);\n\n // move the camera along its local axes\n cam.move(delta, delta, 0);\n\n // every 100 frames, switch direction\n if (frameCount % 150 === 0) {\n delta *= -1;\n }\n\n translate(-10, -10, 0);\n box(50, 8, 50);\n translate(15, 15, 0);\n box(50, 8, 50);\n translate(15, 15, 0);\n box(50, 8, 50);\n translate(15, 15, 0);\n box(50, 8, 50);\n translate(15, 15, 0);\n box(50, 8, 50);\n translate(15, 15, 0);\n box(50, 8, 50);\n}\n
\n"
+ ],
+ "alt": "camera view moves along a series of 3D boxes, maintaining the same\norientation throughout the move",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "amount to move along camera's left-right axis",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "amount to move along camera's up-down axis",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "amount to move along camera's forward-backward axis",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Camera",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "setPosition",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 1508,
+ "itemtype": "method",
+ "description": "Set camera position in world-space while maintaining current camera\norientation.",
+ "example": [
+ "\n\n// press '1' '2' or '3' keys to set camera position\n\nlet cam;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n normalMaterial();\n cam = createCamera();\n cam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n cam.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n}\n\nfunction draw() {\n background(200);\n\n // '1' key\n if (keyIsDown(49)) {\n cam.setPosition(30, 0, 80);\n }\n // '2' key\n if (keyIsDown(50)) {\n cam.setPosition(0, 0, 80);\n }\n // '3' key\n if (keyIsDown(51)) {\n cam.setPosition(-30, 0, 80);\n }\n\n box(20);\n}\n
\n"
+ ],
+ "alt": "camera position changes as the user presses keys, altering view of a 3D box",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x position of a point in world space",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y position of a point in world space",
+ "type": "Number"
+ },
+ {
+ "name": "z",
+ "description": "z position of a point in world space",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Camera",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "set",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 1576,
+ "itemtype": "method",
+ "description": "Copies information about the argument camera's view and projection to\nthe target camera. If the target camera is active, it will be reflected\non the screen.",
+ "example": [
+ "\n\nlet cam, initialCam;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n strokeWeight(3);\n\n // Set the initial state to initialCamera and set it to the camera\n // used for drawing. Then set cam to be the active camera.\n cam = createCamera();\n cam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n cam.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n initialCam = createCamera();\n initialCam.camera(100, 100, 100, 0, 0, 0, 0, 0, -1);\n initialCam.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n cam.set(initialCam);\n\n setCamera(cam);\n}\n\nfunction draw() {\n orbitControl();\n background(255);\n box(50);\n translate(0, 0, -25);\n plane(100);\n}\n\nfunction doubleClicked(){\n // Double-click to return the camera to its initial position.\n cam.set(initialCam);\n}\n
\n"
+ ],
+ "alt": "Prepare two cameras. One is the camera that sets the initial state,\nand the other is the camera that moves with interaction.\nDraw a plane and a box on top of it, operate the camera using orbitControl().\nDouble-click to set the camera in the initial state and return to\nthe initial state.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "cam",
+ "description": "source camera",
+ "type": "p5.Camera"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Camera",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "slerp",
+ "file": "src/webgl/p5.Camera.js",
+ "line": 1718,
+ "itemtype": "method",
+ "description": "For the cameras cam0 and cam1 with the given arguments, their view are combined\nwith the parameter amt that represents the quantity, and the obtained view is applied.\nFor example, if cam0 is looking straight ahead and cam1 is looking straight\nto the right and amt is 0.5, the applied camera will look to the halfway\nbetween front and right.\nIf the applied camera is active, the applied result will be reflected on the screen.\nWhen applying this function, all cameras involved must have exactly the same projection\nsettings. For example, if one is perspective, ortho, frustum, the other two must also be\nperspective, ortho, frustum respectively. However, if all cameras have ortho settings,\ninterpolation is possible if the ratios of left, right, top and bottom are equal to each other.\nFor example, when it is changed by orbitControl().",
+ "example": [
+ "\n\nlet cam0, cam1, cam;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n strokeWeight(3);\n\n // camera for slerp.\n cam = createCamera();\n cam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n cam.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n // cam0 is looking at the cube from the front.\n cam0 = createCamera();\n cam0.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n cam0.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n // cam1 is pointing straight to the right in the cube\n // at the same position as cam0 by doing a pan(-PI/2).\n cam1 = createCamera();\n cam1.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n cam1.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n cam1.pan(-PI/2);\n\n // we only use cam.\n setCamera(cam);\n}\n\nfunction draw() {\n // calculate amount.\n const amt = 0.5 - 0.5 * cos(frameCount * TAU / 120);\n // slerp cam0 and cam1 with amt, set to cam.\n // When amt moves from 0 to 1, cam moves from cam0 to cam1,\n // shaking the camera to the right.\n cam.slerp(cam0, cam1, amt);\n\n background(255);\n // Every time the camera turns right, the cube drifts left.\n box(40);\n}\n
\n",
+ "\n\nlet cam, lastCam, initialCam;\nlet countForReset = 30;\n// This sample uses orbitControl() to move the camera.\n// Double-clicking the canvas restores the camera to its initial state.\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n strokeWeight(3);\n\n // main camera\n cam = createCamera();\n cam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n cam.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n // Camera for recording loc info before reset\n lastCam = createCamera();\n lastCam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n lastCam.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n // Camera for recording the initial state\n initialCam = createCamera();\n initialCam.camera(0, 0, 50*sqrt(3), 0, 0, 0, 0, 1, 0);\n initialCam.perspective(PI/3, 1, 5*sqrt(3), 500*sqrt(3));\n\n setCamera(cam); // set main camera\n}\n\nfunction draw() {\n if (countForReset < 30) {\n // if the reset count is less than 30,\n // it will move closer to the original camera as it increases.\n countForReset++;\n cam.slerp(lastCam, initialCam, countForReset / 30);\n } else {\n // if the count is 30,\n // you can freely move the main camera with orbitControl().\n orbitControl();\n }\n\n background(255);\n box(40);\n}\n// A double-click sets countForReset to 0 and initiates a reset.\nfunction doubleClicked() {\n if (countForReset === 30) {\n countForReset = 0;\n lastCam.set(cam);\n }\n}\n
\n"
+ ],
+ "alt": "Prepare two cameras. One camera is facing straight ahead to the cube and the other\ncamera is in the same position and looking straight to the right.\nIf you use a camera which interpolates these with slerp(), the facing direction\nof the camera will change smoothly between the front and the right.\nThere is a camera, drawing a cube. The camera can be moved freely with\norbitControl(). Double-click to smoothly return the camera to its initial state.\nThe camera cannot be moved during that time.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "cam0",
+ "description": "first p5.Camera",
+ "type": "p5.Camera"
+ },
+ {
+ "name": "cam1",
+ "description": "second p5.Camera",
+ "type": "p5.Camera"
+ },
+ {
+ "name": "amt",
+ "description": "amount to use for interpolation during slerp",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Camera",
+ "static": false,
+ "module": "3D",
+ "submodule": "Camera"
+ },
+ {
+ "name": "resize",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 205,
+ "itemtype": "method",
+ "description": "Resizes the framebuffer to the given width and height.",
+ "example": [
+ "\n\nlet framebuffer;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n framebuffer = createFramebuffer();\n noStroke();\n}\n\nfunction mouseMoved() {\n framebuffer.resize(\n max(20, mouseX),\n max(20, mouseY)\n );\n}\n\nfunction draw() {\n // Draw to the framebuffer\n framebuffer.begin();\n background(255);\n normalMaterial();\n sphere(20);\n framebuffer.end();\n\n background(100);\n // Draw the framebuffer to the main canvas\n image(framebuffer, -width/2, -height/2);\n}\n
\n"
+ ],
+ "alt": "A red, green, and blue sphere is drawn in the middle of a white rectangle\nwhich starts in the top left of the canvas and whose bottom right is at\nthe user's mouse",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "width",
+ "type": "Number"
+ },
+ {
+ "name": "height",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Framebuffer",
+ "static": false,
+ "module": "Rendering"
+ },
+ {
+ "name": "pixelDensity",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 223,
+ "itemtype": "method",
+ "description": "Gets or sets the pixel scaling for high pixel density displays. By\ndefault, the density will match that of the canvas the framebuffer was\ncreated on, which will match the display density.
\nCall this method with no arguments to get the current density, or pass\nin a number to set the density.
\n",
+ "example": [],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "density",
+ "description": "A scaling factor for the number of pixels per\nside of the framebuffer",
+ "optional": 1,
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Framebuffer",
+ "static": false,
+ "module": "Rendering"
+ },
+ {
+ "name": "autoSized",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 243,
+ "itemtype": "method",
+ "description": "Gets or sets whether or not this framebuffer will automatically resize\nalong with the canvas it's attached to in order to match its size.
\nCall this method with no arguments to see if it is currently auto-sized,\nor pass in a boolean to set this property.
\n",
+ "example": [],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "autoSized",
+ "description": "Whether or not the framebuffer should resize\nalong with the canvas it's attached to",
+ "optional": 1,
+ "type": "Boolean"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Framebuffer",
+ "static": false,
+ "module": "Rendering"
+ },
+ {
+ "name": "createCamera",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 681,
+ "itemtype": "method",
+ "description": "Creates and returns a new\np5.FramebufferCamera to be used\nwhile drawing to this framebuffer. The camera will be set as the\ncurrently active camera.",
+ "example": [],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "A new camera",
+ "type": "p5.Camera"
+ }
+ }
+ ],
+ "return": {
+ "description": "A new camera",
+ "type": "p5.Camera"
+ },
+ "class": "p5.Framebuffer",
+ "static": false,
+ "module": "Rendering"
+ },
+ {
+ "name": "remove",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 745,
+ "itemtype": "method",
+ "description": "Removes the framebuffer and frees its resources.",
+ "example": [
+ "\n\nlet framebuffer;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n}\n\nfunction draw() {\n const useFramebuffer = (frameCount % 120) > 60;\n if (useFramebuffer && !framebuffer) {\n // Create a new framebuffer for us to use\n framebuffer = createFramebuffer();\n } else if (!useFramebuffer && framebuffer) {\n // Free the old framebuffer's resources\n framebuffer.remove();\n framebuffer = undefined;\n }\n\n background(255);\n if (useFramebuffer) {\n // Draw to the framebuffer\n framebuffer.begin();\n background(255);\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n fill(255, 0, 0);\n box(30);\n framebuffer.end();\n\n image(framebuffer, -width/2, -height/2);\n }\n}\n
\n"
+ ],
+ "alt": "A rotating red cube blinks on and off every second.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Framebuffer",
+ "static": false,
+ "module": "Rendering"
+ },
+ {
+ "name": "begin",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 803,
+ "itemtype": "method",
+ "description": "Begin drawing to this framebuffer. Subsequent drawing functions to the\ncanvas the framebuffer is attached to will not be immediately visible, and\nwill instead be drawn to the framebuffer's texture. Call\nend() when finished to make draw\nfunctions go right to the canvas again and to be able to read the\ncontents of the framebuffer's texture.",
+ "example": [
+ "\n\nlet framebuffer;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n framebuffer = createFramebuffer();\n noStroke();\n}\n\nfunction draw() {\n // Draw to the framebuffer\n framebuffer.begin();\n background(255);\n translate(0, 10*sin(frameCount * 0.01), 0);\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n fill(255, 0, 0);\n box(50);\n framebuffer.end();\n\n background(100);\n // Draw the framebuffer to the main canvas\n image(framebuffer, -50, -50, 25, 25);\n image(framebuffer, 0, 0, 35, 35);\n}\n
\n"
+ ],
+ "alt": "A video of a floating and rotating red cube is pasted twice on the\ncanvas: once in the top left, and again, larger, in the bottom right.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Framebuffer",
+ "static": false,
+ "module": "Rendering"
+ },
+ {
+ "name": "end",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 892,
+ "itemtype": "method",
+ "description": "After having previously called\nbegin(), this method stops drawing\nfunctions from going to the framebuffer's texture, allowing them to go\nright to the canvas again. After this, one can read from the framebuffer's\ntexture.",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Framebuffer",
+ "static": false,
+ "module": "Rendering"
+ },
+ {
+ "name": "draw",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 955,
+ "itemtype": "method",
+ "description": "Run a function while drawing to the framebuffer rather than to its canvas.\nThis is equivalent to calling framebuffer.begin()
, running the function,\nand then calling framebuffer.end()
, but ensures that one never\naccidentally forgets begin
or end
.",
+ "example": [
+ "\n\nlet framebuffer;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n framebuffer = createFramebuffer();\n noStroke();\n}\n\nfunction draw() {\n // Draw to the framebuffer\n framebuffer.draw(function() {\n background(255);\n translate(0, 10*sin(frameCount * 0.01), 0);\n rotateX(frameCount * 0.01);\n rotateY(frameCount * 0.01);\n fill(255, 0, 0);\n box(50);\n });\n\n background(100);\n // Draw the framebuffer to the main canvas\n image(framebuffer, -50, -50, 25, 25);\n image(framebuffer, 0, 0, 35, 35);\n}\n
\n"
+ ],
+ "alt": "A video of a floating and rotating red cube is pasted twice on the\ncanvas: once in the top left, and again, larger, in the bottom right.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "callback",
+ "description": "A function to run that draws to the canvas. The\nfunction will immediately be run, but it will draw to the framebuffer\ninstead of the canvas.",
+ "type": "Function"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Framebuffer",
+ "static": false,
+ "module": "Rendering"
+ },
+ {
+ "name": "loadPixels",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 967,
+ "itemtype": "method",
+ "description": "Call this befpre updating pixels\nand calling updatePixels\nto replace the content of the framebuffer with the data in the pixels\narray.",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Framebuffer",
+ "static": false,
+ "module": "Rendering"
+ },
+ {
+ "name": "get",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 1018,
+ "itemtype": "method",
+ "description": "Get a region of pixels from the canvas in the form of a\np5.Image, or a single pixel as an array of\nnumbers.
\nReturns an array of [R,G,B,A] values for any pixel or grabs a section of\nan image. If the Framebuffer has been set up to not store alpha values, then\nonly [R,G,B] will be returned. If no parameters are specified, the entire\nimage is returned.\nUse the x and y parameters to get the value of one pixel. Get a section of\nthe display window by specifying additional w and h parameters. When\ngetting an image, the x and y parameters define the coordinates for the\nupper-left corner of the image, regardless of the current imageMode().
\n",
+ "example": [],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "x",
+ "description": "x-coordinate of the pixel",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "description": "y-coordinate of the pixel",
+ "type": "Number"
+ },
+ {
+ "name": "w",
+ "description": "width of the section to be returned",
+ "type": "Number"
+ },
+ {
+ "name": "h",
+ "description": "height of the section to be returned",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "the rectangle p5.Image",
+ "type": "p5.Image"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "the whole p5.Image",
+ "type": "p5.Image"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "x",
+ "type": "Number"
+ },
+ {
+ "name": "y",
+ "type": "Number"
+ }
+ ],
+ "return": {
+ "description": "color of pixel at x,y in array format [R, G, B, A]",
+ "type": "Number[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "the rectangle p5.Image",
+ "type": "p5.Image"
+ },
+ "class": "p5.Framebuffer",
+ "static": false,
+ "module": "Rendering"
+ },
+ {
+ "name": "updatePixels",
+ "file": "src/webgl/p5.Framebuffer.js",
+ "line": 1168,
+ "itemtype": "method",
+ "description": "Call this after initially calling \nloadPixels() and updating pixels\nto replace the content of the framebuffer with the data in the pixels\narray.
\nThis will also clear the depth buffer so that any future drawing done\nafterwards will go on top.
\n",
+ "example": [
+ "\n\nlet framebuffer;\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n framebuffer = createFramebuffer();\n}\n\nfunction draw() {\n noStroke();\n lights();\n\n // Draw a sphere to the framebuffer\n framebuffer.begin();\n background(0);\n sphere(25);\n framebuffer.end();\n\n // Load its pixels and draw a gradient over the lower half of the canvas\n framebuffer.loadPixels();\n for (let y = height/2; y < height; y++) {\n for (let x = 0; x < width; x++) {\n const idx = (y * width + x) * 4;\n framebuffer.pixels[idx] = (x / width) * 255;\n framebuffer.pixels[idx + 1] = (y / height) * 255;\n framebuffer.pixels[idx + 2] = 255;\n framebuffer.pixels[idx + 3] = 255;\n }\n }\n framebuffer.updatePixels();\n\n // Draw a cube on top of the pixels we just wrote\n framebuffer.begin();\n push();\n translate(20, 20);\n rotateX(0.5);\n rotateY(0.5);\n box(20);\n pop();\n framebuffer.end();\n\n image(framebuffer, -width/2, -height/2);\n noLoop();\n}\n
\n"
+ ],
+ "alt": "A sphere partly occluded by a gradient from cyan to white to magenta on\nthe lower half of the canvas, with a 3D cube drawn on top of that in the\nlower right corner.",
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Framebuffer",
+ "static": false,
+ "module": "Rendering"
+ },
+ {
+ "name": "clearColors",
+ "file": "src/webgl/p5.Geometry.js",
+ "line": 138,
+ "itemtype": "method",
+ "description": "Removes the internal colors of p5.Geometry.\nUsing clearColors()
, you can use fill()
to supply new colors before drawing each shape.\nIf clearColors()
is not used, the shapes will use their internal colors by ignoring fill()
.",
+ "example": [
+ "\n\nlet shape01;\nlet shape02;\nlet points = [];\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n points.push(new p5.Vector(-1, -1, 0), new p5.Vector(-1, 1, 0),\n new p5.Vector(1, -1, 0), new p5.Vector(-1, -1, 0));\n buildShape01();\n buildShape02();\n}\nfunction draw() {\n background(0);\n fill('pink'); // shape01 retains its internal blue color, so it won't turn pink.\n model(shape01);\n fill('yellow'); // Now, shape02 is yellow.\n model(shape02);\n}\n\nfunction buildShape01() {\n beginGeometry();\n fill('blue'); // shape01's color is blue because its internal colors remain.\n beginShape();\n for (let vec of points) vertex(vec.x * 100, vec.y * 100, vec.z * 100);\n endShape(CLOSE);\n shape01 = endGeometry();\n}\n\nfunction buildShape02() {\n beginGeometry();\n fill('red'); // shape02.clearColors() removes its internal colors. Now, shape02 is red.\n beginShape();\n for (let vec of points) vertex(vec.x * 200, vec.y * 200, vec.z * 200);\n endShape(CLOSE);\n shape02 = endGeometry();\n shape02.clearColors(); // Resets shape02's colors.\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Geometry",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "computeFaces",
+ "file": "src/webgl/p5.Geometry.js",
+ "line": 290,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "computes faces for geometry objects based on the vertices.",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Geometry",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "computeNormals",
+ "file": "src/webgl/p5.Geometry.js",
+ "line": 423,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "This function calculates normals for each face, where each vertex's normal is the average of the normals of all faces it's connected to.\ni.e computes smooth normals per vertex as an average of each face.
\nWhen using FLAT
shading, vertices are disconnected/duplicated i.e each face has its own copy of vertices.\nWhen using SMOOTH
shading, vertices are connected/deduplicated i.e each face has its vertices shared with other faces.
\nOptions can include:
\nroundToPrecision
: Precision value for rounding computations. Defaults to 3.
",
+ "example": [
+ "\n\nlet helix;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n\n helix = buildGeometry(() => {\n beginShape();\n\n for (let i = 0; i < TWO_PI * 3; i += 0.6) {\n let radius = 20;\n let x = cos(i) * radius;\n let y = sin(i) * radius;\n let z = map(i, 0, TWO_PI * 3, -30, 30);\n vertex(x, y, z);\n }\n endShape();\n });\n helix.computeNormals();\n}\nfunction draw() {\n background(255);\n stroke(0);\n fill(150, 200, 250);\n lights();\n rotateX(PI*0.2);\n orbitControl();\n model(helix);\n}\n
\n",
+ "\n\nlet star;\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n\n star = buildGeometry(() => {\n beginShape();\n for (let i = 0; i < TWO_PI; i += PI / 5) {\n let outerRadius = 60;\n let innerRadius = 30;\n let xOuter = cos(i) * outerRadius;\n let yOuter = sin(i) * outerRadius;\n let zOuter = random(-20, 20);\n vertex(xOuter, yOuter, zOuter);\n\n let nextI = i + PI / 5 / 2;\n let xInner = cos(nextI) * innerRadius;\n let yInner = sin(nextI) * innerRadius;\n let zInner = random(-20, 20);\n vertex(xInner, yInner, zInner);\n }\n endShape(CLOSE);\n });\n star.computeNormals(SMOOTH);\n}\nfunction draw() {\n background(255);\n stroke(0);\n fill(150, 200, 250);\n lights();\n rotateX(PI*0.2);\n orbitControl();\n model(star);\n}\n
\n"
+ ],
+ "alt": "A 3D helix using the computeNormals() function by default uses `FLAT` to create a flat shading effect on the helix.\nA star-like geometry, here the computeNormals(SMOOTH) is applied for a smooth shading effect.\nThis helps to avoid the faceted appearance that can occur with flat shading.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "shadingType",
+ "description": "shading type (FLAT
for flat shading or SMOOTH
for smooth shading) for buildGeometry() outputs. Defaults to FLAT
.",
+ "optional": 1,
+ "type": "String"
+ },
+ {
+ "name": "options",
+ "description": "An optional object with configuration.",
+ "optional": 1,
+ "type": "Object"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Geometry",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "averageNormals",
+ "file": "src/webgl/p5.Geometry.js",
+ "line": 503,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Averages the vertex normals. Used in curved\nsurfaces",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Geometry",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "averagePoleNormals",
+ "file": "src/webgl/p5.Geometry.js",
+ "line": 522,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Averages pole normals. Used in spherical primitives",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Geometry",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "normalize",
+ "file": "src/webgl/p5.Geometry.js",
+ "line": 831,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Modifies all vertices to be centered within the range -100 to 100.",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Geometry",
+ "static": false,
+ "module": "Shape",
+ "submodule": "3D Primitives"
+ },
+ {
+ "name": "copyToContext",
+ "file": "src/webgl/p5.Shader.js",
+ "line": 127,
+ "itemtype": "method",
+ "description": "Shaders belong to the main canvas or a p5.Graphics. Once they are compiled,\nthey can only be used in the context they were compiled on.
\nUse this method to make a new copy of a shader that gets compiled on a\ndifferent context.
\n",
+ "example": [
+ "\n\nlet graphic = createGraphics(200, 200, WEBGL);\nlet graphicShader = graphic.createShader(vert, frag);\ngraphic.shader(graphicShader); // Use graphicShader on the graphic\n\nlet mainShader = graphicShader.copyToContext(window);\nshader(mainShader); // Use `mainShader` on the main canvas\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "context",
+ "description": "The graphic or instance to copy this shader to.\nPass window
if you need to copy to the main canvas.",
+ "type": "p5|p5.Graphics"
+ }
+ ],
+ "return": {
+ "description": "A new shader on the target context.",
+ "type": "p5.Shader"
+ }
+ }
+ ],
+ "return": {
+ "description": "A new shader on the target context.",
+ "type": "p5.Shader"
+ },
+ "class": "p5.Shader",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "setUniform",
+ "file": "src/webgl/p5.Shader.js",
+ "line": 438,
+ "itemtype": "method",
+ "chainable": 1,
+ "description": "Used to set the uniforms of a\np5.Shader object.
\nUniforms are used as a way to provide shader programs\n(which run on the GPU) with values from a sketch\n(which runs on the CPU).
\nHere are some examples of uniforms you can make:
\nbooleans
\n- Example:
setUniform('x', true)
becomes uniform float x
with the value 1.0
numbers
\n- Example:
setUniform('x', -2)
becomes uniform float x
with the value -2.0
arrays of numbers
\n- Example:
setUniform('x', [0, 0.5, 1])
becomes uniform vec3 x
with the value vec3(0.0, 0.5, 1.0)
a p5.Image, p5.Graphics, p5.MediaElement, or p5.Texture
\n- Example:
setUniform('x', img)
becomes uniform sampler2D x
",
+ "example": [
+ "\n\n// Click within the image to toggle the value of uniforms\n// Note: for an alternative approach to the same example,\n// involving toggling between shaders please refer to:\n// https://p5js.org/reference/#/p5/shader\n\nlet grad;\nlet showRedGreen = false;\n\nfunction preload() {\n // note that we are using two instances\n // of the same vertex and fragment shaders\n grad = loadShader('assets/shader.vert', 'assets/shader-gradient.frag');\n}\n\nfunction setup() {\n createCanvas(100, 100, WEBGL);\n shader(grad);\n noStroke();\n\n describe(\n 'canvas toggles between a circular gradient of orange and blue vertically. and a circular gradient of red and green moving horizontally when mouse is clicked/pressed.'\n );\n}\n\nfunction draw() {\n // update the offset values for each scenario,\n // moving the \"grad\" shader in either vertical or\n // horizontal direction each with differing colors\n\n if (showRedGreen === true) {\n grad.setUniform('colorCenter', [1, 0, 0]);\n grad.setUniform('colorBackground', [0, 1, 0]);\n grad.setUniform('offset', [sin(millis() / 2000), 1]);\n } else {\n grad.setUniform('colorCenter', [1, 0.5, 0]);\n grad.setUniform('colorBackground', [0.226, 0, 0.615]);\n grad.setUniform('offset', [0, sin(millis() / 2000) + 1]);\n }\n quad(-1, -1, 1, -1, 1, 1, -1, 1);\n}\n\nfunction mouseClicked() {\n showRedGreen = !showRedGreen;\n}\n
\n"
+ ],
+ "alt": "canvas toggles between a circular gradient of orange and blue vertically. and a circular gradient of red and green moving horizontally when mouse is clicked/pressed.",
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "uniformName",
+ "description": "the name of the uniform.\nMust correspond to the name used in the vertex and fragment shaders",
+ "type": "String"
+ },
+ {
+ "name": "data",
+ "description": "The value to assign to the uniform. This can be\na boolean (true/false), a number, an array of numbers, or\nan image (p5.Image, p5.Graphics, p5.MediaElement, p5.Texture)",
+ "type": "Boolean|Number|Number[]|p5.Image|p5.Graphics|p5.MediaElement|p5.Texture"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Shader",
+ "static": false,
+ "module": "3D",
+ "submodule": "Material"
+ },
+ {
+ "name": "remove",
+ "file": "src/core/main.js",
+ "line": 341,
+ "itemtype": "method",
+ "description": "Removes the entire p5 sketch. This will remove the canvas and any\nelements created by p5.js. It will also stop the draw loop and unbind\nany properties or methods from the window global scope. It will\nleave a variable p5 in case you wanted to create a new p5 sketch.\nIf you like, you can set p5 = null to erase it. While all functions and\nvariables and objects created by the p5 library will be removed, any\nother global variables created by your code will remain.",
+ "example": [
+ "\nfunction draw() {\n ellipse(50, 50, 10, 10);\n}\n\nfunction mousePressed() {\n remove(); // remove whole sketch on mouse press\n}\n
",
+ "\nfunction draw() {\n ellipse(50, 50, 10, 10);\n}\n\nfunction mousePressed() {\n remove(); // remove whole sketch on mouse press\n}\n
",
+ "\nfunction draw() {\n ellipse(50, 50, 10, 10);\n}\n\nfunction mousePressed() {\n remove(); // remove whole sketch on mouse press\n}\n
",
+ "\nfunction draw() {\n ellipse(50, 50, 10, 10);\n}\n\nfunction mousePressed() {\n remove(); // remove whole sketch on mouse press\n}\n
",
+ "\nfunction draw() {\n ellipse(50, 50, 10, 10);\n}\n\nfunction mousePressed() {\n remove(); // remove whole sketch on mouse press\n}\n
",
+ "\nfunction draw() {\n ellipse(50, 50, 10, 10);\n}\n\nfunction mousePressed() {\n remove(); // remove whole sketch on mouse press\n}\n
",
+ "\nfunction draw() {\n ellipse(50, 50, 10, 10);\n}\n\nfunction mousePressed() {\n remove(); // remove whole sketch on mouse press\n}\n
",
+ "\nfunction draw() {\n ellipse(50, 50, 10, 10);\n}\n\nfunction mousePressed() {\n remove(); // remove whole sketch on mouse press\n}\n
",
+ "\nfunction draw() {\n ellipse(50, 50, 10, 10);\n}\n\nfunction mousePressed() {\n remove(); // remove whole sketch on mouse press\n}\n
",
+ "\nfunction draw() {\n ellipse(50, 50, 10, 10);\n}\n\nfunction mousePressed() {\n remove(); // remove whole sketch on mouse press\n}\n
",
+ "\nfunction draw() {\n ellipse(50, 50, 10, 10);\n}\n\nfunction mousePressed() {\n remove(); // remove whole sketch on mouse press\n}\n
",
+ "\nfunction draw() {\n ellipse(50, 50, 10, 10);\n}\n\nfunction mousePressed() {\n remove(); // remove whole sketch on mouse press\n}\n
",
+ "\nfunction draw() {\n ellipse(50, 50, 10, 10);\n}\n\nfunction mousePressed() {\n remove(); // remove whole sketch on mouse press\n}\n
"
+ ],
+ "alt": "nothing displayed",
+ "overloads": [
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "Structure",
+ "submodule": "Structure"
+ },
+ {
+ "name": "createSlider",
+ "file": "src/dom/dom.js",
+ "line": 827,
+ "itemtype": "method",
+ "description": "INPUT *",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "createAudio",
+ "file": "src/dom/dom.js",
+ "line": 2080,
+ "itemtype": "method",
+ "description": "AUDIO STUFF *",
+ "example": [],
+ "overloads": [
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ }
+ ],
+ "class": "p5",
+ "static": false,
+ "module": "DOM",
+ "submodule": "DOM"
+ },
+ {
+ "name": "addRow",
+ "file": "src/io/p5.Table.js",
+ "line": 95,
+ "itemtype": "method",
+ "description": "Use addRow() to add a new row of data to a p5.Table object. By default,\nan empty row is created. Typically, you would store a reference to\nthe new row in a TableRow object (see newRow in the example above),\nand then set individual values using set().
\nIf a p5.TableRow object is included as a parameter, then that row is\nduplicated and added to the table.
\n",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row to be added to the table",
+ "optional": 1,
+ "type": "p5.TableRow"
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row to be added to the table",
+ "optional": 1,
+ "type": "p5.TableRow"
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row to be added to the table",
+ "optional": 1,
+ "type": "p5.TableRow"
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row to be added to the table",
+ "optional": 1,
+ "type": "p5.TableRow"
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row to be added to the table",
+ "optional": 1,
+ "type": "p5.TableRow"
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row to be added to the table",
+ "optional": 1,
+ "type": "p5.TableRow"
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row to be added to the table",
+ "optional": 1,
+ "type": "p5.TableRow"
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row to be added to the table",
+ "optional": 1,
+ "type": "p5.TableRow"
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row to be added to the table",
+ "optional": 1,
+ "type": "p5.TableRow"
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row to be added to the table",
+ "optional": 1,
+ "type": "p5.TableRow"
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row to be added to the table",
+ "optional": 1,
+ "type": "p5.TableRow"
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row to be added to the table",
+ "optional": 1,
+ "type": "p5.TableRow"
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row to be added to the table",
+ "optional": 1,
+ "type": "p5.TableRow"
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ }
+ }
+ ],
+ "return": {
+ "description": "the row that was added",
+ "type": "p5.TableRow"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "removeRow",
+ "file": "src/io/p5.Table.js",
+ "line": 146,
+ "itemtype": "method",
+ "description": "Removes a row from the table object.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //remove the first row\n table.removeRow(0);\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //remove the first row\n table.removeRow(0);\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //remove the first row\n table.removeRow(0);\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //remove the first row\n table.removeRow(0);\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //remove the first row\n table.removeRow(0);\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //remove the first row\n table.removeRow(0);\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //remove the first row\n table.removeRow(0);\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //remove the first row\n table.removeRow(0);\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //remove the first row\n table.removeRow(0);\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //remove the first row\n table.removeRow(0);\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //remove the first row\n table.removeRow(0);\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //remove the first row\n table.removeRow(0);\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //remove the first row\n table.removeRow(0);\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID number of the row to remove",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID number of the row to remove",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID number of the row to remove",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID number of the row to remove",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID number of the row to remove",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID number of the row to remove",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID number of the row to remove",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID number of the row to remove",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID number of the row to remove",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID number of the row to remove",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID number of the row to remove",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID number of the row to remove",
+ "type": "Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "id",
+ "description": "ID number of the row to remove",
+ "type": "Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "getRow",
+ "file": "src/io/p5.Table.js",
+ "line": 192,
+ "itemtype": "method",
+ "description": "Returns a reference to the specified p5.TableRow. The reference\ncan then be used to get and set values of the selected row.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let row = table.getRow(1);\n //print it column by column\n //note: a row is an object, not an array\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(row.getString(c));\n }\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let row = table.getRow(1);\n //print it column by column\n //note: a row is an object, not an array\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(row.getString(c));\n }\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let row = table.getRow(1);\n //print it column by column\n //note: a row is an object, not an array\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(row.getString(c));\n }\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let row = table.getRow(1);\n //print it column by column\n //note: a row is an object, not an array\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(row.getString(c));\n }\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let row = table.getRow(1);\n //print it column by column\n //note: a row is an object, not an array\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(row.getString(c));\n }\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let row = table.getRow(1);\n //print it column by column\n //note: a row is an object, not an array\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(row.getString(c));\n }\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let row = table.getRow(1);\n //print it column by column\n //note: a row is an object, not an array\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(row.getString(c));\n }\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let row = table.getRow(1);\n //print it column by column\n //note: a row is an object, not an array\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(row.getString(c));\n }\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let row = table.getRow(1);\n //print it column by column\n //note: a row is an object, not an array\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(row.getString(c));\n }\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let row = table.getRow(1);\n //print it column by column\n //note: a row is an object, not an array\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(row.getString(c));\n }\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let row = table.getRow(1);\n //print it column by column\n //note: a row is an object, not an array\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(row.getString(c));\n }\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let row = table.getRow(1);\n //print it column by column\n //note: a row is an object, not an array\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(row.getString(c));\n }\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let row = table.getRow(1);\n //print it column by column\n //note: a row is an object, not an array\n for (let c = 0; c < table.getColumnCount(); c++) {\n print(row.getString(c));\n }\n\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "rowID",
+ "description": "ID number of the row to get",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "rowID",
+ "description": "ID number of the row to get",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "rowID",
+ "description": "ID number of the row to get",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "rowID",
+ "description": "ID number of the row to get",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "rowID",
+ "description": "ID number of the row to get",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "rowID",
+ "description": "ID number of the row to get",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "rowID",
+ "description": "ID number of the row to get",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "rowID",
+ "description": "ID number of the row to get",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "rowID",
+ "description": "ID number of the row to get",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "rowID",
+ "description": "ID number of the row to get",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "rowID",
+ "description": "ID number of the row to get",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "rowID",
+ "description": "ID number of the row to get",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "rowID",
+ "description": "ID number of the row to get",
+ "type": "Integer"
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ }
+ }
+ ],
+ "return": {
+ "description": "p5.TableRow object",
+ "type": "p5.TableRow"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "getRows",
+ "file": "src/io/p5.Table.js",
+ "line": 238,
+ "itemtype": "method",
+ "description": "Gets all rows from the table. Returns an array of p5.TableRows.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n\n //warning: rows is an array of objects\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n\n //warning: rows is an array of objects\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n\n //warning: rows is an array of objects\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n\n //warning: rows is an array of objects\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n\n //warning: rows is an array of objects\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n\n //warning: rows is an array of objects\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n\n //warning: rows is an array of objects\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n\n //warning: rows is an array of objects\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n\n //warning: rows is an array of objects\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n\n //warning: rows is an array of objects\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n\n //warning: rows is an array of objects\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n\n //warning: rows is an array of objects\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let rows = table.getRows();\n\n //warning: rows is an array of objects\n for (let r = 0; r < rows.length; r++) {\n rows[r].set('name', 'Unicorn');\n }\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "Array of p5.TableRows",
+ "type": "p5.TableRow[]"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "findRow",
+ "file": "src/io/p5.Table.js",
+ "line": 283,
+ "itemtype": "method",
+ "description": "Finds the first row in the Table that contains the value\nprovided, and returns a reference to that row. Even if\nmultiple rows are possible matches, only the first matching\nrow is returned. The column to search may be specified by\neither its ID or title.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //find the animal named zebra\n let row = table.findRow('Zebra', 'name');\n //find the corresponding species\n print(row.getString('species'));\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //find the animal named zebra\n let row = table.findRow('Zebra', 'name');\n //find the corresponding species\n print(row.getString('species'));\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //find the animal named zebra\n let row = table.findRow('Zebra', 'name');\n //find the corresponding species\n print(row.getString('species'));\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //find the animal named zebra\n let row = table.findRow('Zebra', 'name');\n //find the corresponding species\n print(row.getString('species'));\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //find the animal named zebra\n let row = table.findRow('Zebra', 'name');\n //find the corresponding species\n print(row.getString('species'));\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //find the animal named zebra\n let row = table.findRow('Zebra', 'name');\n //find the corresponding species\n print(row.getString('species'));\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //find the animal named zebra\n let row = table.findRow('Zebra', 'name');\n //find the corresponding species\n print(row.getString('species'));\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //find the animal named zebra\n let row = table.findRow('Zebra', 'name');\n //find the corresponding species\n print(row.getString('species'));\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //find the animal named zebra\n let row = table.findRow('Zebra', 'name');\n //find the corresponding species\n print(row.getString('species'));\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //find the animal named zebra\n let row = table.findRow('Zebra', 'name');\n //find the corresponding species\n print(row.getString('species'));\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //find the animal named zebra\n let row = table.findRow('Zebra', 'name');\n //find the corresponding species\n print(row.getString('species'));\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //find the animal named zebra\n let row = table.findRow('Zebra', 'name');\n //find the corresponding species\n print(row.getString('species'));\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //find the animal named zebra\n let row = table.findRow('Zebra', 'name');\n //find the corresponding species\n print(row.getString('species'));\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "p5.TableRow"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "findRows",
+ "file": "src/io/p5.Table.js",
+ "line": 349,
+ "itemtype": "method",
+ "description": "Finds the rows in the Table that contain the value\nprovided, and returns references to those rows. Returns an\nArray, so for must be used to iterate through all the rows,\nas shown in the example above. The column to search may be\nspecified by either its ID or title.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add another goat\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Scape Goat');\n newRow.setString('name', 'Goat');\n\n //find the rows containing animals named Goat\n let rows = table.findRows('Goat', 'name');\n print(rows.length + ' Goats found');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add another goat\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Scape Goat');\n newRow.setString('name', 'Goat');\n\n //find the rows containing animals named Goat\n let rows = table.findRows('Goat', 'name');\n print(rows.length + ' Goats found');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add another goat\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Scape Goat');\n newRow.setString('name', 'Goat');\n\n //find the rows containing animals named Goat\n let rows = table.findRows('Goat', 'name');\n print(rows.length + ' Goats found');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add another goat\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Scape Goat');\n newRow.setString('name', 'Goat');\n\n //find the rows containing animals named Goat\n let rows = table.findRows('Goat', 'name');\n print(rows.length + ' Goats found');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add another goat\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Scape Goat');\n newRow.setString('name', 'Goat');\n\n //find the rows containing animals named Goat\n let rows = table.findRows('Goat', 'name');\n print(rows.length + ' Goats found');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add another goat\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Scape Goat');\n newRow.setString('name', 'Goat');\n\n //find the rows containing animals named Goat\n let rows = table.findRows('Goat', 'name');\n print(rows.length + ' Goats found');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add another goat\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Scape Goat');\n newRow.setString('name', 'Goat');\n\n //find the rows containing animals named Goat\n let rows = table.findRows('Goat', 'name');\n print(rows.length + ' Goats found');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add another goat\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Scape Goat');\n newRow.setString('name', 'Goat');\n\n //find the rows containing animals named Goat\n let rows = table.findRows('Goat', 'name');\n print(rows.length + ' Goats found');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add another goat\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Scape Goat');\n newRow.setString('name', 'Goat');\n\n //find the rows containing animals named Goat\n let rows = table.findRows('Goat', 'name');\n print(rows.length + ' Goats found');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add another goat\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Scape Goat');\n newRow.setString('name', 'Goat');\n\n //find the rows containing animals named Goat\n let rows = table.findRows('Goat', 'name');\n print(rows.length + ' Goats found');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add another goat\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Scape Goat');\n newRow.setString('name', 'Goat');\n\n //find the rows containing animals named Goat\n let rows = table.findRows('Goat', 'name');\n print(rows.length + ' Goats found');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add another goat\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Scape Goat');\n newRow.setString('name', 'Goat');\n\n //find the rows containing animals named Goat\n let rows = table.findRows('Goat', 'name');\n print(rows.length + ' Goats found');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add another goat\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Scape Goat');\n newRow.setString('name', 'Goat');\n\n //find the rows containing animals named Goat\n let rows = table.findRows('Goat', 'name');\n print(rows.length + ' Goats found');\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "value",
+ "description": "The value to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "ID number or title of the\ncolumn to search",
+ "type": "Integer|String"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "matchRow",
+ "file": "src/io/p5.Table.js",
+ "line": 408,
+ "itemtype": "method",
+ "description": "Finds the first row in the Table that matches the regular\nexpression provided, and returns a reference to that row.\nEven if multiple rows are possible matches, only the first\nmatching row is returned. The column to search may be\nspecified by either its ID or title.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //Search using specified regex on a given column, return TableRow object\n let mammal = table.matchRow(new RegExp('ant'), 1);\n print(mammal.getString(1));\n //Output \"Panthera pardus\"\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //Search using specified regex on a given column, return TableRow object\n let mammal = table.matchRow(new RegExp('ant'), 1);\n print(mammal.getString(1));\n //Output \"Panthera pardus\"\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //Search using specified regex on a given column, return TableRow object\n let mammal = table.matchRow(new RegExp('ant'), 1);\n print(mammal.getString(1));\n //Output \"Panthera pardus\"\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //Search using specified regex on a given column, return TableRow object\n let mammal = table.matchRow(new RegExp('ant'), 1);\n print(mammal.getString(1));\n //Output \"Panthera pardus\"\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //Search using specified regex on a given column, return TableRow object\n let mammal = table.matchRow(new RegExp('ant'), 1);\n print(mammal.getString(1));\n //Output \"Panthera pardus\"\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //Search using specified regex on a given column, return TableRow object\n let mammal = table.matchRow(new RegExp('ant'), 1);\n print(mammal.getString(1));\n //Output \"Panthera pardus\"\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //Search using specified regex on a given column, return TableRow object\n let mammal = table.matchRow(new RegExp('ant'), 1);\n print(mammal.getString(1));\n //Output \"Panthera pardus\"\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //Search using specified regex on a given column, return TableRow object\n let mammal = table.matchRow(new RegExp('ant'), 1);\n print(mammal.getString(1));\n //Output \"Panthera pardus\"\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //Search using specified regex on a given column, return TableRow object\n let mammal = table.matchRow(new RegExp('ant'), 1);\n print(mammal.getString(1));\n //Output \"Panthera pardus\"\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //Search using specified regex on a given column, return TableRow object\n let mammal = table.matchRow(new RegExp('ant'), 1);\n print(mammal.getString(1));\n //Output \"Panthera pardus\"\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //Search using specified regex on a given column, return TableRow object\n let mammal = table.matchRow(new RegExp('ant'), 1);\n print(mammal.getString(1));\n //Output \"Panthera pardus\"\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //Search using specified regex on a given column, return TableRow object\n let mammal = table.matchRow(new RegExp('ant'), 1);\n print(mammal.getString(1));\n //Output \"Panthera pardus\"\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //Search using specified regex on a given column, return TableRow object\n let mammal = table.matchRow(new RegExp('ant'), 1);\n print(mammal.getString(1));\n //Output \"Panthera pardus\"\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String|RegExp"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String|RegExp"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String|RegExp"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String|RegExp"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String|RegExp"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String|RegExp"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String|RegExp"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String|RegExp"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String|RegExp"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String|RegExp"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String|RegExp"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String|RegExp"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String|RegExp"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ }
+ }
+ ],
+ "return": {
+ "description": "TableRow object",
+ "type": "p5.TableRow"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "matchRows",
+ "file": "src/io/p5.Table.js",
+ "line": 473,
+ "itemtype": "method",
+ "description": "Finds the rows in the Table that match the regular expression provided,\nand returns references to those rows. Returns an array, so for must be\nused to iterate through all the rows, as shown in the example. The\ncolumn to search may be specified by either its ID or title.",
+ "example": [
+ "\n\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', 'Lion');\n newRow.setString('type', 'Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', 'Snake');\n newRow.setString('type', 'Reptile');\n\n newRow = table.addRow();\n newRow.setString('name', 'Mosquito');\n newRow.setString('type', 'Insect');\n\n newRow = table.addRow();\n newRow.setString('name', 'Lizard');\n newRow.setString('type', 'Reptile');\n\n let rows = table.matchRows('R.*', 'type');\n for (let i = 0; i < rows.length; i++) {\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n }\n}\n// Sketch prints:\n// Snake: Reptile\n// Lizard: Reptile\n
\n",
+ "\n\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', 'Lion');\n newRow.setString('type', 'Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', 'Snake');\n newRow.setString('type', 'Reptile');\n\n newRow = table.addRow();\n newRow.setString('name', 'Mosquito');\n newRow.setString('type', 'Insect');\n\n newRow = table.addRow();\n newRow.setString('name', 'Lizard');\n newRow.setString('type', 'Reptile');\n\n let rows = table.matchRows('R.*', 'type');\n for (let i = 0; i < rows.length; i++) {\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n }\n}\n// Sketch prints:\n// Snake: Reptile\n// Lizard: Reptile\n
\n",
+ "\n\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', 'Lion');\n newRow.setString('type', 'Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', 'Snake');\n newRow.setString('type', 'Reptile');\n\n newRow = table.addRow();\n newRow.setString('name', 'Mosquito');\n newRow.setString('type', 'Insect');\n\n newRow = table.addRow();\n newRow.setString('name', 'Lizard');\n newRow.setString('type', 'Reptile');\n\n let rows = table.matchRows('R.*', 'type');\n for (let i = 0; i < rows.length; i++) {\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n }\n}\n// Sketch prints:\n// Snake: Reptile\n// Lizard: Reptile\n
\n",
+ "\n\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', 'Lion');\n newRow.setString('type', 'Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', 'Snake');\n newRow.setString('type', 'Reptile');\n\n newRow = table.addRow();\n newRow.setString('name', 'Mosquito');\n newRow.setString('type', 'Insect');\n\n newRow = table.addRow();\n newRow.setString('name', 'Lizard');\n newRow.setString('type', 'Reptile');\n\n let rows = table.matchRows('R.*', 'type');\n for (let i = 0; i < rows.length; i++) {\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n }\n}\n// Sketch prints:\n// Snake: Reptile\n// Lizard: Reptile\n
\n",
+ "\n\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', 'Lion');\n newRow.setString('type', 'Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', 'Snake');\n newRow.setString('type', 'Reptile');\n\n newRow = table.addRow();\n newRow.setString('name', 'Mosquito');\n newRow.setString('type', 'Insect');\n\n newRow = table.addRow();\n newRow.setString('name', 'Lizard');\n newRow.setString('type', 'Reptile');\n\n let rows = table.matchRows('R.*', 'type');\n for (let i = 0; i < rows.length; i++) {\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n }\n}\n// Sketch prints:\n// Snake: Reptile\n// Lizard: Reptile\n
\n",
+ "\n\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', 'Lion');\n newRow.setString('type', 'Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', 'Snake');\n newRow.setString('type', 'Reptile');\n\n newRow = table.addRow();\n newRow.setString('name', 'Mosquito');\n newRow.setString('type', 'Insect');\n\n newRow = table.addRow();\n newRow.setString('name', 'Lizard');\n newRow.setString('type', 'Reptile');\n\n let rows = table.matchRows('R.*', 'type');\n for (let i = 0; i < rows.length; i++) {\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n }\n}\n// Sketch prints:\n// Snake: Reptile\n// Lizard: Reptile\n
\n",
+ "\n\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', 'Lion');\n newRow.setString('type', 'Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', 'Snake');\n newRow.setString('type', 'Reptile');\n\n newRow = table.addRow();\n newRow.setString('name', 'Mosquito');\n newRow.setString('type', 'Insect');\n\n newRow = table.addRow();\n newRow.setString('name', 'Lizard');\n newRow.setString('type', 'Reptile');\n\n let rows = table.matchRows('R.*', 'type');\n for (let i = 0; i < rows.length; i++) {\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n }\n}\n// Sketch prints:\n// Snake: Reptile\n// Lizard: Reptile\n
\n",
+ "\n\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', 'Lion');\n newRow.setString('type', 'Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', 'Snake');\n newRow.setString('type', 'Reptile');\n\n newRow = table.addRow();\n newRow.setString('name', 'Mosquito');\n newRow.setString('type', 'Insect');\n\n newRow = table.addRow();\n newRow.setString('name', 'Lizard');\n newRow.setString('type', 'Reptile');\n\n let rows = table.matchRows('R.*', 'type');\n for (let i = 0; i < rows.length; i++) {\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n }\n}\n// Sketch prints:\n// Snake: Reptile\n// Lizard: Reptile\n
\n",
+ "\n\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', 'Lion');\n newRow.setString('type', 'Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', 'Snake');\n newRow.setString('type', 'Reptile');\n\n newRow = table.addRow();\n newRow.setString('name', 'Mosquito');\n newRow.setString('type', 'Insect');\n\n newRow = table.addRow();\n newRow.setString('name', 'Lizard');\n newRow.setString('type', 'Reptile');\n\n let rows = table.matchRows('R.*', 'type');\n for (let i = 0; i < rows.length; i++) {\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n }\n}\n// Sketch prints:\n// Snake: Reptile\n// Lizard: Reptile\n
\n",
+ "\n\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', 'Lion');\n newRow.setString('type', 'Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', 'Snake');\n newRow.setString('type', 'Reptile');\n\n newRow = table.addRow();\n newRow.setString('name', 'Mosquito');\n newRow.setString('type', 'Insect');\n\n newRow = table.addRow();\n newRow.setString('name', 'Lizard');\n newRow.setString('type', 'Reptile');\n\n let rows = table.matchRows('R.*', 'type');\n for (let i = 0; i < rows.length; i++) {\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n }\n}\n// Sketch prints:\n// Snake: Reptile\n// Lizard: Reptile\n
\n",
+ "\n\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', 'Lion');\n newRow.setString('type', 'Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', 'Snake');\n newRow.setString('type', 'Reptile');\n\n newRow = table.addRow();\n newRow.setString('name', 'Mosquito');\n newRow.setString('type', 'Insect');\n\n newRow = table.addRow();\n newRow.setString('name', 'Lizard');\n newRow.setString('type', 'Reptile');\n\n let rows = table.matchRows('R.*', 'type');\n for (let i = 0; i < rows.length; i++) {\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n }\n}\n// Sketch prints:\n// Snake: Reptile\n// Lizard: Reptile\n
\n",
+ "\n\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', 'Lion');\n newRow.setString('type', 'Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', 'Snake');\n newRow.setString('type', 'Reptile');\n\n newRow = table.addRow();\n newRow.setString('name', 'Mosquito');\n newRow.setString('type', 'Insect');\n\n newRow = table.addRow();\n newRow.setString('name', 'Lizard');\n newRow.setString('type', 'Reptile');\n\n let rows = table.matchRows('R.*', 'type');\n for (let i = 0; i < rows.length; i++) {\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n }\n}\n// Sketch prints:\n// Snake: Reptile\n// Lizard: Reptile\n
\n",
+ "\n\nlet table;\n\nfunction setup() {\n table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', 'Lion');\n newRow.setString('type', 'Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', 'Snake');\n newRow.setString('type', 'Reptile');\n\n newRow = table.addRow();\n newRow.setString('name', 'Mosquito');\n newRow.setString('type', 'Insect');\n\n newRow = table.addRow();\n newRow.setString('name', 'Lizard');\n newRow.setString('type', 'Reptile');\n\n let rows = table.matchRows('R.*', 'type');\n for (let i = 0; i < rows.length; i++) {\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n }\n}\n// Sketch prints:\n// Snake: Reptile\n// Lizard: Reptile\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "regexp",
+ "description": "The regular expression to match",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "The column ID (number) or\ntitle (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ }
+ }
+ ],
+ "return": {
+ "description": "An Array of TableRow objects",
+ "type": "p5.TableRow[]"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "getColumn",
+ "file": "src/io/p5.Table.js",
+ "line": 526,
+ "itemtype": "method",
+ "description": "Retrieves all values in the specified column, and returns them\nas an array. The column may be specified by either its ID or title.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //getColumn returns an array that can be printed directly\n print(table.getColumn('species'));\n //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //getColumn returns an array that can be printed directly\n print(table.getColumn('species'));\n //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //getColumn returns an array that can be printed directly\n print(table.getColumn('species'));\n //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //getColumn returns an array that can be printed directly\n print(table.getColumn('species'));\n //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //getColumn returns an array that can be printed directly\n print(table.getColumn('species'));\n //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //getColumn returns an array that can be printed directly\n print(table.getColumn('species'));\n //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //getColumn returns an array that can be printed directly\n print(table.getColumn('species'));\n //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //getColumn returns an array that can be printed directly\n print(table.getColumn('species'));\n //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //getColumn returns an array that can be printed directly\n print(table.getColumn('species'));\n //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //getColumn returns an array that can be printed directly\n print(table.getColumn('species'));\n //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //getColumn returns an array that can be printed directly\n print(table.getColumn('species'));\n //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //getColumn returns an array that can be printed directly\n print(table.getColumn('species'));\n //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //getColumn returns an array that can be printed directly\n print(table.getColumn('species'));\n //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "String or Number of the column to return",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "String or Number of the column to return",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "String or Number of the column to return",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "String or Number of the column to return",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "String or Number of the column to return",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "String or Number of the column to return",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "String or Number of the column to return",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "String or Number of the column to return",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "String or Number of the column to return",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "String or Number of the column to return",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "String or Number of the column to return",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "String or Number of the column to return",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "String or Number of the column to return",
+ "type": "String|Number"
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ }
+ }
+ ],
+ "return": {
+ "description": "Array of column values",
+ "type": "Array"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "clearRows",
+ "file": "src/io/p5.Table.js",
+ "line": 572,
+ "itemtype": "method",
+ "description": "Removes all rows from a Table. While all rows are removed,\ncolumns and column titles are maintained.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.clearRows();\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.clearRows();\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.clearRows();\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.clearRows();\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.clearRows();\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.clearRows();\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.clearRows();\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.clearRows();\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.clearRows();\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.clearRows();\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.clearRows();\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.clearRows();\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.clearRows();\n print(table.getRowCount() + ' total rows in table');\n print(table.getColumnCount() + ' total columns in table');\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ },
+ {
+ "params": []
+ }
+ ],
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "addColumn",
+ "file": "src/io/p5.Table.js",
+ "line": 620,
+ "itemtype": "method",
+ "description": "Use addColumn() to add a new column to a Table object.\nTypically, you will want to specify a title, so the column\nmay be easily referenced later by name. (If no title is\nspecified, the new column's title will be null.)",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.addColumn('carnivore');\n table.set(0, 'carnivore', 'no');\n table.set(1, 'carnivore', 'yes');\n table.set(2, 'carnivore', 'no');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.addColumn('carnivore');\n table.set(0, 'carnivore', 'no');\n table.set(1, 'carnivore', 'yes');\n table.set(2, 'carnivore', 'no');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.addColumn('carnivore');\n table.set(0, 'carnivore', 'no');\n table.set(1, 'carnivore', 'yes');\n table.set(2, 'carnivore', 'no');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.addColumn('carnivore');\n table.set(0, 'carnivore', 'no');\n table.set(1, 'carnivore', 'yes');\n table.set(2, 'carnivore', 'no');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.addColumn('carnivore');\n table.set(0, 'carnivore', 'no');\n table.set(1, 'carnivore', 'yes');\n table.set(2, 'carnivore', 'no');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.addColumn('carnivore');\n table.set(0, 'carnivore', 'no');\n table.set(1, 'carnivore', 'yes');\n table.set(2, 'carnivore', 'no');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.addColumn('carnivore');\n table.set(0, 'carnivore', 'no');\n table.set(1, 'carnivore', 'yes');\n table.set(2, 'carnivore', 'no');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.addColumn('carnivore');\n table.set(0, 'carnivore', 'no');\n table.set(1, 'carnivore', 'yes');\n table.set(2, 'carnivore', 'no');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.addColumn('carnivore');\n table.set(0, 'carnivore', 'no');\n table.set(1, 'carnivore', 'yes');\n table.set(2, 'carnivore', 'no');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.addColumn('carnivore');\n table.set(0, 'carnivore', 'no');\n table.set(1, 'carnivore', 'yes');\n table.set(2, 'carnivore', 'no');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.addColumn('carnivore');\n table.set(0, 'carnivore', 'no');\n table.set(1, 'carnivore', 'yes');\n table.set(2, 'carnivore', 'no');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.addColumn('carnivore');\n table.set(0, 'carnivore', 'no');\n table.set(1, 'carnivore', 'yes');\n table.set(2, 'carnivore', 'no');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.addColumn('carnivore');\n table.set(0, 'carnivore', 'no');\n table.set(1, 'carnivore', 'yes');\n table.set(2, 'carnivore', 'no');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "title",
+ "description": "title of the given column",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "title",
+ "description": "title of the given column",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "title",
+ "description": "title of the given column",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "title",
+ "description": "title of the given column",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "title",
+ "description": "title of the given column",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "title",
+ "description": "title of the given column",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "title",
+ "description": "title of the given column",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "title",
+ "description": "title of the given column",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "title",
+ "description": "title of the given column",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "title",
+ "description": "title of the given column",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "title",
+ "description": "title of the given column",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "title",
+ "description": "title of the given column",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "title",
+ "description": "title of the given column",
+ "optional": 1,
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "getColumnCount",
+ "file": "src/io/p5.Table.js",
+ "line": 656,
+ "itemtype": "method",
+ "description": "Returns the total number of columns in a Table.",
+ "example": [
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n let numOfColumn = table.getColumnCount();\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n let numOfColumn = table.getColumnCount();\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n let numOfColumn = table.getColumnCount();\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n let numOfColumn = table.getColumnCount();\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n let numOfColumn = table.getColumnCount();\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n let numOfColumn = table.getColumnCount();\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n let numOfColumn = table.getColumnCount();\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n let numOfColumn = table.getColumnCount();\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n let numOfColumn = table.getColumnCount();\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n let numOfColumn = table.getColumnCount();\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n let numOfColumn = table.getColumnCount();\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n let numOfColumn = table.getColumnCount();\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n let numOfColumn = table.getColumnCount();\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ }
+ }
+ ],
+ "return": {
+ "description": "Number of columns in this table",
+ "type": "Integer"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "getRowCount",
+ "file": "src/io/p5.Table.js",
+ "line": 691,
+ "itemtype": "method",
+ "description": "Returns the total number of rows in a Table.",
+ "example": [
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}\n
\n",
+ "\n\n// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nfunction preload() {\n table = loadTable('assets/blobs.csv');\n}\n\nfunction setup() {\n createCanvas(200, 100);\n textAlign(CENTER);\n background(255);\n}\n\nfunction draw() {\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ }
+ }
+ ],
+ "return": {
+ "description": "Number of rows in this table",
+ "type": "Integer"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "removeTokens",
+ "file": "src/io/p5.Table.js",
+ "line": 731,
+ "itemtype": "method",
+ "description": "Removes any of the specified characters (or \"tokens\").
\nIf no column is specified, then the values in all columns and\nrows are processed. A specific column may be referenced by\neither its ID or title.
\n",
+ "example": [
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' $Lion ,');\n newRow.setString('type', ',,,Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', '$Snake ');\n newRow.setString('type', ',,,Reptile');\n\n table.removeTokens(',$ ');\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' $Lion ,');\n newRow.setString('type', ',,,Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', '$Snake ');\n newRow.setString('type', ',,,Reptile');\n\n table.removeTokens(',$ ');\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' $Lion ,');\n newRow.setString('type', ',,,Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', '$Snake ');\n newRow.setString('type', ',,,Reptile');\n\n table.removeTokens(',$ ');\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' $Lion ,');\n newRow.setString('type', ',,,Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', '$Snake ');\n newRow.setString('type', ',,,Reptile');\n\n table.removeTokens(',$ ');\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' $Lion ,');\n newRow.setString('type', ',,,Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', '$Snake ');\n newRow.setString('type', ',,,Reptile');\n\n table.removeTokens(',$ ');\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' $Lion ,');\n newRow.setString('type', ',,,Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', '$Snake ');\n newRow.setString('type', ',,,Reptile');\n\n table.removeTokens(',$ ');\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' $Lion ,');\n newRow.setString('type', ',,,Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', '$Snake ');\n newRow.setString('type', ',,,Reptile');\n\n table.removeTokens(',$ ');\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' $Lion ,');\n newRow.setString('type', ',,,Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', '$Snake ');\n newRow.setString('type', ',,,Reptile');\n\n table.removeTokens(',$ ');\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' $Lion ,');\n newRow.setString('type', ',,,Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', '$Snake ');\n newRow.setString('type', ',,,Reptile');\n\n table.removeTokens(',$ ');\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' $Lion ,');\n newRow.setString('type', ',,,Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', '$Snake ');\n newRow.setString('type', ',,,Reptile');\n\n table.removeTokens(',$ ');\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' $Lion ,');\n newRow.setString('type', ',,,Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', '$Snake ');\n newRow.setString('type', ',,,Reptile');\n\n table.removeTokens(',$ ');\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' $Lion ,');\n newRow.setString('type', ',,,Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', '$Snake ');\n newRow.setString('type', ',,,Reptile');\n\n table.removeTokens(',$ ');\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' $Lion ,');\n newRow.setString('type', ',,,Mammal');\n\n newRow = table.addRow();\n newRow.setString('name', '$Snake ');\n newRow.setString('type', ',,,Reptile');\n\n table.removeTokens(',$ ');\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "chars",
+ "description": "String listing characters to be removed",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "chars",
+ "description": "String listing characters to be removed",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "chars",
+ "description": "String listing characters to be removed",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "chars",
+ "description": "String listing characters to be removed",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "chars",
+ "description": "String listing characters to be removed",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "chars",
+ "description": "String listing characters to be removed",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "chars",
+ "description": "String listing characters to be removed",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "chars",
+ "description": "String listing characters to be removed",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "chars",
+ "description": "String listing characters to be removed",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "chars",
+ "description": "String listing characters to be removed",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "chars",
+ "description": "String listing characters to be removed",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "chars",
+ "description": "String listing characters to be removed",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "chars",
+ "description": "String listing characters to be removed",
+ "type": "String"
+ },
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "trim",
+ "file": "src/io/p5.Table.js",
+ "line": 799,
+ "itemtype": "method",
+ "description": "Trims leading and trailing whitespace, such as spaces and tabs,\nfrom String table values. If no column is specified, then the\nvalues in all columns and rows are trimmed. A specific column\nmay be referenced by either its ID or title.",
+ "example": [
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' Lion ,');\n newRow.setString('type', ' Mammal ');\n\n newRow = table.addRow();\n newRow.setString('name', ' Snake ');\n newRow.setString('type', ' Reptile ');\n\n table.trim();\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' Lion ,');\n newRow.setString('type', ' Mammal ');\n\n newRow = table.addRow();\n newRow.setString('name', ' Snake ');\n newRow.setString('type', ' Reptile ');\n\n table.trim();\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' Lion ,');\n newRow.setString('type', ' Mammal ');\n\n newRow = table.addRow();\n newRow.setString('name', ' Snake ');\n newRow.setString('type', ' Reptile ');\n\n table.trim();\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' Lion ,');\n newRow.setString('type', ' Mammal ');\n\n newRow = table.addRow();\n newRow.setString('name', ' Snake ');\n newRow.setString('type', ' Reptile ');\n\n table.trim();\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' Lion ,');\n newRow.setString('type', ' Mammal ');\n\n newRow = table.addRow();\n newRow.setString('name', ' Snake ');\n newRow.setString('type', ' Reptile ');\n\n table.trim();\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' Lion ,');\n newRow.setString('type', ' Mammal ');\n\n newRow = table.addRow();\n newRow.setString('name', ' Snake ');\n newRow.setString('type', ' Reptile ');\n\n table.trim();\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' Lion ,');\n newRow.setString('type', ' Mammal ');\n\n newRow = table.addRow();\n newRow.setString('name', ' Snake ');\n newRow.setString('type', ' Reptile ');\n\n table.trim();\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' Lion ,');\n newRow.setString('type', ' Mammal ');\n\n newRow = table.addRow();\n newRow.setString('name', ' Snake ');\n newRow.setString('type', ' Reptile ');\n\n table.trim();\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' Lion ,');\n newRow.setString('type', ' Mammal ');\n\n newRow = table.addRow();\n newRow.setString('name', ' Snake ');\n newRow.setString('type', ' Reptile ');\n\n table.trim();\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' Lion ,');\n newRow.setString('type', ' Mammal ');\n\n newRow = table.addRow();\n newRow.setString('name', ' Snake ');\n newRow.setString('type', ' Reptile ');\n\n table.trim();\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' Lion ,');\n newRow.setString('type', ' Mammal ');\n\n newRow = table.addRow();\n newRow.setString('name', ' Snake ');\n newRow.setString('type', ' Reptile ');\n\n table.trim();\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' Lion ,');\n newRow.setString('type', ' Mammal ');\n\n newRow = table.addRow();\n newRow.setString('name', ' Snake ');\n newRow.setString('type', ' Reptile ');\n\n table.trim();\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
",
+ "\nfunction setup() {\n let table = new p5.Table();\n\n table.addColumn('name');\n table.addColumn('type');\n\n let newRow = table.addRow();\n newRow.setString('name', ' Lion ,');\n newRow.setString('type', ' Mammal ');\n\n newRow = table.addRow();\n newRow.setString('name', ' Snake ');\n newRow.setString('type', ' Reptile ');\n\n table.trim();\n print(table.getArray());\n}\n\n// prints:\n// 0 \"Lion\" \"Mamal\"\n// 1 \"Snake\" \"Reptile\"\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "Column ID (number)\nor name (string)",
+ "optional": 1,
+ "type": "String|Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "removeColumn",
+ "file": "src/io/p5.Table.js",
+ "line": 865,
+ "itemtype": "method",
+ "description": "Use removeColumn() to remove an existing column from a Table\nobject. The column to be removed may be identified by either\nits title (a String) or its index value (an int).\nremoveColumn(0) would remove the first column, removeColumn(1)\nwould remove the second column, and so on.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.removeColumn('id');\n print(table.getColumnCount());\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.removeColumn('id');\n print(table.getColumnCount());\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.removeColumn('id');\n print(table.getColumnCount());\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.removeColumn('id');\n print(table.getColumnCount());\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.removeColumn('id');\n print(table.getColumnCount());\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.removeColumn('id');\n print(table.getColumnCount());\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.removeColumn('id');\n print(table.getColumnCount());\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.removeColumn('id');\n print(table.getColumnCount());\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.removeColumn('id');\n print(table.getColumnCount());\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.removeColumn('id');\n print(table.getColumnCount());\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.removeColumn('id');\n print(table.getColumnCount());\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.removeColumn('id');\n print(table.getColumnCount());\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.removeColumn('id');\n print(table.getColumnCount());\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or ID (number)",
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or ID (number)",
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or ID (number)",
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or ID (number)",
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or ID (number)",
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or ID (number)",
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or ID (number)",
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or ID (number)",
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or ID (number)",
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or ID (number)",
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or ID (number)",
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or ID (number)",
+ "type": "String|Integer"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "column",
+ "description": "columnName (string) or ID (number)",
+ "type": "String|Integer"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "set",
+ "file": "src/io/p5.Table.js",
+ "line": 933,
+ "itemtype": "method",
+ "description": "Stores a value in the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified\nby either its ID or title.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.set(0, 'species', 'Canis Lupus');\n table.set(0, 'name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.set(0, 'species', 'Canis Lupus');\n table.set(0, 'name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.set(0, 'species', 'Canis Lupus');\n table.set(0, 'name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.set(0, 'species', 'Canis Lupus');\n table.set(0, 'name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.set(0, 'species', 'Canis Lupus');\n table.set(0, 'name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.set(0, 'species', 'Canis Lupus');\n table.set(0, 'name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.set(0, 'species', 'Canis Lupus');\n table.set(0, 'name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.set(0, 'species', 'Canis Lupus');\n table.set(0, 'name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.set(0, 'species', 'Canis Lupus');\n table.set(0, 'name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.set(0, 'species', 'Canis Lupus');\n table.set(0, 'name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.set(0, 'species', 'Canis Lupus');\n table.set(0, 'name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.set(0, 'species', 'Canis Lupus');\n table.set(0, 'name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.set(0, 'species', 'Canis Lupus');\n table.set(0, 'name', 'Wolf');\n\n //print the results\n for (let r = 0; r < table.getRowCount(); r++)\n for (let c = 0; c < table.getColumnCount(); c++)\n print(table.getString(r, c));\n\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String|Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String|Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String|Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String|Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String|Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String|Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String|Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String|Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String|Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String|Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String|Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String|Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String|Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "setNum",
+ "file": "src/io/p5.Table.js",
+ "line": 977,
+ "itemtype": "method",
+ "description": "Stores a Float value in the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified\nby either its ID or title.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.setNum(1, 'id', 1);\n\n print(table.getColumn(0));\n //[\"0\", 1, \"2\"]\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.setNum(1, 'id', 1);\n\n print(table.getColumn(0));\n //[\"0\", 1, \"2\"]\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.setNum(1, 'id', 1);\n\n print(table.getColumn(0));\n //[\"0\", 1, \"2\"]\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.setNum(1, 'id', 1);\n\n print(table.getColumn(0));\n //[\"0\", 1, \"2\"]\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.setNum(1, 'id', 1);\n\n print(table.getColumn(0));\n //[\"0\", 1, \"2\"]\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.setNum(1, 'id', 1);\n\n print(table.getColumn(0));\n //[\"0\", 1, \"2\"]\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.setNum(1, 'id', 1);\n\n print(table.getColumn(0));\n //[\"0\", 1, \"2\"]\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.setNum(1, 'id', 1);\n\n print(table.getColumn(0));\n //[\"0\", 1, \"2\"]\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.setNum(1, 'id', 1);\n\n print(table.getColumn(0));\n //[\"0\", 1, \"2\"]\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.setNum(1, 'id', 1);\n\n print(table.getColumn(0));\n //[\"0\", 1, \"2\"]\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.setNum(1, 'id', 1);\n\n print(table.getColumn(0));\n //[\"0\", 1, \"2\"]\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.setNum(1, 'id', 1);\n\n print(table.getColumn(0));\n //[\"0\", 1, \"2\"]\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n table.setNum(1, 'id', 1);\n\n print(table.getColumn(0));\n //[\"0\", 1, \"2\"]\n\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "Number"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "Number"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "setString",
+ "file": "src/io/p5.Table.js",
+ "line": 1020,
+ "itemtype": "method",
+ "description": "Stores a String value in the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified\nby either its ID or title.",
+ "example": [
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n print(table.getArray());\n\n describe('no image displayed');\n}\n
",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n print(table.getArray());\n\n describe('no image displayed');\n}\n
",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n print(table.getArray());\n\n describe('no image displayed');\n}\n
",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n print(table.getArray());\n\n describe('no image displayed');\n}\n
",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n print(table.getArray());\n\n describe('no image displayed');\n}\n
",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n print(table.getArray());\n\n describe('no image displayed');\n}\n
",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n print(table.getArray());\n\n describe('no image displayed');\n}\n
",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n print(table.getArray());\n\n describe('no image displayed');\n}\n
",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n print(table.getArray());\n\n describe('no image displayed');\n}\n
",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n print(table.getArray());\n\n describe('no image displayed');\n}\n
",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n print(table.getArray());\n\n describe('no image displayed');\n}\n
",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n print(table.getArray());\n\n describe('no image displayed');\n}\n
",
+ "\n// Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n //add a row\n let newRow = table.addRow();\n newRow.setString('id', table.getRowCount() - 1);\n newRow.setString('species', 'Canis Lupus');\n newRow.setString('name', 'Wolf');\n\n print(table.getArray());\n\n describe('no image displayed');\n}\n
"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "column ID (Number)\nor title (String)",
+ "type": "String|Integer"
+ },
+ {
+ "name": "value",
+ "description": "value to assign",
+ "type": "String"
+ }
+ ]
+ }
+ ],
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "get",
+ "file": "src/io/p5.Table.js",
+ "line": 1063,
+ "itemtype": "method",
+ "description": "Retrieves a value from the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified by\neither its ID or title.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.get(0, 1));\n //Capra hircus\n print(table.get(0, 'species'));\n //Capra hircus\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.get(0, 1));\n //Capra hircus\n print(table.get(0, 'species'));\n //Capra hircus\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.get(0, 1));\n //Capra hircus\n print(table.get(0, 'species'));\n //Capra hircus\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.get(0, 1));\n //Capra hircus\n print(table.get(0, 'species'));\n //Capra hircus\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.get(0, 1));\n //Capra hircus\n print(table.get(0, 'species'));\n //Capra hircus\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.get(0, 1));\n //Capra hircus\n print(table.get(0, 'species'));\n //Capra hircus\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.get(0, 1));\n //Capra hircus\n print(table.get(0, 'species'));\n //Capra hircus\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.get(0, 1));\n //Capra hircus\n print(table.get(0, 'species'));\n //Capra hircus\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.get(0, 1));\n //Capra hircus\n print(table.get(0, 'species'));\n //Capra hircus\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.get(0, 1));\n //Capra hircus\n print(table.get(0, 'species'));\n //Capra hircus\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.get(0, 1));\n //Capra hircus\n print(table.get(0, 'species'));\n //Capra hircus\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.get(0, 1));\n //Capra hircus\n print(table.get(0, 'species'));\n //Capra hircus\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.get(0, 1));\n //Capra hircus\n print(table.get(0, 'species'));\n //Capra hircus\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String|Number"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "getNum",
+ "file": "src/io/p5.Table.js",
+ "line": 1104,
+ "itemtype": "method",
+ "description": "Retrieves a Float value from the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified by\neither its ID or title.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getNum(1, 0) + 100);\n //id 1 + 100 = 101\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getNum(1, 0) + 100);\n //id 1 + 100 = 101\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getNum(1, 0) + 100);\n //id 1 + 100 = 101\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getNum(1, 0) + 100);\n //id 1 + 100 = 101\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getNum(1, 0) + 100);\n //id 1 + 100 = 101\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getNum(1, 0) + 100);\n //id 1 + 100 = 101\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getNum(1, 0) + 100);\n //id 1 + 100 = 101\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getNum(1, 0) + 100);\n //id 1 + 100 = 101\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getNum(1, 0) + 100);\n //id 1 + 100 = 101\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getNum(1, 0) + 100);\n //id 1 + 100 = 101\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getNum(1, 0) + 100);\n //id 1 + 100 = 101\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getNum(1, 0) + 100);\n //id 1 + 100 = 101\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getNum(1, 0) + 100);\n //id 1 + 100 = 101\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Number"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "getString",
+ "file": "src/io/p5.Table.js",
+ "line": 1153,
+ "itemtype": "method",
+ "description": "Retrieves a String value from the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified by\neither its ID or title.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "row",
+ "description": "row ID",
+ "type": "Integer"
+ },
+ {
+ "name": "column",
+ "description": "columnName (string) or\nID (number)",
+ "type": "String|Integer"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "String"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "getObject",
+ "file": "src/io/p5.Table.js",
+ "line": 1196,
+ "itemtype": "method",
+ "description": "Retrieves all table data and returns as an object. If a column name is\npassed in, each row object will be stored with that attribute as its\ntitle.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableObject = table.getObject();\n\n print(tableObject);\n //outputs an object\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableObject = table.getObject();\n\n print(tableObject);\n //outputs an object\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableObject = table.getObject();\n\n print(tableObject);\n //outputs an object\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableObject = table.getObject();\n\n print(tableObject);\n //outputs an object\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableObject = table.getObject();\n\n print(tableObject);\n //outputs an object\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableObject = table.getObject();\n\n print(tableObject);\n //outputs an object\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableObject = table.getObject();\n\n print(tableObject);\n //outputs an object\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableObject = table.getObject();\n\n print(tableObject);\n //outputs an object\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableObject = table.getObject();\n\n print(tableObject);\n //outputs an object\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableObject = table.getObject();\n\n print(tableObject);\n //outputs an object\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableObject = table.getObject();\n\n print(tableObject);\n //outputs an object\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableObject = table.getObject();\n\n print(tableObject);\n //outputs an object\n\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n //my table is comma separated value \"csv\"\n //and has a header specifying the columns labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableObject = table.getObject();\n\n print(tableObject);\n //outputs an object\n\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [
+ {
+ "name": "headerColumn",
+ "description": "Name of the column which should be used to\ntitle each row object (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "headerColumn",
+ "description": "Name of the column which should be used to\ntitle each row object (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "headerColumn",
+ "description": "Name of the column which should be used to\ntitle each row object (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "headerColumn",
+ "description": "Name of the column which should be used to\ntitle each row object (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "headerColumn",
+ "description": "Name of the column which should be used to\ntitle each row object (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "headerColumn",
+ "description": "Name of the column which should be used to\ntitle each row object (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "headerColumn",
+ "description": "Name of the column which should be used to\ntitle each row object (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "headerColumn",
+ "description": "Name of the column which should be used to\ntitle each row object (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "headerColumn",
+ "description": "Name of the column which should be used to\ntitle each row object (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "headerColumn",
+ "description": "Name of the column which should be used to\ntitle each row object (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "headerColumn",
+ "description": "Name of the column which should be used to\ntitle each row object (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "headerColumn",
+ "description": "Name of the column which should be used to\ntitle each row object (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ },
+ {
+ "params": [
+ {
+ "name": "headerColumn",
+ "description": "Name of the column which should be used to\ntitle each row object (optional)",
+ "optional": 1,
+ "type": "String"
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Object"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ },
+ {
+ "name": "getArray",
+ "file": "src/io/p5.Table.js",
+ "line": 1252,
+ "itemtype": "method",
+ "description": "Retrieves all table data and returns it as a multidimensional array.",
+ "example": [
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n
\n",
+ "\n\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n
\n"
+ ],
+ "overloads": [
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Array"
+ }
+ },
+ {
+ "params": [],
+ "return": {
+ "description": "",
+ "type": "Array"
+ }
+ }
+ ],
+ "return": {
+ "description": "",
+ "type": "Array"
+ },
+ "class": "p5.Table",
+ "static": false,
+ "module": "IO",
+ "submodule": "Table"
+ }
+ ],
+ "warnings": [],
+ "consts": {
+ "namedColors": [],
+ "WHITESPACE": [],
+ "colorPatterns": [],
+ "VERSION": [],
+ "P2D": [],
+ "WEBGL": [],
+ "WEBGL2": [],
+ "ARROW": [],
+ "CROSS": [],
+ "HAND": [],
+ "MOVE": [],
+ "TEXT": [],
+ "WAIT": [],
+ "HALF_PI": [],
+ "PI": [],
+ "QUARTER_PI": [],
+ "TAU": [],
+ "TWO_PI": [],
+ "DEGREES": [],
+ "RADIANS": [],
+ "CORNER": [],
+ "CORNERS": [],
+ "RADIUS": [],
+ "RIGHT": [],
+ "LEFT": [],
+ "CENTER": [],
+ "TOP": [],
+ "BOTTOM": [],
+ "BASELINE": [],
+ "POINTS": [
+ "p5.beginShape"
+ ],
+ "LINES": [
+ "p5.beginShape"
+ ],
+ "LINE_STRIP": [],
+ "LINE_LOOP": [],
+ "TRIANGLES": [
+ "p5.beginShape"
+ ],
+ "TRIANGLE_FAN": [
+ "p5.beginShape"
+ ],
+ "TRIANGLE_STRIP": [
+ "p5.beginShape"
+ ],
+ "QUADS": [
+ "p5.beginShape"
+ ],
+ "QUAD_STRIP": [
+ "p5.beginShape"
+ ],
+ "TESS": [
+ "p5.beginShape"
+ ],
+ "CLOSE": [
+ "p5.endShape"
+ ],
+ "OPEN": [],
+ "CHORD": [],
+ "PIE": [],
+ "PROJECT": [],
+ "SQUARE": [],
+ "ROUND": [],
+ "BEVEL": [],
+ "MITER": [],
+ "RGB": [],
+ "HSB": [],
+ "HSL": [],
+ "AUTO": [],
+ "ALT": [],
+ "BACKSPACE": [],
+ "CONTROL": [],
+ "DELETE": [],
+ "DOWN_ARROW": [],
+ "ENTER": [],
+ "ESCAPE": [],
+ "LEFT_ARROW": [],
+ "OPTION": [],
+ "RETURN": [],
+ "RIGHT_ARROW": [],
+ "SHIFT": [],
+ "TAB": [],
+ "UP_ARROW": [],
+ "BLEND": [],
+ "REMOVE": [],
+ "ADD": [],
+ "DARKEST": [],
+ "LIGHTEST": [],
+ "DIFFERENCE": [],
+ "SUBTRACT": [],
+ "EXCLUSION": [],
+ "MULTIPLY": [],
+ "SCREEN": [],
+ "REPLACE": [],
+ "OVERLAY": [],
+ "HARD_LIGHT": [],
+ "SOFT_LIGHT": [],
+ "DODGE": [],
+ "BURN": [],
+ "THRESHOLD": [],
+ "GRAY": [],
+ "OPAQUE": [],
+ "INVERT": [],
+ "POSTERIZE": [],
+ "DILATE": [],
+ "ERODE": [],
+ "BLUR": [],
+ "NORMAL": [],
+ "ITALIC": [],
+ "BOLD": [],
+ "BOLDITALIC": [],
+ "CHAR": [],
+ "WORD": [],
+ "LINEAR": [],
+ "QUADRATIC": [],
+ "BEZIER": [],
+ "CURVE": [],
+ "STROKE": [],
+ "FILL": [],
+ "TEXTURE": [],
+ "IMMEDIATE": [],
+ "IMAGE": [],
+ "NEAREST": [],
+ "REPEAT": [],
+ "CLAMP": [],
+ "MIRROR": [],
+ "FLAT": [],
+ "SMOOTH": [],
+ "LANDSCAPE": [],
+ "PORTRAIT": [],
+ "GRID": [],
+ "AXES": [],
+ "LABEL": [],
+ "FALLBACK": [],
+ "CONTAIN": [],
+ "COVER": [],
+ "UNSIGNED_BYTE": [],
+ "UNSIGNED_INT": [],
+ "FLOAT": [],
+ "HALF_FLOAT": [],
+ "RGBA": [],
+ "initialize": [],
+ "availableTranslatorLanguages": [],
+ "currentTranslatorLanguage": [],
+ "setTranslatorLanguage": [],
+ "languages": [],
+ "styleEmpty": [],
+ "Filters": []
+ }
+}
\ No newline at end of file
diff --git a/docs/documented-method.js b/docs/documented-method.js
deleted file mode 100644
index 32d38dd55c..0000000000
--- a/docs/documented-method.js
+++ /dev/null
@@ -1,60 +0,0 @@
-// https://github.com/umdjs/umd/blob/main/templates/returnExports.js
-(function (root, factory) {
- if (typeof define === 'function' && define.amd) {
- define([], factory);
- } else if (typeof module === 'object' && module.exports) {
- module.exports = factory();
- } else {
- root.DocumentedMethod = factory();
- }
-}(this, function () {
- function extend(target, src) {
- Object.keys(src).forEach(function(prop) {
- target[prop] = src[prop];
- });
- return target;
- }
-
- function DocumentedMethod(classitem) {
- extend(this, classitem);
-
- if (this.overloads) {
- // Make each overload inherit properties from their parent
- // classitem.
- this.overloads = this.overloads.map(function(overload) {
- return extend(Object.create(this), overload);
- }, this);
-
- if (this.params) {
- throw new Error('params for overloaded methods should be undefined');
- }
-
- this.params = this._getMergedParams();
- }
- }
-
- DocumentedMethod.prototype = {
- // Merge parameters across all overloaded versions of this item.
- _getMergedParams: function() {
- const paramNames = {};
- const params = [];
-
- this.overloads.forEach(function(overload) {
- if (!overload.params) {
- return;
- }
- overload.params.forEach(function(param) {
- if (param.name in paramNames) {
- return;
- }
- paramNames[param.name] = param;
- params.push(param);
- });
- });
-
- return params;
- }
- };
-
- return DocumentedMethod;
-}));
diff --git a/docs/parameterData.json b/docs/parameterData.json
new file mode 100644
index 0000000000..3fc79dbeed
--- /dev/null
+++ b/docs/parameterData.json
@@ -0,0 +1,4679 @@
+{
+ "p5": {
+ "describe": {
+ "overloads": [
+ [
+ "String",
+ "FALLBACK|LABEL?"
+ ]
+ ]
+ },
+ "describeElement": {
+ "overloads": [
+ [
+ "String",
+ "String",
+ "FALLBACK|LABEL?"
+ ]
+ ]
+ },
+ "textOutput": {
+ "overloads": [
+ [
+ "FALLBACK|LABEL?"
+ ]
+ ]
+ },
+ "gridOutput": {
+ "overloads": [
+ [
+ "FALLBACK|LABEL?"
+ ]
+ ]
+ },
+ "p5": {
+ "overloads": [
+ [
+ "Object",
+ "String|HTMLElement"
+ ]
+ ]
+ },
+ "color": {
+ "overloads": [
+ [
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "String"
+ ],
+ [
+ "Number[]"
+ ],
+ [
+ "p5.Color"
+ ]
+ ]
+ },
+ "red": {
+ "overloads": [
+ [
+ "p5.Color|Number[]|String"
+ ]
+ ]
+ },
+ "green": {
+ "overloads": [
+ [
+ "p5.Color|Number[]|String"
+ ]
+ ]
+ },
+ "blue": {
+ "overloads": [
+ [
+ "p5.Color|Number[]|String"
+ ]
+ ]
+ },
+ "alpha": {
+ "overloads": [
+ [
+ "p5.Color|Number[]|String"
+ ]
+ ]
+ },
+ "hue": {
+ "overloads": [
+ [
+ "p5.Color|Number[]|String"
+ ]
+ ]
+ },
+ "saturation": {
+ "overloads": [
+ [
+ "p5.Color|Number[]|String"
+ ]
+ ]
+ },
+ "brightness": {
+ "overloads": [
+ [
+ "p5.Color|Number[]|String"
+ ]
+ ]
+ },
+ "lightness": {
+ "overloads": [
+ [
+ "p5.Color|Number[]|String"
+ ]
+ ]
+ },
+ "lerpColor": {
+ "overloads": [
+ [
+ "p5.Color",
+ "p5.Color",
+ "Number"
+ ]
+ ]
+ },
+ "paletteLerp": {
+ "overloads": [
+ [
+ "[p5.Color|String|Number|Number[], Number][]",
+ "Number"
+ ]
+ ]
+ },
+ "beginClip": {
+ "overloads": [
+ [
+ "Object?"
+ ]
+ ]
+ },
+ "endClip": {
+ "overloads": [
+ []
+ ]
+ },
+ "clip": {
+ "overloads": [
+ [
+ "Function",
+ "Object?"
+ ]
+ ]
+ },
+ "background": {
+ "overloads": [
+ [
+ "p5.Color"
+ ],
+ [
+ "String",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number[]"
+ ],
+ [
+ "p5.Image",
+ "Number?"
+ ]
+ ]
+ },
+ "clear": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ],
+ []
+ ]
+ },
+ "colorMode": {
+ "overloads": [
+ [
+ "RGB|HSB|HSL|RGBHDR|HWB|LAB|LCH|OKLAB|OKLCH",
+ "Number?"
+ ],
+ [
+ "RGB|HSB|HSL|RGBHDR|HWB|LAB|LCH|OKLAB|OKLCH",
+ "Number",
+ "Number",
+ "Number",
+ "Number?"
+ ]
+ ]
+ },
+ "fill": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "String"
+ ],
+ [
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number[]"
+ ],
+ [
+ "p5.Color"
+ ]
+ ]
+ },
+ "noFill": {
+ "overloads": [
+ []
+ ]
+ },
+ "noStroke": {
+ "overloads": [
+ []
+ ]
+ },
+ "stroke": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "String"
+ ],
+ [
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number[]"
+ ],
+ [
+ "p5.Color"
+ ]
+ ]
+ },
+ "erase": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "noErase": {
+ "overloads": [
+ []
+ ]
+ },
+ "blendMode": {
+ "overloads": [
+ [
+ "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|REMOVE|SUBTRACT"
+ ]
+ ]
+ },
+ "print": {
+ "overloads": [
+ [
+ "Any"
+ ],
+ [
+ "String|Number|Array"
+ ]
+ ]
+ },
+ "cursor": {
+ "overloads": [
+ [
+ "ARROW|CROSS|HAND|MOVE|TEXT|WAIT|String",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "frameRate": {
+ "overloads": [
+ [
+ "Number"
+ ],
+ []
+ ]
+ },
+ "getTargetFrameRate": {
+ "overloads": [
+ []
+ ]
+ },
+ "noCursor": {
+ "overloads": [
+ []
+ ]
+ },
+ "windowResized": {
+ "overloads": [
+ [
+ "Event?"
+ ]
+ ]
+ },
+ "fullscreen": {
+ "overloads": [
+ [
+ "Boolean?"
+ ]
+ ]
+ },
+ "pixelDensity": {
+ "overloads": [
+ [
+ "Number?"
+ ],
+ []
+ ]
+ },
+ "displayDensity": {
+ "overloads": [
+ []
+ ]
+ },
+ "getURL": {
+ "overloads": [
+ []
+ ]
+ },
+ "getURLPath": {
+ "overloads": [
+ []
+ ]
+ },
+ "getURLParams": {
+ "overloads": [
+ []
+ ]
+ },
+ "worldToScreen": {
+ "overloads": [
+ [
+ "Number|p5.Vector",
+ "Number",
+ "Number?"
+ ]
+ ]
+ },
+ "screenToWorld": {
+ "overloads": [
+ [
+ "Number|p5.Vector",
+ "Number",
+ "Number?"
+ ]
+ ]
+ },
+ "setup": {
+ "overloads": [
+ []
+ ]
+ },
+ "draw": {
+ "overloads": [
+ []
+ ]
+ },
+ "createCanvas": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "P2D|WEBGL|P2DHDR?",
+ "HTMLCanvasElement?"
+ ],
+ [
+ "Number?",
+ "Number?",
+ "HTMLCanvasElement?"
+ ]
+ ]
+ },
+ "resizeCanvas": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Boolean?"
+ ]
+ ]
+ },
+ "noCanvas": {
+ "overloads": [
+ []
+ ]
+ },
+ "createGraphics": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "P2D|WEBGL?",
+ "HTMLCanvasElement?"
+ ],
+ [
+ "Number",
+ "Number",
+ "HTMLCanvasElement?"
+ ]
+ ]
+ },
+ "createFramebuffer": {
+ "overloads": [
+ [
+ "Object?"
+ ]
+ ]
+ },
+ "clearDepth": {
+ "overloads": [
+ [
+ "Number?"
+ ]
+ ]
+ },
+ "noLoop": {
+ "overloads": [
+ []
+ ]
+ },
+ "loop": {
+ "overloads": [
+ []
+ ]
+ },
+ "isLooping": {
+ "overloads": [
+ []
+ ]
+ },
+ "redraw": {
+ "overloads": [
+ [
+ "Integer?"
+ ]
+ ]
+ },
+ "applyMatrix": {
+ "overloads": [
+ [
+ "Array"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "resetMatrix": {
+ "overloads": [
+ []
+ ]
+ },
+ "rotate": {
+ "overloads": [
+ [
+ "Number",
+ "p5.Vector|Number[]?"
+ ]
+ ]
+ },
+ "rotateX": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "rotateY": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "rotateZ": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "scale": {
+ "overloads": [
+ [
+ "Number|p5.Vector|Number[]",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "p5.Vector|Number[]"
+ ]
+ ]
+ },
+ "shearX": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "shearY": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "translate": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "p5.Vector"
+ ]
+ ]
+ },
+ "push": {
+ "overloads": [
+ []
+ ]
+ },
+ "pop": {
+ "overloads": [
+ []
+ ]
+ },
+ "storeItem": {
+ "overloads": [
+ [
+ "String",
+ "String|Number|Boolean|Object|Array"
+ ]
+ ]
+ },
+ "getItem": {
+ "overloads": [
+ [
+ "String"
+ ]
+ ]
+ },
+ "clearStorage": {
+ "overloads": [
+ []
+ ]
+ },
+ "removeItem": {
+ "overloads": [
+ [
+ "String"
+ ]
+ ]
+ },
+ "select": {
+ "overloads": [
+ [
+ "String",
+ "String|p5.Element|HTMLElement?"
+ ]
+ ]
+ },
+ "selectAll": {
+ "overloads": [
+ [
+ "String",
+ "String|p5.Element|HTMLElement?"
+ ]
+ ]
+ },
+ "createElement": {
+ "overloads": [
+ [
+ "String",
+ "String?"
+ ]
+ ]
+ },
+ "removeElements": {
+ "overloads": [
+ []
+ ]
+ },
+ "addElement": {
+ "overloads": [
+ []
+ ]
+ },
+ "createDiv": {
+ "overloads": [
+ [
+ "String?"
+ ]
+ ]
+ },
+ "createP": {
+ "overloads": [
+ [
+ "String?"
+ ]
+ ]
+ },
+ "createSpan": {
+ "overloads": [
+ [
+ "String?"
+ ]
+ ]
+ },
+ "createImg": {
+ "overloads": [
+ [
+ "String",
+ "String"
+ ],
+ [
+ "String",
+ "String",
+ "String?",
+ "Function?"
+ ]
+ ]
+ },
+ "createA": {
+ "overloads": [
+ [
+ "String",
+ "String",
+ "String?"
+ ]
+ ]
+ },
+ "createSlider": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "createButton": {
+ "overloads": [
+ [
+ "String",
+ "String?"
+ ]
+ ]
+ },
+ "createCheckbox": {
+ "overloads": [
+ [
+ "String?",
+ "Boolean?"
+ ]
+ ]
+ },
+ "createSelect": {
+ "overloads": [
+ [
+ "Boolean?"
+ ],
+ [
+ "Object"
+ ]
+ ]
+ },
+ "createRadio": {
+ "overloads": [
+ [
+ "Object?"
+ ],
+ [
+ "String?"
+ ],
+ []
+ ]
+ },
+ "createColorPicker": {
+ "overloads": [
+ [
+ "String|p5.Color?"
+ ]
+ ]
+ },
+ "createInput": {
+ "overloads": [
+ [
+ "String?",
+ "String?"
+ ],
+ [
+ "String?"
+ ]
+ ]
+ },
+ "createFileInput": {
+ "overloads": [
+ [
+ "Function",
+ "Boolean?"
+ ]
+ ]
+ },
+ "setMoveThreshold": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "setShakeThreshold": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "deviceMoved": {
+ "overloads": [
+ []
+ ]
+ },
+ "deviceTurned": {
+ "overloads": [
+ []
+ ]
+ },
+ "deviceShaken": {
+ "overloads": [
+ []
+ ]
+ },
+ "keyPressed": {
+ "overloads": [
+ [
+ "KeyboardEvent?"
+ ]
+ ]
+ },
+ "keyReleased": {
+ "overloads": [
+ [
+ "KeyboardEvent?"
+ ]
+ ]
+ },
+ "keyTyped": {
+ "overloads": [
+ [
+ "KeyboardEvent?"
+ ]
+ ]
+ },
+ "keyIsDown": {
+ "overloads": [
+ [
+ "Number|String"
+ ]
+ ]
+ },
+ "mouseMoved": {
+ "overloads": [
+ [
+ "MouseEvent?"
+ ]
+ ]
+ },
+ "mouseDragged": {
+ "overloads": [
+ [
+ "MouseEvent?"
+ ]
+ ]
+ },
+ "mousePressed": {
+ "overloads": [
+ [
+ "MouseEvent?"
+ ]
+ ]
+ },
+ "mouseReleased": {
+ "overloads": [
+ [
+ "MouseEvent?"
+ ]
+ ]
+ },
+ "mouseClicked": {
+ "overloads": [
+ [
+ "MouseEvent?"
+ ]
+ ]
+ },
+ "doubleClicked": {
+ "overloads": [
+ [
+ "MouseEvent?"
+ ]
+ ]
+ },
+ "mouseWheel": {
+ "overloads": [
+ [
+ "WheelEvent?"
+ ]
+ ]
+ },
+ "requestPointerLock": {
+ "overloads": [
+ []
+ ]
+ },
+ "exitPointerLock": {
+ "overloads": [
+ []
+ ]
+ },
+ "createImage": {
+ "overloads": [
+ [
+ "Integer",
+ "Integer"
+ ]
+ ]
+ },
+ "saveCanvas": {
+ "overloads": [
+ [
+ "p5.Framebuffer|p5.Element|HTMLCanvasElement",
+ "String?",
+ "String?"
+ ],
+ [
+ "String?",
+ "String?"
+ ]
+ ]
+ },
+ "saveFrames": {
+ "overloads": [
+ [
+ "String",
+ "String",
+ "Number",
+ "Number",
+ "function(Array)?"
+ ]
+ ]
+ },
+ "loadImage": {
+ "overloads": [
+ [
+ "String|Request",
+ "function(p5.Image)?",
+ "function(Event)?"
+ ]
+ ]
+ },
+ "saveGif": {
+ "overloads": [
+ [
+ "String",
+ "Number",
+ "Object?"
+ ]
+ ]
+ },
+ "image": {
+ "overloads": [
+ [
+ "p5.Image|p5.Element|p5.Texture|p5.Framebuffer|p5.FramebufferTexture|p5.Renderer|p5.Graphics",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "p5.Image|p5.Element|p5.Texture|p5.Framebuffer|p5.FramebufferTexture",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?",
+ "CONTAIN|COVER?",
+ "LEFT|RIGHT|CENTER?",
+ "TOP|BOTTOM|CENTER?"
+ ]
+ ]
+ },
+ "tint": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "String"
+ ],
+ [
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number[]"
+ ],
+ [
+ "p5.Color"
+ ]
+ ]
+ },
+ "noTint": {
+ "overloads": [
+ []
+ ]
+ },
+ "imageMode": {
+ "overloads": [
+ [
+ "CORNER|CORNERS|CENTER"
+ ]
+ ]
+ },
+ "blend": {
+ "overloads": [
+ [
+ "p5.Image",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
+ ],
+ [
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
+ ]
+ ]
+ },
+ "copy": {
+ "overloads": [
+ [
+ "p5.Image|p5.Element",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer"
+ ],
+ [
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer"
+ ]
+ ]
+ },
+ "filter": {
+ "overloads": [
+ [
+ "THRESHOLD|GRAY|OPAQUE|INVERT|POSTERIZE|BLUR|ERODE|DILATE|BLUR",
+ "Number?",
+ "Boolean?"
+ ],
+ [
+ "p5.Shader"
+ ]
+ ]
+ },
+ "get": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [],
+ [
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "loadPixels": {
+ "overloads": [
+ []
+ ]
+ },
+ "set": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number|Number[]|Object"
+ ]
+ ]
+ },
+ "updatePixels": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ],
+ []
+ ]
+ },
+ "loadJSON": {
+ "overloads": [
+ [
+ "String|Request",
+ "Function?",
+ "Function?"
+ ]
+ ]
+ },
+ "loadStrings": {
+ "overloads": [
+ [
+ "String|Request",
+ "Function?",
+ "Function?"
+ ]
+ ]
+ },
+ "loadTable": {
+ "overloads": [
+ [
+ "String|Request",
+ "String?",
+ "String?",
+ "Function?",
+ "Function?"
+ ]
+ ]
+ },
+ "loadXML": {
+ "overloads": [
+ [
+ "String|Request",
+ "Function?",
+ "Function?"
+ ]
+ ]
+ },
+ "loadBytes": {
+ "overloads": [
+ [
+ "String|Request",
+ "Function?",
+ "Function?"
+ ]
+ ]
+ },
+ "loadBlob": {
+ "overloads": [
+ [
+ "String|Request",
+ "Function?",
+ "Function?"
+ ]
+ ]
+ },
+ "httpGet": {
+ "overloads": [
+ [
+ "String|Request",
+ "String?",
+ "Function?",
+ "Function?"
+ ],
+ [
+ "String|Request",
+ "Function",
+ "Function?"
+ ]
+ ]
+ },
+ "httpPost": {
+ "overloads": [
+ [
+ "String|Request",
+ "Object|Boolean?",
+ "String?",
+ "Function?",
+ "Function?"
+ ],
+ [
+ "String|Request",
+ "Object|Boolean",
+ "Function?",
+ "Function?"
+ ],
+ [
+ "String|Request",
+ "Function?",
+ "Function?"
+ ]
+ ]
+ },
+ "httpDo": {
+ "overloads": [
+ [
+ "String|Request",
+ "String?",
+ "String?",
+ "Object?",
+ "Function?",
+ "Function?"
+ ],
+ [
+ "String|Request",
+ "Function?",
+ "Function?"
+ ]
+ ]
+ },
+ "createWriter": {
+ "overloads": [
+ [
+ "String",
+ "String?"
+ ]
+ ]
+ },
+ "write": {
+ "overloads": [
+ [
+ "String|Number|Array"
+ ]
+ ]
+ },
+ "close": {
+ "overloads": [
+ []
+ ]
+ },
+ "save": {
+ "overloads": [
+ [
+ "Object|String?",
+ "String?",
+ "Boolean|String?"
+ ]
+ ]
+ },
+ "saveJSON": {
+ "overloads": [
+ [
+ "Array|Object",
+ "String",
+ "Boolean?"
+ ]
+ ]
+ },
+ "saveStrings": {
+ "overloads": [
+ [
+ "String[]",
+ "String",
+ "String?",
+ "Boolean?"
+ ]
+ ]
+ },
+ "saveTable": {
+ "overloads": [
+ [
+ "p5.Table",
+ "String",
+ "String?"
+ ]
+ ]
+ },
+ "abs": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "ceil": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "constrain": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "dist": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "p5.Vector"
+ ]
+ ]
+ },
+ "exp": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "floor": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "lerp": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "log": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "mag": {
+ "overloads": [
+ [
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "map": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Boolean?"
+ ]
+ ]
+ },
+ "max": {
+ "overloads": [
+ [
+ "Number",
+ "Number"
+ ],
+ [
+ "Number[]"
+ ]
+ ]
+ },
+ "min": {
+ "overloads": [
+ [
+ "Number",
+ "Number"
+ ],
+ [
+ "Number[]"
+ ]
+ ]
+ },
+ "norm": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "pow": {
+ "overloads": [
+ [
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "round": {
+ "overloads": [
+ [
+ "Number",
+ "Number?"
+ ]
+ ]
+ },
+ "sq": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "sqrt": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "fract": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "createVector": {
+ "overloads": [
+ [
+ "...Number[]"
+ ]
+ ]
+ },
+ "noise": {
+ "overloads": [
+ [
+ "Number",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "noiseDetail": {
+ "overloads": [
+ [
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "noiseSeed": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "randomSeed": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "random": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?"
+ ],
+ [
+ "Array"
+ ]
+ ]
+ },
+ "randomGaussian": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "acos": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "asin": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "atan": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "atan2": {
+ "overloads": [
+ [
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "cos": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "sin": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "tan": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "degrees": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "radians": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "angleMode": {
+ "overloads": [
+ [
+ "RADIANS|DEGREES"
+ ],
+ []
+ ]
+ },
+ "arc": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "CHORD|PIE|OPEN?",
+ "Integer?"
+ ]
+ ]
+ },
+ "ellipse": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Integer?"
+ ]
+ ]
+ },
+ "circle": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "line": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "point": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "p5.Vector"
+ ]
+ ]
+ },
+ "quad": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Integer?",
+ "Integer?"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Integer?",
+ "Integer?"
+ ]
+ ]
+ },
+ "rect": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Integer?",
+ "Integer?"
+ ]
+ ]
+ },
+ "square": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "triangle": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "ellipseMode": {
+ "overloads": [
+ [
+ "CENTER|RADIUS|CORNER|CORNERS"
+ ]
+ ]
+ },
+ "noSmooth": {
+ "overloads": [
+ []
+ ]
+ },
+ "rectMode": {
+ "overloads": [
+ [
+ "CENTER|RADIUS|CORNER|CORNERS"
+ ]
+ ]
+ },
+ "smooth": {
+ "overloads": [
+ []
+ ]
+ },
+ "strokeCap": {
+ "overloads": [
+ [
+ "ROUND|SQUARE|PROJECT"
+ ]
+ ]
+ },
+ "strokeJoin": {
+ "overloads": [
+ [
+ "MITER|BEVEL|ROUND"
+ ]
+ ]
+ },
+ "strokeWeight": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "bezier": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "bezierPoint": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "bezierTangent": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "spline": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "splinePoint": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "splineTangent": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "bezierOrder": {
+ "overloads": [
+ [
+ "Number"
+ ],
+ []
+ ]
+ },
+ "splineVertex": {
+ "overloads": [
+ [
+ "Number",
+ "Number"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "splineProperty": {
+ "overloads": [
+ [
+ "String",
+ null
+ ],
+ [
+ "String"
+ ]
+ ]
+ },
+ "splineProperties": {
+ "overloads": [
+ [
+ "Object"
+ ],
+ []
+ ]
+ },
+ "vertex": {
+ "overloads": [
+ [
+ "Number",
+ "Number"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "beginContour": {
+ "overloads": [
+ []
+ ]
+ },
+ "endContour": {
+ "overloads": [
+ [
+ "OPEN|CLOSE?"
+ ]
+ ]
+ },
+ "beginShape": {
+ "overloads": [
+ [
+ "POINTS|LINES|TRIANGLES|TRIANGLE_FAN|TRIANGLE_STRIP|QUADS|QUAD_STRIP|PATH?"
+ ]
+ ]
+ },
+ "bezierVertex": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "endShape": {
+ "overloads": [
+ [
+ "CLOSE?",
+ "Integer?"
+ ]
+ ]
+ },
+ "normal": {
+ "overloads": [
+ [
+ "p5.Vector"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "vertexProperty": {
+ "overloads": [
+ [
+ "String",
+ "Number|Number[]"
+ ]
+ ]
+ },
+ "loadFont": {
+ "overloads": [
+ [
+ "String",
+ "String?",
+ "Object?",
+ "Function?",
+ "Function?"
+ ],
+ [
+ "String",
+ "Function?",
+ "Function?"
+ ]
+ ]
+ },
+ "text": {
+ "overloads": [
+ [
+ "String|Object|Array|Number|Boolean",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "textAlign": {
+ "overloads": [
+ [
+ "LEFT|CENTER|RIGHT",
+ "TOP|BOTTOM|CENTER|BASELINE?"
+ ]
+ ]
+ },
+ "textAscent": {
+ "overloads": [
+ [
+ "String?"
+ ]
+ ]
+ },
+ "textDescent": {
+ "overloads": [
+ [
+ "String?"
+ ]
+ ]
+ },
+ "textLeading": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "textFont": {
+ "overloads": [
+ [
+ "p5.Font|String|Object",
+ "Number?"
+ ]
+ ]
+ },
+ "textSize": {
+ "overloads": [
+ [
+ "Number"
+ ],
+ []
+ ]
+ },
+ "textStyle": {
+ "overloads": [
+ [
+ "NORMAL|ITALIC|BOLD|BOLDITALIC"
+ ],
+ []
+ ]
+ },
+ "textWidth": {
+ "overloads": [
+ [
+ "String"
+ ]
+ ]
+ },
+ "textWrap": {
+ "overloads": [
+ [
+ "WORD|CHAR"
+ ],
+ []
+ ]
+ },
+ "textBounds": {
+ "overloads": [
+ [
+ "String",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "textDirection": {
+ "overloads": [
+ [
+ "String"
+ ],
+ []
+ ]
+ },
+ "textProperty": {
+ "overloads": [
+ [
+ "String",
+ null
+ ],
+ [
+ "String"
+ ]
+ ]
+ },
+ "textProperties": {
+ "overloads": [
+ [
+ "Object"
+ ],
+ []
+ ]
+ },
+ "fontBounds": {
+ "overloads": [
+ [
+ "String",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "fontWidth": {
+ "overloads": [
+ [
+ "String"
+ ]
+ ]
+ },
+ "fontAscent": {
+ "overloads": [
+ []
+ ]
+ },
+ "fontDescent": {
+ "overloads": [
+ []
+ ]
+ },
+ "textWeight": {
+ "overloads": [
+ [
+ "Number"
+ ],
+ []
+ ]
+ },
+ "float": {
+ "overloads": [
+ [
+ "String"
+ ],
+ [
+ "String[]"
+ ]
+ ]
+ },
+ "int": {
+ "overloads": [
+ [
+ "String|Boolean|Number"
+ ],
+ [
+ "Array"
+ ]
+ ]
+ },
+ "str": {
+ "overloads": [
+ [
+ "String|Boolean|Number"
+ ]
+ ]
+ },
+ "boolean": {
+ "overloads": [
+ [
+ "String|Boolean|Number"
+ ],
+ [
+ "Array"
+ ]
+ ]
+ },
+ "byte": {
+ "overloads": [
+ [
+ "String|Boolean|Number"
+ ],
+ [
+ "Array"
+ ]
+ ]
+ },
+ "char": {
+ "overloads": [
+ [
+ "String|Number"
+ ],
+ [
+ "Array"
+ ]
+ ]
+ },
+ "unchar": {
+ "overloads": [
+ [
+ "String"
+ ],
+ [
+ "String[]"
+ ]
+ ]
+ },
+ "hex": {
+ "overloads": [
+ [
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number[]",
+ "Number?"
+ ]
+ ]
+ },
+ "unhex": {
+ "overloads": [
+ [
+ "String"
+ ],
+ [
+ "String[]"
+ ]
+ ]
+ },
+ "day": {
+ "overloads": [
+ []
+ ]
+ },
+ "hour": {
+ "overloads": [
+ []
+ ]
+ },
+ "minute": {
+ "overloads": [
+ []
+ ]
+ },
+ "millis": {
+ "overloads": [
+ []
+ ]
+ },
+ "month": {
+ "overloads": [
+ []
+ ]
+ },
+ "second": {
+ "overloads": [
+ []
+ ]
+ },
+ "year": {
+ "overloads": [
+ []
+ ]
+ },
+ "nf": {
+ "overloads": [
+ [
+ "Number|String",
+ "Integer|String?",
+ "Integer|String?"
+ ],
+ [
+ "Number[]",
+ "Integer|String?",
+ "Integer|String?"
+ ]
+ ]
+ },
+ "nfc": {
+ "overloads": [
+ [
+ "Number|String",
+ "Integer|String?"
+ ],
+ [
+ "Number[]",
+ "Integer|String?"
+ ]
+ ]
+ },
+ "nfp": {
+ "overloads": [
+ [
+ "Number",
+ "Integer?",
+ "Integer?"
+ ],
+ [
+ "Number[]",
+ "Integer?",
+ "Integer?"
+ ]
+ ]
+ },
+ "nfs": {
+ "overloads": [
+ [
+ "Number",
+ "Integer?",
+ "Integer?"
+ ],
+ [
+ "Array",
+ "Integer?",
+ "Integer?"
+ ]
+ ]
+ },
+ "splitTokens": {
+ "overloads": [
+ [
+ "String",
+ "String?"
+ ]
+ ]
+ },
+ "shuffle": {
+ "overloads": [
+ [
+ "Array",
+ "Boolean?"
+ ]
+ ]
+ },
+ "strokeMode": {
+ "overloads": [
+ [
+ "String"
+ ]
+ ]
+ },
+ "buildGeometry": {
+ "overloads": [
+ [
+ "Function"
+ ]
+ ]
+ },
+ "freeGeometry": {
+ "overloads": [
+ [
+ "p5.Geometry"
+ ]
+ ]
+ },
+ "plane": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Integer?",
+ "Integer?"
+ ]
+ ]
+ },
+ "box": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Integer?",
+ "Integer?"
+ ]
+ ]
+ },
+ "sphere": {
+ "overloads": [
+ [
+ "Number?",
+ "Integer?",
+ "Integer?"
+ ]
+ ]
+ },
+ "cylinder": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Integer?",
+ "Integer?",
+ "Boolean?",
+ "Boolean?"
+ ]
+ ]
+ },
+ "cone": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Integer?",
+ "Integer?",
+ "Boolean?"
+ ]
+ ]
+ },
+ "ellipsoid": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Integer?",
+ "Integer?"
+ ]
+ ]
+ },
+ "torus": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Integer?",
+ "Integer?"
+ ]
+ ]
+ },
+ "curveDetail": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "orbitControl": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Object?"
+ ]
+ ]
+ },
+ "debugMode": {
+ "overloads": [
+ [],
+ [
+ "GRID|AXES"
+ ],
+ [
+ "GRID|AXES",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "GRID|AXES",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "noDebugMode": {
+ "overloads": [
+ []
+ ]
+ },
+ "ambientLight": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number?"
+ ],
+ [
+ "String"
+ ],
+ [
+ "Number[]"
+ ],
+ [
+ "p5.Color"
+ ]
+ ]
+ },
+ "specularColor": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "Number"
+ ],
+ [
+ "String"
+ ],
+ [
+ "Number[]"
+ ],
+ [
+ "p5.Color"
+ ]
+ ]
+ },
+ "directionalLight": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "p5.Vector"
+ ],
+ [
+ "p5.Color|Number[]|String",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "p5.Color|Number[]|String",
+ "p5.Vector"
+ ]
+ ]
+ },
+ "pointLight": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "p5.Vector"
+ ],
+ [
+ "p5.Color|Number[]|String",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "p5.Color|Number[]|String",
+ "p5.Vector"
+ ]
+ ]
+ },
+ "imageLight": {
+ "overloads": [
+ [
+ "p5.image"
+ ]
+ ]
+ },
+ "panorama": {
+ "overloads": [
+ [
+ "p5.Image"
+ ]
+ ]
+ },
+ "lights": {
+ "overloads": [
+ []
+ ]
+ },
+ "lightFalloff": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "spotLight": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "p5.Color|Number[]|String",
+ "p5.Vector",
+ "p5.Vector",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "p5.Vector",
+ "p5.Vector",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "p5.Color|Number[]|String",
+ "Number",
+ "Number",
+ "Number",
+ "p5.Vector",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "p5.Color|Number[]|String",
+ "p5.Vector",
+ "Number",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "p5.Vector",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "p5.Vector",
+ "Number",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "p5.Color|Number[]|String",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "noLights": {
+ "overloads": [
+ []
+ ]
+ },
+ "loadModel": {
+ "overloads": [
+ [
+ "String|Request",
+ "String?",
+ "Boolean",
+ "function(p5.Geometry)?",
+ "function(Event)?"
+ ],
+ [
+ "String|Request",
+ "String?",
+ "function(p5.Geometry)?",
+ "function(Event)?"
+ ],
+ [
+ "String|Request",
+ "Object?"
+ ]
+ ]
+ },
+ "model": {
+ "overloads": [
+ [
+ "p5.Geometry",
+ "Number?"
+ ]
+ ]
+ },
+ "createModel": {
+ "overloads": [
+ [
+ "String",
+ "String?",
+ "Boolean",
+ "function(p5.Geometry)?",
+ "function(Event)?"
+ ],
+ [
+ "String",
+ "String?",
+ "function(p5.Geometry)?",
+ "function(Event)?"
+ ],
+ [
+ "String",
+ "String?",
+ "Object?"
+ ]
+ ]
+ },
+ "loadShader": {
+ "overloads": [
+ [
+ "String|Request",
+ "String|Request",
+ "Function?",
+ "Function?"
+ ]
+ ]
+ },
+ "createShader": {
+ "overloads": [
+ [
+ "String",
+ "String",
+ "Object?"
+ ]
+ ]
+ },
+ "loadFilterShader": {
+ "overloads": [
+ [
+ "String",
+ "Function?",
+ "Function?"
+ ]
+ ]
+ },
+ "createFilterShader": {
+ "overloads": [
+ [
+ "String"
+ ]
+ ]
+ },
+ "shader": {
+ "overloads": [
+ [
+ "p5.Shader"
+ ]
+ ]
+ },
+ "strokeShader": {
+ "overloads": [
+ [
+ "p5.Shader"
+ ]
+ ]
+ },
+ "imageShader": {
+ "overloads": [
+ [
+ "p5.Shader"
+ ]
+ ]
+ },
+ "baseMaterialShader": {
+ "overloads": [
+ []
+ ]
+ },
+ "baseFilterShader": {
+ "overloads": [
+ []
+ ]
+ },
+ "baseNormalShader": {
+ "overloads": [
+ []
+ ]
+ },
+ "baseColorShader": {
+ "overloads": [
+ []
+ ]
+ },
+ "baseStrokeShader": {
+ "overloads": [
+ []
+ ]
+ },
+ "resetShader": {
+ "overloads": [
+ []
+ ]
+ },
+ "texture": {
+ "overloads": [
+ [
+ "p5.Image|p5.MediaElement|p5.Graphics|p5.Texture|p5.Framebuffer|p5.FramebufferTexture"
+ ]
+ ]
+ },
+ "textureMode": {
+ "overloads": [
+ [
+ "IMAGE|NORMAL"
+ ]
+ ]
+ },
+ "textureWrap": {
+ "overloads": [
+ [
+ "CLAMP|REPEAT|MIRROR",
+ "CLAMP|REPEAT|MIRROR?"
+ ]
+ ]
+ },
+ "normalMaterial": {
+ "overloads": [
+ []
+ ]
+ },
+ "ambientMaterial": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "Number"
+ ],
+ [
+ "p5.Color|Number[]|String"
+ ]
+ ]
+ },
+ "emissiveMaterial": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number"
+ ],
+ [
+ "p5.Color|Number[]|String"
+ ]
+ ]
+ },
+ "specularMaterial": {
+ "overloads": [
+ [
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "p5.Color|Number[]|String"
+ ]
+ ]
+ },
+ "shininess": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "metalness": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "camera": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "perspective": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "linePerspective": {
+ "overloads": [
+ [
+ "Boolean"
+ ],
+ []
+ ]
+ },
+ "ortho": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "frustum": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "createCamera": {
+ "overloads": [
+ []
+ ]
+ },
+ "setCamera": {
+ "overloads": [
+ [
+ "p5.Camera"
+ ]
+ ]
+ },
+ "saveObj": {
+ "overloads": [
+ [
+ "String?"
+ ]
+ ]
+ },
+ "saveStl": {
+ "overloads": [
+ [
+ "String?",
+ "Object?"
+ ]
+ ]
+ },
+ "setAttributes": {
+ "overloads": [
+ [
+ "String",
+ "Boolean"
+ ],
+ [
+ "Object"
+ ]
+ ]
+ },
+ "remove": {
+ "overloads": [
+ []
+ ]
+ },
+ "createVideo": {
+ "overloads": [
+ [
+ "String|String[]",
+ "Function?"
+ ]
+ ]
+ },
+ "createAudio": {
+ "overloads": [
+ [],
+ [
+ "String|String[]?",
+ "Function?"
+ ]
+ ]
+ },
+ "createCapture": {
+ "overloads": [
+ [
+ "AUDIO|VIDEO|Object?",
+ "Object?",
+ "Function?"
+ ]
+ ]
+ }
+ },
+ "p5.Geometry": {
+ "flipV": {
+ "overloads": [
+ []
+ ]
+ },
+ "calculateBoundingBox": {
+ "overloads": [
+ []
+ ]
+ },
+ "clearColors": {
+ "overloads": [
+ []
+ ]
+ },
+ "flipU": {
+ "overloads": [
+ []
+ ]
+ },
+ "computeFaces": {
+ "overloads": [
+ []
+ ]
+ },
+ "computeNormals": {
+ "overloads": [
+ [
+ "FLAT|SMOOTH?",
+ "Object?"
+ ]
+ ]
+ },
+ "makeEdgesFromFaces": {
+ "overloads": [
+ []
+ ]
+ },
+ "normalize": {
+ "overloads": [
+ []
+ ]
+ },
+ "vertexProperty": {
+ "overloads": [
+ [
+ "String",
+ "Number|Number[]",
+ "Number?"
+ ]
+ ]
+ }
+ },
+ "p5.Color": {
+ "toString": {
+ "overloads": [
+ [
+ "String?"
+ ]
+ ]
+ },
+ "setRed": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "setGreen": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "setBlue": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "setAlpha": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ }
+ },
+ "p5.Graphics": {
+ "reset": {
+ "overloads": [
+ []
+ ]
+ },
+ "remove": {
+ "overloads": [
+ []
+ ]
+ },
+ "createFramebuffer": {
+ "overloads": [
+ [
+ "Object?"
+ ]
+ ]
+ }
+ },
+ "p5.Element": {
+ "remove": {
+ "overloads": [
+ []
+ ]
+ },
+ "parent": {
+ "overloads": [
+ [
+ "String|p5.Element|Object"
+ ],
+ []
+ ]
+ },
+ "child": {
+ "overloads": [
+ [],
+ [
+ "String|p5.Element?"
+ ]
+ ]
+ },
+ "html": {
+ "overloads": [
+ [],
+ [
+ "String?",
+ "Boolean?"
+ ]
+ ]
+ },
+ "id": {
+ "overloads": [
+ [
+ "String"
+ ],
+ []
+ ]
+ },
+ "class": {
+ "overloads": [
+ [
+ "String"
+ ],
+ []
+ ]
+ },
+ "addClass": {
+ "overloads": [
+ [
+ "String"
+ ]
+ ]
+ },
+ "removeClass": {
+ "overloads": [
+ [
+ "String"
+ ]
+ ]
+ },
+ "hasClass": {
+ "overloads": [
+ [
+ null
+ ]
+ ]
+ },
+ "toggleClass": {
+ "overloads": [
+ [
+ null
+ ]
+ ]
+ },
+ "center": {
+ "overloads": [
+ [
+ "String?"
+ ]
+ ]
+ },
+ "position": {
+ "overloads": [
+ [],
+ [
+ "Number?",
+ "Number?",
+ "String?"
+ ]
+ ]
+ },
+ "show": {
+ "overloads": [
+ []
+ ]
+ },
+ "hide": {
+ "overloads": [
+ []
+ ]
+ },
+ "size": {
+ "overloads": [
+ [],
+ [
+ "Number|AUTO?",
+ "Number|AUTO?"
+ ]
+ ]
+ },
+ "style": {
+ "overloads": [
+ [
+ "String"
+ ],
+ [
+ "String",
+ "String|p5.Color"
+ ]
+ ]
+ },
+ "attribute": {
+ "overloads": [
+ [],
+ [
+ "String",
+ "String"
+ ]
+ ]
+ },
+ "removeAttribute": {
+ "overloads": [
+ [
+ "String"
+ ]
+ ]
+ },
+ "value": {
+ "overloads": [
+ [],
+ [
+ "String|Number"
+ ]
+ ]
+ },
+ "mousePressed": {
+ "overloads": [
+ [
+ "Function|Boolean"
+ ]
+ ]
+ },
+ "doubleClicked": {
+ "overloads": [
+ [
+ "Function|Boolean"
+ ]
+ ]
+ },
+ "mouseWheel": {
+ "overloads": [
+ [
+ "Function|Boolean"
+ ]
+ ]
+ },
+ "mouseReleased": {
+ "overloads": [
+ [
+ "Function|Boolean"
+ ]
+ ]
+ },
+ "mouseClicked": {
+ "overloads": [
+ [
+ "Function|Boolean"
+ ]
+ ]
+ },
+ "mouseMoved": {
+ "overloads": [
+ [
+ "Function|Boolean"
+ ]
+ ]
+ },
+ "mouseOver": {
+ "overloads": [
+ [
+ "Function|Boolean"
+ ]
+ ]
+ },
+ "mouseOut": {
+ "overloads": [
+ [
+ "Function|Boolean"
+ ]
+ ]
+ },
+ "dragOver": {
+ "overloads": [
+ [
+ "Function|Boolean"
+ ]
+ ]
+ },
+ "dragLeave": {
+ "overloads": [
+ [
+ "Function|Boolean"
+ ]
+ ]
+ },
+ "changed": {
+ "overloads": [
+ [
+ "Function|Boolean"
+ ]
+ ]
+ },
+ "input": {
+ "overloads": [
+ [
+ "Function|Boolean"
+ ]
+ ]
+ },
+ "drop": {
+ "overloads": [
+ [
+ "Function",
+ "Function?"
+ ]
+ ]
+ },
+ "draggable": {
+ "overloads": [
+ [
+ "p5.Element?"
+ ]
+ ]
+ }
+ },
+ "p5.MediaElement": {
+ "play": {
+ "overloads": [
+ []
+ ]
+ },
+ "stop": {
+ "overloads": [
+ []
+ ]
+ },
+ "pause": {
+ "overloads": [
+ []
+ ]
+ },
+ "loop": {
+ "overloads": [
+ []
+ ]
+ },
+ "noLoop": {
+ "overloads": [
+ []
+ ]
+ },
+ "autoplay": {
+ "overloads": [
+ [
+ "Boolean?"
+ ]
+ ]
+ },
+ "volume": {
+ "overloads": [
+ [],
+ [
+ "Number"
+ ]
+ ]
+ },
+ "speed": {
+ "overloads": [
+ [],
+ [
+ "Number"
+ ]
+ ]
+ },
+ "time": {
+ "overloads": [
+ [],
+ [
+ "Number"
+ ]
+ ]
+ },
+ "duration": {
+ "overloads": [
+ []
+ ]
+ },
+ "onended": {
+ "overloads": [
+ [
+ "Function"
+ ]
+ ]
+ },
+ "connect": {
+ "overloads": [
+ [
+ "AudioNode|Object"
+ ]
+ ]
+ },
+ "disconnect": {
+ "overloads": [
+ []
+ ]
+ },
+ "showControls": {
+ "overloads": [
+ []
+ ]
+ },
+ "hideControls": {
+ "overloads": [
+ []
+ ]
+ },
+ "addCue": {
+ "overloads": [
+ [
+ "Number",
+ "Function",
+ "Object?"
+ ]
+ ]
+ },
+ "removeCue": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "clearCues": {
+ "overloads": [
+ []
+ ]
+ }
+ },
+ "p5.Image": {
+ "pixelDensity": {
+ "overloads": [
+ [
+ "Number?"
+ ]
+ ]
+ },
+ "loadPixels": {
+ "overloads": [
+ []
+ ]
+ },
+ "updatePixels": {
+ "overloads": [
+ [
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer"
+ ]
+ ]
+ },
+ "get": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [],
+ [
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "set": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number|Number[]|Object"
+ ]
+ ]
+ },
+ "resize": {
+ "overloads": [
+ [
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "copy": {
+ "overloads": [
+ [
+ "p5.Image|p5.Element",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer"
+ ],
+ [
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer"
+ ]
+ ]
+ },
+ "mask": {
+ "overloads": [
+ [
+ "p5.Image"
+ ]
+ ]
+ },
+ "filter": {
+ "overloads": [
+ [
+ "THRESHOLD|GRAY|OPAQUE|INVERT|POSTERIZE|ERODE|DILATE|BLUR",
+ "Number?"
+ ]
+ ]
+ },
+ "blend": {
+ "overloads": [
+ [
+ "p5.Image",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
+ ],
+ [
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "Integer",
+ "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
+ ]
+ ]
+ },
+ "save": {
+ "overloads": [
+ [
+ "String",
+ "String?"
+ ]
+ ]
+ },
+ "reset": {
+ "overloads": [
+ []
+ ]
+ },
+ "getCurrentFrame": {
+ "overloads": [
+ []
+ ]
+ },
+ "setFrame": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "numFrames": {
+ "overloads": [
+ []
+ ]
+ },
+ "play": {
+ "overloads": [
+ []
+ ]
+ },
+ "pause": {
+ "overloads": [
+ []
+ ]
+ },
+ "delay": {
+ "overloads": [
+ [
+ "Number",
+ "Number?"
+ ]
+ ]
+ }
+ },
+ "p5.Table": {
+ "addRow": {
+ "overloads": [
+ [
+ "p5.TableRow?"
+ ]
+ ]
+ },
+ "removeRow": {
+ "overloads": [
+ [
+ "Integer"
+ ]
+ ]
+ },
+ "getRow": {
+ "overloads": [
+ [
+ "Integer"
+ ]
+ ]
+ },
+ "getRows": {
+ "overloads": [
+ []
+ ]
+ },
+ "findRow": {
+ "overloads": [
+ [
+ "String",
+ "Integer|String"
+ ]
+ ]
+ },
+ "findRows": {
+ "overloads": [
+ [
+ "String",
+ "Integer|String"
+ ]
+ ]
+ },
+ "matchRow": {
+ "overloads": [
+ [
+ "String|RegExp",
+ "String|Integer"
+ ]
+ ]
+ },
+ "matchRows": {
+ "overloads": [
+ [
+ "String",
+ "String|Integer?"
+ ]
+ ]
+ },
+ "getColumn": {
+ "overloads": [
+ [
+ "String|Number"
+ ]
+ ]
+ },
+ "clearRows": {
+ "overloads": [
+ []
+ ]
+ },
+ "addColumn": {
+ "overloads": [
+ [
+ "String?"
+ ]
+ ]
+ },
+ "getColumnCount": {
+ "overloads": [
+ []
+ ]
+ },
+ "getRowCount": {
+ "overloads": [
+ []
+ ]
+ },
+ "removeTokens": {
+ "overloads": [
+ [
+ "String",
+ "String|Integer?"
+ ]
+ ]
+ },
+ "trim": {
+ "overloads": [
+ [
+ "String|Integer?"
+ ]
+ ]
+ },
+ "removeColumn": {
+ "overloads": [
+ [
+ "String|Integer"
+ ]
+ ]
+ },
+ "set": {
+ "overloads": [
+ [
+ "Integer",
+ "String|Integer",
+ "String|Number"
+ ]
+ ]
+ },
+ "setNum": {
+ "overloads": [
+ [
+ "Integer",
+ "String|Integer",
+ "Number"
+ ]
+ ]
+ },
+ "setString": {
+ "overloads": [
+ [
+ "Integer",
+ "String|Integer",
+ "String"
+ ]
+ ]
+ },
+ "get": {
+ "overloads": [
+ [
+ "Integer",
+ "String|Integer"
+ ]
+ ]
+ },
+ "getNum": {
+ "overloads": [
+ [
+ "Integer",
+ "String|Integer"
+ ]
+ ]
+ },
+ "getString": {
+ "overloads": [
+ [
+ "Integer",
+ "String|Integer"
+ ]
+ ]
+ },
+ "getObject": {
+ "overloads": [
+ [
+ "String?"
+ ]
+ ]
+ },
+ "getArray": {
+ "overloads": [
+ []
+ ]
+ }
+ },
+ "p5.TableRow": {
+ "set": {
+ "overloads": [
+ [
+ "String|Integer",
+ "String|Number"
+ ]
+ ]
+ },
+ "setNum": {
+ "overloads": [
+ [
+ "String|Integer",
+ "Number|String"
+ ]
+ ]
+ },
+ "setString": {
+ "overloads": [
+ [
+ "String|Integer",
+ "String|Number|Boolean|Object"
+ ]
+ ]
+ },
+ "get": {
+ "overloads": [
+ [
+ "String|Integer"
+ ]
+ ]
+ },
+ "getNum": {
+ "overloads": [
+ [
+ "String|Integer"
+ ]
+ ]
+ },
+ "getString": {
+ "overloads": [
+ [
+ "String|Integer"
+ ]
+ ]
+ }
+ },
+ "p5.XML": {
+ "getParent": {
+ "overloads": [
+ []
+ ]
+ },
+ "getName": {
+ "overloads": [
+ []
+ ]
+ },
+ "setName": {
+ "overloads": [
+ [
+ "String"
+ ]
+ ]
+ },
+ "hasChildren": {
+ "overloads": [
+ []
+ ]
+ },
+ "listChildren": {
+ "overloads": [
+ []
+ ]
+ },
+ "getChildren": {
+ "overloads": [
+ [
+ "String?"
+ ]
+ ]
+ },
+ "getChild": {
+ "overloads": [
+ [
+ "String|Integer"
+ ]
+ ]
+ },
+ "addChild": {
+ "overloads": [
+ [
+ "p5.XML"
+ ]
+ ]
+ },
+ "removeChild": {
+ "overloads": [
+ [
+ "String|Integer"
+ ]
+ ]
+ },
+ "getAttributeCount": {
+ "overloads": [
+ []
+ ]
+ },
+ "listAttributes": {
+ "overloads": [
+ []
+ ]
+ },
+ "hasAttribute": {
+ "overloads": [
+ [
+ "String"
+ ]
+ ]
+ },
+ "getNum": {
+ "overloads": [
+ [
+ "String",
+ "Number?"
+ ]
+ ]
+ },
+ "getString": {
+ "overloads": [
+ [
+ "String",
+ "Number?"
+ ]
+ ]
+ },
+ "setAttribute": {
+ "overloads": [
+ [
+ "String",
+ "Number|String|Boolean"
+ ]
+ ]
+ },
+ "getContent": {
+ "overloads": [
+ [
+ "String?"
+ ]
+ ]
+ },
+ "serialize": {
+ "overloads": [
+ []
+ ]
+ }
+ },
+ "p5.Vector": {
+ "getValue": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "setValue": {
+ "overloads": [
+ [
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "set": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "p5.Vector|Number[]"
+ ]
+ ]
+ },
+ "copy": {
+ "overloads": [
+ [],
+ [
+ "p5.Vector"
+ ]
+ ]
+ },
+ "add": {
+ "overloads": [
+ [
+ "Number|Array",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "p5.Vector|Number[]"
+ ],
+ [
+ "p5.Vector",
+ "p5.Vector",
+ "p5.Vector?"
+ ]
+ ]
+ },
+ "rem": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "p5.Vector|Number[]"
+ ],
+ [
+ "p5.Vector",
+ "p5.Vector"
+ ]
+ ]
+ },
+ "sub": {
+ "overloads": [
+ [
+ "Number",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "p5.Vector|Number[]"
+ ],
+ [
+ "p5.Vector",
+ "p5.Vector",
+ "p5.Vector?"
+ ]
+ ]
+ },
+ "mult": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number[]"
+ ],
+ [
+ "p5.Vector"
+ ],
+ [],
+ [
+ "p5.Vector",
+ "Number",
+ "p5.Vector?"
+ ],
+ [
+ "p5.Vector",
+ "p5.Vector",
+ "p5.Vector?"
+ ],
+ [
+ "p5.Vector",
+ "Number[]",
+ "p5.Vector?"
+ ]
+ ]
+ },
+ "div": {
+ "overloads": [
+ [
+ "Number"
+ ],
+ [
+ "Number",
+ "Number",
+ "Number?"
+ ],
+ [
+ "Number[]"
+ ],
+ [
+ "p5.Vector"
+ ],
+ [],
+ [
+ "p5.Vector",
+ "Number",
+ "p5.Vector?"
+ ],
+ [
+ "p5.Vector",
+ "p5.Vector",
+ "p5.Vector?"
+ ],
+ [
+ "p5.Vector",
+ "Number[]",
+ "p5.Vector?"
+ ]
+ ]
+ },
+ "mag": {
+ "overloads": [
+ [],
+ [
+ "p5.Vector"
+ ]
+ ]
+ },
+ "magSq": {
+ "overloads": [
+ [],
+ [
+ "p5.Vector"
+ ]
+ ]
+ },
+ "dot": {
+ "overloads": [
+ [
+ "Number",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "p5.Vector"
+ ],
+ [],
+ [
+ "p5.Vector",
+ "p5.Vector"
+ ]
+ ]
+ },
+ "cross": {
+ "overloads": [
+ [
+ "p5.Vector"
+ ],
+ [],
+ [
+ "p5.Vector",
+ "p5.Vector"
+ ]
+ ]
+ },
+ "normalize": {
+ "overloads": [
+ [],
+ [
+ "p5.Vector",
+ "p5.Vector?"
+ ]
+ ]
+ },
+ "limit": {
+ "overloads": [
+ [
+ "Number"
+ ],
+ [],
+ [
+ "p5.Vector",
+ "Number",
+ "p5.Vector?"
+ ]
+ ]
+ },
+ "setMag": {
+ "overloads": [
+ [
+ "Number"
+ ],
+ [],
+ [
+ "p5.Vector",
+ "Number",
+ "p5.Vector?"
+ ]
+ ]
+ },
+ "heading": {
+ "overloads": [
+ [],
+ [
+ "p5.Vector"
+ ]
+ ]
+ },
+ "setHeading": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "rotate": {
+ "overloads": [
+ [
+ "Number"
+ ],
+ [],
+ [
+ "p5.Vector",
+ "Number",
+ "p5.Vector?"
+ ]
+ ]
+ },
+ "angleBetween": {
+ "overloads": [
+ [
+ "p5.Vector"
+ ],
+ [],
+ [
+ "p5.Vector",
+ "p5.Vector"
+ ]
+ ]
+ },
+ "lerp": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [
+ "p5.Vector",
+ "Number"
+ ],
+ [],
+ [
+ "p5.Vector",
+ "p5.Vector",
+ "Number",
+ "p5.Vector?"
+ ]
+ ]
+ },
+ "slerp": {
+ "overloads": [
+ [
+ "p5.Vector",
+ "Number"
+ ],
+ [],
+ [
+ "p5.Vector",
+ "p5.Vector",
+ "Number",
+ "p5.Vector?"
+ ]
+ ]
+ },
+ "reflect": {
+ "overloads": [
+ [
+ "p5.Vector"
+ ],
+ [],
+ [
+ "p5.Vector",
+ "p5.Vector",
+ "p5.Vector?"
+ ]
+ ]
+ },
+ "array": {
+ "overloads": [
+ [],
+ [
+ "p5.Vector"
+ ]
+ ]
+ },
+ "equals": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?"
+ ],
+ [
+ "p5.Vector|Array"
+ ],
+ [],
+ [
+ "p5.Vector|Array",
+ "p5.Vector|Array"
+ ]
+ ]
+ },
+ "fromAngle": {
+ "overloads": [
+ [
+ "Number",
+ "Number?"
+ ]
+ ]
+ },
+ "fromAngles": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number?"
+ ]
+ ]
+ },
+ "random2D": {
+ "overloads": [
+ []
+ ]
+ },
+ "random3D": {
+ "overloads": [
+ []
+ ]
+ },
+ "dist": {
+ "overloads": [
+ [],
+ [
+ "p5.Vector",
+ "p5.Vector"
+ ]
+ ]
+ }
+ },
+ "p5.Font": {
+ "textToPaths": {
+ "overloads": [
+ [
+ "String",
+ "Number",
+ "Number",
+ "Number?",
+ "Number?",
+ "Object?"
+ ]
+ ]
+ },
+ "textToPoints": {
+ "overloads": [
+ [
+ "String",
+ "Number",
+ "Number",
+ "Object?"
+ ]
+ ]
+ },
+ "textToContours": {
+ "overloads": [
+ [
+ "String",
+ "Number",
+ "Number",
+ "Object?"
+ ]
+ ]
+ },
+ "textToModel": {
+ "overloads": [
+ [
+ "String",
+ "Number",
+ "Number",
+ "Number",
+ "Number",
+ "Object?"
+ ]
+ ]
+ }
+ },
+ "p5.Camera": {
+ "perspective": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "ortho": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "frustum": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "pan": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "tilt": {
+ "overloads": [
+ [
+ "Number"
+ ]
+ ]
+ },
+ "lookAt": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "camera": {
+ "overloads": [
+ [
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?",
+ "Number?"
+ ]
+ ]
+ },
+ "move": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "setPosition": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "set": {
+ "overloads": [
+ [
+ "p5.Camera"
+ ]
+ ]
+ },
+ "slerp": {
+ "overloads": [
+ [
+ "p5.Camera",
+ "p5.Camera",
+ "Number"
+ ]
+ ]
+ }
+ },
+ "p5.Framebuffer": {
+ "resize": {
+ "overloads": [
+ [
+ "Number",
+ "Number"
+ ]
+ ]
+ },
+ "pixelDensity": {
+ "overloads": [
+ [
+ "Number?"
+ ]
+ ]
+ },
+ "autoSized": {
+ "overloads": [
+ [
+ "Boolean?"
+ ]
+ ]
+ },
+ "createCamera": {
+ "overloads": [
+ []
+ ]
+ },
+ "remove": {
+ "overloads": [
+ []
+ ]
+ },
+ "begin": {
+ "overloads": [
+ []
+ ]
+ },
+ "end": {
+ "overloads": [
+ []
+ ]
+ },
+ "draw": {
+ "overloads": [
+ [
+ "Function"
+ ]
+ ]
+ },
+ "get": {
+ "overloads": [
+ [
+ "Number",
+ "Number",
+ "Number",
+ "Number"
+ ],
+ [],
+ [
+ "Number",
+ "Number"
+ ]
+ ]
+ }
+ },
+ "p5.Shader": {
+ "version": {
+ "overloads": [
+ []
+ ]
+ },
+ "inspectHooks": {
+ "overloads": [
+ []
+ ]
+ },
+ "modify": {
+ "overloads": [
+ [
+ "Object?"
+ ]
+ ]
+ },
+ "copyToContext": {
+ "overloads": [
+ [
+ "p5|p5.Graphics"
+ ]
+ ]
+ },
+ "setUniform": {
+ "overloads": [
+ [
+ "String",
+ "Boolean|Number|Number[]|p5.Image|p5.Graphics|p5.MediaElement|p5.Texture"
+ ]
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/docs/preprocessor.js b/docs/preprocessor.js
deleted file mode 100644
index 7826816885..0000000000
--- a/docs/preprocessor.js
+++ /dev/null
@@ -1,314 +0,0 @@
-const marked = require('marked');
-const Entities = require('html-entities').AllHtmlEntities;
-
-const DocumentedMethod = require('./documented-method');
-
-function smokeTestMethods(data) {
- data.classitems.forEach(function(classitem) {
- if (classitem.itemtype === 'method') {
- new DocumentedMethod(classitem);
-
- if (
- classitem.access !== 'private' &&
- classitem.file.slice(0, 3) === 'src' &&
- classitem.name &&
- !classitem.example
- ) {
- console.log(
- classitem.file +
- ':' +
- classitem.line +
- ': ' +
- classitem.itemtype +
- ' ' +
- classitem.class +
- '.' +
- classitem.name +
- ' missing example'
- );
- }
- }
- });
-}
-
-function mergeOverloadedMethods(data) {
- let methodsByFullName = {};
- let paramsForOverloadedMethods = {};
-
- let consts = (data.consts = {});
-
- data.classitems = data.classitems.filter(function(classitem) {
- if (classitem.access === 'private') {
- return false;
- }
-
- const itemClass = data.classes[classitem.class];
- if (!itemClass || itemClass.private) {
- return false;
- }
-
- let methodConsts = {};
-
- let fullName, method;
-
- var assertEqual = function(a, b, msg) {
- if (a !== b) {
- throw new Error(
- 'for ' +
- fullName +
- '() defined in ' +
- classitem.file +
- ':' +
- classitem.line +
- ', ' +
- msg +
- ' (' +
- JSON.stringify(a) +
- ' !== ' +
- JSON.stringify(b) +
- ')'
- );
- }
- };
-
- var extractConsts = function(param) {
- if (!param.type) {
- console.log(param);
- }
- if (param.type.split('|').indexOf('Constant') >= 0) {
- let match;
- if (classitem.name === 'endShape' && param.name === 'mode') {
- match = 'CLOSE';
- } else {
- const constantRe = /either\s+(?:[A-Z0-9_]+\s*,?\s*(?:or)?\s*)+/g;
- const execResult = constantRe.exec(param.description);
- match = execResult && execResult[0];
- if (!match) {
- throw new Error(
- classitem.file +
- ':' +
- classitem.line +
- ', Constant-typed parameter ' +
- fullName +
- '(...' +
- param.name +
- '...) is missing valid value enumeration. ' +
- 'See inline_documentation.md#specify-parameters.'
- );
- }
- }
- if (match) {
- const reConst = /[A-Z0-9_]+/g;
- let matchConst;
- while ((matchConst = reConst.exec(match)) !== null) {
- methodConsts[matchConst] = true;
- }
- }
- }
- };
-
- var processOverloadedParams = function(params) {
- let paramNames;
-
- if (!(fullName in paramsForOverloadedMethods)) {
- paramsForOverloadedMethods[fullName] = {};
- }
-
- paramNames = paramsForOverloadedMethods[fullName];
-
- params.forEach(function(param) {
- const origParam = paramNames[param.name];
-
- if (origParam) {
- assertEqual(
- origParam.type,
- param.type,
- 'types for param "' +
- param.name +
- '" must match ' +
- 'across all overloads'
- );
- assertEqual(
- param.description,
- '',
- 'description for param "' +
- param.name +
- '" should ' +
- 'only be defined in its first use; subsequent ' +
- 'overloads should leave it empty'
- );
- } else {
- paramNames[param.name] = param;
- extractConsts(param);
- }
- });
-
- return params;
- };
-
- if (classitem.itemtype && classitem.itemtype === 'method') {
- fullName = classitem.class + '.' + classitem.name;
- if (fullName in methodsByFullName) {
- // It's an overloaded version of a method that we've already
- // indexed. We need to make sure that we don't list it multiple
- // times in our index pages and such.
-
- method = methodsByFullName[fullName];
-
- assertEqual(
- method.file,
- classitem.file,
- 'all overloads must be defined in the same file'
- );
- assertEqual(
- method.module,
- classitem.module,
- 'all overloads must be defined in the same module'
- );
- assertEqual(
- method.submodule,
- classitem.submodule,
- 'all overloads must be defined in the same submodule'
- );
- assertEqual(
- classitem.description || '',
- '',
- 'additional overloads should have no description'
- );
-
- var makeOverload = function(method) {
- const overload = {
- line: method.line,
- params: processOverloadedParams(method.params || [])
- };
- // TODO: the doc renderer assumes (incorrectly) that
- // these are the same for all overrides
- if (method.static) overload.static = method.static;
- if (method.chainable) overload.chainable = method.chainable;
- if (method.return) overload.return = method.return;
- return overload;
- };
-
- if (!method.overloads) {
- method.overloads = [makeOverload(method)];
- delete method.params;
- }
- method.overloads.push(makeOverload(classitem));
- return false;
- } else {
- if (classitem.params) {
- classitem.params.forEach(function(param) {
- extractConsts(param);
- });
- }
- methodsByFullName[fullName] = classitem;
- }
-
- Object.keys(methodConsts).forEach(constName =>
- (consts[constName] || (consts[constName] = [])).push(fullName)
- );
- }
- return true;
- });
-}
-
-// build a copy of data.json for the FES, restructured for object lookup on
-// classitems and removing all the parts not needed by the FES
-function buildParamDocs(docs) {
- let newClassItems = {};
- // the fields we need for the FES, discard everything else
- let allowed = new Set(['name', 'class', 'module', 'params', 'overloads']);
- for (let classitem of docs.classitems) {
- if (classitem.name && classitem.class) {
- for (let key in classitem) {
- if (!allowed.has(key)) {
- delete classitem[key];
- }
- }
- if (classitem.hasOwnProperty('overloads')) {
- for (let overload of classitem.overloads) {
- // remove line number and return type
- if (overload.line) {
- delete overload.line;
- }
-
- if (overload.return) {
- delete overload.return;
- }
- }
- }
- if (!newClassItems[classitem.class]) {
- newClassItems[classitem.class] = {};
- }
-
- newClassItems[classitem.class][classitem.name] = classitem;
- }
- }
-
- let fs = require('fs');
- let path = require('path');
- let out = fs.createWriteStream(
- path.join(process.cwd(), 'docs', 'parameterData.json'),
- {
- flags: 'w',
- mode: '0644'
- }
- );
- out.write(JSON.stringify(newClassItems, null, 2));
- out.end();
-}
-
-function renderItemDescriptionsAsMarkdown(item) {
- if (item.description) {
- const entities = new Entities();
- item.description = entities.decode(marked.parse(item.description));
- }
- if (item.params) {
- item.params.forEach(renderItemDescriptionsAsMarkdown);
- }
-}
-
-function renderDescriptionsAsMarkdown(data) {
- Object.keys(data.modules).forEach(function(moduleName) {
- renderItemDescriptionsAsMarkdown(data.modules[moduleName]);
- });
- Object.keys(data.classes).forEach(function(className) {
- renderItemDescriptionsAsMarkdown(data.classes[className]);
- });
- data.classitems.forEach(function(classitem) {
- renderItemDescriptionsAsMarkdown(classitem);
- });
-}
-
-module.exports = (data, options) => {
- data.classitems
- .filter(
- ci => !ci.itemtype && (ci.params || ci.return) && ci.access !== 'private'
- )
- .forEach(ci => {
- console.error(ci.file + ':' + ci.line + ': unnamed public member');
- });
-
- Object.keys(data.classes)
- .filter(k => data.classes[k].access === 'private')
- .forEach(k => delete data.classes[k]);
-
- renderDescriptionsAsMarkdown(data);
- mergeOverloadedMethods(data);
- smokeTestMethods(data);
- buildParamDocs(JSON.parse(JSON.stringify(data)));
-};
-
-module.exports.mergeOverloadedMethods = mergeOverloadedMethods;
-module.exports.renderDescriptionsAsMarkdown = renderDescriptionsAsMarkdown;
-
-module.exports.register = (Handlebars, options) => {
- Handlebars.registerHelper('root', function(context, options) {
- // if (this.language === 'en') {
- // return '';
- // } else {
- // return '/'+this.language;
- // }
- return window.location.pathname;
- });
-};
diff --git a/docs/yuidoc-p5-theme/assets/Bold.ttf b/docs/yuidoc-p5-theme/assets/Bold.ttf
deleted file mode 100644
index 50d81bdad5..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/Bold.ttf and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/Damscray.mp3 b/docs/yuidoc-p5-theme/assets/Damscray.mp3
deleted file mode 100644
index b113049905..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/Damscray.mp3 and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/Damscray.ogg b/docs/yuidoc-p5-theme/assets/Damscray.ogg
deleted file mode 100644
index 77d530a2df..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/Damscray.ogg and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/Damscray_-_Dancing_Tiger_01.ogg b/docs/yuidoc-p5-theme/assets/Damscray_-_Dancing_Tiger_01.ogg
deleted file mode 100644
index ddb329fc15..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/Damscray_-_Dancing_Tiger_01.ogg and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/Damscray_-_Dancing_Tiger_02.mp3 b/docs/yuidoc-p5-theme/assets/Damscray_-_Dancing_Tiger_02.mp3
deleted file mode 100644
index b113049905..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/Damscray_-_Dancing_Tiger_02.mp3 and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/Damscray_01.mp3 b/docs/yuidoc-p5-theme/assets/Damscray_01.mp3
deleted file mode 100644
index 9653a67bb6..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/Damscray_01.mp3 and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/Damscray_01.ogg b/docs/yuidoc-p5-theme/assets/Damscray_01.ogg
deleted file mode 100644
index ddb329fc15..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/Damscray_01.ogg and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/Damscray_02.mp3 b/docs/yuidoc-p5-theme/assets/Damscray_02.mp3
deleted file mode 100644
index b113049905..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/Damscray_02.mp3 and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/Damscray_02.ogg b/docs/yuidoc-p5-theme/assets/Damscray_02.ogg
deleted file mode 100644
index 77d530a2df..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/Damscray_02.ogg and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/Damscray_DancingTiger.mp3 b/docs/yuidoc-p5-theme/assets/Damscray_DancingTiger.mp3
deleted file mode 100644
index b113049905..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/Damscray_DancingTiger.mp3 and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/Italic.ttf b/docs/yuidoc-p5-theme/assets/Italic.ttf
deleted file mode 100644
index e5a1a86e63..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/Italic.ttf and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/Regular.otf b/docs/yuidoc-p5-theme/assets/Regular.otf
deleted file mode 100644
index 38941ae72f..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/Regular.otf and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/all.css b/docs/yuidoc-p5-theme/assets/all.css
deleted file mode 100644
index f73622fcba..0000000000
--- a/docs/yuidoc-p5-theme/assets/all.css
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! normalize.css v1.1.0 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}button,html,input,select,textarea{font-family:sans-serif}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{margin:.83em 0}h3{font-size:1.17em;margin:1em 0}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.67em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:1em 40px}dfn{font-style:italic}hr{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}p,pre{margin:1em 0}code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,menu,ol,ul{margin:1em 0}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style:none;list-style-image:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure,form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0;*height:13px;*width:13px}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}
-;code[class*=language-],pre[class*=language-],textarea{color:#222;font-family:Inconsolata,Consolas,Monaco,Andale Mono,monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;font-size:1em!important}pre[class*=language-]{position:relative;padding:.5em 1em;margin:.5em 0 0 -.5em;border-left:.5em solid #afafaf;background-color:#fff;background-image:-webkit-linear-gradient(transparent 50%,rgba(69,142,209,.06) 0);background-image:-o-linear-gradient(transparent 50%,rgba(69,142,209,.06) 50%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(50%,transparent),color-stop(50%,rgba(69,142,209,.06)));background-image:linear-gradient(transparent 50%,rgba(69,142,209,.06) 0);-webkit-background-size:2.9em 2.9em;background-size:2.9em 2.9em;-webkit-background-origin:content-box;background-origin:content-box;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{margin-bottom:1em}:not(pre)>code[class*=language-]{position:relative;padding:.2em;border-radius:.3em;color:#333;border:1px solid rgba(0,0,0,.1)}:not(pre)>code[class*=language-]:after,pre[class*=language-]:after{right:.75em;left:auto}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#a0a0a0}.token.punctuation{color:#666}.token.boolean,.token.constant,.token.function-name,.token.number,.token.property,.token.symbol,.token.tag{color:#dc3787}.token.attr-name,.token.builtin,.token.function,.token.selector,.token.string{color:#00a1d3}.token.entity,.token.operator,.token.url,.token.variable{color:#a67f59;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.class-name,.token.keyword{color:#704f21}.token.important,.token.regex{color:#e90}.language-css .token.string,.style .token.string{color:#a67f59;background:hsla(0,0%,100%,.5)}.token.important{font-weight:400}.token.entity{cursor:help}.namespace{opacity:.7}@media screen and (max-width:767px){pre[class*=language-]:after,pre[class*=language-]:before{bottom:14px;-webkit-box-shadow:none;box-shadow:none}}.token.cr:before,.token.lf:before,.token.tab:not(:empty):before{color:#e0d7d1}pre.line-numbers{padding-left:3.8em;counter-reset:linenumber}pre.line-numbers,pre.line-numbers>code{position:relative}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}
-;button,html,input,select{color:#222}textarea{line-height:1.45em;padding:.5em 1em;border:none}body{font-size:1em;line-height:1.4}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}img{vertical-align:middle}img.med_left{width:300px;float:left}img.med_right{width:300px;float:right}img.small_left{width:200px;float:left}img.smaller_left{width:140px;float:left}img.small_right{width:200px;float:right}img.smaller_right{width:140px;float:right}img.small_center{width:200px;margin-left:250px}img.small{width:160px}img.med{width:400px}img.med_center{width:400px;margin-left:150px}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.tagline{display:none}#home-page .home{pointer-events:none}#home-page .home a{pointer-events:all}#lockup>a{position:relative;display:block;width:200px;height:90px}#logo_image{position:absolute;top:0}#menu,#menu.top_menu{list-style:none;font-family:Montserrat,sans-serif;width:100%;margin:0 0 1em;padding:0;height:100%;font-size:1.3em}#menu.top_menu li{display:inline}#home-sketch{position:absolute;top:0;left:0;z-index:-2}@media screen and (max-width:780px){.sidebar-menu{clear:both;max-height:0;-webkit-transition:max-height .4s ease-out;-o-transition:max-height .4s ease-out;transition:max-height .4s ease-out;overflow:hidden}.sidebar-menu-nav-element{width:91vw}.sidebar-menu a{display:block;text-align:center;padding-bottom:.11em;border-bottom:.11em dashed transparent}.sidebar-menu-icon{top:2rem;cursor:pointer;float:right;padding:28px 20px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-bottom:5rem}.sidebar-menu-icon .sidebar-nav-icon{background:#ed225d;display:block;height:2px;position:relative;-webkit-transition:background .4s ease-out;-o-transition:background .4s ease-out;transition:background .4s ease-out;width:18px}.sidebar-menu-icon .sidebar-nav-icon:after,.sidebar-menu-icon .sidebar-nav-icon:before{background:#ed225d;content:"";display:block;height:100%;position:absolute;-webkit-transition:all .4s ease-out;-o-transition:all .4s ease-out;transition:all .4s ease-out;width:100%}.sidebar-menu-icon .sidebar-nav-icon:before{top:5px}.sidebar-menu-icon .sidebar-nav-icon:after{top:-5px}.sidebar-menu-btn{display:none}.sidebar-menu-btn:checked~.sidebar-menu{max-height:475px}.sidebar-menu-btn:checked~.sidebar-menu-icon .sidebar-nav-icon{background:transparent}.sidebar-menu-btn:checked~.sidebar-menu-icon .sidebar-nav-icon:before{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);top:0}.sidebar-menu-btn:checked~.sidebar-menu-icon .sidebar-nav-icon:after{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);top:0}}.sidebar-menu-btn{display:none}#footer-menu{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;list-style:none;font-family:Montserrat,sans-serif;font-size:1em;padding-top:1em;border-bottom:.11em dashed transparent}#footer-menu li{margin-right:1em}#footer-menu a{color:#ed225d}#home-sketch-frame{position:fixed;width:100%;height:100%;left:0;top:0;z-index:-2;overflow:hidden;pointer-events:all;border:0}#credits{position:fixed;bottom:0;left:0;z-index:2;padding:1em;font-size:.7em}#skip-to-content{position:absolute;left:0;top:40px;z-index:5;background-color:#ed225d;color:#fff;width:auto;height:50px;border:none;outline-style:none;text-align:center;font-size:25px;padding:5px;opacity:0}#skip-to-content:focus{opacity:1}.button_box{padding:.4em .6em;margin:.5em 0;font-family:Montserrat,sans-serif;display:inline-block}.button_box,.download_box{border:1px solid #ed225d;color:#333}.download_box{padding:.4em;margin:0 1.75em 0 0;width:18.65em;float:left;height:7.45em;position:relative}.button_box:hover,.download_box:hover{border:1px solid #ed225d;background:#ed225d;color:#fff}.download_box.half_box{width:10.83em;margin-right:1.75em;float:left}.download_box.half_box.last_box{margin-right:0}.download_box .download_name{font-size:1em;margin:0;padding-bottom:.3em;border-bottom:.09em dashed #ed225d;line-height:1.2;font-family:Montserrat,sans-serif;display:block}.download_box:hover .download_name{-webkit-text-stroke-width:0;border-bottom-color:#fff}.download_box p{font-size:.65em;margin:0;position:absolute;bottom:1em}.download_box svg{height:.65em;width:.65em;position:absolute;bottom:3.5em}.download_box:hover svg{fill:#fff}.download_box h4+p{display:block}#download-page .link_group{width:100%;margin-bottom:3em}.download_box{margin-top:1em}.support div.download_box{margin-top:1em;margin-bottom:1em}#download-page .support p{font-size:.8em;position:static;margin-top:.3em}#slideshow{margin:1em 0}#slideshow p{font-size:.8em;color:#ababab;line-height:1.2em;margin-top:.5em}.extra{color:#fff;position:absolute;bottom:.65em;right:.9em;font-weight:700;-ms-transform:rotate(-12deg);-webkit-transform:rotate(-12deg);-o-transform:rotate(-12deg);transform:rotate(-12deg);font-size:.8em}#get-started-page .edit_space{position:relative;-webkit-box-ordinal-group:4;-webkit-order:3;-ms-flex-order:3;order:3;margin-bottom:4.8125em}#get-started-page .edit_space .copy_button{color:#2d7bb6;border-color:rgba(45,123,182,.25);float:right;margin:1.5em 0 1.5em .5em;background:hsla(0,0%,100%,.7);position:absolute;z-index:2;left:31.33em;top:-1.5em}@media (max-width:780px){#get-started-page .edit_space .copy_button{left:6.44em}}@media (max-width:600px){#get-started-page .edit_space .copy_button{left:5.91em}}#examples-page .column{margin-bottom:2em}#reference-page main h1{float:left}.reference-group h2{font-size:1.5em}.reference-group h3{font-size:1em;font-family:Montserrat,sans-serif;margin-top:.5em}div.reference-group{display:inline-block}div.reference-subgroups{margin:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}div.reference-subgroup{width:11em;margin-bottom:1em}#reference-page .params table p{display:inline;font-size:inherit}#reference-page .param-optional{color:#afafaf}#item{width:100%}#item h2{margin:.777em 0 0;font-size:1.444em;font-weight:inherit;font-family:Inconsolata,consolas,monospace;color:#00a1d3}#item h3{font-size:1.33em;margin:1em 0 0}#item ul{margin-top:.5em}#item li{margin-bottom:1em}#reference-page #item ul{list-style:initial;margin-left:1.5em}#reference-page #item .example_container li,#reference-page #item .params li{margin-bottom:1em}#reference-page #item .example_container ul,#reference-page #item .params ul,#reference-page #item ul[aria-labelledby=reference-fields],#reference-page #item ul[aria-labelledby=reference-methods]{list-style:none;margin-left:0}#reference-page #item li{margin-bottom:.5em}.description{clear:both;display:block;width:100%}.syntax pre{width:100%}.item-wrapper,.list-wrapper{float:left;outline:none}.paramname{display:inline-block;min-width:25%;margin-right:1%;font-size:1.2em}.paramtype p{display:inline;font-size:1em}.paramtype{font-size:1.2em;width:73%;vertical-align:top}#library-page .group-name,.paramtype{display:inline-block}#library-page .group-name:hover{color:#ed225d}.example div{position:relative}.example-content .example_code{position:relative;left:1em;padding-top:0;margin-top:1rem;border:none;width:30.5em;max-width:100%}.example-content .example_code.norender{left:0;margin-left:0}.example-content .edit_space{position:absolute;top:0;left:0;margin-top:-.5em;width:100%;pointer-events:none}.example-content .edit_space *{pointer-events:auto}.example-content .edit_space ul{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;position:relative;pointer-events:none}.example-content .edit_space ul li button{font-family:Montserrat,sans-serif;font-size:1em;color:#ccc;border:1px solid hsla(0,0%,78.4%,.15);background:transparent;outline:none;margin-top:.25em}.example-content .edit_space ul li button:hover,.example_container.editing ul li button{color:#2d7bb6;border-color:rgba(45,123,182,.25)}.example-content .edit_space .edit_area{position:absolute;top:.5em;left:120px;width:30.5em;display:none;font-family:monospace;padding:1.5em .5em .5em;font-size:15pt}.display_button{margin-bottom:2em;font-family:Montserrat,sans-serif;font-size:1em;color:#2d7bb6;border:1px solid rgba(45,123,182,.25);background:transparent;outline:none}.example-content .example_container{width:36em;max-width:100%;border-top:.09em dashed #333;padding-top:.5em;margin-top:2em;min-height:120px;height:-webkit-calc(110% + 20px);height:calc(110% + 20px);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.example-content .example_container:first-of-type{margin-top:1em}@media (max-width:600px){.example-content .example_code{margin-top:.2rem;left:.5rem}.example-content .example_container{width:100%;min-height:220px;height:-webkit-calc(110% + 120px);height:calc(110% + 120px);display:block}.example-content .edit_space .edit_area{top:-webkit-calc(120px + 1em);top:calc(120px + 1em);left:0;width:100%;padding:.5em}.example_container button{top:124px}.description{margin-top:3rem}.edit_button{left:0}.reset_button{left:2.58em}.copy_button{left:5.91em}}form{pointer-events:all}#search_button{background:url(../img/search.png) 100% no-repeat}#search input[type=search],#search input[type=text]{border:1px solid hsla(0,0%,78.4%,.5);font-family:Montserrat,sans-serif;font-size:2.25em;width:9.75em}#search .twitter-typeahead .tt-hint,#search ::-webkit-input-placeholder{color:#ccc}:-moz-placeholder,:-ms-input-placeholder,::-moz-placeholder{color:#ccc}#search input[type=text]:focus{color:#2d7bb6;outline-color:#2d7bb6;outline-width:1px;outline-style:solid}#search .twitter-typeahead .tt-dropdown-menu{background-color:#fff}#search .twitter-typeahead .tt-suggestion.tt-cursor{color:#333;background-color:#eee}#search .twitter-typeahead .tt-suggestion p{margin:0}#search .twitter-typeahead .tt-suggestion p .small{font-size:12px;color:#666}#search{float:right}#search .twitter-typeahead .tt-dropdown-menu{border:1px solid rgba(0,0,0,.2);padding:.5em;max-height:200px;overflow-y:auto;font-size:1em;line-height:1.4em}#search .twitter-typeahead .tt-suggestion{padding:3px 20px;line-height:24px;cursor:pointer}#search .twitter-typeahead .empty-message{padding:8px 20px 1px;font-size:14px;line-height:24px}#search_button{float:right}a.code.core{color:#333}a.code.addon{color:#704f21}#contribute-item{font-size:.75em;text-align:left;display:inline-block;width:320px;height:250px;float:left;border:1px solid #ed225d;margin:0 25px 25px 0;position:relative}.contribute-item-container{position:absolute;z-index:20;margin:0;padding:10px}.container{height:100px;position:relative;background:#fff;margin-top:1.5em}#infoi,#navi{width:100%;height:100%;position:absolute;top:0;left:0}#infoi{z-index:10}h3.contribute-title{font-size:1.33em;margin:0 0 27px;padding-bottom:.3em;border-bottom:.09em dashed #ed225d}.label{position:relative}.label .nounderline img{margin:.5em 0 0}.label h3{color:#fff;position:absolute;top:0;margin:1em}.label:hover h3{color:#ed225d}h3{font-size:1.33em;margin:1em 0 0}.bullet-list{padding:0 0 0 40px;list-style:disc}#libraries-page .label h3{background-color:#000;padding:0 5px}#learn-page .label .nounderline img{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}#learn-page .info{display:inline-block}#exampleDisplay,#exampleEditor,#exampleFrame{width:36em;border:none}#exampleDisplay{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-flow:column;-ms-flex-flow:column;flex-flow:column}#popupExampleFrame{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;border:none}#exampleDisplay button{color:#2d7bb6;border-color:rgba(45,123,182,.25);float:right;margin:.5em 0 0 .5em;background:hsla(0,0%,100%,.7);position:absolute;left:0;z-index:2}#exampleDisplay .edit_button{left:25.42em;top:-2.5em}#exampleDisplay .reset_button{left:28em;top:-2.5em}#exampleDisplay .copy_button{left:31.33em;top:-2.5em}#exampleDisplay button:hover{background:#fff}#exampleDisplay .edit_space{position:relative;-webkit-box-ordinal-group:4;-webkit-order:3;-ms-flex-order:3;order:3}#exampleDisplay #exampleFrame{height:22em;-webkit-box-ordinal-group:3;-webkit-order:2;-ms-flex-order:2;order:2}#exampleDisplay #exampleEditor{height:500em;width:710px;overflow:hidden;margin-top:.5em;color:#222;font-family:Inconsolata,consolas,monospace;font-size:1em;background-color:#fff;line-height:1em;-webkit-box-ordinal-group:5;-webkit-order:4;-ms-flex-order:4;order:4}#exampleDisplay #exampleEditor .ace_gutter-cell{background-image:none;padding-left:10px;overflow:hidden;background-color:#afafaf}#exampleDisplay #exampleEditor .ace_gutter-cell.ace_info{background-color:#d7e5f5}#exampleDisplay #exampleEditor .ace_gutter-cell.ace_warning{background-color:gold;color:#fff}#exampleDisplay #exampleEditor .ace_gutter-cell.ace_error{background-color:tomato;color:#fff}#exampleDisplay #exampleEditor .ace_numeric,#exampleDisplay #exampleEditor .ace_tag{color:#dc3787}#exampleDisplay #exampleEditor .ace_attribute-name,#exampleDisplay #exampleEditor .ace_class,#exampleDisplay #exampleEditor .ace_type{color:#704f21}#exampleDisplay #exampleEditor .ace_function,#exampleDisplay #exampleEditor .ace_keyword,#exampleDisplay #exampleEditor .ace_support{color:#00a1d3}#exampleDisplay #exampleEditor .ace_comment{color:#a0a0a0}#exampleDisplay #exampleEditor .ace_string{color:#a67f59}#exampleDisplay #exampleEditor .ace_operator{color:#333}#exampleDisplay #exampleEditor .ace_regexp{color:#e90}#exampleDisplay #exampleEditor .ace-gutter,#exampleDisplay #exampleEditor .ace-gutter-layer{color:#333}#exampleDisplay #exampleEditor .ace_folding-enabled{width:10px!important;color:#333}.attribution{background-color:#eee;font-size:15px;padding:10px;margin:30px 0}#featuring{margin-bottom:1em}#showcase-page .showcase-intro h1{font:italic 900 14.5vw Montserrat,sans-serif;color:#ed225d;text-align:left;text-transform:uppercase}#showcase-page .showcase-intro p{font:400 1.4rem Montserrat,sans-serif;line-height:1.5em}#showcase-page .project-page h2,#showcase-page .showcase-featured h2{font:italic 900 2rem Montserrat,sans-serif;color:#ed225d;letter-spacing:.05rem}#showcase-page ul.left-column,#showcase-page ul.links,#showcase-page ul.project-tags,#showcase-page ul.right-column{list-style:none}#showcase-page img[alt]{font-size:.9rem}#showcase-page .showcase-featured{margin-top:15%}#showcase-page .showcase-featured h3.title{font:italic 900 1rem Montserrat,sans-serif}#showcase-page .showcase-featured p.credit{font:500 1rem Montserrat,sans-serif}#showcase-page .showcase-featured p.description{font-size:1em;margin-bottom:.5rem}#showcase-page .nominate{margin-top:1.5em;display:inline-block}#showcase-page .nominate a,#showcase-page .nominate a:visited{padding:.4em .5em;position:relative;top:0;left:0;border:2px solid #ed225d;-webkit-box-shadow:4px 4px 0 #ed225d;box-shadow:4px 4px 0 #ed225d;font:1.5rem Montserrat,sans-serif;color:#ed225d;letter-spacing:.02rem;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}@media (max-width:500px){#showcase-page .nominate a,#showcase-page .nominate a:visited{padding:.4em .3em;font:1.3rem Montserrat,sans-serif}}#showcase-page .nominate a:hover{top:4px;left:4px;-webkit-box-shadow:none;box-shadow:none}#showcase-page .showcase-featured a,#showcase-page .showcase-featured a:visited{font-size:1.2rem;color:#ed225d;letter-spacing:.02rem;line-height:1.5}#showcase-page .showcase-featured a:after{content:" →"}#showcase-page .showcase-featured a.tag:after{content:""}#showcase-page .showcase-featured .no-arrow-link:after{content:" "}#showcase-page .showcase-featured .no-arrow-link:hover{text-decoration:none;padding:none;border:none}.project-info{margin-top:1em}ul.project-tags a{line-height:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;font-size:.5em;margin:0}h3.title{margin-top:3em}#showcase-page ul.project-tags li{margin:5px;display:inline-block}h2.featuring{margin-top:0}#showcase-page a.tag{display:inline-block;padding:6px 14px;background-color:#ffe8e8;border-radius:27px;font:.7rem Montserrat,sans-serif;color:#333}#showcase-page ul.project-tags li{margin:0}#showcase-page{margin-top:3em}#showcase-page .project-page h2{line-height:1.4}@media (min-width:720px){#showcase-page .showcase-intro h1{font:italic 900 6.35vw Montserrat,sans-serif}#showcase-page .showcase-intro p{line-height:1.75em;font-size:1em}#showcase-page .project-metadata{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#showcase-page .project-resources{margin-left:3rem}#showcase-page .project-a{width:90%;float:right;display:inline-block;clear:both}#showcase-page .half-image{width:48%}}#showcase-page .project-metadata{margin-top:3%}#showcase-page .project-metadata section h3{color:#ed225d;font:700 italic 1rem Montserrat,sans-serif}#showcase-page .project-resources ul.links{font:500 .7rem Montserrat,sans-serif;letter-spacing:.01rem;line-height:1.5;margin:.5rem 0}#showcase-page .project-credit{font:italic 700 1.25rem Montserrat,sans-serif}#showcase-page .project-credit p{margin:.5rem 0}#showcase-page .creator-from,#showcase-page .note{font-size:.7rem}#showcase-page .qa-group{margin-bottom:2em}#showcase-page .project-q{margin-left:0;display:inline-block;clear:both;font:900 1.2rem Montserrat,sans-serif;line-height:1.5}#showcase-page code{font-size:1.1rem}#teach-page .case-list a:hover{border-bottom:none}#teach-page .heading{width:100%;font:400 1.4rem Montserrat,sans-serif;color:#000;line-height:1.2em;padding-bottom:.4em;border-bottom:4px dotted #ed225d}#teach-page h3.title{margin-top:3em}#teach-page section.workshopS{overflow:auto}#teach-page .workshop-content{padding:.6em}#teach-page ul.workshops{padding-top:.4em;width:41%;float:left}#teach-page .btn,#teach-page li.workshop .active,li.workshop p:hover{margin-bottom:.8em;padding-bottom:.4em;font:400 .9rem Times,sans-serif;line-height:1.2em;border-bottom:.1em dashed #ffe8e8}#teach-page li.workshop .active,li.workshop p:hover{color:#ed225d}#teach-page .upcoming-banners{width:59%;float:right;padding-top:.8em;padding-left:1em;border:none}#teach-page .banner2,.banner3,.time2,.time3{display:none}#teach-page .banner1:hover,.banner2:hover,.banner3:hover{border:none}#teach-page .banner-img{float:left;-webkit-box-shadow:0 0 5px 2px rgba(0,0,0,.1);box-shadow:0 0 5px 2px rgba(0,0,0,.1);border-radius:5px;border:none}#teach-page .banner-img:hover{-webkit-box-shadow:0 0 5px 2px #e088a1;box-shadow:0 0 5px 2px #e088a1;border-radius:5px;border:none}#teach-page .upcoming-time p{float:right;margin-bottom:.8em;padding-bottom:.4em;font:400 .8rem Times,sans-serif;line-height:.01em}#teach-page .search-filter{display:inline}#teach-page .search-filter label{display:inline-block;font:italic 900 1rem Montserrat,sans-serif;padding:6px 12px;text-align:left;white-space:nowrap;color:#ed225d;margin-bottom:.6em;margin-top:1.2em;border:1px solid #ed225d;cursor:pointer}#teach-page .search-filter label:hover{color:#fff;background-color:#ed225d}#teach-page .search-filter input[type=checkbox]{display:absolute;position:absolute;opacity:0}#teach-page ul.filters p.filter-title{font:400 .83rem Montserrat,sans-serif;color:#ed225d;height:50px;padding-top:20px;background:none;background-color:none;-webkit-box-shadow:none;box-shadow:none;display:inline-block;border:none;clear:both}#teach-page ul.filters li{display:inline;list-style:none;width:100%}#teach-page ul.filters li label{display:inline-block;border-radius:25px;font:200 .7rem Montserrat,sans-serif;color:#000;white-space:nowrap;margin:3px 0;-webkit-transition:.2s;-o-transition:.2s;transition:.2s;background:#fafafa;padding:6px 12px;cursor:pointer}#teach-page ul.filters li label:before{display:inline-block;padding:2px}#teach-page ul.filters li label:hover{color:#ed225d;background:#ffe8e8}#teach-page ul.filters li input[type=checkbox]:checked+label{color:#fff;background:#ed225d}#teach-page ul.filters li input[type=checkbox]{display:absolute;position:absolute;opacity:0}#teach-page ul.filters li.clear{display:block;clear:both}#teach-page .filter-panel{background-color:#fff;max-height:0;overflow:hidden;-webkit-transition:max-height .2s ease-out;-o-transition:max-height .2s ease-out;transition:max-height .2s ease-out;margin-bottom:.8em;padding:0 0 .4em}#teach-page .filter-panel p{margin:0;color:#333;font-size:.83em;height:50px;padding-top:20px;-webkit-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}#teach-page .teach-intro p{font:400 1.2rem Times,sans-serif;line-height:1.5em}#teach-page .modal-title{margin-left:1em;margin-right:1em;font:400 1rem Montserrat,sans-serif;color:#ed225d;line-height:1.2em}#teach-page ul.cases li.clear{display:block;clear:both;margin-top:1em;margin-bottom:1.2em}#teach-page img{margin-bottom:1.4em}#teach-page img[alt]{font:.6rem Montserrat,sans-serif;color:#bababa}#teach-page .close{position:relative;color:#ffc7c7;float:right;font-size:40px;font-weight:700;margin-right:.4em;margin-top:.4em;cursor:pointer}#teach-page .close:hover,.close:focus{color:#ed225d;text-decoration:none;cursor:pointer}#teach-page .case label{margin:2px;padding:5px 8px;display:inline-block;border-radius:25px;font:.7rem Montserrat,sans-serif;color:#aaa;white-space:nowrap;color:#fff;background:#ed225d}#teach-page .modal-body::-webkit-scrollbar{width:5px;height:5px;border-radius:10px}#teach-page .modal-body::-webkit-scrollbar-track{background:#f1f1f1}#teach-page .modal-body::-webkit-scrollbar-thumb{background:#ffe8e8}#teach-page .case{margin-left:2em;margin-right:2em}#teach-page .case span{color:#ed225d;font:900 1.4rem Montserrat,sans-serif}#teach-page .case p.lead-name{font:900 Italic 1.2rem Montserrat,sans-serif;color:#ed225d;line-height:1.4em;border-bottom:1.4em}#teach-page .case .speech{position:relative;font:200 Italic .8rem Montserrat,sans-serif;color:#000;background:#ffe8e8;padding:.5em 1.2em;border-radius:.4em;border-bottom:none;margin-bottom:2em;margin-top:1em}#teach-page .case .speech:after{content:"";position:absolute;top:0;left:8%;width:0;height:0;border:10px solid transparent;border-bottom-color:#ffe8e8;border-top:0;margin-left:-10px;margin-top:-10px}#teach-page .case p.subtitle{font:400 1rem Montserrat,sans-serif;color:#ed225d}#teach-page .case p,#teach-page .case p.subtitle{line-height:1.4em;border-bottom:.1em dashed rgba(237,34,93,.15)}#teach-page .case p{font:400 1rem Times,sans-serif;color:#000}#teach-page .modal-footer,#teach-page .modal-header{margin-bottom:.8em}#teach-page .modal-body:-webkit-scrollbar{display:none}#teach-page .modal{display:none;position:fixed;z-index:100;width:100%;height:100%;top:0;left:0;right:0;overflow:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:rgba(255,232,232,.5)}#teach-page .modal-content{position:fixed;background:#fff;top:2%;left:2%;right:2%;bottom:2%;margin:auto;border:1.2px solid #ffe8e8;max-width:740px;-webkit-box-shadow:10px 100px 30px -17px rgba(237,34,93,.5);box-shadow:10px 100px 30px -17px rgba(237,34,93,.5);-webkit-box-shadow:10px 100px 20px -17px rgba(237,34,93,.5);box-shadow:10px 100px 20px -17px rgba(237,34,93,.5);-webkit-box-shadow:10px 20px 10px -17px rgba(237,34,93,.5);box-shadow:10px 20px 10px -17px rgba(237,34,93,.5)}#teach-page .modal-body{margin:auto;height:85%;width:95%;overflow-y:auto}#teach-page .results-wrapper{width:100%;outline:none;background:#fff}#teach-page .results-wrapper ul li.case-list a.myBtn{overflow:hidden;text-overflow:ellipsis}#teach-page .case-list{margin-bottom:.8em;padding-bottom:.4em;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;font:400 1rem Times,sans-serif;line-height:1.2em;border-bottom:.1em dashed #ffe8e8}#teach-page .labels{width:40%}#teach-page .tags.selected{display:inline-block;margin:2px;padding:5px 8px;border-radius:25px;font:200 .7rem Montserrat,sans-serif;color:#fff;white-space:nowrap;background:#ed225d}#teach-page .caseBtn{padding-top:.2em;padding-bottom:.2em;width:60%;height:-webkit-max-content;height:-moz-max-content;height:max-content;float:left}#teach-page .case-list label{display:inline-block;margin:2px;padding:5px 8px;border-radius:25px;font:200 .7rem Montserrat,sans-serif;color:#000;white-space:nowrap;background:#fafafa}*,:after,:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}html{font-size:1.25em}body{margin:0;background-color:#fff;font-family:Times;font-weight:400;line-height:1.45;color:#333}p{font-size:1.2em;margin:.5em 0}.freeze{overflow:hidden}#menu li a:focus:active,#menu li a:focus:hover,#menu li a:link,#menu li a:visited{color:#ed225d;background:transparent;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}a:link,a:visited{color:#2d7bb6;text-decoration:none}#reference a:hover,a:active,a:hover{color:#ed225d;text-decoration:none;padding-bottom:.11em;border-bottom:.11em dashed #ed225d;-webkit-transition:border-bottom 30ms linear;-o-transition:border-bottom 30ms linear;transition:border-bottom 30ms linear}a.nounderline:hover{border:none}a.here{color:#ed225d;text-decoration:none;padding-bottom:.1em;border-bottom:transparent;border-bottom-color:#ed225d}.highlight{background-color:rgba(237,34,93,.15)}.container>div:first-of-type{margin-top:2em}h1,h2,h3,h4,h5{margin:1.414em 0 .5em;font-weight:inherit;line-height:1.2;font-family:Montserrat,sans-serif}h1{font-size:2.25em;margin:0}h2{font-size:1.5em;margin:1em 0 0}.code{font-family:Inconsolata,consolas,monospace}#backlink{margin:1.2em .444em 0 0;font-family:Montserrat,sans-serif;float:right}#backlink a{color:#afafaf}#backlink a:hover{color:#ed225d;border-bottom:none}#promo,#promo:visited{width:100%;background:#98fb98;margin:0;text-align:center;padding:.4em 0;background:#74ffb7;background:-webkit-radial-gradient(circle,#74ffb7 0,#8afff2 100%);background:-o-radial-gradient(circle,#74ffb7 0,#8afff2 100%);background:radial-gradient(circle,#74ffb7 0,#8afff2 100%);font-family:Montserrat,sans-serif;color:#ed225d!important}#promo:hover{background:#ed225d;color:#fff!important}#promo-link{margin:0!important;padding:0}#family a:link,#family a:visited{margin:.4em}#family a:active,#family a:hover{margin:.4em;border:none}#family{position:absolute;z-index:9999;top:0;left:0;width:100%;overflow:none;margin:0;border-bottom:1px solid rgba(51,51,51,.5);-webkit-box-shadow:0 0 10px #333;box-shadow:0 0 10px #333;background-color:hsla(0,0%,100%,.85)}#processing-sites{margin:.375em 0}#processing-sites li{list-style:none;display:inline-block;margin:0}#processing-sites li:first-child{margin-left:2em}#processing-sites li:last-child{float:right;margin-right:2em}.code-snippet{margin:0 0 0 1em;width:90%;clear:both}.column-span{margin:0 0 0 1em;padding:0;float:left;max-width:100%}.method_description p{margin-top:0}main{padding:0}.spacer{clear:both}ul{margin:0;padding:0;list-style:none}ol{font-size:1.2em}li{margin:0;padding:0}ul.list_view{margin:.5em 0 0 1em;padding:0;list-style:disc;list-style-position:outside;font-size:1.2em}ol ul.list_view{font-size:1em}ul.inside{margin:0 0 0 2em;padding:0;list-style:disc;list-style-position:inside}.image-row img{width:48%;height:14.3%}.image-row img+img{float:right;margin-right:0;margin-bottom:.25em}img,main div img{margin:.5em .5em 0 0;width:100%}p+img{margin-top:0}.video{width:100%}#lockup{position:absolute;top:-5.75em;left:1.25em;height:0;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#lockup object{margin:0;padding:0;border:none}#lockup a:focus{outline:0}.logo{padding:0;border:none;margin:0 0 .4em;height:4.5em;width:9.75em}#lockup p{color:#ed225d;font-size:.7em;font-family:Montserrat,sans-serif;margin:.5em 0 0 8.5em}#lockup a:link{border:transparent;height:4.5em;width:9.75em}.caption{margin-bottom:2.5em}.caption p,.caption span{text-align:right;font-size:.7em;font-family:Montserrat,sans-serif;padding-top:.25em}footer{clear:both;border-top:.1em dashed #ed225d;margin:2em 0}.videoWrapper{position:relative;padding-bottom:56.25%;height:0;margin-top:.5em}.videoWrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}.ir{background-color:transparent;border:0;overflow:hidden;*text-indent:-9999px}.ir:before{content:"";display:block;width:0;height:150%}.hidden{display:none!important;visibility:hidden}.sr-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only.focusable:active,.sr-only.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.clearfix:after,.clearfix:before{content:" ";display:table}.clearfix:after{clear:both}.clearfix{*zoom:1}#notMobile-message{display:none;-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1}#asterisk-design-element,#isMobile-displayButton,.separator-design-element{display:none}.pointerevents #asterisk-design-element,.pointerevents .separator-design-element{pointer-events:none;display:inline-block}@media (min-width:780px){.container{width:49em!important;margin:11.5em auto}main{width:36em;padding:0!important}footer{width:48em}}@media (min-width:780px){.container{margin:11.5em auto;width:100%;padding:.8em 0 0;height:auto;min-height:100%}#home-page{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:row;-ms-flex-wrap:row;flex-wrap:row}main{padding:0 1em 0 0}#family,.small,footer,small{font-size:.7em}footer{clear:both}#i18n-btn{position:absolute;top:4em;right:1em}#i18n-btn a,#menu{font-family:Montserrat,sans-serif}#menu{list-style:none;margin:0 .75em 0 -1.85em;width:7.3em;height:100%;border-top:transparent;border-bottom:transparent;padding:0;font-size:.83em;z-index:100;position:relative;top:0}#menu li{float:none;margin:0 0 1em;text-align:right}#menu li:nth-child(11){margin-top:3em;padding-top:.5em}.left-column{width:48%;float:left;margin-bottom:40px}.right-column{width:48%;float:right;margin-right:0;margin-bottom:.25em}.narrow-left-column{width:32%;float:left}.wide-right-column{width:64%;float:right;margin-right:0;margin-bottom:.25em}.book{font-size:.7em}.column_0,.column_1,.column_2{float:left;width:11.333em}.column_0,.column_1{margin-right:1em}#collection-list-nav{width:100%;clear:both;border-bottom:1px dashed rgba(0,0,0,.2)}#collection-list-categories{font-family:Montserrat,sans-serif;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;margin:1em 0 1.5em}#collection-list-categories ul{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}#collection-list{margin:0}.group-name.first{margin-top:0!important}.column.group-name{margin-bottom:1em}#library-page .group-name{margin:2em 0 .5em}#library-page .column{margin-top:1em}#list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-bottom:1em}}@media (max-width:780px){.tagline{display:none!important}#family{display:none}#i18n-btn{position:absolute;top:.5em;right:.7em;z-index:10}#search{float:left;margin-bottom:1em}#search,#search input[type=text]{width:100%}#search input[type=search],#search input[type=text]{font-size:1.5em}#lockup{position:absolute;top:2em;left:1em}.column-span{margin:0;padding:0 1em;float:left}#menu,#menu.top_menu{margin:6em 0 .5em;font-size:1.3em}#menu li{display:inline-block}#menu li:last-child a:after{content:""}#menu li a:after{content:","}#contribute-item:first-child{margin-left:0}.download_box{width:96%}.download_box.half_box{width:46%;margin-right:4%;float:left}#etc_list{font-size:1.2em;margin-top:1em}#asterisk-design-element,.separator-design-element{display:none!important;pointer-events:none}pre[class*=language-]{padding:.5em;width:100%}code{word-wrap:break-word;word-break:break-all}#credits{position:relative!important;z-index:2;margin-top:-7em;padding:0 2em 3em 1em;font-size:.5em;float:right;width:100%;text-align:right}#credits,#home-sketch-frame{display:none}#exampleDisplay,#exampleDisplay #exampleEditor,#exampleFrame{width:100%}#exampleDisplay .edit_button{left:-.58em}#exampleDisplay .reset_button{left:3em}#exampleDisplay .copy_button{left:6.44em}#exampleEditor{margin-top:3em}.small,footer,small{font-size:.5em}.paramtype{width:96%}}@media (max-width:400px){#i18n{margin-top:.75em!important}body{margin-top:-.75em!important}}iframe{border:none;width:100%}.iframe-container{overflow:hidden;position:relative}.iframe-container iframe{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.cnv_div{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.cnv_div>*{width:100px;height:auto}@media (max-width:780px){#teach-page ul.workshops{width:100%}#teach-page .upcoming-banners{width:100%;float:left;padding-top:0;padding-left:0;border:none}#teach-page .case-list{display:block}#teach-page .caseBtn,#teach-page .labels{min-width:100%}}#i18n-buttons{margin:0;background:#fff}#i18n-buttons li{list-style:none;display:inline-block;margin-left:.5em}#i18n-btn a{border:none;outline:none;font-size:.7em;color:#696969;z-index:5}#i18n-btn a:hover{color:#ed225d}#i18n-btn a.disabled{color:#ed225d;cursor:default}#asterisk-design-element{position:fixed;z-index:-1;opacity:.6;pointer-events:none}.separator-design-element{width:.33em;height:.33em;margin:0 .09em .18em;display:inline-block;overflow:hidden;text-indent:-100%;background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCI+PHBhdGggZD0iTTE2LjkgMTAuM2w4LjUtMi42IDEuNyA1LjItOC41IDIuOSA1LjMgNy41LTQuNCAzLjItNS42LTcuMy01LjQgNy4xTDQuMiAyM2w1LjMtNy4yLTguNi0zLjIgMS43LTUuMiA4LjYgMi44VjEuNEgxN3Y4Ljl6IiBmaWxsPSIjZWQyMjVkIiBzdHJva2U9IiNlZDIyNWQiLz48L3N2Zz4=");-webkit-background-size:.33em .33em;background-size:.33em}#home-page #asterisk-design-element{bottom:-8%;right:20%;height:12em;width:12em;opacity:1}#examples-page #asterisk-design-element,#learn-page #asterisk-design-element,#other-content-types-page #asterisk-design-element{bottom:-14%;left:-20%;height:25em;width:25em;-webkit-transform:rotate(-1deg);-ms-transform:rotate(-1deg);-o-transform:rotate(-1deg);transform:rotate(-1deg)}#books-page #asterisk-design-element,#libraries-page #asterisk-design-element{bottom:-19%;right:-16%;height:28em;width:28em;-webkit-transform:rotate(2deg);-ms-transform:rotate(2deg);-o-transform:rotate(2deg);transform:rotate(2deg)}#community-page #asterisk-design-element,#get-started-page #asterisk-design-element{top:10%;right:-20%;height:30em;width:30em;-webkit-transform:rotate(2deg);-ms-transform:rotate(2deg);-o-transform:rotate(2deg);transform:rotate(2deg)}#download-page #asterisk-design-element,#reference-page #asterisk-design-element{top:7%;left:1%;height:10em;width:10em;-webkit-transform:rotate(-21deg);-ms-transform:rotate(-21deg);-o-transform:rotate(-21deg);transform:rotate(-21deg)}@media(max-width:1352px){#download-page #asterisk-design-element,#reference-page #asterisk-design-element{display:none!important}}.email-octopus-email-address{color:#ed225d;text-decoration:none;padding-bottom:.11em;outline:none;border:none;border-bottom:.11em dashed #ed225d;-webkit-transition:border-bottom 30ms linear;-o-transition:border-bottom 30ms linear;transition:border-bottom 30ms linear;width:13em}.email-octopus-form-row-hp{position:absolute;left:-5000px}.email-octopus-form-row button{border:1px solid #ed225d;color:#ed225d;padding:.4em .6em;margin:1em 0 0;font-family:Montserrat,sans-serif;display:block}.email-octopus-form-row button:hover{background-color:#ed225d;color:#fff}.email-octopus-email-address::-webkit-input-placeholder{color:#ababab}.email-octopus-email-address:-moz-placeholder,.email-octopus-email-address::-moz-placeholder{color:#ababab}.email-octopus-email-address:-ms-input-placeholder{color:#ababab}@media (min-width:720px){.email-octopus-email-address{width:16em}.email-octopus-form-row button{margin:0 0 0 .5em;display:inline}}
-/*# sourceMappingURL=maps/all.css.map */
\ No newline at end of file
diff --git a/docs/yuidoc-p5-theme/assets/arnott-wallace-eye-loop-forever.gif b/docs/yuidoc-p5-theme/assets/arnott-wallace-eye-loop-forever.gif
deleted file mode 100644
index 992757bbaf..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/arnott-wallace-eye-loop-forever.gif and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/arnott-wallace-wink-loop-once.gif b/docs/yuidoc-p5-theme/assets/arnott-wallace-wink-loop-once.gif
deleted file mode 100644
index 94f2015ff3..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/arnott-wallace-wink-loop-once.gif and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/beat.mp3 b/docs/yuidoc-p5-theme/assets/beat.mp3
deleted file mode 100644
index 3e5802604c..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/beat.mp3 and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/beat.ogg b/docs/yuidoc-p5-theme/assets/beat.ogg
deleted file mode 100644
index c13f86a41f..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/beat.ogg and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/beatbox.mp3 b/docs/yuidoc-p5-theme/assets/beatbox.mp3
deleted file mode 100644
index 23fb92eb71..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/beatbox.mp3 and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/beatbox.ogg b/docs/yuidoc-p5-theme/assets/beatbox.ogg
deleted file mode 100644
index b2593a6340..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/beatbox.ogg and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/blobs.csv b/docs/yuidoc-p5-theme/assets/blobs.csv
deleted file mode 100644
index bda44d2203..0000000000
--- a/docs/yuidoc-p5-theme/assets/blobs.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-ID,Name,Flavor,Shape,Color
-Blob1,Blobby,Sweet,Blob,Pink
-Blob2,Saddy,Savory,Blob,Blue
\ No newline at end of file
diff --git a/docs/yuidoc-p5-theme/assets/bricks.jpg b/docs/yuidoc-p5-theme/assets/bricks.jpg
deleted file mode 100644
index 231161d752..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/bricks.jpg and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/bricks_third.jpg b/docs/yuidoc-p5-theme/assets/bricks_third.jpg
deleted file mode 100644
index 2fdb075996..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/bricks_third.jpg and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/bx-spring.mp3 b/docs/yuidoc-p5-theme/assets/bx-spring.mp3
deleted file mode 100644
index 4a955ab7fa..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/bx-spring.mp3 and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/bx-spring.ogg b/docs/yuidoc-p5-theme/assets/bx-spring.ogg
deleted file mode 100644
index b01abee927..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/bx-spring.ogg and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/concrete-tunnel.mp3 b/docs/yuidoc-p5-theme/assets/concrete-tunnel.mp3
deleted file mode 100644
index 1bfbd4f8f8..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/concrete-tunnel.mp3 and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/concrete-tunnel.ogg b/docs/yuidoc-p5-theme/assets/concrete-tunnel.ogg
deleted file mode 100644
index be5f66b72c..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/concrete-tunnel.ogg and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/doorbell.mp3 b/docs/yuidoc-p5-theme/assets/doorbell.mp3
deleted file mode 100644
index 44b6367916..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/doorbell.mp3 and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/doorbell.ogg b/docs/yuidoc-p5-theme/assets/doorbell.ogg
deleted file mode 100644
index e816288c97..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/doorbell.ogg and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/drawImage.png b/docs/yuidoc-p5-theme/assets/drawImage.png
deleted file mode 100644
index 1a7aa5d1d8..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/drawImage.png and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/drum.mp3 b/docs/yuidoc-p5-theme/assets/drum.mp3
deleted file mode 100644
index 9cd8727617..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/drum.mp3 and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/drum.ogg b/docs/yuidoc-p5-theme/assets/drum.ogg
deleted file mode 100644
index 5061a1b319..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/drum.ogg and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/favicon.ico b/docs/yuidoc-p5-theme/assets/favicon.ico
deleted file mode 100644
index 33ad9806c8..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/favicon.ico and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/fingers.mov b/docs/yuidoc-p5-theme/assets/fingers.mov
deleted file mode 100644
index a9cbbbe3ea..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/fingers.mov and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/fonts/inconsolata.eot b/docs/yuidoc-p5-theme/assets/fonts/inconsolata.eot
deleted file mode 100644
index 4b076884d0..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/fonts/inconsolata.eot and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/fonts/inconsolata.otf b/docs/yuidoc-p5-theme/assets/fonts/inconsolata.otf
deleted file mode 100644
index e7e1fa0cd7..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/fonts/inconsolata.otf and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/fonts/inconsolata.svg b/docs/yuidoc-p5-theme/assets/fonts/inconsolata.svg
deleted file mode 100644
index 2feb4e38c3..0000000000
--- a/docs/yuidoc-p5-theme/assets/fonts/inconsolata.svg
+++ /dev/null
@@ -1,240 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/docs/yuidoc-p5-theme/assets/fonts/inconsolata.ttf b/docs/yuidoc-p5-theme/assets/fonts/inconsolata.ttf
deleted file mode 100644
index 2e8649b73d..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/fonts/inconsolata.ttf and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/fonts/inconsolata.woff b/docs/yuidoc-p5-theme/assets/fonts/inconsolata.woff
deleted file mode 100644
index 41990c1dde..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/fonts/inconsolata.woff and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/gradient.png b/docs/yuidoc-p5-theme/assets/gradient.png
deleted file mode 100644
index 5245af69cd..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/gradient.png and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/img/p5js.svg b/docs/yuidoc-p5-theme/assets/img/p5js.svg
deleted file mode 100755
index eaf5b87618..0000000000
--- a/docs/yuidoc-p5-theme/assets/img/p5js.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/docs/yuidoc-p5-theme/assets/inconsolata.otf b/docs/yuidoc-p5-theme/assets/inconsolata.otf
deleted file mode 100644
index e7e1fa0cd7..0000000000
Binary files a/docs/yuidoc-p5-theme/assets/inconsolata.otf and /dev/null differ
diff --git a/docs/yuidoc-p5-theme/assets/js/reference.js b/docs/yuidoc-p5-theme/assets/js/reference.js
deleted file mode 100644
index 455d4425d9..0000000000
--- a/docs/yuidoc-p5-theme/assets/js/reference.js
+++ /dev/null
@@ -1,4949 +0,0 @@
-(function () {
-// https://github.com/umdjs/umd/blob/master/templates/returnExports.js
-(function (root, factory) {
- if (typeof define === 'function' && define.amd) {
- define('documented-method',[], factory);
- } else if (typeof module === 'object' && module.exports) {
- module.exports = factory();
- } else {
- root.DocumentedMethod = factory();
- }
-}(this, function () {
- function extend(target, src) {
- Object.keys(src).forEach(function(prop) {
- target[prop] = src[prop];
- });
- return target;
- }
-
- function DocumentedMethod(classitem) {
- extend(this, classitem);
-
- if (this.overloads) {
- // Make each overload inherit properties from their parent
- // classitem.
- this.overloads = this.overloads.map(function(overload) {
- return extend(Object.create(this), overload);
- }, this);
-
- if (this.params) {
- throw new Error('params for overloaded methods should be undefined');
- }
-
- this.params = this._getMergedParams();
- }
- }
-
- DocumentedMethod.prototype = {
- // Merge parameters across all overloaded versions of this item.
- _getMergedParams: function() {
- var paramNames = {};
- var params = [];
-
- this.overloads.forEach(function(overload) {
- if (!overload.params) {
- return;
- }
- overload.params.forEach(function(param) {
- if (param.name in paramNames) {
- return;
- }
- paramNames[param.name] = param;
- params.push(param);
- });
- });
-
- return params;
- }
- };
-
- return DocumentedMethod;
-}));
-
-/**
- * @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
- * Available via the MIT or new BSD license.
- * see: http://github.com/requirejs/text for details
- */
-/*jslint regexp: true */
-/*global require, XMLHttpRequest, ActiveXObject,
- define, window, process, Packages,
- java, location, Components, FileUtils */
-
-define('text',['module'], function (module) {
- 'use strict';
-
- var text, fs, Cc, Ci, xpcIsWindows,
- progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'],
- xmlRegExp = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,
- bodyRegExp = /]*>\s*([\s\S]+)\s*<\/body>/im,
- hasLocation = typeof location !== 'undefined' && location.href,
- defaultProtocol = hasLocation && location.protocol && location.protocol.replace(/\:/, ''),
- defaultHostName = hasLocation && location.hostname,
- defaultPort = hasLocation && (location.port || undefined),
- buildMap = {},
- masterConfig = (module.config && module.config()) || {};
-
- text = {
- version: '2.0.10',
-
- strip: function (content) {
- //Strips declarations so that external SVG and XML
- //documents can be added to a document without worry. Also, if the string
- //is an HTML document, only the part inside the body tag is returned.
- if (content) {
- content = content.replace(xmlRegExp, "");
- var matches = content.match(bodyRegExp);
- if (matches) {
- content = matches[1];
- }
- } else {
- content = "";
- }
- return content;
- },
-
- jsEscape: function (content) {
- return content.replace(/(['\\])/g, '\\$1')
- .replace(/[\f]/g, "\\f")
- .replace(/[\b]/g, "\\b")
- .replace(/[\n]/g, "\\n")
- .replace(/[\t]/g, "\\t")
- .replace(/[\r]/g, "\\r")
- .replace(/[\u2028]/g, "\\u2028")
- .replace(/[\u2029]/g, "\\u2029");
- },
-
- createXhr: masterConfig.createXhr || function () {
- //Would love to dump the ActiveX crap in here. Need IE 6 to die first.
- var xhr, i, progId;
- if (typeof XMLHttpRequest !== "undefined") {
- return new XMLHttpRequest();
- } else if (typeof ActiveXObject !== "undefined") {
- for (i = 0; i < 3; i += 1) {
- progId = progIds[i];
- try {
- xhr = new ActiveXObject(progId);
- } catch (e) {}
-
- if (xhr) {
- progIds = [progId]; // so faster next time
- break;
- }
- }
- }
-
- return xhr;
- },
-
- /**
- * Parses a resource name into its component parts. Resource names
- * look like: module/name.ext!strip, where the !strip part is
- * optional.
- * @param {String} name the resource name
- * @returns {Object} with properties "moduleName", "ext" and "strip"
- * where strip is a boolean.
- */
- parseName: function (name) {
- var modName, ext, temp,
- strip = false,
- index = name.indexOf("."),
- isRelative = name.indexOf('./') === 0 ||
- name.indexOf('../') === 0;
-
- if (index !== -1 && (!isRelative || index > 1)) {
- modName = name.substring(0, index);
- ext = name.substring(index + 1, name.length);
- } else {
- modName = name;
- }
-
- temp = ext || modName;
- index = temp.indexOf("!");
- if (index !== -1) {
- //Pull off the strip arg.
- strip = temp.substring(index + 1) === "strip";
- temp = temp.substring(0, index);
- if (ext) {
- ext = temp;
- } else {
- modName = temp;
- }
- }
-
- return {
- moduleName: modName,
- ext: ext,
- strip: strip
- };
- },
-
- xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/,
-
- /**
- * Is an URL on another domain. Only works for browser use, returns
- * false in non-browser environments. Only used to know if an
- * optimized .js version of a text resource should be loaded
- * instead.
- * @param {String} url
- * @returns Boolean
- */
- useXhr: function (url, protocol, hostname, port) {
- var uProtocol, uHostName, uPort,
- match = text.xdRegExp.exec(url);
- if (!match) {
- return true;
- }
- uProtocol = match[2];
- uHostName = match[3];
-
- uHostName = uHostName.split(':');
- uPort = uHostName[1];
- uHostName = uHostName[0];
-
- return (!uProtocol || uProtocol === protocol) &&
- (!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) &&
- ((!uPort && !uHostName) || uPort === port);
- },
-
- finishLoad: function (name, strip, content, onLoad) {
- content = strip ? text.strip(content) : content;
- if (masterConfig.isBuild) {
- buildMap[name] = content;
- }
- onLoad(content);
- },
-
- load: function (name, req, onLoad, config) {
- //Name has format: some.module.filext!strip
- //The strip part is optional.
- //if strip is present, then that means only get the string contents
- //inside a body tag in an HTML string. For XML/SVG content it means
- //removing the declarations so the content can be inserted
- //into the current doc without problems.
-
- // Do not bother with the work if a build and text will
- // not be inlined.
- if (config.isBuild && !config.inlineText) {
- onLoad();
- return;
- }
-
- masterConfig.isBuild = config.isBuild;
-
- var parsed = text.parseName(name),
- nonStripName = parsed.moduleName +
- (parsed.ext ? '.' + parsed.ext : ''),
- url = req.toUrl(nonStripName),
- useXhr = (masterConfig.useXhr) ||
- text.useXhr;
-
- // Do not load if it is an empty: url
- if (url.indexOf('empty:') === 0) {
- onLoad();
- return;
- }
-
- //Load the text. Use XHR if possible and in a browser.
- if (!hasLocation || useXhr(url, defaultProtocol, defaultHostName, defaultPort)) {
- text.get(url, function (content) {
- text.finishLoad(name, parsed.strip, content, onLoad);
- }, function (err) {
- if (onLoad.error) {
- onLoad.error(err);
- }
- });
- } else {
- //Need to fetch the resource across domains. Assume
- //the resource has been optimized into a JS module. Fetch
- //by the module name + extension, but do not include the
- //!strip part to avoid file system issues.
- req([nonStripName], function (content) {
- text.finishLoad(parsed.moduleName + '.' + parsed.ext,
- parsed.strip, content, onLoad);
- });
- }
- },
-
- write: function (pluginName, moduleName, write, config) {
- if (buildMap.hasOwnProperty(moduleName)) {
- var content = text.jsEscape(buildMap[moduleName]);
- write.asModule(pluginName + "!" + moduleName,
- "define(function () { return '" +
- content +
- "';});\n");
- }
- },
-
- writeFile: function (pluginName, moduleName, req, write, config) {
- var parsed = text.parseName(moduleName),
- extPart = parsed.ext ? '.' + parsed.ext : '',
- nonStripName = parsed.moduleName + extPart,
- //Use a '.js' file name so that it indicates it is a
- //script that can be loaded across domains.
- fileName = req.toUrl(parsed.moduleName + extPart) + '.js';
-
- //Leverage own load() method to load plugin value, but only
- //write out values that do not have the strip argument,
- //to avoid any potential issues with ! in file names.
- text.load(nonStripName, req, function (value) {
- //Use own write() method to construct full module value.
- //But need to create shell that translates writeFile's
- //write() to the right interface.
- var textWrite = function (contents) {
- return write(fileName, contents);
- };
- textWrite.asModule = function (moduleName, contents) {
- return write.asModule(moduleName, fileName, contents);
- };
-
- text.write(pluginName, nonStripName, textWrite, config);
- }, config);
- }
- };
-
- if (masterConfig.env === 'node' || (!masterConfig.env &&
- typeof process !== "undefined" &&
- process.versions &&
- !!process.versions.node &&
- !process.versions['node-webkit'])) {
- //Using special require.nodeRequire, something added by r.js.
- fs = require.nodeRequire('fs');
-
- text.get = function (url, callback, errback) {
- try {
- var file = fs.readFileSync(url, 'utf8');
- //Remove BOM (Byte Mark Order) from utf8 files if it is there.
- if (file.indexOf('\uFEFF') === 0) {
- file = file.substring(1);
- }
- callback(file);
- } catch (e) {
- errback(e);
- }
- };
- } else if (masterConfig.env === 'xhr' || (!masterConfig.env &&
- text.createXhr())) {
- text.get = function (url, callback, errback, headers) {
- var xhr = text.createXhr(), header;
- xhr.open('GET', url, true);
-
- //Allow plugins direct access to xhr headers
- if (headers) {
- for (header in headers) {
- if (headers.hasOwnProperty(header)) {
- xhr.setRequestHeader(header.toLowerCase(), headers[header]);
- }
- }
- }
-
- //Allow overrides specified in config
- if (masterConfig.onXhr) {
- masterConfig.onXhr(xhr, url);
- }
-
- xhr.onreadystatechange = function (evt) {
- var status, err;
- //Do not explicitly handle errors, those should be
- //visible via console output in the browser.
- if (xhr.readyState === 4) {
- status = xhr.status;
- if (status > 399 && status < 600) {
- //An http 4xx or 5xx error. Signal an error.
- err = new Error(url + ' HTTP status: ' + status);
- err.xhr = xhr;
- errback(err);
- } else {
- callback(xhr.responseText);
- }
-
- if (masterConfig.onXhrComplete) {
- masterConfig.onXhrComplete(xhr, url);
- }
- }
- };
- xhr.send(null);
- };
- } else if (masterConfig.env === 'rhino' || (!masterConfig.env &&
- typeof Packages !== 'undefined' && typeof java !== 'undefined')) {
- //Why Java, why is this so awkward?
- text.get = function (url, callback) {
- var stringBuffer, line,
- encoding = "utf-8",
- file = new java.io.File(url),
- lineSeparator = java.lang.System.getProperty("line.separator"),
- input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), encoding)),
- content = '';
- try {
- stringBuffer = new java.lang.StringBuffer();
- line = input.readLine();
-
- // Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324
- // http://www.unicode.org/faq/utf_bom.html
-
- // Note that when we use utf-8, the BOM should appear as "EF BB BF", but it doesn't due to this bug in the JDK:
- // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
- if (line && line.length() && line.charAt(0) === 0xfeff) {
- // Eat the BOM, since we've already found the encoding on this file,
- // and we plan to concatenating this buffer with others; the BOM should
- // only appear at the top of a file.
- line = line.substring(1);
- }
-
- if (line !== null) {
- stringBuffer.append(line);
- }
-
- while ((line = input.readLine()) !== null) {
- stringBuffer.append(lineSeparator);
- stringBuffer.append(line);
- }
- //Make sure we return a JavaScript string and not a Java string.
- content = String(stringBuffer.toString()); //String
- } finally {
- input.close();
- }
- callback(content);
- };
- } else if (masterConfig.env === 'xpconnect' || (!masterConfig.env &&
- typeof Components !== 'undefined' && Components.classes &&
- Components.interfaces)) {
- //Avert your gaze!
- Cc = Components.classes,
- Ci = Components.interfaces;
- Components.utils['import']('resource://gre/modules/FileUtils.jsm');
- xpcIsWindows = ('@mozilla.org/windows-registry-key;1' in Cc);
-
- text.get = function (url, callback) {
- var inStream, convertStream, fileObj,
- readData = {};
-
- if (xpcIsWindows) {
- url = url.replace(/\//g, '\\');
- }
-
- fileObj = new FileUtils.File(url);
-
- //XPCOM, you so crazy
- try {
- inStream = Cc['@mozilla.org/network/file-input-stream;1']
- .createInstance(Ci.nsIFileInputStream);
- inStream.init(fileObj, 1, 0, false);
-
- convertStream = Cc['@mozilla.org/intl/converter-input-stream;1']
- .createInstance(Ci.nsIConverterInputStream);
- convertStream.init(inStream, "utf-8", inStream.available(),
- Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);
-
- convertStream.readString(inStream.available(), readData);
- convertStream.close();
- inStream.close();
- callback(readData.value);
- } catch (e) {
- throw new Error((fileObj && fileObj.path || '') + ': ' + e);
- }
- };
- }
- return text;
-});
-
-
-define('text!tpl/search.html',[],function () { return 'search
\n\n\n';});
-
-
-define('text!tpl/search_suggestion.html',[],function () { return '\n\n <%=name%>\n\n \n <% if (final) { %>\n constant\n <% } else if (itemtype) { %>\n <%=itemtype%> \n <% } %>\n\n <% if (className) { %>\n in <%=className%>\n <% } %>\n\n <% if (typeof is_constructor !== \'undefined\' && is_constructor) { %>\n constructor\n <% } %>\n \n\n
';});
-
-/*!
- * typeahead.js 0.10.2
- * https://github.com/twitter/typeahead.js
- * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
- */
-define('typeahead',[], function() {
-
-//(function($) {
-
-
- var _ = {
- isMsie: function() {
- return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false;
- },
- isBlankString: function(str) {
- return !str || /^\s*$/.test(str);
- },
- escapeRegExChars: function(str) {
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
- },
- isString: function(obj) {
- return typeof obj === "string";
- },
- isNumber: function(obj) {
- return typeof obj === "number";
- },
- isArray: $.isArray,
- isFunction: $.isFunction,
- isObject: $.isPlainObject,
- isUndefined: function(obj) {
- return typeof obj === "undefined";
- },
- bind: $.proxy,
- each: function(collection, cb) {
- $.each(collection, reverseArgs);
- function reverseArgs(index, value) {
- return cb(value, index);
- }
- },
- map: $.map,
- filter: $.grep,
- every: function(obj, test) {
- var result = true;
- if (!obj) {
- return result;
- }
- $.each(obj, function(key, val) {
- if (!(result = test.call(null, val, key, obj))) {
- return false;
- }
- });
- return !!result;
- },
- some: function(obj, test) {
- var result = false;
- if (!obj) {
- return result;
- }
- $.each(obj, function(key, val) {
- if (result = test.call(null, val, key, obj)) {
- return false;
- }
- });
- return !!result;
- },
- mixin: $.extend,
- getUniqueId: function() {
- var counter = 0;
- return function() {
- return counter++;
- };
- }(),
- templatify: function templatify(obj) {
- return $.isFunction(obj) ? obj : template;
- function template() {
- return String(obj);
- }
- },
- defer: function(fn) {
- setTimeout(fn, 0);
- },
- debounce: function(func, wait, immediate) {
- var timeout, result;
- return function() {
- var context = this, args = arguments, later, callNow;
- later = function() {
- timeout = null;
- if (!immediate) {
- result = func.apply(context, args);
- }
- };
- callNow = immediate && !timeout;
- clearTimeout(timeout);
- timeout = setTimeout(later, wait);
- if (callNow) {
- result = func.apply(context, args);
- }
- return result;
- };
- },
- throttle: function(func, wait) {
- var context, args, timeout, result, previous, later;
- previous = 0;
- later = function() {
- previous = new Date();
- timeout = null;
- result = func.apply(context, args);
- };
- return function() {
- var now = new Date(), remaining = wait - (now - previous);
- context = this;
- args = arguments;
- if (remaining <= 0) {
- clearTimeout(timeout);
- timeout = null;
- previous = now;
- result = func.apply(context, args);
- } else if (!timeout) {
- timeout = setTimeout(later, remaining);
- }
- return result;
- };
- },
- noop: function() {}
- };
- var VERSION = "0.10.2";
- var tokenizers = function(root) {
- return {
- nonword: nonword,
- whitespace: whitespace,
- obj: {
- nonword: getObjTokenizer(nonword),
- whitespace: getObjTokenizer(whitespace)
- }
- };
- function whitespace(s) {
- return s.split(/\s+/);
- }
- function nonword(s) {
- return s.split(/\W+/);
- }
- function getObjTokenizer(tokenizer) {
- return function setKey(key) {
- return function tokenize(o) {
- return tokenizer(o[key]);
- };
- };
- }
- }();
- var LruCache = function() {
- function LruCache(maxSize) {
- this.maxSize = maxSize || 100;
- this.size = 0;
- this.hash = {};
- this.list = new List();
- }
- _.mixin(LruCache.prototype, {
- set: function set(key, val) {
- var tailItem = this.list.tail, node;
- if (this.size >= this.maxSize) {
- this.list.remove(tailItem);
- delete this.hash[tailItem.key];
- }
- if (node = this.hash[key]) {
- node.val = val;
- this.list.moveToFront(node);
- } else {
- node = new Node(key, val);
- this.list.add(node);
- this.hash[key] = node;
- this.size++;
- }
- },
- get: function get(key) {
- var node = this.hash[key];
- if (node) {
- this.list.moveToFront(node);
- return node.val;
- }
- }
- });
- function List() {
- this.head = this.tail = null;
- }
- _.mixin(List.prototype, {
- add: function add(node) {
- if (this.head) {
- node.next = this.head;
- this.head.prev = node;
- }
- this.head = node;
- this.tail = this.tail || node;
- },
- remove: function remove(node) {
- node.prev ? node.prev.next = node.next : this.head = node.next;
- node.next ? node.next.prev = node.prev : this.tail = node.prev;
- },
- moveToFront: function(node) {
- this.remove(node);
- this.add(node);
- }
- });
- function Node(key, val) {
- this.key = key;
- this.val = val;
- this.prev = this.next = null;
- }
- return LruCache;
- }();
- var PersistentStorage = function() {
- var ls, methods;
- try {
- ls = window.localStorage;
- ls.setItem("~~~", "!");
- ls.removeItem("~~~");
- } catch (err) {
- ls = null;
- }
- function PersistentStorage(namespace) {
- this.prefix = [ "__", namespace, "__" ].join("");
- this.ttlKey = "__ttl__";
- this.keyMatcher = new RegExp("^" + this.prefix);
- }
- if (ls && window.JSON) {
- methods = {
- _prefix: function(key) {
- return this.prefix + key;
- },
- _ttlKey: function(key) {
- return this._prefix(key) + this.ttlKey;
- },
- get: function(key) {
- if (this.isExpired(key)) {
- this.remove(key);
- }
- return decode(ls.getItem(this._prefix(key)));
- },
- set: function(key, val, ttl) {
- if (_.isNumber(ttl)) {
- ls.setItem(this._ttlKey(key), encode(now() + ttl));
- } else {
- ls.removeItem(this._ttlKey(key));
- }
- return ls.setItem(this._prefix(key), encode(val));
- },
- remove: function(key) {
- ls.removeItem(this._ttlKey(key));
- ls.removeItem(this._prefix(key));
- return this;
- },
- clear: function() {
- var i, key, keys = [], len = ls.length;
- for (i = 0; i < len; i++) {
- if ((key = ls.key(i)).match(this.keyMatcher)) {
- keys.push(key.replace(this.keyMatcher, ""));
- }
- }
- for (i = keys.length; i--; ) {
- this.remove(keys[i]);
- }
- return this;
- },
- isExpired: function(key) {
- var ttl = decode(ls.getItem(this._ttlKey(key)));
- return _.isNumber(ttl) && now() > ttl ? true : false;
- }
- };
- } else {
- methods = {
- get: _.noop,
- set: _.noop,
- remove: _.noop,
- clear: _.noop,
- isExpired: _.noop
- };
- }
- _.mixin(PersistentStorage.prototype, methods);
- return PersistentStorage;
- function now() {
- return new Date().getTime();
- }
- function encode(val) {
- return JSON.stringify(_.isUndefined(val) ? null : val);
- }
- function decode(val) {
- return JSON.parse(val);
- }
- }();
- var Transport = function() {
- var pendingRequestsCount = 0, pendingRequests = {}, maxPendingRequests = 6, requestCache = new LruCache(10);
- function Transport(o) {
- o = o || {};
- this._send = o.transport ? callbackToDeferred(o.transport) : $.ajax;
- this._get = o.rateLimiter ? o.rateLimiter(this._get) : this._get;
- }
- Transport.setMaxPendingRequests = function setMaxPendingRequests(num) {
- maxPendingRequests = num;
- };
- Transport.resetCache = function clearCache() {
- requestCache = new LruCache(10);
- };
- _.mixin(Transport.prototype, {
- _get: function(url, o, cb) {
- var that = this, jqXhr;
- if (jqXhr = pendingRequests[url]) {
- jqXhr.done(done).fail(fail);
- } else if (pendingRequestsCount < maxPendingRequests) {
- pendingRequestsCount++;
- pendingRequests[url] = this._send(url, o).done(done).fail(fail).always(always);
- } else {
- this.onDeckRequestArgs = [].slice.call(arguments, 0);
- }
- function done(resp) {
- cb && cb(null, resp);
- requestCache.set(url, resp);
- }
- function fail() {
- cb && cb(true);
- }
- function always() {
- pendingRequestsCount--;
- delete pendingRequests[url];
- if (that.onDeckRequestArgs) {
- that._get.apply(that, that.onDeckRequestArgs);
- that.onDeckRequestArgs = null;
- }
- }
- },
- get: function(url, o, cb) {
- var resp;
- if (_.isFunction(o)) {
- cb = o;
- o = {};
- }
- if (resp = requestCache.get(url)) {
- _.defer(function() {
- cb && cb(null, resp);
- });
- } else {
- this._get(url, o, cb);
- }
- return !!resp;
- }
- });
- return Transport;
- function callbackToDeferred(fn) {
- return function customSendWrapper(url, o) {
- var deferred = $.Deferred();
- fn(url, o, onSuccess, onError);
- return deferred;
- function onSuccess(resp) {
- _.defer(function() {
- deferred.resolve(resp);
- });
- }
- function onError(err) {
- _.defer(function() {
- deferred.reject(err);
- });
- }
- };
- }
- }();
- var SearchIndex = function() {
- function SearchIndex(o) {
- o = o || {};
- if (!o.datumTokenizer || !o.queryTokenizer) {
- $.error("datumTokenizer and queryTokenizer are both required");
- }
- this.datumTokenizer = o.datumTokenizer;
- this.queryTokenizer = o.queryTokenizer;
- this.reset();
- }
- _.mixin(SearchIndex.prototype, {
- bootstrap: function bootstrap(o) {
- this.datums = o.datums;
- this.trie = o.trie;
- },
- add: function(data) {
- var that = this;
- data = _.isArray(data) ? data : [ data ];
- _.each(data, function(datum) {
- var id, tokens;
- id = that.datums.push(datum) - 1;
- tokens = normalizeTokens(that.datumTokenizer(datum));
- _.each(tokens, function(token) {
- var node, chars, ch;
- node = that.trie;
- chars = token.split("");
- while (ch = chars.shift()) {
- node = node.children[ch] || (node.children[ch] = newNode());
- node.ids.push(id);
- }
- });
- });
- },
- get: function get(query) {
- var that = this, tokens, matches;
- tokens = normalizeTokens(this.queryTokenizer(query));
- _.each(tokens, function(token) {
- var node, chars, ch, ids;
- if (matches && matches.length === 0) {
- return false;
- }
- node = that.trie;
- chars = token.split("");
- while (node && (ch = chars.shift())) {
- node = node.children[ch];
- }
- if (node && chars.length === 0) {
- ids = node.ids.slice(0);
- matches = matches ? getIntersection(matches, ids) : ids;
- } else {
- matches = [];
- return false;
- }
- });
- return matches ? _.map(unique(matches), function(id) {
- return that.datums[id];
- }) : [];
- },
- reset: function reset() {
- this.datums = [];
- this.trie = newNode();
- },
- serialize: function serialize() {
- return {
- datums: this.datums,
- trie: this.trie
- };
- }
- });
- return SearchIndex;
- function normalizeTokens(tokens) {
- tokens = _.filter(tokens, function(token) {
- return !!token;
- });
- tokens = _.map(tokens, function(token) {
- return token.toLowerCase();
- });
- return tokens;
- }
- function newNode() {
- return {
- ids: [],
- children: {}
- };
- }
- function unique(array) {
- var seen = {}, uniques = [];
- for (var i = 0; i < array.length; i++) {
- if (!seen[array[i]]) {
- seen[array[i]] = true;
- uniques.push(array[i]);
- }
- }
- return uniques;
- }
- function getIntersection(arrayA, arrayB) {
- var ai = 0, bi = 0, intersection = [];
- arrayA = arrayA.sort(compare);
- arrayB = arrayB.sort(compare);
- while (ai < arrayA.length && bi < arrayB.length) {
- if (arrayA[ai] < arrayB[bi]) {
- ai++;
- } else if (arrayA[ai] > arrayB[bi]) {
- bi++;
- } else {
- intersection.push(arrayA[ai]);
- ai++;
- bi++;
- }
- }
- return intersection;
- function compare(a, b) {
- return a - b;
- }
- }
- }();
- var oParser = function() {
- return {
- local: getLocal,
- prefetch: getPrefetch,
- remote: getRemote
- };
- function getLocal(o) {
- return o.local || null;
- }
- function getPrefetch(o) {
- var prefetch, defaults;
- defaults = {
- url: null,
- thumbprint: "",
- ttl: 24 * 60 * 60 * 1e3,
- filter: null,
- ajax: {}
- };
- if (prefetch = o.prefetch || null) {
- prefetch = _.isString(prefetch) ? {
- url: prefetch
- } : prefetch;
- prefetch = _.mixin(defaults, prefetch);
- prefetch.thumbprint = VERSION + prefetch.thumbprint;
- prefetch.ajax.type = prefetch.ajax.type || "GET";
- prefetch.ajax.dataType = prefetch.ajax.dataType || "json";
- !prefetch.url && $.error("prefetch requires url to be set");
- }
- return prefetch;
- }
- function getRemote(o) {
- var remote, defaults;
- defaults = {
- url: null,
- wildcard: "%QUERY",
- replace: null,
- rateLimitBy: "debounce",
- rateLimitWait: 300,
- send: null,
- filter: null,
- ajax: {}
- };
- if (remote = o.remote || null) {
- remote = _.isString(remote) ? {
- url: remote
- } : remote;
- remote = _.mixin(defaults, remote);
- remote.rateLimiter = /^throttle$/i.test(remote.rateLimitBy) ? byThrottle(remote.rateLimitWait) : byDebounce(remote.rateLimitWait);
- remote.ajax.type = remote.ajax.type || "GET";
- remote.ajax.dataType = remote.ajax.dataType || "json";
- delete remote.rateLimitBy;
- delete remote.rateLimitWait;
- !remote.url && $.error("remote requires url to be set");
- }
- return remote;
- function byDebounce(wait) {
- return function(fn) {
- return _.debounce(fn, wait);
- };
- }
- function byThrottle(wait) {
- return function(fn) {
- return _.throttle(fn, wait);
- };
- }
- }
- }();
- (function(root) {
- var old, keys;
- old = root.Bloodhound;
- keys = {
- data: "data",
- protocol: "protocol",
- thumbprint: "thumbprint"
- };
- root.Bloodhound = Bloodhound;
- function Bloodhound(o) {
- if (!o || !o.local && !o.prefetch && !o.remote) {
- $.error("one of local, prefetch, or remote is required");
- }
- this.limit = o.limit || 5;
- this.sorter = getSorter(o.sorter);
- this.dupDetector = o.dupDetector || ignoreDuplicates;
- this.local = oParser.local(o);
- this.prefetch = oParser.prefetch(o);
- this.remote = oParser.remote(o);
- this.cacheKey = this.prefetch ? this.prefetch.cacheKey || this.prefetch.url : null;
- this.index = new SearchIndex({
- datumTokenizer: o.datumTokenizer,
- queryTokenizer: o.queryTokenizer
- });
- this.storage = this.cacheKey ? new PersistentStorage(this.cacheKey) : null;
- }
- Bloodhound.noConflict = function noConflict() {
- root.Bloodhound = old;
- return Bloodhound;
- };
- Bloodhound.tokenizers = tokenizers;
- _.mixin(Bloodhound.prototype, {
- _loadPrefetch: function loadPrefetch(o) {
- var that = this, serialized, deferred;
- if (serialized = this._readFromStorage(o.thumbprint)) {
- this.index.bootstrap(serialized);
- deferred = $.Deferred().resolve();
- } else {
- deferred = $.ajax(o.url, o.ajax).done(handlePrefetchResponse);
- }
- return deferred;
- function handlePrefetchResponse(resp) {
- that.clear();
- that.add(o.filter ? o.filter(resp) : resp);
- that._saveToStorage(that.index.serialize(), o.thumbprint, o.ttl);
- }
- },
- _getFromRemote: function getFromRemote(query, cb) {
- var that = this, url, uriEncodedQuery;
- query = query || "";
- uriEncodedQuery = encodeURIComponent(query);
- url = this.remote.replace ? this.remote.replace(this.remote.url, query) : this.remote.url.replace(this.remote.wildcard, uriEncodedQuery);
- return this.transport.get(url, this.remote.ajax, handleRemoteResponse);
- function handleRemoteResponse(err, resp) {
- err ? cb([]) : cb(that.remote.filter ? that.remote.filter(resp) : resp);
- }
- },
- _saveToStorage: function saveToStorage(data, thumbprint, ttl) {
- if (this.storage) {
- this.storage.set(keys.data, data, ttl);
- this.storage.set(keys.protocol, location.protocol, ttl);
- this.storage.set(keys.thumbprint, thumbprint, ttl);
- }
- },
- _readFromStorage: function readFromStorage(thumbprint) {
- var stored = {}, isExpired;
- if (this.storage) {
- stored.data = this.storage.get(keys.data);
- stored.protocol = this.storage.get(keys.protocol);
- stored.thumbprint = this.storage.get(keys.thumbprint);
- }
- isExpired = stored.thumbprint !== thumbprint || stored.protocol !== location.protocol;
- return stored.data && !isExpired ? stored.data : null;
- },
- _initialize: function initialize() {
- var that = this, local = this.local, deferred;
- deferred = this.prefetch ? this._loadPrefetch(this.prefetch) : $.Deferred().resolve();
- local && deferred.done(addLocalToIndex);
- this.transport = this.remote ? new Transport(this.remote) : null;
- return this.initPromise = deferred.promise();
- function addLocalToIndex() {
- that.add(_.isFunction(local) ? local() : local);
- }
- },
- initialize: function initialize(force) {
- return !this.initPromise || force ? this._initialize() : this.initPromise;
- },
- add: function add(data) {
- this.index.add(data);
- },
- get: function get(query, cb) {
- var that = this, matches = [], cacheHit = false;
- matches = this.index.get(query);
- matches = this.sorter(matches).slice(0, this.limit);
- if (matches.length < this.limit && this.transport) {
- cacheHit = this._getFromRemote(query, returnRemoteMatches);
- }
- if (!cacheHit) {
- (matches.length > 0 || !this.transport) && cb && cb(matches);
- }
- function returnRemoteMatches(remoteMatches) {
- var matchesWithBackfill = matches.slice(0);
- _.each(remoteMatches, function(remoteMatch) {
- var isDuplicate;
- isDuplicate = _.some(matchesWithBackfill, function(match) {
- return that.dupDetector(remoteMatch, match);
- });
- !isDuplicate && matchesWithBackfill.push(remoteMatch);
- return matchesWithBackfill.length < that.limit;
- });
- cb && cb(that.sorter(matchesWithBackfill));
- }
- },
- clear: function clear() {
- this.index.reset();
- },
- clearPrefetchCache: function clearPrefetchCache() {
- this.storage && this.storage.clear();
- },
- clearRemoteCache: function clearRemoteCache() {
- this.transport && Transport.resetCache();
- },
- ttAdapter: function ttAdapter() {
- return _.bind(this.get, this);
- }
- });
- return Bloodhound;
- function getSorter(sortFn) {
- return _.isFunction(sortFn) ? sort : noSort;
- function sort(array) {
- return array.sort(sortFn);
- }
- function noSort(array) {
- return array;
- }
- }
- function ignoreDuplicates() {
- return false;
- }
- })(this);
- var html = {
- wrapper: '',
- dropdown: '',
- dataset: '',
- suggestions: '',
- suggestion: ''
- };
- var css = {
- wrapper: {
- position: "relative",
- display: "inline-block"
- },
- hint: {
- position: "absolute",
- top: "0",
- left: "0",
- borderColor: "transparent",
- boxShadow: "none"
- },
- input: {
- position: "relative",
- verticalAlign: "top",
- backgroundColor: "transparent"
- },
- inputWithNoHint: {
- position: "relative",
- verticalAlign: "top"
- },
- dropdown: {
- position: "absolute",
- top: "100%",
- left: "0",
- zIndex: "100",
- display: "none"
- },
- suggestions: {
- display: "block"
- },
- suggestion: {
- whiteSpace: "nowrap",
- cursor: "pointer"
- },
- suggestionChild: {
- whiteSpace: "normal"
- },
- ltr: {
- left: "0",
- right: "auto"
- },
- rtl: {
- left: "auto",
- right: " 0"
- }
- };
- if (_.isMsie()) {
- _.mixin(css.input, {
- backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"
- });
- }
- if (_.isMsie() && _.isMsie() <= 7) {
- _.mixin(css.input, {
- marginTop: "-1px"
- });
- }
- var EventBus = function() {
- var namespace = "typeahead:";
- function EventBus(o) {
- if (!o || !o.el) {
- $.error("EventBus initialized without el");
- }
- this.$el = $(o.el);
- }
- _.mixin(EventBus.prototype, {
- trigger: function(type) {
- var args = [].slice.call(arguments, 1);
- this.$el.trigger(namespace + type, args);
- }
- });
- return EventBus;
- }();
- var EventEmitter = function() {
- var splitter = /\s+/, nextTick = getNextTick();
- return {
- onSync: onSync,
- onAsync: onAsync,
- off: off,
- trigger: trigger
- };
- function on(method, types, cb, context) {
- var type;
- if (!cb) {
- return this;
- }
- types = types.split(splitter);
- cb = context ? bindContext(cb, context) : cb;
- this._callbacks = this._callbacks || {};
- while (type = types.shift()) {
- this._callbacks[type] = this._callbacks[type] || {
- sync: [],
- async: []
- };
- this._callbacks[type][method].push(cb);
- }
- return this;
- }
- function onAsync(types, cb, context) {
- return on.call(this, "async", types, cb, context);
- }
- function onSync(types, cb, context) {
- return on.call(this, "sync", types, cb, context);
- }
- function off(types) {
- var type;
- if (!this._callbacks) {
- return this;
- }
- types = types.split(splitter);
- while (type = types.shift()) {
- delete this._callbacks[type];
- }
- return this;
- }
- function trigger(types) {
- var type, callbacks, args, syncFlush, asyncFlush;
- if (!this._callbacks) {
- return this;
- }
- types = types.split(splitter);
- args = [].slice.call(arguments, 1);
- while ((type = types.shift()) && (callbacks = this._callbacks[type])) {
- syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args));
- asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args));
- syncFlush() && nextTick(asyncFlush);
- }
- return this;
- }
- function getFlush(callbacks, context, args) {
- return flush;
- function flush() {
- var cancelled;
- for (var i = 0; !cancelled && i < callbacks.length; i += 1) {
- cancelled = callbacks[i].apply(context, args) === false;
- }
- return !cancelled;
- }
- }
- function getNextTick() {
- var nextTickFn;
- if (window.setImmediate) {
- nextTickFn = function nextTickSetImmediate(fn) {
- setImmediate(function() {
- fn();
- });
- };
- } else {
- nextTickFn = function nextTickSetTimeout(fn) {
- setTimeout(function() {
- fn();
- }, 0);
- };
- }
- return nextTickFn;
- }
- function bindContext(fn, context) {
- return fn.bind ? fn.bind(context) : function() {
- fn.apply(context, [].slice.call(arguments, 0));
- };
- }
- }();
- var highlight = function(doc) {
- var defaults = {
- node: null,
- pattern: null,
- tagName: "strong",
- className: null,
- wordsOnly: false,
- caseSensitive: false
- };
- return function hightlight(o) {
- var regex;
- o = _.mixin({}, defaults, o);
- if (!o.node || !o.pattern) {
- return;
- }
- o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ];
- regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly);
- traverse(o.node, hightlightTextNode);
- function hightlightTextNode(textNode) {
- var match, patternNode;
- if (match = regex.exec(textNode.data)) {
- wrapperNode = doc.createElement(o.tagName);
- o.className && (wrapperNode.className = o.className);
- patternNode = textNode.splitText(match.index);
- patternNode.splitText(match[0].length);
- wrapperNode.appendChild(patternNode.cloneNode(true));
- textNode.parentNode.replaceChild(wrapperNode, patternNode);
- }
- return !!match;
- }
- function traverse(el, hightlightTextNode) {
- var childNode, TEXT_NODE_TYPE = 3;
- for (var i = 0; i < el.childNodes.length; i++) {
- childNode = el.childNodes[i];
- if (childNode.nodeType === TEXT_NODE_TYPE) {
- i += hightlightTextNode(childNode) ? 1 : 0;
- } else {
- traverse(childNode, hightlightTextNode);
- }
- }
- }
- };
- function getRegex(patterns, caseSensitive, wordsOnly) {
- var escapedPatterns = [], regexStr;
- for (var i = 0; i < patterns.length; i++) {
- escapedPatterns.push(_.escapeRegExChars(patterns[i]));
- }
- regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")";
- return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i");
- }
- }(window.document);
- var Input = function() {
- var specialKeyCodeMap;
- specialKeyCodeMap = {
- 9: "tab",
- 27: "esc",
- 37: "left",
- 39: "right",
- 13: "enter",
- 38: "up",
- 40: "down"
- };
- function Input(o) {
- var that = this, onBlur, onFocus, onKeydown, onInput;
- o = o || {};
- if (!o.input) {
- $.error("input is missing");
- }
- onBlur = _.bind(this._onBlur, this);
- onFocus = _.bind(this._onFocus, this);
- onKeydown = _.bind(this._onKeydown, this);
- onInput = _.bind(this._onInput, this);
- this.$hint = $(o.hint);
- this.$input = $(o.input).on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown);
- if (this.$hint.length === 0) {
- this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop;
- }
- if (!_.isMsie()) {
- this.$input.on("input.tt", onInput);
- } else {
- this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) {
- if (specialKeyCodeMap[$e.which || $e.keyCode]) {
- return;
- }
- _.defer(_.bind(that._onInput, that, $e));
- });
- }
- this.query = this.$input.val();
- this.$overflowHelper = buildOverflowHelper(this.$input);
- }
- Input.normalizeQuery = function(str) {
- return (str || "").replace(/^\s*/g, "").replace(/\s{2,}/g, " ");
- };
- _.mixin(Input.prototype, EventEmitter, {
- _onBlur: function onBlur() {
- this.resetInputValue();
- this.trigger("blurred");
- },
- _onFocus: function onFocus() {
- this.trigger("focused");
- },
- _onKeydown: function onKeydown($e) {
- var keyName = specialKeyCodeMap[$e.which || $e.keyCode];
- this._managePreventDefault(keyName, $e);
- if (keyName && this._shouldTrigger(keyName, $e)) {
- this.trigger(keyName + "Keyed", $e);
- }
- },
- _onInput: function onInput() {
- this._checkInputValue();
- },
- _managePreventDefault: function managePreventDefault(keyName, $e) {
- var preventDefault, hintValue, inputValue;
- switch (keyName) {
- case "tab":
- hintValue = this.getHint();
- inputValue = this.getInputValue();
- preventDefault = hintValue && hintValue !== inputValue && !withModifier($e);
- break;
-
- case "up":
- case "down":
- preventDefault = !withModifier($e);
- break;
-
- default:
- preventDefault = false;
- }
- preventDefault && $e.preventDefault();
- },
- _shouldTrigger: function shouldTrigger(keyName, $e) {
- var trigger;
- switch (keyName) {
- case "tab":
- trigger = !withModifier($e);
- break;
-
- default:
- trigger = true;
- }
- return trigger;
- },
- _checkInputValue: function checkInputValue() {
- var inputValue, areEquivalent, hasDifferentWhitespace;
- inputValue = this.getInputValue();
- areEquivalent = areQueriesEquivalent(inputValue, this.query);
- hasDifferentWhitespace = areEquivalent ? this.query.length !== inputValue.length : false;
- if (!areEquivalent) {
- this.trigger("queryChanged", this.query = inputValue);
- } else if (hasDifferentWhitespace) {
- this.trigger("whitespaceChanged", this.query);
- }
- },
- focus: function focus() {
- this.$input.focus();
- },
- blur: function blur() {
- this.$input.blur();
- },
- getQuery: function getQuery() {
- return this.query;
- },
- setQuery: function setQuery(query) {
- this.query = query;
- },
- getInputValue: function getInputValue() {
- return this.$input.val();
- },
- setInputValue: function setInputValue(value, silent) {
- this.$input.val(value);
- silent ? this.clearHint() : this._checkInputValue();
- },
- resetInputValue: function resetInputValue() {
- this.setInputValue(this.query, true);
- },
- getHint: function getHint() {
- return this.$hint.val();
- },
- setHint: function setHint(value) {
- this.$hint.val(value);
- },
- clearHint: function clearHint() {
- this.setHint("");
- },
- clearHintIfInvalid: function clearHintIfInvalid() {
- var val, hint, valIsPrefixOfHint, isValid;
- val = this.getInputValue();
- hint = this.getHint();
- valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0;
- isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow();
- !isValid && this.clearHint();
- },
- getLanguageDirection: function getLanguageDirection() {
- return (this.$input.css("direction") || "ltr").toLowerCase();
- },
- hasOverflow: function hasOverflow() {
- var constraint = this.$input.width() - 2;
- this.$overflowHelper.text(this.getInputValue());
- return this.$overflowHelper.width() >= constraint;
- },
- isCursorAtEnd: function() {
- var valueLength, selectionStart, range;
- valueLength = this.$input.val().length;
- selectionStart = this.$input[0].selectionStart;
- if (_.isNumber(selectionStart)) {
- return selectionStart === valueLength;
- } else if (document.selection) {
- range = document.selection.createRange();
- range.moveStart("character", -valueLength);
- return valueLength === range.text.length;
- }
- return true;
- },
- destroy: function destroy() {
- this.$hint.off(".tt");
- this.$input.off(".tt");
- this.$hint = this.$input = this.$overflowHelper = null;
- }
- });
- return Input;
- function buildOverflowHelper($input) {
- return $('').css({
- position: "absolute",
- visibility: "hidden",
- whiteSpace: "pre",
- fontFamily: $input.css("font-family"),
- fontSize: $input.css("font-size"),
- fontStyle: $input.css("font-style"),
- fontVariant: $input.css("font-variant"),
- fontWeight: $input.css("font-weight"),
- wordSpacing: $input.css("word-spacing"),
- letterSpacing: $input.css("letter-spacing"),
- textIndent: $input.css("text-indent"),
- textRendering: $input.css("text-rendering"),
- textTransform: $input.css("text-transform")
- }).insertAfter($input);
- }
- function areQueriesEquivalent(a, b) {
- return Input.normalizeQuery(a) === Input.normalizeQuery(b);
- }
- function withModifier($e) {
- return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey;
- }
- }();
- var Dataset = function() {
- var datasetKey = "ttDataset", valueKey = "ttValue", datumKey = "ttDatum";
- function Dataset(o) {
- o = o || {};
- o.templates = o.templates || {};
- if (!o.source) {
- $.error("missing source");
- }
- if (o.name && !isValidName(o.name)) {
- $.error("invalid dataset name: " + o.name);
- }
- this.query = null;
- this.highlight = !!o.highlight;
- this.name = o.name || _.getUniqueId();
- this.source = o.source;
- this.displayFn = getDisplayFn(o.display || o.displayKey);
- this.templates = getTemplates(o.templates, this.displayFn);
- this.$el = $(html.dataset.replace("%CLASS%", this.name));
- }
- Dataset.extractDatasetName = function extractDatasetName(el) {
- return $(el).data(datasetKey);
- };
- Dataset.extractValue = function extractDatum(el) {
- return $(el).data(valueKey);
- };
- Dataset.extractDatum = function extractDatum(el) {
- return $(el).data(datumKey);
- };
- _.mixin(Dataset.prototype, EventEmitter, {
- _render: function render(query, suggestions) {
- if (!this.$el) {
- return;
- }
- var that = this, hasSuggestions;
- this.$el.empty();
- hasSuggestions = suggestions && suggestions.length;
- if (!hasSuggestions && this.templates.empty) {
- this.$el.html(getEmptyHtml()).prepend(that.templates.header ? getHeaderHtml() : null).append(that.templates.footer ? getFooterHtml() : null);
- } else if (hasSuggestions) {
- this.$el.html(getSuggestionsHtml()).prepend(that.templates.header ? getHeaderHtml() : null).append(that.templates.footer ? getFooterHtml() : null);
- }
- this.trigger("rendered");
- function getEmptyHtml() {
- return that.templates.empty({
- query: query,
- isEmpty: true
- });
- }
- function getSuggestionsHtml() {
- var $suggestions, nodes;
- $suggestions = $(html.suggestions).css(css.suggestions);
- nodes = _.map(suggestions, getSuggestionNode);
- $suggestions.append.apply($suggestions, nodes);
- that.highlight && highlight({
- node: $suggestions[0],
- pattern: query
- });
- return $suggestions;
- function getSuggestionNode(suggestion) {
- var $el;
- $el = $(html.suggestion).append(that.templates.suggestion(suggestion)).data(datasetKey, that.name).data(valueKey, that.displayFn(suggestion)).data(datumKey, suggestion);
- $el.children().each(function() {
- $(this).css(css.suggestionChild);
- });
- return $el;
- }
- }
- function getHeaderHtml() {
- return that.templates.header({
- query: query,
- isEmpty: !hasSuggestions
- });
- }
- function getFooterHtml() {
- return that.templates.footer({
- query: query,
- isEmpty: !hasSuggestions
- });
- }
- },
- getRoot: function getRoot() {
- return this.$el;
- },
- update: function update(query) {
- var that = this;
- this.query = query;
- this.canceled = false;
- this.source(query, render);
- function render(suggestions) {
- if (!that.canceled && query === that.query) {
- that._render(query, suggestions);
- }
- }
- },
- cancel: function cancel() {
- this.canceled = true;
- },
- clear: function clear() {
- this.cancel();
- this.$el.empty();
- this.trigger("rendered");
- },
- isEmpty: function isEmpty() {
- return this.$el.is(":empty");
- },
- destroy: function destroy() {
- this.$el = null;
- }
- });
- return Dataset;
- function getDisplayFn(display) {
- display = display || "value";
- return _.isFunction(display) ? display : displayFn;
- function displayFn(obj) {
- return obj[display];
- }
- }
- function getTemplates(templates, displayFn) {
- return {
- empty: templates.empty && _.templatify(templates.empty),
- header: templates.header && _.templatify(templates.header),
- footer: templates.footer && _.templatify(templates.footer),
- suggestion: templates.suggestion || suggestionTemplate
- };
- function suggestionTemplate(context) {
- return "" + displayFn(context) + "
";
- }
- }
- function isValidName(str) {
- return /^[_a-zA-Z0-9-]+$/.test(str);
- }
- }();
- var Dropdown = function() {
- function Dropdown(o) {
- var that = this, onSuggestionClick, onSuggestionMouseEnter, onSuggestionMouseLeave;
- o = o || {};
- if (!o.menu) {
- $.error("menu is required");
- }
- this.isOpen = false;
- this.isEmpty = true;
- this.datasets = _.map(o.datasets, initializeDataset);
- onSuggestionClick = _.bind(this._onSuggestionClick, this);
- onSuggestionMouseEnter = _.bind(this._onSuggestionMouseEnter, this);
- onSuggestionMouseLeave = _.bind(this._onSuggestionMouseLeave, this);
- this.$menu = $(o.menu).on("click.tt", ".tt-suggestion", onSuggestionClick).on("mouseenter.tt", ".tt-suggestion", onSuggestionMouseEnter).on("mouseleave.tt", ".tt-suggestion", onSuggestionMouseLeave);
- _.each(this.datasets, function(dataset) {
- that.$menu.append(dataset.getRoot());
- dataset.onSync("rendered", that._onRendered, that);
- });
- }
- _.mixin(Dropdown.prototype, EventEmitter, {
- _onSuggestionClick: function onSuggestionClick($e) {
- this.trigger("suggestionClicked", $($e.currentTarget));
- },
- _onSuggestionMouseEnter: function onSuggestionMouseEnter($e) {
- this._removeCursor();
- this._setCursor($($e.currentTarget), true);
- },
- _onSuggestionMouseLeave: function onSuggestionMouseLeave() {
- this._removeCursor();
- },
- _onRendered: function onRendered() {
- this.isEmpty = _.every(this.datasets, isDatasetEmpty);
- this.isEmpty ? this._hide() : this.isOpen && this._show();
- this.trigger("datasetRendered");
- function isDatasetEmpty(dataset) {
- return dataset.isEmpty();
- }
- },
- _hide: function() {
- this.$menu.hide();
- },
- _show: function() {
- this.$menu.css("display", "block");
- },
- _getSuggestions: function getSuggestions() {
- return this.$menu.find(".tt-suggestion");
- },
- _getCursor: function getCursor() {
- return this.$menu.find(".tt-cursor").first();
- },
- _setCursor: function setCursor($el, silent) {
- $el.first().addClass("tt-cursor");
- !silent && this.trigger("cursorMoved");
- },
- _removeCursor: function removeCursor() {
- this._getCursor().removeClass("tt-cursor");
- },
- _moveCursor: function moveCursor(increment) {
- var $suggestions, $oldCursor, newCursorIndex, $newCursor;
- if (!this.isOpen) {
- return;
- }
- $oldCursor = this._getCursor();
- $suggestions = this._getSuggestions();
- this._removeCursor();
- newCursorIndex = $suggestions.index($oldCursor) + increment;
- newCursorIndex = (newCursorIndex + 1) % ($suggestions.length + 1) - 1;
- if (newCursorIndex === -1) {
- this.trigger("cursorRemoved");
- return;
- } else if (newCursorIndex < -1) {
- newCursorIndex = $suggestions.length - 1;
- }
- this._setCursor($newCursor = $suggestions.eq(newCursorIndex));
- this._ensureVisible($newCursor);
- },
- _ensureVisible: function ensureVisible($el) {
- var elTop, elBottom, menuScrollTop, menuHeight;
- elTop = $el.position().top;
- elBottom = elTop + $el.outerHeight(true);
- menuScrollTop = this.$menu.scrollTop();
- menuHeight = this.$menu.height() + parseInt(this.$menu.css("paddingTop"), 10) + parseInt(this.$menu.css("paddingBottom"), 10);
- if (elTop < 0) {
- this.$menu.scrollTop(menuScrollTop + elTop);
- } else if (menuHeight < elBottom) {
- this.$menu.scrollTop(menuScrollTop + (elBottom - menuHeight));
- }
- },
- close: function close() {
- if (this.isOpen) {
- this.isOpen = false;
- this._removeCursor();
- this._hide();
- this.trigger("closed");
- }
- },
- open: function open() {
- if (!this.isOpen) {
- this.isOpen = true;
- !this.isEmpty && this._show();
- this.trigger("opened");
- }
- },
- setLanguageDirection: function setLanguageDirection(dir) {
- this.$menu.css(dir === "ltr" ? css.ltr : css.rtl);
- },
- moveCursorUp: function moveCursorUp() {
- this._moveCursor(-1);
- },
- moveCursorDown: function moveCursorDown() {
- this._moveCursor(+1);
- },
- getDatumForSuggestion: function getDatumForSuggestion($el) {
- var datum = null;
- if ($el.length) {
- datum = {
- raw: Dataset.extractDatum($el),
- value: Dataset.extractValue($el),
- datasetName: Dataset.extractDatasetName($el)
- };
- }
- return datum;
- },
- getDatumForCursor: function getDatumForCursor() {
- return this.getDatumForSuggestion(this._getCursor().first());
- },
- getDatumForTopSuggestion: function getDatumForTopSuggestion() {
- return this.getDatumForSuggestion(this._getSuggestions().first());
- },
- update: function update(query) {
- _.each(this.datasets, updateDataset);
- function updateDataset(dataset) {
- dataset.update(query);
- }
- },
- empty: function empty() {
- _.each(this.datasets, clearDataset);
- this.isEmpty = true;
- function clearDataset(dataset) {
- dataset.clear();
- }
- },
- isVisible: function isVisible() {
- return this.isOpen && !this.isEmpty;
- },
- destroy: function destroy() {
- this.$menu.off(".tt");
- this.$menu = null;
- _.each(this.datasets, destroyDataset);
- function destroyDataset(dataset) {
- dataset.destroy();
- }
- }
- });
- return Dropdown;
- function initializeDataset(oDataset) {
- return new Dataset(oDataset);
- }
- }();
- var Typeahead = function() {
- var attrsKey = "ttAttrs";
- function Typeahead(o) {
- var $menu, $input, $hint;
- o = o || {};
- if (!o.input) {
- $.error("missing input");
- }
- this.isActivated = false;
- this.autoselect = !!o.autoselect;
- this.minLength = _.isNumber(o.minLength) ? o.minLength : 1;
- this.$node = buildDomStructure(o.input, o.withHint);
- $menu = this.$node.find(".tt-dropdown-menu");
- $input = this.$node.find(".tt-input");
- $hint = this.$node.find(".tt-hint");
- $input.on("blur.tt", function($e) {
- var active, isActive, hasActive;
- active = document.activeElement;
- isActive = $menu.is(active);
- hasActive = $menu.has(active).length > 0;
- if (_.isMsie() && (isActive || hasActive)) {
- $e.preventDefault();
- $e.stopImmediatePropagation();
- _.defer(function() {
- $input.focus();
- });
- }
- });
- $menu.on("mousedown.tt", function($e) {
- $e.preventDefault();
- });
- this.eventBus = o.eventBus || new EventBus({
- el: $input
- });
- this.dropdown = new Dropdown({
- menu: $menu,
- datasets: o.datasets
- }).onSync("suggestionClicked", this._onSuggestionClicked, this).onSync("cursorMoved", this._onCursorMoved, this).onSync("cursorRemoved", this._onCursorRemoved, this).onSync("opened", this._onOpened, this).onSync("closed", this._onClosed, this).onAsync("datasetRendered", this._onDatasetRendered, this);
- this.input = new Input({
- input: $input,
- hint: $hint
- }).onSync("focused", this._onFocused, this).onSync("blurred", this._onBlurred, this).onSync("enterKeyed", this._onEnterKeyed, this).onSync("tabKeyed", this._onTabKeyed, this).onSync("escKeyed", this._onEscKeyed, this).onSync("upKeyed", this._onUpKeyed, this).onSync("downKeyed", this._onDownKeyed, this).onSync("leftKeyed", this._onLeftKeyed, this).onSync("rightKeyed", this._onRightKeyed, this).onSync("queryChanged", this._onQueryChanged, this).onSync("whitespaceChanged", this._onWhitespaceChanged, this);
- this._setLanguageDirection();
- }
- _.mixin(Typeahead.prototype, {
- _onSuggestionClicked: function onSuggestionClicked(type, $el) {
- var datum;
- if (datum = this.dropdown.getDatumForSuggestion($el)) {
- this._select(datum);
- }
- },
- _onCursorMoved: function onCursorMoved() {
- var datum = this.dropdown.getDatumForCursor();
- this.input.setInputValue(datum.value, true);
- this.eventBus.trigger("cursorchanged", datum.raw, datum.datasetName);
- },
- _onCursorRemoved: function onCursorRemoved() {
- this.input.resetInputValue();
- this._updateHint();
- },
- _onDatasetRendered: function onDatasetRendered() {
- this._updateHint();
- },
- _onOpened: function onOpened() {
- this._updateHint();
- this.eventBus.trigger("opened");
- },
- _onClosed: function onClosed() {
- this.input.clearHint();
- this.eventBus.trigger("closed");
- },
- _onFocused: function onFocused() {
- this.isActivated = true;
- this.dropdown.open();
- },
- _onBlurred: function onBlurred() {
- this.isActivated = false;
- this.dropdown.empty();
- this.dropdown.close();
- this.setVal("", true); //LM
- },
- _onEnterKeyed: function onEnterKeyed(type, $e) {
- var cursorDatum, topSuggestionDatum;
- cursorDatum = this.dropdown.getDatumForCursor();
- topSuggestionDatum = this.dropdown.getDatumForTopSuggestion();
- if (cursorDatum) {
- this._select(cursorDatum);
- $e.preventDefault();
- } else if (this.autoselect && topSuggestionDatum) {
- this._select(topSuggestionDatum);
- $e.preventDefault();
- }
- },
- _onTabKeyed: function onTabKeyed(type, $e) {
- var datum;
- if (datum = this.dropdown.getDatumForCursor()) {
- this._select(datum);
- $e.preventDefault();
- } else {
- this._autocomplete(true);
- }
- },
- _onEscKeyed: function onEscKeyed() {
- this.dropdown.close();
- this.input.resetInputValue();
- },
- _onUpKeyed: function onUpKeyed() {
- var query = this.input.getQuery();
- this.dropdown.isEmpty && query.length >= this.minLength ? this.dropdown.update(query) : this.dropdown.moveCursorUp();
- this.dropdown.open();
- },
- _onDownKeyed: function onDownKeyed() {
- var query = this.input.getQuery();
- this.dropdown.isEmpty && query.length >= this.minLength ? this.dropdown.update(query) : this.dropdown.moveCursorDown();
- this.dropdown.open();
- },
- _onLeftKeyed: function onLeftKeyed() {
- this.dir === "rtl" && this._autocomplete();
- },
- _onRightKeyed: function onRightKeyed() {
- this.dir === "ltr" && this._autocomplete();
- },
- _onQueryChanged: function onQueryChanged(e, query) {
- this.input.clearHintIfInvalid();
- query.length >= this.minLength ? this.dropdown.update(query) : this.dropdown.empty();
- this.dropdown.open();
- this._setLanguageDirection();
- },
- _onWhitespaceChanged: function onWhitespaceChanged() {
- this._updateHint();
- this.dropdown.open();
- },
- _setLanguageDirection: function setLanguageDirection() {
- var dir;
- if (this.dir !== (dir = this.input.getLanguageDirection())) {
- this.dir = dir;
- this.$node.css("direction", dir);
- this.dropdown.setLanguageDirection(dir);
- }
- },
- _updateHint: function updateHint() {
- var datum, val, query, escapedQuery, frontMatchRegEx, match;
- datum = this.dropdown.getDatumForTopSuggestion();
- if (datum && this.dropdown.isVisible() && !this.input.hasOverflow()) {
- val = this.input.getInputValue();
- query = Input.normalizeQuery(val);
- escapedQuery = _.escapeRegExChars(query);
- frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i");
- match = frontMatchRegEx.exec(datum.value);
- match ? this.input.setHint(val + match[1]) : this.input.clearHint();
- } else {
- this.input.clearHint();
- }
- },
- _autocomplete: function autocomplete(laxCursor) {
- var hint, query, isCursorAtEnd, datum;
- hint = this.input.getHint();
- query = this.input.getQuery();
- isCursorAtEnd = laxCursor || this.input.isCursorAtEnd();
- if (hint && query !== hint && isCursorAtEnd) {
- datum = this.dropdown.getDatumForTopSuggestion();
- datum && this.input.setInputValue(datum.value);
- this.eventBus.trigger("autocompleted", datum.raw, datum.datasetName);
- }
- },
- _select: function select(datum) {
- this.input.setQuery(datum.value);
- this.input.setInputValue(datum.value, true);
- this._setLanguageDirection();
- this.eventBus.trigger("selected", datum.raw, datum.datasetName);
- this.dropdown.close();
- _.defer(_.bind(this.dropdown.empty, this.dropdown));
- },
- open: function open() {
- this.dropdown.open();
- },
- close: function close() {
- this.dropdown.close();
- },
- setVal: function setVal(val) {
- if (this.isActivated) {
- this.input.setInputValue(val);
- } else {
- this.input.setQuery(val);
- this.input.setInputValue(val, true);
- }
- this._setLanguageDirection();
- },
- getVal: function getVal() {
- return this.input.getQuery();
- },
- destroy: function destroy() {
- this.input.destroy();
- this.dropdown.destroy();
- destroyDomStructure(this.$node);
- this.$node = null;
- }
- });
- return Typeahead;
- function buildDomStructure(input, withHint) {
- var $input, $wrapper, $dropdown, $hint;
- $input = $(input);
- $wrapper = $(html.wrapper).css(css.wrapper);
- $dropdown = $(html.dropdown).css(css.dropdown);
- $hint = $input.clone().css(css.hint).css(getBackgroundStyles($input));
- $hint.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder").prop("disabled", true).attr({
- autocomplete: "off",
- spellcheck: "false"
- });
- $input.data(attrsKey, {
- dir: $input.attr("dir"),
- autocomplete: $input.attr("autocomplete"),
- spellcheck: $input.attr("spellcheck"),
- style: $input.attr("style")
- });
- $input.addClass("tt-input").attr({
- autocomplete: "off",
- spellcheck: false
- }).css(withHint ? css.input : css.inputWithNoHint);
- try {
- !$input.attr("dir") && $input.attr("dir", "auto");
- } catch (e) {}
- return $input.wrap($wrapper).parent().prepend(withHint ? $hint : null).append($dropdown);
- }
- function getBackgroundStyles($el) {
- return {
- backgroundAttachment: $el.css("background-attachment"),
- backgroundClip: $el.css("background-clip"),
- backgroundColor: $el.css("background-color"),
- backgroundImage: $el.css("background-image"),
- backgroundOrigin: $el.css("background-origin"),
- backgroundPosition: $el.css("background-position"),
- backgroundRepeat: $el.css("background-repeat"),
- backgroundSize: $el.css("background-size")
- };
- }
- function destroyDomStructure($node) {
- var $input = $node.find(".tt-input");
- _.each($input.data(attrsKey), function(val, key) {
- _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val);
- });
- $input.detach().removeData(attrsKey).removeClass("tt-input").insertAfter($node);
- $node.remove();
- }
- }();
- (function() {
- var old, typeaheadKey, methods;
- old = $.fn.typeahead;
- typeaheadKey = "ttTypeahead";
- methods = {
- initialize: function initialize(o, datasets) {
- datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1);
- o = o || {};
- return this.each(attach);
- function attach() {
- var $input = $(this), eventBus, typeahead;
- _.each(datasets, function(d) {
- d.highlight = !!o.highlight;
- });
- typeahead = new Typeahead({
- input: $input,
- eventBus: eventBus = new EventBus({
- el: $input
- }),
- withHint: _.isUndefined(o.hint) ? true : !!o.hint,
- minLength: o.minLength,
- autoselect: o.autoselect,
- datasets: datasets
- });
- $input.data(typeaheadKey, typeahead);
- }
- },
- open: function open() {
- return this.each(openTypeahead);
- function openTypeahead() {
- var $input = $(this), typeahead;
- if (typeahead = $input.data(typeaheadKey)) {
- typeahead.open();
- }
- }
- },
- close: function close() {
- return this.each(closeTypeahead);
- function closeTypeahead() {
- var $input = $(this), typeahead;
- if (typeahead = $input.data(typeaheadKey)) {
- typeahead.close();
- }
- }
- },
- val: function val(newVal) {
- return !arguments.length ? getVal(this.first()) : this.each(setVal);
- function setVal() {
- var $input = $(this), typeahead;
- if (typeahead = $input.data(typeaheadKey)) {
- typeahead.setVal(newVal);
- }
- }
- function getVal($input) {
- var typeahead, query;
- if (typeahead = $input.data(typeaheadKey)) {
- query = typeahead.getVal();
- }
- return query;
- }
- },
- destroy: function destroy() {
- return this.each(unattach);
- function unattach() {
- var $input = $(this), typeahead;
- if (typeahead = $input.data(typeaheadKey)) {
- typeahead.destroy();
- $input.removeData(typeaheadKey);
- }
- }
- }
- };
- $.fn.typeahead = function(method) {
- if (methods[method]) {
- return methods[method].apply(this, [].slice.call(arguments, 1));
- } else {
- return methods.initialize.apply(this, arguments);
- }
- };
- $.fn.typeahead.noConflict = function noConflict() {
- $.fn.typeahead = old;
- return this;
- };
- })();
-
-
-
-//})(window.jQuery);
-
-
-});
-define('searchView',[
- 'App',
- // Templates
- 'text!tpl/search.html',
- 'text!tpl/search_suggestion.html',
- // Tools
- 'typeahead'
-], function(App, searchTpl, suggestionTpl) {
-
- var searchView = Backbone.View.extend({
- el: '#search',
- /**
- * Init.
- */
- init: function() {
- var tpl = _.template(searchTpl);
- var className = 'form-control input-lg';
- var placeholder = 'Search reference';
- this.searchHtml = tpl({
- 'placeholder': placeholder,
- 'className': className
- });
- this.items = App.classes.concat(App.allItems);
-
- return this;
- },
- /**
- * Render input field with Typehead activated.
- */
- render: function() {
- // Append the view to the dom
- this.$el.append(this.searchHtml);
-
- // Render Typeahead
- var $searchInput = this.$el.find('input[type=text]');
- this.typeaheadRender($searchInput);
- this.typeaheadEvents($searchInput);
-
- return this;
- },
- /**
- * Apply Twitter Typeahead to the search input field.
- * @param {jquery} $input
- */
- typeaheadRender: function($input) {
- var self = this;
- $input.typeahead(null, {
- 'displayKey': 'name',
- 'minLength': 2,
- //'highlight': true,
- 'source': self.substringMatcher(this.items),
- 'templates': {
- 'empty': ' ',
- 'suggestion': _.template(suggestionTpl)
- }
- });
- },
- /**
- * Setup typeahead custom events (item selected).
- */
- typeaheadEvents: function($input) {
- var self = this;
- $input.on('typeahead:selected', function(e, item, datasetName) {
- var selectedItem = self.items[item.idx];
- select(selectedItem);
- });
- $input.on('keydown', function(e) {
- if (e.which === 13) { // enter
- var txt = $input.val();
- var f = _.find(self.items, function(it) { return it.name == txt; });
- if (f) {
- select(f);
- }
- } else if (e.which === 27) {
- $input.blur();
- }
- });
-
- function select(selectedItem) {
- var hash = App.router.getHash(selectedItem);//
- App.router.navigate(hash, {'trigger': true});
- $('#item').focus();
- }
- },
- /**
- * substringMatcher function for Typehead (search for strings in an array).
- * @param {array} array
- * @returns {Function}
- */
- substringMatcher: function(array) {
- return function findMatches(query, callback) {
- var matches = [], substrRegex, arrayLength = array.length;
-
- // regex used to determine if a string contains the substring `query`
- substrRegex = new RegExp(query, 'i');
-
- // iterate through the pool of strings and for any string that
- // contains the substring `query`, add it to the `matches` array
- for (var i=0; i < arrayLength; i++) {
- var item = array[i];
- if (substrRegex.test(item.name)) {
- // typeahead expects suggestions to be a js object
- matches.push({
- 'itemtype': item.itemtype,
- 'name': item.name,
- 'className': item.class,
- 'is_constructor': !!item.is_constructor,
- 'final': item.final,
- 'idx': i
- });
- }
- }
-
- callback(matches);
- };
- }
-
- });
-
- return searchView;
-
-});
-
-
-define('text!tpl/list.html',[],function () { return '<% _.each(groups, function(group){ %>\n \n <%=group.name%>
\n \n <% _.each(group.subgroups, function(subgroup, ind) { %>\n \n <% if (subgroup.name !== \'0\') { %>\n <%=subgroup.name%>
\n <% } %>\n \n <% _.each(subgroup.items, function(item) { %>\n - <%=item.name%><% if (item.itemtype === \'method\') { %>()<%}%>
\n <% }); %>\n
\n \n <% }); %>\n \n \n<% }); %>\n';});
-
-define('listView',[
- 'App',
- // Templates
- 'text!tpl/list.html'
-], function (App, listTpl) {
- var striptags = function(html) {
- var div = document.createElement('div');
- div.innerHTML = html;
- return div.textContent;
- };
-
- var listView = Backbone.View.extend({
- el: '#list',
- events: {},
- /**
- * Init.
- */
- init: function () {
- this.listTpl = _.template(listTpl);
-
- return this;
- },
- /**
- * Render the list.
- */
- render: function (items, listCollection) {
- if (items && listCollection) {
- var self = this;
-
- // Render items and group them by module
- // module === group
- this.groups = {};
- _.each(items, function (item, i) {
-
- if (!item.private && item.file.indexOf('addons') === -1) { //addons don't get displayed on main page
-
- var group = item.module || '_';
- var subgroup = item.submodule || '_';
- if (group === subgroup) {
- subgroup = '0';
- }
- var hash = App.router.getHash(item);
-
- // fixes broken links for #/p5/> and #/p5/>=
- item.hash = item.hash.replace('>', '>');
-
- // Create a group list
- if (!self.groups[group]) {
- self.groups[group] = {
- name: group.replace('_', ' '),
- subgroups: {}
- };
- }
-
- // Create a subgroup list
- if (!self.groups[group].subgroups[subgroup]) {
- self.groups[group].subgroups[subgroup] = {
- name: subgroup.replace('_', ' '),
- items: []
- };
- }
-
- // hide the un-interesting constants
- if (group === 'Constants' && !item.example)
- return;
-
- if (item.class === 'p5') {
-
- self.groups[group].subgroups[subgroup].items.push(item);
-
- } else {
-
- var found = _.find(self.groups[group].subgroups[subgroup].items,
- function(i){ return i.name == item.class; });
-
- if (!found) {
-
- // FIX TO INVISIBLE OBJECTS: DH (see also router.js)
- var ind = hash.lastIndexOf('/');
- hash = item.hash.substring(0, ind).replace('p5/','p5.');
- self.groups[group].subgroups[subgroup].items.push({
- name: item.class,
- hash: hash
- });
- }
-
- }
- }
- });
-
- // Put the items html into the list
- var listHtml = self.listTpl({
- 'striptags': striptags,
- 'title': self.capitalizeFirst(listCollection),
- 'groups': self.groups,
- 'listCollection': listCollection
- });
-
- // Render the view
- this.$el.html(listHtml);
- }
-
- var renderEvent = new Event('reference-rendered');
- window.dispatchEvent(renderEvent);
-
- return this;
- },
- /**
- * Show a list of items.
- * @param {array} items Array of item objects.
- * @returns {object} This view.
- */
- show: function (listGroup) {
- if (App[listGroup]) {
- this.render(App[listGroup], listGroup);
- }
- App.pageView.hideContentViews();
-
- this.$el.show();
-
- return this;
- },
- /**
- * Helper method to capitalize the first letter of a string
- * @param {string} str
- * @returns {string} Returns the string.
- */
- capitalizeFirst: function (str) {
- return str.substr(0, 1).toUpperCase() + str.substr(1);
- }
-
-
-
- });
-
- return listView;
-
-});
-
-
-define('text!tpl/item.html',[],function () { return '<%=item.name%><% if (item.isMethod) { %>()<% } %>
\n\n<% if (item.example) { %>\n\n Examples
\n\n \n <% _.each(item.example, function(example, i){ %>\n <%= example %>\n <% }); %>\n \n\n<% } %>\n\n\n \n Description
\n\n <% if (item.deprecated) { %>\n \n Deprecated: <%=item.name%><% if (item.isMethod) { %>()<% } %> is deprecated and will be removed in a future version of p5. <% if (item.deprecationMessage) { %><%=item.deprecationMessage%><% } %>\n
\n <% } %>\n \n\n <%= item.description %>\n\n <% if (item.extends) { %>\n Extends <%=item.extends%>
\n <% } %>\n\n <% if (item.module === \'p5.sound\') { %>\n This function requires you include the p5.sound library. Add the following into the head of your index.html file:\n
<script src="path/to/p5.sound.js"></script>
\n \n <% } %>\n\n <% if (item.constRefs) { %>\n Used by:\n <%\n var refs = item.constRefs;\n for (var i = 0; i < refs.length; i ++) {\n var ref = refs[i];\n var name = ref;\n if (name.substr(0, 3) === \'p5.\') {\n name = name.substr(3);\n }\n if (i !== 0) {\n if (i == refs.length - 1) {\n %> and <%\n } else {\n %>, <%\n }\n }\n %><%= name %>()<%\n }\n %>\n
\n <% } %>\n\n\n<% if (isConstructor || !isClass) { %>\n\n\n Syntax
\n \n <% syntaxes.forEach(function(syntax) { %>\n
<%= syntax %>
\n <% }) %>\n \n\n\n\n<% if (item.params) { %>\n \n Parameters
\n \n <% for (var i=0; i\n <% var p = item.params[i] %>\n - \n <%=p.name%>\n <% if (p.type) { %>\n \n <% var type = p.type.replace(/(p5\\.[A-Z][A-Za-z]*)/, \'$1\'); %>\n <%=type%>: <%=p.description%>\n <% if (p.optional) { %> (Optional)<% } %>\n \n <% } %>\n
\n <% } %>\n
\n \n<% } %>\n\n<% if (item.return && item.return.type) { %>\n \n Returns
\n <%=item.return.type%>: <%= item.return.description %>
\n \n<% } %>\n\n<% } %>\n';});
-
-
-define('text!tpl/class.html',[],function () { return '\n<% if (typeof constructor !== \'undefined\') { %>\n\n <%=constructor%>\n\n<% } %>\n\n<% let fields = _.filter(things, function(item) { return item.itemtype === \'property\' && item.access !== \'private\' }); %>\n<% if (fields.length > 0) { %>\n Fields
\n \n <% _.each(fields, function(item) { %>\n - \n \n <%= item.description %>\n
\n <% }); %>\n
\n<% } %>\n\n<% let methods = _.filter(things, function(item) { return item.itemtype === \'method\' && item.access !== \'private\' }); %>\n<% if (methods.length > 0) { %>\n Methods
\n \n <% _.each(methods, function(item) { %>\n - \n \n <%= item.description %>\n
\n <% }); %>\n
\n<% } %>\n';});
-
-
-define('text!tpl/itemEnd.html',[],function () { return '\n
\n\n\n<% if (item.file && item.line) { %>\nNotice any errors or typos? Please let us know. Please feel free to edit <%= item.file %> and issue a pull request!\n<% } %>\n\n\n
\n
\n';});
-
-// Copyright (C) 2006 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
-/**
- * @fileoverview
- * some functions for browser-side pretty printing of code contained in html.
- *
- *
- * For a fairly comprehensive set of languages see the
- * README
- * file that came with this source. At a minimum, the lexer should work on a
- * number of languages including C and friends, Java, Python, Bash, SQL, HTML,
- * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk
- * and a subset of Perl, but, because of commenting conventions, doesn't work on
- * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
- *
- * Usage:
- * - include this source file in an html page via
- * {@code }
- *
- define style rules. See the example page for examples.
- *
- mark the {@code
} and {@code } tags in your source with
- * {@code class=prettyprint.}
- * You can also use the (html deprecated) {@code } tag, but the pretty
- * printer needs to do more substantial DOM manipulations to support that, so
- * some css styles may not be preserved.
- *
- * That's it. I wanted to keep the API as simple as possible, so there's no
- * need to specify which language the code is in, but if you wish, you can add
- * another class to the {@code
} or {@code } element to specify the
- * language, as in {@code }. Any class that
- * starts with "lang-" followed by a file extension, specifies the file type.
- * See the "lang-*.js" files in this directory for code that implements
- * per-language file handlers.
- *
- * Change log:
- * cbeust, 2006/08/22
- *
- * Java annotations (start with "@") are now captured as literals ("lit")
- *
- * @requires console
- */
-
-// JSLint declarations
-/*global console, document, navigator, setTimeout, window, define */
-
-/** @define {boolean} */
-var IN_GLOBAL_SCOPE = true;
-
-/**
- * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
- * UI events.
- * If set to {@code false}, {@code prettyPrint()} is synchronous.
- */
-window['PR_SHOULD_USE_CONTINUATION'] = true;
-
-/**
- * Pretty print a chunk of code.
- * @param {string} sourceCodeHtml The HTML to pretty print.
- * @param {string} opt_langExtension The language name to use.
- * Typically, a filename extension like 'cpp' or 'java'.
- * @param {number|boolean} opt_numberLines True to number lines,
- * or the 1-indexed number of the first line in sourceCodeHtml.
- * @return {string} code as html, but prettier
- */
-var prettyPrintOne;
-/**
- * Find all the {@code } and {@code } tags in the DOM with
- * {@code class=prettyprint} and prettify them.
- *
- * @param {Function} opt_whenDone called when prettifying is done.
- * @param {HTMLElement|HTMLDocument} opt_root an element or document
- * containing all the elements to pretty print.
- * Defaults to {@code document.body}.
- */
-var prettyPrint;
-
-
-(function () {
- var win = window;
- // Keyword lists for various languages.
- // We use things that coerce to strings to make them compact when minified
- // and to defeat aggressive optimizers that fold large string constants.
- var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
- var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," +
- "double,enum,extern,float,goto,inline,int,long,register,short,signed," +
- "sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];
- var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
- "new,operator,private,protected,public,this,throw,true,try,typeof"];
- var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
- "concept,concept_map,const_cast,constexpr,decltype,delegate," +
- "dynamic_cast,explicit,export,friend,generic,late_check," +
- "mutable,namespace,nullptr,property,reinterpret_cast,static_assert," +
- "static_cast,template,typeid,typename,using,virtual,where"];
- var JAVA_KEYWORDS = [COMMON_KEYWORDS,
- "abstract,assert,boolean,byte,extends,final,finally,implements,import," +
- "instanceof,interface,null,native,package,strictfp,super,synchronized," +
- "throws,transient"];
- var CSHARP_KEYWORDS = [JAVA_KEYWORDS,
- "as,base,by,checked,decimal,delegate,descending,dynamic,event," +
- "fixed,foreach,from,group,implicit,in,internal,into,is,let," +
- "lock,object,out,override,orderby,params,partial,readonly,ref,sbyte," +
- "sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort," +
- "var,virtual,where"];
- var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
- "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
- "throw,true,try,unless,until,when,while,yes";
- var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
- "debugger,eval,export,function,get,null,set,undefined,var,with," +
- "Infinity,NaN"];
- var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
- "goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
- "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
- var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
- "elif,except,exec,finally,from,global,import,in,is,lambda," +
- "nonlocal,not,or,pass,print,raise,try,with,yield," +
- "False,True,None"];
- var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
- "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
- "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
- "BEGIN,END"];
- var RUST_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "as,assert,const,copy,drop," +
- "enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv," +
- "pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"];
- var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
- "function,in,local,set,then,until"];
- var ALL_KEYWORDS = [
- CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS,
- PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
- var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;
-
- // token style names. correspond to css classes
- /**
- * token style for a string literal
- * @const
- */
- var PR_STRING = 'str';
- /**
- * token style for a keyword
- * @const
- */
- var PR_KEYWORD = 'kwd';
- /**
- * token style for a comment
- * @const
- */
- var PR_COMMENT = 'com';
- /**
- * token style for a type
- * @const
- */
- var PR_TYPE = 'typ';
- /**
- * token style for a literal value. e.g. 1, null, true.
- * @const
- */
- var PR_LITERAL = 'lit';
- /**
- * token style for a punctuation string.
- * @const
- */
- var PR_PUNCTUATION = 'pun';
- /**
- * token style for plain text.
- * @const
- */
- var PR_PLAIN = 'pln';
-
- /**
- * token style for an sgml tag.
- * @const
- */
- var PR_TAG = 'tag';
- /**
- * token style for a markup declaration such as a DOCTYPE.
- * @const
- */
- var PR_DECLARATION = 'dec';
- /**
- * token style for embedded source.
- * @const
- */
- var PR_SOURCE = 'src';
- /**
- * token style for an sgml attribute name.
- * @const
- */
- var PR_ATTRIB_NAME = 'atn';
- /**
- * token style for an sgml attribute value.
- * @const
- */
- var PR_ATTRIB_VALUE = 'atv';
-
- /**
- * A class that indicates a section of markup that is not code, e.g. to allow
- * embedding of line numbers within code listings.
- * @const
- */
- var PR_NOCODE = 'nocode';
-
-
-
- /**
- * A set of tokens that can precede a regular expression literal in
- * javascript
- * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
- * has the full list, but I've removed ones that might be problematic when
- * seen in languages that don't support regular expression literals.
- *
- * Specifically, I've removed any keywords that can't precede a regexp
- * literal in a syntactically legal javascript program, and I've removed the
- * "in" keyword since it's not a keyword in many languages, and might be used
- * as a count of inches.
- *
- *
The link above does not accurately describe EcmaScript rules since
- * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
- * very well in practice.
- *
- * @private
- * @const
- */
- var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
-
- // CAVEAT: this does not properly handle the case where a regular
- // expression immediately follows another since a regular expression may
- // have flags for case-sensitivity and the like. Having regexp tokens
- // adjacent is not valid in any language I'm aware of, so I'm punting.
- // TODO: maybe style special characters inside a regexp as punctuation.
-
- /**
- * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
- * matches the union of the sets of strings matched by the input RegExp.
- * Since it matches globally, if the input strings have a start-of-input
- * anchor (/^.../), it is ignored for the purposes of unioning.
- * @param {Array.} regexs non multiline, non-global regexs.
- * @return {RegExp} a global regex.
- */
- function combinePrefixPatterns(regexs) {
- var capturedGroupIndex = 0;
-
- var needToFoldCase = false;
- var ignoreCase = false;
- for (var i = 0, n = regexs.length; i < n; ++i) {
- var regex = regexs[i];
- if (regex.ignoreCase) {
- ignoreCase = true;
- } else if (/[a-z]/i.test(regex.source.replace(
- /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
- needToFoldCase = true;
- ignoreCase = false;
- break;
- }
- }
-
- var escapeCharToCodeUnit = {
- 'b': 8,
- 't': 9,
- 'n': 0xa,
- 'v': 0xb,
- 'f': 0xc,
- 'r': 0xd
- };
-
- function decodeEscape(charsetPart) {
- var cc0 = charsetPart.charCodeAt(0);
- if (cc0 !== 92 /* \\ */) {
- return cc0;
- }
- var c1 = charsetPart.charAt(1);
- cc0 = escapeCharToCodeUnit[c1];
- if (cc0) {
- return cc0;
- } else if ('0' <= c1 && c1 <= '7') {
- return parseInt(charsetPart.substring(1), 8);
- } else if (c1 === 'u' || c1 === 'x') {
- return parseInt(charsetPart.substring(2), 16);
- } else {
- return charsetPart.charCodeAt(1);
- }
- }
-
- function encodeEscape(charCode) {
- if (charCode < 0x20) {
- return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
- }
- var ch = String.fromCharCode(charCode);
- return (ch === '\\' || ch === '-' || ch === ']' || ch === '^')
- ? "\\" + ch : ch;
- }
-
- function caseFoldCharset(charSet) {
- var charsetParts = charSet.substring(1, charSet.length - 1).match(
- new RegExp(
- '\\\\u[0-9A-Fa-f]{4}'
- + '|\\\\x[0-9A-Fa-f]{2}'
- + '|\\\\[0-3][0-7]{0,2}'
- + '|\\\\[0-7]{1,2}'
- + '|\\\\[\\s\\S]'
- + '|-'
- + '|[^-\\\\]',
- 'g'));
- var ranges = [];
- var inverse = charsetParts[0] === '^';
-
- var out = ['['];
- if (inverse) { out.push('^'); }
-
- for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
- var p = charsetParts[i];
- if (/\\[bdsw]/i.test(p)) { // Don't muck with named groups.
- out.push(p);
- } else {
- var start = decodeEscape(p);
- var end;
- if (i + 2 < n && '-' === charsetParts[i + 1]) {
- end = decodeEscape(charsetParts[i + 2]);
- i += 2;
- } else {
- end = start;
- }
- ranges.push([start, end]);
- // If the range might intersect letters, then expand it.
- // This case handling is too simplistic.
- // It does not deal with non-latin case folding.
- // It works for latin source code identifiers though.
- if (!(end < 65 || start > 122)) {
- if (!(end < 65 || start > 90)) {
- ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
- }
- if (!(end < 97 || start > 122)) {
- ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
- }
- }
- }
- }
-
- // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
- // -> [[1, 12], [14, 14], [16, 17]]
- ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1] - a[1]); });
- var consolidatedRanges = [];
- var lastRange = [];
- for (var i = 0; i < ranges.length; ++i) {
- var range = ranges[i];
- if (range[0] <= lastRange[1] + 1) {
- lastRange[1] = Math.max(lastRange[1], range[1]);
- } else {
- consolidatedRanges.push(lastRange = range);
- }
- }
-
- for (var i = 0; i < consolidatedRanges.length; ++i) {
- var range = consolidatedRanges[i];
- out.push(encodeEscape(range[0]));
- if (range[1] > range[0]) {
- if (range[1] + 1 > range[0]) { out.push('-'); }
- out.push(encodeEscape(range[1]));
- }
- }
- out.push(']');
- return out.join('');
- }
-
- function allowAnywhereFoldCaseAndRenumberGroups(regex) {
- // Split into character sets, escape sequences, punctuation strings
- // like ('(', '(?:', ')', '^'), and runs of characters that do not
- // include any of the above.
- var parts = regex.source.match(
- new RegExp(
- '(?:'
- + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]' // a character set
- + '|\\\\u[A-Fa-f0-9]{4}' // a unicode escape
- + '|\\\\x[A-Fa-f0-9]{2}' // a hex escape
- + '|\\\\[0-9]+' // a back-reference or octal escape
- + '|\\\\[^ux0-9]' // other escape sequence
- + '|\\(\\?[:!=]' // start of a non-capturing group
- + '|[\\(\\)\\^]' // start/end of a group, or line start
- + '|[^\\x5B\\x5C\\(\\)\\^]+' // run of other characters
- + ')',
- 'g'));
- var n = parts.length;
-
- // Maps captured group numbers to the number they will occupy in
- // the output or to -1 if that has not been determined, or to
- // undefined if they need not be capturing in the output.
- var capturedGroups = [];
-
- // Walk over and identify back references to build the capturedGroups
- // mapping.
- for (var i = 0, groupIndex = 0; i < n; ++i) {
- var p = parts[i];
- if (p === '(') {
- // groups are 1-indexed, so max group index is count of '('
- ++groupIndex;
- } else if ('\\' === p.charAt(0)) {
- var decimalValue = +p.substring(1);
- if (decimalValue) {
- if (decimalValue <= groupIndex) {
- capturedGroups[decimalValue] = -1;
- } else {
- // Replace with an unambiguous escape sequence so that
- // an octal escape sequence does not turn into a backreference
- // to a capturing group from an earlier regex.
- parts[i] = encodeEscape(decimalValue);
- }
- }
- }
- }
-
- // Renumber groups and reduce capturing groups to non-capturing groups
- // where possible.
- for (var i = 1; i < capturedGroups.length; ++i) {
- if (-1 === capturedGroups[i]) {
- capturedGroups[i] = ++capturedGroupIndex;
- }
- }
- for (var i = 0, groupIndex = 0; i < n; ++i) {
- var p = parts[i];
- if (p === '(') {
- ++groupIndex;
- if (!capturedGroups[groupIndex]) {
- parts[i] = '(?:';
- }
- } else if ('\\' === p.charAt(0)) {
- var decimalValue = +p.substring(1);
- if (decimalValue && decimalValue <= groupIndex) {
- parts[i] = '\\' + capturedGroups[decimalValue];
- }
- }
- }
-
- // Remove any prefix anchors so that the output will match anywhere.
- // ^^ really does mean an anchored match though.
- for (var i = 0; i < n; ++i) {
- if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
- }
-
- // Expand letters to groups to handle mixing of case-sensitive and
- // case-insensitive patterns if necessary.
- if (regex.ignoreCase && needToFoldCase) {
- for (var i = 0; i < n; ++i) {
- var p = parts[i];
- var ch0 = p.charAt(0);
- if (p.length >= 2 && ch0 === '[') {
- parts[i] = caseFoldCharset(p);
- } else if (ch0 !== '\\') {
- // TODO: handle letters in numeric escapes.
- parts[i] = p.replace(
- /[a-zA-Z]/g,
- function (ch) {
- var cc = ch.charCodeAt(0);
- return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
- });
- }
- }
- }
-
- return parts.join('');
- }
-
- var rewritten = [];
- for (var i = 0, n = regexs.length; i < n; ++i) {
- var regex = regexs[i];
- if (regex.global || regex.multiline) { throw new Error('' + regex); }
- rewritten.push(
- '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
- }
-
- return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
- }
-
- /**
- * Split markup into a string of source code and an array mapping ranges in
- * that string to the text nodes in which they appear.
- *
- *
- * The HTML DOM structure:
- *
- * (Element "p"
- * (Element "b"
- * (Text "print ")) ; #1
- * (Text "'Hello '") ; #2
- * (Element "br") ; #3
- * (Text " + 'World';")) ; #4
- *
- *
- * corresponds to the HTML
- * {@code
print 'Hello '
+ 'World';
}.
- *
- *
- * It will produce the output:
- *
- * {
- * sourceCode: "print 'Hello '\n + 'World';",
- * // 1 2
- * // 012345678901234 5678901234567
- * spans: [0, #1, 6, #2, 14, #3, 15, #4]
- * }
- *
- *
- * where #1 is a reference to the {@code "print "} text node above, and so
- * on for the other text nodes.
- *
- *
- *
- * The {@code} spans array is an array of pairs. Even elements are the start
- * indices of substrings, and odd elements are the text nodes (or BR elements)
- * that contain the text for those substrings.
- * Substrings continue until the next index or the end of the source.
- *
- *
- * @param {Node} node an HTML DOM subtree containing source-code.
- * @param {boolean} isPreformatted true if white-space in text nodes should
- * be considered significant.
- * @return {Object} source code and the text nodes in which they occur.
- */
- function extractSourceSpans(node, isPreformatted) {
- var nocode = /(?:^|\s)nocode(?:\s|$)/;
-
- var chunks = [];
- var length = 0;
- var spans = [];
- var k = 0;
-
- function walk(node) {
- var type = node.nodeType;
- if (type == 1) { // Element
- if (nocode.test(node.className)) { return; }
- for (var child = node.firstChild; child; child = child.nextSibling) {
- walk(child);
- }
- var nodeName = node.nodeName.toLowerCase();
- if ('br' === nodeName || 'li' === nodeName) {
- chunks[k] = '\n';
- spans[k << 1] = length++;
- spans[(k++ << 1) | 1] = node;
- }
- } else if (type == 3 || type == 4) { // Text
- var text = node.nodeValue;
- if (text.length) {
- if (!isPreformatted) {
- text = text.replace(/[ \t\r\n]+/g, ' ');
- } else {
- text = text.replace(/\r\n?/g, '\n'); // Normalize newlines.
- }
- // TODO: handle tabs here?
- chunks[k] = text;
- spans[k << 1] = length;
- length += text.length;
- spans[(k++ << 1) | 1] = node;
- }
- }
- }
-
- walk(node);
-
- return {
- sourceCode: chunks.join('').replace(/\n$/, ''),
- spans: spans
- };
- }
-
- /**
- * Apply the given language handler to sourceCode and add the resulting
- * decorations to out.
- * @param {number} basePos the index of sourceCode within the chunk of source
- * whose decorations are already present on out.
- */
- function appendDecorations(basePos, sourceCode, langHandler, out) {
- if (!sourceCode) { return; }
- var job = {
- sourceCode: sourceCode,
- basePos: basePos
- };
- langHandler(job);
- out.push.apply(out, job.decorations);
- }
-
- var notWs = /\S/;
-
- /**
- * Given an element, if it contains only one child element and any text nodes
- * it contains contain only space characters, return the sole child element.
- * Otherwise returns undefined.
- *
- * This is meant to return the CODE element in {@code
} when
- * there is a single child element that contains all the non-space textual
- * content, but not to return anything where there are multiple child elements
- * as in {@code ...
...
} or when there
- * is textual content.
- */
- function childContentWrapper(element) {
- var wrapper = undefined;
- for (var c = element.firstChild; c; c = c.nextSibling) {
- var type = c.nodeType;
- wrapper = (type === 1) // Element Node
- ? (wrapper ? element : c)
- : (type === 3) // Text Node
- ? (notWs.test(c.nodeValue) ? element : wrapper)
- : wrapper;
- }
- return wrapper === element ? undefined : wrapper;
- }
-
- /** Given triples of [style, pattern, context] returns a lexing function,
- * The lexing function interprets the patterns to find token boundaries and
- * returns a decoration list of the form
- * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
- * where index_n is an index into the sourceCode, and style_n is a style
- * constant like PR_PLAIN. index_n-1 <= index_n, and style_n-1 applies to
- * all characters in sourceCode[index_n-1:index_n].
- *
- * The stylePatterns is a list whose elements have the form
- * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
- *
- * Style is a style constant like PR_PLAIN, or can be a string of the
- * form 'lang-FOO', where FOO is a language extension describing the
- * language of the portion of the token in $1 after pattern executes.
- * E.g., if style is 'lang-lisp', and group 1 contains the text
- * '(hello (world))', then that portion of the token will be passed to the
- * registered lisp handler for formatting.
- * The text before and after group 1 will be restyled using this decorator
- * so decorators should take care that this doesn't result in infinite
- * recursion. For example, the HTML lexer rule for SCRIPT elements looks
- * something like ['lang-js', /<[s]cript>(.+?)<\/script>/]. This may match
- * '}\n * define style rules. See the example page for examples.\n * mark the {@code } and {@code } tags in your source with\n * {@code class=prettyprint.}\n * You can also use the (html deprecated) {@code } tag, but the pretty\n * printer needs to do more substantial DOM manipulations to support that, so\n * some css styles may not be preserved.\n * \n * That's it. I wanted to keep the API as simple as possible, so there's no\n * need to specify which language the code is in, but if you wish, you can add\n * another class to the {@code } or {@code } element to specify the\n * language, as in {@code }. Any class that\n * starts with \"lang-\" followed by a file extension, specifies the file type.\n * See the \"lang-*.js\" files in this directory for code that implements\n * per-language file handlers.\n * \n * Change log:
\n * cbeust, 2006/08/22\n *
\n * Java annotations (start with \"@\") are now captured as literals (\"lit\")\n *
\n * @requires console\n */\n\n// JSLint declarations\n/*global console, document, navigator, setTimeout, window, define */\n\n/** @define {boolean} */\nvar IN_GLOBAL_SCOPE = true;\n\n/**\n * Split {@code prettyPrint} into multiple timeouts so as not to interfere with\n * UI events.\n * If set to {@code false}, {@code prettyPrint()} is synchronous.\n */\nwindow['PR_SHOULD_USE_CONTINUATION'] = true;\n\n/**\n * Pretty print a chunk of code.\n * @param {string} sourceCodeHtml The HTML to pretty print.\n * @param {string} opt_langExtension The language name to use.\n * Typically, a filename extension like 'cpp' or 'java'.\n * @param {number|boolean} opt_numberLines True to number lines,\n * or the 1-indexed number of the first line in sourceCodeHtml.\n * @return {string} code as html, but prettier\n */\nvar prettyPrintOne;\n/**\n * Find all the {@code } and {@code } tags in the DOM with\n * {@code class=prettyprint} and prettify them.\n *\n * @param {Function} opt_whenDone called when prettifying is done.\n * @param {HTMLElement|HTMLDocument} opt_root an element or document\n * containing all the elements to pretty print.\n * Defaults to {@code document.body}.\n */\nvar prettyPrint;\n\n\n(function () {\n var win = window;\n // Keyword lists for various languages.\n // We use things that coerce to strings to make them compact when minified\n // and to defeat aggressive optimizers that fold large string constants.\n var FLOW_CONTROL_KEYWORDS = [\"break,continue,do,else,for,if,return,while\"];\n var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,\"auto,case,char,const,default,\" + \n \"double,enum,extern,float,goto,inline,int,long,register,short,signed,\" +\n \"sizeof,static,struct,switch,typedef,union,unsigned,void,volatile\"];\n var COMMON_KEYWORDS = [C_KEYWORDS,\"catch,class,delete,false,import,\" +\n \"new,operator,private,protected,public,this,throw,true,try,typeof\"];\n var CPP_KEYWORDS = [COMMON_KEYWORDS,\"alignof,align_union,asm,axiom,bool,\" +\n \"concept,concept_map,const_cast,constexpr,decltype,delegate,\" +\n \"dynamic_cast,explicit,export,friend,generic,late_check,\" +\n \"mutable,namespace,nullptr,property,reinterpret_cast,static_assert,\" +\n \"static_cast,template,typeid,typename,using,virtual,where\"];\n var JAVA_KEYWORDS = [COMMON_KEYWORDS,\n \"abstract,assert,boolean,byte,extends,final,finally,implements,import,\" +\n \"instanceof,interface,null,native,package,strictfp,super,synchronized,\" +\n \"throws,transient\"];\n var CSHARP_KEYWORDS = [JAVA_KEYWORDS,\n \"as,base,by,checked,decimal,delegate,descending,dynamic,event,\" +\n \"fixed,foreach,from,group,implicit,in,internal,into,is,let,\" +\n \"lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,\" +\n \"sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,\" +\n \"var,virtual,where\"];\n var COFFEE_KEYWORDS = \"all,and,by,catch,class,else,extends,false,finally,\" +\n \"for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,\" +\n \"throw,true,try,unless,until,when,while,yes\";\n var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,\n \"debugger,eval,export,function,get,null,set,undefined,var,with,\" +\n \"Infinity,NaN\"];\n var PERL_KEYWORDS = \"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,\" +\n \"goto,if,import,last,local,my,next,no,our,print,package,redo,require,\" +\n \"sub,undef,unless,until,use,wantarray,while,BEGIN,END\";\n var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, \"and,as,assert,class,def,del,\" +\n \"elif,except,exec,finally,from,global,import,in,is,lambda,\" +\n \"nonlocal,not,or,pass,print,raise,try,with,yield,\" +\n \"False,True,None\"];\n var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, \"alias,and,begin,case,class,\" +\n \"def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,\" +\n \"rescue,retry,self,super,then,true,undef,unless,until,when,yield,\" +\n \"BEGIN,END\"];\n var RUST_KEYWORDS = [FLOW_CONTROL_KEYWORDS, \"as,assert,const,copy,drop,\" +\n \"enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,\" +\n \"pub,pure,ref,self,static,struct,true,trait,type,unsafe,use\"];\n var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, \"case,done,elif,esac,eval,fi,\" +\n \"function,in,local,set,then,until\"];\n var ALL_KEYWORDS = [\n CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS,\n PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];\n var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\\d*)\\b/;\n\n // token style names. correspond to css classes\n /**\n * token style for a string literal\n * @const\n */\n var PR_STRING = 'str';\n /**\n * token style for a keyword\n * @const\n */\n var PR_KEYWORD = 'kwd';\n /**\n * token style for a comment\n * @const\n */\n var PR_COMMENT = 'com';\n /**\n * token style for a type\n * @const\n */\n var PR_TYPE = 'typ';\n /**\n * token style for a literal value. e.g. 1, null, true.\n * @const\n */\n var PR_LITERAL = 'lit';\n /**\n * token style for a punctuation string.\n * @const\n */\n var PR_PUNCTUATION = 'pun';\n /**\n * token style for plain text.\n * @const\n */\n var PR_PLAIN = 'pln';\n\n /**\n * token style for an sgml tag.\n * @const\n */\n var PR_TAG = 'tag';\n /**\n * token style for a markup declaration such as a DOCTYPE.\n * @const\n */\n var PR_DECLARATION = 'dec';\n /**\n * token style for embedded source.\n * @const\n */\n var PR_SOURCE = 'src';\n /**\n * token style for an sgml attribute name.\n * @const\n */\n var PR_ATTRIB_NAME = 'atn';\n /**\n * token style for an sgml attribute value.\n * @const\n */\n var PR_ATTRIB_VALUE = 'atv';\n\n /**\n * A class that indicates a section of markup that is not code, e.g. to allow\n * embedding of line numbers within code listings.\n * @const\n */\n var PR_NOCODE = 'nocode';\n\n \n \n /**\n * A set of tokens that can precede a regular expression literal in\n * javascript\n * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html\n * has the full list, but I've removed ones that might be problematic when\n * seen in languages that don't support regular expression literals.\n *\n * Specifically, I've removed any keywords that can't precede a regexp\n * literal in a syntactically legal javascript program, and I've removed the\n * \"in\" keyword since it's not a keyword in many languages, and might be used\n * as a count of inches.\n *\n *
The link above does not accurately describe EcmaScript rules since\n * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works\n * very well in practice.\n *\n * @private\n * @const\n */\n var REGEXP_PRECEDER_PATTERN = '(?:^^\\\\.?|[+-]|[!=]=?=?|\\\\#|%=?|&&?=?|\\\\(|\\\\*=?|[+\\\\-]=|->|\\\\/=?|::?|<=?|>>?>?=?|,|;|\\\\?|@|\\\\[|~|{|\\\\^\\\\^?=?|\\\\|\\\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\\\s*';\n \n // CAVEAT: this does not properly handle the case where a regular\n // expression immediately follows another since a regular expression may\n // have flags for case-sensitivity and the like. Having regexp tokens\n // adjacent is not valid in any language I'm aware of, so I'm punting.\n // TODO: maybe style special characters inside a regexp as punctuation.\n\n /**\n * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally\n * matches the union of the sets of strings matched by the input RegExp.\n * Since it matches globally, if the input strings have a start-of-input\n * anchor (/^.../), it is ignored for the purposes of unioning.\n * @param {Array.} regexs non multiline, non-global regexs.\n * @return {RegExp} a global regex.\n */\n function combinePrefixPatterns(regexs) {\n var capturedGroupIndex = 0;\n \n var needToFoldCase = false;\n var ignoreCase = false;\n for (var i = 0, n = regexs.length; i < n; ++i) {\n var regex = regexs[i];\n if (regex.ignoreCase) {\n ignoreCase = true;\n } else if (/[a-z]/i.test(regex.source.replace(\n /\\\\u[0-9a-f]{4}|\\\\x[0-9a-f]{2}|\\\\[^ux]/gi, ''))) {\n needToFoldCase = true;\n ignoreCase = false;\n break;\n }\n }\n \n var escapeCharToCodeUnit = {\n 'b': 8,\n 't': 9,\n 'n': 0xa,\n 'v': 0xb,\n 'f': 0xc,\n 'r': 0xd\n };\n \n function decodeEscape(charsetPart) {\n var cc0 = charsetPart.charCodeAt(0);\n if (cc0 !== 92 /* \\\\ */) {\n return cc0;\n }\n var c1 = charsetPart.charAt(1);\n cc0 = escapeCharToCodeUnit[c1];\n if (cc0) {\n return cc0;\n } else if ('0' <= c1 && c1 <= '7') {\n return parseInt(charsetPart.substring(1), 8);\n } else if (c1 === 'u' || c1 === 'x') {\n return parseInt(charsetPart.substring(2), 16);\n } else {\n return charsetPart.charCodeAt(1);\n }\n }\n \n function encodeEscape(charCode) {\n if (charCode < 0x20) {\n return (charCode < 0x10 ? '\\\\x0' : '\\\\x') + charCode.toString(16);\n }\n var ch = String.fromCharCode(charCode);\n return (ch === '\\\\' || ch === '-' || ch === ']' || ch === '^')\n ? \"\\\\\" + ch : ch;\n }\n \n function caseFoldCharset(charSet) {\n var charsetParts = charSet.substring(1, charSet.length - 1).match(\n new RegExp(\n '\\\\\\\\u[0-9A-Fa-f]{4}'\n + '|\\\\\\\\x[0-9A-Fa-f]{2}'\n + '|\\\\\\\\[0-3][0-7]{0,2}'\n + '|\\\\\\\\[0-7]{1,2}'\n + '|\\\\\\\\[\\\\s\\\\S]'\n + '|-'\n + '|[^-\\\\\\\\]',\n 'g'));\n var ranges = [];\n var inverse = charsetParts[0] === '^';\n \n var out = ['['];\n if (inverse) { out.push('^'); }\n \n for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {\n var p = charsetParts[i];\n if (/\\\\[bdsw]/i.test(p)) { // Don't muck with named groups.\n out.push(p);\n } else {\n var start = decodeEscape(p);\n var end;\n if (i + 2 < n && '-' === charsetParts[i + 1]) {\n end = decodeEscape(charsetParts[i + 2]);\n i += 2;\n } else {\n end = start;\n }\n ranges.push([start, end]);\n // If the range might intersect letters, then expand it.\n // This case handling is too simplistic.\n // It does not deal with non-latin case folding.\n // It works for latin source code identifiers though.\n if (!(end < 65 || start > 122)) {\n if (!(end < 65 || start > 90)) {\n ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);\n }\n if (!(end < 97 || start > 122)) {\n ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);\n }\n }\n }\n }\n \n // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]\n // -> [[1, 12], [14, 14], [16, 17]]\n ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1] - a[1]); });\n var consolidatedRanges = [];\n var lastRange = [];\n for (var i = 0; i < ranges.length; ++i) {\n var range = ranges[i];\n if (range[0] <= lastRange[1] + 1) {\n lastRange[1] = Math.max(lastRange[1], range[1]);\n } else {\n consolidatedRanges.push(lastRange = range);\n }\n }\n \n for (var i = 0; i < consolidatedRanges.length; ++i) {\n var range = consolidatedRanges[i];\n out.push(encodeEscape(range[0]));\n if (range[1] > range[0]) {\n if (range[1] + 1 > range[0]) { out.push('-'); }\n out.push(encodeEscape(range[1]));\n }\n }\n out.push(']');\n return out.join('');\n }\n \n function allowAnywhereFoldCaseAndRenumberGroups(regex) {\n // Split into character sets, escape sequences, punctuation strings\n // like ('(', '(?:', ')', '^'), and runs of characters that do not\n // include any of the above.\n var parts = regex.source.match(\n new RegExp(\n '(?:'\n + '\\\\[(?:[^\\\\x5C\\\\x5D]|\\\\\\\\[\\\\s\\\\S])*\\\\]' // a character set\n + '|\\\\\\\\u[A-Fa-f0-9]{4}' // a unicode escape\n + '|\\\\\\\\x[A-Fa-f0-9]{2}' // a hex escape\n + '|\\\\\\\\[0-9]+' // a back-reference or octal escape\n + '|\\\\\\\\[^ux0-9]' // other escape sequence\n + '|\\\\(\\\\?[:!=]' // start of a non-capturing group\n + '|[\\\\(\\\\)\\\\^]' // start/end of a group, or line start\n + '|[^\\\\x5B\\\\x5C\\\\(\\\\)\\\\^]+' // run of other characters\n + ')',\n 'g'));\n var n = parts.length;\n \n // Maps captured group numbers to the number they will occupy in\n // the output or to -1 if that has not been determined, or to\n // undefined if they need not be capturing in the output.\n var capturedGroups = [];\n \n // Walk over and identify back references to build the capturedGroups\n // mapping.\n for (var i = 0, groupIndex = 0; i < n; ++i) {\n var p = parts[i];\n if (p === '(') {\n // groups are 1-indexed, so max group index is count of '('\n ++groupIndex;\n } else if ('\\\\' === p.charAt(0)) {\n var decimalValue = +p.substring(1);\n if (decimalValue) {\n if (decimalValue <= groupIndex) {\n capturedGroups[decimalValue] = -1;\n } else {\n // Replace with an unambiguous escape sequence so that\n // an octal escape sequence does not turn into a backreference\n // to a capturing group from an earlier regex.\n parts[i] = encodeEscape(decimalValue);\n }\n }\n }\n }\n \n // Renumber groups and reduce capturing groups to non-capturing groups\n // where possible.\n for (var i = 1; i < capturedGroups.length; ++i) {\n if (-1 === capturedGroups[i]) {\n capturedGroups[i] = ++capturedGroupIndex;\n }\n }\n for (var i = 0, groupIndex = 0; i < n; ++i) {\n var p = parts[i];\n if (p === '(') {\n ++groupIndex;\n if (!capturedGroups[groupIndex]) {\n parts[i] = '(?:';\n }\n } else if ('\\\\' === p.charAt(0)) {\n var decimalValue = +p.substring(1);\n if (decimalValue && decimalValue <= groupIndex) {\n parts[i] = '\\\\' + capturedGroups[decimalValue];\n }\n }\n }\n \n // Remove any prefix anchors so that the output will match anywhere.\n // ^^ really does mean an anchored match though.\n for (var i = 0; i < n; ++i) {\n if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }\n }\n \n // Expand letters to groups to handle mixing of case-sensitive and\n // case-insensitive patterns if necessary.\n if (regex.ignoreCase && needToFoldCase) {\n for (var i = 0; i < n; ++i) {\n var p = parts[i];\n var ch0 = p.charAt(0);\n if (p.length >= 2 && ch0 === '[') {\n parts[i] = caseFoldCharset(p);\n } else if (ch0 !== '\\\\') {\n // TODO: handle letters in numeric escapes.\n parts[i] = p.replace(\n /[a-zA-Z]/g,\n function (ch) {\n var cc = ch.charCodeAt(0);\n return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';\n });\n }\n }\n }\n \n return parts.join('');\n }\n \n var rewritten = [];\n for (var i = 0, n = regexs.length; i < n; ++i) {\n var regex = regexs[i];\n if (regex.global || regex.multiline) { throw new Error('' + regex); }\n rewritten.push(\n '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');\n }\n \n return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');\n }\n\n /**\n * Split markup into a string of source code and an array mapping ranges in\n * that string to the text nodes in which they appear.\n *\n * \n * The HTML DOM structure:
\n * \n * (Element \"p\"\n * (Element \"b\"\n * (Text \"print \")) ; #1\n * (Text \"'Hello '\") ; #2\n * (Element \"br\") ; #3\n * (Text \" + 'World';\")) ; #4\n *
\n * \n * corresponds to the HTML\n * {@code
print 'Hello '
+ 'World';
}.
\n *\n * \n * It will produce the output:
\n * \n * {\n * sourceCode: \"print 'Hello '\\n + 'World';\",\n * // 1 2\n * // 012345678901234 5678901234567\n * spans: [0, #1, 6, #2, 14, #3, 15, #4]\n * }\n *
\n * \n * where #1 is a reference to the {@code \"print \"} text node above, and so\n * on for the other text nodes.\n *
\n *\n * \n * The {@code} spans array is an array of pairs. Even elements are the start\n * indices of substrings, and odd elements are the text nodes (or BR elements)\n * that contain the text for those substrings.\n * Substrings continue until the next index or the end of the source.\n *
\n *\n * @param {Node} node an HTML DOM subtree containing source-code.\n * @param {boolean} isPreformatted true if white-space in text nodes should\n * be considered significant.\n * @return {Object} source code and the text nodes in which they occur.\n */\n function extractSourceSpans(node, isPreformatted) {\n var nocode = /(?:^|\\s)nocode(?:\\s|$)/;\n \n var chunks = [];\n var length = 0;\n var spans = [];\n var k = 0;\n \n function walk(node) {\n var type = node.nodeType;\n if (type == 1) { // Element\n if (nocode.test(node.className)) { return; }\n for (var child = node.firstChild; child; child = child.nextSibling) {\n walk(child);\n }\n var nodeName = node.nodeName.toLowerCase();\n if ('br' === nodeName || 'li' === nodeName) {\n chunks[k] = '\\n';\n spans[k << 1] = length++;\n spans[(k++ << 1) | 1] = node;\n }\n } else if (type == 3 || type == 4) { // Text\n var text = node.nodeValue;\n if (text.length) {\n if (!isPreformatted) {\n text = text.replace(/[ \\t\\r\\n]+/g, ' ');\n } else {\n text = text.replace(/\\r\\n?/g, '\\n'); // Normalize newlines.\n }\n // TODO: handle tabs here?\n chunks[k] = text;\n spans[k << 1] = length;\n length += text.length;\n spans[(k++ << 1) | 1] = node;\n }\n }\n }\n \n walk(node);\n \n return {\n sourceCode: chunks.join('').replace(/\\n$/, ''),\n spans: spans\n };\n }\n\n /**\n * Apply the given language handler to sourceCode and add the resulting\n * decorations to out.\n * @param {number} basePos the index of sourceCode within the chunk of source\n * whose decorations are already present on out.\n */\n function appendDecorations(basePos, sourceCode, langHandler, out) {\n if (!sourceCode) { return; }\n var job = {\n sourceCode: sourceCode,\n basePos: basePos\n };\n langHandler(job);\n out.push.apply(out, job.decorations);\n }\n\n var notWs = /\\S/;\n\n /**\n * Given an element, if it contains only one child element and any text nodes\n * it contains contain only space characters, return the sole child element.\n * Otherwise returns undefined.\n * \n * This is meant to return the CODE element in {@code
} when\n * there is a single child element that contains all the non-space textual\n * content, but not to return anything where there are multiple child elements\n * as in {@code ...
...
} or when there\n * is textual content.\n */\n function childContentWrapper(element) {\n var wrapper = undefined;\n for (var c = element.firstChild; c; c = c.nextSibling) {\n var type = c.nodeType;\n wrapper = (type === 1) // Element Node\n ? (wrapper ? element : c)\n : (type === 3) // Text Node\n ? (notWs.test(c.nodeValue) ? element : wrapper)\n : wrapper;\n }\n return wrapper === element ? undefined : wrapper;\n }\n\n /** Given triples of [style, pattern, context] returns a lexing function,\n * The lexing function interprets the patterns to find token boundaries and\n * returns a decoration list of the form\n * [index_0, style_0, index_1, style_1, ..., index_n, style_n]\n * where index_n is an index into the sourceCode, and style_n is a style\n * constant like PR_PLAIN. index_n-1 <= index_n, and style_n-1 applies to\n * all characters in sourceCode[index_n-1:index_n].\n *\n * The stylePatterns is a list whose elements have the form\n * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].\n *\n * Style is a style constant like PR_PLAIN, or can be a string of the\n * form 'lang-FOO', where FOO is a language extension describing the\n * language of the portion of the token in $1 after pattern executes.\n * E.g., if style is 'lang-lisp', and group 1 contains the text\n * '(hello (world))', then that portion of the token will be passed to the\n * registered lisp handler for formatting.\n * The text before and after group 1 will be restyled using this decorator\n * so decorators should take care that this doesn't result in infinite\n * recursion. For example, the HTML lexer rule for SCRIPT elements looks\n * something like ['lang-js', /<[s]cript>(.+?)<\\/script>/]. This may match\n * '
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Processing Intuition times JavaScript power
-
-
-
-
-
- Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/eslint.config.mjs b/eslint.config.mjs
new file mode 100644
index 0000000000..040c2b7727
--- /dev/null
+++ b/eslint.config.mjs
@@ -0,0 +1,275 @@
+import { fileURLToPath } from 'node:url';
+
+import { defineConfig, globalIgnores } from 'eslint/config';
+import { includeIgnoreFile } from '@eslint/compat';
+// import { getJsdocProcessorPlugin } from 'eslint-plugin-jsdoc/getJsdocProcessorPlugin.js';
+
+import globals from 'globals';
+import js from '@eslint/js';
+import jsdoc from 'eslint-plugin-jsdoc';
+import markdown from '@eslint/markdown';
+import stylistic from '@stylistic/eslint-plugin';
+
+const gitignore = fileURLToPath(new URL('.gitignore', import.meta.url));
+
+const off = 0;
+const warn = 1;
+// const error = 2;
+
+const mitigatedJsRules = Object.fromEntries(
+ Object.entries(js.configs.recommended.rules).map(([rule]) => [rule, warn])
+);
+
+/** @type {import('eslint').Linter.RulesRecord} */
+const commonRules = {
+ // https://github.com/eslint/eslint/blob/main/packages/js/src/configs/eslint-recommended.js
+ // ...js.configs.recommended.rules,
+ ...mitigatedJsRules,
+
+ // https://eslint.org/docs/latest/rules/eqeqeq
+ eqeqeq: [warn, 'smart'],
+
+ // https://eslint.org/docs/latest/rules/new-cap
+ 'new-cap': off,
+
+ // https://eslint.org/docs/latest/rules/no-async-promise-executor
+ 'no-async-promise-executor': off,
+
+ // https://eslint.org/docs/latest/rules/no-caller
+ 'no-caller': warn,
+
+ // https://eslint.org/docs/latest/rules/no-cond-assign
+ 'no-cond-assign': [warn, 'except-parens'],
+
+ // https://eslint.org/docs/latest/rules/no-console
+ 'no-console': off,
+
+ // https://eslint.org/docs/latest/rules/no-empty
+ 'no-empty': [warn, { allowEmptyCatch: true }],
+
+ // https://eslint.org/docs/latest/rules/no-prototype-builtins
+ 'no-prototype-builtins': off,
+
+ // https://eslint.org/docs/latest/rules/no-undef
+ 'no-undef': off,
+
+ // https://eslint.org/docs/latest/rules/no-unused-vars
+ 'no-unused-vars': [
+ warn,
+ {
+ args: 'none'
+ }
+ ],
+
+ // https://eslint.org/docs/latest/rules/no-use-before-define
+ 'no-use-before-define': [warn, { functions: false }],
+
+ // https://eslint.style/rules/js/arrow-parens#arrow-parens
+ '@stylistic/arrow-parens': [warn, 'as-needed'],
+
+ // https://eslint.style/rules/default/comma-dangle
+ '@stylistic/comma-dangle': [warn, 'never'],
+
+ // https://eslint.style/rules/js/indent#indent
+ '@stylistic/indent': [warn, 2, { SwitchCase: 1 }],
+
+ // https://eslint.style/rules/js/linebreak-style#linebreak-style
+ '@stylistic/linebreak-style': [warn, 'unix'],
+
+ // https://eslint.style/rules/js/max-len#max-len
+ '@stylistic/max-len': [
+ warn,
+ {
+ code: 80,
+ ignoreComments: true,
+ ignoreStrings: true,
+ ignoreTemplateLiterals: true,
+ ignoreRegExpLiterals: true
+ }
+ ],
+
+ // https://eslint.style/rules/js/no-trailing-spaces#no-trailing-spaces
+ '@stylistic/no-trailing-spaces': warn,
+
+ // https://eslint.style/rules/js/object-curly-spacing#object-curly-spacing
+ '@stylistic/object-curly-spacing': [warn, 'always'],
+
+ // https://eslint.style/rules/js/quotes#quotes
+ '@stylistic/quotes': [warn, 'single', { avoidEscape: true }],
+
+ // https://eslint.style/rules/js/semi#semi
+ '@stylistic/semi': [warn, 'always']
+};
+
+/** @type {import('eslint').Linter.RulesRecord} */
+const jsdocRules = {
+ // https://github.com/gajus/eslint-plugin-jsdoc/blob/99cb131ee40fa10f943aadfd73a6d18da082882f/docs/rules/check-alignment.md
+ 'jsdoc/check-alignment': warn,
+
+ // @todo
+ // https://github.com/gajus/eslint-plugin-jsdoc/blob/99cb131ee40fa10f943aadfd73a6d18da082882f/docs/rules/check-line-alignment.md#readme
+ // 'jsdoc/check-line-alignment': [warn, 'always'],
+
+ // https://github.com/gajus/eslint-plugin-jsdoc/blob/99cb131ee40fa10f943aadfd73a6d18da082882f/docs/rules/no-multi-asterisks.md#readme
+ 'jsdoc/no-multi-asterisks': [warn, { allowWhitespace: true }],
+
+ // https://github.com/gajus/eslint-plugin-jsdoc/blob/99cb131ee40fa10f943aadfd73a6d18da082882f/docs/rules/require-asterisk-prefix.md#readme
+ 'jsdoc/require-asterisk-prefix': warn
+};
+
+export default defineConfig([
+ includeIgnoreFile(gitignore),
+ globalIgnores([
+ 'node_modules/**',
+ '.github/**',
+ '.vscode/**',
+ 'contributor_docs/archive/**',
+ 'contributor_docs/images/**',
+ 'dist/**',
+ 'lib/**',
+ 'src/core/reference.js',
+ 'src/type/lib/Typr.js',
+ 'test/**/*',
+ '!test/unit/',
+ '!test/unit/**/*',
+ 'translations/**',
+ 'types/**',
+ 'utils/sample-linter.mjs'
+ ]),
+ {
+ name: 'p5/common-rules',
+ files: ['**/*.js', '**/*.mjs'],
+ plugins: {
+ '@stylistic': stylistic
+ },
+ rules: {
+ ...commonRules
+ }
+ },
+ {
+ name: 'p5/source-files',
+ files: ['src/**/*.js'],
+ plugins: {
+ jsdoc
+ },
+ languageOptions: {
+ ecmaVersion: 2024,
+ globals: {
+ ...globals.browser,
+ ...globals.es2024
+ }
+ },
+ rules: {
+ ...jsdocRules
+ }
+ },
+ // https://github.com/processing/p5.js/actions/runs/15584716142/job/43887979759#step:5:5160
+ // @todo failed as **expected** due to `Parsing Error`s
+ // * src/io/p5.Table.js - 256:6
+ // * src/math/Matrices/Matrix.js - 532:12
+ // @todo failed **unexpected** due to `Parsing Error`
+ // * src/webgl/p5.Geometry.js - 49:42
+ // {
+ // name: 'p5/jsdoc-examples-processor',
+ // files: ['src/**/*.js'],
+ // plugins: {
+ // examples: getJsdocProcessorPlugin({
+ // allowedLanguagesToProcess: ['js', 'javascript'],
+ // exampleCodeRegex: /\s([\s\S]*?)<\/code>/
+ // })
+ // },
+ // processor: 'examples/examples'
+ // },
+ // {
+ // // https://github.com/gajus/eslint-plugin-jsdoc/blob/99cb131ee40fa10f943aadfd73a6d18da082882f/docs/processors.md#processors
+ // // https://github.com/gajus/eslint-plugin-jsdoc/blob/99cb131ee40fa10f943aadfd73a6d18da082882f/src/index.js#L414
+ // name: 'p5/jsdoc-example-rules',
+ // files: ['src/**/*.md/*.js'],
+ // rules: {
+ // ...commonRules,
+ // 'no-undef': off,
+ // 'no-unused-vars': off
+ // }
+ // },
+ {
+ name: 'p5/node-env',
+ files: [
+ 'test/**/*.js',
+ 'utils/**/*.js',
+ '**/*.config.mjs',
+ 'vitest.workspace.mjs'
+ ],
+ languageOptions: {
+ ecmaVersion: 'latest',
+ globals: {
+ ...globals.nodeBuiltin
+ }
+ }
+ },
+ {
+ name: 'p5/test-files',
+ files: [
+ 'test/unit/**/*.js'
+ ],
+ languageOptions: {
+ globals: {
+ ...globals.vitest,
+ // @todo test/js/helpers.js
+ 'assert': false,
+ 'expect': false
+ }
+ }
+ },
+ // @todo adjust globally ignored files
+ // @todo depends on globals.d.ts
+ // {
+ // name: 'p5/manual-test-examples',
+ // files: [
+ // 'test/manual-test-examples/**/*.js'
+ // ],
+ // languageOptions: {
+ // globals: {
+ // ...globals.browser,
+ // ...globals.es2024
+ // }
+ // },
+ // rules: {
+ // 'no-undef': off,
+ // 'no-unused-vars': off
+ // }
+ // },
+ {
+ // https://github.com/eslint/markdown?tab=readme-ov-file#rules
+ name: 'p5/contributor-docs',
+ files: ['**/*.md'],
+ plugins: {
+ markdown
+ },
+ language: 'markdown/commonmark',
+ rules: {
+ 'markdown/fenced-code-language': off,
+ 'markdown/heading-increment': off,
+ 'markdown/no-duplicate-definitions': warn,
+ // 'markdown/no-duplicate-headings': ["error", { checkSiblingsOnly: true }], // @todo waiting for @eslint/markdown@6.6.0
+ 'markdown/no-empty-definitions': warn,
+ 'markdown/no-empty-images': warn,
+ 'markdown/no-empty-links': warn,
+ 'markdown/no-html': off,
+ 'markdown/no-invalid-label-refs': off,
+ 'markdown/no-missing-atx-heading-space': warn,
+ 'markdown/no-missing-label-refs': off, // @todo
+ 'markdown/no-missing-link-fragments': off,
+ 'markdown/no-multiple-h1': off,
+ 'markdown/require-alt-text': warn,
+ 'markdown/table-column-count': warn
+ }
+ }
+ // https://github.com/eslint/markdown?tab=readme-ov-file#file-name-details
+ // @todo
+ // works out of the box but results in some `Parsing error`s
+ // which will make github workflows & actions fail e.g.
+ // * contributor_docs/fes_contribution_guide.md 354:1 error Parsing error: Unexpected character '🌸'
+ // * contributor_docs/zh-Hans/unit_testing.md 35:1 error Parsing error: Unexpected token
+ // * rfc_p5js_2.md 205:50 error Parsing error: Binding arguments in strict mode
+ // ...markdown.configs.processor
+]);
\ No newline at end of file
diff --git a/lib/addons/p5.sound.js b/lib/addons/p5.sound.js
index a8a7e3f450..f1fb294426 100644
--- a/lib/addons/p5.sound.js
+++ b/lib/addons/p5.sound.js
@@ -2945,11 +2945,10 @@ function () {
}();
/**
* loadSound() returns a new p5.SoundFile from a specified
- * path. If called during preload(), the p5.SoundFile will be ready
- * to play in time for setup() and draw(). If called outside of
- * preload, the p5.SoundFile will not be ready immediately, so
- * loadSound accepts a callback as the second parameter. Using a
- *
+ * path. If used with asynchronous setup (via `async`/`await`), the p5.SoundFile
+ * will be ready to play in time for `setup()` and `draw()`. If called outside of an async context,
+ * the p5.SoundFile will not be ready immediately, so loadSound accepts a callback as the second
+ * parameter. Using a
* local server is recommended when loading external files.
*
* @method loadSound
@@ -5782,7 +5781,7 @@ function pulse_setPrototypeOf(o, p) { pulse_setPrototypeOf = Object.setPrototype
* The pulse is created with two oscillators.
* Accepts a parameter for frequency, and to set the
* width between the pulses. See
+ * https://p5js.org/reference/#/p5.Oscillator">
* p5.Oscillator
for a full list of methods.
*
* @class p5.Pulse
diff --git a/lib/empty-example/sketch.js b/lib/empty-example/sketch.js
index c614f47b93..336fa0777f 100644
--- a/lib/empty-example/sketch.js
+++ b/lib/empty-example/sketch.js
@@ -1,7 +1,7 @@
function setup() {
- // put setup code here
-}
-
-function draw() {
- // put drawing code here
-}
+ // put setup code here
+ }
+
+ function draw() {
+ // put drawing code here
+ }
diff --git a/lib/index.html b/lib/index.html
new file mode 100644
index 0000000000..6e2e3837cc
--- /dev/null
+++ b/lib/index.html
@@ -0,0 +1,30 @@
+
+
+
+ P5 test
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 7040c18256..a4cea33377 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,117 +1,122 @@
{
"name": "p5",
- "version": "1.11.3",
+ "version": "2.0.5",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "p5",
- "version": "1.11.3",
+ "version": "2.0.5",
"license": "LGPL-2.1",
- "devDependencies": {
- "@babel/core": "^7.7.7",
- "@babel/preset-env": "^7.10.2",
- "@babel/register": "^7.7.7",
- "all-contributors-cli": "^6.19.0",
- "babel-plugin-i18next-extract": "^0.5.0",
- "babel-plugin-istanbul": "^5.2.0",
- "babelify": "^10.0.0",
- "brfs-babel": "^2.0.0",
- "browserify": "^16.5.0",
- "chai": "^3.5.0",
- "connect-modrewrite": "^0.10.1",
- "core-js": "^3.6.5",
- "derequire": "^2.0.0",
- "es6-promise": "^4.2.8",
- "eslint": "^8.23.1",
- "fetch-jsonp": "^1.1.3",
+ "dependencies": {
+ "@davepagurek/bezier-path": "^0.0.2",
+ "@japont/unicode-range": "^1.0.0",
+ "acorn": "^8.12.1",
+ "acorn-walk": "^8.3.4",
+ "colorjs.io": "^0.5.2",
+ "escodegen": "^2.1.0",
"file-saver": "^1.3.8",
"gifenc": "^1.0.3",
- "grunt": "^1.6.1",
- "grunt-cli": "^1.4.3",
- "grunt-contrib-clean": "^2.0.1",
- "grunt-contrib-connect": "^3.0.0",
- "grunt-contrib-uglify": "^5.2.2",
- "grunt-contrib-watch": "^1.1.0",
- "grunt-contrib-yuidoc": "1.0.0",
- "grunt-eslint": "^24.0.0",
- "grunt-minjson": "^0.4.0",
- "grunt-mocha-test": "^0.13.3",
- "grunt-newer": "^1.3.0",
- "grunt-simple-nyc": "^3.0.1",
- "html-entities": "^1.3.1",
- "husky": "^4.2.3",
"i18next": "^19.0.2",
"i18next-browser-languagedetector": "^4.0.1",
"libtess": "^1.2.2",
- "lint-staged": "^4.3.0",
- "marked": "^4.0.10",
- "mocha": "^10.2.0",
- "np": "^8.0.4",
"omggif": "^1.0.10",
- "open": "^7.0.3",
- "opentype.js": "^0.9.0",
- "pretty-fast": "^0.2.7",
- "promise-map-series": "^0.2.3",
- "puppeteer": "^18.2.1",
- "regenerator-runtime": "^0.13.3",
- "simple-git": "^3.16.1",
- "whatwg-fetch": "^2.0.4"
+ "pako": "^2.1.0",
+ "pixelmatch": "^7.1.0",
+ "zod": "^3.25.51"
+ },
+ "devDependencies": {
+ "@eslint/compat": "^1.2.9",
+ "@eslint/js": "^9.28.0",
+ "@eslint/markdown": "^6.5.0",
+ "@rollup/plugin-alias": "^5.1.1",
+ "@rollup/plugin-commonjs": "^25.0.7",
+ "@rollup/plugin-json": "^6.1.0",
+ "@rollup/plugin-node-resolve": "^15.2.3",
+ "@rollup/plugin-replace": "^5.0.7",
+ "@rollup/plugin-terser": "^0.4.4",
+ "@stylistic/eslint-plugin": "^4.4.1",
+ "@vitest/browser": "^2.1.5",
+ "all-contributors-cli": "^6.19.0",
+ "concurrently": "^8.2.2",
+ "documentation": "^14.0.3",
+ "eslint": "^9.28.0",
+ "eslint-plugin-jsdoc": "^50.8.0",
+ "glob": "^11.0.1",
+ "globals": "^16.2.0",
+ "husky": "^4.2.3",
+ "lint-staged": "^15.1.0",
+ "msw": "^2.6.3",
+ "rollup": "^4.9.6",
+ "rollup-plugin-string": "^3.0.0",
+ "rollup-plugin-visualizer": "^5.12.0",
+ "vite": "^5.0.2",
+ "vite-plugin-string": "^1.2.2",
+ "vitest": "^2.1.5",
+ "webdriverio": "^9.0.7"
+ }
+ },
+ "node_modules/@ampproject/remapping": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
+ "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ },
+ "engines": {
+ "node": ">=6.0.0"
}
},
"node_modules/@babel/code-frame": {
- "version": "7.22.13",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
- "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",
+ "version": "7.26.2",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz",
+ "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/highlight": "^7.22.13",
- "chalk": "^2.4.2"
+ "@babel/helper-validator-identifier": "^7.25.9",
+ "js-tokens": "^4.0.0",
+ "picocolors": "^1.0.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/compat-data": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.10.1.tgz",
- "integrity": "sha512-CHvCj7So7iCkGKPRFUfryXIkU2gSBw7VSZFYLsqVhrS47269VK2Hfi9S/YcublPMW8k1u2bQBlbDruoQEm4fgw==",
- "dev": true,
- "dependencies": {
- "browserslist": "^4.12.0",
- "invariant": "^2.2.4",
- "semver": "^5.5.0"
- }
- },
- "node_modules/@babel/compat-data/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "version": "7.26.5",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.5.tgz",
+ "integrity": "sha512-XvcZi1KWf88RVbF9wn8MN6tYFloU5qX8KjuF3E1PVBmJ9eypXfs4GRiJwLuTZL0iSnJUKn1BFPa5BPZZJyFzPg==",
"dev": true,
- "bin": {
- "semver": "bin/semver"
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
}
},
"node_modules/@babel/core": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.7.tgz",
- "integrity": "sha512-jlSjuj/7z138NLZALxVgrx13AOtqip42ATZP7+kYl53GvDV6+4dCek1mVUo8z8c8Xnw/mx2q3d9HWh3griuesQ==",
- "dev": true,
- "dependencies": {
- "@babel/code-frame": "^7.5.5",
- "@babel/generator": "^7.7.7",
- "@babel/helpers": "^7.7.4",
- "@babel/parser": "^7.7.7",
- "@babel/template": "^7.7.4",
- "@babel/traverse": "^7.7.4",
- "@babel/types": "^7.7.4",
- "convert-source-map": "^1.7.0",
+ "version": "7.26.7",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.7.tgz",
+ "integrity": "sha512-SRijHmF0PSPgLIBYlWnG0hyeJLwXE2CgpsXaMOrtt2yp9/86ALw6oUlj9KYuZ0JN07T4eBMVIW4li/9S1j2BGA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@ampproject/remapping": "^2.2.0",
+ "@babel/code-frame": "^7.26.2",
+ "@babel/generator": "^7.26.5",
+ "@babel/helper-compilation-targets": "^7.26.5",
+ "@babel/helper-module-transforms": "^7.26.0",
+ "@babel/helpers": "^7.26.7",
+ "@babel/parser": "^7.26.7",
+ "@babel/template": "^7.25.9",
+ "@babel/traverse": "^7.26.7",
+ "@babel/types": "^7.26.7",
+ "convert-source-map": "^2.0.0",
"debug": "^4.1.0",
- "json5": "^2.1.0",
- "lodash": "^4.17.13",
- "resolve": "^1.3.2",
- "semver": "^5.4.1",
- "source-map": "^0.5.0"
+ "gensync": "^1.0.0-beta.2",
+ "json5": "^2.2.3",
+ "semver": "^6.3.1"
},
"engines": {
"node": ">=6.9.0"
@@ -121,1924 +126,2093 @@
"url": "https://opencollective.com/babel"
}
},
- "node_modules/@babel/core/node_modules/convert-source-map": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
- "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
+ "node_modules/@babel/generator": {
+ "version": "7.26.5",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.5.tgz",
+ "integrity": "sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "safe-buffer": "~5.1.1"
+ "@babel/parser": "^7.26.5",
+ "@babel/types": "^7.26.5",
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.25",
+ "jsesc": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "node_modules/@babel/core/node_modules/debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
- "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
+ "node_modules/@babel/helper-compilation-targets": {
+ "version": "7.26.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz",
+ "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ms": "^2.1.1"
- }
- },
- "node_modules/@babel/core/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/@babel/core/node_modules/source-map": {
- "version": "0.5.7",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
- "dev": true,
+ "@babel/compat-data": "^7.26.5",
+ "@babel/helper-validator-option": "^7.25.9",
+ "browserslist": "^4.24.0",
+ "lru-cache": "^5.1.1",
+ "semver": "^6.3.1"
+ },
"engines": {
- "node": ">=0.10.0"
+ "node": ">=6.9.0"
}
},
- "node_modules/@babel/generator": {
- "version": "7.23.0",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz",
- "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==",
+ "node_modules/@babel/helper-module-imports": {
+ "version": "7.25.9",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz",
+ "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/types": "^7.23.0",
- "@jridgewell/gen-mapping": "^0.3.2",
- "@jridgewell/trace-mapping": "^0.3.17",
- "jsesc": "^2.5.1"
+ "@babel/traverse": "^7.25.9",
+ "@babel/types": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
}
},
- "node_modules/@babel/helper-annotate-as-pure": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.1.tgz",
- "integrity": "sha512-ewp3rvJEwLaHgyWGe4wQssC2vjks3E80WiUe2BpMb0KhreTjMROCbxXcEovTrbeGVdQct5VjQfrv9EgC+xMzCw==",
+ "node_modules/@babel/helper-module-transforms": {
+ "version": "7.26.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz",
+ "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/types": "^7.10.1"
+ "@babel/helper-module-imports": "^7.25.9",
+ "@babel/helper-validator-identifier": "^7.25.9",
+ "@babel/traverse": "^7.25.9"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
}
},
- "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.1.tgz",
- "integrity": "sha512-cQpVq48EkYxUU0xozpGCLla3wlkdRRqLWu1ksFMXA9CM5KQmyyRpSEsYXbao7JUkOw/tAaYKCaYyZq6HOFYtyw==",
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.25.9",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz",
+ "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==",
"dev": true,
- "dependencies": {
- "@babel/helper-explode-assignable-expression": "^7.10.1",
- "@babel/types": "^7.10.1"
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "node_modules/@babel/helper-compilation-targets": {
- "version": "7.10.2",
- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.2.tgz",
- "integrity": "sha512-hYgOhF4To2UTB4LTaZepN/4Pl9LD4gfbJx8A34mqoluT8TLbof1mhUlYuNWTEebONa8+UlCC4X0TEXu7AOUyGA==",
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.25.9",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
+ "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
"dev": true,
- "dependencies": {
- "@babel/compat-data": "^7.10.1",
- "browserslist": "^4.12.0",
- "invariant": "^2.2.4",
- "levenary": "^1.1.1",
- "semver": "^5.5.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0"
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "node_modules/@babel/helper-compilation-targets/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "node_modules/@babel/helper-validator-option": {
+ "version": "7.25.9",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz",
+ "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==",
"dev": true,
- "bin": {
- "semver": "bin/semver"
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "node_modules/@babel/helper-create-class-features-plugin": {
- "version": "7.10.2",
- "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.2.tgz",
- "integrity": "sha512-5C/QhkGFh1vqcziq1vAL6SI9ymzUp8BCYjFpvYVhWP4DlATIb3u5q3iUd35mvlyGs8fO7hckkW7i0tmH+5+bvQ==",
+ "node_modules/@babel/helpers": {
+ "version": "7.26.7",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.7.tgz",
+ "integrity": "sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-function-name": "^7.10.1",
- "@babel/helper-member-expression-to-functions": "^7.10.1",
- "@babel/helper-optimise-call-expression": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/helper-replace-supers": "^7.10.1",
- "@babel/helper-split-export-declaration": "^7.10.1"
+ "@babel/template": "^7.25.9",
+ "@babel/types": "^7.26.7"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0"
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "node_modules/@babel/helper-create-class-features-plugin/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/helper-create-regexp-features-plugin": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.1.tgz",
- "integrity": "sha512-Rx4rHS0pVuJn5pJOqaqcZR4XSgeF9G/pO/79t+4r7380tXFJdzImFnxMU19f83wjSrmKHq6myrM10pFHTGzkUA==",
+ "node_modules/@babel/parser": {
+ "version": "7.26.7",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.7.tgz",
+ "integrity": "sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-annotate-as-pure": "^7.10.1",
- "@babel/helper-regex": "^7.10.1",
- "regexpu-core": "^4.7.0"
+ "@babel/types": "^7.26.7"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0"
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
}
},
- "node_modules/@babel/helper-define-map": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.1.tgz",
- "integrity": "sha512-+5odWpX+OnvkD0Zmq7panrMuAGQBu6aPUgvMzuMGo4R+jUOvealEj2hiqI6WhxgKrTpFoFj0+VdsuA8KDxHBDg==",
- "dev": true,
+ "node_modules/@babel/runtime": {
+ "version": "7.26.7",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.7.tgz",
+ "integrity": "sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==",
+ "license": "MIT",
"dependencies": {
- "@babel/helper-function-name": "^7.10.1",
- "@babel/types": "^7.10.1",
- "lodash": "^4.17.13"
- }
- },
- "node_modules/@babel/helper-environment-visitor": {
- "version": "7.22.20",
- "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
- "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
- "dev": true,
+ "regenerator-runtime": "^0.14.0"
+ },
"engines": {
"node": ">=6.9.0"
}
},
- "node_modules/@babel/helper-explode-assignable-expression": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.10.1.tgz",
- "integrity": "sha512-vcUJ3cDjLjvkKzt6rHrl767FeE7pMEYfPanq5L16GRtrXIoznc0HykNW2aEYkcnP76P0isoqJ34dDMFZwzEpJg==",
+ "node_modules/@babel/template": {
+ "version": "7.25.9",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz",
+ "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/traverse": "^7.10.1",
- "@babel/types": "^7.10.1"
+ "@babel/code-frame": "^7.25.9",
+ "@babel/parser": "^7.25.9",
+ "@babel/types": "^7.25.9"
+ },
+ "engines": {
+ "node": ">=6.9.0"
}
},
- "node_modules/@babel/helper-function-name": {
- "version": "7.23.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
- "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
- "dev": true,
- "dependencies": {
- "@babel/template": "^7.22.15",
- "@babel/types": "^7.23.0"
+ "node_modules/@babel/traverse": {
+ "version": "7.26.7",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.7.tgz",
+ "integrity": "sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.26.2",
+ "@babel/generator": "^7.26.5",
+ "@babel/parser": "^7.26.7",
+ "@babel/template": "^7.25.9",
+ "@babel/types": "^7.26.7",
+ "debug": "^4.3.1",
+ "globals": "^11.1.0"
},
"engines": {
"node": ">=6.9.0"
}
},
- "node_modules/@babel/helper-get-function-arity": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz",
- "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==",
+ "node_modules/@babel/traverse/node_modules/globals": {
+ "version": "11.12.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
+ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
"dev": true,
- "dependencies": {
- "@babel/types": "^7.10.1"
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
}
},
- "node_modules/@babel/helper-hoist-variables": {
- "version": "7.22.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
- "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
+ "node_modules/@babel/types": {
+ "version": "7.26.7",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.7.tgz",
+ "integrity": "sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/types": "^7.22.5"
+ "@babel/helper-string-parser": "^7.25.9",
+ "@babel/helper-validator-identifier": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
}
},
- "node_modules/@babel/helper-member-expression-to-functions": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.1.tgz",
- "integrity": "sha512-u7XLXeM2n50gb6PWJ9hoO5oO7JFPaZtrh35t8RqKLT1jFKj9IWeD1zrcrYp1q1qiZTdEarfDWfTIP8nGsu0h5g==",
+ "node_modules/@bundled-es-modules/cookie": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@bundled-es-modules/cookie/-/cookie-2.0.1.tgz",
+ "integrity": "sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "@babel/types": "^7.10.1"
+ "cookie": "^0.7.2"
}
},
- "node_modules/@babel/helper-module-imports": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.1.tgz",
- "integrity": "sha512-SFxgwYmZ3HZPyZwJRiVNLRHWuW2OgE5k2nrVs6D9Iv4PPnXVffuEHy83Sfx/l4SqF+5kyJXjAyUmrG7tNm+qVg==",
+ "node_modules/@bundled-es-modules/statuses": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@bundled-es-modules/statuses/-/statuses-1.0.1.tgz",
+ "integrity": "sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "@babel/types": "^7.10.1"
+ "statuses": "^2.0.1"
}
},
- "node_modules/@babel/helper-module-transforms": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.1.tgz",
- "integrity": "sha512-RLHRCAzyJe7Q7sF4oy2cB+kRnU4wDZY/H2xJFGof+M+SJEGhZsb+GFj5j1AD8NiSaVBJ+Pf0/WObiXu/zxWpFg==",
+ "node_modules/@bundled-es-modules/tough-cookie": {
+ "version": "0.1.6",
+ "resolved": "https://registry.npmjs.org/@bundled-es-modules/tough-cookie/-/tough-cookie-0.1.6.tgz",
+ "integrity": "sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "@babel/helper-module-imports": "^7.10.1",
- "@babel/helper-replace-supers": "^7.10.1",
- "@babel/helper-simple-access": "^7.10.1",
- "@babel/helper-split-export-declaration": "^7.10.1",
- "@babel/template": "^7.10.1",
- "@babel/types": "^7.10.1",
- "lodash": "^4.17.13"
+ "@types/tough-cookie": "^4.0.5",
+ "tough-cookie": "^4.1.4"
}
},
- "node_modules/@babel/helper-optimise-call-expression": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.1.tgz",
- "integrity": "sha512-a0DjNS1prnBsoKx83dP2falChcs7p3i8VMzdrSbfLhuQra/2ENC4sbri34dz/rWmDADsmF1q5GbfaXydh0Jbjg==",
+ "node_modules/@davepagurek/bezier-path": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/@davepagurek/bezier-path/-/bezier-path-0.0.2.tgz",
+ "integrity": "sha512-4L9ddgzZc9DRGyl1RrS3z5nwnVJoyjsAelVG4X1jh4tVxryEHr4H9QavhxW/my6Rn3669Qz6mhv8gd5O/WeFTA==",
+ "license": "MIT"
+ },
+ "node_modules/@es-joy/jsdoccomment": {
+ "version": "0.50.2",
+ "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.50.2.tgz",
+ "integrity": "sha512-YAdE/IJSpwbOTiaURNCKECdAwqrJuFiZhylmesBcIRawtYKnBR2wxPhoIewMg+Yu+QuYvHfJNReWpoxGBKOChA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/types": "^7.10.1"
+ "@types/estree": "^1.0.6",
+ "@typescript-eslint/types": "^8.11.0",
+ "comment-parser": "1.4.1",
+ "esquery": "^1.6.0",
+ "jsdoc-type-pratt-parser": "~4.1.0"
+ },
+ "engines": {
+ "node": ">=18"
}
},
- "node_modules/@babel/helper-plugin-utils": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz",
- "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==",
- "dev": true
- },
- "node_modules/@babel/helper-regex": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.1.tgz",
- "integrity": "sha512-7isHr19RsIJWWLLFn21ubFt223PjQyg1HY7CZEMRr820HttHPpVvrsIN3bUOo44DEfFV4kBXO7Abbn9KTUZV7g==",
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
+ "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
+ "cpu": [
+ "ppc64"
+ ],
"dev": true,
- "dependencies": {
- "lodash": "^4.17.13"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/helper-remap-async-to-generator": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.10.1.tgz",
- "integrity": "sha512-RfX1P8HqsfgmJ6CwaXGKMAqbYdlleqglvVtht0HGPMSsy2V6MqLlOJVF/0Qyb/m2ZCi2z3q3+s6Pv7R/dQuZ6A==",
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
+ "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
+ "cpu": [
+ "arm"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-annotate-as-pure": "^7.10.1",
- "@babel/helper-wrap-function": "^7.10.1",
- "@babel/template": "^7.10.1",
- "@babel/traverse": "^7.10.1",
- "@babel/types": "^7.10.1"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/helper-replace-supers": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz",
- "integrity": "sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A==",
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
+ "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-member-expression-to-functions": "^7.10.1",
- "@babel/helper-optimise-call-expression": "^7.10.1",
- "@babel/traverse": "^7.10.1",
- "@babel/types": "^7.10.1"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/helper-simple-access": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.1.tgz",
- "integrity": "sha512-VSWpWzRzn9VtgMJBIWTZ+GP107kZdQ4YplJlCmIrjoLVSi/0upixezHCDG8kpPVTBJpKfxTH01wDhh+jS2zKbw==",
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
+ "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "dependencies": {
- "@babel/template": "^7.10.1",
- "@babel/types": "^7.10.1"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/helper-split-export-declaration": {
- "version": "7.22.6",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
- "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
+ "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "dependencies": {
- "@babel/types": "^7.22.5"
- },
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
"engines": {
- "node": ">=6.9.0"
+ "node": ">=12"
}
},
- "node_modules/@babel/helper-string-parser": {
- "version": "7.22.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",
- "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
+ "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
"engines": {
- "node": ">=6.9.0"
+ "node": ">=12"
}
},
- "node_modules/@babel/helper-validator-identifier": {
- "version": "7.22.20",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
- "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
+ "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
"engines": {
- "node": ">=6.9.0"
+ "node": ">=12"
}
},
- "node_modules/@babel/helper-wrap-function": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.10.1.tgz",
- "integrity": "sha512-C0MzRGteVDn+H32/ZgbAv5r56f2o1fZSA/rj/TYo8JEJNHg+9BdSmKBUND0shxWRztWhjlT2cvHYuynpPsVJwQ==",
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
+ "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-function-name": "^7.10.1",
- "@babel/template": "^7.10.1",
- "@babel/traverse": "^7.10.1",
- "@babel/types": "^7.10.1"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/helpers": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.4.tgz",
- "integrity": "sha512-ak5NGZGJ6LV85Q1Zc9gn2n+ayXOizryhjSUBTdu5ih1tlVCJeuQENzc4ItyCVhINVXvIT/ZQ4mheGIsfBkpskg==",
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
+ "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
+ "cpu": [
+ "arm"
+ ],
"dev": true,
- "dependencies": {
- "@babel/template": "^7.7.4",
- "@babel/traverse": "^7.7.4",
- "@babel/types": "^7.7.4"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/highlight": {
- "version": "7.22.20",
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
- "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
+ "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-validator-identifier": "^7.22.20",
- "chalk": "^2.4.2",
- "js-tokens": "^4.0.0"
- },
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
"engines": {
- "node": ">=6.9.0"
+ "node": ">=12"
}
},
- "node_modules/@babel/parser": {
- "version": "7.23.0",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
- "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
+ "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
+ "cpu": [
+ "ia32"
+ ],
"dev": true,
- "bin": {
- "parser": "bin/babel-parser.js"
- },
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
"engines": {
- "node": ">=6.0.0"
+ "node": ">=12"
}
},
- "node_modules/@babel/plugin-proposal-async-generator-functions": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.1.tgz",
- "integrity": "sha512-vzZE12ZTdB336POZjmpblWfNNRpMSua45EYnRigE2XsZxcXcIyly2ixnTJasJE4Zq3U7t2d8rRF7XRUuzHxbOw==",
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
+ "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
+ "cpu": [
+ "loong64"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/helper-remap-async-to-generator": "^7.10.1",
- "@babel/plugin-syntax-async-generators": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/plugin-proposal-async-generator-functions/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-proposal-class-properties": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.1.tgz",
- "integrity": "sha512-sqdGWgoXlnOdgMXU+9MbhzwFRgxVLeiGBqTrnuS7LC2IBU31wSsESbTUreT2O418obpfPdGUR2GbEufZF1bpqw==",
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
+ "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
+ "cpu": [
+ "mips64el"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-create-class-features-plugin": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/plugin-proposal-class-properties/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-proposal-dynamic-import": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.10.1.tgz",
- "integrity": "sha512-Cpc2yUVHTEGPlmiQzXj026kqwjEQAD9I4ZC16uzdbgWgitg/UHKHLffKNCQZ5+y8jpIZPJcKcwsr2HwPh+w3XA==",
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
+ "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
+ "cpu": [
+ "ppc64"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/plugin-syntax-dynamic-import": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/plugin-proposal-dynamic-import/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-proposal-json-strings": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.1.tgz",
- "integrity": "sha512-m8r5BmV+ZLpWPtMY2mOKN7wre6HIO4gfIiV+eOmsnZABNenrt/kzYBwrh+KOfgumSWpnlGs5F70J8afYMSJMBg==",
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
+ "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
+ "cpu": [
+ "riscv64"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/plugin-syntax-json-strings": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/plugin-proposal-json-strings/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.1.tgz",
- "integrity": "sha512-56cI/uHYgL2C8HVuHOuvVowihhX0sxb3nnfVRzUeVHTWmRHTZrKuAh/OBIMggGU/S1g/1D2CRCXqP+3u7vX7iA==",
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
+ "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
+ "cpu": [
+ "s390x"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/plugin-proposal-nullish-coalescing-operator/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-proposal-numeric-separator": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.1.tgz",
- "integrity": "sha512-jjfym4N9HtCiNfyyLAVD8WqPYeHUrw4ihxuAynWj6zzp2gf9Ey2f7ImhFm6ikB3CLf5Z/zmcJDri6B4+9j9RsA==",
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
+ "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/plugin-syntax-numeric-separator": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/plugin-proposal-numeric-separator/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-proposal-object-rest-spread": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.1.tgz",
- "integrity": "sha512-Z+Qri55KiQkHh7Fc4BW6o+QBuTagbOp9txE+4U1i79u9oWlf2npkiDx+Rf3iK3lbcHBuNy9UOkwuR5wOMH3LIQ==",
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
+ "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
- "@babel/plugin-transform-parameters": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/plugin-proposal-object-rest-spread/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-proposal-optional-catch-binding": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.1.tgz",
- "integrity": "sha512-VqExgeE62YBqI3ogkGoOJp1R6u12DFZjqwJhqtKc2o5m1YTUuUWnos7bZQFBhwkxIFpWYJ7uB75U7VAPPiKETA==",
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
+ "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/plugin-syntax-optional-catch-binding": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/plugin-proposal-optional-catch-binding/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-proposal-optional-chaining": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.10.1.tgz",
- "integrity": "sha512-dqQj475q8+/avvok72CF3AOSV/SGEcH29zT5hhohqqvvZ2+boQoOr7iGldBG5YXTO2qgCgc2B3WvVLUdbeMlGA==",
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
+ "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/plugin-syntax-optional-chaining": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/plugin-proposal-optional-chaining/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
+ "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
- "node_modules/@babel/plugin-proposal-private-methods": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.1.tgz",
- "integrity": "sha512-RZecFFJjDiQ2z6maFprLgrdnm0OzoC23Mx89xf1CcEsxmHuzuXOdniEuI+S3v7vjQG4F5sa6YtUp+19sZuSxHg==",
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
+ "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
+ "cpu": [
+ "ia32"
+ ],
"dev": true,
- "dependencies": {
- "@babel/helper-create-class-features-plugin": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@babel/plugin-proposal-private-methods/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
+ "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
},
- "node_modules/@babel/plugin-proposal-unicode-property-regex": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.1.tgz",
- "integrity": "sha512-JjfngYRvwmPwmnbRZyNiPFI8zxCZb8euzbCG/LxyKdeTb59tVciKo9GK9bi6JYKInk1H11Dq9j/zRqIH4KigfQ==",
+ "node_modules/@eslint-community/eslint-utils": {
+ "version": "4.7.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz",
+ "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-create-regexp-features-plugin": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1"
+ "eslint-visitor-keys": "^3.4.3"
},
"engines": {
- "node": ">=4"
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
},
"peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
}
},
- "node_modules/@babel/plugin-proposal-unicode-property-regex/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-syntax-async-generators": {
- "version": "7.8.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
- "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
+ "node_modules/@eslint-community/regexpp": {
+ "version": "4.12.1",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz",
+ "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==",
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "license": "MIT",
+ "engines": {
+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
}
},
- "node_modules/@babel/plugin-syntax-async-generators/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-syntax-class-properties": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.1.tgz",
- "integrity": "sha512-Gf2Yx/iRs1JREDtVZ56OrjjgFHCaldpTnuy9BHla10qyVT3YkIIGEtoDWhyop0ksu1GvNjHIoYRBqm3zoR1jyQ==",
+ "node_modules/@eslint/compat": {
+ "version": "1.2.9",
+ "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.2.9.tgz",
+ "integrity": "sha512-gCdSY54n7k+driCadyMNv8JSPzYLeDVM/ikZRtvtROBpRdFSkS8W9A82MqsaY7lZuwL0wiapgD0NT1xT0hyJsA==",
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "eslint": "^9.10.0"
+ },
+ "peerDependenciesMeta": {
+ "eslint": {
+ "optional": true
+ }
}
},
- "node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-syntax-dynamic-import": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
- "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==",
+ "node_modules/@eslint/config-array": {
+ "version": "0.20.0",
+ "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz",
+ "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
+ "@eslint/object-schema": "^2.1.6",
+ "debug": "^4.3.1",
+ "minimatch": "^3.1.2"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
- "node_modules/@babel/plugin-syntax-dynamic-import/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
+ "node_modules/@eslint/config-helpers": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.2.tgz",
+ "integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
},
- "node_modules/@babel/plugin-syntax-json-strings": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
- "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
+ "node_modules/@eslint/core": {
+ "version": "0.14.0",
+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz",
+ "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
+ "@types/json-schema": "^7.0.15"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
- "node_modules/@babel/plugin-syntax-json-strings/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
- "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==",
+ "node_modules/@eslint/eslintrc": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz",
+ "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
+ "ajv": "^6.12.4",
+ "debug": "^4.3.2",
+ "espree": "^10.0.1",
+ "globals": "^14.0.0",
+ "ignore": "^5.2.0",
+ "import-fresh": "^3.2.1",
+ "js-yaml": "^4.1.0",
+ "minimatch": "^3.1.2",
+ "strip-json-comments": "^3.1.1"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
}
},
- "node_modules/@babel/plugin-syntax-nullish-coalescing-operator/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-syntax-numeric-separator": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.1.tgz",
- "integrity": "sha512-uTd0OsHrpe3tH5gRPTxG8Voh99/WCU78vIm5NMRYPAqC8lR4vajt6KkCAknCHrx24vkPdd/05yfdGSB4EIY2mg==",
+ "node_modules/@eslint/eslintrc/node_modules/globals": {
+ "version": "14.0.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
+ "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/@babel/plugin-syntax-numeric-separator/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-syntax-object-rest-spread": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
- "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
+ "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/@babel/plugin-syntax-object-rest-spread/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-syntax-optional-catch-binding": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
- "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
+ "node_modules/@eslint/js": {
+ "version": "9.28.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.28.0.tgz",
+ "integrity": "sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==",
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "url": "https://eslint.org/donate"
}
},
- "node_modules/@babel/plugin-syntax-optional-catch-binding/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-syntax-optional-chaining": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz",
- "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==",
+ "node_modules/@eslint/markdown": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/@eslint/markdown/-/markdown-6.5.0.tgz",
+ "integrity": "sha512-oSkF0p8X21vKEEAGTZASi7q3tbdTvlGduQ02Xz2A1AFncUP4RLVcNz27XurxVW4fs1JXuh0xBtvokXdtp/nN+Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
+ "@eslint/core": "^0.14.0",
+ "@eslint/plugin-kit": "^0.3.1",
+ "mdast-util-from-markdown": "^2.0.2",
+ "mdast-util-frontmatter": "^2.0.1",
+ "mdast-util-gfm": "^3.0.0",
+ "micromark-extension-frontmatter": "^2.0.0",
+ "micromark-extension-gfm": "^3.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
- "node_modules/@babel/plugin-syntax-optional-chaining/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-syntax-top-level-await": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.10.1.tgz",
- "integrity": "sha512-hgA5RYkmZm8FTFT3yu2N9Bx7yVVOKYT6yEdXXo6j2JTm0wNxgqaGeQVaSHRjhfnQbX91DtjFB6McRFSlcJH3xQ==",
+ "node_modules/@eslint/markdown/node_modules/@types/mdast": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz",
+ "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "@types/unist": "*"
}
},
- "node_modules/@babel/plugin-syntax-top-level-await/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
+ "node_modules/@eslint/markdown/node_modules/@types/unist": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
+ "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/@babel/plugin-transform-arrow-functions": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.1.tgz",
- "integrity": "sha512-6AZHgFJKP3DJX0eCNJj01RpytUa3SOGawIxweHkNX2L6PYikOZmoh5B0d7hIHaIgveMjX990IAa/xK7jRTN8OA==",
+ "node_modules/@eslint/markdown/node_modules/escape-string-regexp": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
+ "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
"dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/@babel/plugin-transform-arrow-functions/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-async-to-generator": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.1.tgz",
- "integrity": "sha512-XCgYjJ8TY2slj6SReBUyamJn3k2JLUIiiR5b6t1mNCMSvv7yx+jJpaewakikp0uWFQSF7ChPPoe3dHmXLpISkg==",
+ "node_modules/@eslint/markdown/node_modules/mdast-util-find-and-replace": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.2.tgz",
+ "integrity": "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-module-imports": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/helper-remap-async-to-generator": "^7.10.1"
+ "@types/mdast": "^4.0.0",
+ "escape-string-regexp": "^5.0.0",
+ "unist-util-is": "^6.0.0",
+ "unist-util-visit-parents": "^6.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-async-to-generator/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-block-scoped-functions": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.1.tgz",
- "integrity": "sha512-B7K15Xp8lv0sOJrdVAoukKlxP9N59HS48V1J3U/JGj+Ad+MHq+am6xJVs85AgXrQn4LV8vaYFOB+pr/yIuzW8Q==",
+ "node_modules/@eslint/markdown/node_modules/mdast-util-from-markdown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz",
+ "integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-to-string": "^4.0.0",
+ "micromark": "^4.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-decode-string": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0",
+ "unist-util-stringify-position": "^4.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-block-scoped-functions/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-block-scoping": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.10.1.tgz",
- "integrity": "sha512-8bpWG6TtF5akdhIm/uWTyjHqENpy13Fx8chg7pFH875aNLwX8JxIxqm08gmAT+Whe6AOmaTeLPe7dpLbXt+xUw==",
+ "node_modules/@eslint/markdown/node_modules/mdast-util-gfm": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.1.0.tgz",
+ "integrity": "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1",
- "lodash": "^4.17.13"
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-gfm-autolink-literal": "^2.0.0",
+ "mdast-util-gfm-footnote": "^2.0.0",
+ "mdast-util-gfm-strikethrough": "^2.0.0",
+ "mdast-util-gfm-table": "^2.0.0",
+ "mdast-util-gfm-task-list-item": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-block-scoping/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-classes": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.1.tgz",
- "integrity": "sha512-P9V0YIh+ln/B3RStPoXpEQ/CoAxQIhRSUn7aXqQ+FZJ2u8+oCtjIXR3+X0vsSD8zv+mb56K7wZW1XiDTDGiDRQ==",
+ "node_modules/@eslint/markdown/node_modules/mdast-util-gfm-autolink-literal": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.0.1.tgz",
+ "integrity": "sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-annotate-as-pure": "^7.10.1",
- "@babel/helper-define-map": "^7.10.1",
- "@babel/helper-function-name": "^7.10.1",
- "@babel/helper-optimise-call-expression": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/helper-replace-supers": "^7.10.1",
- "@babel/helper-split-export-declaration": "^7.10.1",
- "globals": "^11.1.0"
+ "@types/mdast": "^4.0.0",
+ "ccount": "^2.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-find-and-replace": "^3.0.0",
+ "micromark-util-character": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-classes/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-computed-properties": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.1.tgz",
- "integrity": "sha512-mqSrGjp3IefMsXIenBfGcPXxJxweQe2hEIwMQvjtiDQ9b1IBvDUjkAtV/HMXX47/vXf14qDNedXsIiNd1FmkaQ==",
+ "node_modules/@eslint/markdown/node_modules/mdast-util-gfm-footnote": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.1.0.tgz",
+ "integrity": "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.1.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-computed-properties/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-destructuring": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.1.tgz",
- "integrity": "sha512-V/nUc4yGWG71OhaTH705pU8ZSdM6c1KmmLP8ys59oOYbT7RpMYAR3MsVOt6OHL0WzG7BlTU076va9fjJyYzJMA==",
+ "node_modules/@eslint/markdown/node_modules/mdast-util-gfm-strikethrough": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.0.tgz",
+ "integrity": "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
+ "@types/mdast": "^4.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-destructuring/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-dotall-regex": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.1.tgz",
- "integrity": "sha512-19VIMsD1dp02RvduFUmfzj8uknaO3uiHHF0s3E1OHnVsNj8oge8EQ5RzHRbJjGSetRnkEuBYO7TG1M5kKjGLOA==",
+ "node_modules/@eslint/markdown/node_modules/mdast-util-gfm-table": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.0.tgz",
+ "integrity": "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-create-regexp-features-plugin": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1"
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "markdown-table": "^3.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-dotall-regex/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-duplicate-keys": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.1.tgz",
- "integrity": "sha512-wIEpkX4QvX8Mo9W6XF3EdGttrIPZWozHfEaDTU0WJD/TDnXMvdDh30mzUl/9qWhnf7naicYartcEfUghTCSNpA==",
+ "node_modules/@eslint/markdown/node_modules/mdast-util-gfm-task-list-item": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.0.tgz",
+ "integrity": "sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-duplicate-keys/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-exponentiation-operator": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.1.tgz",
- "integrity": "sha512-lr/przdAbpEA2BUzRvjXdEDLrArGRRPwbaF9rvayuHRvdQ7lUTTkZnhZrJ4LE2jvgMRFF4f0YuPQ20vhiPYxtA==",
+ "node_modules/@eslint/markdown/node_modules/mdast-util-phrasing": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz",
+ "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1"
+ "@types/mdast": "^4.0.0",
+ "unist-util-is": "^6.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-exponentiation-operator/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-for-of": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.1.tgz",
- "integrity": "sha512-US8KCuxfQcn0LwSCMWMma8M2R5mAjJGsmoCBVwlMygvmDUMkTCykc84IqN1M7t+agSfOmLYTInLCHJM+RUoz+w==",
+ "node_modules/@eslint/markdown/node_modules/mdast-util-to-markdown": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz",
+ "integrity": "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "longest-streak": "^3.0.0",
+ "mdast-util-phrasing": "^4.0.0",
+ "mdast-util-to-string": "^4.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-decode-string": "^2.0.0",
+ "unist-util-visit": "^5.0.0",
+ "zwitch": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-for-of/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-function-name": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.1.tgz",
- "integrity": "sha512-//bsKsKFBJfGd65qSNNh1exBy5Y9gD9ZN+DvrJ8f7HXr4avE5POW6zB7Rj6VnqHV33+0vXWUwJT0wSHubiAQkw==",
+ "node_modules/@eslint/markdown/node_modules/mdast-util-to-string": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz",
+ "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-function-name": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1"
+ "@types/mdast": "^4.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-function-name/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-literals": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.1.tgz",
- "integrity": "sha512-qi0+5qgevz1NHLZroObRm5A+8JJtibb7vdcPQF1KQE12+Y/xxl8coJ+TpPW9iRq+Mhw/NKLjm+5SHtAHCC7lAw==",
+ "node_modules/@eslint/markdown/node_modules/micromark": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz",
+ "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@types/debug": "^4.0.0",
+ "debug": "^4.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-core-commonmark": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-combine-extensions": "^2.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-encode": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-subtokenize": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/@eslint/markdown/node_modules/micromark-core-commonmark": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz",
+ "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-factory-destination": "^2.0.0",
+ "micromark-factory-label": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-factory-title": "^2.0.0",
+ "micromark-factory-whitespace": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-html-tag-name": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-subtokenize": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/@eslint/markdown/node_modules/micromark-extension-gfm": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz",
+ "integrity": "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
+ "micromark-extension-gfm-autolink-literal": "^2.0.0",
+ "micromark-extension-gfm-footnote": "^2.0.0",
+ "micromark-extension-gfm-strikethrough": "^2.0.0",
+ "micromark-extension-gfm-table": "^2.0.0",
+ "micromark-extension-gfm-tagfilter": "^2.0.0",
+ "micromark-extension-gfm-task-list-item": "^2.0.0",
+ "micromark-util-combine-extensions": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-literals/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-member-expression-literals": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.1.tgz",
- "integrity": "sha512-UmaWhDokOFT2GcgU6MkHC11i0NQcL63iqeufXWfRy6pUOGYeCGEKhvfFO6Vz70UfYJYHwveg62GS83Rvpxn+NA==",
+ "node_modules/@eslint/markdown/node_modules/micromark-extension-gfm-autolink-literal": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz",
+ "integrity": "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-member-expression-literals/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-modules-amd": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.1.tgz",
- "integrity": "sha512-31+hnWSFRI4/ACFr1qkboBbrTxoBIzj7qA69qlq8HY8p7+YCzkCT6/TvQ1a4B0z27VeWtAeJd6pr5G04dc1iHw==",
+ "node_modules/@eslint/markdown/node_modules/micromark-extension-gfm-footnote": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz",
+ "integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-module-transforms": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1",
- "babel-plugin-dynamic-import-node": "^2.3.3"
+ "devlop": "^1.0.0",
+ "micromark-core-commonmark": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-modules-amd/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-modules-commonjs": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.1.tgz",
- "integrity": "sha512-AQG4fc3KOah0vdITwt7Gi6hD9BtQP/8bhem7OjbaMoRNCH5Djx42O2vYMfau7QnAzQCa+RJnhJBmFFMGpQEzrg==",
+ "node_modules/@eslint/markdown/node_modules/micromark-extension-gfm-strikethrough": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz",
+ "integrity": "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-module-transforms": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/helper-simple-access": "^7.10.1",
- "babel-plugin-dynamic-import-node": "^2.3.3"
+ "devlop": "^1.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-modules-commonjs/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-modules-systemjs": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.1.tgz",
- "integrity": "sha512-ewNKcj1TQZDL3YnO85qh9zo1YF1CHgmSTlRQgHqe63oTrMI85cthKtZjAiZSsSNjPQ5NCaYo5QkbYqEw1ZBgZA==",
+ "node_modules/@eslint/markdown/node_modules/micromark-extension-gfm-table": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.1.tgz",
+ "integrity": "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-hoist-variables": "^7.10.1",
- "@babel/helper-module-transforms": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1",
- "babel-plugin-dynamic-import-node": "^2.3.3"
+ "devlop": "^1.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-modules-systemjs/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-modules-umd": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.1.tgz",
- "integrity": "sha512-EIuiRNMd6GB6ulcYlETnYYfgv4AxqrswghmBRQbWLHZxN4s7mupxzglnHqk9ZiUpDI4eRWewedJJNj67PWOXKA==",
+ "node_modules/@eslint/markdown/node_modules/micromark-extension-gfm-tagfilter": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-2.0.0.tgz",
+ "integrity": "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-module-transforms": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1"
+ "micromark-util-types": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-modules-umd/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-named-capturing-groups-regex": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz",
- "integrity": "sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==",
+ "node_modules/@eslint/markdown/node_modules/micromark-extension-gfm-task-list-item": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz",
+ "integrity": "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-create-regexp-features-plugin": "^7.8.3"
+ "devlop": "^1.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/plugin-transform-new-target": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.1.tgz",
- "integrity": "sha512-MBlzPc1nJvbmO9rPr1fQwXOM2iGut+JC92ku6PbiJMMK7SnQc1rytgpopveE3Evn47gzvGYeCdgfCDbZo0ecUw==",
+ "node_modules/@eslint/markdown/node_modules/micromark-factory-destination": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz",
+ "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/@babel/plugin-transform-new-target/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-object-super": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.1.tgz",
- "integrity": "sha512-WnnStUDN5GL+wGQrJylrnnVlFhFmeArINIR9gjhSeYyvroGhBrSAXYg/RHsnfzmsa+onJrTJrEClPzgNmmQ4Gw==",
+ "node_modules/@eslint/markdown/node_modules/micromark-factory-label": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz",
+ "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/helper-replace-supers": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "devlop": "^1.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/@babel/plugin-transform-object-super/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-parameters": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.1.tgz",
- "integrity": "sha512-tJ1T0n6g4dXMsL45YsSzzSDZCxiHXAQp/qHrucOq5gEHncTA3xDxnd5+sZcoQp+N1ZbieAaB8r/VUCG0gqseOg==",
+ "node_modules/@eslint/markdown/node_modules/micromark-factory-space": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz",
+ "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "@babel/helper-get-function-arity": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/@babel/plugin-transform-parameters/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-property-literals": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.1.tgz",
- "integrity": "sha512-Kr6+mgag8auNrgEpbfIWzdXYOvqDHZOF0+Bx2xh4H2EDNwcbRb9lY6nkZg8oSjsX+DH9Ebxm9hOqtKW+gRDeNA==",
+ "node_modules/@eslint/markdown/node_modules/micromark-factory-title": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz",
+ "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/@babel/plugin-transform-property-literals/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-regenerator": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.1.tgz",
- "integrity": "sha512-B3+Y2prScgJ2Bh/2l9LJxKbb8C8kRfsG4AdPT+n7ixBHIxJaIG8bi8tgjxUMege1+WqSJ+7gu1YeoMVO3gPWzw==",
+ "node_modules/@eslint/markdown/node_modules/micromark-factory-whitespace": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz",
+ "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "regenerator-transform": "^0.14.2"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/@babel/plugin-transform-reserved-words": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.1.tgz",
- "integrity": "sha512-qN1OMoE2nuqSPmpTqEM7OvJ1FkMEV+BjVeZZm9V9mq/x1JLKQ4pcv8riZJMNN3u2AUGl0ouOMjRr2siecvHqUQ==",
+ "node_modules/@eslint/markdown/node_modules/micromark-util-character": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz",
+ "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/@babel/plugin-transform-reserved-words/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-shorthand-properties": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.1.tgz",
- "integrity": "sha512-AR0E/lZMfLstScFwztApGeyTHJ5u3JUKMjneqRItWeEqDdHWZwAOKycvQNCasCK/3r5YXsuNG25funcJDu7Y2g==",
+ "node_modules/@eslint/markdown/node_modules/micromark-util-chunked": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz",
+ "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "micromark-util-symbol": "^2.0.0"
}
},
- "node_modules/@babel/plugin-transform-shorthand-properties/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-spread": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.10.1.tgz",
- "integrity": "sha512-8wTPym6edIrClW8FI2IoaePB91ETOtg36dOkj3bYcNe7aDMN2FXEoUa+WrmPc4xa1u2PQK46fUX2aCb+zo9rfw==",
+ "node_modules/@eslint/markdown/node_modules/micromark-util-classify-character": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz",
+ "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/@babel/plugin-transform-spread/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-sticky-regex": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.1.tgz",
- "integrity": "sha512-j17ojftKjrL7ufX8ajKvwRilwqTok4q+BjkknmQw9VNHnItTyMP5anPFzxFJdCQs7clLcWpCV3ma+6qZWLnGMA==",
+ "node_modules/@eslint/markdown/node_modules/micromark-util-combine-extensions": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz",
+ "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/helper-regex": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/@babel/plugin-transform-sticky-regex/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-template-literals": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.1.tgz",
- "integrity": "sha512-t7B/3MQf5M1T9hPCRG28DNGZUuxAuDqLYS03rJrIk2prj/UV7Z6FOneijhQhnv/Xa039vidXeVbvjK2SK5f7Gg==",
+ "node_modules/@eslint/markdown/node_modules/micromark-util-decode-numeric-character-reference": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz",
+ "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "@babel/helper-annotate-as-pure": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "micromark-util-symbol": "^2.0.0"
}
},
- "node_modules/@babel/plugin-transform-template-literals/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-typeof-symbol": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.1.tgz",
- "integrity": "sha512-qX8KZcmbvA23zDi+lk9s6hC1FM7jgLHYIjuLgULgc8QtYnmB3tAVIYkNoKRQ75qWBeyzcoMoK8ZQmogGtC/w0g==",
+ "node_modules/@eslint/markdown/node_modules/micromark-util-decode-string": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz",
+ "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "decode-named-character-reference": "^1.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0"
}
},
- "node_modules/@babel/plugin-transform-typeof-symbol/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
+ "node_modules/@eslint/markdown/node_modules/micromark-util-encode": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz",
+ "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/@eslint/markdown/node_modules/micromark-util-html-tag-name": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz",
+ "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
},
- "node_modules/@babel/plugin-transform-unicode-escapes": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.1.tgz",
- "integrity": "sha512-zZ0Poh/yy1d4jeDWpx/mNwbKJVwUYJX73q+gyh4bwtG0/iUlzdEu0sLMda8yuDFS6LBQlT/ST1SJAR6zYwXWgw==",
+ "node_modules/@eslint/markdown/node_modules/micromark-util-normalize-identifier": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz",
+ "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "micromark-util-symbol": "^2.0.0"
}
},
- "node_modules/@babel/plugin-transform-unicode-escapes/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
- },
- "node_modules/@babel/plugin-transform-unicode-regex": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.1.tgz",
- "integrity": "sha512-Y/2a2W299k0VIUdbqYm9X2qS6fE0CUBhhiPpimK6byy7OJ/kORLlIX+J6UrjgNu5awvs62k+6RSslxhcvVw2Tw==",
+ "node_modules/@eslint/markdown/node_modules/micromark-util-resolve-all": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz",
+ "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "@babel/helper-create-regexp-features-plugin": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/@babel/plugin-transform-unicode-regex/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
+ "node_modules/@eslint/markdown/node_modules/micromark-util-sanitize-uri": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz",
+ "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-encode": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0"
+ }
},
- "node_modules/@babel/preset-env": {
- "version": "7.10.2",
- "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.10.2.tgz",
- "integrity": "sha512-MjqhX0RZaEgK/KueRzh+3yPSk30oqDKJ5HP5tqTSB1e2gzGS3PLy7K0BIpnp78+0anFuSwOeuCf1zZO7RzRvEA==",
- "dev": true,
- "dependencies": {
- "@babel/compat-data": "^7.10.1",
- "@babel/helper-compilation-targets": "^7.10.2",
- "@babel/helper-module-imports": "^7.10.1",
- "@babel/helper-plugin-utils": "^7.10.1",
- "@babel/plugin-proposal-async-generator-functions": "^7.10.1",
- "@babel/plugin-proposal-class-properties": "^7.10.1",
- "@babel/plugin-proposal-dynamic-import": "^7.10.1",
- "@babel/plugin-proposal-json-strings": "^7.10.1",
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.1",
- "@babel/plugin-proposal-numeric-separator": "^7.10.1",
- "@babel/plugin-proposal-object-rest-spread": "^7.10.1",
- "@babel/plugin-proposal-optional-catch-binding": "^7.10.1",
- "@babel/plugin-proposal-optional-chaining": "^7.10.1",
- "@babel/plugin-proposal-private-methods": "^7.10.1",
- "@babel/plugin-proposal-unicode-property-regex": "^7.10.1",
- "@babel/plugin-syntax-async-generators": "^7.8.0",
- "@babel/plugin-syntax-class-properties": "^7.10.1",
- "@babel/plugin-syntax-dynamic-import": "^7.8.0",
- "@babel/plugin-syntax-json-strings": "^7.8.0",
- "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0",
- "@babel/plugin-syntax-numeric-separator": "^7.10.1",
- "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
- "@babel/plugin-syntax-optional-catch-binding": "^7.8.0",
- "@babel/plugin-syntax-optional-chaining": "^7.8.0",
- "@babel/plugin-syntax-top-level-await": "^7.10.1",
- "@babel/plugin-transform-arrow-functions": "^7.10.1",
- "@babel/plugin-transform-async-to-generator": "^7.10.1",
- "@babel/plugin-transform-block-scoped-functions": "^7.10.1",
- "@babel/plugin-transform-block-scoping": "^7.10.1",
- "@babel/plugin-transform-classes": "^7.10.1",
- "@babel/plugin-transform-computed-properties": "^7.10.1",
- "@babel/plugin-transform-destructuring": "^7.10.1",
- "@babel/plugin-transform-dotall-regex": "^7.10.1",
- "@babel/plugin-transform-duplicate-keys": "^7.10.1",
- "@babel/plugin-transform-exponentiation-operator": "^7.10.1",
- "@babel/plugin-transform-for-of": "^7.10.1",
- "@babel/plugin-transform-function-name": "^7.10.1",
- "@babel/plugin-transform-literals": "^7.10.1",
- "@babel/plugin-transform-member-expression-literals": "^7.10.1",
- "@babel/plugin-transform-modules-amd": "^7.10.1",
- "@babel/plugin-transform-modules-commonjs": "^7.10.1",
- "@babel/plugin-transform-modules-systemjs": "^7.10.1",
- "@babel/plugin-transform-modules-umd": "^7.10.1",
- "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3",
- "@babel/plugin-transform-new-target": "^7.10.1",
- "@babel/plugin-transform-object-super": "^7.10.1",
- "@babel/plugin-transform-parameters": "^7.10.1",
- "@babel/plugin-transform-property-literals": "^7.10.1",
- "@babel/plugin-transform-regenerator": "^7.10.1",
- "@babel/plugin-transform-reserved-words": "^7.10.1",
- "@babel/plugin-transform-shorthand-properties": "^7.10.1",
- "@babel/plugin-transform-spread": "^7.10.1",
- "@babel/plugin-transform-sticky-regex": "^7.10.1",
- "@babel/plugin-transform-template-literals": "^7.10.1",
- "@babel/plugin-transform-typeof-symbol": "^7.10.1",
- "@babel/plugin-transform-unicode-escapes": "^7.10.1",
- "@babel/plugin-transform-unicode-regex": "^7.10.1",
- "@babel/preset-modules": "^0.1.3",
- "@babel/types": "^7.10.2",
- "browserslist": "^4.12.0",
- "core-js-compat": "^3.6.2",
- "invariant": "^2.2.2",
- "levenary": "^1.1.1",
- "semver": "^5.5.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "node_modules/@eslint/markdown/node_modules/micromark-util-subtokenize": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz",
+ "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/@babel/preset-env/node_modules/@babel/helper-plugin-utils": {
- "version": "7.10.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
- "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA==",
- "dev": true
+ "node_modules/@eslint/markdown/node_modules/micromark-util-symbol": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz",
+ "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
},
- "node_modules/@babel/preset-env/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "node_modules/@eslint/markdown/node_modules/micromark-util-types": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz",
+ "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==",
"dev": true,
- "bin": {
- "semver": "bin/semver"
- }
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
},
- "node_modules/@babel/preset-modules": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz",
- "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==",
+ "node_modules/@eslint/markdown/node_modules/unist-util-is": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz",
+ "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "@babel/plugin-proposal-unicode-property-regex": "^7.4.4",
- "@babel/plugin-transform-dotall-regex": "^7.4.4",
- "@babel/types": "^7.4.4",
- "esutils": "^2.0.2"
+ "@types/unist": "^3.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/register": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.7.7.tgz",
- "integrity": "sha512-S2mv9a5dc2pcpg/ConlKZx/6wXaEwHeqfo7x/QbXsdCAZm+WJC1ekVvL1TVxNsedTs5y/gG63MhJTEsmwmjtiA==",
+ "node_modules/@eslint/markdown/node_modules/unist-util-stringify-position": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz",
+ "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "find-cache-dir": "^2.0.0",
- "lodash": "^4.17.13",
- "make-dir": "^2.1.0",
- "pirates": "^4.0.0",
- "source-map-support": "^0.5.16"
+ "@types/unist": "^3.0.0"
},
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/register/node_modules/make-dir": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
- "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
+ "node_modules/@eslint/markdown/node_modules/unist-util-visit": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz",
+ "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "pify": "^4.0.1",
- "semver": "^5.6.0"
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0",
+ "unist-util-visit-parents": "^6.0.0"
},
- "engines": {
- "node": ">=6"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/register/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "node_modules/@eslint/markdown/node_modules/unist-util-visit-parents": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz",
+ "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==",
"dev": true,
- "bin": {
- "semver": "bin/semver"
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/@babel/runtime": {
- "version": "7.3.4",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.4.tgz",
- "integrity": "sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g==",
+ "node_modules/@eslint/object-schema": {
+ "version": "2.1.6",
+ "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz",
+ "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==",
"dev": true,
- "dependencies": {
- "regenerator-runtime": "^0.12.0"
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
- "node_modules/@babel/runtime/node_modules/regenerator-runtime": {
- "version": "0.12.1",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz",
- "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==",
- "dev": true
- },
- "node_modules/@babel/template": {
- "version": "7.22.15",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
- "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
+ "node_modules/@eslint/plugin-kit": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz",
+ "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "@babel/code-frame": "^7.22.13",
- "@babel/parser": "^7.22.15",
- "@babel/types": "^7.22.15"
+ "@eslint/core": "^0.14.0",
+ "levn": "^0.4.1"
},
"engines": {
- "node": ">=6.9.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
- "node_modules/@babel/traverse": {
- "version": "7.23.2",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz",
- "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==",
- "dev": true,
- "dependencies": {
- "@babel/code-frame": "^7.22.13",
- "@babel/generator": "^7.23.0",
- "@babel/helper-environment-visitor": "^7.22.20",
- "@babel/helper-function-name": "^7.23.0",
- "@babel/helper-hoist-variables": "^7.22.5",
- "@babel/helper-split-export-declaration": "^7.22.6",
- "@babel/parser": "^7.23.0",
- "@babel/types": "^7.23.0",
- "debug": "^4.1.0",
- "globals": "^11.1.0"
- },
+ "node_modules/@humanfs/core": {
+ "version": "0.19.1",
+ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
+ "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==",
+ "dev": true,
+ "license": "Apache-2.0",
"engines": {
- "node": ">=6.9.0"
+ "node": ">=18.18.0"
}
},
- "node_modules/@babel/traverse/node_modules/debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
- "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
+ "node_modules/@humanfs/node": {
+ "version": "0.16.6",
+ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz",
+ "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "ms": "^2.1.1"
+ "@humanfs/core": "^0.19.1",
+ "@humanwhocodes/retry": "^0.3.0"
+ },
+ "engines": {
+ "node": ">=18.18.0"
}
},
- "node_modules/@babel/traverse/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/@babel/types": {
- "version": "7.23.0",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz",
- "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==",
+ "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz",
+ "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==",
"dev": true,
- "dependencies": {
- "@babel/helper-string-parser": "^7.22.5",
- "@babel/helper-validator-identifier": "^7.22.20",
- "to-fast-properties": "^2.0.0"
- },
+ "license": "Apache-2.0",
"engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@bconnorwhite/module": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/@bconnorwhite/module/-/module-2.0.2.tgz",
- "integrity": "sha512-ck1me5WMgZKp06gnJrVKEkytpehTTQbvsAMbF1nGPeHri/AZNhj87++PSE2LOxmZqM0EtGMaqeLdx7Lw7SUnTA==",
- "dev": true,
- "dependencies": {
- "find-up": "^5.0.0",
- "read-json-safe": "^1.0.5",
- "types-pkg-json": "^1.1.0"
+ "node": ">=18.18"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
}
},
- "node_modules/@bconnorwhite/module/node_modules/find-up": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
- "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "node_modules/@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
"dev": true,
- "dependencies": {
- "locate-path": "^6.0.0",
- "path-exists": "^4.0.0"
- },
+ "license": "Apache-2.0",
"engines": {
- "node": ">=10"
+ "node": ">=12.22"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
}
},
- "node_modules/@bconnorwhite/module/node_modules/locate-path": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
- "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "node_modules/@humanwhocodes/retry": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",
+ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",
"dev": true,
- "dependencies": {
- "p-locate": "^5.0.0"
- },
+ "license": "Apache-2.0",
"engines": {
- "node": ">=10"
+ "node": ">=18.18"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
}
},
- "node_modules/@bconnorwhite/module/node_modules/p-limit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
- "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "node_modules/@inquirer/confirm": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.5.tgz",
+ "integrity": "sha512-ZB2Cz8KeMINUvoeDi7IrvghaVkYT2RB0Zb31EaLWOE87u276w4wnApv0SH2qWaJ3r0VSUa3BIuz7qAV2ZvsZlg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "yocto-queue": "^0.1.0"
+ "@inquirer/core": "^10.1.6",
+ "@inquirer/type": "^3.0.4"
},
"engines": {
- "node": ">=10"
+ "node": ">=18"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "peerDependencies": {
+ "@types/node": ">=18"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ }
}
},
- "node_modules/@bconnorwhite/module/node_modules/p-locate": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
- "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "node_modules/@inquirer/core": {
+ "version": "10.1.6",
+ "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.6.tgz",
+ "integrity": "sha512-Bwh/Zk6URrHwZnSSzAZAKH7YgGYi0xICIBDFOqBQoXNNAzBHw/bgXgLmChfp+GyR3PnChcTbiCTZGC6YJNJkMA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "p-limit": "^3.0.2"
+ "@inquirer/figures": "^1.0.10",
+ "@inquirer/type": "^3.0.4",
+ "ansi-escapes": "^4.3.2",
+ "cli-width": "^4.1.0",
+ "mute-stream": "^2.0.0",
+ "signal-exit": "^4.1.0",
+ "wrap-ansi": "^6.2.0",
+ "yoctocolors-cjs": "^2.1.2"
},
"engines": {
- "node": ">=10"
+ "node": ">=18"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "peerDependencies": {
+ "@types/node": ">=18"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ }
}
},
- "node_modules/@eslint/eslintrc": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz",
- "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==",
+ "node_modules/@inquirer/core/node_modules/cli-width": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz",
+ "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==",
"dev": true,
- "dependencies": {
- "ajv": "^6.12.4",
- "debug": "^4.3.2",
- "espree": "^9.4.0",
- "globals": "^13.15.0",
- "ignore": "^5.2.0",
- "import-fresh": "^3.2.1",
- "js-yaml": "^4.1.0",
- "minimatch": "^3.1.2",
- "strip-json-comments": "^3.1.1"
- },
+ "license": "ISC",
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
+ "node": ">= 12"
}
},
- "node_modules/@eslint/eslintrc/node_modules/argparse": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "dev": true
- },
- "node_modules/@eslint/eslintrc/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "node_modules/@inquirer/core/node_modules/mute-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz",
+ "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==",
"dev": true,
- "dependencies": {
- "ms": "2.1.2"
- },
+ "license": "ISC",
"engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
+ "node": "^18.17.0 || >=20.5.0"
}
},
- "node_modules/@eslint/eslintrc/node_modules/globals": {
- "version": "13.17.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz",
- "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==",
+ "node_modules/@inquirer/core/node_modules/wrap-ansi": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "type-fest": "^0.20.2"
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/@eslint/eslintrc/node_modules/js-yaml": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "node_modules/@inquirer/figures": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.10.tgz",
+ "integrity": "sha512-Ey6176gZmeqZuY/W/nZiUyvmb1/qInjcpiZjXWi6nON+nxJpD1bxtSoBxNliGISae32n6OwbY+TSXPZ1CfS4bw==",
"dev": true,
- "dependencies": {
- "argparse": "^2.0.1"
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@inquirer/type": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.4.tgz",
+ "integrity": "sha512-2MNFrDY8jkFYc9Il9DgLsHhMzuHnOYM1+CUYVWbzu9oT0hC7V7EcYvdCKeoll/Fcci04A+ERZ9wcc7cQ8lTkIA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
},
- "bin": {
- "js-yaml": "bin/js-yaml.js"
+ "peerDependencies": {
+ "@types/node": ">=18"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ }
}
},
- "node_modules/@eslint/eslintrc/node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "node_modules/@isaacs/cliui": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
+ "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "brace-expansion": "^1.1.7"
+ "string-width": "^5.1.2",
+ "string-width-cjs": "npm:string-width@^4.2.0",
+ "strip-ansi": "^7.0.1",
+ "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
+ "wrap-ansi": "^8.1.0",
+ "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
},
"engines": {
- "node": "*"
+ "node": ">=12"
}
},
- "node_modules/@eslint/eslintrc/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
- "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+ "node_modules/@isaacs/cliui/node_modules/ansi-regex": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
+ "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=12"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
}
},
- "node_modules/@eslint/eslintrc/node_modules/type-fest": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
- "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
+ "node_modules/@isaacs/cliui/node_modules/ansi-styles": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+ "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=10"
+ "node": ">=12"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/@humanwhocodes/config-array": {
- "version": "0.10.4",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz",
- "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==",
+ "node_modules/@isaacs/cliui/node_modules/emoji-regex": {
+ "version": "9.2.2",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@isaacs/cliui/node_modules/string-width": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+ "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@humanwhocodes/object-schema": "^1.2.1",
- "debug": "^4.1.1",
- "minimatch": "^3.0.4"
+ "eastasianwidth": "^0.2.0",
+ "emoji-regex": "^9.2.2",
+ "strip-ansi": "^7.0.1"
},
"engines": {
- "node": ">=10.10.0"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/@humanwhocodes/config-array/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "node_modules/@isaacs/cliui/node_modules/strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ms": "2.1.2"
+ "ansi-regex": "^6.0.1"
},
"engines": {
- "node": ">=6.0"
+ "node": ">=12"
},
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/@humanwhocodes/config-array/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/@humanwhocodes/gitignore-to-minimatch": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz",
- "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==",
- "dev": true,
"funding": {
- "type": "github",
- "url": "https://github.com/sponsors/nzakas"
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
- "node_modules/@humanwhocodes/module-importer": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
- "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "node_modules/@isaacs/cliui/node_modules/wrap-ansi": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
+ "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^6.1.0",
+ "string-width": "^5.0.1",
+ "strip-ansi": "^7.0.1"
+ },
"engines": {
- "node": ">=12.22"
+ "node": ">=12"
},
"funding": {
- "type": "github",
- "url": "https://github.com/sponsors/nzakas"
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
- "node_modules/@humanwhocodes/object-schema": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",
- "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
- "dev": true
+ "node_modules/@japont/unicode-range": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@japont/unicode-range/-/unicode-range-1.0.0.tgz",
+ "integrity": "sha512-BckHvA2XdjRBVAWe2uceNuRf78lBeI28kyWEbfr/Q2pE17POkwuZ6WWY/UMv8FL9iBxhW4xfDoNLM9UVZaTeUQ=="
},
"node_modules/@jridgewell/gen-mapping": {
- "version": "0.3.3",
- "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
- "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
+ "version": "0.3.8",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
+ "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@jridgewell/set-array": "^1.0.1",
+ "@jridgewell/set-array": "^1.2.1",
"@jridgewell/sourcemap-codec": "^1.4.10",
- "@jridgewell/trace-mapping": "^0.3.9"
+ "@jridgewell/trace-mapping": "^0.3.24"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/resolve-uri": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
- "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/set-array": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
- "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
+ "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6.0.0"
}
},
+ "node_modules/@jridgewell/source-map": {
+ "version": "0.3.6",
+ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz",
+ "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.25"
+ }
+ },
"node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.4.15",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
- "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
- "dev": true
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
+ "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
+ "dev": true,
+ "license": "MIT"
},
"node_modules/@jridgewell/trace-mapping": {
- "version": "0.3.19",
- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz",
- "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==",
+ "version": "0.3.25",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
+ "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
- "node_modules/@kwsites/file-exists": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz",
- "integrity": "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==",
- "dev": true,
- "dependencies": {
- "debug": "^4.1.1"
- }
- },
- "node_modules/@kwsites/file-exists/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "node_modules/@mswjs/interceptors": {
+ "version": "0.37.6",
+ "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.37.6.tgz",
+ "integrity": "sha512-wK+5pLK5XFmgtH3aQ2YVvA3HohS3xqV/OxuVOdNx9Wpnz7VE/fnC+e1A7ln6LFYeck7gOJ/dsZV6OLplOtAJ2w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ms": "2.1.2"
+ "@open-draft/deferred-promise": "^2.2.0",
+ "@open-draft/logger": "^0.3.0",
+ "@open-draft/until": "^2.0.0",
+ "is-node-process": "^1.2.0",
+ "outvariant": "^1.4.3",
+ "strict-event-emitter": "^0.5.1"
},
"engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
+ "node": ">=18"
}
},
- "node_modules/@kwsites/file-exists/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/@kwsites/promise-deferred": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz",
- "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==",
- "dev": true
- },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@nodelib/fs.stat": "2.0.5",
"run-parallel": "^1.1.9"
@@ -2052,6 +2226,7 @@
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">= 8"
}
@@ -2061,6 +2236,7 @@
"resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
"integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@nodelib/fs.scandir": "2.1.5",
"fastq": "^1.6.0"
@@ -2069,6346 +2245,1631 @@
"node": ">= 8"
}
},
- "node_modules/@pnpm/config.env-replace": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz",
- "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==",
+ "node_modules/@open-draft/deferred-promise": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz",
+ "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==",
"dev": true,
- "engines": {
- "node": ">=12.22.0"
- }
+ "license": "MIT"
},
- "node_modules/@pnpm/network.ca-file": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz",
- "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==",
+ "node_modules/@open-draft/logger": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz",
+ "integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "graceful-fs": "4.2.10"
- },
- "engines": {
- "node": ">=12.22.0"
+ "is-node-process": "^1.2.0",
+ "outvariant": "^1.4.0"
}
},
- "node_modules/@pnpm/network.ca-file/node_modules/graceful-fs": {
- "version": "4.2.10",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
- "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
- "dev": true
+ "node_modules/@open-draft/until": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz",
+ "integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/@pnpm/npm-conf": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.2.2.tgz",
- "integrity": "sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==",
+ "node_modules/@pkgjs/parseargs": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
+ "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
"dev": true,
- "dependencies": {
- "@pnpm/config.env-replace": "^1.1.0",
- "@pnpm/network.ca-file": "^1.0.1",
- "config-chain": "^1.1.11"
- },
+ "license": "MIT",
+ "optional": true,
"engines": {
- "node": ">=12"
+ "node": ">=14"
}
},
- "node_modules/@samverschueren/stream-to-observable": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz",
- "integrity": "sha512-c/qwwcHyafOQuVQJj0IlBjf5yYgBI7YPJ77k4fOJYesb41jio65eaJODRUmfYKhTOFBrIZ66kgvGPlNbjuoRdQ==",
+ "node_modules/@polka/url": {
+ "version": "1.0.0-next.28",
+ "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz",
+ "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==",
"dev": true,
- "dependencies": {
- "any-observable": "^0.3.0"
- },
- "engines": {
- "node": ">=6"
- },
- "peerDependenciesMeta": {
- "rxjs": {
- "optional": true
+ "license": "MIT"
+ },
+ "node_modules/@promptbook/utils": {
+ "version": "0.69.5",
+ "resolved": "https://registry.npmjs.org/@promptbook/utils/-/utils-0.69.5.tgz",
+ "integrity": "sha512-xm5Ti/Hp3o4xHrsK9Yy3MS6KbDxYbq485hDsFvxqaNA7equHLPdo8H8faTitTeb14QCDfLW4iwCxdVYu5sn6YQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://buymeacoffee.com/hejny"
},
- "zen-observable": {
- "optional": true
+ {
+ "type": "github",
+ "url": "https://github.com/webgptorg/promptbook/blob/main/README.md#%EF%B8%8F-contributing"
}
+ ],
+ "license": "CC-BY-4.0",
+ "dependencies": {
+ "spacetrim": "0.11.59"
}
},
- "node_modules/@samverschueren/stream-to-observable/node_modules/any-observable": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz",
- "integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==",
+ "node_modules/@puppeteer/browsers": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.7.0.tgz",
+ "integrity": "sha512-bO61XnTuopsz9kvtfqhVbH6LTM1koxK0IlBR+yuVrM2LB7mk8+5o1w18l5zqd5cs8xlf+ntgambqRqGifMDjog==",
"dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "extract-zip": "^2.0.1",
+ "progress": "^2.0.3",
+ "proxy-agent": "^6.5.0",
+ "semver": "^7.6.3",
+ "tar-fs": "^3.0.6",
+ "unbzip2-stream": "^1.4.3",
+ "yargs": "^17.7.2"
+ },
+ "bin": {
+ "browsers": "lib/cjs/main-cli.js"
+ },
"engines": {
- "node": ">=6"
+ "node": ">=18"
}
},
- "node_modules/@sindresorhus/is": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
- "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",
+ "node_modules/@puppeteer/browsers/node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
"dev": true,
- "engines": {
- "node": ">=10"
+ "license": "ISC",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
},
- "funding": {
- "url": "https://github.com/sindresorhus/is?sponsor=1"
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/@szmarczak/http-timer": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz",
- "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==",
+ "node_modules/@puppeteer/browsers/node_modules/semver": {
+ "version": "7.7.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.0.tgz",
+ "integrity": "sha512-DrfFnPzblFmNrIZzg5RzHegbiRWg7KMR7btwi2yjHwx06zsUbO5g613sVwEV7FTwmzJu+Io0lJe2GJ3LxqpvBQ==",
"dev": true,
- "dependencies": {
- "defer-to-connect": "^2.0.0"
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
- "node_modules/@types/cacheable-request": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz",
- "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==",
- "dev": true,
- "dependencies": {
- "@types/http-cache-semantics": "*",
- "@types/keyv": "^3.1.4",
- "@types/node": "*",
- "@types/responselike": "^1.0.0"
- }
- },
- "node_modules/@types/http-cache-semantics": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz",
- "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==",
- "dev": true
- },
- "node_modules/@types/keyv": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz",
- "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==",
- "dev": true,
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/minimist": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz",
- "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==",
- "dev": true
- },
- "node_modules/@types/node": {
- "version": "13.7.7",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.7.tgz",
- "integrity": "sha512-Uo4chgKbnPNlxQwoFmYIwctkQVkMMmsAoGGU4JKwLuvBefF0pCq4FybNSnfkfRCpC7ZW7kttcC/TrRtAJsvGtg==",
- "dev": true
- },
- "node_modules/@types/normalize-package-data": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz",
- "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==",
- "dev": true
- },
- "node_modules/@types/parse-json": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
- "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==",
- "dev": true
- },
- "node_modules/@types/responselike": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz",
- "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==",
- "dev": true,
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/yauzl": {
- "version": "2.10.0",
- "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz",
- "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==",
- "dev": true,
- "optional": true,
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/abbrev": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
- "dev": true
- },
- "node_modules/accepts": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
- "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "node_modules/@puppeteer/browsers/node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "mime-types": "~2.1.34",
- "negotiator": "0.6.3"
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
},
"engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/acorn": {
- "version": "8.8.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz",
- "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==",
- "dev": true,
- "bin": {
- "acorn": "bin/acorn"
+ "node": ">=10"
},
- "engines": {
- "node": ">=0.4.0"
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
- "node_modules/acorn-jsx": {
- "version": "5.3.2",
- "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
- "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
+ "node_modules/@puppeteer/browsers/node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
"dev": true,
- "peerDependencies": {
- "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ "license": "ISC",
+ "engines": {
+ "node": ">=10"
}
},
- "node_modules/acorn-node": {
- "version": "1.8.2",
- "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz",
- "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==",
+ "node_modules/@puppeteer/browsers/node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "acorn": "^7.0.0",
- "acorn-walk": "^7.0.0",
- "xtend": "^4.0.2"
- }
- },
- "node_modules/acorn-node/node_modules/acorn": {
- "version": "7.4.1",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
- "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
- "dev": true,
- "bin": {
- "acorn": "bin/acorn"
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
},
"engines": {
- "node": ">=0.4.0"
+ "node": ">=12"
}
},
- "node_modules/acorn-node/node_modules/xtend": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
- "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+ "node_modules/@puppeteer/browsers/node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
"dev": true,
+ "license": "ISC",
"engines": {
- "node": ">=0.4"
+ "node": ">=12"
}
},
- "node_modules/acorn-walk": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.0.0.tgz",
- "integrity": "sha512-7Bv1We7ZGuU79zZbb6rRqcpxo3OY+zrdtloZWoyD8fmGX+FeXRjE+iuGkZjSXLVovLzrsvMGMy0EkwA0E0umxg==",
+ "node_modules/@rollup/plugin-alias": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-5.1.1.tgz",
+ "integrity": "sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/agent-base": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
- "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
- "dev": true,
- "dependencies": {
- "debug": "4"
+ "node": ">=14.0.0"
},
- "engines": {
- "node": ">= 6.0.0"
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
}
},
- "node_modules/agent-base/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "node_modules/@rollup/plugin-commonjs": {
+ "version": "25.0.8",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.8.tgz",
+ "integrity": "sha512-ZEZWTK5n6Qde0to4vS9Mr5x/0UZoqCxPVR9KRUjU4kA2sO7GEUn1fop0DAwpO6z0Nw/kJON9bDmSxdWxO/TT1A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ms": "2.1.2"
+ "@rollup/pluginutils": "^5.0.1",
+ "commondir": "^1.0.1",
+ "estree-walker": "^2.0.2",
+ "glob": "^8.0.3",
+ "is-reference": "1.2.1",
+ "magic-string": "^0.30.3"
},
"engines": {
- "node": ">=6.0"
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^2.68.0||^3.0.0||^4.0.0"
},
"peerDependenciesMeta": {
- "supports-color": {
+ "rollup": {
"optional": true
}
}
},
- "node_modules/agent-base/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/aggregate-error": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz",
- "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==",
+ "node_modules/@rollup/plugin-commonjs/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "clean-stack": "^4.0.0",
- "indent-string": "^5.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "balanced-match": "^1.0.0"
}
},
- "node_modules/aggregate-error/node_modules/indent-string": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
- "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
+ "node_modules/@rollup/plugin-commonjs/node_modules/estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "dev": true
+ },
+ "node_modules/@rollup/plugin-commonjs/node_modules/glob": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
+ "deprecated": "Glob versions prior to v9 are no longer supported",
"dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^5.0.1",
+ "once": "^1.3.0"
+ },
"engines": {
"node": ">=12"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/ajv": {
- "version": "6.12.6",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
- "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "node_modules/@rollup/plugin-commonjs/node_modules/minimatch": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "fast-deep-equal": "^3.1.1",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
+ "brace-expansion": "^2.0.1"
},
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
+ "engines": {
+ "node": ">=10"
}
},
- "node_modules/all-contributors-cli": {
- "version": "6.19.0",
- "resolved": "https://registry.npmjs.org/all-contributors-cli/-/all-contributors-cli-6.19.0.tgz",
- "integrity": "sha512-QJN4iLeTeYpTZJES8XFTzQ+itA1qSyBbxLapJLtwrnY+kipyRhCX49fS/s/qftQQym9XLATMZUpUeEeJSox1sw==",
+ "node_modules/@rollup/plugin-json": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz",
+ "integrity": "sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.7.6",
- "async": "^3.0.1",
- "chalk": "^4.0.0",
- "didyoumean": "^1.2.1",
- "inquirer": "^7.0.4",
- "json-fixer": "^1.5.1",
- "lodash": "^4.11.2",
- "node-fetch": "^2.6.0",
- "pify": "^5.0.0",
- "yargs": "^15.0.1"
- },
- "bin": {
- "all-contributors": "dist/cli.js"
+ "@rollup/pluginutils": "^5.1.0"
},
"engines": {
- "node": ">=4"
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
}
},
- "node_modules/all-contributors-cli/node_modules/@babel/runtime": {
- "version": "7.11.2",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz",
- "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==",
+ "node_modules/@rollup/plugin-node-resolve": {
+ "version": "15.3.1",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.1.tgz",
+ "integrity": "sha512-tgg6b91pAybXHJQMAAwW9VuWBO6Thi+q7BCNARLwSqlmsHz0XYURtGvh/AuwSADXSI4h/2uHbs7s4FzlZDGSGA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "regenerator-runtime": "^0.13.4"
+ "@rollup/pluginutils": "^5.0.1",
+ "@types/resolve": "1.20.2",
+ "deepmerge": "^4.2.2",
+ "is-module": "^1.0.0",
+ "resolve": "^1.22.1"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^2.78.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
}
},
- "node_modules/all-contributors-cli/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "node_modules/@rollup/plugin-replace": {
+ "version": "5.0.7",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-5.0.7.tgz",
+ "integrity": "sha512-PqxSfuorkHz/SPpyngLyg5GCEkOcee9M1bkxiVDr41Pd61mqP1PLOoDPbpl44SB2mQGKwV/In74gqQmGITOhEQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-convert": "^2.0.1"
+ "@rollup/pluginutils": "^5.0.1",
+ "magic-string": "^0.30.3"
},
"engines": {
- "node": ">=8"
+ "node": ">=14.0.0"
},
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
}
},
- "node_modules/all-contributors-cli/node_modules/async": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz",
- "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==",
- "dev": true
- },
- "node_modules/all-contributors-cli/node_modules/chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "node_modules/@rollup/plugin-terser": {
+ "version": "0.4.4",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz",
+ "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
+ "serialize-javascript": "^6.0.1",
+ "smob": "^1.0.0",
+ "terser": "^5.17.4"
},
"engines": {
- "node": ">=10"
+ "node": ">=14.0.0"
},
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
+ "peerDependencies": {
+ "rollup": "^2.0.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
}
},
- "node_modules/all-contributors-cli/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "node_modules/@rollup/pluginutils": {
+ "version": "5.1.4",
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.4.tgz",
+ "integrity": "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-name": "~1.1.4"
+ "@types/estree": "^1.0.0",
+ "estree-walker": "^2.0.2",
+ "picomatch": "^4.0.2"
},
"engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/all-contributors-cli/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/all-contributors-cli/node_modules/pify": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz",
- "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/all-contributors-cli/node_modules/regenerator-runtime": {
- "version": "0.13.7",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
- "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==",
- "dev": true
- },
- "node_modules/all-contributors-cli/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "dependencies": {
- "has-flag": "^4.0.0"
+ "node": ">=14.0.0"
},
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/all-package-names": {
- "version": "2.0.685",
- "resolved": "https://registry.npmjs.org/all-package-names/-/all-package-names-2.0.685.tgz",
- "integrity": "sha512-9dYQ6O5e4p1Strn2RH0SY10YXuBrKfe6PEOnKUMjpuOeOJhuc9owQrhvOSELH1fdj2Re21H9idoQnkoI4/Zdlg==",
- "dev": true,
- "dependencies": {
- "commander-version": "^1.1.0",
- "p-lock": "^2.0.0",
- "parse-json-object": "^2.0.1",
- "progress": "^2.0.3",
- "types-json": "^1.2.2"
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
},
- "bin": {
- "all-package-names": "build/bin/index.js"
- }
- },
- "node_modules/ansi-align": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
- "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==",
- "dev": true,
- "dependencies": {
- "string-width": "^4.1.0"
- }
- },
- "node_modules/ansi-align/node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
}
},
- "node_modules/ansi-align/node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "node_modules/@rollup/pluginutils/node_modules/estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"dev": true
},
- "node_modules/ansi-align/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ansi-align/node_modules/string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ansi-align/node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ansi-colors": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
- "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/ansi-escapes": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
- "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
- "dev": true,
- "dependencies": {
- "type-fest": "^0.21.3"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/ansi-styles": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
- "dev": true,
- "dependencies": {
- "color-convert": "^1.9.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/anymatch": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
- "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
- "dev": true,
- "dependencies": {
- "normalize-path": "^3.0.0",
- "picomatch": "^2.0.4"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/app-root-path": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.0.1.tgz",
- "integrity": "sha1-zWLc+OT9WkF+/GZNLlsQZTxlG0Y=",
+ "node_modules/@rollup/rollup-android-arm-eabi": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.0.tgz",
+ "integrity": "sha512-Eeao7ewDq79jVEsrtWIj5RNqB8p2knlm9fhR6uJ2gqP7UfbLrTrxevudVrEPDM7Wkpn/HpRC2QfazH7MXLz3vQ==",
+ "cpu": [
+ "arm"
+ ],
"dev": true,
- "engines": {
- "node": ">= 4.0.0"
- }
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
},
- "node_modules/append-transform": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz",
- "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==",
+ "node_modules/@rollup/rollup-android-arm64": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.0.tgz",
+ "integrity": "sha512-yVh0Kf1f0Fq4tWNf6mWcbQBCLDpDrDEl88lzPgKhrgTcDrTtlmun92ywEF9dCjmYO3EFiSuJeeo9cYRxl2FswA==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "dependencies": {
- "default-require-extensions": "^2.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/archy": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
- "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
- "dev": true
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
},
- "node_modules/argparse": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
- "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "node_modules/@rollup/rollup-darwin-arm64": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.0.tgz",
+ "integrity": "sha512-gCs0ErAZ9s0Osejpc3qahTsqIPUDjSKIyxK/0BGKvL+Tn0n3Kwvj8BrCv7Y5sR1Ypz1K2qz9Ny0VvkVyoXBVUQ==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "dependencies": {
- "sprintf-js": "~1.0.2"
- }
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
},
- "node_modules/array-each": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
- "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=",
+ "node_modules/@rollup/rollup-darwin-x64": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.0.tgz",
+ "integrity": "sha512-aIB5Anc8hngk15t3GUkiO4pv42ykXHfmpXGS+CzM9CTyiWyT8HIS5ygRAy7KcFb/wiw4Br+vh1byqcHRTfq2tQ==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/array-flatten": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
- "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=",
- "dev": true
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
},
- "node_modules/array-slice": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
- "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==",
+ "node_modules/@rollup/rollup-freebsd-arm64": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.0.tgz",
+ "integrity": "sha512-kpdsUdMlVJMRMaOf/tIvxk8TQdzHhY47imwmASOuMajg/GXpw8GKNd8LNwIHE5Yd1onehNpcUB9jHY6wgw9nHQ==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
},
- "node_modules/array-union": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
- "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
+ "node_modules/@rollup/rollup-freebsd-x64": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.0.tgz",
+ "integrity": "sha512-D0RDyHygOBCQiqookcPevrvgEarN0CttBecG4chOeIYCNtlKHmf5oi5kAVpXV7qs0Xh/WO2RnxeicZPtT50V0g==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "engines": {
- "node": ">=8"
- }
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
},
- "node_modules/arrify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
- "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==",
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.0.tgz",
+ "integrity": "sha512-mCIw8j5LPDXmCOW8mfMZwT6F/Kza03EnSr4wGYEswrEfjTfVsFOxvgYfuRMxTuUF/XmRb9WSMD5GhCWDe2iNrg==",
+ "cpu": [
+ "arm"
+ ],
"dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
},
- "node_modules/asn1": {
- "version": "0.1.11",
- "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz",
- "integrity": "sha1-VZvhg3bQik7E2+gId9J4GGObLfc=",
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.0.tgz",
+ "integrity": "sha512-AwwldAu4aCJPob7zmjuDUMvvuatgs8B/QiVB0KwkUarAcPB3W+ToOT+18TQwY4z09Al7G0BvCcmLRop5zBLTag==",
+ "cpu": [
+ "arm"
+ ],
"dev": true,
+ "license": "MIT",
"optional": true,
- "engines": {
- "node": ">=0.4.9"
- }
+ "os": [
+ "linux"
+ ]
},
- "node_modules/asn1.js": {
- "version": "5.4.1",
- "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
- "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==",
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.0.tgz",
+ "integrity": "sha512-e7kDUGVP+xw05pV65ZKb0zulRploU3gTu6qH1qL58PrULDGxULIS0OSDQJLH7WiFnpd3ZKUU4VM3u/Z7Zw+e7Q==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "dependencies": {
- "bn.js": "^4.0.0",
- "inherits": "^2.0.1",
- "minimalistic-assert": "^1.0.0",
- "safer-buffer": "^2.1.0"
- }
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
},
- "node_modules/assert": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz",
- "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==",
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.0.tgz",
+ "integrity": "sha512-SXYJw3zpwHgaBqTXeAZ31qfW/v50wq4HhNVvKFhRr5MnptRX2Af4KebLWR1wpxGJtLgfS2hEPuALRIY3LPAAcA==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "dependencies": {
- "object-assign": "^4.1.1",
- "util": "0.10.3"
- }
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
},
- "node_modules/assert-plus": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz",
- "integrity": "sha1-7nQAlBMALYTOxyGcasgRgS5yMWA=",
+ "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.0.tgz",
+ "integrity": "sha512-e5XiCinINCI4RdyU3sFyBH4zzz7LiQRvHqDtRe9Dt8o/8hTBaYpdPimayF00eY2qy5j4PaaWK0azRgUench6WQ==",
+ "cpu": [
+ "loong64"
+ ],
"dev": true,
+ "license": "MIT",
"optional": true,
- "engines": {
- "node": ">=0.8"
- }
- },
- "node_modules/assert/node_modules/inherits": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
- "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
- "dev": true
+ "os": [
+ "linux"
+ ]
},
- "node_modules/assert/node_modules/util": {
- "version": "0.10.3",
- "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
- "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
+ "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.0.tgz",
+ "integrity": "sha512-3SWN3e0bAsm9ToprLFBSro8nJe6YN+5xmB11N4FfNf92wvLye/+Rh5JGQtKOpwLKt6e61R1RBc9g+luLJsc23A==",
+ "cpu": [
+ "ppc64"
+ ],
"dev": true,
- "dependencies": {
- "inherits": "2.0.1"
- }
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
},
- "node_modules/assertion-error": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz",
- "integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw=",
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.0.tgz",
+ "integrity": "sha512-B1Oqt3GLh7qmhvfnc2WQla4NuHlcxAD5LyueUi5WtMc76ZWY+6qDtQYqnxARx9r+7mDGfamD+8kTJO0pKUJeJA==",
+ "cpu": [
+ "riscv64"
+ ],
"dev": true,
- "engines": {
- "node": "*"
- }
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
},
- "node_modules/async": {
- "version": "2.6.4",
- "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
- "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.0.tgz",
+ "integrity": "sha512-UfUCo0h/uj48Jq2lnhX0AOhZPSTAq3Eostas+XZ+GGk22pI+Op1Y6cxQ1JkUuKYu2iU+mXj1QjPrZm9nNWV9rg==",
+ "cpu": [
+ "s390x"
+ ],
"dev": true,
- "dependencies": {
- "lodash": "^4.17.14"
- }
- },
- "node_modules/async-limiter": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
- "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
- "dev": true
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
},
- "node_modules/aws-sign2": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz",
- "integrity": "sha1-xXED96F/wDfwLXwuZLYC6iI/fWM=",
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.0.tgz",
+ "integrity": "sha512-chZLTUIPbgcpm+Z7ALmomXW8Zh+wE2icrG+K6nt/HenPLmtwCajhQC5flNSk1Xy5EDMt/QAOz2MhzfOfJOLSiA==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "optional": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/babel-plugin-dynamic-import-node": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
- "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==",
- "dev": true,
- "dependencies": {
- "object.assign": "^4.1.0"
- }
- },
- "node_modules/babel-plugin-i18next-extract": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-i18next-extract/-/babel-plugin-i18next-extract-0.5.0.tgz",
- "integrity": "sha512-HTb6GVqW6z4KWc3GoZjnj6zLwoaEXoxlo5MkOQs6MC3NxqCt/qORVD3hdWX23dfDa/MlfPHQHTVseoR94xPz3Q==",
- "dev": true,
- "dependencies": {
- "@babel/core": "^7.4.5",
- "i18next": "^19.0.0",
- "json-stable-stringify": "^1.0.1"
- },
- "engines": {
- "node": ">=10.0.0"
- }
- },
- "node_modules/babel-plugin-i18next-extract/node_modules/json-stable-stringify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
- "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
- "dev": true,
- "dependencies": {
- "jsonify": "~0.0.0"
- }
- },
- "node_modules/babel-plugin-istanbul": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz",
- "integrity": "sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw==",
- "dev": true,
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "find-up": "^3.0.0",
- "istanbul-lib-instrument": "^3.3.0",
- "test-exclude": "^5.2.3"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/babel-plugin-istanbul/node_modules/find-up": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
- "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
- "dev": true,
- "dependencies": {
- "locate-path": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/babelify": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/babelify/-/babelify-10.0.0.tgz",
- "integrity": "sha512-X40FaxyH7t3X+JFAKvb1H9wooWKLRCi8pg3m8poqtdZaIng+bjzp9RvKQCvRjF9isHiPkXspbbXT/zwXLtwgwg==",
- "dev": true,
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0"
- }
- },
- "node_modules/balanced-match": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
- "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
- "dev": true
- },
- "node_modules/base64-js": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
- "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==",
- "dev": true
- },
- "node_modules/basic-auth": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
- "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
- "dev": true,
- "dependencies": {
- "safe-buffer": "5.1.2"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/basic-auth/node_modules/safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
- "dev": true
- },
- "node_modules/batch": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz",
- "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==",
- "dev": true
- },
- "node_modules/big-integer": {
- "version": "1.6.51",
- "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz",
- "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==",
- "dev": true,
- "engines": {
- "node": ">=0.6"
- }
- },
- "node_modules/binary-extensions": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
- "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/bl": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
- "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
- "dev": true,
- "dependencies": {
- "buffer": "^5.5.0",
- "inherits": "^2.0.4",
- "readable-stream": "^3.4.0"
- }
- },
- "node_modules/bl/node_modules/buffer": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
- "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
- "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"
- }
- ],
- "dependencies": {
- "base64-js": "^1.3.1",
- "ieee754": "^1.1.13"
- }
- },
- "node_modules/bl/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
- },
- "node_modules/bl/node_modules/readable-stream": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
- "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
- "dev": true,
- "dependencies": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/bl/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"
- }
- ]
- },
- "node_modules/bl/node_modules/string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
- "dev": true,
- "dependencies": {
- "safe-buffer": "~5.2.0"
- }
- },
- "node_modules/bn.js": {
- "version": "4.11.8",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
- "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==",
- "dev": true
- },
- "node_modules/body": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz",
- "integrity": "sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk=",
- "dev": true,
- "dependencies": {
- "continuable-cache": "^0.3.1",
- "error": "^7.0.0",
- "raw-body": "~1.1.0",
- "safe-json-parse": "~1.0.1"
- }
- },
- "node_modules/body-parser": {
- "version": "1.20.3",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
- "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
- "dev": true,
- "dependencies": {
- "bytes": "3.1.2",
- "content-type": "~1.0.5",
- "debug": "2.6.9",
- "depd": "2.0.0",
- "destroy": "1.2.0",
- "http-errors": "2.0.0",
- "iconv-lite": "0.4.24",
- "on-finished": "2.4.1",
- "qs": "6.13.0",
- "raw-body": "2.5.2",
- "type-is": "~1.6.18",
- "unpipe": "1.0.0"
- },
- "engines": {
- "node": ">= 0.8",
- "npm": "1.2.8000 || >= 1.4.16"
- }
- },
- "node_modules/body-parser/node_modules/bytes": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
- "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
- "dev": true,
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/body-parser/node_modules/depd": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
- "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
- "dev": true,
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/body-parser/node_modules/http-errors": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
- "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
- "dev": true,
- "dependencies": {
- "depd": "2.0.0",
- "inherits": "2.0.4",
- "setprototypeof": "1.2.0",
- "statuses": "2.0.1",
- "toidentifier": "1.0.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/body-parser/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
- },
- "node_modules/body-parser/node_modules/on-finished": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
- "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
- "dev": true,
- "dependencies": {
- "ee-first": "1.1.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/body-parser/node_modules/raw-body": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
- "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
- "dev": true,
- "dependencies": {
- "bytes": "3.1.2",
- "http-errors": "2.0.0",
- "iconv-lite": "0.4.24",
- "unpipe": "1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/body-parser/node_modules/setprototypeof": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
- "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
- "dev": true
- },
- "node_modules/body-parser/node_modules/statuses": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
- "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
- "dev": true,
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/boom": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz",
- "integrity": "sha1-emNune1O/O+xnO9JR6PGffrukRs=",
- "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).",
- "dev": true,
- "optional": true,
- "dependencies": {
- "hoek": "0.9.x"
- },
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/boxen": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.1.1.tgz",
- "integrity": "sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==",
- "dev": true,
- "dependencies": {
- "ansi-align": "^3.0.1",
- "camelcase": "^7.0.1",
- "chalk": "^5.2.0",
- "cli-boxes": "^3.0.0",
- "string-width": "^5.1.2",
- "type-fest": "^2.13.0",
- "widest-line": "^4.0.1",
- "wrap-ansi": "^8.1.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/boxen/node_modules/ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
- }
- },
- "node_modules/boxen/node_modules/ansi-styles": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
- "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/boxen/node_modules/camelcase": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz",
- "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==",
- "dev": true,
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/boxen/node_modules/chalk": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
- "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
- "dev": true,
- "engines": {
- "node": "^12.17.0 || ^14.13 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/boxen/node_modules/emoji-regex": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
- "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
- "dev": true
- },
- "node_modules/boxen/node_modules/string-width": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
- "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
- "dev": true,
- "dependencies": {
- "eastasianwidth": "^0.2.0",
- "emoji-regex": "^9.2.2",
- "strip-ansi": "^7.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/boxen/node_modules/strip-ansi": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
- "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^6.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
- }
- },
- "node_modules/boxen/node_modules/type-fest": {
- "version": "2.19.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
- "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
- "dev": true,
- "engines": {
- "node": ">=12.20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/boxen/node_modules/wrap-ansi": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
- "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
- "dev": true,
- "dependencies": {
- "ansi-styles": "^6.1.0",
- "string-width": "^5.0.1",
- "strip-ansi": "^7.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
- }
- },
- "node_modules/bplist-parser": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz",
- "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==",
- "dev": true,
- "dependencies": {
- "big-integer": "^1.6.44"
- },
- "engines": {
- "node": ">= 5.10.0"
- }
- },
- "node_modules/brace-expansion": {
- "version": "1.1.8",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
- "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
- "dev": true,
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/braces": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
- "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
- "dev": true,
- "dependencies": {
- "fill-range": "^7.1.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/brfs-babel": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/brfs-babel/-/brfs-babel-2.0.0.tgz",
- "integrity": "sha512-PzvOpd+5b0ScbN35oRiQvU+g60yt2+TazPKGtnsG4uSbLBfS3wm7A/VnYc0jUbrcqwc+cxV9BN9DndV3CT3XTQ==",
- "dev": true,
- "dependencies": {
- "@babel/core": "^7.5.5",
- "babel-plugin-static-fs": "^2.0.1",
- "through2": "^2.0.0"
- }
- },
- "node_modules/brfs-babel/node_modules/babel-plugin-static-fs": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-static-fs/-/babel-plugin-static-fs-2.0.1.tgz",
- "integrity": "sha512-LIH+OIIEs1oo7xN4zZhDhEV90Zpcjl9ZZIcXfbm20+CmpIiTu2VOY9718uqra0htaHkwkmTGFGZyYgOy2pllGw==",
- "dev": true,
- "dependencies": {
- "@babel/template": "^7.4.4",
- "@babel/types": "^7.5.5",
- "browser-resolve": "^1.11.3",
- "events": "^1.1.0",
- "resolve": "^1.11.1"
- }
- },
- "node_modules/brfs-babel/node_modules/resolve": {
- "version": "1.22.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
- "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
- "dev": true,
- "dependencies": {
- "is-core-module": "^2.9.0",
- "path-parse": "^1.0.7",
- "supports-preserve-symlinks-flag": "^1.0.0"
- },
- "bin": {
- "resolve": "bin/resolve"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/brorand": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
- "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
- "dev": true
- },
- "node_modules/browser-pack": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz",
- "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==",
- "dev": true,
- "dependencies": {
- "combine-source-map": "~0.8.0",
- "defined": "^1.0.0",
- "JSONStream": "^1.0.3",
- "safe-buffer": "^5.1.1",
- "through2": "^2.0.0",
- "umd": "^3.0.0"
- },
- "bin": {
- "browser-pack": "bin/cmd.js"
- }
- },
- "node_modules/browser-resolve": {
- "version": "1.11.3",
- "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz",
- "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==",
- "dev": true,
- "dependencies": {
- "resolve": "1.1.7"
- }
- },
- "node_modules/browser-resolve/node_modules/resolve": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
- "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
- "dev": true
- },
- "node_modules/browser-stdout": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
- "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
- "dev": true
- },
- "node_modules/browserify": {
- "version": "16.5.0",
- "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.5.0.tgz",
- "integrity": "sha512-6bfI3cl76YLAnCZ75AGu/XPOsqUhRyc0F/olGIJeCxtfxF2HvPKEcmjU9M8oAPxl4uBY1U7Nry33Q6koV3f2iw==",
- "dev": true,
- "dependencies": {
- "assert": "^1.4.0",
- "browser-pack": "^6.0.1",
- "browser-resolve": "^1.11.0",
- "browserify-zlib": "~0.2.0",
- "buffer": "^5.0.2",
- "cached-path-relative": "^1.0.0",
- "concat-stream": "^1.6.0",
- "console-browserify": "^1.1.0",
- "constants-browserify": "~1.0.0",
- "crypto-browserify": "^3.0.0",
- "defined": "^1.0.0",
- "deps-sort": "^2.0.0",
- "domain-browser": "^1.2.0",
- "duplexer2": "~0.1.2",
- "events": "^2.0.0",
- "glob": "^7.1.0",
- "has": "^1.0.0",
- "htmlescape": "^1.1.0",
- "https-browserify": "^1.0.0",
- "inherits": "~2.0.1",
- "insert-module-globals": "^7.0.0",
- "JSONStream": "^1.0.3",
- "labeled-stream-splicer": "^2.0.0",
- "mkdirp": "^0.5.0",
- "module-deps": "^6.0.0",
- "os-browserify": "~0.3.0",
- "parents": "^1.0.1",
- "path-browserify": "~0.0.0",
- "process": "~0.11.0",
- "punycode": "^1.3.2",
- "querystring-es3": "~0.2.0",
- "read-only-stream": "^2.0.0",
- "readable-stream": "^2.0.2",
- "resolve": "^1.1.4",
- "shasum": "^1.0.0",
- "shell-quote": "^1.6.1",
- "stream-browserify": "^2.0.0",
- "stream-http": "^3.0.0",
- "string_decoder": "^1.1.1",
- "subarg": "^1.0.0",
- "syntax-error": "^1.1.1",
- "through2": "^2.0.0",
- "timers-browserify": "^1.0.1",
- "tty-browserify": "0.0.1",
- "url": "~0.11.0",
- "util": "~0.10.1",
- "vm-browserify": "^1.0.0",
- "xtend": "^4.0.0"
- },
- "bin": {
- "browserify": "bin/cmd.js"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/browserify-aes": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
- "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
- "dev": true,
- "dependencies": {
- "buffer-xor": "^1.0.3",
- "cipher-base": "^1.0.0",
- "create-hash": "^1.1.0",
- "evp_bytestokey": "^1.0.3",
- "inherits": "^2.0.1",
- "safe-buffer": "^5.0.1"
- }
- },
- "node_modules/browserify-cipher": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
- "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
- "dev": true,
- "dependencies": {
- "browserify-aes": "^1.0.4",
- "browserify-des": "^1.0.0",
- "evp_bytestokey": "^1.0.0"
- }
- },
- "node_modules/browserify-des": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
- "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
- "dev": true,
- "dependencies": {
- "cipher-base": "^1.0.1",
- "des.js": "^1.0.0",
- "inherits": "^2.0.1",
- "safe-buffer": "^5.1.2"
- }
- },
- "node_modules/browserify-des/node_modules/safe-buffer": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
- "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==",
- "dev": true
- },
- "node_modules/browserify-rsa": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz",
- "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==",
- "dev": true,
- "dependencies": {
- "bn.js": "^5.0.0",
- "randombytes": "^2.0.1"
- }
- },
- "node_modules/browserify-rsa/node_modules/bn.js": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz",
- "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==",
- "dev": true
- },
- "node_modules/browserify-sign": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.2.tgz",
- "integrity": "sha512-1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg==",
- "dev": true,
- "dependencies": {
- "bn.js": "^5.2.1",
- "browserify-rsa": "^4.1.0",
- "create-hash": "^1.2.0",
- "create-hmac": "^1.1.7",
- "elliptic": "^6.5.4",
- "inherits": "^2.0.4",
- "parse-asn1": "^5.1.6",
- "readable-stream": "^3.6.2",
- "safe-buffer": "^5.2.1"
- },
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/browserify-sign/node_modules/bn.js": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz",
- "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==",
- "dev": true
- },
- "node_modules/browserify-sign/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
- },
- "node_modules/browserify-sign/node_modules/readable-stream": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
- "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
- "dev": true,
- "dependencies": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/browserify-sign/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"
- }
- ]
- },
- "node_modules/browserify-sign/node_modules/string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
- "dev": true,
- "dependencies": {
- "safe-buffer": "~5.2.0"
- }
- },
- "node_modules/browserify-zlib": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
- "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
- "dev": true,
- "dependencies": {
- "pako": "~1.0.5"
- }
- },
- "node_modules/browserify/node_modules/events": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz",
- "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==",
- "dev": true,
- "engines": {
- "node": ">=0.4.x"
- }
- },
- "node_modules/browserify/node_modules/safe-buffer": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
- "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==",
- "dev": true
- },
- "node_modules/browserify/node_modules/string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
- "dev": true,
- "dependencies": {
- "safe-buffer": "~5.2.0"
- }
- },
- "node_modules/browserslist": {
- "version": "4.16.6",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz",
- "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==",
- "dev": true,
- "dependencies": {
- "caniuse-lite": "^1.0.30001219",
- "colorette": "^1.2.2",
- "electron-to-chromium": "^1.3.723",
- "escalade": "^3.1.1",
- "node-releases": "^1.1.71"
- },
- "bin": {
- "browserslist": "cli.js"
- },
- "engines": {
- "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/browserslist"
- }
- },
- "node_modules/browserslist/node_modules/electron-to-chromium": {
- "version": "1.3.736",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.736.tgz",
- "integrity": "sha512-DY8dA7gR51MSo66DqitEQoUMQ0Z+A2DSXFi7tK304bdTVqczCAfUuyQw6Wdg8hIoo5zIxkU1L24RQtUce1Ioig==",
- "dev": true
- },
- "node_modules/browserslist/node_modules/node-releases": {
- "version": "1.1.72",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.72.tgz",
- "integrity": "sha512-LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw==",
- "dev": true
- },
- "node_modules/buffer": {
- "version": "5.4.3",
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz",
- "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==",
- "dev": true,
- "dependencies": {
- "base64-js": "^1.0.2",
- "ieee754": "^1.1.4"
- }
- },
- "node_modules/buffer-crc32": {
- "version": "0.2.13",
- "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
- "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/buffer-from": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
- "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
- "dev": true
- },
- "node_modules/buffer-xor": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
- "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
- "dev": true
- },
- "node_modules/builtin-modules": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
- "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/builtin-status-codes": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
- "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
- "dev": true
- },
- "node_modules/builtins": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz",
- "integrity": "sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==",
- "dev": true
- },
- "node_modules/bundle-name": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz",
- "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==",
- "dev": true,
- "dependencies": {
- "run-applescript": "^5.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/bytes": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz",
- "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g=",
- "dev": true
- },
- "node_modules/cacheable-lookup": {
- "version": "5.0.4",
- "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",
- "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==",
- "dev": true,
- "engines": {
- "node": ">=10.6.0"
- }
- },
- "node_modules/cacheable-request": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz",
- "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==",
- "dev": true,
- "dependencies": {
- "clone-response": "^1.0.2",
- "get-stream": "^5.1.0",
- "http-cache-semantics": "^4.0.0",
- "keyv": "^4.0.0",
- "lowercase-keys": "^2.0.0",
- "normalize-url": "^6.0.1",
- "responselike": "^2.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cacheable-request/node_modules/get-stream": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
- "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
- "dev": true,
- "dependencies": {
- "pump": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/cached-path-relative": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz",
- "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==",
- "dev": true
- },
- "node_modules/caching-transform": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz",
- "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==",
- "dev": true,
- "dependencies": {
- "hasha": "^3.0.0",
- "make-dir": "^2.0.0",
- "package-hash": "^3.0.0",
- "write-file-atomic": "^2.4.2"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/caching-transform/node_modules/make-dir": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
- "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
- "dev": true,
- "dependencies": {
- "pify": "^4.0.1",
- "semver": "^5.6.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/caching-transform/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true,
- "bin": {
- "semver": "bin/semver"
- }
- },
- "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==",
- "dev": true,
- "dependencies": {
- "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"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/callsites": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
- "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/camelcase": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
- "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/camelcase-keys": {
- "version": "8.0.2",
- "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-8.0.2.tgz",
- "integrity": "sha512-qMKdlOfsjlezMqxkUGGMaWWs17i2HoL15tM+wtx8ld4nLrUwU58TFdvyGOz/piNP842KeO8yXvggVQSdQ828NA==",
- "dev": true,
- "dependencies": {
- "camelcase": "^7.0.0",
- "map-obj": "^4.3.0",
- "quick-lru": "^6.1.1",
- "type-fest": "^2.13.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/camelcase-keys/node_modules/camelcase": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz",
- "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==",
- "dev": true,
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/camelcase-keys/node_modules/type-fest": {
- "version": "2.19.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
- "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
- "dev": true,
- "engines": {
- "node": ">=12.20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/caniuse-lite": {
- "version": "1.0.30001549",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001549.tgz",
- "integrity": "sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA==",
- "dev": true,
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/browserslist"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
- },
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ]
- },
- "node_modules/chai": {
- "version": "3.5.0",
- "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz",
- "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=",
- "dev": true,
- "dependencies": {
- "assertion-error": "^1.0.1",
- "deep-eql": "^0.1.3",
- "type-detect": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4.0"
- }
- },
- "node_modules/chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
- "dev": true,
- "dependencies": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/chardet": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
- "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
- "dev": true
- },
- "node_modules/chokidar": {
- "version": "3.5.3",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
- "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
- "dev": true,
- "funding": [
- {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
- }
- ],
- "dependencies": {
- "anymatch": "~3.1.2",
- "braces": "~3.0.2",
- "glob-parent": "~5.1.2",
- "is-binary-path": "~2.1.0",
- "is-glob": "~4.0.1",
- "normalize-path": "~3.0.0",
- "readdirp": "~3.6.0"
- },
- "engines": {
- "node": ">= 8.10.0"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.2"
- }
- },
- "node_modules/chokidar/node_modules/glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "dev": true,
- "dependencies": {
- "is-glob": "^4.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/chownr": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
- "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
- "dev": true
- },
- "node_modules/ci-info": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
- "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
- "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==",
- "dev": true,
- "dependencies": {
- "inherits": "^2.0.1",
- "safe-buffer": "^5.0.1"
- }
- },
- "node_modules/clean-stack": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz",
- "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==",
- "dev": true,
- "dependencies": {
- "escape-string-regexp": "5.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/clean-stack/node_modules/escape-string-regexp": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
- "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/cli-boxes": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz",
- "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/cli-cursor": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
- "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
- "dev": true,
- "dependencies": {
- "restore-cursor": "^3.1.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cli-spinners": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-0.1.2.tgz",
- "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/cli-truncate": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz",
- "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=",
- "dev": true,
- "dependencies": {
- "slice-ansi": "0.0.4",
- "string-width": "^1.0.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/cli-truncate/node_modules/slice-ansi": {
- "version": "0.0.4",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
- "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/cli-width": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz",
- "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==",
- "dev": true,
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/cliui": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
- "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
- "dev": true,
- "dependencies": {
- "string-width": "^4.2.0",
- "strip-ansi": "^6.0.0",
- "wrap-ansi": "^6.2.0"
- }
- },
- "node_modules/cliui/node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cliui/node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "node_modules/cliui/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cliui/node_modules/string-width": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
- "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
- "dev": true,
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cliui/node_modules/strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^5.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/clone": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
- "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
- "dev": true,
- "engines": {
- "node": ">=0.8"
- }
- },
- "node_modules/clone-response": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",
- "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==",
- "dev": true,
- "dependencies": {
- "mimic-response": "^1.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/code-point-at": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
- "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/color-convert": {
- "version": "1.9.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz",
- "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==",
- "dev": true,
- "dependencies": {
- "color-name": "^1.1.1"
- }
- },
- "node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "node_modules/colorette": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz",
- "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==",
- "dev": true
- },
- "node_modules/colors": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
- "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
- "dev": true,
- "engines": {
- "node": ">=0.1.90"
- }
- },
- "node_modules/combine-source-map": {
- "version": "0.8.0",
- "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz",
- "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=",
- "dev": true,
- "dependencies": {
- "convert-source-map": "~1.1.0",
- "inline-source-map": "~0.6.0",
- "lodash.memoize": "~3.0.3",
- "source-map": "~0.5.3"
- }
- },
- "node_modules/combine-source-map/node_modules/convert-source-map": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz",
- "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=",
- "dev": true
- },
- "node_modules/combine-source-map/node_modules/source-map": {
- "version": "0.5.7",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/combined-stream": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz",
- "integrity": "sha1-ATfmV7qlp1QcV6w3rF/AfXO03B8=",
- "dev": true,
- "optional": true,
- "dependencies": {
- "delayed-stream": "0.0.5"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/commander": {
- "version": "2.9.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
- "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=",
- "dev": true,
- "dependencies": {
- "graceful-readlink": ">= 1.0.0"
- },
- "engines": {
- "node": ">= 0.6.x"
- }
- },
- "node_modules/commander-version": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/commander-version/-/commander-version-1.1.0.tgz",
- "integrity": "sha512-9aNW4N6q6EPDUszLRH6k9IwO6OoGYh3HRgUF/fA7Zs+Mz1v1x5akSqT7QGB8JsGY7AG7qMA7oRRB/4yyn33FYA==",
- "dev": true,
- "dependencies": {
- "@bconnorwhite/module": "^2.0.2",
- "commander": "^6.1.0"
- }
- },
- "node_modules/commander-version/node_modules/commander": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz",
- "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==",
- "dev": true,
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/commondir": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
- "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
- "dev": true
- },
- "node_modules/compare-versions": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz",
- "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==",
- "dev": true
- },
- "node_modules/concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
- "dev": true
- },
- "node_modules/concat-stream": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz",
- "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=",
- "dev": true,
- "engines": [
- "node >= 0.8"
- ],
- "dependencies": {
- "inherits": "^2.0.3",
- "readable-stream": "^2.2.2",
- "typedarray": "^0.0.6"
- }
- },
- "node_modules/config-chain": {
- "version": "1.1.13",
- "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",
- "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",
- "dev": true,
- "dependencies": {
- "ini": "^1.3.4",
- "proto-list": "~1.2.1"
- }
- },
- "node_modules/configstore": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz",
- "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==",
- "dev": true,
- "dependencies": {
- "dot-prop": "^6.0.1",
- "graceful-fs": "^4.2.6",
- "unique-string": "^3.0.0",
- "write-file-atomic": "^3.0.3",
- "xdg-basedir": "^5.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/yeoman/configstore?sponsor=1"
- }
- },
- "node_modules/configstore/node_modules/dot-prop": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
- "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
- "dev": true,
- "dependencies": {
- "is-obj": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/configstore/node_modules/is-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/configstore/node_modules/write-file-atomic": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
- "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
- "dev": true,
- "dependencies": {
- "imurmurhash": "^0.1.4",
- "is-typedarray": "^1.0.0",
- "signal-exit": "^3.0.2",
- "typedarray-to-buffer": "^3.1.5"
- }
- },
- "node_modules/connect": {
- "version": "3.7.0",
- "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz",
- "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==",
- "dev": true,
- "dependencies": {
- "debug": "2.6.9",
- "finalhandler": "1.1.2",
- "parseurl": "~1.3.3",
- "utils-merge": "1.0.1"
- },
- "engines": {
- "node": ">= 0.10.0"
- }
- },
- "node_modules/connect-livereload": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/connect-livereload/-/connect-livereload-0.6.1.tgz",
- "integrity": "sha512-3R0kMOdL7CjJpU66fzAkCe6HNtd3AavCS4m+uW4KtJjrdGPT0SQEZieAYd+cm+lJoBznNQ4lqipYWkhBMgk00g==",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/connect-modrewrite": {
- "version": "0.10.2",
- "resolved": "https://registry.npmjs.org/connect-modrewrite/-/connect-modrewrite-0.10.2.tgz",
- "integrity": "sha512-37+kS9t26vxjW5ErNrr8d04F7Us1EH7XhHtxSm8yE8kO2uDF2DsPI+qI2wCeBSaoakXKit0/88sg4vL2Wl8tDw==",
- "dev": true,
- "dependencies": {
- "qs": "^6.3.1"
- }
- },
- "node_modules/console-browserify": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz",
- "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==",
- "dev": true
- },
- "node_modules/constants-browserify": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
- "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
- "dev": true
- },
- "node_modules/content-disposition": {
- "version": "0.5.4",
- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
- "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
- "dev": true,
- "dependencies": {
- "safe-buffer": "5.2.1"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/content-disposition/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"
- }
- ]
- },
- "node_modules/content-type": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
- "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
- "dev": true,
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/continuable-cache": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz",
- "integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8=",
- "dev": true
- },
- "node_modules/convert-source-map": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz",
- "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==",
- "dev": true,
- "dependencies": {
- "safe-buffer": "~5.1.1"
- }
- },
- "node_modules/cookie": {
- "version": "0.7.1",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz",
- "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
- "dev": true,
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/cookie-signature": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
- "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=",
- "dev": true
- },
- "node_modules/core-js": {
- "version": "3.6.5",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz",
- "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==",
- "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
- "dev": true,
- "hasInstallScript": true,
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/core-js"
- }
- },
- "node_modules/core-js-compat": {
- "version": "3.6.5",
- "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz",
- "integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==",
- "dev": true,
- "dependencies": {
- "browserslist": "^4.8.5",
- "semver": "7.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/core-js"
- }
- },
- "node_modules/core-js-compat/node_modules/semver": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
- "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
- "dev": true,
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/core-util-is": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
- "dev": true
- },
- "node_modules/cosmiconfig": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-1.1.0.tgz",
- "integrity": "sha1-DeoPmATv37kp+7GxiOJVU+oFPTc=",
- "dev": true,
- "dependencies": {
- "graceful-fs": "^4.1.2",
- "js-yaml": "^3.4.3",
- "minimist": "^1.2.0",
- "object-assign": "^4.0.1",
- "os-homedir": "^1.0.1",
- "parse-json": "^2.2.0",
- "pinkie-promise": "^2.0.0",
- "require-from-string": "^1.1.0"
- }
- },
- "node_modules/cp-file": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz",
- "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==",
- "dev": true,
- "dependencies": {
- "graceful-fs": "^4.1.2",
- "make-dir": "^2.0.0",
- "nested-error-stacks": "^2.0.0",
- "pify": "^4.0.1",
- "safe-buffer": "^5.0.1"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/cp-file/node_modules/make-dir": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
- "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
- "dev": true,
- "dependencies": {
- "pify": "^4.0.1",
- "semver": "^5.6.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/cp-file/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true,
- "bin": {
- "semver": "bin/semver"
- }
- },
- "node_modules/create-ecdh": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz",
- "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==",
- "dev": true,
- "dependencies": {
- "bn.js": "^4.1.0",
- "elliptic": "^6.0.0"
- }
- },
- "node_modules/create-hash": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
- "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
- "dev": true,
- "dependencies": {
- "cipher-base": "^1.0.1",
- "inherits": "^2.0.1",
- "md5.js": "^1.3.4",
- "ripemd160": "^2.0.1",
- "sha.js": "^2.4.0"
- }
- },
- "node_modules/create-hmac": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
- "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
- "dev": true,
- "dependencies": {
- "cipher-base": "^1.0.3",
- "create-hash": "^1.1.0",
- "inherits": "^2.0.1",
- "ripemd160": "^2.0.0",
- "safe-buffer": "^5.0.1",
- "sha.js": "^2.4.8"
- }
- },
- "node_modules/cross-fetch": {
- "version": "3.1.5",
- "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
- "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
- "dev": true,
- "dependencies": {
- "node-fetch": "2.6.7"
- }
- },
- "node_modules/cross-spawn": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
- "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
- "dev": true,
- "dependencies": {
- "lru-cache": "^4.0.1",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
- "node_modules/cryptiles": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz",
- "integrity": "sha1-7ZH/HxetE9N0gohZT4pIoNJvMlw=",
- "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).",
- "dev": true,
- "optional": true,
- "dependencies": {
- "boom": "0.4.x"
- },
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/crypto-browserify": {
- "version": "3.12.0",
- "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
- "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
- "dev": true,
- "dependencies": {
- "browserify-cipher": "^1.0.0",
- "browserify-sign": "^4.0.0",
- "create-ecdh": "^4.0.0",
- "create-hash": "^1.1.0",
- "create-hmac": "^1.1.0",
- "diffie-hellman": "^5.0.0",
- "inherits": "^2.0.1",
- "pbkdf2": "^3.0.3",
- "public-encrypt": "^4.0.0",
- "randombytes": "^2.0.0",
- "randomfill": "^1.0.3"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/crypto-random-string": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz",
- "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==",
- "dev": true,
- "dependencies": {
- "type-fest": "^1.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/crypto-random-string/node_modules/type-fest": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
- "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/ctype": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz",
- "integrity": "sha1-gsGMJGH3QRTvFsE1IkrQuRRMoS8=",
- "dev": true,
- "optional": true,
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/d": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
- "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
- "dev": true,
- "dependencies": {
- "es5-ext": "^0.10.9"
- }
- },
- "node_modules/dash-ast": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz",
- "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==",
- "dev": true
- },
- "node_modules/date-fns": {
- "version": "1.29.0",
- "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz",
- "integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==",
- "dev": true
- },
- "node_modules/dateformat": {
- "version": "4.6.3",
- "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz",
- "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dev": true,
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/decamelize": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
- "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/decamelize-keys": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-2.0.1.tgz",
- "integrity": "sha512-nrNeSCtU2gV3Apcmn/EZ+aR20zKDuNDStV67jPiupokD3sOAFeMzslLMCFdKv1sPqzwoe5ZUhsSW9IAVgKSL/Q==",
- "dev": true,
- "dependencies": {
- "decamelize": "^6.0.0",
- "map-obj": "^4.3.0",
- "quick-lru": "^6.1.1",
- "type-fest": "^3.1.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/decamelize-keys/node_modules/decamelize": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz",
- "integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==",
- "dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/decamelize-keys/node_modules/type-fest": {
- "version": "3.13.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.0.tgz",
- "integrity": "sha512-Gur3yQGM9qiLNs0KPP7LPgeRbio2QTt4xXouobMCarR0/wyW3F+F/+OWwshg3NG0Adon7uQfSZBpB46NfhoF1A==",
- "dev": true,
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/decompress-response": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
- "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
- "dev": true,
- "dependencies": {
- "mimic-response": "^3.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/decompress-response/node_modules/mimic-response": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
- "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/deep-eql": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz",
- "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=",
- "dev": true,
- "dependencies": {
- "type-detect": "0.1.1"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/deep-eql/node_modules/type-detect": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz",
- "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/deep-extend": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
- "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
- "dev": true,
- "engines": {
- "node": ">=4.0.0"
- }
- },
- "node_modules/deep-is": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
- "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
- "dev": true
- },
- "node_modules/default-browser": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz",
- "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==",
- "dev": true,
- "dependencies": {
- "bundle-name": "^3.0.0",
- "default-browser-id": "^3.0.0",
- "execa": "^7.1.1",
- "titleize": "^3.0.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/default-browser-id": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz",
- "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==",
- "dev": true,
- "dependencies": {
- "bplist-parser": "^0.2.0",
- "untildify": "^4.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/default-require-extensions": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz",
- "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=",
- "dev": true,
- "dependencies": {
- "strip-bom": "^3.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/default-require-extensions/node_modules/strip-bom": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
- "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/defaults": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
- "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
- "dev": true,
- "dependencies": {
- "clone": "^1.0.2"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/defer-to-connect": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
- "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",
- "dev": true,
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/define-data-property": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
- "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
- "dev": true,
- "dependencies": {
- "es-define-property": "^1.0.0",
- "es-errors": "^1.3.0",
- "gopd": "^1.0.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/define-lazy-prop": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",
- "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/define-properties": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
- "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
- "dev": true,
- "dependencies": {
- "object-keys": "^1.0.12"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/defined": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
- "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=",
- "dev": true
- },
- "node_modules/del": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/del/-/del-7.0.0.tgz",
- "integrity": "sha512-tQbV/4u5WVB8HMJr08pgw0b6nG4RGt/tj+7Numvq+zqcvUFeMaIWWOUFltiU+6go8BSO2/ogsB4EasDaj0y68Q==",
- "dev": true,
- "dependencies": {
- "globby": "^13.1.2",
- "graceful-fs": "^4.2.10",
- "is-glob": "^4.0.3",
- "is-path-cwd": "^3.0.0",
- "is-path-inside": "^4.0.0",
- "p-map": "^5.5.0",
- "rimraf": "^3.0.2",
- "slash": "^4.0.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/del/node_modules/globby": {
- "version": "13.2.2",
- "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz",
- "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==",
- "dev": true,
- "dependencies": {
- "dir-glob": "^3.0.1",
- "fast-glob": "^3.3.0",
- "ignore": "^5.2.4",
- "merge2": "^1.4.1",
- "slash": "^4.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/del/node_modules/p-map": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz",
- "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==",
- "dev": true,
- "dependencies": {
- "aggregate-error": "^4.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/del/node_modules/rimraf": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
- "dev": true,
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/del/node_modules/slash": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
- "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/delayed-stream": {
- "version": "0.0.5",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz",
- "integrity": "sha1-1LH0OpPoKW3+AmlPRoC8N6MTxz8=",
- "dev": true,
- "optional": true,
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/depd": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
- "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
- "dev": true,
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/deps-sort": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz",
- "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==",
- "dev": true,
- "dependencies": {
- "JSONStream": "^1.0.3",
- "shasum-object": "^1.0.0",
- "subarg": "^1.0.0",
- "through2": "^2.0.0"
- },
- "bin": {
- "deps-sort": "bin/cmd.js"
- }
- },
- "node_modules/derequire": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/derequire/-/derequire-2.1.1.tgz",
- "integrity": "sha512-5hGVgKAEGhSGZM02abtkwDzqEOXun1dP9Ocw0yh7Pz7j70k4SNk7WURm93YyHbs2PcieRyX8m4ta1glGakw84Q==",
- "dev": true,
- "dependencies": {
- "acorn": "^7.1.1",
- "concat-stream": "^1.4.6",
- "escope": "^3.6.0",
- "through2": "^2.0.0",
- "yargs": "^15.3.1"
- },
- "bin": {
- "derequire": "bin/cmd.js"
- }
- },
- "node_modules/derequire/node_modules/acorn": {
- "version": "7.4.1",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
- "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
- "dev": true,
- "bin": {
- "acorn": "bin/acorn"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/des.js": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz",
- "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==",
- "dev": true,
- "dependencies": {
- "inherits": "^2.0.1",
- "minimalistic-assert": "^1.0.0"
- }
- },
- "node_modules/destroy": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
- "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
- "dev": true,
- "engines": {
- "node": ">= 0.8",
- "npm": "1.2.8000 || >= 1.4.16"
- }
- },
- "node_modules/detect-file": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
- "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/detective": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz",
- "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==",
- "dev": true,
- "dependencies": {
- "acorn-node": "^1.6.1",
- "defined": "^1.0.0",
- "minimist": "^1.1.1"
- },
- "bin": {
- "detective": "bin/detective.js"
- },
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/devtools-protocol": {
- "version": "0.0.1045489",
- "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1045489.tgz",
- "integrity": "sha512-D+PTmWulkuQW4D1NTiCRCFxF7pQPn0hgp4YyX4wAQ6xYXKOadSWPR3ENGDQ47MW/Ewc9v2rpC/UEEGahgBYpSQ==",
- "dev": true
- },
- "node_modules/didyoumean": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.1.tgz",
- "integrity": "sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=",
- "dev": true
- },
- "node_modules/diff": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz",
- "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==",
- "dev": true,
- "engines": {
- "node": ">=0.3.1"
- }
- },
- "node_modules/diffie-hellman": {
- "version": "5.0.3",
- "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
- "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
- "dev": true,
- "dependencies": {
- "bn.js": "^4.1.0",
- "miller-rabin": "^4.0.0",
- "randombytes": "^2.0.0"
- }
- },
- "node_modules/dir-glob": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
- "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
- "dev": true,
- "dependencies": {
- "path-type": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/doctrine": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
- "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
- "dev": true,
- "dependencies": {
- "esutils": "^2.0.2"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/domain-browser": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
- "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==",
- "dev": true,
- "engines": {
- "node": ">=0.4",
- "npm": ">=1.2"
- }
- },
- "node_modules/dot-prop": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-7.2.0.tgz",
- "integrity": "sha512-Ol/IPXUARn9CSbkrdV4VJo7uCy1I3VuSiWCaFSg+8BdUOzF9n3jefIpcgAydvUZbTdEBZs2vEiTiS9m61ssiDA==",
- "dev": true,
- "dependencies": {
- "type-fest": "^2.11.2"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/dot-prop/node_modules/type-fest": {
- "version": "2.19.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
- "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
- "dev": true,
- "engines": {
- "node": ">=12.20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/duplexer": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
- "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
- "dev": true
- },
- "node_modules/duplexer2": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
- "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=",
- "dev": true,
- "dependencies": {
- "readable-stream": "^2.0.2"
- }
- },
- "node_modules/duplexify": {
- "version": "3.7.1",
- "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz",
- "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==",
- "dev": true,
- "dependencies": {
- "end-of-stream": "^1.0.0",
- "inherits": "^2.0.1",
- "readable-stream": "^2.0.0",
- "stream-shift": "^1.0.0"
- }
- },
- "node_modules/eastasianwidth": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
- "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
- "dev": true
- },
- "node_modules/ee-first": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
- "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=",
- "dev": true
- },
- "node_modules/elegant-spinner": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz",
- "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/elliptic": {
- "version": "6.6.0",
- "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.0.tgz",
- "integrity": "sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA==",
- "dev": true,
- "dependencies": {
- "bn.js": "^4.11.9",
- "brorand": "^1.1.0",
- "hash.js": "^1.0.0",
- "hmac-drbg": "^1.0.1",
- "inherits": "^2.0.4",
- "minimalistic-assert": "^1.0.1",
- "minimalistic-crypto-utils": "^1.0.1"
- }
- },
- "node_modules/elliptic/node_modules/bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
- "dev": true
- },
- "node_modules/elliptic/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
- },
- "node_modules/emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
- "dev": true
- },
- "node_modules/encodeurl": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
- "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
- "dev": true,
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/end-of-stream": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
- "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
- "dev": true,
- "dependencies": {
- "once": "^1.4.0"
- }
- },
- "node_modules/entities": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
- "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=",
- "dev": true
- },
- "node_modules/error": {
- "version": "7.0.2",
- "resolved": "https://registry.npmjs.org/error/-/error-7.0.2.tgz",
- "integrity": "sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI=",
- "dev": true,
- "dependencies": {
- "string-template": "~0.2.1",
- "xtend": "~4.0.0"
- }
- },
- "node_modules/error-ex": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
- "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
- "dev": true,
- "dependencies": {
- "is-arrayish": "^0.2.1"
- }
- },
- "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==",
- "dev": true,
- "dependencies": {
- "get-intrinsic": "^1.2.4"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/es-errors": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
- "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
- "dev": true,
- "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",
- "integrity": "sha1-DudB0Ui4AGm6J9AgOTdWryV978M=",
- "dev": true,
- "dependencies": {
- "es6-iterator": "~2.0.1",
- "es6-symbol": "~3.1.1"
- }
- },
- "node_modules/es6-error": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
- "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
- "dev": true
- },
- "node_modules/es6-iterator": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
- "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
- "dev": true,
- "dependencies": {
- "d": "1",
- "es5-ext": "^0.10.35",
- "es6-symbol": "^3.1.1"
- }
- },
- "node_modules/es6-map": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz",
- "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=",
- "dev": true,
- "dependencies": {
- "d": "1",
- "es5-ext": "~0.10.14",
- "es6-iterator": "~2.0.1",
- "es6-set": "~0.1.5",
- "es6-symbol": "~3.1.1",
- "event-emitter": "~0.3.5"
- }
- },
- "node_modules/es6-promise": {
- "version": "4.2.8",
- "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
- "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
- "dev": true
- },
- "node_modules/es6-set": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
- "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=",
- "dev": true,
- "dependencies": {
- "d": "1",
- "es5-ext": "~0.10.14",
- "es6-iterator": "~2.0.1",
- "es6-symbol": "3.1.1",
- "event-emitter": "~0.3.5"
- }
- },
- "node_modules/es6-symbol": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
- "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
- "dev": true,
- "dependencies": {
- "d": "1",
- "es5-ext": "~0.10.14"
- }
- },
- "node_modules/es6-weak-map": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
- "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
- "dev": true,
- "dependencies": {
- "d": "1",
- "es5-ext": "^0.10.14",
- "es6-iterator": "^2.0.1",
- "es6-symbol": "^3.1.1"
- }
- },
- "node_modules/escalade": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
- "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/escape-goat": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz",
- "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/escape-html": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=",
- "dev": true
- },
- "node_modules/escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
- "dev": true,
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/escope": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz",
- "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=",
- "dev": true,
- "dependencies": {
- "es6-map": "^0.1.3",
- "es6-weak-map": "^2.0.1",
- "esrecurse": "^4.1.0",
- "estraverse": "^4.1.1"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/eslint": {
- "version": "8.23.1",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.1.tgz",
- "integrity": "sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg==",
- "dev": true,
- "dependencies": {
- "@eslint/eslintrc": "^1.3.2",
- "@humanwhocodes/config-array": "^0.10.4",
- "@humanwhocodes/gitignore-to-minimatch": "^1.0.2",
- "@humanwhocodes/module-importer": "^1.0.1",
- "ajv": "^6.10.0",
- "chalk": "^4.0.0",
- "cross-spawn": "^7.0.2",
- "debug": "^4.3.2",
- "doctrine": "^3.0.0",
- "escape-string-regexp": "^4.0.0",
- "eslint-scope": "^7.1.1",
- "eslint-utils": "^3.0.0",
- "eslint-visitor-keys": "^3.3.0",
- "espree": "^9.4.0",
- "esquery": "^1.4.0",
- "esutils": "^2.0.2",
- "fast-deep-equal": "^3.1.3",
- "file-entry-cache": "^6.0.1",
- "find-up": "^5.0.0",
- "glob-parent": "^6.0.1",
- "globals": "^13.15.0",
- "globby": "^11.1.0",
- "grapheme-splitter": "^1.0.4",
- "ignore": "^5.2.0",
- "import-fresh": "^3.0.0",
- "imurmurhash": "^0.1.4",
- "is-glob": "^4.0.0",
- "js-sdsl": "^4.1.4",
- "js-yaml": "^4.1.0",
- "json-stable-stringify-without-jsonify": "^1.0.1",
- "levn": "^0.4.1",
- "lodash.merge": "^4.6.2",
- "minimatch": "^3.1.2",
- "natural-compare": "^1.4.0",
- "optionator": "^0.9.1",
- "regexpp": "^3.2.0",
- "strip-ansi": "^6.0.1",
- "strip-json-comments": "^3.1.0",
- "text-table": "^0.2.0"
- },
- "bin": {
- "eslint": "bin/eslint.js"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/eslint-scope": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz",
- "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==",
- "dev": true,
- "dependencies": {
- "esrecurse": "^4.3.0",
- "estraverse": "^5.2.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- }
- },
- "node_modules/eslint-scope/node_modules/esrecurse": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
- "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
- "dev": true,
- "dependencies": {
- "estraverse": "^5.2.0"
- },
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/eslint-scope/node_modules/estraverse": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
- "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
- "dev": true,
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/eslint-utils": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
- "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==",
- "dev": true,
- "dependencies": {
- "eslint-visitor-keys": "^2.0.0"
- },
- "engines": {
- "node": "^10.0.0 || ^12.0.0 || >= 14.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/mysticatea"
- },
- "peerDependencies": {
- "eslint": ">=5"
- }
- },
- "node_modules/eslint-utils/node_modules/eslint-visitor-keys": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
- "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
- "dev": true,
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/eslint-visitor-keys": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz",
- "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==",
- "dev": true,
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- }
- },
- "node_modules/eslint/node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/eslint/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/eslint/node_modules/argparse": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "dev": true
- },
- "node_modules/eslint/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dev": true,
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/eslint/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/eslint/node_modules/cross-spawn": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
- "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
- "dev": true,
- "dependencies": {
- "path-key": "^3.1.0",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/eslint/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dev": true,
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/eslint/node_modules/escape-string-regexp": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint/node_modules/find-up": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
- "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
- "dev": true,
- "dependencies": {
- "locate-path": "^6.0.0",
- "path-exists": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint/node_modules/globals": {
- "version": "13.17.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz",
- "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==",
- "dev": true,
- "dependencies": {
- "type-fest": "^0.20.2"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/eslint/node_modules/js-yaml": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
- "dev": true,
- "dependencies": {
- "argparse": "^2.0.1"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- }
- },
- "node_modules/eslint/node_modules/locate-path": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
- "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
- "dev": true,
- "dependencies": {
- "p-locate": "^5.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint/node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dev": true,
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/eslint/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/eslint/node_modules/p-limit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
- "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
- "dev": true,
- "dependencies": {
- "yocto-queue": "^0.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint/node_modules/p-locate": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
- "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
- "dev": true,
- "dependencies": {
- "p-limit": "^3.0.2"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint/node_modules/path-key": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
- "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/eslint/node_modules/shebang-command": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
- "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
- "dev": true,
- "dependencies": {
- "shebang-regex": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/eslint/node_modules/shebang-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
- "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/eslint/node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/eslint/node_modules/strip-json-comments": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
- "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
- "dev": true,
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/eslint/node_modules/type-fest": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
- "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint/node_modules/which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "dev": true,
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/node-which"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/espree": {
- "version": "9.4.0",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz",
- "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==",
- "dev": true,
- "dependencies": {
- "acorn": "^8.8.0",
- "acorn-jsx": "^5.3.2",
- "eslint-visitor-keys": "^3.3.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/esprima": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
- "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
- "dev": true,
- "bin": {
- "esparse": "bin/esparse.js",
- "esvalidate": "bin/esvalidate.js"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/esquery": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz",
- "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==",
- "dev": true,
- "dependencies": {
- "estraverse": "^5.1.0"
- },
- "engines": {
- "node": ">=0.10"
- }
- },
- "node_modules/esquery/node_modules/estraverse": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
- "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
- "dev": true,
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/esrecurse": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz",
- "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=",
- "dev": true,
- "dependencies": {
- "estraverse": "^4.1.0",
- "object-assign": "^4.0.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/estraverse": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
- "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/esutils": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
- "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/etag": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
- "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
- "dev": true,
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/event-emitter": {
- "version": "0.3.5",
- "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
- "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=",
- "dev": true,
- "dependencies": {
- "d": "1",
- "es5-ext": "~0.10.14"
- }
- },
- "node_modules/eventemitter2": {
- "version": "0.4.14",
- "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz",
- "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=",
- "dev": true
- },
- "node_modules/events": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
- "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=",
- "dev": true,
- "engines": {
- "node": ">=0.4.x"
- }
- },
- "node_modules/evp_bytestokey": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
- "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
- "dev": true,
- "dependencies": {
- "md5.js": "^1.3.4",
- "safe-buffer": "^5.1.1"
- }
- },
- "node_modules/execa": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz",
- "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==",
- "dev": true,
- "dependencies": {
- "cross-spawn": "^7.0.3",
- "get-stream": "^6.0.1",
- "human-signals": "^4.3.0",
- "is-stream": "^3.0.0",
- "merge-stream": "^2.0.0",
- "npm-run-path": "^5.1.0",
- "onetime": "^6.0.0",
- "signal-exit": "^3.0.7",
- "strip-final-newline": "^3.0.0"
- },
- "engines": {
- "node": "^14.18.0 || ^16.14.0 || >=18.0.0"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/execa?sponsor=1"
- }
- },
- "node_modules/execa/node_modules/cross-spawn": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
- "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
- "dev": true,
- "dependencies": {
- "path-key": "^3.1.0",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/execa/node_modules/get-stream": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
- "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/execa/node_modules/is-stream": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
- "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
- "dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/execa/node_modules/mimic-fn": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
- "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/execa/node_modules/npm-run-path": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz",
- "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==",
- "dev": true,
- "dependencies": {
- "path-key": "^4.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/execa/node_modules/npm-run-path/node_modules/path-key": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
- "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/execa/node_modules/onetime": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
- "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
- "dev": true,
- "dependencies": {
- "mimic-fn": "^4.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/execa/node_modules/path-key": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
- "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/execa/node_modules/shebang-command": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
- "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
- "dev": true,
- "dependencies": {
- "shebang-regex": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/execa/node_modules/shebang-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
- "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/execa/node_modules/which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "dev": true,
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/node-which"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/exit": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
- "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=",
- "dev": true,
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/exit-hook": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz",
- "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/expand-tilde": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
- "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
- "dev": true,
- "dependencies": {
- "homedir-polyfill": "^1.0.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/express": {
- "version": "4.21.1",
- "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz",
- "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==",
- "dev": true,
- "dependencies": {
- "accepts": "~1.3.8",
- "array-flatten": "1.1.1",
- "body-parser": "1.20.3",
- "content-disposition": "0.5.4",
- "content-type": "~1.0.4",
- "cookie": "0.7.1",
- "cookie-signature": "1.0.6",
- "debug": "2.6.9",
- "depd": "2.0.0",
- "encodeurl": "~2.0.0",
- "escape-html": "~1.0.3",
- "etag": "~1.8.1",
- "finalhandler": "1.3.1",
- "fresh": "0.5.2",
- "http-errors": "2.0.0",
- "merge-descriptors": "1.0.3",
- "methods": "~1.1.2",
- "on-finished": "2.4.1",
- "parseurl": "~1.3.3",
- "path-to-regexp": "0.1.10",
- "proxy-addr": "~2.0.7",
- "qs": "6.13.0",
- "range-parser": "~1.2.1",
- "safe-buffer": "5.2.1",
- "send": "0.19.0",
- "serve-static": "1.16.2",
- "setprototypeof": "1.2.0",
- "statuses": "2.0.1",
- "type-is": "~1.6.18",
- "utils-merge": "1.0.1",
- "vary": "~1.1.2"
- },
- "engines": {
- "node": ">= 0.10.0"
- }
- },
- "node_modules/express/node_modules/depd": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
- "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
- "dev": true,
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/express/node_modules/encodeurl": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
- "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
- "dev": true,
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/express/node_modules/finalhandler": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
- "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
- "dev": true,
- "dependencies": {
- "debug": "2.6.9",
- "encodeurl": "~2.0.0",
- "escape-html": "~1.0.3",
- "on-finished": "2.4.1",
- "parseurl": "~1.3.3",
- "statuses": "2.0.1",
- "unpipe": "~1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/express/node_modules/http-errors": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
- "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
- "dev": true,
- "dependencies": {
- "depd": "2.0.0",
- "inherits": "2.0.4",
- "setprototypeof": "1.2.0",
- "statuses": "2.0.1",
- "toidentifier": "1.0.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/express/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
- },
- "node_modules/express/node_modules/on-finished": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
- "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
- "dev": true,
- "dependencies": {
- "ee-first": "1.1.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/express/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"
- }
- ]
- },
- "node_modules/express/node_modules/setprototypeof": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
- "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
- "dev": true
- },
- "node_modules/express/node_modules/statuses": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
- "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
- "dev": true,
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/extend": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
- "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
- "dev": true
- },
- "node_modules/external-editor": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
- "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
- "dev": true,
- "dependencies": {
- "chardet": "^0.7.0",
- "iconv-lite": "^0.4.24",
- "tmp": "^0.0.33"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/extract-zip": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
- "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
- "dev": true,
- "dependencies": {
- "debug": "^4.1.1",
- "get-stream": "^5.1.0",
- "yauzl": "^2.10.0"
- },
- "bin": {
- "extract-zip": "cli.js"
- },
- "engines": {
- "node": ">= 10.17.0"
- },
- "optionalDependencies": {
- "@types/yauzl": "^2.9.1"
- }
- },
- "node_modules/extract-zip/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dev": true,
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/extract-zip/node_modules/get-stream": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
- "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
- "dev": true,
- "dependencies": {
- "pump": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/extract-zip/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/fast-deep-equal": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
- "dev": true
- },
- "node_modules/fast-glob": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz",
- "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==",
- "dev": true,
- "dependencies": {
- "@nodelib/fs.stat": "^2.0.2",
- "@nodelib/fs.walk": "^1.2.3",
- "glob-parent": "^5.1.2",
- "merge2": "^1.3.0",
- "micromatch": "^4.0.4"
- },
- "engines": {
- "node": ">=8.6.0"
- }
- },
- "node_modules/fast-glob/node_modules/glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "dev": true,
- "dependencies": {
- "is-glob": "^4.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/fast-json-stable-stringify": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
- "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
- "dev": true
- },
- "node_modules/fast-levenshtein": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
- "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
- "dev": true
- },
- "node_modules/fast-safe-stringify": {
- "version": "2.0.7",
- "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
- "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==",
- "dev": true
- },
- "node_modules/fastq": {
- "version": "1.13.0",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz",
- "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==",
- "dev": true,
- "dependencies": {
- "reusify": "^1.0.4"
- }
- },
- "node_modules/faye-websocket": {
- "version": "0.10.0",
- "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz",
- "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=",
- "dev": true,
- "dependencies": {
- "websocket-driver": ">=0.5.1"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/fd-slicer": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
- "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
- "dev": true,
- "dependencies": {
- "pend": "~1.2.0"
- }
- },
- "node_modules/fetch-jsonp": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/fetch-jsonp/-/fetch-jsonp-1.1.3.tgz",
- "integrity": "sha1-nrnlhboIqvcAVjU40Xu+u81aPbI=",
- "dev": true
- },
- "node_modules/figures": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
- "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
- "dev": true,
- "dependencies": {
- "escape-string-regexp": "^1.0.5",
- "object-assign": "^4.1.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/file-entry-cache": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
- "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
- "dev": true,
- "dependencies": {
- "flat-cache": "^3.0.4"
- },
- "engines": {
- "node": "^10.12.0 || >=12.0.0"
- }
- },
- "node_modules/file-saver": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-1.3.8.tgz",
- "integrity": "sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg==",
- "dev": true
- },
- "node_modules/fill-range": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
- "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
- "dev": true,
- "dependencies": {
- "to-regex-range": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/finalhandler": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
- "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
- "dev": true,
- "dependencies": {
- "debug": "2.6.9",
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "on-finished": "~2.3.0",
- "parseurl": "~1.3.3",
- "statuses": "~1.5.0",
- "unpipe": "~1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/find-cache-dir": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
- "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==",
- "dev": true,
- "dependencies": {
- "commondir": "^1.0.1",
- "make-dir": "^2.0.0",
- "pkg-dir": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/find-cache-dir/node_modules/make-dir": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
- "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
- "dev": true,
- "dependencies": {
- "pify": "^4.0.1",
- "semver": "^5.6.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/find-cache-dir/node_modules/semver": {
- "version": "5.7.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
- "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
- "dev": true,
- "bin": {
- "semver": "bin/semver"
- }
- },
- "node_modules/find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
- "dev": true,
- "dependencies": {
- "locate-path": "^5.0.0",
- "path-exists": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/find-up/node_modules/locate-path": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
- "dev": true,
- "dependencies": {
- "p-locate": "^4.1.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/find-up/node_modules/p-locate": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
- "dev": true,
- "dependencies": {
- "p-limit": "^2.2.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/find-versions": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz",
- "integrity": "sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==",
- "dev": true,
- "dependencies": {
- "semver-regex": "^3.1.2"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/findup-sync": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-5.0.0.tgz",
- "integrity": "sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==",
- "dev": true,
- "dependencies": {
- "detect-file": "^1.0.0",
- "is-glob": "^4.0.3",
- "micromatch": "^4.0.4",
- "resolve-dir": "^1.0.1"
- },
- "engines": {
- "node": ">= 10.13.0"
- }
- },
- "node_modules/fined": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz",
- "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==",
- "dev": true,
- "dependencies": {
- "expand-tilde": "^2.0.2",
- "is-plain-object": "^2.0.3",
- "object.defaults": "^1.1.0",
- "object.pick": "^1.2.0",
- "parse-filepath": "^1.0.1"
- },
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/flagged-respawn": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
- "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==",
- "dev": true,
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/flat": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz",
- "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==",
- "dev": true,
- "bin": {
- "flat": "cli.js"
- }
- },
- "node_modules/flat-cache": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
- "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
- "dev": true,
- "dependencies": {
- "flatted": "^3.1.0",
- "rimraf": "^3.0.2"
- },
- "engines": {
- "node": "^10.12.0 || >=12.0.0"
- }
- },
- "node_modules/flat-cache/node_modules/rimraf": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
- "dev": true,
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/flatted": {
- "version": "3.2.7",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz",
- "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==",
- "dev": true
- },
- "node_modules/for-in": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
- "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/for-own": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
- "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
- "dev": true,
- "dependencies": {
- "for-in": "^1.0.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/foreground-child": {
- "version": "1.5.6",
- "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz",
- "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=",
- "dev": true,
- "dependencies": {
- "cross-spawn": "^4",
- "signal-exit": "^3.0.0"
- }
- },
- "node_modules/foreground-child/node_modules/cross-spawn": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz",
- "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=",
- "dev": true,
- "dependencies": {
- "lru-cache": "^4.0.1",
- "which": "^1.2.9"
- }
- },
- "node_modules/forever-agent": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz",
- "integrity": "sha1-bQ4JxJIflKJ/Y9O0nF/v8epMUTA=",
- "dev": true,
- "engines": {
- "node": "*"
- }
- },
- "node_modules/form-data": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz",
- "integrity": "sha1-kavXiKupcCsaq/qLwBAxoqyeOxI=",
- "dev": true,
- "optional": true,
- "dependencies": {
- "async": "~0.9.0",
- "combined-stream": "~0.0.4",
- "mime": "~1.2.11"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/form-data-encoder": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz",
- "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==",
- "dev": true,
- "engines": {
- "node": ">= 14.17"
- }
- },
- "node_modules/form-data/node_modules/async": {
- "version": "0.9.2",
- "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
- "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=",
- "dev": true,
- "optional": true
- },
- "node_modules/form-data/node_modules/mime": {
- "version": "1.2.11",
- "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz",
- "integrity": "sha1-WCA+7Ybjpe8XrtK32evUfwpg3RA=",
- "dev": true,
- "optional": true
- },
- "node_modules/forwarded": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
- "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
- "dev": true,
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/fresh": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
- "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
- "dev": true,
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/fs-constants": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
- "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
- "dev": true
- },
- "node_modules/fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
- "dev": true
- },
- "node_modules/fsevents": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
- "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
- "dev": true,
- "hasInstallScript": true,
+ "license": "MIT",
"optional": true,
"os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
- "node_modules/function-bind": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
- "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
- "dev": true,
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/gaze": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz",
- "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==",
- "dev": true,
- "dependencies": {
- "globule": "^1.0.0"
- },
- "engines": {
- "node": ">= 4.0.0"
- }
- },
- "node_modules/get-assigned-identifiers": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz",
- "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==",
- "dev": true
- },
- "node_modules/get-caller-file": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
- "dev": true,
- "engines": {
- "node": "6.* || 8.* || >= 10.*"
- }
- },
- "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==",
- "dev": true,
- "dependencies": {
- "es-errors": "^1.3.0",
- "function-bind": "^1.1.2",
- "has-proto": "^1.0.1",
- "has-symbols": "^1.0.3",
- "hasown": "^2.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/get-own-enumerable-property-symbols": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz",
- "integrity": "sha512-TtY/sbOemiMKPRUDDanGCSgBYe7Mf0vbRsWnBZ+9yghpZ1MvcpSpuZFjHdEeY/LZjZy0vdLjS77L6HosisFiug==",
- "dev": true
- },
- "node_modules/get-stream": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
- "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/getobject": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz",
- "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==",
- "dev": true,
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/gifenc": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/gifenc/-/gifenc-1.0.3.tgz",
- "integrity": "sha512-xdr6AdrfGBcfzncONUOlXMBuc5wJDtOueE3c5rdG0oNgtINLD+f2iFZltrBRZYzACRbKr+mSVU/x98zv2u3jmw==",
- "dev": true
- },
- "node_modules/github-url-from-git": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.5.0.tgz",
- "integrity": "sha512-WWOec4aRI7YAykQ9+BHmzjyNlkfJFG8QLXnDTsLz/kZefq7qkzdfo4p6fkYYMIq1aj+gZcQs/1HQhQh3DPPxlQ==",
- "dev": true
- },
- "node_modules/glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
- "dev": true,
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/glob-parent": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
- "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
- "dev": true,
- "dependencies": {
- "is-glob": "^4.0.3"
- },
- "engines": {
- "node": ">=10.13.0"
- }
- },
- "node_modules/global-dirs": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz",
- "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==",
- "dev": true,
- "dependencies": {
- "ini": "2.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/global-dirs/node_modules/ini": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz",
- "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==",
- "dev": true,
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/global-modules": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
- "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
- "dev": true,
- "dependencies": {
- "global-prefix": "^1.0.1",
- "is-windows": "^1.0.1",
- "resolve-dir": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/global-prefix": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
- "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
- "dev": true,
- "dependencies": {
- "expand-tilde": "^2.0.2",
- "homedir-polyfill": "^1.0.1",
- "ini": "^1.3.4",
- "is-windows": "^1.0.1",
- "which": "^1.2.14"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/globals": {
- "version": "11.7.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz",
- "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/globby": {
- "version": "11.1.0",
- "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
- "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
- "dev": true,
- "dependencies": {
- "array-union": "^2.1.0",
- "dir-glob": "^3.0.1",
- "fast-glob": "^3.2.9",
- "ignore": "^5.2.0",
- "merge2": "^1.4.1",
- "slash": "^3.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/globule": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz",
- "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==",
- "dev": true,
- "dependencies": {
- "glob": "~7.1.1",
- "lodash": "~4.17.10",
- "minimatch": "~3.0.2"
- },
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/gopd": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
- "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
- "dev": true,
- "dependencies": {
- "get-intrinsic": "^1.1.3"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/got": {
- "version": "11.8.6",
- "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz",
- "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==",
- "dev": true,
- "dependencies": {
- "@sindresorhus/is": "^4.0.0",
- "@szmarczak/http-timer": "^4.0.5",
- "@types/cacheable-request": "^6.0.1",
- "@types/responselike": "^1.0.0",
- "cacheable-lookup": "^5.0.3",
- "cacheable-request": "^7.0.2",
- "decompress-response": "^6.0.0",
- "http2-wrapper": "^1.0.0-beta.5.2",
- "lowercase-keys": "^2.0.0",
- "p-cancelable": "^2.0.0",
- "responselike": "^2.0.0"
- },
- "engines": {
- "node": ">=10.19.0"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/got?sponsor=1"
- }
- },
- "node_modules/graceful-fs": {
- "version": "4.2.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
- "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
- "dev": true
- },
- "node_modules/graceful-readlink": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
- "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=",
- "dev": true
- },
- "node_modules/grapheme-splitter": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz",
- "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==",
- "dev": true
- },
- "node_modules/grunt": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.6.1.tgz",
- "integrity": "sha512-/ABUy3gYWu5iBmrUSRBP97JLpQUm0GgVveDCp6t3yRNIoltIYw7rEj3g5y1o2PGPR2vfTRGa7WC/LZHLTXnEzA==",
- "dev": true,
- "dependencies": {
- "dateformat": "~4.6.2",
- "eventemitter2": "~0.4.13",
- "exit": "~0.1.2",
- "findup-sync": "~5.0.0",
- "glob": "~7.1.6",
- "grunt-cli": "~1.4.3",
- "grunt-known-options": "~2.0.0",
- "grunt-legacy-log": "~3.0.0",
- "grunt-legacy-util": "~2.0.1",
- "iconv-lite": "~0.6.3",
- "js-yaml": "~3.14.0",
- "minimatch": "~3.0.4",
- "nopt": "~3.0.6"
- },
- "bin": {
- "grunt": "bin/grunt"
- },
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/grunt-cli": {
- "version": "1.4.3",
- "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz",
- "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==",
- "dev": true,
- "dependencies": {
- "grunt-known-options": "~2.0.0",
- "interpret": "~1.1.0",
- "liftup": "~3.0.1",
- "nopt": "~4.0.1",
- "v8flags": "~3.2.0"
- },
- "bin": {
- "grunt": "bin/grunt"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/grunt-cli/node_modules/nopt": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz",
- "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==",
- "dev": true,
- "dependencies": {
- "abbrev": "1",
- "osenv": "^0.1.4"
- },
- "bin": {
- "nopt": "bin/nopt.js"
- }
- },
- "node_modules/grunt-contrib-clean": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-2.0.1.tgz",
- "integrity": "sha512-uRvnXfhiZt8akb/ZRDHJpQQtkkVkqc/opWO4Po/9ehC2hPxgptB9S6JHDC/Nxswo4CJSM0iFPT/Iym3cEMWzKA==",
- "dev": true,
- "dependencies": {
- "async": "^3.2.3",
- "rimraf": "^2.6.2"
- },
- "engines": {
- "node": ">=12"
- },
- "peerDependencies": {
- "grunt": ">=0.4.5"
- }
- },
- "node_modules/grunt-contrib-clean/node_modules/async": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz",
- "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==",
- "dev": true
- },
- "node_modules/grunt-contrib-connect": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/grunt-contrib-connect/-/grunt-contrib-connect-3.0.0.tgz",
- "integrity": "sha512-L1GXk6PqDP/meX0IOX1MByBvOph6h8Pvx4/iBIYD7dpokVCAAQPR/IIV1jkTONEM09xig/Y8/y3R9Fqc8U3HSA==",
- "dev": true,
- "dependencies": {
- "async": "^3.2.0",
- "connect": "^3.7.0",
- "connect-livereload": "^0.6.1",
- "morgan": "^1.10.0",
- "node-http2": "^4.0.1",
- "opn": "^6.0.0",
- "portscanner": "^2.2.0",
- "serve-index": "^1.9.1",
- "serve-static": "^1.14.1"
- },
- "engines": {
- "node": ">=10"
- }
+ "linux"
+ ]
},
- "node_modules/grunt-contrib-connect/node_modules/async": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz",
- "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==",
- "dev": true
+ "node_modules/@rollup/rollup-linux-x64-musl": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.0.tgz",
+ "integrity": "sha512-jo0UolK70O28BifvEsFD/8r25shFezl0aUk2t0VJzREWHkq19e+pcLu4kX5HiVXNz5qqkD+aAq04Ct8rkxgbyQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
},
- "node_modules/grunt-contrib-uglify": {
- "version": "5.2.2",
- "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-5.2.2.tgz",
- "integrity": "sha512-ITxiWxrjjP+RZu/aJ5GLvdele+sxlznh+6fK9Qckio5ma8f7Iv8woZjRkGfafvpuygxNefOJNc+hfjjBayRn2Q==",
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.0.tgz",
+ "integrity": "sha512-Vmg0NhAap2S54JojJchiu5An54qa6t/oKT7LmDaWggpIcaiL8WcWHEN6OQrfTdL6mQ2GFyH7j2T5/3YPEDOOGA==",
+ "cpu": [
+ "arm64"
+ ],
"dev": true,
- "dependencies": {
- "chalk": "^4.1.2",
- "maxmin": "^3.0.0",
- "uglify-js": "^3.16.1",
- "uri-path": "^1.0.0"
- },
- "engines": {
- "node": ">=12"
- }
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
},
- "node_modules/grunt-contrib-uglify/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.0.tgz",
+ "integrity": "sha512-CV2aqhDDOsABKHKhNcs1SZFryffQf8vK2XrxP6lxC99ELZAdvsDgPklIBfd65R8R+qvOm1SmLaZ/Fdq961+m7A==",
+ "cpu": [
+ "ia32"
+ ],
"dev": true,
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
},
- "node_modules/grunt-contrib-uglify/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.0.tgz",
+ "integrity": "sha512-g2ASy1QwHP88y5KWvblUolJz9rN+i4ZOsYzkEwcNfaNooxNUXG+ON6F5xFo0NIItpHqxcdAyls05VXpBnludGw==",
+ "cpu": [
+ "x64"
+ ],
"dev": true,
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
},
- "node_modules/grunt-contrib-uglify/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "node_modules/@stylistic/eslint-plugin": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-4.4.1.tgz",
+ "integrity": "sha512-CEigAk7eOLyHvdgmpZsKFwtiqS2wFwI1fn4j09IU9GmD4euFM4jEBAViWeCqaNLlbX2k2+A/Fq9cje4HQBXuJQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-name": "~1.1.4"
+ "@typescript-eslint/utils": "^8.32.1",
+ "eslint-visitor-keys": "^4.2.0",
+ "espree": "^10.3.0",
+ "estraverse": "^5.3.0",
+ "picomatch": "^4.0.2"
},
"engines": {
- "node": ">=7.0.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "peerDependencies": {
+ "eslint": ">=9.0.0"
}
},
- "node_modules/grunt-contrib-uglify/node_modules/figures": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
- "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
+ "node_modules/@stylistic/eslint-plugin/node_modules/eslint-visitor-keys": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
+ "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
"dev": true,
- "dependencies": {
- "escape-string-regexp": "^1.0.5"
- },
+ "license": "Apache-2.0",
"engines": {
- "node": ">=8"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "url": "https://opencollective.com/eslint"
}
},
- "node_modules/grunt-contrib-uglify/node_modules/gzip-size": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz",
- "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==",
+ "node_modules/@testing-library/dom": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz",
+ "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "duplexer": "^0.1.1",
- "pify": "^4.0.1"
+ "@babel/code-frame": "^7.10.4",
+ "@babel/runtime": "^7.12.5",
+ "@types/aria-query": "^5.0.1",
+ "aria-query": "5.3.0",
+ "chalk": "^4.1.0",
+ "dom-accessibility-api": "^0.5.9",
+ "lz-string": "^1.5.0",
+ "pretty-format": "^27.0.2"
},
"engines": {
- "node": ">=6"
+ "node": ">=18"
}
},
- "node_modules/grunt-contrib-uglify/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "node_modules/@testing-library/user-event": {
+ "version": "14.6.1",
+ "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.6.1.tgz",
+ "integrity": "sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=12",
+ "npm": ">=6"
+ },
+ "peerDependencies": {
+ "@testing-library/dom": ">=7.21.4"
}
},
- "node_modules/grunt-contrib-uglify/node_modules/maxmin": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-3.0.0.tgz",
- "integrity": "sha512-wcahMInmGtg/7c6a75fr21Ch/Ks1Tb+Jtoan5Ft4bAI0ZvJqyOw8kkM7e7p8hDSzY805vmxwHT50KcjGwKyJ0g==",
+ "node_modules/@tootallnate/quickjs-emscripten": {
+ "version": "0.23.0",
+ "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz",
+ "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==",
"dev": true,
- "dependencies": {
- "chalk": "^4.1.0",
- "figures": "^3.2.0",
- "gzip-size": "^5.1.1",
- "pretty-bytes": "^5.3.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
+ "license": "MIT"
},
- "node_modules/grunt-contrib-uglify/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "node_modules/@types/aria-query": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
+ "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==",
"dev": true,
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
+ "license": "MIT"
},
- "node_modules/grunt-contrib-uglify/node_modules/uglify-js": {
- "version": "3.17.0",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.0.tgz",
- "integrity": "sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg==",
+ "node_modules/@types/cookie": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz",
+ "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==",
"dev": true,
- "bin": {
- "uglifyjs": "bin/uglifyjs"
- },
- "engines": {
- "node": ">=0.8.0"
- }
+ "license": "MIT"
},
- "node_modules/grunt-contrib-watch": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.1.0.tgz",
- "integrity": "sha512-yGweN+0DW5yM+oo58fRu/XIRrPcn3r4tQx+nL7eMRwjpvk+rQY6R8o94BPK0i2UhTg9FN21hS+m8vR8v9vXfeg==",
+ "node_modules/@types/debug": {
+ "version": "4.1.12",
+ "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz",
+ "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "async": "^2.6.0",
- "gaze": "^1.1.0",
- "lodash": "^4.17.10",
- "tiny-lr": "^1.1.1"
- },
- "engines": {
- "node": ">=0.10.0"
+ "@types/ms": "*"
}
},
- "node_modules/grunt-contrib-yuidoc": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/grunt-contrib-yuidoc/-/grunt-contrib-yuidoc-1.0.0.tgz",
- "integrity": "sha1-IqLEphsgGKLRtZVGLYhWJXGH0/I=",
+ "node_modules/@types/estree": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
+ "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
"dev": true,
- "dependencies": {
- "yuidocjs": "^0.10.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
+ "license": "MIT"
},
- "node_modules/grunt-eslint": {
- "version": "24.0.0",
- "resolved": "https://registry.npmjs.org/grunt-eslint/-/grunt-eslint-24.0.0.tgz",
- "integrity": "sha512-WpTeBBFweyhMuPjGwRSQV9JFJ+EczIdlsc7Dd/1g78QVI1aZsk4g/H3e+3S5HEwsS1RKL2YZIrGj8hMLlBfN8w==",
+ "node_modules/@types/extend": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@types/extend/-/extend-3.0.4.tgz",
+ "integrity": "sha512-ArMouDUTJEz1SQRpFsT2rIw7DeqICFv5aaVzLSIYMYQSLcwcGOfT3VyglQs/p7K3F7fT4zxr0NWxYZIdifD6dA==",
"dev": true,
- "dependencies": {
- "chalk": "^4.1.2",
- "eslint": "^8.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- },
- "peerDependencies": {
- "grunt": ">=1"
- }
+ "license": "MIT"
},
- "node_modules/grunt-eslint/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "node_modules/@types/hast": {
+ "version": "2.3.10",
+ "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz",
+ "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ "@types/unist": "^2"
}
},
- "node_modules/grunt-eslint/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "node_modules/@types/json-schema": {
+ "version": "7.0.15",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
"dev": true,
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
+ "license": "MIT"
},
- "node_modules/grunt-eslint/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "node_modules/@types/mdast": {
+ "version": "3.0.15",
+ "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz",
+ "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
+ "@types/unist": "^2"
}
},
- "node_modules/grunt-eslint/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "node_modules/@types/ms": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz",
+ "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",
"dev": true,
- "engines": {
- "node": ">=8"
- }
+ "license": "MIT"
},
- "node_modules/grunt-eslint/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "node_modules/@types/node": {
+ "version": "20.17.16",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.16.tgz",
+ "integrity": "sha512-vOTpLduLkZXePLxHiHsBLp98mHGnl8RptV4YAO3HfKO5UHjDvySGbxKtpYfy8Sx5+WKcgc45qNreJJRVM3L6mw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
+ "undici-types": "~6.19.2"
}
},
- "node_modules/grunt-known-options": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz",
- "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==",
+ "node_modules/@types/normalize-package-data": {
+ "version": "2.4.4",
+ "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz",
+ "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==",
"dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
+ "license": "MIT"
},
- "node_modules/grunt-legacy-log": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz",
- "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==",
+ "node_modules/@types/parse-json": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz",
+ "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==",
"dev": true,
- "dependencies": {
- "colors": "~1.1.2",
- "grunt-legacy-log-utils": "~2.1.0",
- "hooker": "~0.2.3",
- "lodash": "~4.17.19"
- },
- "engines": {
- "node": ">= 0.10.0"
- }
+ "license": "MIT"
},
- "node_modules/grunt-legacy-log-utils": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz",
- "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==",
+ "node_modules/@types/parse5": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz",
+ "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==",
"dev": true,
- "dependencies": {
- "chalk": "~4.1.0",
- "lodash": "~4.17.19"
- },
- "engines": {
- "node": ">=10"
- }
+ "license": "MIT"
},
- "node_modules/grunt-legacy-log-utils/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "node_modules/@types/resolve": {
+ "version": "1.20.2",
+ "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
+ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==",
"dev": true,
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
+ "license": "MIT"
},
- "node_modules/grunt-legacy-log-utils/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "node_modules/@types/sinonjs__fake-timers": {
+ "version": "8.1.5",
+ "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz",
+ "integrity": "sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==",
"dev": true,
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
+ "license": "MIT"
},
- "node_modules/grunt-legacy-log-utils/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "node_modules/@types/statuses": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.5.tgz",
+ "integrity": "sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==",
"dev": true,
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
+ "license": "MIT"
},
- "node_modules/grunt-legacy-log-utils/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "node_modules/@types/supports-color": {
+ "version": "8.1.3",
+ "resolved": "https://registry.npmjs.org/@types/supports-color/-/supports-color-8.1.3.tgz",
+ "integrity": "sha512-Hy6UMpxhE3j1tLpl27exp1XqHD7n8chAiNPzWfz16LPZoMMoSc4dzLl6w9qijkEb/r5O1ozdu1CWGA2L83ZeZg==",
"dev": true,
- "engines": {
- "node": ">=8"
- }
+ "license": "MIT"
},
- "node_modules/grunt-legacy-log-utils/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "node_modules/@types/tough-cookie": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz",
+ "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==",
"dev": true,
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
+ "license": "MIT"
},
- "node_modules/grunt-legacy-util": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz",
- "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==",
+ "node_modules/@types/unist": {
+ "version": "2.0.11",
+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz",
+ "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==",
"dev": true,
- "dependencies": {
- "async": "~3.2.0",
- "exit": "~0.1.2",
- "getobject": "~1.0.0",
- "hooker": "~0.2.3",
- "lodash": "~4.17.21",
- "underscore.string": "~3.3.5",
- "which": "~2.0.2"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/grunt-legacy-util/node_modules/async": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz",
- "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==",
- "dev": true
+ "license": "MIT"
},
- "node_modules/grunt-legacy-util/node_modules/which": {
+ "node_modules/@types/which": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "resolved": "https://registry.npmjs.org/@types/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-113D3mDkZDjo+EeUEHCFy0qniNc1ZpecGiAU7WSo7YDoSzolZIQKpYFHrPpjkB2nuyahcKfrmLXeQlh7gqJYdw==",
"dev": true,
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/node-which"
- },
- "engines": {
- "node": ">= 8"
+ "license": "MIT"
+ },
+ "node_modules/@types/ws": {
+ "version": "8.5.14",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.14.tgz",
+ "integrity": "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
}
},
- "node_modules/grunt-minjson": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/grunt-minjson/-/grunt-minjson-0.4.0.tgz",
- "integrity": "sha1-I5PO+bADVrur6pB9Zc33fHYoCkQ=",
+ "node_modules/@types/yauzl": {
+ "version": "2.10.3",
+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz",
+ "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==",
"dev": true,
+ "license": "MIT",
+ "optional": true,
"dependencies": {
- "maxmin": "^2.1.0"
- },
- "engines": {
- "node": ">= 0.8.0"
+ "@types/node": "*"
}
},
- "node_modules/grunt-mocha-test": {
- "version": "0.13.3",
- "resolved": "https://registry.npmjs.org/grunt-mocha-test/-/grunt-mocha-test-0.13.3.tgz",
- "integrity": "sha512-zQGEsi3d+ViPPi7/4jcj78afKKAKiAA5n61pknQYi25Ugik+aNOuRmiOkmb8mN2CeG8YxT+YdT1H1Q7B/eNkoQ==",
+ "node_modules/@typescript-eslint/project-service": {
+ "version": "8.34.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.34.0.tgz",
+ "integrity": "sha512-iEgDALRf970/B2YExmtPMPF54NenZUf4xpL3wsCRx/lgjz6ul/l13R81ozP/ZNuXfnLCS+oPmG7JIxfdNYKELw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "hooker": "^0.2.3",
- "mkdirp": "^0.5.0"
+ "@typescript-eslint/tsconfig-utils": "^8.34.0",
+ "@typescript-eslint/types": "^8.34.0",
+ "debug": "^4.3.4"
},
"engines": {
- "node": ">= 0.10.4"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "mocha": ">=1.20.0"
+ "typescript": ">=4.8.4 <5.9.0"
}
},
- "node_modules/grunt-newer": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/grunt-newer/-/grunt-newer-1.3.0.tgz",
- "integrity": "sha1-g8y3od2ny9irI7BZAk6+YUrS80I=",
+ "node_modules/@typescript-eslint/scope-manager": {
+ "version": "8.34.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.34.0.tgz",
+ "integrity": "sha512-9Ac0X8WiLykl0aj1oYQNcLZjHgBojT6cW68yAgZ19letYu+Hxd0rE0veI1XznSSst1X5lwnxhPbVdwjDRIomRw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "async": "^1.5.2",
- "rimraf": "^2.5.2"
+ "@typescript-eslint/types": "8.34.0",
+ "@typescript-eslint/visitor-keys": "8.34.0"
},
"engines": {
- "node": ">= 0.8.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
- "peerDependencies": {
- "grunt": ">=0.4.1"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
}
},
- "node_modules/grunt-newer/node_modules/async": {
- "version": "1.5.2",
- "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
- "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
- "dev": true
+ "node_modules/@typescript-eslint/tsconfig-utils": {
+ "version": "8.34.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.34.0.tgz",
+ "integrity": "sha512-+W9VYHKFIzA5cBeooqQxqNriAP0QeQ7xTiDuIOr71hzgffm3EL2hxwWBIIj4GuofIbKxGNarpKqIq6Q6YrShOA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <5.9.0"
+ }
},
- "node_modules/grunt-simple-nyc": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/grunt-simple-nyc/-/grunt-simple-nyc-3.0.1.tgz",
- "integrity": "sha512-/YLY+jNI6gBuVO3xu07zwvDN+orTAFS50W00yb/2ncvc2PFO4pR+oU7TyiHhe8a6O3KuQDHsyCE0iE+rqJagQg==",
+ "node_modules/@typescript-eslint/types": {
+ "version": "8.34.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.34.0.tgz",
+ "integrity": "sha512-9V24k/paICYPniajHfJ4cuAWETnt7Ssy+R0Rbcqo5sSFr3QEZ/8TSoUi9XeXVBGXCaLtwTOKSLGcInCAvyZeMA==",
"dev": true,
- "dependencies": {
- "lodash": "^4.17.15",
- "nyc": "^14.1.0",
- "simple-cli": "^5.0.3"
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
}
},
- "node_modules/grunt/node_modules/iconv-lite": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
- "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+ "node_modules/@typescript-eslint/typescript-estree": {
+ "version": "8.34.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.34.0.tgz",
+ "integrity": "sha512-rOi4KZxI7E0+BMqG7emPSK1bB4RICCpF7QD3KCLXn9ZvWoESsOMlHyZPAHyG04ujVplPaHbmEvs34m+wjgtVtg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "safer-buffer": ">= 2.1.2 < 3.0.0"
+ "@typescript-eslint/project-service": "8.34.0",
+ "@typescript-eslint/tsconfig-utils": "8.34.0",
+ "@typescript-eslint/types": "8.34.0",
+ "@typescript-eslint/visitor-keys": "8.34.0",
+ "debug": "^4.3.4",
+ "fast-glob": "^3.3.2",
+ "is-glob": "^4.0.3",
+ "minimatch": "^9.0.4",
+ "semver": "^7.6.0",
+ "ts-api-utils": "^2.1.0"
},
"engines": {
- "node": ">=0.10.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <5.9.0"
}
},
- "node_modules/grunt/node_modules/js-yaml": {
- "version": "3.14.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
- "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "argparse": "^1.0.7",
- "esprima": "^4.0.0"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
+ "balanced-match": "^1.0.0"
}
},
- "node_modules/gzip-size": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-3.0.0.tgz",
- "integrity": "sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA=",
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "duplexer": "^0.1.1"
+ "brace-expansion": "^2.0.1"
},
"engines": {
- "node": ">=0.12.0"
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/hard-rejection": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz",
- "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==",
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
+ "version": "7.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
+ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
"dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
"engines": {
- "node": ">=6"
+ "node": ">=10"
}
},
- "node_modules/has": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
- "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "node_modules/@typescript-eslint/utils": {
+ "version": "8.34.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.34.0.tgz",
+ "integrity": "sha512-8L4tWatGchV9A1cKbjaavS6mwYwp39jql8xUmIIKJdm+qiaeHy5KMKlBrf30akXAWBzn2SqKsNOtSENWUwg7XQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "function-bind": "^1.1.1"
+ "@eslint-community/eslint-utils": "^4.7.0",
+ "@typescript-eslint/scope-manager": "8.34.0",
+ "@typescript-eslint/types": "8.34.0",
+ "@typescript-eslint/typescript-estree": "8.34.0"
},
"engines": {
- "node": ">= 0.4.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0",
+ "typescript": ">=4.8.4 <5.9.0"
}
},
- "node_modules/has-ansi": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
- "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
+ "node_modules/@typescript-eslint/visitor-keys": {
+ "version": "8.34.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.34.0.tgz",
+ "integrity": "sha512-qHV7pW7E85A0x6qyrFn+O+q1k1p3tQCsqIZ1KZ5ESLXY57aTvUd3/a4rdPTeXisvhXn2VQG0VSKUqs8KHF2zcA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^2.0.0"
+ "@typescript-eslint/types": "8.34.0",
+ "eslint-visitor-keys": "^4.2.0"
},
"engines": {
- "node": ">=0.10.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
}
},
- "node_modules/has-flag": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
+ "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
"dev": true,
+ "license": "Apache-2.0",
"engines": {
- "node": ">=4"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
}
},
- "node_modules/has-property-descriptors": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
- "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
+ "node_modules/@vitest/browser": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/browser/-/browser-2.1.8.tgz",
+ "integrity": "sha512-OWVvEJThRgxlNMYNVLEK/9qVkpRcLvyuKLngIV3Hob01P56NjPHprVBYn+rx4xAJudbM9yrCrywPIEuA3Xyo8A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "es-define-property": "^1.0.0"
+ "@testing-library/dom": "^10.4.0",
+ "@testing-library/user-event": "^14.5.2",
+ "@vitest/mocker": "2.1.8",
+ "@vitest/utils": "2.1.8",
+ "magic-string": "^0.30.12",
+ "msw": "^2.6.4",
+ "sirv": "^3.0.0",
+ "tinyrainbow": "^1.2.0",
+ "ws": "^8.18.0"
},
"funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "url": "https://opencollective.com/vitest"
+ },
+ "peerDependencies": {
+ "playwright": "*",
+ "vitest": "2.1.8",
+ "webdriverio": "*"
+ },
+ "peerDependenciesMeta": {
+ "playwright": {
+ "optional": true
+ },
+ "safaridriver": {
+ "optional": true
+ },
+ "webdriverio": {
+ "optional": true
+ }
}
},
- "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/@vitest/expect": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.8.tgz",
+ "integrity": "sha512-8ytZ/fFHq2g4PJVAtDX57mayemKgDR6X3Oa2Foro+EygiOJHUXhCqBAAKQYYajZpFoIfvBCF1j6R6IYRSIUFuw==",
"dev": true,
- "engines": {
- "node": ">= 0.4"
+ "license": "MIT",
+ "dependencies": {
+ "@vitest/spy": "2.1.8",
+ "@vitest/utils": "2.1.8",
+ "chai": "^5.1.2",
+ "tinyrainbow": "^1.2.0"
},
"funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "url": "https://opencollective.com/vitest"
}
},
- "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/@vitest/mocker": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.8.tgz",
+ "integrity": "sha512-7guJ/47I6uqfttp33mgo6ga5Gr1VnL58rcqYKyShoRK9ebu8T5Rs6HN3s1NABiBeVTdWNrwUMcHH54uXZBN4zA==",
"dev": true,
- "engines": {
- "node": ">= 0.4"
+ "license": "MIT",
+ "dependencies": {
+ "@vitest/spy": "2.1.8",
+ "estree-walker": "^3.0.3",
+ "magic-string": "^0.30.12"
},
"funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "url": "https://opencollective.com/vitest"
+ },
+ "peerDependencies": {
+ "msw": "^2.4.9",
+ "vite": "^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "msw": {
+ "optional": true
+ },
+ "vite": {
+ "optional": true
+ }
}
},
- "node_modules/has-yarn": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz",
- "integrity": "sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==",
+ "node_modules/@vitest/pretty-format": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.8.tgz",
+ "integrity": "sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ==",
"dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ "license": "MIT",
+ "dependencies": {
+ "tinyrainbow": "^1.2.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "url": "https://opencollective.com/vitest"
}
},
- "node_modules/hash-base": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
- "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=",
+ "node_modules/@vitest/runner": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.8.tgz",
+ "integrity": "sha512-17ub8vQstRnRlIU5k50bG+QOMLHRhYPAna5tw8tYbj+jzjcspnwnwtPtiOlkuKC4+ixDPTuLZiqiWWQ2PSXHVg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "inherits": "^2.0.1",
- "safe-buffer": "^5.0.1"
+ "@vitest/utils": "2.1.8",
+ "pathe": "^1.1.2"
},
- "engines": {
- "node": ">=4"
+ "funding": {
+ "url": "https://opencollective.com/vitest"
}
},
- "node_modules/hash.js": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
- "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
+ "node_modules/@vitest/snapshot": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.8.tgz",
+ "integrity": "sha512-20T7xRFbmnkfcmgVEz+z3AU/3b0cEzZOt/zmnvZEctg64/QZbSDJEVm9fLnnlSi74KibmRsO9/Qabi+t0vCRPg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "inherits": "^2.0.3",
- "minimalistic-assert": "^1.0.1"
+ "@vitest/pretty-format": "2.1.8",
+ "magic-string": "^0.30.12",
+ "pathe": "^1.1.2"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
}
},
- "node_modules/hasha": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz",
- "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=",
+ "node_modules/@vitest/spy": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.8.tgz",
+ "integrity": "sha512-5swjf2q95gXeYPevtW0BLk6H8+bPlMb4Vw/9Em4hFxDcaOxS+e0LOX4yqNxoHzMR2akEB2xfpnWUzkZokmgWDg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "is-stream": "^1.0.1"
+ "tinyspy": "^3.0.2"
},
- "engines": {
- "node": ">=4"
+ "funding": {
+ "url": "https://opencollective.com/vitest"
}
},
- "node_modules/hasown": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
- "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "node_modules/@vitest/utils": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.8.tgz",
+ "integrity": "sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "function-bind": "^1.1.2"
+ "@vitest/pretty-format": "2.1.8",
+ "loupe": "^3.1.2",
+ "tinyrainbow": "^1.2.0"
},
- "engines": {
- "node": ">= 0.4"
+ "funding": {
+ "url": "https://opencollective.com/vitest"
}
},
- "node_modules/hawk": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/hawk/-/hawk-1.1.1.tgz",
- "integrity": "sha1-h81JH5tG5OKurKM1QWdmiF0tHtk=",
- "deprecated": "This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.",
+ "node_modules/@vue/compiler-core": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.13.tgz",
+ "integrity": "sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==",
"dev": true,
+ "license": "MIT",
"optional": true,
"dependencies": {
- "boom": "0.4.x",
- "cryptiles": "0.2.x",
- "hoek": "0.9.x",
- "sntp": "0.2.x"
- },
- "engines": {
- "node": ">=0.8.0"
+ "@babel/parser": "^7.25.3",
+ "@vue/shared": "3.5.13",
+ "entities": "^4.5.0",
+ "estree-walker": "^2.0.2",
+ "source-map-js": "^1.2.0"
}
},
- "node_modules/he": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
- "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
+ "node_modules/@vue/compiler-core/node_modules/estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"dev": true,
- "bin": {
- "he": "bin/he"
- }
+ "optional": true
},
- "node_modules/hmac-drbg": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
- "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
+ "node_modules/@vue/compiler-dom": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz",
+ "integrity": "sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==",
"dev": true,
+ "license": "MIT",
+ "optional": true,
"dependencies": {
- "hash.js": "^1.0.3",
- "minimalistic-assert": "^1.0.0",
- "minimalistic-crypto-utils": "^1.0.1"
+ "@vue/compiler-core": "3.5.13",
+ "@vue/shared": "3.5.13"
}
},
- "node_modules/hoek": {
- "version": "0.9.1",
- "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz",
- "integrity": "sha1-PTIkYrrfB3Fup+uFuviAec3c5QU=",
- "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).",
+ "node_modules/@vue/compiler-sfc": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.13.tgz",
+ "integrity": "sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==",
"dev": true,
+ "license": "MIT",
"optional": true,
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/homedir-polyfill": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
- "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==",
- "dev": true,
"dependencies": {
- "parse-passwd": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/hooker": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz",
- "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=",
- "dev": true,
- "engines": {
- "node": "*"
+ "@babel/parser": "^7.25.3",
+ "@vue/compiler-core": "3.5.13",
+ "@vue/compiler-dom": "3.5.13",
+ "@vue/compiler-ssr": "3.5.13",
+ "@vue/shared": "3.5.13",
+ "estree-walker": "^2.0.2",
+ "magic-string": "^0.30.11",
+ "postcss": "^8.4.48",
+ "source-map-js": "^1.2.0"
}
},
- "node_modules/hosted-git-info": {
- "version": "2.8.9",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
- "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
- "dev": true
- },
- "node_modules/html-entities": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.3.1.tgz",
- "integrity": "sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA==",
- "dev": true
- },
- "node_modules/html-escaper": {
+ "node_modules/@vue/compiler-sfc/node_modules/estree-walker": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
- "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
- "dev": true
- },
- "node_modules/htmlescape": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz",
- "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"dev": true,
- "engines": {
- "node": ">=0.10"
- }
- },
- "node_modules/http-cache-semantics": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
- "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
- "dev": true
+ "optional": true
},
- "node_modules/http-errors": {
- "version": "1.6.3",
- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
- "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
+ "node_modules/@vue/compiler-ssr": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.13.tgz",
+ "integrity": "sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==",
"dev": true,
+ "license": "MIT",
+ "optional": true,
"dependencies": {
- "depd": "~1.1.2",
- "inherits": "2.0.3",
- "setprototypeof": "1.1.0",
- "statuses": ">= 1.4.0 < 2"
- },
- "engines": {
- "node": ">= 0.6"
+ "@vue/compiler-dom": "3.5.13",
+ "@vue/shared": "3.5.13"
}
},
- "node_modules/http-parser-js": {
- "version": "0.4.13",
- "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.13.tgz",
- "integrity": "sha1-O9bW/ebjFyyTNMOzO2wZPYD+ETc=",
- "dev": true
- },
- "node_modules/http-signature": {
- "version": "0.10.1",
- "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz",
- "integrity": "sha1-T72sEyVZqoMjEh5UB3nAoBKyfmY=",
+ "node_modules/@vue/shared": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.13.tgz",
+ "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==",
"dev": true,
- "optional": true,
- "dependencies": {
- "asn1": "0.1.11",
- "assert-plus": "^0.1.5",
- "ctype": "0.5.3"
- },
- "engines": {
- "node": ">=0.8"
- }
+ "license": "MIT",
+ "optional": true
},
- "node_modules/http2-wrapper": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz",
- "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==",
+ "node_modules/@wdio/config": {
+ "version": "9.7.2",
+ "resolved": "https://registry.npmjs.org/@wdio/config/-/config-9.7.2.tgz",
+ "integrity": "sha512-8C4X1gizLLjYJAbrxVOwbudkXNZYD033RPEQAHG4T6CqiqGCMB7Tb3mYUnbHuvjAHj7oJ8FTECkT1a90ZhLMgw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "quick-lru": "^5.1.1",
- "resolve-alpn": "^1.0.0"
+ "@wdio/logger": "9.4.4",
+ "@wdio/types": "9.6.3",
+ "@wdio/utils": "9.7.2",
+ "deepmerge-ts": "^7.0.3",
+ "glob": "^10.2.2",
+ "import-meta-resolve": "^4.0.0"
},
"engines": {
- "node": ">=10.19.0"
- }
- },
- "node_modules/http2-wrapper/node_modules/quick-lru": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
- "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
- "dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">=18.20.0"
}
},
- "node_modules/https-browserify": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
- "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
- "dev": true
- },
- "node_modules/https-proxy-agent": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
- "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
+ "node_modules/@wdio/config/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "agent-base": "6",
- "debug": "4"
- },
- "engines": {
- "node": ">= 6"
+ "balanced-match": "^1.0.0"
}
},
- "node_modules/https-proxy-agent/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "node_modules/@wdio/config/node_modules/glob": {
+ "version": "10.4.5",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
+ "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "ms": "2.1.2"
+ "foreground-child": "^3.1.0",
+ "jackspeak": "^3.1.2",
+ "minimatch": "^9.0.4",
+ "minipass": "^7.1.2",
+ "package-json-from-dist": "^1.0.0",
+ "path-scurry": "^1.11.1"
},
- "engines": {
- "node": ">=6.0"
+ "bin": {
+ "glob": "dist/esm/bin.mjs"
},
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/https-proxy-agent/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/human-signals": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz",
- "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==",
- "dev": true,
- "engines": {
- "node": ">=14.18.0"
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/husky": {
- "version": "4.3.8",
- "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.8.tgz",
- "integrity": "sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow==",
+ "node_modules/@wdio/config/node_modules/minimatch": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dev": true,
- "hasInstallScript": true,
+ "license": "ISC",
"dependencies": {
- "chalk": "^4.0.0",
- "ci-info": "^2.0.0",
- "compare-versions": "^3.6.0",
- "cosmiconfig": "^7.0.0",
- "find-versions": "^4.0.0",
- "opencollective-postinstall": "^2.0.2",
- "pkg-dir": "^5.0.0",
- "please-upgrade-node": "^3.2.0",
- "slash": "^3.0.0",
- "which-pm-runs": "^1.0.0"
- },
- "bin": {
- "husky-run": "bin/run.js",
- "husky-upgrade": "lib/upgrader/bin.js"
+ "brace-expansion": "^2.0.1"
},
"engines": {
- "node": ">=10"
+ "node": ">=16 || 14 >=14.17"
},
"funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/husky"
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/husky/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "node_modules/@wdio/logger": {
+ "version": "9.4.4",
+ "resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-9.4.4.tgz",
+ "integrity": "sha512-BXx8RXFUW2M4dcO6t5Le95Hi2ZkTQBRsvBQqLekT2rZ6Xmw8ZKZBPf0FptnoftFGg6dYmwnDidYv/0+4PiHjpQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-convert": "^2.0.1"
+ "chalk": "^5.1.2",
+ "loglevel": "^1.6.0",
+ "loglevel-plugin-prefix": "^0.8.4",
+ "strip-ansi": "^7.1.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=18.20.0"
+ }
+ },
+ "node_modules/@wdio/logger/node_modules/ansi-regex": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
+ "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
},
"funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
}
},
- "node_modules/husky/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "node_modules/@wdio/logger/node_modules/chalk": {
+ "version": "5.4.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz",
+ "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==",
"dev": true,
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=10"
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
- "node_modules/husky/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "node_modules/@wdio/logger/node_modules/strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-name": "~1.1.4"
+ "ansi-regex": "^6.0.1"
},
"engines": {
- "node": ">=7.0.0"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
- "node_modules/husky/node_modules/cosmiconfig": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz",
- "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==",
+ "node_modules/@wdio/protocols": {
+ "version": "9.7.0",
+ "resolved": "https://registry.npmjs.org/@wdio/protocols/-/protocols-9.7.0.tgz",
+ "integrity": "sha512-5DI8cqJqT9K6oQn8UpaSTmcGAl4ufkUWC5FoPT3oXdLjILfxvweZDf/2XNBCbGMk4+VOMKqB2ofOqKhDIB2nAg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@wdio/repl": {
+ "version": "9.4.4",
+ "resolved": "https://registry.npmjs.org/@wdio/repl/-/repl-9.4.4.tgz",
+ "integrity": "sha512-kchPRhoG/pCn4KhHGiL/ocNhdpR8OkD2e6sANlSUZ4TGBVi86YSIEjc2yXUwLacHknC/EnQk/SFnqd4MsNjGGg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@types/parse-json": "^4.0.0",
- "import-fresh": "^3.2.1",
- "parse-json": "^5.0.0",
- "path-type": "^4.0.0",
- "yaml": "^1.10.0"
+ "@types/node": "^20.1.0"
},
"engines": {
- "node": ">=10"
+ "node": ">=18.20.0"
}
},
- "node_modules/husky/node_modules/find-up": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
- "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "node_modules/@wdio/types": {
+ "version": "9.6.3",
+ "resolved": "https://registry.npmjs.org/@wdio/types/-/types-9.6.3.tgz",
+ "integrity": "sha512-K3Lu7K5g5bsUcQV6/95XaS3jMwcGUn2pDdryYibKZafklhHjVt3o/xnw6Vgd/JzoSneCKHdwj941n+yDpTJHAw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "locate-path": "^6.0.0",
- "path-exists": "^4.0.0"
+ "@types/node": "^20.1.0"
},
"engines": {
- "node": ">=10"
+ "node": ">=18.20.0"
+ }
+ },
+ "node_modules/@wdio/utils": {
+ "version": "9.7.2",
+ "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-9.7.2.tgz",
+ "integrity": "sha512-DlUY5Gn5wE3Iurlh+LdtzpzNRPIKCAU286NxaxtWjsqD6QSXXALMj5S95k9JDvw6iCXA4XrQa9T5/GBuIuyO2A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@puppeteer/browsers": "^2.2.0",
+ "@wdio/logger": "9.4.4",
+ "@wdio/types": "9.6.3",
+ "decamelize": "^6.0.0",
+ "deepmerge-ts": "^7.0.3",
+ "edgedriver": "^6.1.1",
+ "geckodriver": "^5.0.0",
+ "get-port": "^7.0.0",
+ "import-meta-resolve": "^4.0.0",
+ "locate-app": "^2.2.24",
+ "safaridriver": "^1.0.0",
+ "split2": "^4.2.0",
+ "wait-port": "^1.1.0"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "engines": {
+ "node": ">=18.20.0"
}
},
- "node_modules/husky/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "node_modules/@zip.js/zip.js": {
+ "version": "2.7.57",
+ "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.57.tgz",
+ "integrity": "sha512-BtonQ1/jDnGiMed6OkV6rZYW78gLmLswkHOzyMrMb+CAR7CZO8phOHO6c2qw6qb1g1betN7kwEHhhZk30dv+NA==",
"dev": true,
+ "license": "BSD-3-Clause",
"engines": {
- "node": ">=8"
+ "bun": ">=0.7.0",
+ "deno": ">=1.0.0",
+ "node": ">=16.5.0"
}
},
- "node_modules/husky/node_modules/locate-path": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
- "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "node_modules/abort-controller": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
+ "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "p-locate": "^5.0.0"
+ "event-target-shim": "^5.0.0"
},
"engines": {
- "node": ">=10"
+ "node": ">=6.5"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.15.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
+ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "engines": {
+ "node": ">=0.4.0"
}
},
- "node_modules/husky/node_modules/p-limit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
- "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "node_modules/acorn-jsx": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
"dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/acorn-walk": {
+ "version": "8.3.4",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
+ "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",
+ "license": "MIT",
"dependencies": {
- "yocto-queue": "^0.1.0"
+ "acorn": "^8.11.0"
},
"engines": {
- "node": ">=10"
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/agent-base": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz",
+ "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
}
},
- "node_modules/husky/node_modules/p-locate": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
- "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "node_modules/all-contributors-cli": {
+ "version": "6.26.1",
+ "resolved": "https://registry.npmjs.org/all-contributors-cli/-/all-contributors-cli-6.26.1.tgz",
+ "integrity": "sha512-Ymgo3FJACRBEd1eE653FD1J/+uD0kqpUNYfr9zNC1Qby0LgbhDBzB3EF6uvkAbYpycStkk41J+0oo37Lc02yEw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "p-limit": "^3.0.2"
+ "@babel/runtime": "^7.7.6",
+ "async": "^3.1.0",
+ "chalk": "^4.0.0",
+ "didyoumean": "^1.2.1",
+ "inquirer": "^7.3.3",
+ "json-fixer": "^1.6.8",
+ "lodash": "^4.11.2",
+ "node-fetch": "^2.6.0",
+ "pify": "^5.0.0",
+ "yargs": "^15.0.1"
+ },
+ "bin": {
+ "all-contributors": "dist/cli.js"
},
"engines": {
- "node": ">=10"
+ "node": ">=4"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "optionalDependencies": {
+ "prettier": "^2"
}
},
- "node_modules/husky/node_modules/parse-json": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
- "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
+ "node_modules/ansi-escapes": {
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
+ "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/code-frame": "^7.0.0",
- "error-ex": "^1.3.1",
- "json-parse-even-better-errors": "^2.3.0",
- "lines-and-columns": "^1.1.6"
+ "type-fest": "^0.21.3"
},
"engines": {
"node": ">=8"
@@ -8417,166 +3878,134 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/husky/node_modules/pkg-dir": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz",
- "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==",
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
- "dependencies": {
- "find-up": "^5.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=10"
+ "node": ">=8"
}
},
- "node_modules/husky/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "has-flag": "^4.0.0"
+ "color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/i18next": {
- "version": "19.0.2",
- "resolved": "https://registry.npmjs.org/i18next/-/i18next-19.0.2.tgz",
- "integrity": "sha512-fBa43Ann2udP1CQAz3IQpOZ1dGAkmi3mMfzisOhH17igneSRbvZ7P2RNbL+L1iRYKMufBmVwnC7G3gqcyviZ9g==",
- "dev": true,
- "dependencies": {
- "@babel/runtime": "^7.3.1"
- }
- },
- "node_modules/i18next-browser-languagedetector": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-4.0.1.tgz",
- "integrity": "sha512-RxSoX6mB8cab0CTIQ+klCS764vYRj+Jk621cnFVsINvcdlb/cdi3vQFyrPwmnowB7ReUadjHovgZX+RPIzHVQQ==",
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "@babel/runtime": "^7.5.5"
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
}
},
- "node_modules/i18next-browser-languagedetector/node_modules/@babel/runtime": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.7.tgz",
- "integrity": "sha512-uCnC2JEVAu8AKB5do1WRIsvrdJ0flYx/A/9f/6chdacnEZ7LmavjdsDXr5ksYBegxtuTPR5Va9/+13QF/kFkCA==",
+ "node_modules/anymatch/node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
- "dependencies": {
- "regenerator-runtime": "^0.13.2"
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
}
},
- "node_modules/iconv-lite": {
- "version": "0.4.24",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
- "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "node_modules/archiver": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/archiver/-/archiver-7.0.1.tgz",
+ "integrity": "sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "safer-buffer": ">= 2.1.2 < 3"
+ "archiver-utils": "^5.0.2",
+ "async": "^3.2.4",
+ "buffer-crc32": "^1.0.0",
+ "readable-stream": "^4.0.0",
+ "readdir-glob": "^1.1.2",
+ "tar-stream": "^3.0.0",
+ "zip-stream": "^6.0.1"
},
"engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/ieee754": {
- "version": "1.1.13",
- "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
- "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==",
- "dev": true
- },
- "node_modules/ignore": {
- "version": "5.2.4",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
- "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
- "dev": true,
- "engines": {
- "node": ">= 4"
+ "node": ">= 14"
}
},
- "node_modules/ignore-walk": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.3.tgz",
- "integrity": "sha512-C7FfFoTA+bI10qfeydT8aZbvr91vAEU+2W5BZUlzPec47oNb07SsOfwYrtxuvOYdUApPP/Qlh4DtAO51Ekk2QA==",
+ "node_modules/archiver-utils": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-5.0.2.tgz",
+ "integrity": "sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "minimatch": "^9.0.0"
+ "glob": "^10.0.0",
+ "graceful-fs": "^4.2.0",
+ "is-stream": "^2.0.1",
+ "lazystream": "^1.0.0",
+ "lodash": "^4.17.15",
+ "normalize-path": "^3.0.0",
+ "readable-stream": "^4.0.0"
},
"engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ "node": ">= 14"
}
},
- "node_modules/ignore-walk/node_modules/brace-expansion": {
+ "node_modules/archiver-utils/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0"
}
},
- "node_modules/ignore-walk/node_modules/minimatch": {
- "version": "9.0.3",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
- "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
+ "node_modules/archiver-utils/node_modules/glob": {
+ "version": "10.4.5",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
+ "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "brace-expansion": "^2.0.1"
+ "foreground-child": "^3.1.0",
+ "jackspeak": "^3.1.2",
+ "minimatch": "^9.0.4",
+ "minipass": "^7.1.2",
+ "package-json-from-dist": "^1.0.0",
+ "path-scurry": "^1.11.1"
},
- "engines": {
- "node": ">=16 || 14 >=14.17"
+ "bin": {
+ "glob": "dist/esm/bin.mjs"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/import-fresh": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
- "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
- "dev": true,
- "dependencies": {
- "parent-module": "^1.0.0",
- "resolve-from": "^4.0.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/import-fresh/node_modules/resolve-from": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
- "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/import-lazy": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz",
- "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/import-local": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
- "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==",
+ "node_modules/archiver-utils/node_modules/is-stream": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
"dev": true,
- "dependencies": {
- "pkg-dir": "^4.2.0",
- "resolve-cwd": "^3.0.0"
- },
- "bin": {
- "import-local-fixture": "fixtures/cli.js"
- },
+ "license": "MIT",
"engines": {
"node": ">=8"
},
@@ -8584,322 +4013,408 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/import-local/node_modules/pkg-dir": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
- "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+ "node_modules/archiver-utils/node_modules/minimatch": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "find-up": "^4.0.0"
+ "brace-expansion": "^2.0.1"
},
"engines": {
- "node": ">=8"
- }
- },
- "node_modules/imurmurhash": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
- "dev": true,
- "engines": {
- "node": ">=0.8.19"
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/indent-string": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
- "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
+ "node_modules/are-docs-informative": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz",
+ "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==",
"dev": true,
- "dependencies": {
- "repeating": "^2.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=14"
}
},
- "node_modules/inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true,
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "node_modules/inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
- "dev": true
- },
- "node_modules/ini": {
- "version": "1.3.7",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz",
- "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==",
- "dev": true
+ "license": "Python-2.0"
},
- "node_modules/inline-source-map": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz",
- "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=",
+ "node_modules/aria-query": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
+ "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "source-map": "~0.5.3"
+ "dequal": "^2.0.3"
}
},
- "node_modules/inline-source-map/node_modules/source-map": {
- "version": "0.5.7",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
+ "node_modules/assertion-error": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
+ "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=12"
}
},
- "node_modules/inquirer": {
- "version": "7.3.3",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz",
- "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==",
+ "node_modules/ast-types": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz",
+ "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-escapes": "^4.2.1",
- "chalk": "^4.1.0",
- "cli-cursor": "^3.1.0",
- "cli-width": "^3.0.0",
- "external-editor": "^3.0.3",
- "figures": "^3.0.0",
- "lodash": "^4.17.19",
- "mute-stream": "0.0.8",
- "run-async": "^2.4.0",
- "rxjs": "^6.6.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0",
- "through": "^2.3.6"
+ "tslib": "^2.0.1"
},
"engines": {
- "node": ">=8.0.0"
+ "node": ">=4"
}
},
- "node_modules/inquirer-autosubmit-prompt": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/inquirer-autosubmit-prompt/-/inquirer-autosubmit-prompt-0.2.0.tgz",
- "integrity": "sha512-mzNrusCk5L6kSzlN0Ioddn8yzrhYNLli+Sn2ZxMuLechMYAzakiFCIULxsxlQb5YKzthLGfrFACcWoAvM7p04Q==",
+ "node_modules/async": {
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
+ "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
"dev": true,
- "dependencies": {
- "chalk": "^2.4.1",
- "inquirer": "^6.2.1",
- "rxjs": "^6.3.3"
- }
+ "license": "MIT"
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/ansi-escapes": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
- "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==",
+ "node_modules/b4a": {
+ "version": "1.6.7",
+ "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz",
+ "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==",
"dev": true,
- "engines": {
- "node": ">=4"
- }
+ "license": "Apache-2.0"
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/ansi-regex": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz",
- "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==",
+ "node_modules/bail": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz",
+ "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==",
"dev": true,
- "engines": {
- "node": ">=4"
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/cli-cursor": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
- "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==",
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/bare-events": {
+ "version": "2.5.4",
+ "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.4.tgz",
+ "integrity": "sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true
+ },
+ "node_modules/bare-fs": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.0.1.tgz",
+ "integrity": "sha512-ilQs4fm/l9eMfWY2dY0WCIUplSUp7U0CT1vrqMg1MUdeZl4fypu5UP0XcDBK5WBQPJAKP1b7XEodISmekH/CEg==",
"dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
"dependencies": {
- "restore-cursor": "^2.0.0"
+ "bare-events": "^2.0.0",
+ "bare-path": "^3.0.0",
+ "bare-stream": "^2.0.0"
},
"engines": {
- "node": ">=4"
+ "bare": ">=1.7.0"
}
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/cli-width": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz",
- "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==",
- "dev": true
+ "node_modules/bare-os": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.4.0.tgz",
+ "integrity": "sha512-9Ous7UlnKbe3fMi7Y+qh0DwAup6A1JkYgPnjvMDNOlmnxNRQvQ/7Nst+OnUQKzk0iAT0m9BisbDVp9gCv8+ETA==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "engines": {
+ "bare": ">=1.6.0"
+ }
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/figures": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
- "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==",
+ "node_modules/bare-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz",
+ "integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==",
"dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
"dependencies": {
- "escape-string-regexp": "^1.0.5"
- },
- "engines": {
- "node": ">=4"
+ "bare-os": "^3.0.1"
}
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/inquirer": {
- "version": "6.5.2",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz",
- "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==",
+ "node_modules/bare-stream": {
+ "version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.6.4.tgz",
+ "integrity": "sha512-G6i3A74FjNq4nVrrSTUz5h3vgXzBJnjmWAVlBWaZETkgu+LgKd7AiyOml3EDJY1AHlIbBHKDXE+TUT53Ff8OaA==",
"dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
"dependencies": {
- "ansi-escapes": "^3.2.0",
- "chalk": "^2.4.2",
- "cli-cursor": "^2.1.0",
- "cli-width": "^2.0.0",
- "external-editor": "^3.0.3",
- "figures": "^2.0.0",
- "lodash": "^4.17.12",
- "mute-stream": "0.0.7",
- "run-async": "^2.2.0",
- "rxjs": "^6.4.0",
- "string-width": "^2.1.0",
- "strip-ansi": "^5.1.0",
- "through": "^2.3.6"
+ "streamx": "^2.21.0"
},
- "engines": {
- "node": ">=6.0.0"
+ "peerDependencies": {
+ "bare-buffer": "*",
+ "bare-events": "*"
+ },
+ "peerDependenciesMeta": {
+ "bare-buffer": {
+ "optional": true
+ },
+ "bare-events": {
+ "optional": true
+ }
}
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==",
+ "node_modules/base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "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/basic-ftp": {
+ "version": "5.0.5",
+ "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz",
+ "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=4"
+ "node": ">=10.0.0"
}
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/mimic-fn": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
- "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
+ "node_modules/binary-extensions": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
+ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=4"
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/mute-stream": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
- "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==",
- "dev": true
+ "node_modules/boolbase": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
+ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
+ "dev": true,
+ "license": "ISC"
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/onetime": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
- "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==",
+ "node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "mimic-fn": "^1.0.0"
- },
- "engines": {
- "node": ">=4"
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
}
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/restore-cursor": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
- "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==",
+ "node_modules/braces": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "onetime": "^2.0.0",
- "signal-exit": "^3.0.2"
+ "fill-range": "^7.1.1"
},
"engines": {
- "node": ">=4"
+ "node": ">=8"
}
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/rxjs": {
- "version": "6.6.7",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
- "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
+ "node_modules/browserslist": {
+ "version": "4.24.4",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz",
+ "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==",
"dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "tslib": "^1.9.0"
+ "caniuse-lite": "^1.0.30001688",
+ "electron-to-chromium": "^1.5.73",
+ "node-releases": "^2.0.19",
+ "update-browserslist-db": "^1.1.1"
+ },
+ "bin": {
+ "browserslist": "cli.js"
},
"engines": {
- "npm": ">=2.0.0"
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
}
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/string-width": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
- "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+ "node_modules/buffer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
"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",
"dependencies": {
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^4.0.0"
- },
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ },
+ "node_modules/buffer-crc32": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-1.0.0.tgz",
+ "integrity": "sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==",
+ "dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=4"
+ "node": ">=8.0.0"
}
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/string-width/node_modules/strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==",
+ "node_modules/buffer-from": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true,
- "dependencies": {
- "ansi-regex": "^3.0.0"
- },
+ "license": "MIT"
+ },
+ "node_modules/cac": {
+ "version": "6.7.14",
+ "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
+ "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",
+ "dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=4"
+ "node": ">=8"
}
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "node_modules/callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
"dev": true,
- "dependencies": {
- "ansi-regex": "^4.1.0"
- },
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
- "node_modules/inquirer-autosubmit-prompt/node_modules/strip-ansi/node_modules/ansi-regex": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
- "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
+ "node_modules/camelcase": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
- "node_modules/inquirer/node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001696",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001696.tgz",
+ "integrity": "sha512-pDCPkvzfa39ehJtJ+OwGT/2yvT2SbjfHhiIW2LWOAcMQ7BzwxT/XuyUp4OTOd0XFWA6BKw0JalnBHgSi5DGJBQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "CC-BY-4.0"
+ },
+ "node_modules/ccount": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz",
+ "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==",
"dev": true,
- "engines": {
- "node": ">=8"
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/inquirer/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "node_modules/chai": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz",
+ "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-convert": "^2.0.1"
+ "assertion-error": "^2.0.1",
+ "check-error": "^2.1.1",
+ "deep-eql": "^5.0.1",
+ "loupe": "^3.1.0",
+ "pathval": "^2.0.0"
},
"engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ "node": ">=12"
}
},
- "node_modules/inquirer/node_modules/chalk": {
+ "node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
@@ -8911,3605 +4426,3933 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
- "node_modules/inquirer/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "node_modules/character-entities": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz",
+ "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==",
"dev": true,
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/inquirer/node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
+ "node_modules/character-entities-html4": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz",
+ "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
},
- "node_modules/inquirer/node_modules/figures": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
- "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
+ "node_modules/character-entities-legacy": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz",
+ "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==",
"dev": true,
- "dependencies": {
- "escape-string-regexp": "^1.0.5"
- },
- "engines": {
- "node": ">=8"
- },
+ "license": "MIT",
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/inquirer/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "node_modules/chardet": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
+ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/check-error": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz",
+ "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">= 16"
}
},
- "node_modules/inquirer/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "node_modules/cheerio": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz",
+ "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "cheerio-select": "^2.1.0",
+ "dom-serializer": "^2.0.0",
+ "domhandler": "^5.0.3",
+ "domutils": "^3.1.0",
+ "encoding-sniffer": "^0.2.0",
+ "htmlparser2": "^9.1.0",
+ "parse5": "^7.1.2",
+ "parse5-htmlparser2-tree-adapter": "^7.0.0",
+ "parse5-parser-stream": "^7.1.2",
+ "undici": "^6.19.5",
+ "whatwg-mimetype": "^4.0.0"
+ },
"engines": {
- "node": ">=8"
+ "node": ">=18.17"
+ },
+ "funding": {
+ "url": "https://github.com/cheeriojs/cheerio?sponsor=1"
}
},
- "node_modules/inquirer/node_modules/rxjs": {
- "version": "6.6.7",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
- "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
+ "node_modules/cheerio-select": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz",
+ "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
- "tslib": "^1.9.0"
+ "boolbase": "^1.0.0",
+ "css-select": "^5.1.0",
+ "css-what": "^6.1.0",
+ "domelementtype": "^2.3.0",
+ "domhandler": "^5.0.3",
+ "domutils": "^3.0.1"
},
- "engines": {
- "npm": ">=2.0.0"
+ "funding": {
+ "url": "https://github.com/sponsors/fb55"
}
},
- "node_modules/inquirer/node_modules/string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "node_modules/cheerio/node_modules/parse5": {
+ "version": "7.2.1",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz",
+ "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
+ "entities": "^4.5.0"
},
- "engines": {
- "node": ">=8"
+ "funding": {
+ "url": "https://github.com/inikulin/parse5?sponsor=1"
}
},
- "node_modules/inquirer/node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "node_modules/chokidar": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
+ "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^5.0.1"
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
},
"engines": {
- "node": ">=8"
+ "node": ">= 8.10.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
}
},
- "node_modules/inquirer/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "node_modules/ci-info": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
+ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/cli-cursor": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
+ "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "has-flag": "^4.0.0"
+ "restore-cursor": "^3.1.0"
},
"engines": {
"node": ">=8"
}
},
- "node_modules/insert-module-globals": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz",
- "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==",
+ "node_modules/cli-truncate": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz",
+ "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "acorn-node": "^1.5.2",
- "combine-source-map": "^0.8.0",
- "concat-stream": "^1.6.1",
- "is-buffer": "^1.1.0",
- "JSONStream": "^1.0.3",
- "path-is-absolute": "^1.0.1",
- "process": "~0.11.0",
- "through2": "^2.0.0",
- "undeclared-identifiers": "^1.1.2",
- "xtend": "^4.0.0"
+ "slice-ansi": "^5.0.0",
+ "string-width": "^7.0.0"
},
- "bin": {
- "insert-module-globals": "bin/cmd.js"
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/insert-module-globals/node_modules/concat-stream": {
- "version": "1.6.2",
- "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
- "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
+ "node_modules/cli-truncate/node_modules/ansi-regex": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
+ "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
"dev": true,
- "engines": [
- "node >= 0.8"
- ],
- "dependencies": {
- "buffer-from": "^1.0.0",
- "inherits": "^2.0.3",
- "readable-stream": "^2.2.2",
- "typedarray": "^0.0.6"
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
}
},
- "node_modules/interpret": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz",
- "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=",
- "dev": true
+ "node_modules/cli-truncate/node_modules/emoji-regex": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz",
+ "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/invariant": {
- "version": "2.2.4",
- "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
- "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
+ "node_modules/cli-truncate/node_modules/string-width": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
+ "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "loose-envify": "^1.0.0"
+ "emoji-regex": "^10.3.0",
+ "get-east-asian-width": "^1.0.0",
+ "strip-ansi": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/ipaddr.js": {
- "version": "1.9.1",
- "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
- "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "node_modules/cli-truncate/node_modules/strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^6.0.1"
+ },
"engines": {
- "node": ">= 0.10"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
- "node_modules/is-absolute": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
- "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
+ "node_modules/cli-width": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz",
+ "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==",
"dev": true,
- "dependencies": {
- "is-relative": "^1.0.0",
- "is-windows": "^1.0.1"
- },
+ "license": "ISC",
"engines": {
- "node": ">=0.10.0"
+ "node": ">= 10"
}
},
- "node_modules/is-arrayish": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
- "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
- "dev": true
+ "node_modules/cliui": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
+ "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^6.2.0"
+ }
},
- "node_modules/is-binary-path": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
- "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "node_modules/cliui/node_modules/wrap-ansi": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+ "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "binary-extensions": "^2.0.0"
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=8"
}
},
- "node_modules/is-buffer": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
- "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
- "dev": true
- },
- "node_modules/is-builtin-module": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
- "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "builtin-modules": "^1.0.0"
+ "color-name": "~1.1.4"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=7.0.0"
}
},
- "node_modules/is-ci": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz",
- "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==",
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
- "dependencies": {
- "ci-info": "^3.2.0"
- },
- "bin": {
- "is-ci": "bin.js"
- }
+ "license": "MIT"
},
- "node_modules/is-ci/node_modules/ci-info": {
- "version": "3.8.0",
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz",
- "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==",
+ "node_modules/colorette": {
+ "version": "2.0.20",
+ "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
+ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==",
"dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/sibiraj-s"
- }
- ],
- "engines": {
- "node": ">=8"
- }
+ "license": "MIT"
},
- "node_modules/is-core-module": {
- "version": "2.9.0",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz",
- "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==",
+ "node_modules/colorjs.io": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/colorjs.io/-/colorjs.io-0.5.2.tgz",
+ "integrity": "sha512-twmVoizEW7ylZSN32OgKdXRmo1qg+wT5/6C3xu5b9QsWzSFAhHLn2xd8ro0diCsKfCj1RdaTP/nrcW+vAoQPIw==",
+ "license": "MIT"
+ },
+ "node_modules/comma-separated-tokens": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz",
+ "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==",
"dev": true,
- "dependencies": {
- "has": "^1.0.3"
- },
+ "license": "MIT",
"funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/is-docker": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.0.0.tgz",
- "integrity": "sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ==",
+ "node_modules/commander": {
+ "version": "13.1.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz",
+ "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=18"
}
},
- "node_modules/is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+ "node_modules/comment-parser": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz",
+ "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">= 12.0.0"
}
},
- "node_modules/is-finite": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
- "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
+ "node_modules/commondir": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/compare-versions": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz",
+ "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/compress-commons": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-6.0.2.tgz",
+ "integrity": "sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "number-is-nan": "^1.0.0"
+ "crc-32": "^1.2.0",
+ "crc32-stream": "^6.0.0",
+ "is-stream": "^2.0.1",
+ "normalize-path": "^3.0.0",
+ "readable-stream": "^4.0.0"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">= 14"
}
},
- "node_modules/is-fullwidth-code-point": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "node_modules/compress-commons/node_modules/is-stream": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
"dev": true,
- "dependencies": {
- "number-is-nan": "^1.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/is-glob": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true,
- "dependencies": {
- "is-extglob": "^2.1.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
+ "license": "MIT"
},
- "node_modules/is-inside-container": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz",
- "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==",
+ "node_modules/concurrently": {
+ "version": "8.2.2",
+ "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.2.tgz",
+ "integrity": "sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "is-docker": "^3.0.0"
+ "chalk": "^4.1.2",
+ "date-fns": "^2.30.0",
+ "lodash": "^4.17.21",
+ "rxjs": "^7.8.1",
+ "shell-quote": "^1.8.1",
+ "spawn-command": "0.0.2",
+ "supports-color": "^8.1.1",
+ "tree-kill": "^1.2.2",
+ "yargs": "^17.7.2"
},
"bin": {
- "is-inside-container": "cli.js"
+ "conc": "dist/bin/concurrently.js",
+ "concurrently": "dist/bin/concurrently.js"
},
"engines": {
- "node": ">=14.16"
+ "node": "^14.13.0 || >=16.0.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "url": "https://github.com/open-cli-tools/concurrently?sponsor=1"
}
},
- "node_modules/is-inside-container/node_modules/is-docker": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",
- "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==",
+ "node_modules/concurrently/node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
"dev": true,
- "bin": {
- "is-docker": "cli.js"
+ "license": "ISC",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
},
"engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">=12"
}
},
- "node_modules/is-installed-globally": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz",
- "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==",
+ "node_modules/concurrently/node_modules/supports-color": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "global-dirs": "^3.0.0",
- "is-path-inside": "^3.0.2"
+ "has-flag": "^4.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/is-installed-globally/node_modules/is-path-inside": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
- "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
}
},
- "node_modules/is-interactive": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz",
- "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==",
+ "node_modules/concurrently/node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
"engines": {
- "node": ">=12"
+ "node": ">=10"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
- "node_modules/is-name-taken": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-name-taken/-/is-name-taken-2.0.0.tgz",
- "integrity": "sha512-W+FUWF5g7ONVJTx3rldZeVizmPzrMMUdscpSQ96vyYerx+4b2NcqaujLJJDWruGzE0FjzGZO9RFIipOGxx/WIw==",
+ "node_modules/concurrently/node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
"dev": true,
- "dependencies": {
- "all-package-names": "^2.0.2",
- "package-name-conflict": "^1.0.3",
- "validate-npm-package-name": "^3.0.0"
+ "license": "ISC",
+ "engines": {
+ "node": ">=10"
}
},
- "node_modules/is-npm": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz",
- "integrity": "sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==",
+ "node_modules/concurrently/node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
"dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ "license": "MIT",
+ "dependencies": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "node_modules/concurrently/node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
"dev": true,
+ "license": "ISC",
"engines": {
- "node": ">=0.12.0"
+ "node": ">=12"
}
},
- "node_modules/is-number-like": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/is-number-like/-/is-number-like-1.0.8.tgz",
- "integrity": "sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA==",
+ "node_modules/convert-source-map": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
"dev": true,
- "dependencies": {
- "lodash.isfinite": "^3.3.2"
- }
+ "license": "MIT"
},
- "node_modules/is-obj": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
- "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
+ "node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">= 0.6"
}
},
- "node_modules/is-observable": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz",
- "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==",
+ "node_modules/core-util-is": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/cosmiconfig": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",
+ "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "symbol-observable": "^1.1.0"
+ "@types/parse-json": "^4.0.0",
+ "import-fresh": "^3.2.1",
+ "parse-json": "^5.0.0",
+ "path-type": "^4.0.0",
+ "yaml": "^1.10.0"
},
"engines": {
- "node": ">=4"
+ "node": ">=10"
}
},
- "node_modules/is-observable/node_modules/symbol-observable": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz",
- "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==",
+ "node_modules/crc-32": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
+ "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==",
"dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "crc32": "bin/crc32.njs"
+ },
"engines": {
- "node": ">=0.10.0"
+ "node": ">=0.8"
}
},
- "node_modules/is-path-cwd": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-3.0.0.tgz",
- "integrity": "sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA==",
+ "node_modules/crc32-stream": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-6.0.0.tgz",
+ "integrity": "sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==",
"dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ "license": "MIT",
+ "dependencies": {
+ "crc-32": "^1.2.0",
+ "readable-stream": "^4.0.0"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/is-path-inside": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz",
- "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==",
- "dev": true,
"engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">= 14"
}
},
- "node_modules/is-plain-obj": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
- "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==",
+ "node_modules/cross-spawn": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
"engines": {
- "node": ">=0.10.0"
+ "node": ">= 8"
}
},
- "node_modules/is-plain-object": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
- "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "node_modules/css-select": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz",
+ "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
- "isobject": "^3.0.1"
+ "boolbase": "^1.0.0",
+ "css-what": "^6.1.0",
+ "domhandler": "^5.0.2",
+ "domutils": "^3.0.1",
+ "nth-check": "^2.0.1"
},
- "engines": {
- "node": ">=0.10.0"
+ "funding": {
+ "url": "https://github.com/sponsors/fb55"
}
},
- "node_modules/is-promise": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
- "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
+ "node_modules/css-shorthand-properties": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/css-shorthand-properties/-/css-shorthand-properties-1.1.2.tgz",
+ "integrity": "sha512-C2AugXIpRGQTxaCW0N7n5jD/p5irUmCrwl03TrnMFBHDbdq44CFWR2zO7rK9xPN4Eo3pUxC4vQzQgbIpzrD1PQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/css-value": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/css-value/-/css-value-0.0.1.tgz",
+ "integrity": "sha512-FUV3xaJ63buRLgHrLQVlVgQnQdR4yqdLGaDu7g8CQcWjInDfM9plBTPI9FRfpahju1UBSaMckeb2/46ApS/V1Q==",
"dev": true
},
- "node_modules/is-regexp": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz",
- "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=",
+ "node_modules/css-what": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz",
+ "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==",
"dev": true,
+ "license": "BSD-2-Clause",
"engines": {
- "node": ">=0.10.0"
+ "node": ">= 6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/fb55"
}
},
- "node_modules/is-relative": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
- "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
+ "node_modules/data-uri-to-buffer": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz",
+ "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==",
"dev": true,
- "dependencies": {
- "is-unc-path": "^1.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">= 14"
}
},
- "node_modules/is-scoped": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-scoped/-/is-scoped-3.0.0.tgz",
- "integrity": "sha512-ezxLUq30kiTvP0w/5n9tj4qTOKlrA07Oty1hwTQ+lcqw11x6uc8sp7VRb2OVGRzKfCHZ2A22T5Zsau/Q2Akb0g==",
+ "node_modules/date-fns": {
+ "version": "2.30.0",
+ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
+ "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "scoped-regex": "^3.0.0"
+ "@babel/runtime": "^7.21.0"
},
"engines": {
- "node": ">=12"
+ "node": ">=0.11"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/date-fns"
}
},
- "node_modules/is-stream": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
- "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
+ "node_modules/de-indent": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
+ "integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==",
"dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-typedarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==",
- "dev": true
+ "license": "MIT",
+ "optional": true
},
- "node_modules/is-unc-path": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
- "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
+ "node_modules/debug": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
+ "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "unc-path-regex": "^0.1.2"
+ "ms": "^2.1.3"
},
"engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-unicode-supported": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",
- "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",
- "dev": true,
- "engines": {
- "node": ">=10"
+ "node": ">=6.0"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
}
},
- "node_modules/is-url-superb": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/is-url-superb/-/is-url-superb-6.1.0.tgz",
- "integrity": "sha512-LXdhGlYqUPdvEyIhWPEEwYYK3yrUiPcBjmFGlZNv1u5GtIL5qQRf7ddDyPNAvsMFqdzS923FROpTQU97tLe3JQ==",
+ "node_modules/decamelize": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz",
+ "integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=12"
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/is-windows": {
+ "node_modules/decode-named-character-reference": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
- "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-wsl": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
- "integrity": "sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==",
+ "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz",
+ "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==",
"dev": true,
- "engines": {
- "node": ">=4"
+ "license": "MIT",
+ "dependencies": {
+ "character-entities": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/is-yarn-global": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.4.1.tgz",
- "integrity": "sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ==",
+ "node_modules/deep-eql": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz",
+ "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=12"
+ "node": ">=6"
}
},
- "node_modules/isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
- },
- "node_modules/isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
- "dev": true
+ "node_modules/deep-is": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/isobject": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
- "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+ "node_modules/deepmerge": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
+ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
- "node_modules/issue-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/issue-regex/-/issue-regex-4.1.0.tgz",
- "integrity": "sha512-X3HBmm7+Th+l4/kMtqwcHHgELD0Lfl0Ina6S3+grr+mKmTxsrM84NAO1UuRPIxIbGLIl3TCEu45S1kdu21HYbQ==",
+ "node_modules/deepmerge-ts": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.4.tgz",
+ "integrity": "sha512-fxqo6nHGQ9zOVgI4KXqtWXJR/yCLtC7aXIVq+6jc8tHPFUxlFmuUcm2kC4vztQ+LJxQ3gER/XAWearGYQ8niGA==",
"dev": true,
+ "license": "BSD-3-Clause",
"engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">=16.0.0"
}
},
- "node_modules/istanbul-lib-coverage": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz",
- "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==",
+ "node_modules/define-lazy-prop": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
+ "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=6"
+ "node": ">=8"
}
},
- "node_modules/istanbul-lib-hook": {
- "version": "2.0.7",
- "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz",
- "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==",
+ "node_modules/degenerator": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz",
+ "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "append-transform": "^1.0.0"
+ "ast-types": "^0.13.4",
+ "escodegen": "^2.1.0",
+ "esprima": "^4.0.1"
},
"engines": {
- "node": ">=6"
+ "node": ">= 14"
}
},
- "node_modules/istanbul-lib-instrument": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz",
- "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==",
+ "node_modules/dequal": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
+ "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
"dev": true,
- "dependencies": {
- "@babel/generator": "^7.4.0",
- "@babel/parser": "^7.4.3",
- "@babel/template": "^7.4.0",
- "@babel/traverse": "^7.4.3",
- "@babel/types": "^7.4.0",
- "istanbul-lib-coverage": "^2.0.5",
- "semver": "^6.0.0"
- },
+ "license": "MIT",
"engines": {
"node": ">=6"
}
},
- "node_modules/istanbul-lib-instrument/node_modules/semver": {
- "version": "6.1.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.1.1.tgz",
- "integrity": "sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ==",
+ "node_modules/devlop": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz",
+ "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==",
"dev": true,
- "bin": {
- "semver": "bin/semver"
+ "license": "MIT",
+ "dependencies": {
+ "dequal": "^2.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/istanbul-lib-report": {
- "version": "2.0.8",
- "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz",
- "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==",
+ "node_modules/didyoumean": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
+ "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",
"dev": true,
- "dependencies": {
- "istanbul-lib-coverage": "^2.0.5",
- "make-dir": "^2.1.0",
- "supports-color": "^6.1.0"
- },
+ "license": "Apache-2.0"
+ },
+ "node_modules/diff": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz",
+ "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==",
+ "dev": true,
+ "license": "BSD-3-Clause",
"engines": {
- "node": ">=6"
+ "node": ">=0.3.1"
}
},
- "node_modules/istanbul-lib-report/node_modules/make-dir": {
+ "node_modules/doctrine-temporary-fork": {
"version": "2.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
- "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
+ "resolved": "https://registry.npmjs.org/doctrine-temporary-fork/-/doctrine-temporary-fork-2.1.0.tgz",
+ "integrity": "sha512-nliqOv5NkE4zMON4UA6AMJE6As35afs8aYXATpU4pTUdIKiARZwrJVEP1boA3Rx1ZXHVkwxkhcq4VkqvsuRLsA==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "pify": "^4.0.1",
- "semver": "^5.6.0"
+ "esutils": "^2.0.2"
},
"engines": {
- "node": ">=6"
- }
- },
- "node_modules/istanbul-lib-report/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true,
- "bin": {
- "semver": "bin/semver"
+ "node": ">=0.10.0"
}
},
- "node_modules/istanbul-lib-report/node_modules/supports-color": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
- "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
+ "node_modules/documentation": {
+ "version": "14.0.3",
+ "resolved": "https://registry.npmjs.org/documentation/-/documentation-14.0.3.tgz",
+ "integrity": "sha512-B7cAviVKN9Rw7Ofd+9grhVuxiHwly6Ieh+d/ceMw8UdBOv/irkuwnDEJP8tq0wgdLJDUVuIkovV+AX9mTrZFxg==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "has-flag": "^3.0.0"
+ "@babel/core": "^7.18.10",
+ "@babel/generator": "^7.18.10",
+ "@babel/parser": "^7.18.11",
+ "@babel/traverse": "^7.18.11",
+ "@babel/types": "^7.18.10",
+ "chalk": "^5.0.1",
+ "chokidar": "^3.5.3",
+ "diff": "^5.1.0",
+ "doctrine-temporary-fork": "2.1.0",
+ "git-url-parse": "^13.1.0",
+ "github-slugger": "1.4.0",
+ "glob": "^8.0.3",
+ "globals-docs": "^2.4.1",
+ "highlight.js": "^11.6.0",
+ "ini": "^3.0.0",
+ "js-yaml": "^4.1.0",
+ "konan": "^2.1.1",
+ "lodash": "^4.17.21",
+ "mdast-util-find-and-replace": "^2.2.1",
+ "mdast-util-inject": "^1.1.0",
+ "micromark-util-character": "^1.1.0",
+ "parse-filepath": "^1.0.2",
+ "pify": "^6.0.0",
+ "read-pkg-up": "^9.1.0",
+ "remark": "^14.0.2",
+ "remark-gfm": "^3.0.1",
+ "remark-html": "^15.0.1",
+ "remark-reference-links": "^6.0.1",
+ "remark-toc": "^8.0.1",
+ "resolve": "^1.22.1",
+ "strip-json-comments": "^5.0.0",
+ "unist-builder": "^3.0.0",
+ "unist-util-visit": "^4.1.0",
+ "vfile": "^5.3.4",
+ "vfile-reporter": "^7.0.4",
+ "vfile-sort": "^3.0.0",
+ "yargs": "^17.5.1"
+ },
+ "bin": {
+ "documentation": "bin/documentation.js"
},
"engines": {
- "node": ">=6"
+ "node": ">=14"
+ },
+ "optionalDependencies": {
+ "@vue/compiler-sfc": "^3.2.37",
+ "vue-template-compiler": "^2.7.8"
}
},
- "node_modules/istanbul-lib-source-maps": {
- "version": "3.0.6",
- "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz",
- "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==",
+ "node_modules/documentation/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "debug": "^4.1.1",
- "istanbul-lib-coverage": "^2.0.5",
- "make-dir": "^2.1.0",
- "rimraf": "^2.6.3",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=6"
+ "balanced-match": "^1.0.0"
}
},
- "node_modules/istanbul-lib-source-maps/node_modules/debug": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
- "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
- "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
+ "node_modules/documentation/node_modules/chalk": {
+ "version": "5.4.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz",
+ "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==",
"dev": true,
- "dependencies": {
- "ms": "^2.1.1"
+ "license": "MIT",
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
}
},
- "node_modules/istanbul-lib-source-maps/node_modules/make-dir": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
- "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
+ "node_modules/documentation/node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "pify": "^4.0.1",
- "semver": "^5.6.0"
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
},
"engines": {
- "node": ">=6"
+ "node": ">=12"
}
},
- "node_modules/istanbul-lib-source-maps/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/istanbul-lib-source-maps/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "node_modules/documentation/node_modules/glob": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
+ "deprecated": "Glob versions prior to v9 are no longer supported",
"dev": true,
- "bin": {
- "semver": "bin/semver"
+ "license": "ISC",
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^5.0.1",
+ "once": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/istanbul-reports": {
- "version": "2.2.7",
- "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz",
- "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==",
+ "node_modules/documentation/node_modules/minimatch": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "html-escaper": "^2.0.0"
+ "brace-expansion": "^2.0.1"
},
"engines": {
- "node": ">=6"
+ "node": ">=10"
}
},
- "node_modules/jest-get-type": {
- "version": "21.2.0",
- "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-21.2.0.tgz",
- "integrity": "sha512-y2fFw3C+D0yjNSDp7ab1kcd6NUYfy3waPTlD8yWkAtiocJdBRQqNoRqVfMNxgj+IjT0V5cBIHJO0z9vuSSZ43Q==",
- "dev": true
- },
- "node_modules/jest-validate": {
- "version": "21.2.1",
- "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-21.2.1.tgz",
- "integrity": "sha512-k4HLI1rZQjlU+EC682RlQ6oZvLrE5SCh3brseQc24vbZTxzT/k/3urar5QMCVgjadmSO7lECeGdc6YxnM3yEGg==",
+ "node_modules/documentation/node_modules/pify": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-6.1.0.tgz",
+ "integrity": "sha512-KocF8ve28eFjjuBKKGvzOBGzG8ew2OqOOSxTTZhirkzH7h3BI1vyzqlR0qbfcDBve1Yzo3FVlWUAtCRrbVN8Fw==",
"dev": true,
- "dependencies": {
- "chalk": "^2.0.1",
- "jest-get-type": "^21.2.0",
- "leven": "^2.1.0",
- "pretty-format": "^21.2.1"
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/js-sdsl": {
- "version": "4.1.4",
- "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz",
- "integrity": "sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw==",
- "dev": true
- },
- "node_modules/js-tokens": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
- "dev": true
- },
- "node_modules/js-yaml": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
- "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
+ "node_modules/documentation/node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "argparse": "^1.0.7",
- "esprima": "^4.0.0"
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
},
- "bin": {
- "js-yaml": "bin/js-yaml.js"
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
- "node_modules/jsesc": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
- "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
+ "node_modules/documentation/node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
"dev": true,
- "bin": {
- "jsesc": "bin/jsesc"
- },
+ "license": "ISC",
"engines": {
- "node": ">=4"
+ "node": ">=10"
}
},
- "node_modules/json-buffer": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
- "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
- "dev": true
- },
- "node_modules/json-fixer": {
- "version": "1.6.5",
- "resolved": "https://registry.npmjs.org/json-fixer/-/json-fixer-1.6.5.tgz",
- "integrity": "sha512-ewOhCI/b7Wx0DtO7ZhDp4SW5sjvp5dBWoeGnjta7mXPrvopvcE6TYGIqo+XREhzr/hKz7Bf3e2C0TSuoGFxAYA==",
+ "node_modules/documentation/node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.11.2",
- "chalk": "^4.1.0",
- "pegjs": "^0.10.0"
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
},
"engines": {
- "node": ">=10"
+ "node": ">=12"
}
},
- "node_modules/json-fixer/node_modules/@babel/runtime": {
- "version": "7.11.2",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz",
- "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==",
+ "node_modules/documentation/node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
"dev": true,
- "dependencies": {
- "regenerator-runtime": "^0.13.4"
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/json-fixer/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "node_modules/dom-accessibility-api": {
+ "version": "0.5.16",
+ "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz",
+ "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/dom-serializer": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
+ "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
+ "domelementtype": "^2.3.0",
+ "domhandler": "^5.0.2",
+ "entities": "^4.2.0"
},
"funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
}
},
- "node_modules/json-fixer/node_modules/chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "node_modules/domelementtype": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
+ "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
"dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fb55"
+ }
+ ],
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/domhandler": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
+ "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
+ "dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
+ "domelementtype": "^2.3.0"
},
"engines": {
- "node": ">=10"
+ "node": ">= 4"
},
"funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
+ "url": "https://github.com/fb55/domhandler?sponsor=1"
}
},
- "node_modules/json-fixer/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "node_modules/domutils": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz",
+ "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
- "color-name": "~1.1.4"
+ "dom-serializer": "^2.0.0",
+ "domelementtype": "^2.3.0",
+ "domhandler": "^5.0.3"
},
- "engines": {
- "node": ">=7.0.0"
+ "funding": {
+ "url": "https://github.com/fb55/domutils?sponsor=1"
}
},
- "node_modules/json-fixer/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "node_modules/eastasianwidth": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
+ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
"dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/json-fixer/node_modules/regenerator-runtime": {
- "version": "0.13.7",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
- "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==",
- "dev": true
+ "license": "MIT"
},
- "node_modules/json-fixer/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "node_modules/edge-paths": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/edge-paths/-/edge-paths-3.0.5.tgz",
+ "integrity": "sha512-sB7vSrDnFa4ezWQk9nZ/n0FdpdUuC6R1EOrlU3DL+bovcNFK28rqu2emmAUjujYEJTWIgQGqgVVWUZXMnc8iWg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "has-flag": "^4.0.0"
+ "@types/which": "^2.0.1",
+ "which": "^2.0.2"
},
"engines": {
- "node": ">=8"
+ "node": ">=14.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/shirshak55"
}
},
- "node_modules/json-parse-better-errors": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
- "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
- "dev": true
- },
- "node_modules/json-parse-even-better-errors": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
- "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
- "dev": true
- },
- "node_modules/json-schema-traverse": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
- "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
- "dev": true
- },
- "node_modules/json-stable-stringify": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz",
- "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=",
+ "node_modules/edgedriver": {
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-6.1.1.tgz",
+ "integrity": "sha512-/dM/PoBf22Xg3yypMWkmRQrBKEnSyNaZ7wHGCT9+qqT14izwtFT+QvdR89rjNkMfXwW+bSFoqOfbcvM+2Cyc7w==",
"dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
"dependencies": {
- "jsonify": "~0.0.0"
+ "@wdio/logger": "^9.1.3",
+ "@zip.js/zip.js": "^2.7.53",
+ "decamelize": "^6.0.0",
+ "edge-paths": "^3.0.5",
+ "fast-xml-parser": "^4.5.0",
+ "http-proxy-agent": "^7.0.2",
+ "https-proxy-agent": "^7.0.5",
+ "node-fetch": "^3.3.2",
+ "which": "^5.0.0"
+ },
+ "bin": {
+ "edgedriver": "bin/edgedriver.js"
+ },
+ "engines": {
+ "node": ">=18.0.0"
}
},
- "node_modules/json-stable-stringify-without-jsonify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
- "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
- "dev": true
- },
- "node_modules/json-stringify-safe": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
- "dev": true
- },
- "node_modules/json5": {
- "version": "2.2.3",
- "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
- "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+ "node_modules/edgedriver/node_modules/data-uri-to-buffer": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
+ "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
"dev": true,
- "bin": {
- "json5": "lib/cli.js"
- },
+ "license": "MIT",
"engines": {
- "node": ">=6"
+ "node": ">= 12"
}
},
- "node_modules/jsonify": {
- "version": "0.0.0",
- "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
- "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
+ "node_modules/edgedriver/node_modules/isexe": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz",
+ "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==",
"dev": true,
+ "license": "ISC",
"engines": {
- "node": "*"
+ "node": ">=16"
}
},
- "node_modules/jsonparse": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
- "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=",
+ "node_modules/edgedriver/node_modules/node-fetch": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
+ "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
"dev": true,
- "engines": [
- "node >= 0.2.0"
- ]
+ "license": "MIT",
+ "dependencies": {
+ "data-uri-to-buffer": "^4.0.0",
+ "fetch-blob": "^3.1.4",
+ "formdata-polyfill": "^4.0.10"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/node-fetch"
+ }
},
- "node_modules/JSONStream": {
- "version": "1.3.5",
- "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
- "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==",
+ "node_modules/edgedriver/node_modules/which": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz",
+ "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "jsonparse": "^1.2.0",
- "through": ">=2.2.7 <3"
+ "isexe": "^3.1.1"
},
"bin": {
- "JSONStream": "bin.js"
+ "node-which": "bin/which.js"
},
"engines": {
- "node": "*"
+ "node": "^18.17.0 || >=20.5.0"
}
},
- "node_modules/key-list": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/key-list/-/key-list-0.1.4.tgz",
- "integrity": "sha512-DMGLZAmEoKRUHPlc772EW0i92P/WY12/oWYc2pQZb5MVGOSjYmF0BEQXbOLjbou1+/PqZ+CivwfyjaUwmyl4CQ==",
- "dev": true
+ "node_modules/electron-to-chromium": {
+ "version": "1.5.90",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.90.tgz",
+ "integrity": "sha512-C3PN4aydfW91Natdyd449Kw+BzhLmof6tzy5W1pFC5SpQxVXT+oyiyOG9AgYYSN9OdA/ik3YkCrpwqI8ug5Tug==",
+ "dev": true,
+ "license": "ISC"
},
- "node_modules/keyv": {
- "version": "4.5.2",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz",
- "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==",
+ "node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/encoding-sniffer": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz",
+ "integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "json-buffer": "3.0.1"
+ "iconv-lite": "^0.6.3",
+ "whatwg-encoding": "^3.1.1"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/encoding-sniffer?sponsor=1"
}
},
- "node_modules/kind-of": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
- "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+ "node_modules/encoding-sniffer/node_modules/iconv-lite": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
"engines": {
"node": ">=0.10.0"
}
},
- "node_modules/labeled-stream-splicer": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz",
- "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==",
+ "node_modules/end-of-stream": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "inherits": "^2.0.1",
- "stream-splicer": "^2.0.0"
+ "once": "^1.4.0"
}
},
- "node_modules/latest-version": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz",
- "integrity": "sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==",
+ "node_modules/entities": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
+ "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
"dev": true,
- "dependencies": {
- "package-json": "^8.1.0"
- },
+ "license": "BSD-2-Clause",
"engines": {
- "node": ">=14.16"
+ "node": ">=0.12"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "url": "https://github.com/fb55/entities?sponsor=1"
}
},
- "node_modules/leven": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz",
- "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=",
+ "node_modules/environment": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz",
+ "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/levenary": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz",
- "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==",
+ "node_modules/error-ex": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "leven": "^3.1.0"
- },
- "engines": {
- "node": ">= 6"
+ "is-arrayish": "^0.2.1"
}
},
- "node_modules/levenary/node_modules/leven": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
- "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==",
+ "node_modules/es-module-lexer": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz",
+ "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==",
"dev": true,
- "engines": {
- "node": ">=6"
- }
+ "license": "MIT"
},
- "node_modules/levn": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
- "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
+ "node_modules/esbuild": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
+ "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
"dev": true,
- "dependencies": {
- "prelude-ls": "^1.2.1",
- "type-check": "~0.4.0"
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
},
"engines": {
- "node": ">= 0.8.0"
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.21.5",
+ "@esbuild/android-arm": "0.21.5",
+ "@esbuild/android-arm64": "0.21.5",
+ "@esbuild/android-x64": "0.21.5",
+ "@esbuild/darwin-arm64": "0.21.5",
+ "@esbuild/darwin-x64": "0.21.5",
+ "@esbuild/freebsd-arm64": "0.21.5",
+ "@esbuild/freebsd-x64": "0.21.5",
+ "@esbuild/linux-arm": "0.21.5",
+ "@esbuild/linux-arm64": "0.21.5",
+ "@esbuild/linux-ia32": "0.21.5",
+ "@esbuild/linux-loong64": "0.21.5",
+ "@esbuild/linux-mips64el": "0.21.5",
+ "@esbuild/linux-ppc64": "0.21.5",
+ "@esbuild/linux-riscv64": "0.21.5",
+ "@esbuild/linux-s390x": "0.21.5",
+ "@esbuild/linux-x64": "0.21.5",
+ "@esbuild/netbsd-x64": "0.21.5",
+ "@esbuild/openbsd-x64": "0.21.5",
+ "@esbuild/sunos-x64": "0.21.5",
+ "@esbuild/win32-arm64": "0.21.5",
+ "@esbuild/win32-ia32": "0.21.5",
+ "@esbuild/win32-x64": "0.21.5"
}
},
- "node_modules/libtess": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/libtess/-/libtess-1.2.2.tgz",
- "integrity": "sha1-Fz61KhpXoCOP5I8F0SJFB0SX+Jg=",
- "dev": true
- },
- "node_modules/liftup": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz",
- "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==",
+ "node_modules/escalade": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
"dev": true,
- "dependencies": {
- "extend": "^3.0.2",
- "findup-sync": "^4.0.0",
- "fined": "^1.2.0",
- "flagged-respawn": "^1.0.1",
- "is-plain-object": "^2.0.4",
- "object.map": "^1.0.1",
- "rechoir": "^0.7.0",
- "resolve": "^1.19.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=10"
+ "node": ">=6"
}
},
- "node_modules/liftup/node_modules/findup-sync": {
+ "node_modules/escape-string-regexp": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz",
- "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true,
- "dependencies": {
- "detect-file": "^1.0.0",
- "is-glob": "^4.0.0",
- "micromatch": "^4.0.2",
- "resolve-dir": "^1.0.1"
- },
+ "license": "MIT",
"engines": {
- "node": ">= 8"
- }
- },
- "node_modules/liftup/node_modules/rechoir": {
- "version": "0.7.1",
- "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz",
- "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==",
- "dev": true,
- "dependencies": {
- "resolve": "^1.9.0"
+ "node": ">=10"
},
- "engines": {
- "node": ">= 0.10"
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/liftup/node_modules/resolve": {
- "version": "1.22.0",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz",
- "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==",
- "dev": true,
+ "node_modules/escodegen": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz",
+ "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==",
"dependencies": {
- "is-core-module": "^2.8.1",
- "path-parse": "^1.0.7",
- "supports-preserve-symlinks-flag": "^1.0.0"
+ "esprima": "^4.0.1",
+ "estraverse": "^5.2.0",
+ "esutils": "^2.0.2"
},
"bin": {
- "resolve": "bin/resolve"
+ "escodegen": "bin/escodegen.js",
+ "esgenerate": "bin/esgenerate.js"
},
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "engines": {
+ "node": ">=6.0"
+ },
+ "optionalDependencies": {
+ "source-map": "~0.6.1"
}
},
- "node_modules/lines-and-columns": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
- "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
- "dev": true
- },
- "node_modules/linkify-it": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-1.2.4.tgz",
- "integrity": "sha1-B3NSbDF8j9E71TTuHRgP+Iq/iBo=",
- "dev": true,
- "dependencies": {
- "uc.micro": "^1.0.1"
+ "node_modules/escodegen/node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "license": "BSD-3-Clause",
+ "optional": true,
+ "engines": {
+ "node": ">=0.10.0"
}
},
- "node_modules/lint-staged": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-4.3.0.tgz",
- "integrity": "sha512-C/Zxslg0VRbsxwmCu977iIs+QyrmW2cyRCPUV5NDFYOH/jtRFHH8ch7ua2fH0voI/nVC3Tpg7DykfgMZySliKw==",
- "dev": true,
- "dependencies": {
- "app-root-path": "^2.0.0",
- "chalk": "^2.1.0",
- "commander": "^2.11.0",
- "cosmiconfig": "^1.1.0",
- "execa": "^0.8.0",
+ "node_modules/eslint": {
+ "version": "9.28.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.28.0.tgz",
+ "integrity": "sha512-ocgh41VhRlf9+fVpe7QKzwLj9c92fDiqOj8Y3Sd4/ZmVA4Btx4PlUYPq4pp9JDyupkf1upbEXecxL2mwNV7jPQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.2.0",
+ "@eslint-community/regexpp": "^4.12.1",
+ "@eslint/config-array": "^0.20.0",
+ "@eslint/config-helpers": "^0.2.1",
+ "@eslint/core": "^0.14.0",
+ "@eslint/eslintrc": "^3.3.1",
+ "@eslint/js": "9.28.0",
+ "@eslint/plugin-kit": "^0.3.1",
+ "@humanfs/node": "^0.16.6",
+ "@humanwhocodes/module-importer": "^1.0.1",
+ "@humanwhocodes/retry": "^0.4.2",
+ "@types/estree": "^1.0.6",
+ "@types/json-schema": "^7.0.15",
+ "ajv": "^6.12.4",
+ "chalk": "^4.0.0",
+ "cross-spawn": "^7.0.6",
+ "debug": "^4.3.2",
+ "escape-string-regexp": "^4.0.0",
+ "eslint-scope": "^8.3.0",
+ "eslint-visitor-keys": "^4.2.0",
+ "espree": "^10.3.0",
+ "esquery": "^1.5.0",
+ "esutils": "^2.0.2",
+ "fast-deep-equal": "^3.1.3",
+ "file-entry-cache": "^8.0.0",
+ "find-up": "^5.0.0",
+ "glob-parent": "^6.0.2",
+ "ignore": "^5.2.0",
+ "imurmurhash": "^0.1.4",
"is-glob": "^4.0.0",
- "jest-validate": "^21.1.0",
- "listr": "^0.12.0",
- "lodash": "^4.17.4",
- "log-symbols": "^2.0.0",
- "minimatch": "^3.0.0",
- "npm-which": "^3.0.1",
- "p-map": "^1.1.1",
- "staged-git-files": "0.0.4",
- "stringify-object": "^3.2.0"
+ "json-stable-stringify-without-jsonify": "^1.0.1",
+ "lodash.merge": "^4.6.2",
+ "minimatch": "^3.1.2",
+ "natural-compare": "^1.4.0",
+ "optionator": "^0.9.3"
},
"bin": {
- "lint-staged": "index.js"
+ "eslint": "bin/eslint.js"
},
"engines": {
- "node": ">=4.2.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://eslint.org/donate"
+ },
+ "peerDependencies": {
+ "jiti": "*"
+ },
+ "peerDependenciesMeta": {
+ "jiti": {
+ "optional": true
+ }
}
},
- "node_modules/lint-staged/node_modules/commander": {
- "version": "2.13.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz",
- "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==",
- "dev": true
- },
- "node_modules/lint-staged/node_modules/execa": {
- "version": "0.8.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz",
- "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=",
+ "node_modules/eslint-plugin-jsdoc": {
+ "version": "50.8.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.8.0.tgz",
+ "integrity": "sha512-UyGb5755LMFWPrZTEqqvTJ3urLz1iqj+bYOHFNag+sw3NvaMWP9K2z+uIn37XfNALmQLQyrBlJ5mkiVPL7ADEg==",
"dev": true,
+ "license": "BSD-3-Clause",
"dependencies": {
- "cross-spawn": "^5.0.1",
- "get-stream": "^3.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
+ "@es-joy/jsdoccomment": "~0.50.2",
+ "are-docs-informative": "^0.0.2",
+ "comment-parser": "1.4.1",
+ "debug": "^4.4.1",
+ "escape-string-regexp": "^4.0.0",
+ "espree": "^10.3.0",
+ "esquery": "^1.6.0",
+ "parse-imports-exports": "^0.2.4",
+ "semver": "^7.7.2",
+ "spdx-expression-parse": "^4.0.0"
},
"engines": {
- "node": ">=4"
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0"
}
},
- "node_modules/listr": {
- "version": "0.12.0",
- "resolved": "https://registry.npmjs.org/listr/-/listr-0.12.0.tgz",
- "integrity": "sha1-a84sD1YD+klYDqF81qAMwOX6RRo=",
+ "node_modules/eslint-plugin-jsdoc/node_modules/semver": {
+ "version": "7.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
+ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
"dev": true,
- "dependencies": {
- "chalk": "^1.1.3",
- "cli-truncate": "^0.2.1",
- "figures": "^1.7.0",
- "indent-string": "^2.1.0",
- "is-promise": "^2.1.0",
- "is-stream": "^1.1.0",
- "listr-silent-renderer": "^1.1.1",
- "listr-update-renderer": "^0.2.0",
- "listr-verbose-renderer": "^0.4.0",
- "log-symbols": "^1.0.2",
- "log-update": "^1.0.2",
- "ora": "^0.2.3",
- "p-map": "^1.1.1",
- "rxjs": "^5.0.0-beta.11",
- "stream-to-observable": "^0.1.0",
- "strip-ansi": "^3.0.1"
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
},
"engines": {
- "node": ">=4"
+ "node": ">=10"
}
},
- "node_modules/listr-input": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/listr-input/-/listr-input-0.2.1.tgz",
- "integrity": "sha512-oa8iVG870qJq+OuuMK3DjGqFcwsK1SDu+kULp9kEq09TY231aideIZenr3lFOQdASpAr6asuyJBbX62/a3IIhg==",
+ "node_modules/eslint-plugin-jsdoc/node_modules/spdx-expression-parse": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz",
+ "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "inquirer": "^7.0.0",
- "inquirer-autosubmit-prompt": "^0.2.0",
- "rxjs": "^6.5.3",
- "through": "^2.3.8"
- },
- "engines": {
- "node": ">=6"
+ "spdx-exceptions": "^2.1.0",
+ "spdx-license-ids": "^3.0.0"
}
},
- "node_modules/listr-input/node_modules/rxjs": {
- "version": "6.6.7",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
- "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
+ "node_modules/eslint-scope": {
+ "version": "8.4.0",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz",
+ "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
- "tslib": "^1.9.0"
+ "esrecurse": "^4.3.0",
+ "estraverse": "^5.2.0"
},
"engines": {
- "npm": ">=2.0.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
}
},
- "node_modules/listr-silent-renderer": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz",
- "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=",
+ "node_modules/eslint-visitor-keys": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
"dev": true,
+ "license": "Apache-2.0",
"engines": {
- "node": ">=4"
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
}
},
- "node_modules/listr-update-renderer": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.2.0.tgz",
- "integrity": "sha1-yoDhd5tOcCZoB+ju0a1qvjmFUPk=",
+ "node_modules/eslint/node_modules/eslint-visitor-keys": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
+ "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
"dev": true,
- "dependencies": {
- "chalk": "^1.1.3",
- "cli-truncate": "^0.2.1",
- "elegant-spinner": "^1.0.1",
- "figures": "^1.7.0",
- "indent-string": "^3.0.0",
- "log-symbols": "^1.0.2",
- "log-update": "^1.0.2",
- "strip-ansi": "^3.0.1"
- },
+ "license": "Apache-2.0",
"engines": {
- "node": ">=4"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
}
},
- "node_modules/listr-update-renderer/node_modules/ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+ "node_modules/eslint/node_modules/glob-parent": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
"dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.3"
+ },
"engines": {
- "node": ">=0.10.0"
+ "node": ">=10.13.0"
}
},
- "node_modules/listr-update-renderer/node_modules/chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "node_modules/espree": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",
+ "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
+ "acorn": "^8.15.0",
+ "acorn-jsx": "^5.3.2",
+ "eslint-visitor-keys": "^4.2.1"
},
"engines": {
- "node": ">=0.10.0"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
}
},
- "node_modules/listr-update-renderer/node_modules/indent-string": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
- "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
+ "node_modules/espree/node_modules/eslint-visitor-keys": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
+ "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
"dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "license": "BSD-2-Clause",
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
"engines": {
"node": ">=4"
}
},
- "node_modules/listr-update-renderer/node_modules/log-symbols": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz",
- "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=",
+ "node_modules/esquery": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz",
+ "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==",
"dev": true,
+ "license": "BSD-3-Clause",
"dependencies": {
- "chalk": "^1.0.0"
+ "estraverse": "^5.1.0"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=0.10"
}
},
- "node_modules/listr-update-renderer/node_modules/supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+ "node_modules/esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
"dev": true,
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "license": "BSD-2-Clause",
"engines": {
- "node": ">=0.8.0"
+ "node": ">=4.0"
}
},
- "node_modules/listr-verbose-renderer": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz",
- "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=",
+ "node_modules/estree-walker": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
"dev": true,
"dependencies": {
- "chalk": "^1.1.3",
- "cli-cursor": "^1.0.2",
- "date-fns": "^1.27.2",
- "figures": "^1.7.0"
- },
- "engines": {
- "node": ">=4"
+ "@types/estree": "^1.0.0"
}
},
- "node_modules/listr-verbose-renderer/node_modules/ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
- "dev": true,
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "license": "BSD-2-Clause",
"engines": {
"node": ">=0.10.0"
}
},
- "node_modules/listr-verbose-renderer/node_modules/chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "node_modules/event-target-shim": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
+ "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
"dev": true,
- "dependencies": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=6"
}
},
- "node_modules/listr-verbose-renderer/node_modules/cli-cursor": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz",
- "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=",
+ "node_modules/eventemitter3": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
+ "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==",
"dev": true,
- "dependencies": {
- "restore-cursor": "^1.0.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
+ "license": "MIT"
},
- "node_modules/listr-verbose-renderer/node_modules/onetime": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
- "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
+ "node_modules/events": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
+ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=0.8.x"
}
},
- "node_modules/listr-verbose-renderer/node_modules/restore-cursor": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz",
- "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=",
+ "node_modules/execa": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz",
+ "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "exit-hook": "^1.0.0",
- "onetime": "^1.0.0"
+ "cross-spawn": "^7.0.3",
+ "get-stream": "^8.0.1",
+ "human-signals": "^5.0.0",
+ "is-stream": "^3.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^5.1.0",
+ "onetime": "^6.0.0",
+ "signal-exit": "^4.1.0",
+ "strip-final-newline": "^3.0.0"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=16.17"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/execa?sponsor=1"
}
},
- "node_modules/listr-verbose-renderer/node_modules/supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+ "node_modules/expect-type": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.1.0.tgz",
+ "integrity": "sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==",
"dev": true,
+ "license": "Apache-2.0",
"engines": {
- "node": ">=0.8.0"
+ "node": ">=12.0.0"
}
},
- "node_modules/listr/node_modules/ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+ "node_modules/extend": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
"dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
+ "license": "MIT"
},
- "node_modules/listr/node_modules/chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "node_modules/external-editor": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
+ "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
+ "chardet": "^0.7.0",
+ "iconv-lite": "^0.4.24",
+ "tmp": "^0.0.33"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=4"
}
},
- "node_modules/listr/node_modules/log-symbols": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz",
- "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=",
+ "node_modules/extract-zip": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
- "chalk": "^1.0.0"
+ "debug": "^4.1.1",
+ "get-stream": "^5.1.0",
+ "yauzl": "^2.10.0"
+ },
+ "bin": {
+ "extract-zip": "cli.js"
},
"engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/listr/node_modules/supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
- "dev": true,
- "engines": {
- "node": ">=0.8.0"
+ "node": ">= 10.17.0"
+ },
+ "optionalDependencies": {
+ "@types/yauzl": "^2.9.1"
}
},
- "node_modules/livereload-js": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.3.0.tgz",
- "integrity": "sha512-j1R0/FeGa64Y+NmqfZhyoVRzcFlOZ8sNlKzHjh4VvLULFACZhn68XrX5DFg2FhMvSMJmROuFxRSa560ECWKBMg==",
- "dev": true
- },
- "node_modules/locate-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
- "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+ "node_modules/extract-zip/node_modules/get-stream": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "p-locate": "^3.0.0",
- "path-exists": "^3.0.0"
+ "pump": "^3.0.0"
},
"engines": {
- "node": ">=6"
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/locate-path/node_modules/path-exists": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true,
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/lodash": {
- "version": "4.17.21",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
- "dev": true
- },
- "node_modules/lodash.flattendeep": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz",
- "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=",
- "dev": true
- },
- "node_modules/lodash.isequal": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
- "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==",
- "dev": true
- },
- "node_modules/lodash.isfinite": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz",
- "integrity": "sha512-7FGG40uhC8Mm633uKW1r58aElFlBlxCrg9JfSi3P6aYiWmfiWF0PgMd86ZUsxE5GwWPdHoS2+48bwTh2VPkIQA==",
- "dev": true
- },
- "node_modules/lodash.memoize": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz",
- "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=",
- "dev": true
- },
- "node_modules/lodash.merge": {
- "version": "4.6.2",
- "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
- "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
- "dev": true
+ "license": "MIT"
},
- "node_modules/lodash.zip": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz",
- "integrity": "sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==",
- "dev": true
+ "node_modules/fast-fifo": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz",
+ "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/log-symbols": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.1.0.tgz",
- "integrity": "sha512-zLeLrzMA1A2vRF1e/0Mo+LNINzi6jzBylHj5WqvQ/WK/5WCZt8si9SyN4p9llr/HRYvVR1AoXHRHl4WTHyQAzQ==",
+ "node_modules/fast-glob": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
+ "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "chalk": "^2.0.1"
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.8"
},
"engines": {
- "node": ">=4"
+ "node": ">=8.6.0"
}
},
- "node_modules/log-update": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz",
- "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=",
+ "node_modules/fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fast-xml-parser": {
+ "version": "4.5.1",
+ "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.1.tgz",
+ "integrity": "sha512-y655CeyUQ+jj7KBbYMc4FG01V8ZQqjN+gDYGJ50RtfsUB8iG9AmwmwoAgeKLJdmueKKMrH1RJ7yXHTSoczdv5w==",
"dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/NaturalIntelligence"
+ },
+ {
+ "type": "paypal",
+ "url": "https://paypal.me/naturalintelligence"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "ansi-escapes": "^1.0.0",
- "cli-cursor": "^1.0.2"
+ "strnum": "^1.0.5"
},
- "engines": {
- "node": ">=0.10.0"
+ "bin": {
+ "fxparser": "src/cli/cli.js"
}
},
- "node_modules/log-update/node_modules/ansi-escapes": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz",
- "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=",
+ "node_modules/fastq": {
+ "version": "1.19.1",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
+ "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
"dev": true,
- "engines": {
- "node": ">=0.10.0"
+ "license": "ISC",
+ "dependencies": {
+ "reusify": "^1.0.4"
}
},
- "node_modules/log-update/node_modules/cli-cursor": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz",
- "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=",
+ "node_modules/fault": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/fault/-/fault-2.0.1.tgz",
+ "integrity": "sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "restore-cursor": "^1.0.1"
+ "format": "^0.2.0"
},
- "engines": {
- "node": ">=0.10.0"
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/log-update/node_modules/onetime": {
+ "node_modules/fd-slicer": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
- "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
+ "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
"dev": true,
- "engines": {
- "node": ">=0.10.0"
+ "license": "MIT",
+ "dependencies": {
+ "pend": "~1.2.0"
}
},
- "node_modules/log-update/node_modules/restore-cursor": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz",
- "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=",
+ "node_modules/fetch-blob": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
+ "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "paypal",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "exit-hook": "^1.0.0",
- "onetime": "^1.0.0"
+ "node-domexception": "^1.0.0",
+ "web-streams-polyfill": "^3.0.3"
},
"engines": {
- "node": ">=0.10.0"
+ "node": "^12.20 || >= 14.13"
}
},
- "node_modules/loose-envify": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
- "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+ "node_modules/figures": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
+ "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "js-tokens": "^3.0.0 || ^4.0.0"
+ "escape-string-regexp": "^1.0.5"
},
- "bin": {
- "loose-envify": "cli.js"
- }
- },
- "node_modules/lowercase-keys": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
- "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",
- "dev": true,
"engines": {
"node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/lru-cache": {
- "version": "4.1.5",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
- "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
+ "node_modules/figures/node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
- "dependencies": {
- "pseudomap": "^1.0.2",
- "yallist": "^2.1.2"
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8.0"
}
},
- "node_modules/make-iterator": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
- "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
+ "node_modules/file-entry-cache": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
+ "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "kind-of": "^6.0.2"
+ "flat-cache": "^4.0.0"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=16.0.0"
}
},
- "node_modules/map-cache": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
- "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
+ "node_modules/file-saver": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-1.3.8.tgz",
+ "integrity": "sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg==",
+ "license": "MIT"
+ },
+ "node_modules/fill-range": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
"engines": {
- "node": ">=0.10.0"
+ "node": ">=8"
}
},
- "node_modules/map-obj": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz",
- "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==",
+ "node_modules/find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
"engines": {
- "node": ">=8"
+ "node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/markdown-it": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-4.4.0.tgz",
- "integrity": "sha1-PfNz2+pYepp/7z5WMRtokI91xBQ=",
+ "node_modules/find-versions": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz",
+ "integrity": "sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "argparse": "~1.0.2",
- "entities": "~1.1.1",
- "linkify-it": "~1.2.0",
- "mdurl": "~1.0.0",
- "uc.micro": "^1.0.0"
+ "semver-regex": "^3.1.2"
},
- "bin": {
- "markdown-it": "bin/markdown-it.js"
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/marked": {
- "version": "4.0.10",
- "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.10.tgz",
- "integrity": "sha512-+QvuFj0nGgO970fySghXGmuw+Fd0gD2x3+MqCWLIPf5oxdv1Ka6b2q+z9RP01P/IaKPMEramy+7cNy/Lw8c3hw==",
+ "node_modules/flat-cache": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz",
+ "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==",
"dev": true,
- "bin": {
- "marked": "bin/marked.js"
+ "license": "MIT",
+ "dependencies": {
+ "flatted": "^3.2.9",
+ "keyv": "^4.5.4"
},
"engines": {
- "node": ">= 12"
+ "node": ">=16"
}
},
- "node_modules/maxmin": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-2.1.0.tgz",
- "integrity": "sha1-TTsiCQPZXu5+t6x/qGTnLcCaMWY=",
+ "node_modules/flatted": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz",
+ "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/foreground-child": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz",
+ "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "chalk": "^1.0.0",
- "figures": "^1.0.1",
- "gzip-size": "^3.0.0",
- "pretty-bytes": "^3.0.0"
+ "cross-spawn": "^7.0.0",
+ "signal-exit": "^4.0.1"
},
"engines": {
- "node": ">=0.12"
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/maxmin/node_modules/ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+ "node_modules/format": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz",
+ "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==",
"dev": true,
"engines": {
- "node": ">=0.10.0"
+ "node": ">=0.4.x"
}
},
- "node_modules/maxmin/node_modules/chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "node_modules/formdata-polyfill": {
+ "version": "4.0.10",
+ "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
+ "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
+ "fetch-blob": "^3.1.2"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=12.20.0"
}
},
- "node_modules/maxmin/node_modules/pretty-bytes": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-3.0.1.tgz",
- "integrity": "sha1-J9AAjXeAY6C0gRuzXHnxvV1fvM8=",
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
"dev": true,
- "dependencies": {
- "number-is-nan": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
+ "license": "ISC"
},
- "node_modules/maxmin/node_modules/supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
"engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/md5.js": {
- "version": "1.3.5",
- "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
- "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
- "dev": true,
- "dependencies": {
- "hash-base": "^3.0.0",
- "inherits": "^2.0.1",
- "safe-buffer": "^5.1.2"
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
- "node_modules/md5.js/node_modules/safe-buffer": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
- "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==",
- "dev": true
- },
- "node_modules/mdn-links": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/mdn-links/-/mdn-links-0.1.0.tgz",
- "integrity": "sha1-4kyDuXy0xYhsw58veAcF+/4nOqU=",
- "dev": true
- },
- "node_modules/mdurl": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
- "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=",
- "dev": true
- },
- "node_modules/media-typer": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
- "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
"dev": true,
- "engines": {
- "node": ">= 0.6"
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/meow": {
- "version": "12.0.1",
- "resolved": "https://registry.npmjs.org/meow/-/meow-12.0.1.tgz",
- "integrity": "sha512-/QOqMALNoKQcJAOOdIXjNLtfcCdLXbMFyB1fOOPdm6RzfBTlsuodOCTBDjVbeUSmgDQb8UI2oONqYGtq1PKKKA==",
+ "node_modules/geckodriver": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-5.0.0.tgz",
+ "integrity": "sha512-vn7TtQ3b9VMJtVXsyWtQQl1fyBVFhQy7UvJF96kPuuJ0or5THH496AD3eUyaDD11+EqCxH9t6V+EP9soZQk4YQ==",
"dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
"dependencies": {
- "@types/minimist": "^1.2.2",
- "camelcase-keys": "^8.0.2",
+ "@wdio/logger": "^9.1.3",
+ "@zip.js/zip.js": "^2.7.53",
"decamelize": "^6.0.0",
- "decamelize-keys": "^2.0.1",
- "hard-rejection": "^2.1.0",
- "minimist-options": "4.1.0",
- "normalize-package-data": "^5.0.0",
- "read-pkg-up": "^9.1.0",
- "redent": "^4.0.0",
- "trim-newlines": "^5.0.0",
- "type-fest": "^3.9.0",
- "yargs-parser": "^21.1.1"
+ "http-proxy-agent": "^7.0.2",
+ "https-proxy-agent": "^7.0.5",
+ "node-fetch": "^3.3.2",
+ "tar-fs": "^3.0.6",
+ "which": "^5.0.0"
},
- "engines": {
- "node": ">=16.10"
+ "bin": {
+ "geckodriver": "bin/geckodriver.js"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/meow/node_modules/decamelize": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz",
- "integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==",
- "dev": true,
"engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">=18.0.0"
}
},
- "node_modules/meow/node_modules/hosted-git-info": {
- "version": "6.1.1",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz",
- "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==",
+ "node_modules/geckodriver/node_modules/data-uri-to-buffer": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
+ "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
"dev": true,
- "dependencies": {
- "lru-cache": "^7.5.1"
- },
+ "license": "MIT",
"engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ "node": ">= 12"
}
},
- "node_modules/meow/node_modules/lru-cache": {
- "version": "7.18.3",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
- "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
+ "node_modules/geckodriver/node_modules/isexe": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz",
+ "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==",
"dev": true,
+ "license": "ISC",
"engines": {
- "node": ">=12"
+ "node": ">=16"
}
},
- "node_modules/meow/node_modules/normalize-package-data": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz",
- "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==",
+ "node_modules/geckodriver/node_modules/node-fetch": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
+ "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "hosted-git-info": "^6.0.0",
- "is-core-module": "^2.8.1",
- "semver": "^7.3.5",
- "validate-npm-package-license": "^3.0.4"
+ "data-uri-to-buffer": "^4.0.0",
+ "fetch-blob": "^3.1.4",
+ "formdata-polyfill": "^4.0.10"
},
"engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/node-fetch"
}
},
- "node_modules/meow/node_modules/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "node_modules/geckodriver/node_modules/which": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz",
+ "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "lru-cache": "^6.0.0"
+ "isexe": "^3.1.1"
},
"bin": {
- "semver": "bin/semver.js"
+ "node-which": "bin/which.js"
},
"engines": {
- "node": ">=10"
+ "node": "^18.17.0 || >=20.5.0"
}
},
- "node_modules/meow/node_modules/semver/node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "node_modules/gensync": {
+ "version": "1.0.0-beta.2",
+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
"dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=10"
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
}
},
- "node_modules/meow/node_modules/type-fest": {
- "version": "3.13.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.0.tgz",
- "integrity": "sha512-Gur3yQGM9qiLNs0KPP7LPgeRbio2QTt4xXouobMCarR0/wyW3F+F/+OWwshg3NG0Adon7uQfSZBpB46NfhoF1A==",
+ "node_modules/get-east-asian-width": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz",
+ "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=14.16"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/meow/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
- },
- "node_modules/meow/node_modules/yargs-parser": {
- "version": "21.1.1",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
- "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "node_modules/get-port": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/get-port/-/get-port-7.1.0.tgz",
+ "integrity": "sha512-QB9NKEeDg3xxVwCCwJQ9+xycaz6pBB6iQ76wiWMl1927n0Kir6alPiP+yuiICLLU4jpMe08dXfpebuQppFA2zw==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=12"
+ "node": ">=16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/merge-descriptors": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
- "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
+ "node_modules/get-stream": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz",
+ "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==",
"dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ },
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/merge-source-map": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz",
- "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==",
+ "node_modules/get-uri": {
+ "version": "6.0.4",
+ "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.4.tgz",
+ "integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "source-map": "^0.6.1"
+ "basic-ftp": "^5.0.2",
+ "data-uri-to-buffer": "^6.0.2",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": ">= 14"
}
},
- "node_modules/merge-stream": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
- "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
- "dev": true
+ "node_modules/gifenc": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/gifenc/-/gifenc-1.0.3.tgz",
+ "integrity": "sha512-xdr6AdrfGBcfzncONUOlXMBuc5wJDtOueE3c5rdG0oNgtINLD+f2iFZltrBRZYzACRbKr+mSVU/x98zv2u3jmw==",
+ "license": "MIT"
},
- "node_modules/merge2": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
- "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "node_modules/git-up": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/git-up/-/git-up-7.0.0.tgz",
+ "integrity": "sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==",
"dev": true,
- "engines": {
- "node": ">= 8"
+ "license": "MIT",
+ "dependencies": {
+ "is-ssh": "^1.4.0",
+ "parse-url": "^8.1.0"
}
},
- "node_modules/methods": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
- "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=",
+ "node_modules/git-url-parse": {
+ "version": "13.1.1",
+ "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-13.1.1.tgz",
+ "integrity": "sha512-PCFJyeSSdtnbfhSNRw9Wk96dDCNx+sogTe4YNXeXSJxt7xz5hvXekuRn9JX7m+Mf4OscCu8h+mtAl3+h5Fo8lQ==",
"dev": true,
- "engines": {
- "node": ">= 0.6"
+ "license": "MIT",
+ "dependencies": {
+ "git-up": "^7.0.0"
}
},
- "node_modules/micromatch": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
- "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "node_modules/github-slugger": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.4.0.tgz",
+ "integrity": "sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ==",
"dev": true,
- "dependencies": {
- "braces": "^3.0.2",
- "picomatch": "^2.3.1"
- },
- "engines": {
- "node": ">=8.6"
- }
+ "license": "ISC"
},
- "node_modules/miller-rabin": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
- "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
+ "node_modules/glob": {
+ "version": "11.0.1",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.1.tgz",
+ "integrity": "sha512-zrQDm8XPnYEKawJScsnM0QzobJxlT/kHOOlRTio8IH/GrmxRE5fjllkzdaHclIuNjUQTJYH2xHNIGfdpJkDJUw==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "bn.js": "^4.0.0",
- "brorand": "^1.0.1"
+ "foreground-child": "^3.1.0",
+ "jackspeak": "^4.0.1",
+ "minimatch": "^10.0.0",
+ "minipass": "^7.1.2",
+ "package-json-from-dist": "^1.0.0",
+ "path-scurry": "^2.0.0"
},
"bin": {
- "miller-rabin": "bin/miller-rabin"
- }
- },
- "node_modules/mime": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
- "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
- "dev": true,
- "bin": {
- "mime": "cli.js"
+ "glob": "dist/esm/bin.mjs"
},
"engines": {
- "node": ">=4"
- }
- },
- "node_modules/mime-db": {
- "version": "1.52.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
- "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
- "dev": true,
- "engines": {
- "node": ">= 0.6"
+ "node": "20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/mime-types": {
- "version": "2.1.35",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
- "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "mime-db": "1.52.0"
+ "is-glob": "^4.0.1"
},
"engines": {
- "node": ">= 0.6"
+ "node": ">= 6"
}
},
- "node_modules/mimic-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "node_modules/glob/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
- "engines": {
- "node": ">=6"
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0"
}
},
- "node_modules/mimic-response": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
- "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
+ "node_modules/glob/node_modules/jackspeak": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.0.tgz",
+ "integrity": "sha512-9DDdhb5j6cpeitCbvLO7n7J4IxnbM6hoF6O1g4HQ5TfhvvKN8ywDM7668ZhMHRqVmxqhps/F6syWK2KcPxYlkw==",
"dev": true,
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "@isaacs/cliui": "^8.0.2"
+ },
"engines": {
- "node": ">=4"
+ "node": "20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/min-indent": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
- "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
+ "node_modules/glob/node_modules/lru-cache": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz",
+ "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==",
"dev": true,
+ "license": "ISC",
"engines": {
- "node": ">=4"
+ "node": "20 || >=22"
}
},
- "node_modules/minimalistic-assert": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
- "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
- "dev": true
- },
- "node_modules/minimalistic-crypto-utils": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
- "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
- "dev": true
- },
- "node_modules/minimatch": {
- "version": "3.0.8",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz",
- "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==",
+ "node_modules/glob/node_modules/minimatch": {
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz",
+ "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "brace-expansion": "^1.1.7"
+ "brace-expansion": "^2.0.1"
},
"engines": {
- "node": "*"
+ "node": "20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/minimist": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
- "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
- "dev": true
- },
- "node_modules/minimist-options": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz",
- "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==",
+ "node_modules/glob/node_modules/path-scurry": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz",
+ "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==",
"dev": true,
+ "license": "BlueOak-1.0.0",
"dependencies": {
- "arrify": "^1.0.1",
- "is-plain-obj": "^1.1.0",
- "kind-of": "^6.0.3"
+ "lru-cache": "^11.0.0",
+ "minipass": "^7.1.2"
},
"engines": {
- "node": ">= 6"
+ "node": "20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/mkdirp": {
- "version": "0.5.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz",
- "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==",
- "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)",
+ "node_modules/globals": {
+ "version": "16.2.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-16.2.0.tgz",
+ "integrity": "sha512-O+7l9tPdHCU320IigZZPj5zmRCFG9xHmx9cU8FqU2Rp+JN714seHV+2S9+JslCpY4gJwU2vOGox0wzgae/MCEg==",
"dev": true,
- "dependencies": {
- "minimist": "^1.2.5"
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
},
- "bin": {
- "mkdirp": "bin/cmd.js"
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/mkdirp-classic": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
- "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
- "dev": true
+ "node_modules/globals-docs": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/globals-docs/-/globals-docs-2.4.1.tgz",
+ "integrity": "sha512-qpPnUKkWnz8NESjrCvnlGklsgiQzlq+rcCxoG5uNQ+dNA7cFMCmn231slLAwS2N/PlkzZ3COL8CcS10jXmLHqg==",
+ "dev": true,
+ "license": "ISC"
},
- "node_modules/mocha": {
- "version": "10.2.0",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz",
- "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==",
- "dev": true,
- "dependencies": {
- "ansi-colors": "4.1.1",
- "browser-stdout": "1.3.1",
- "chokidar": "3.5.3",
- "debug": "4.3.4",
- "diff": "5.0.0",
- "escape-string-regexp": "4.0.0",
- "find-up": "5.0.0",
- "glob": "7.2.0",
- "he": "1.2.0",
- "js-yaml": "4.1.0",
- "log-symbols": "4.1.0",
- "minimatch": "5.0.1",
- "ms": "2.1.3",
- "nanoid": "3.3.3",
- "serialize-javascript": "6.0.0",
- "strip-json-comments": "3.1.1",
- "supports-color": "8.1.1",
- "workerpool": "6.2.1",
- "yargs": "16.2.0",
- "yargs-parser": "20.2.4",
- "yargs-unparser": "2.0.0"
- },
- "bin": {
- "_mocha": "bin/_mocha",
- "mocha": "bin/mocha.js"
- },
+ "node_modules/graceful-fs": {
+ "version": "4.2.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/grapheme-splitter": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz",
+ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/graphql": {
+ "version": "16.10.0",
+ "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.10.0.tgz",
+ "integrity": "sha512-AjqGKbDGUFRKIRCP9tCKiIGHyriz2oHEbPIbEtcSLSs4YjReZOIPQQWek4+6hjw62H9QShXHyaGivGiYVLeYFQ==",
+ "dev": true,
+ "license": "MIT",
"engines": {
- "node": ">= 14.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/mochajs"
+ "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0"
}
},
- "node_modules/mocha/node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
- "node_modules/mocha/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-convert": "^2.0.1"
+ "function-bind": "^1.1.2"
},
"engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ "node": ">= 0.4"
}
},
- "node_modules/mocha/node_modules/argparse": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "dev": true
- },
- "node_modules/mocha/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "node_modules/hast-util-from-parse5": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz",
+ "integrity": "sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
+ "@types/hast": "^2.0.0",
+ "@types/unist": "^2.0.0",
+ "hastscript": "^7.0.0",
+ "property-information": "^6.0.0",
+ "vfile": "^5.0.0",
+ "vfile-location": "^4.0.0",
+ "web-namespaces": "^2.0.0"
},
"funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/mocha/node_modules/chalk/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "node_modules/hast-util-parse-selector": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz",
+ "integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "has-flag": "^4.0.0"
+ "@types/hast": "^2.0.0"
},
- "engines": {
- "node": ">=8"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/mocha/node_modules/cliui": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
- "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
+ "node_modules/hast-util-raw": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-7.2.3.tgz",
+ "integrity": "sha512-RujVQfVsOrxzPOPSzZFiwofMArbQke6DJjnFfceiEbFh7S05CbPt0cYN+A5YeD3pso0JQk6O1aHBnx9+Pm2uqg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "string-width": "^4.2.0",
- "strip-ansi": "^6.0.0",
- "wrap-ansi": "^7.0.0"
+ "@types/hast": "^2.0.0",
+ "@types/parse5": "^6.0.0",
+ "hast-util-from-parse5": "^7.0.0",
+ "hast-util-to-parse5": "^7.0.0",
+ "html-void-elements": "^2.0.0",
+ "parse5": "^6.0.0",
+ "unist-util-position": "^4.0.0",
+ "unist-util-visit": "^4.0.0",
+ "vfile": "^5.0.0",
+ "web-namespaces": "^2.0.0",
+ "zwitch": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/mocha/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "node_modules/hast-util-sanitize": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/hast-util-sanitize/-/hast-util-sanitize-4.1.0.tgz",
+ "integrity": "sha512-Hd9tU0ltknMGRDv+d6Ro/4XKzBqQnP/EZrpiTbpFYfXv/uOhWeKc+2uajcbEvAEH98VZd7eII2PiXm13RihnLw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-name": "~1.1.4"
+ "@types/hast": "^2.0.0"
},
- "engines": {
- "node": ">=7.0.0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/mocha/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "node_modules/hast-util-to-html": {
+ "version": "8.0.4",
+ "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-8.0.4.tgz",
+ "integrity": "sha512-4tpQTUOr9BMjtYyNlt0P50mH7xj0Ks2xpo8M943Vykljf99HW6EzulIoJP1N3eKOSScEHzyzi9dm7/cn0RfGwA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
+ "@types/hast": "^2.0.0",
+ "@types/unist": "^2.0.0",
+ "ccount": "^2.0.0",
+ "comma-separated-tokens": "^2.0.0",
+ "hast-util-raw": "^7.0.0",
+ "hast-util-whitespace": "^2.0.0",
+ "html-void-elements": "^2.0.0",
+ "property-information": "^6.0.0",
+ "space-separated-tokens": "^2.0.0",
+ "stringify-entities": "^4.0.0",
+ "zwitch": "^2.0.4"
},
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/mocha/node_modules/debug/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/mocha/node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "node_modules/mocha/node_modules/escape-string-regexp": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "node_modules/hast-util-to-parse5": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-7.1.0.tgz",
+ "integrity": "sha512-YNRgAJkH2Jky5ySkIqFXTQiaqcAtJyVE+D5lkN6CdtOqrnkLfGYYrEcKuHOJZlp+MwjSwuD3fZuawI+sic/RBw==",
"dev": true,
- "engines": {
- "node": ">=10"
+ "license": "MIT",
+ "dependencies": {
+ "@types/hast": "^2.0.0",
+ "comma-separated-tokens": "^2.0.0",
+ "property-information": "^6.0.0",
+ "space-separated-tokens": "^2.0.0",
+ "web-namespaces": "^2.0.0",
+ "zwitch": "^2.0.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/mocha/node_modules/find-up": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
- "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "node_modules/hast-util-whitespace": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz",
+ "integrity": "sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==",
"dev": true,
- "dependencies": {
- "locate-path": "^6.0.0",
- "path-exists": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- },
+ "license": "MIT",
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/mocha/node_modules/glob": {
+ "node_modules/hastscript": {
"version": "7.2.0",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
- "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
+ "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz",
+ "integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
+ "@types/hast": "^2.0.0",
+ "comma-separated-tokens": "^2.0.0",
+ "hast-util-parse-selector": "^3.0.0",
+ "property-information": "^6.0.0",
+ "space-separated-tokens": "^2.0.0"
},
"funding": {
- "url": "https://github.com/sponsors/isaacs"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/mocha/node_modules/glob/node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "node_modules/he": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
+ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
"dev": true,
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
+ "license": "MIT",
+ "optional": true,
+ "bin": {
+ "he": "bin/he"
}
},
- "node_modules/mocha/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "node_modules/headers-polyfill": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-4.0.3.tgz",
+ "integrity": "sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==",
"dev": true,
- "engines": {
- "node": ">=8"
- }
+ "license": "MIT"
},
- "node_modules/mocha/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "node_modules/highlight.js": {
+ "version": "11.11.1",
+ "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz",
+ "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==",
"dev": true,
+ "license": "BSD-3-Clause",
"engines": {
- "node": ">=8"
+ "node": ">=12.0.0"
}
},
- "node_modules/mocha/node_modules/js-yaml": {
+ "node_modules/hosted-git-info": {
"version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz",
+ "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "argparse": "^2.0.1"
+ "lru-cache": "^6.0.0"
},
- "bin": {
- "js-yaml": "bin/js-yaml.js"
+ "engines": {
+ "node": ">=10"
}
},
- "node_modules/mocha/node_modules/locate-path": {
+ "node_modules/hosted-git-info/node_modules/lru-cache": {
"version": "6.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
- "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "p-locate": "^5.0.0"
+ "yallist": "^4.0.0"
},
"engines": {
"node": ">=10"
- },
+ }
+ },
+ "node_modules/hosted-git-info/node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/html-void-elements": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz",
+ "integrity": "sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==",
+ "dev": true,
+ "license": "MIT",
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/mocha/node_modules/log-symbols": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
- "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
+ "node_modules/htmlfy": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/htmlfy/-/htmlfy-0.6.0.tgz",
+ "integrity": "sha512-EV1RNjYuG6xIxwA8zDjAUQVeS/SsPE0nhFsdjM8ALopS22ZRAcePocdrhKaaV26PYiTkUrKplJuSZkGRN6Y0Rg==",
"dev": true,
+ "license": "MIT"
+ },
+ "node_modules/htmlparser2": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz",
+ "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==",
+ "dev": true,
+ "funding": [
+ "https://github.com/fb55/htmlparser2?sponsor=1",
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fb55"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "chalk": "^4.1.0",
- "is-unicode-supported": "^0.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "domelementtype": "^2.3.0",
+ "domhandler": "^5.0.3",
+ "domutils": "^3.1.0",
+ "entities": "^4.5.0"
}
},
- "node_modules/mocha/node_modules/minimatch": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
- "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==",
+ "node_modules/http-proxy-agent": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
+ "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "brace-expansion": "^2.0.1"
+ "agent-base": "^7.1.0",
+ "debug": "^4.3.4"
},
"engines": {
- "node": ">=10"
+ "node": ">= 14"
}
},
- "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "node_modules/https-proxy-agent": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
+ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "balanced-match": "^1.0.0"
+ "agent-base": "^7.1.2",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 14"
}
},
- "node_modules/mocha/node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
- "dev": true
+ "node_modules/human-signals": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz",
+ "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=16.17.0"
+ }
},
- "node_modules/mocha/node_modules/p-limit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
- "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "node_modules/husky": {
+ "version": "4.3.8",
+ "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.8.tgz",
+ "integrity": "sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow==",
"dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
"dependencies": {
- "yocto-queue": "^0.1.0"
+ "chalk": "^4.0.0",
+ "ci-info": "^2.0.0",
+ "compare-versions": "^3.6.0",
+ "cosmiconfig": "^7.0.0",
+ "find-versions": "^4.0.0",
+ "opencollective-postinstall": "^2.0.2",
+ "pkg-dir": "^5.0.0",
+ "please-upgrade-node": "^3.2.0",
+ "slash": "^3.0.0",
+ "which-pm-runs": "^1.0.0"
+ },
+ "bin": {
+ "husky-run": "bin/run.js",
+ "husky-upgrade": "lib/upgrader/bin.js"
},
"engines": {
"node": ">=10"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/husky"
}
},
- "node_modules/mocha/node_modules/p-locate": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
- "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
- "dev": true,
+ "node_modules/i18next": {
+ "version": "19.9.2",
+ "resolved": "https://registry.npmjs.org/i18next/-/i18next-19.9.2.tgz",
+ "integrity": "sha512-0i6cuo6ER6usEOtKajUUDj92zlG+KArFia0857xxiEHAQcUwh/RtOQocui1LPJwunSYT574Pk64aNva1kwtxZg==",
+ "license": "MIT",
"dependencies": {
- "p-limit": "^3.0.2"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "@babel/runtime": "^7.12.0"
}
},
- "node_modules/mocha/node_modules/string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dev": true,
+ "node_modules/i18next-browser-languagedetector": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-4.3.1.tgz",
+ "integrity": "sha512-KIToAzf8zwWvacgnRwJp63ase26o24AuNUlfNVJ5YZAFmdGhsJpmFClxXPuk9rv1FMI4lnc8zLSqgZPEZMrW4g==",
+ "license": "MIT",
"dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "engines": {
- "node": ">=8"
+ "@babel/runtime": "^7.5.5"
}
},
- "node_modules/mocha/node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "node_modules/iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^5.0.1"
+ "safer-buffer": ">= 2.1.2 < 3"
},
"engines": {
- "node": ">=8"
+ "node": ">=0.10.0"
}
},
- "node_modules/mocha/node_modules/strip-json-comments": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
- "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+ "node_modules/ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "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": "BSD-3-Clause"
+ },
+ "node_modules/ignore": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">= 4"
}
},
- "node_modules/mocha/node_modules/supports-color": {
- "version": "8.1.1",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
- "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+ "node_modules/immediate": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
+ "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/import-fresh": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
+ "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "has-flag": "^4.0.0"
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
},
"engines": {
- "node": ">=10"
+ "node": ">=6"
},
"funding": {
- "url": "https://github.com/chalk/supports-color?sponsor=1"
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/mocha/node_modules/wrap-ansi": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "node_modules/import-meta-resolve": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz",
+ "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==",
"dev": true,
- "dependencies": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=10"
- },
+ "license": "MIT",
"funding": {
- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/mocha/node_modules/y18n": {
- "version": "5.0.8",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=10"
+ "node": ">=0.8.19"
}
},
- "node_modules/mocha/node_modules/yargs": {
- "version": "16.2.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
- "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "cliui": "^7.0.2",
- "escalade": "^3.1.1",
- "get-caller-file": "^2.0.5",
- "require-directory": "^2.1.1",
- "string-width": "^4.2.0",
- "y18n": "^5.0.5",
- "yargs-parser": "^20.2.2"
- },
- "engines": {
- "node": ">=10"
+ "once": "^1.3.0",
+ "wrappy": "1"
}
},
- "node_modules/mocha/node_modules/yargs-parser": {
- "version": "20.2.4",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
- "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==",
+ "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/ini": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz",
+ "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==",
"dev": true,
+ "license": "ISC",
"engines": {
- "node": ">=10"
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
- "node_modules/module-deps": {
- "version": "6.2.2",
- "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.2.tgz",
- "integrity": "sha512-a9y6yDv5u5I4A+IPHTnqFxcaKr4p50/zxTjcQJaX2ws9tN/W6J6YXnEKhqRyPhl494dkcxx951onSKVezmI+3w==",
- "dev": true,
- "dependencies": {
- "browser-resolve": "^1.7.0",
- "cached-path-relative": "^1.0.2",
- "concat-stream": "~1.6.0",
- "defined": "^1.0.0",
- "detective": "^5.2.0",
- "duplexer2": "^0.1.2",
- "inherits": "^2.0.1",
- "JSONStream": "^1.0.3",
- "parents": "^1.0.0",
- "readable-stream": "^2.0.2",
- "resolve": "^1.4.0",
- "stream-combiner2": "^1.1.1",
- "subarg": "^1.0.0",
- "through2": "^2.0.0",
- "xtend": "^4.0.0"
- },
- "bin": {
- "module-deps": "bin/cmd.js"
+ "node_modules/inquirer": {
+ "version": "7.3.3",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz",
+ "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-escapes": "^4.2.1",
+ "chalk": "^4.1.0",
+ "cli-cursor": "^3.1.0",
+ "cli-width": "^3.0.0",
+ "external-editor": "^3.0.3",
+ "figures": "^3.0.0",
+ "lodash": "^4.17.19",
+ "mute-stream": "0.0.8",
+ "run-async": "^2.4.0",
+ "rxjs": "^6.6.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0",
+ "through": "^2.3.6"
},
"engines": {
- "node": ">= 0.8.0"
+ "node": ">=8.0.0"
}
},
- "node_modules/morgan": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz",
- "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==",
+ "node_modules/inquirer/node_modules/rxjs": {
+ "version": "6.6.7",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
+ "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "basic-auth": "~2.0.1",
- "debug": "2.6.9",
- "depd": "~2.0.0",
- "on-finished": "~2.3.0",
- "on-headers": "~1.0.2"
+ "tslib": "^1.9.0"
},
"engines": {
- "node": ">= 0.8.0"
+ "npm": ">=2.0.0"
}
},
- "node_modules/morgan/node_modules/depd": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
- "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "node_modules/inquirer/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "dev": true,
+ "license": "0BSD"
+ },
+ "node_modules/ip-address": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz",
+ "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "jsbn": "1.1.0",
+ "sprintf-js": "^1.1.3"
+ },
"engines": {
- "node": ">= 0.8"
+ "node": ">= 12"
}
},
- "node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
- },
- "node_modules/mute-stream": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
- "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
- "dev": true
- },
- "node_modules/nanoid": {
- "version": "3.3.3",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz",
- "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==",
+ "node_modules/is-absolute": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
+ "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
"dev": true,
- "bin": {
- "nanoid": "bin/nanoid.cjs"
+ "license": "MIT",
+ "dependencies": {
+ "is-relative": "^1.0.0",
+ "is-windows": "^1.0.1"
},
"engines": {
- "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ "node": ">=0.10.0"
}
},
- "node_modules/natural-compare": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
- "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
- "dev": true
+ "node_modules/is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/negotiator": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
- "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
"engines": {
- "node": ">= 0.6"
+ "node": ">=8"
}
},
- "node_modules/nested-error-stacks": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz",
- "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==",
- "dev": true
+ "node_modules/is-buffer": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz",
+ "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==",
+ "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",
+ "engines": {
+ "node": ">=4"
+ }
},
- "node_modules/new-github-release-url": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/new-github-release-url/-/new-github-release-url-2.0.0.tgz",
- "integrity": "sha512-NHDDGYudnvRutt/VhKFlX26IotXe1w0cmkDm6JGquh5bz/bDTw0LufSmH/GxTjEdpHEO+bVKFTwdrcGa/9XlKQ==",
+ "node_modules/is-core-module": {
+ "version": "2.16.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
+ "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "type-fest": "^2.5.1"
+ "hasown": "^2.0.2"
},
"engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ "node": ">= 0.4"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/new-github-release-url/node_modules/type-fest": {
- "version": "2.19.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
- "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
+ "node_modules/is-docker": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
+ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
"dev": true,
+ "license": "MIT",
+ "bin": {
+ "is-docker": "cli.js"
+ },
"engines": {
- "node": ">=12.20"
+ "node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/node-fetch": {
- "version": "2.6.7",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
- "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true,
- "dependencies": {
- "whatwg-url": "^5.0.0"
- },
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",
+ "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",
+ "dev": true,
+ "license": "MIT",
"engines": {
- "node": "4.x || >=6.0.0"
- },
- "peerDependencies": {
- "encoding": "^0.1.0"
+ "node": ">=12"
},
- "peerDependenciesMeta": {
- "encoding": {
- "optional": true
- }
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/node-http2": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/node-http2/-/node-http2-4.0.1.tgz",
- "integrity": "sha512-AP21BjQsOAMTCJCCkdXUUMa1o7/Qx+yAWHnHZbCf8RhZ+hKMjB9rUkAtnfayk/yGj1qapZ5eBHZJBpk1dqdNlw==",
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "assert": "1.4.1",
- "events": "1.1.1",
- "https-browserify": "0.0.1",
- "setimmediate": "^1.0.5",
- "stream-browserify": "2.0.1",
- "timers-browserify": "2.0.2",
- "url": "^0.11.0",
- "websocket-stream": "^5.0.1"
+ "is-extglob": "^2.1.1"
},
"engines": {
- "node": ">=0.12.0"
+ "node": ">=0.10.0"
}
},
- "node_modules/node-http2/node_modules/assert": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
- "integrity": "sha512-N+aAxov+CKVS3JuhDIQFr24XvZvwE96Wlhk9dytTg/GmwWoghdOvR8dspx8MVz71O+Y0pA3UPqHF68D6iy8UvQ==",
+ "node_modules/is-module": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
+ "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==",
"dev": true,
- "dependencies": {
- "util": "0.10.3"
- }
+ "license": "MIT"
},
- "node_modules/node-http2/node_modules/https-browserify": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz",
- "integrity": "sha512-EjDQFbgJr1vDD/175UJeSX3ncQ3+RUnCL5NkthQGHvF4VNHlzTy8ifJfTqz47qiPRqaFH58+CbuG3x51WuB1XQ==",
- "dev": true
- },
- "node_modules/node-http2/node_modules/inherits": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
- "integrity": "sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==",
- "dev": true
+ "node_modules/is-node-process": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz",
+ "integrity": "sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/node-http2/node_modules/stream-browserify": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
- "integrity": "sha512-nmQnY9D9TlnfQIkYJCCWxvCcQODilFRZIw14gCMYQVXOiY4E1Ze1VMxB+6y3qdXHpTordULo2qWloHmNcNAQYw==",
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
- "dependencies": {
- "inherits": "~2.0.1",
- "readable-stream": "^2.0.2"
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.12.0"
}
},
- "node_modules/node-http2/node_modules/timers-browserify": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.2.tgz",
- "integrity": "sha512-O7UB405+hxP2OWqlBdlUMxZVEdsi8NOWL2c730Cs6zeO1l1AkxygvTm6yC4nTw84iGbFcqxbIkkrdNKzq/3Fvg==",
+ "node_modules/is-plain-obj": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",
+ "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==",
"dev": true,
- "dependencies": {
- "setimmediate": "^1.0.4"
- },
+ "license": "MIT",
"engines": {
- "node": ">=0.6.0"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/node-http2/node_modules/util": {
- "version": "0.10.3",
- "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
- "integrity": "sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==",
+ "node_modules/is-reference": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz",
+ "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "inherits": "2.0.1"
+ "@types/estree": "*"
}
},
- "node_modules/node-modules-regexp": {
+ "node_modules/is-relative": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz",
- "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=",
+ "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
+ "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-unc-path": "^1.0.0"
+ },
"engines": {
"node": ">=0.10.0"
}
},
- "node_modules/node-uuid": {
- "version": "1.4.8",
- "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz",
- "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=",
- "deprecated": "Use uuid module instead",
+ "node_modules/is-ssh": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.0.tgz",
+ "integrity": "sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==",
"dev": true,
- "bin": {
- "uuid": "bin/uuid"
+ "license": "MIT",
+ "dependencies": {
+ "protocols": "^2.0.1"
}
},
- "node_modules/nopt": {
- "version": "3.0.6",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
- "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
+ "node_modules/is-stream": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
+ "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
"dev": true,
- "dependencies": {
- "abbrev": "1"
+ "license": "MIT",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
- "bin": {
- "nopt": "bin/nopt.js"
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/normalize-package-data": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
- "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
+ "node_modules/is-unc-path": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
+ "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "hosted-git-info": "^2.1.4",
- "is-builtin-module": "^1.0.0",
- "semver": "2 || 3 || 4 || 5",
- "validate-npm-package-license": "^3.0.1"
- }
- },
- "node_modules/normalize-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
- "dev": true,
+ "unc-path-regex": "^0.1.2"
+ },
"engines": {
"node": ">=0.10.0"
}
},
- "node_modules/normalize-url": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
- "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",
+ "node_modules/is-windows": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
+ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">=0.10.0"
}
},
- "node_modules/np": {
- "version": "8.0.4",
- "resolved": "https://registry.npmjs.org/np/-/np-8.0.4.tgz",
- "integrity": "sha512-a4s1yESHcIwsrk/oaTekfbhb1R/2z2yyfVLX6Atl54w/9+QR01qeYyK3vMWgJ0UY+kYsGzQXausgvUX0pkmIMg==",
+ "node_modules/is-wsl": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
+ "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "chalk": "^5.2.0",
- "cosmiconfig": "^8.1.3",
- "del": "^7.0.0",
- "escape-goat": "^4.0.0",
- "escape-string-regexp": "^5.0.0",
- "execa": "^7.1.1",
- "exit-hook": "^3.2.0",
- "github-url-from-git": "^1.5.0",
- "has-yarn": "^3.0.0",
- "hosted-git-info": "^6.1.1",
- "ignore-walk": "^6.0.3",
- "import-local": "^3.1.0",
- "inquirer": "^9.2.6",
- "is-installed-globally": "^0.4.0",
- "is-interactive": "^2.0.0",
- "is-scoped": "^3.0.0",
- "issue-regex": "^4.1.0",
- "listr": "^0.14.3",
- "listr-input": "^0.2.1",
- "log-symbols": "^5.1.0",
- "meow": "^12.0.1",
- "new-github-release-url": "^2.0.0",
- "npm-name": "^7.1.0",
- "onetime": "^6.0.0",
- "open": "^9.1.0",
- "ow": "^1.1.1",
- "p-memoize": "^7.1.1",
- "p-timeout": "^6.1.1",
- "path-exists": "^5.0.0",
- "pkg-dir": "^7.0.0",
- "read-pkg-up": "^9.1.0",
- "rxjs": "^7.8.1",
- "semver": "^7.5.1",
- "symbol-observable": "^4.0.0",
- "terminal-link": "^3.0.0",
- "update-notifier": "^6.0.2"
- },
- "bin": {
- "np": "source/cli.js"
+ "is-docker": "^2.0.0"
},
"engines": {
- "git": ">=2.11.0",
- "node": ">=16.6.0",
- "npm": ">=7.19.0",
- "yarn": ">=1.7.0"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/np?sponsor=1"
+ "node": ">=8"
}
},
- "node_modules/np/node_modules/ansi-escapes": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
- "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==",
+ "node_modules/isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
"dev": true,
- "engines": {
- "node": ">=4"
- }
+ "license": "MIT"
},
- "node_modules/np/node_modules/ansi-regex": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz",
- "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==",
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"dev": true,
- "engines": {
- "node": ">=4"
- }
+ "license": "ISC"
},
- "node_modules/np/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "node_modules/jackspeak": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
+ "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
"dev": true,
+ "license": "BlueOak-1.0.0",
"dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
+ "@isaacs/cliui": "^8.0.2"
},
"funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ "url": "https://github.com/sponsors/isaacs"
+ },
+ "optionalDependencies": {
+ "@pkgjs/parseargs": "^0.11.0"
}
},
- "node_modules/np/node_modules/argparse": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "dev": true
+ "node_modules/js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/np/node_modules/chalk": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
- "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+ "node_modules/js-yaml": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dev": true,
- "engines": {
- "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ "license": "MIT",
+ "dependencies": {
+ "argparse": "^2.0.1"
},
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
}
},
- "node_modules/np/node_modules/cli-cursor": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
- "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==",
+ "node_modules/jsbn": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz",
+ "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==",
"dev": true,
- "dependencies": {
- "restore-cursor": "^2.0.0"
- },
+ "license": "MIT"
+ },
+ "node_modules/jsdoc-type-pratt-parser": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz",
+ "integrity": "sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==",
+ "dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=4"
+ "node": ">=12.0.0"
}
},
- "node_modules/np/node_modules/cli-spinners": {
- "version": "2.9.0",
- "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz",
- "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==",
+ "node_modules/jsesc": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
+ "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
"dev": true,
+ "license": "MIT",
+ "bin": {
+ "jsesc": "bin/jsesc"
+ },
"engines": {
"node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/np/node_modules/cli-width": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.0.0.tgz",
- "integrity": "sha512-ZksGS2xpa/bYkNzN3BAw1wEjsLV/ZKOf/CCrJ/QOBsxx6fOARIkwTutxp1XIOIohi6HKmOFjMoK/XaqDVUpEEw==",
+ "node_modules/json-buffer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
"dev": true,
- "engines": {
- "node": ">= 12"
- }
+ "license": "MIT"
},
- "node_modules/np/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "node_modules/json-fixer": {
+ "version": "1.6.15",
+ "resolved": "https://registry.npmjs.org/json-fixer/-/json-fixer-1.6.15.tgz",
+ "integrity": "sha512-TuDuZ5KrgyjoCIppdPXBMqiGfota55+odM+j2cQ5rt/XKyKmqGB3Whz1F8SN8+60yYGy/Nu5lbRZ+rx8kBIvBw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-name": "~1.1.4"
+ "@babel/runtime": "^7.18.9",
+ "chalk": "^4.1.2",
+ "pegjs": "^0.10.0"
},
"engines": {
- "node": ">=7.0.0"
+ "node": ">=10"
}
},
- "node_modules/np/node_modules/cosmiconfig": {
- "version": "8.2.0",
- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.2.0.tgz",
- "integrity": "sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==",
+ "node_modules/json-parse-even-better-errors": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true,
- "dependencies": {
- "import-fresh": "^3.2.1",
- "js-yaml": "^4.1.0",
- "parse-json": "^5.0.0",
- "path-type": "^4.0.0"
+ "license": "MIT"
+ },
+ "node_modules/json-stable-stringify-without-jsonify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/json5": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "json5": "lib/cli.js"
},
"engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/d-fischer"
+ "node": ">=6"
}
},
- "node_modules/np/node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "node_modules/np/node_modules/escape-string-regexp": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
- "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
+ "node_modules/jszip": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz",
+ "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==",
"dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "license": "(MIT OR GPL-3.0-or-later)",
+ "dependencies": {
+ "lie": "~3.3.0",
+ "pako": "~1.0.2",
+ "readable-stream": "~2.3.6",
+ "setimmediate": "^1.0.5"
}
},
- "node_modules/np/node_modules/exit-hook": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-3.2.0.tgz",
- "integrity": "sha512-aIQN7Q04HGAV/I5BszisuHTZHXNoC23WtLkxdCLuYZMdWviRD0TMIt2bnUBi9MrHaF/hH8b3gwG9iaAUHKnJGA==",
+ "node_modules/jszip/node_modules/pako": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
+ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
"dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "license": "(MIT AND Zlib)"
+ },
+ "node_modules/jszip/node_modules/readable-stream": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
+ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
}
},
- "node_modules/np/node_modules/find-up": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz",
- "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==",
+ "node_modules/jszip/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/jszip/node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "locate-path": "^7.1.0",
- "path-exists": "^5.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "safe-buffer": "~5.1.0"
}
},
- "node_modules/np/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "node_modules/keyv": {
+ "version": "4.5.4",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
"dev": true,
- "engines": {
- "node": ">=8"
+ "license": "MIT",
+ "dependencies": {
+ "json-buffer": "3.0.1"
}
},
- "node_modules/np/node_modules/hosted-git-info": {
- "version": "6.1.1",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz",
- "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==",
+ "node_modules/kleur": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
+ "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
"dev": true,
- "dependencies": {
- "lru-cache": "^7.5.1"
- },
+ "license": "MIT",
"engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ "node": ">=6"
}
},
- "node_modules/np/node_modules/indent-string": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
- "integrity": "sha512-BYqTHXTGUIvg7t1r4sJNKcbDZkL92nkXA8YtRpbjFHRHGDL/NtUeiBJMeE60kIFN/Mg8ESaWQvftaYMGJzQZCQ==",
+ "node_modules/konan": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/konan/-/konan-2.1.1.tgz",
+ "integrity": "sha512-7ZhYV84UzJ0PR/RJnnsMZcAbn+kLasJhVNWsu8ZyVEJYRpGA5XESQ9d/7zOa08U0Ou4cmB++hMNY/3OSV9KIbg==",
"dev": true,
- "engines": {
- "node": ">=4"
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.10.5",
+ "@babel/traverse": "^7.10.5"
}
},
- "node_modules/np/node_modules/inquirer": {
- "version": "9.2.7",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.7.tgz",
- "integrity": "sha512-Bf52lnfvNxGPJPltiNO2tLBp3zC339KNlGMqOkW+dsvNikBhcVDK5kqU2lVX2FTPzuXUFX5WJDlsw//w3ZwoTw==",
+ "node_modules/lazystream": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz",
+ "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-escapes": "^4.3.2",
- "chalk": "^5.2.0",
- "cli-cursor": "^3.1.0",
- "cli-width": "^4.0.0",
- "external-editor": "^3.0.3",
- "figures": "^5.0.0",
- "lodash": "^4.17.21",
- "mute-stream": "1.0.0",
- "ora": "^5.4.1",
- "run-async": "^3.0.0",
- "rxjs": "^7.8.1",
- "string-width": "^4.2.3",
- "strip-ansi": "^6.0.1",
- "through": "^2.3.6",
- "wrap-ansi": "^6.0.1"
+ "readable-stream": "^2.0.5"
},
"engines": {
- "node": ">=14.18.0"
+ "node": ">= 0.6.3"
}
},
- "node_modules/np/node_modules/inquirer/node_modules/ansi-escapes": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
- "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
+ "node_modules/lazystream/node_modules/readable-stream": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
+ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "type-fest": "^0.21.3"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
}
},
- "node_modules/np/node_modules/inquirer/node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "node_modules/lazystream/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true,
- "engines": {
- "node": ">=8"
- }
+ "license": "MIT"
},
- "node_modules/np/node_modules/inquirer/node_modules/cli-cursor": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
- "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
+ "node_modules/lazystream/node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "restore-cursor": "^3.1.0"
- },
- "engines": {
- "node": ">=8"
+ "safe-buffer": "~5.1.0"
}
},
- "node_modules/np/node_modules/inquirer/node_modules/figures": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz",
- "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==",
+ "node_modules/levn": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "escape-string-regexp": "^5.0.0",
- "is-unicode-supported": "^1.2.0"
+ "prelude-ls": "^1.2.1",
+ "type-check": "~0.4.0"
},
"engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">= 0.8.0"
}
},
- "node_modules/np/node_modules/inquirer/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "node_modules/libtess": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/libtess/-/libtess-1.2.2.tgz",
+ "integrity": "sha512-Nps8HPeVVcsmJxUvFLKVJcCgcz+1ajPTXDVAVPs6+giOQP4AHV31uZFFkh+CKow/bkB7GbZWKmwmit7myaqDSw==",
+ "license": "SGI-B-2.0"
+ },
+ "node_modules/lie": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
+ "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
"dev": true,
- "engines": {
- "node": ">=8"
+ "license": "MIT",
+ "dependencies": {
+ "immediate": "~3.0.5"
}
},
- "node_modules/np/node_modules/inquirer/node_modules/is-unicode-supported": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
- "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",
+ "node_modules/lilconfig": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz",
+ "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=12"
+ "node": ">=14"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "url": "https://github.com/sponsors/antonk52"
}
},
- "node_modules/np/node_modules/inquirer/node_modules/mimic-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "node_modules/lines-and-columns": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
"dev": true,
- "engines": {
- "node": ">=6"
- }
+ "license": "MIT"
},
- "node_modules/np/node_modules/inquirer/node_modules/onetime": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
- "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
- "dev": true,
- "dependencies": {
- "mimic-fn": "^2.1.0"
+ "node_modules/lint-staged": {
+ "version": "15.4.3",
+ "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.4.3.tgz",
+ "integrity": "sha512-FoH1vOeouNh1pw+90S+cnuoFwRfUD9ijY2GKy5h7HS3OR7JVir2N2xrsa0+Twc1B7cW72L+88geG5cW4wIhn7g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "chalk": "^5.4.1",
+ "commander": "^13.1.0",
+ "debug": "^4.4.0",
+ "execa": "^8.0.1",
+ "lilconfig": "^3.1.3",
+ "listr2": "^8.2.5",
+ "micromatch": "^4.0.8",
+ "pidtree": "^0.6.0",
+ "string-argv": "^0.3.2",
+ "yaml": "^2.7.0"
+ },
+ "bin": {
+ "lint-staged": "bin/lint-staged.js"
},
"engines": {
- "node": ">=6"
+ "node": ">=18.12.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "url": "https://opencollective.com/lint-staged"
}
},
- "node_modules/np/node_modules/inquirer/node_modules/restore-cursor": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
- "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
+ "node_modules/lint-staged/node_modules/chalk": {
+ "version": "5.4.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz",
+ "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==",
"dev": true,
- "dependencies": {
- "onetime": "^5.1.0",
- "signal-exit": "^3.0.2"
- },
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
}
},
- "node_modules/np/node_modules/inquirer/node_modules/string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "node_modules/lint-staged/node_modules/yaml": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz",
+ "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==",
"dev": true,
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
+ "license": "ISC",
+ "bin": {
+ "yaml": "bin.mjs"
},
"engines": {
- "node": ">=8"
+ "node": ">= 14"
}
},
- "node_modules/np/node_modules/inquirer/node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "node_modules/listr2": {
+ "version": "8.2.5",
+ "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.5.tgz",
+ "integrity": "sha512-iyAZCeyD+c1gPyE9qpFu8af0Y+MRtmKOncdGoA2S5EY8iFq99dmmvkNnHiWo+pj0s7yH7l3KPIgee77tKpXPWQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^5.0.1"
+ "cli-truncate": "^4.0.0",
+ "colorette": "^2.0.20",
+ "eventemitter3": "^5.0.1",
+ "log-update": "^6.1.0",
+ "rfdc": "^1.4.1",
+ "wrap-ansi": "^9.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=18.0.0"
}
},
- "node_modules/np/node_modules/inquirer/node_modules/wrap-ansi": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
- "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+ "node_modules/locate-app": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/locate-app/-/locate-app-2.5.0.tgz",
+ "integrity": "sha512-xIqbzPMBYArJRmPGUZD9CzV9wOqmVtQnaAn3wrj3s6WYW0bQvPI7x+sPYUGmDTYMHefVK//zc6HEYZ1qnxIK+Q==",
"dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://buymeacoffee.com/hejny"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/hejny/locate-app/blob/main/README.md#%EF%B8%8F-contributing"
+ }
+ ],
+ "license": "Apache-2.0",
"dependencies": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
+ "@promptbook/utils": "0.69.5",
+ "type-fest": "4.26.0",
+ "userhome": "1.0.1"
}
},
- "node_modules/np/node_modules/is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==",
+ "node_modules/locate-app/node_modules/type-fest": {
+ "version": "4.26.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.26.0.tgz",
+ "integrity": "sha512-OduNjVJsFbifKb57UqZ2EMP1i4u64Xwow3NYXUtBbD4vIwJdQd4+xl8YDou1dlm4DVrtwT/7Ky8z8WyCULVfxw==",
"dev": true,
+ "license": "(MIT OR CC0-1.0)",
"engines": {
- "node": ">=4"
+ "node": ">=16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/np/node_modules/is-wsl": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
- "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
+ "node_modules/locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "is-docker": "^2.0.0"
+ "p-locate": "^5.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/np/node_modules/js-yaml": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true,
- "dependencies": {
- "argparse": "^2.0.1"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- }
+ "license": "MIT"
+ },
+ "node_modules/lodash.clonedeep": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
+ "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/lodash.merge": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/np/node_modules/listr": {
- "version": "0.14.3",
- "resolved": "https://registry.npmjs.org/listr/-/listr-0.14.3.tgz",
- "integrity": "sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA==",
+ "node_modules/lodash.zip": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz",
+ "integrity": "sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/log-update": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz",
+ "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@samverschueren/stream-to-observable": "^0.3.0",
- "is-observable": "^1.1.0",
- "is-promise": "^2.1.0",
- "is-stream": "^1.1.0",
- "listr-silent-renderer": "^1.1.1",
- "listr-update-renderer": "^0.5.0",
- "listr-verbose-renderer": "^0.5.0",
- "p-map": "^2.0.0",
- "rxjs": "^6.3.3"
+ "ansi-escapes": "^7.0.0",
+ "cli-cursor": "^5.0.0",
+ "slice-ansi": "^7.1.0",
+ "strip-ansi": "^7.1.0",
+ "wrap-ansi": "^9.0.0"
},
"engines": {
- "node": ">=6"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/np/node_modules/listr-update-renderer": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz",
- "integrity": "sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA==",
+ "node_modules/log-update/node_modules/ansi-escapes": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz",
+ "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "chalk": "^1.1.3",
- "cli-truncate": "^0.2.1",
- "elegant-spinner": "^1.0.1",
- "figures": "^1.7.0",
- "indent-string": "^3.0.0",
- "log-symbols": "^1.0.2",
- "log-update": "^2.3.0",
- "strip-ansi": "^3.0.1"
+ "environment": "^1.0.0"
},
"engines": {
- "node": ">=6"
+ "node": ">=18"
},
- "peerDependencies": {
- "listr": "^0.14.2"
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/np/node_modules/listr-update-renderer/node_modules/ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==",
+ "node_modules/log-update/node_modules/ansi-regex": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
+ "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
}
},
- "node_modules/np/node_modules/listr-update-renderer/node_modules/chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==",
+ "node_modules/log-update/node_modules/ansi-styles": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+ "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
"dev": true,
- "dependencies": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/np/node_modules/listr-update-renderer/node_modules/escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "node_modules/log-update/node_modules/cli-cursor": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz",
+ "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "restore-cursor": "^5.0.0"
+ },
"engines": {
- "node": ">=0.8.0"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/np/node_modules/listr-update-renderer/node_modules/log-symbols": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz",
- "integrity": "sha512-mmPrW0Fh2fxOzdBbFv4g1m6pR72haFLPJ2G5SJEELf1y+iaQrDG6cWCPjy54RHYbZAt7X+ls690Kw62AdWXBzQ==",
+ "node_modules/log-update/node_modules/is-fullwidth-code-point": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz",
+ "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "chalk": "^1.0.0"
+ "get-east-asian-width": "^1.0.0"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/np/node_modules/listr-update-renderer/node_modules/supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==",
+ "node_modules/log-update/node_modules/onetime": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz",
+ "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "mimic-function": "^5.0.0"
+ },
"engines": {
- "node": ">=0.8.0"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/np/node_modules/listr-verbose-renderer": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz",
- "integrity": "sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw==",
+ "node_modules/log-update/node_modules/restore-cursor": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz",
+ "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "chalk": "^2.4.1",
- "cli-cursor": "^2.1.0",
- "date-fns": "^1.27.2",
- "figures": "^2.0.0"
+ "onetime": "^7.0.0",
+ "signal-exit": "^4.1.0"
},
"engines": {
- "node": ">=4"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/np/node_modules/listr-verbose-renderer/node_modules/ansi-styles": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "node_modules/log-update/node_modules/slice-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz",
+ "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "color-convert": "^1.9.0"
+ "ansi-styles": "^6.2.1",
+ "is-fullwidth-code-point": "^5.0.0"
},
"engines": {
- "node": ">=4"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/slice-ansi?sponsor=1"
}
},
- "node_modules/np/node_modules/listr-verbose-renderer/node_modules/chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "node_modules/log-update/node_modules/strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
+ "ansi-regex": "^6.0.1"
},
"engines": {
- "node": ">=4"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
- "node_modules/np/node_modules/listr-verbose-renderer/node_modules/color-convert": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
- "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "node_modules/loglevel": {
+ "version": "1.9.2",
+ "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz",
+ "integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==",
"dev": true,
- "dependencies": {
- "color-name": "1.1.3"
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6.0"
+ },
+ "funding": {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/loglevel"
}
},
- "node_modules/np/node_modules/listr-verbose-renderer/node_modules/color-name": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
- "dev": true
+ "node_modules/loglevel-plugin-prefix": {
+ "version": "0.8.4",
+ "resolved": "https://registry.npmjs.org/loglevel-plugin-prefix/-/loglevel-plugin-prefix-0.8.4.tgz",
+ "integrity": "sha512-WpG9CcFAOjz/FtNht+QJeGpvVl/cdR6P0z6OcXSkr8wFJOsV2GRj2j10JLfjuA4aYkcKCNIEqRGCyTife9R8/g==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/np/node_modules/listr-verbose-renderer/node_modules/escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "node_modules/longest-streak": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz",
+ "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==",
"dev": true,
- "engines": {
- "node": ">=0.8.0"
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/np/node_modules/listr-verbose-renderer/node_modules/figures": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
- "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==",
+ "node_modules/loupe": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz",
+ "integrity": "sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/lru-cache": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "escape-string-regexp": "^1.0.5"
- },
- "engines": {
- "node": ">=4"
+ "yallist": "^3.0.2"
}
},
- "node_modules/np/node_modules/listr-verbose-renderer/node_modules/has-flag": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "node_modules/lz-string": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz",
+ "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",
"dev": true,
- "engines": {
- "node": ">=4"
+ "license": "MIT",
+ "bin": {
+ "lz-string": "bin/bin.js"
}
},
- "node_modules/np/node_modules/listr-verbose-renderer/node_modules/supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "node_modules/magic-string": {
+ "version": "0.30.17",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz",
+ "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "has-flag": "^3.0.0"
- },
- "engines": {
- "node": ">=4"
+ "@jridgewell/sourcemap-codec": "^1.5.0"
}
},
- "node_modules/np/node_modules/listr/node_modules/rxjs": {
- "version": "6.6.7",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
- "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
+ "node_modules/map-cache": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
+ "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==",
"dev": true,
- "dependencies": {
- "tslib": "^1.9.0"
- },
+ "license": "MIT",
"engines": {
- "npm": ">=2.0.0"
+ "node": ">=0.10.0"
}
},
- "node_modules/np/node_modules/locate-path": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz",
- "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==",
+ "node_modules/markdown-table": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz",
+ "integrity": "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
+ "node_modules/mdast-util-definitions": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz",
+ "integrity": "sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "p-locate": "^6.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ "@types/mdast": "^3.0.0",
+ "@types/unist": "^2.0.0",
+ "unist-util-visit": "^4.0.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/log-symbols": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz",
- "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==",
+ "node_modules/mdast-util-find-and-replace": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-2.2.2.tgz",
+ "integrity": "sha512-MTtdFRz/eMDHXzeK6W3dO7mXUlF82Gom4y0oOgvHhh/HXZAGvIQDUvQ0SuUx+j2tv44b8xTHOm8K/9OoRFnXKw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "chalk": "^5.0.0",
- "is-unicode-supported": "^1.1.0"
- },
- "engines": {
- "node": ">=12"
+ "@types/mdast": "^3.0.0",
+ "escape-string-regexp": "^5.0.0",
+ "unist-util-is": "^5.0.0",
+ "unist-util-visit-parents": "^5.0.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/log-symbols/node_modules/is-unicode-supported": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
- "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",
+ "node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
+ "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=12"
},
@@ -12517,67 +8360,87 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/np/node_modules/log-update": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/log-update/-/log-update-2.3.0.tgz",
- "integrity": "sha512-vlP11XfFGyeNQlmEn9tJ66rEW1coA/79m5z6BCkudjbAGE83uhAcGYrBFwfs3AdLiLzGRusRPAbSPK9xZteCmg==",
+ "node_modules/mdast-util-from-markdown": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz",
+ "integrity": "sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-escapes": "^3.0.0",
- "cli-cursor": "^2.0.0",
- "wrap-ansi": "^3.0.1"
+ "@types/mdast": "^3.0.0",
+ "@types/unist": "^2.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "mdast-util-to-string": "^3.1.0",
+ "micromark": "^3.0.0",
+ "micromark-util-decode-numeric-character-reference": "^1.0.0",
+ "micromark-util-decode-string": "^1.0.0",
+ "micromark-util-normalize-identifier": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.0",
+ "unist-util-stringify-position": "^3.0.0",
+ "uvu": "^0.5.0"
},
- "engines": {
- "node": ">=4"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/lru-cache": {
- "version": "7.18.3",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
- "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
+ "node_modules/mdast-util-from-markdown/node_modules/mdast-util-to-string": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz",
+ "integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==",
"dev": true,
- "engines": {
- "node": ">=12"
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/mimic-fn": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
- "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
+ "node_modules/mdast-util-frontmatter": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-2.0.1.tgz",
+ "integrity": "sha512-LRqI9+wdgC25P0URIJY9vwocIzCcksduHQ9OF2joxQoyTNVduwLAFUzjoopuRJbJAReaKrNQKAZKL3uCMugWJA==",
"dev": true,
- "engines": {
- "node": ">=4"
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^4.0.0",
+ "devlop": "^1.0.0",
+ "escape-string-regexp": "^5.0.0",
+ "mdast-util-from-markdown": "^2.0.0",
+ "mdast-util-to-markdown": "^2.0.0",
+ "micromark-extension-frontmatter": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/mute-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz",
- "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==",
+ "node_modules/mdast-util-frontmatter/node_modules/@types/mdast": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz",
+ "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==",
"dev": true,
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "*"
}
},
- "node_modules/np/node_modules/onetime": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
- "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
+ "node_modules/mdast-util-frontmatter/node_modules/@types/unist": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
+ "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==",
"dev": true,
- "dependencies": {
- "mimic-fn": "^4.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
+ "license": "MIT"
},
- "node_modules/np/node_modules/onetime/node_modules/mimic-fn": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
- "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+ "node_modules/mdast-util-frontmatter/node_modules/escape-string-regexp": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
+ "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=12"
},
@@ -12585,1418 +8448,2042 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/np/node_modules/open": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz",
- "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==",
+ "node_modules/mdast-util-frontmatter/node_modules/mdast-util-from-markdown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz",
+ "integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "default-browser": "^4.0.0",
- "define-lazy-prop": "^3.0.0",
- "is-inside-container": "^1.0.0",
- "is-wsl": "^2.2.0"
- },
- "engines": {
- "node": ">=14.16"
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "mdast-util-to-string": "^4.0.0",
+ "micromark": "^4.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-decode-string": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0",
+ "unist-util-stringify-position": "^4.0.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/ora": {
- "version": "5.4.1",
- "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz",
- "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==",
+ "node_modules/mdast-util-frontmatter/node_modules/mdast-util-phrasing": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz",
+ "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "bl": "^4.1.0",
- "chalk": "^4.1.0",
- "cli-cursor": "^3.1.0",
- "cli-spinners": "^2.5.0",
- "is-interactive": "^1.0.0",
- "is-unicode-supported": "^0.1.0",
- "log-symbols": "^4.1.0",
- "strip-ansi": "^6.0.0",
- "wcwidth": "^1.0.1"
- },
- "engines": {
- "node": ">=10"
+ "@types/mdast": "^4.0.0",
+ "unist-util-is": "^6.0.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/np/node_modules/ora/node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "dev": true,
- "engines": {
- "node": ">=8"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/ora/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "node_modules/mdast-util-frontmatter/node_modules/mdast-util-to-markdown": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.1.2.tgz",
+ "integrity": "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
+ "@types/mdast": "^4.0.0",
+ "@types/unist": "^3.0.0",
+ "longest-streak": "^3.0.0",
+ "mdast-util-phrasing": "^4.0.0",
+ "mdast-util-to-string": "^4.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-decode-string": "^2.0.0",
+ "unist-util-visit": "^5.0.0",
+ "zwitch": "^2.0.0"
},
"funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/ora/node_modules/cli-cursor": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
- "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
+ "node_modules/mdast-util-frontmatter/node_modules/mdast-util-to-string": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz",
+ "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "restore-cursor": "^3.1.0"
+ "@types/mdast": "^4.0.0"
},
- "engines": {
- "node": ">=8"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/ora/node_modules/is-interactive": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",
- "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz",
+ "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==",
"dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/np/node_modules/ora/node_modules/log-symbols": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
- "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@types/debug": "^4.0.0",
+ "debug": "^4.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-core-commonmark": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-combine-extensions": "^2.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-encode": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-sanitize-uri": "^2.0.0",
+ "micromark-util-subtokenize": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-core-commonmark": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz",
+ "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decode-named-character-reference": "^1.0.0",
+ "devlop": "^1.0.0",
+ "micromark-factory-destination": "^2.0.0",
+ "micromark-factory-label": "^2.0.0",
+ "micromark-factory-space": "^2.0.0",
+ "micromark-factory-title": "^2.0.0",
+ "micromark-factory-whitespace": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-classify-character": "^2.0.0",
+ "micromark-util-html-tag-name": "^2.0.0",
+ "micromark-util-normalize-identifier": "^2.0.0",
+ "micromark-util-resolve-all": "^2.0.0",
+ "micromark-util-subtokenize": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
+ }
+ },
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-factory-destination": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz",
+ "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "chalk": "^4.1.0",
- "is-unicode-supported": "^0.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/np/node_modules/ora/node_modules/mimic-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-factory-label": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz",
+ "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==",
"dev": true,
- "engines": {
- "node": ">=6"
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "devlop": "^1.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/np/node_modules/ora/node_modules/onetime": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
- "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-factory-space": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.0.1.tgz",
+ "integrity": "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "mimic-fn": "^2.1.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/np/node_modules/ora/node_modules/restore-cursor": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
- "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-factory-title": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz",
+ "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "onetime": "^5.1.0",
- "signal-exit": "^3.0.2"
- },
- "engines": {
- "node": ">=8"
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/np/node_modules/ora/node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-factory-whitespace": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz",
+ "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
+ "micromark-factory-space": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/np/node_modules/p-limit": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
- "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-character": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz",
+ "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "yocto-queue": "^1.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/np/node_modules/p-locate": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz",
- "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-chunked": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz",
+ "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "p-limit": "^4.0.0"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "micromark-util-symbol": "^2.0.0"
}
},
- "node_modules/np/node_modules/p-map": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz",
- "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-classify-character": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz",
+ "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==",
"dev": true,
- "engines": {
- "node": ">=6"
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/np/node_modules/parse-json": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
- "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-combine-extensions": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz",
+ "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "@babel/code-frame": "^7.0.0",
- "error-ex": "^1.3.1",
- "json-parse-even-better-errors": "^2.3.0",
- "lines-and-columns": "^1.1.6"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/np/node_modules/path-exists": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
- "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-decode-numeric-character-reference": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz",
+ "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==",
"dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0"
}
},
- "node_modules/np/node_modules/pkg-dir": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz",
- "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-decode-string": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz",
+ "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "find-up": "^6.3.0"
- },
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "decode-named-character-reference": "^1.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-decode-numeric-character-reference": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0"
}
},
- "node_modules/np/node_modules/restore-cursor": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
- "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-encode": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz",
+ "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-html-tag-name": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz",
+ "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-normalize-identifier": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz",
+ "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "onetime": "^2.0.0",
- "signal-exit": "^3.0.2"
- },
- "engines": {
- "node": ">=4"
+ "micromark-util-symbol": "^2.0.0"
}
},
- "node_modules/np/node_modules/restore-cursor/node_modules/onetime": {
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-resolve-all": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
- "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==",
+ "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz",
+ "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "mimic-fn": "^1.0.0"
- },
- "engines": {
- "node": ">=4"
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/np/node_modules/run-async": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz",
- "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-sanitize-uri": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz",
+ "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==",
"dev": true,
- "engines": {
- "node": ">=0.12.0"
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-encode": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0"
}
},
- "node_modules/np/node_modules/rxjs": {
- "version": "7.8.1",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
- "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-subtokenize": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz",
+ "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "tslib": "^2.1.0"
+ "devlop": "^1.0.0",
+ "micromark-util-chunked": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/np/node_modules/rxjs/node_modules/tslib": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",
- "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==",
- "dev": true
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-symbol": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz",
+ "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
},
- "node_modules/np/node_modules/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "node_modules/mdast-util-frontmatter/node_modules/micromark-util-types": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz",
+ "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==",
"dev": true,
- "dependencies": {
- "lru-cache": "^6.0.0"
- },
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
},
- "node_modules/np/node_modules/semver/node_modules/lru-cache": {
+ "node_modules/mdast-util-frontmatter/node_modules/unist-util-is": {
"version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz",
+ "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "yallist": "^4.0.0"
+ "@types/unist": "^3.0.0"
},
- "engines": {
- "node": ">=10"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/string-width": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
- "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+ "node_modules/mdast-util-frontmatter/node_modules/unist-util-stringify-position": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz",
+ "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^4.0.0"
+ "@types/unist": "^3.0.0"
},
- "engines": {
- "node": ">=4"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/string-width/node_modules/strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==",
+ "node_modules/mdast-util-frontmatter/node_modules/unist-util-visit": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz",
+ "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^3.0.0"
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0",
+ "unist-util-visit-parents": "^6.0.0"
},
- "engines": {
- "node": ">=4"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "node_modules/mdast-util-frontmatter/node_modules/unist-util-visit-parents": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz",
+ "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "has-flag": "^4.0.0"
+ "@types/unist": "^3.0.0",
+ "unist-util-is": "^6.0.0"
},
- "engines": {
- "node": ">=8"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/symbol-observable": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz",
- "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==",
+ "node_modules/mdast-util-gfm": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-2.0.2.tgz",
+ "integrity": "sha512-qvZ608nBppZ4icQlhQQIAdc6S3Ffj9RGmzwUKUWuEICFnd1LVkN3EktF7ZHAgfcEdvZB5owU9tQgt99e2TlLjg==",
"dev": true,
- "engines": {
- "node": ">=0.10"
+ "license": "MIT",
+ "dependencies": {
+ "mdast-util-from-markdown": "^1.0.0",
+ "mdast-util-gfm-autolink-literal": "^1.0.0",
+ "mdast-util-gfm-footnote": "^1.0.0",
+ "mdast-util-gfm-strikethrough": "^1.0.0",
+ "mdast-util-gfm-table": "^1.0.0",
+ "mdast-util-gfm-task-list-item": "^1.0.0",
+ "mdast-util-to-markdown": "^1.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/wrap-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz",
- "integrity": "sha512-iXR3tDXpbnTpzjKSylUJRkLuOrEC7hwEB221cgn6wtF8wpmz28puFXAEfPT5zrjM3wahygB//VuWEr1vTkDcNQ==",
+ "node_modules/mdast-util-gfm-autolink-literal": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.3.tgz",
+ "integrity": "sha512-My8KJ57FYEy2W2LyNom4n3E7hKTuQk/0SES0u16tjA9Z3oFkF4RrC/hPAPgjlSpezsOvI8ObcXcElo92wn5IGA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "string-width": "^2.1.1",
- "strip-ansi": "^4.0.0"
+ "@types/mdast": "^3.0.0",
+ "ccount": "^2.0.0",
+ "mdast-util-find-and-replace": "^2.0.0",
+ "micromark-util-character": "^1.0.0"
},
- "engines": {
- "node": ">=4"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/wrap-ansi/node_modules/strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==",
+ "node_modules/mdast-util-gfm-footnote": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-1.0.2.tgz",
+ "integrity": "sha512-56D19KOGbE00uKVj3sgIykpwKL179QsVFwx/DCW0u/0+URsryacI4MAdNJl0dh+u2PSsD9FtxPFbHCzJ78qJFQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^3.0.0"
+ "@types/mdast": "^3.0.0",
+ "mdast-util-to-markdown": "^1.3.0",
+ "micromark-util-normalize-identifier": "^1.0.0"
},
- "engines": {
- "node": ">=4"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/np/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
- },
- "node_modules/np/node_modules/yocto-queue": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz",
- "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==",
+ "node_modules/mdast-util-gfm-strikethrough": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-1.0.3.tgz",
+ "integrity": "sha512-DAPhYzTYrRcXdMjUtUjKvW9z/FNAMTdU0ORyMcbmkwYNbKocDpdk+PX1L1dQgOID/+vVs1uBQ7ElrBQfZ0cuiQ==",
"dev": true,
- "engines": {
- "node": ">=12.20"
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^3.0.0",
+ "mdast-util-to-markdown": "^1.3.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/npm-name": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/npm-name/-/npm-name-7.1.0.tgz",
- "integrity": "sha512-0Sxf+7tQUOkQ9HuYVSdvq7gZNAOPp1ZJjHiKzpJhsQw9m1YjNfARC0SxWuuUWefChsbvu+DWrwWFfGQWLHmLjg==",
+ "node_modules/mdast-util-gfm-table": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-1.0.7.tgz",
+ "integrity": "sha512-jjcpmNnQvrmN5Vx7y7lEc2iIOEytYv7rTvu+MeyAsSHTASGCCRA79Igg2uKssgOs1i1po8s3plW0sTu1wkkLGg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "got": "^11.8.5",
- "is-name-taken": "^2.0.0",
- "is-scoped": "^3.0.0",
- "is-url-superb": "^6.1.0",
- "lodash.zip": "^4.2.0",
- "org-regex": "^1.0.0",
- "p-map": "^5.5.0",
- "registry-auth-token": "^4.2.2",
- "registry-url": "^6.0.1",
- "validate-npm-package-name": "^3.0.0"
- },
- "engines": {
- "node": ">=12"
+ "@types/mdast": "^3.0.0",
+ "markdown-table": "^3.0.0",
+ "mdast-util-from-markdown": "^1.0.0",
+ "mdast-util-to-markdown": "^1.3.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/npm-name/node_modules/p-map": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz",
- "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==",
+ "node_modules/mdast-util-gfm-task-list-item": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-1.0.2.tgz",
+ "integrity": "sha512-PFTA1gzfp1B1UaiJVyhJZA1rm0+Tzn690frc/L8vNX1Jop4STZgOE6bxUhnzdVSB+vm2GU1tIsuQcA9bxTQpMQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "aggregate-error": "^4.0.0"
- },
- "engines": {
- "node": ">=12"
+ "@types/mdast": "^3.0.0",
+ "mdast-util-to-markdown": "^1.3.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/npm-path": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/npm-path/-/npm-path-2.0.4.tgz",
- "integrity": "sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw==",
+ "node_modules/mdast-util-inject": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-inject/-/mdast-util-inject-1.1.0.tgz",
+ "integrity": "sha512-CcJ0mHa36QYumDKiZ2OIR+ClhfOM7zIzN+Wfy8tRZ1hpH9DKLCS+Mh4DyK5bCxzE9uxMWcbIpeNFWsg1zrj/2g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "which": "^1.2.10"
- },
- "bin": {
- "npm-path": "bin/npm-path"
- },
- "engines": {
- "node": ">=0.8"
+ "mdast-util-to-string": "^1.0.0"
}
},
- "node_modules/npm-run-path": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
- "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
+ "node_modules/mdast-util-phrasing": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-3.0.1.tgz",
+ "integrity": "sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "path-key": "^2.0.0"
+ "@types/mdast": "^3.0.0",
+ "unist-util-is": "^5.0.0"
},
- "engines": {
- "node": ">=4"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/npm-which": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/npm-which/-/npm-which-3.0.1.tgz",
- "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=",
+ "node_modules/mdast-util-to-hast": {
+ "version": "12.3.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-12.3.0.tgz",
+ "integrity": "sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "commander": "^2.9.0",
- "npm-path": "^2.0.2",
- "which": "^1.2.10"
+ "@types/hast": "^2.0.0",
+ "@types/mdast": "^3.0.0",
+ "mdast-util-definitions": "^5.0.0",
+ "micromark-util-sanitize-uri": "^1.1.0",
+ "trim-lines": "^3.0.0",
+ "unist-util-generated": "^2.0.0",
+ "unist-util-position": "^4.0.0",
+ "unist-util-visit": "^4.0.0"
},
- "bin": {
- "npm-which": "bin/npm-which.js"
- },
- "engines": {
- "node": ">=4.2.0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/number-is-nan": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
- "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
+ "node_modules/mdast-util-to-markdown": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-1.5.0.tgz",
+ "integrity": "sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==",
"dev": true,
- "engines": {
- "node": ">=0.10.0"
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^3.0.0",
+ "@types/unist": "^2.0.0",
+ "longest-streak": "^3.0.0",
+ "mdast-util-phrasing": "^3.0.0",
+ "mdast-util-to-string": "^3.0.0",
+ "micromark-util-decode-string": "^1.0.0",
+ "unist-util-visit": "^4.0.0",
+ "zwitch": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/nyc": {
- "version": "14.1.1",
- "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz",
- "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==",
- "dev": true,
- "dependencies": {
- "archy": "^1.0.0",
- "caching-transform": "^3.0.2",
- "convert-source-map": "^1.6.0",
- "cp-file": "^6.2.0",
- "find-cache-dir": "^2.1.0",
- "find-up": "^3.0.0",
- "foreground-child": "^1.5.6",
- "glob": "^7.1.3",
- "istanbul-lib-coverage": "^2.0.5",
- "istanbul-lib-hook": "^2.0.7",
- "istanbul-lib-instrument": "^3.3.0",
- "istanbul-lib-report": "^2.0.8",
- "istanbul-lib-source-maps": "^3.0.6",
- "istanbul-reports": "^2.2.4",
- "js-yaml": "^3.13.1",
- "make-dir": "^2.1.0",
- "merge-source-map": "^1.1.0",
- "resolve-from": "^4.0.0",
- "rimraf": "^2.6.3",
- "signal-exit": "^3.0.2",
- "spawn-wrap": "^1.4.2",
- "test-exclude": "^5.2.3",
- "uuid": "^3.3.2",
- "yargs": "^13.2.2",
- "yargs-parser": "^13.0.0"
- },
- "bin": {
- "nyc": "bin/nyc.js"
+ "node_modules/mdast-util-to-markdown/node_modules/mdast-util-to-string": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz",
+ "integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^3.0.0"
},
- "engines": {
- "node": ">=6"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/nyc/node_modules/ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "node_modules/mdast-util-to-string": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz",
+ "integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==",
"dev": true,
- "engines": {
- "node": ">=6"
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/nyc/node_modules/cliui": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
- "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
+ "node_modules/mdast-util-toc": {
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/mdast-util-toc/-/mdast-util-toc-6.1.1.tgz",
+ "integrity": "sha512-Er21728Kow8hehecK2GZtb7Ny3omcoPUVrmObiSUwmoRYVZaXLR751QROEFjR8W/vAQdHMLj49Lz20J55XaNpw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "string-width": "^3.1.0",
- "strip-ansi": "^5.2.0",
- "wrap-ansi": "^5.1.0"
+ "@types/extend": "^3.0.0",
+ "@types/mdast": "^3.0.0",
+ "extend": "^3.0.0",
+ "github-slugger": "^2.0.0",
+ "mdast-util-to-string": "^3.1.0",
+ "unist-util-is": "^5.0.0",
+ "unist-util-visit": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/nyc/node_modules/find-up": {
- "version": "3.0.0",
- "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "node_modules/mdast-util-toc/node_modules/github-slugger": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz",
+ "integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/mdast-util-toc/node_modules/mdast-util-to-string": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz",
+ "integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "locate-path": "^3.0.0"
+ "@types/mdast": "^3.0.0"
},
- "engines": {
- "node": ">=6"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/nyc/node_modules/is-fullwidth-code-point": {
+ "node_modules/merge-stream": {
"version": "2.0.0",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=4"
+ "node": ">= 8"
}
},
- "node_modules/nyc/node_modules/make-dir": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
- "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
+ "node_modules/micromark": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.2.0.tgz",
+ "integrity": "sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@types/debug": "^4.0.0",
+ "debug": "^4.0.0",
+ "decode-named-character-reference": "^1.0.0",
+ "micromark-core-commonmark": "^1.0.1",
+ "micromark-factory-space": "^1.0.0",
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-chunked": "^1.0.0",
+ "micromark-util-combine-extensions": "^1.0.0",
+ "micromark-util-decode-numeric-character-reference": "^1.0.0",
+ "micromark-util-encode": "^1.0.0",
+ "micromark-util-normalize-identifier": "^1.0.0",
+ "micromark-util-resolve-all": "^1.0.0",
+ "micromark-util-sanitize-uri": "^1.0.0",
+ "micromark-util-subtokenize": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.1",
+ "uvu": "^0.5.0"
+ }
+ },
+ "node_modules/micromark-core-commonmark": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.1.0.tgz",
+ "integrity": "sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decode-named-character-reference": "^1.0.0",
+ "micromark-factory-destination": "^1.0.0",
+ "micromark-factory-label": "^1.0.0",
+ "micromark-factory-space": "^1.0.0",
+ "micromark-factory-title": "^1.0.0",
+ "micromark-factory-whitespace": "^1.0.0",
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-chunked": "^1.0.0",
+ "micromark-util-classify-character": "^1.0.0",
+ "micromark-util-html-tag-name": "^1.0.0",
+ "micromark-util-normalize-identifier": "^1.0.0",
+ "micromark-util-resolve-all": "^1.0.0",
+ "micromark-util-subtokenize": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.1",
+ "uvu": "^0.5.0"
+ }
+ },
+ "node_modules/micromark-extension-frontmatter": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-2.0.0.tgz",
+ "integrity": "sha512-C4AkuM3dA58cgZha7zVnuVxBhDsbttIMiytjgsM2XbHAB2faRVaHRle40558FBN+DJcrLNCoqG5mlrpdU4cRtg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "pify": "^4.0.1",
- "semver": "^5.6.0"
+ "fault": "^2.0.0",
+ "micromark-util-character": "^2.0.0",
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
},
- "engines": {
- "node": ">=6"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/nyc/node_modules/resolve-from": {
- "version": "4.0.0",
- "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "node_modules/micromark-extension-frontmatter/node_modules/micromark-util-character": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz",
+ "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==",
"dev": true,
- "engines": {
- "node": ">=4"
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-symbol": "^2.0.0",
+ "micromark-util-types": "^2.0.0"
}
},
- "node_modules/nyc/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "node_modules/micromark-extension-frontmatter/node_modules/micromark-util-symbol": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz",
+ "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==",
"dev": true,
- "bin": {
- "semver": "bin/semver"
- }
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
},
- "node_modules/nyc/node_modules/string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "node_modules/micromark-extension-frontmatter/node_modules/micromark-util-types": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz",
+ "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/micromark-extension-gfm": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-2.0.3.tgz",
+ "integrity": "sha512-vb9OoHqrhCmbRidQv/2+Bc6pkP0FrtlhurxZofvOEy5o8RtuuvTq+RQ1Vw5ZDNrVraQZu3HixESqbG+0iKk/MQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
+ "micromark-extension-gfm-autolink-literal": "^1.0.0",
+ "micromark-extension-gfm-footnote": "^1.0.0",
+ "micromark-extension-gfm-strikethrough": "^1.0.0",
+ "micromark-extension-gfm-table": "^1.0.0",
+ "micromark-extension-gfm-tagfilter": "^1.0.0",
+ "micromark-extension-gfm-task-list-item": "^1.0.0",
+ "micromark-util-combine-extensions": "^1.0.0",
+ "micromark-util-types": "^1.0.0"
},
- "engines": {
- "node": ">=6"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/nyc/node_modules/strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "node_modules/micromark-extension-gfm-autolink-literal": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-1.0.5.tgz",
+ "integrity": "sha512-z3wJSLrDf8kRDOh2qBtoTRD53vJ+CWIyo7uyZuxf/JAbNJjiHsOpG1y5wxk8drtv3ETAHutCu6N3thkOOgueWg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^4.1.0"
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-sanitize-uri": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.0"
},
- "engines": {
- "node": ">=6"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/nyc/node_modules/uuid": {
- "version": "3.3.3",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz",
- "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==",
- "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
+ "node_modules/micromark-extension-gfm-footnote": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-1.1.2.tgz",
+ "integrity": "sha512-Yxn7z7SxgyGWRNa4wzf8AhYYWNrwl5q1Z8ii+CSTTIqVkmGZF1CElX2JI8g5yGoM3GAman9/PVCUFUSJ0kB/8Q==",
"dev": true,
- "bin": {
- "uuid": "bin/uuid"
+ "license": "MIT",
+ "dependencies": {
+ "micromark-core-commonmark": "^1.0.0",
+ "micromark-factory-space": "^1.0.0",
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-normalize-identifier": "^1.0.0",
+ "micromark-util-sanitize-uri": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.0",
+ "uvu": "^0.5.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/nyc/node_modules/wrap-ansi": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
- "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
+ "node_modules/micromark-extension-gfm-strikethrough": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-1.0.7.tgz",
+ "integrity": "sha512-sX0FawVE1o3abGk3vRjOH50L5TTLr3b5XMqnP9YDRb34M0v5OoZhG+OHFz1OffZ9dlwgpTBKaT4XW/AsUVnSDw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-styles": "^3.2.0",
- "string-width": "^3.0.0",
- "strip-ansi": "^5.0.0"
+ "micromark-util-chunked": "^1.0.0",
+ "micromark-util-classify-character": "^1.0.0",
+ "micromark-util-resolve-all": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.0",
+ "uvu": "^0.5.0"
},
- "engines": {
- "node": ">=6"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/nyc/node_modules/yargs": {
- "version": "13.3.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz",
- "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==",
+ "node_modules/micromark-extension-gfm-table": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-1.0.7.tgz",
+ "integrity": "sha512-3ZORTHtcSnMQEKtAOsBQ9/oHp9096pI/UvdPtN7ehKvrmZZ2+bbWhi0ln+I9drmwXMt5boocn6OlwQzNXeVeqw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "cliui": "^5.0.0",
- "find-up": "^3.0.0",
- "get-caller-file": "^2.0.1",
- "require-directory": "^2.1.1",
- "require-main-filename": "^2.0.0",
- "set-blocking": "^2.0.0",
- "string-width": "^3.0.0",
- "which-module": "^2.0.0",
- "y18n": "^4.0.0",
- "yargs-parser": "^13.1.1"
+ "micromark-factory-space": "^1.0.0",
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.0",
+ "uvu": "^0.5.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/oauth-sign": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz",
- "integrity": "sha1-y1QPk7srIqfVlBaRoojWDo6pOG4=",
+ "node_modules/micromark-extension-gfm-tagfilter": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-1.0.2.tgz",
+ "integrity": "sha512-5XWB9GbAUSHTn8VPU8/1DBXMuKYT5uOgEjJb8gN3mW0PNW5OPHpSdojoqf+iq1xo7vWzw/P8bAHY0n6ijpXF7g==",
"dev": true,
- "optional": true,
- "engines": {
- "node": "*"
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-types": "^1.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/object-assign": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+ "node_modules/micromark-extension-gfm-task-list-item": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-1.0.5.tgz",
+ "integrity": "sha512-RMFXl2uQ0pNQy6Lun2YBYT9g9INXtWJULgbt01D/x8/6yJ2qpKyzdZD3pi6UIkzF++Da49xAelVKUeUMqd5eIQ==",
"dev": true,
- "engines": {
- "node": ">=0.10.0"
+ "license": "MIT",
+ "dependencies": {
+ "micromark-factory-space": "^1.0.0",
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.0",
+ "uvu": "^0.5.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/object-inspect": {
- "version": "1.13.2",
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
- "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==",
+ "node_modules/micromark-factory-destination": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.1.0.tgz",
+ "integrity": "sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==",
"dev": true,
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.0"
}
},
- "node_modules/object-keys": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
- "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "node_modules/micromark-factory-label": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.1.0.tgz",
+ "integrity": "sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==",
"dev": true,
- "engines": {
- "node": ">= 0.4"
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.0",
+ "uvu": "^0.5.0"
}
},
- "node_modules/object.assign": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
- "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
+ "node_modules/micromark-factory-space": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.1.0.tgz",
+ "integrity": "sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "define-properties": "^1.1.2",
- "function-bind": "^1.1.1",
- "has-symbols": "^1.0.0",
- "object-keys": "^1.0.11"
- },
- "engines": {
- "node": ">= 0.4"
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-types": "^1.0.0"
}
},
- "node_modules/object.defaults": {
+ "node_modules/micromark-factory-title": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
- "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
+ "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.1.0.tgz",
+ "integrity": "sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "array-each": "^1.0.1",
- "array-slice": "^1.0.0",
- "for-own": "^1.0.0",
- "isobject": "^3.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
+ "micromark-factory-space": "^1.0.0",
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.0"
}
},
- "node_modules/object.map": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
- "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=",
+ "node_modules/micromark-factory-whitespace": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.1.0.tgz",
+ "integrity": "sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "for-own": "^1.0.0",
- "make-iterator": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
+ "micromark-factory-space": "^1.0.0",
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.0"
}
},
- "node_modules/object.pick": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
- "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
+ "node_modules/micromark-util-character": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.2.0.tgz",
+ "integrity": "sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "isobject": "^3.0.1"
- },
- "engines": {
- "node": ">=0.10.0"
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.0"
}
},
- "node_modules/omggif": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz",
- "integrity": "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==",
- "dev": true
- },
- "node_modules/on-finished": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
- "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
+ "node_modules/micromark-util-chunked": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.1.0.tgz",
+ "integrity": "sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "ee-first": "1.1.1"
- },
- "engines": {
- "node": ">= 0.8"
+ "micromark-util-symbol": "^1.0.0"
}
},
- "node_modules/on-headers": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
- "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
+ "node_modules/micromark-util-classify-character": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.1.0.tgz",
+ "integrity": "sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==",
"dev": true,
- "engines": {
- "node": ">= 0.8"
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.0"
}
},
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "node_modules/micromark-util-combine-extensions": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.1.0.tgz",
+ "integrity": "sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "wrappy": "1"
+ "micromark-util-chunked": "^1.0.0",
+ "micromark-util-types": "^1.0.0"
}
},
- "node_modules/onetime": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
- "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "node_modules/micromark-util-decode-numeric-character-reference": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.1.0.tgz",
+ "integrity": "sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "mimic-fn": "^2.1.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "micromark-util-symbol": "^1.0.0"
}
},
- "node_modules/open": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/open/-/open-7.0.3.tgz",
- "integrity": "sha512-sP2ru2v0P290WFfv49Ap8MF6PkzGNnGlAwHweB4WR4mr5d2d0woiCluUeJ218w7/+PmoBy9JmYgD5A4mLcWOFA==",
+ "node_modules/micromark-util-decode-string": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.1.0.tgz",
+ "integrity": "sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "is-docker": "^2.0.0",
- "is-wsl": "^2.1.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "decode-named-character-reference": "^1.0.0",
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-decode-numeric-character-reference": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0"
}
},
- "node_modules/open/node_modules/is-wsl": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.1.1.tgz",
- "integrity": "sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog==",
+ "node_modules/micromark-util-encode": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.1.0.tgz",
+ "integrity": "sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==",
"dev": true,
- "engines": {
- "node": ">=8"
- }
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
},
- "node_modules/opencollective-postinstall": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz",
- "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==",
+ "node_modules/micromark-util-html-tag-name": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.2.0.tgz",
+ "integrity": "sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==",
"dev": true,
- "bin": {
- "opencollective-postinstall": "index.js"
- }
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
},
- "node_modules/opentype.js": {
- "version": "0.9.0",
- "resolved": "https://registry.npmjs.org/opentype.js/-/opentype.js-0.9.0.tgz",
- "integrity": "sha1-wdmNoqGzZOPv2ugGI2QOnj71t5c=",
+ "node_modules/micromark-util-normalize-identifier": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.1.0.tgz",
+ "integrity": "sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "string.prototype.codepointat": "^0.2.1",
- "tiny-inflate": "^1.0.2"
- },
- "bin": {
- "ot": "bin/ot"
+ "micromark-util-symbol": "^1.0.0"
}
},
- "node_modules/opn": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/opn/-/opn-6.0.0.tgz",
- "integrity": "sha512-I9PKfIZC+e4RXZ/qr1RhgyCnGgYX0UEIlXgWnCOVACIvFgaC9rz6Won7xbdhoHrd8IIhV7YEpHjreNUNkqCGkQ==",
- "deprecated": "The package has been renamed to `open`",
+ "node_modules/micromark-util-resolve-all": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.1.0.tgz",
+ "integrity": "sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "is-wsl": "^1.1.0"
- },
- "engines": {
- "node": ">=8"
+ "micromark-util-types": "^1.0.0"
}
},
- "node_modules/opted": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/opted/-/opted-1.0.2.tgz",
- "integrity": "sha1-CU562dDA/CuzhLTYpQfieOrVV8k=",
+ "node_modules/micromark-util-sanitize-uri": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.2.0.tgz",
+ "integrity": "sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "lodash": "^4.17.4"
- },
- "engines": {
- "node": ">=4"
+ "micromark-util-character": "^1.0.0",
+ "micromark-util-encode": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0"
}
},
- "node_modules/optimist": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
- "integrity": "sha512-snN4O4TkigujZphWLN0E//nQmm7790RYaE53DdL7ZYwee2D8DDo9/EyYiKUfN3rneWUjhJnueija3G9I2i0h3g==",
+ "node_modules/micromark-util-subtokenize": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.1.0.tgz",
+ "integrity": "sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==",
"dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "minimist": "~0.0.1",
- "wordwrap": "~0.0.2"
+ "micromark-util-chunked": "^1.0.0",
+ "micromark-util-symbol": "^1.0.0",
+ "micromark-util-types": "^1.0.0",
+ "uvu": "^0.5.0"
}
},
- "node_modules/optimist/node_modules/minimist": {
- "version": "0.0.10",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
- "integrity": "sha512-iotkTvxc+TwOm5Ieim8VnSNvCDjCK9S8G3scJ50ZthspSxa7jx50jkhYduuAtAjvfDUwSgOwf8+If99AlOEhyw==",
- "dev": true
+ "node_modules/micromark-util-symbol": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.1.0.tgz",
+ "integrity": "sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
},
- "node_modules/optimist/node_modules/wordwrap": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
- "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==",
+ "node_modules/micromark-util-types": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.1.0.tgz",
+ "integrity": "sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==",
"dev": true,
- "engines": {
- "node": ">=0.4.0"
- }
+ "funding": [
+ {
+ "type": "GitHub Sponsors",
+ "url": "https://github.com/sponsors/unifiedjs"
+ },
+ {
+ "type": "OpenCollective",
+ "url": "https://opencollective.com/unified"
+ }
+ ],
+ "license": "MIT"
},
- "node_modules/optionator": {
- "version": "0.9.1",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
- "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
+ "node_modules/micromatch": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
+ "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "deep-is": "^0.1.3",
- "fast-levenshtein": "^2.0.6",
- "levn": "^0.4.1",
- "prelude-ls": "^1.2.1",
- "type-check": "^0.4.0",
- "word-wrap": "^1.2.3"
+ "braces": "^3.0.3",
+ "picomatch": "^2.3.1"
},
"engines": {
- "node": ">= 0.8.0"
+ "node": ">=8.6"
}
},
- "node_modules/ora": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/ora/-/ora-0.2.3.tgz",
- "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=",
+ "node_modules/micromatch/node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
- "dependencies": {
- "chalk": "^1.1.1",
- "cli-cursor": "^1.0.2",
- "cli-spinners": "^0.1.2",
- "object-assign": "^4.0.1"
- },
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
}
},
- "node_modules/ora/node_modules/ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+ "node_modules/mimic-fn": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+ "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/ora/node_modules/chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+ "node_modules/mimic-function": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz",
+ "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==",
"dev": true,
- "dependencies": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/ora/node_modules/cli-cursor": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz",
- "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=",
+ "node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "restore-cursor": "^1.0.1"
+ "brace-expansion": "^1.1.7"
},
"engines": {
- "node": ">=0.10.0"
+ "node": "*"
}
},
- "node_modules/ora/node_modules/onetime": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
- "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
+ "node_modules/minipass": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
+ "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
"dev": true,
+ "license": "ISC",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=16 || 14 >=14.17"
}
},
- "node_modules/ora/node_modules/restore-cursor": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz",
- "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=",
+ "node_modules/mri": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
+ "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
"dev": true,
- "dependencies": {
- "exit-hook": "^1.0.0",
- "onetime": "^1.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=4"
}
},
- "node_modules/ora/node_modules/supports-color": {
+ "node_modules/mrmime": {
"version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
- "dev": true,
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/org-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/org-regex/-/org-regex-1.0.0.tgz",
- "integrity": "sha512-7bqkxkEJwzJQUAlyYniqEZ3Ilzjh0yoa62c7gL6Ijxj5bEpPL+8IE1Z0PFj0ywjjXQcdrwR51g9MIcLezR0hKQ==",
+ "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz",
+ "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=10"
}
},
- "node_modules/os-browserify": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
- "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=",
- "dev": true
- },
- "node_modules/os-homedir": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
- "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
+ "license": "MIT"
},
- "node_modules/os-tmpdir": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
- "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
+ "node_modules/msw": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/msw/-/msw-2.7.0.tgz",
+ "integrity": "sha512-BIodwZ19RWfCbYTxWTUfTXc+sg4OwjCAgxU1ZsgmggX/7S3LdUifsbUPJs61j0rWb19CZRGY5if77duhc0uXzw==",
"dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "dependencies": {
+ "@bundled-es-modules/cookie": "^2.0.1",
+ "@bundled-es-modules/statuses": "^1.0.1",
+ "@bundled-es-modules/tough-cookie": "^0.1.6",
+ "@inquirer/confirm": "^5.0.0",
+ "@mswjs/interceptors": "^0.37.0",
+ "@open-draft/deferred-promise": "^2.2.0",
+ "@open-draft/until": "^2.1.0",
+ "@types/cookie": "^0.6.0",
+ "@types/statuses": "^2.0.4",
+ "graphql": "^16.8.1",
+ "headers-polyfill": "^4.0.2",
+ "is-node-process": "^1.2.0",
+ "outvariant": "^1.4.3",
+ "path-to-regexp": "^6.3.0",
+ "picocolors": "^1.1.1",
+ "strict-event-emitter": "^0.5.1",
+ "type-fest": "^4.26.1",
+ "yargs": "^17.7.2"
+ },
+ "bin": {
+ "msw": "cli/index.js"
+ },
"engines": {
- "node": ">=0.10.0"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/mswjs"
+ },
+ "peerDependencies": {
+ "typescript": ">= 4.8.x"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
}
},
- "node_modules/osenv": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
- "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
+ "node_modules/msw/node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "os-homedir": "^1.0.0",
- "os-tmpdir": "^1.0.0"
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/ow": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/ow/-/ow-1.1.1.tgz",
- "integrity": "sha512-sJBRCbS5vh1Jp9EOgwp1Ws3c16lJrUkJYlvWTYC03oyiYVwS/ns7lKRWow4w4XjDyTrA2pplQv4B2naWSR6yDA==",
+ "node_modules/msw/node_modules/type-fest": {
+ "version": "4.33.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.33.0.tgz",
+ "integrity": "sha512-s6zVrxuyKbbAsSAD5ZPTB77q4YIdRctkTbJ2/Dqlinwz+8ooH2gd+YA7VA6Pa93KML9GockVvoxjZ2vHP+mu8g==",
"dev": true,
- "dependencies": {
- "@sindresorhus/is": "^5.3.0",
- "callsites": "^4.0.0",
- "dot-prop": "^7.2.0",
- "lodash.isequal": "^4.5.0",
- "vali-date": "^1.0.0"
- },
+ "license": "(MIT OR CC0-1.0)",
"engines": {
- "node": ">=14.16"
+ "node": ">=16"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/ow/node_modules/@sindresorhus/is": {
- "version": "5.4.1",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.4.1.tgz",
- "integrity": "sha512-axlrvsHlHlFmKKMEg4VyvMzFr93JWJj4eIfXY1STVuO2fsImCa7ncaiG5gC8HKOX590AW5RtRsC41/B+OfrSqw==",
+ "node_modules/msw/node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
"engines": {
- "node": ">=14.16"
+ "node": ">=10"
},
"funding": {
- "url": "https://github.com/sindresorhus/is?sponsor=1"
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
- "node_modules/ow/node_modules/callsites": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.0.0.tgz",
- "integrity": "sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==",
+ "node_modules/msw/node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
"dev": true,
+ "license": "ISC",
"engines": {
- "node": ">=12.20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">=10"
}
},
- "node_modules/p-cancelable": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",
- "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",
+ "node_modules/msw/node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
"engines": {
- "node": ">=8"
+ "node": ">=12"
}
},
- "node_modules/p-finally": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
- "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
+ "node_modules/msw/node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
"dev": true,
+ "license": "ISC",
"engines": {
- "node": ">=4"
+ "node": ">=12"
}
},
- "node_modules/p-limit": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
- "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "node_modules/mute-stream": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
+ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
"dev": true,
- "dependencies": {
- "p-try": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
+ "license": "ISC"
},
- "node_modules/p-locate": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
- "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+ "node_modules/nanoid": {
+ "version": "3.3.8",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
+ "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
"dev": true,
- "dependencies": {
- "p-limit": "^2.0.0"
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
},
"engines": {
- "node": ">=6"
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
- "node_modules/p-lock": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/p-lock/-/p-lock-2.1.0.tgz",
- "integrity": "sha512-pi2yT8gNhVrV4LgsUvJWQy58TXH1HG2+NXDby9+UrsS/9fXb0FJH9aCxbdHJ0EAQ6XC7ggSP6GAzuR5puDArUQ==",
- "dev": true
+ "node_modules/natural-compare": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/p-map": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz",
- "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==",
+ "node_modules/netmask": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz",
+ "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=4"
+ "node": ">= 0.4.0"
}
},
- "node_modules/p-memoize": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/p-memoize/-/p-memoize-7.1.1.tgz",
- "integrity": "sha512-DZ/bONJILHkQ721hSr/E9wMz5Am/OTJ9P6LhLFo2Tu+jL8044tgc9LwHO8g4PiaYePnlVVRAJcKmgy8J9MVFrA==",
+ "node_modules/node-domexception": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
+ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
"dev": true,
- "dependencies": {
- "mimic-fn": "^4.0.0",
- "type-fest": "^3.0.0"
- },
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "github",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "license": "MIT",
"engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/p-memoize?sponsor=1"
+ "node": ">=10.5.0"
}
},
- "node_modules/p-memoize/node_modules/mimic-fn": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
- "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+ "node_modules/node-fetch": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "whatwg-url": "^5.0.0"
+ },
"engines": {
- "node": ">=12"
+ "node": "4.x || >=6.0.0"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "peerDependencies": {
+ "encoding": "^0.1.0"
+ },
+ "peerDependenciesMeta": {
+ "encoding": {
+ "optional": true
+ }
}
},
- "node_modules/p-memoize/node_modules/type-fest": {
- "version": "3.13.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.0.tgz",
- "integrity": "sha512-Gur3yQGM9qiLNs0KPP7LPgeRbio2QTt4xXouobMCarR0/wyW3F+F/+OWwshg3NG0Adon7uQfSZBpB46NfhoF1A==",
+ "node_modules/node-releases": {
+ "version": "2.0.19",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
+ "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
"dev": true,
- "engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
+ "license": "MIT"
},
- "node_modules/p-timeout": {
- "version": "6.1.2",
- "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.1.2.tgz",
- "integrity": "sha512-UbD77BuZ9Bc9aABo74gfXhNvzC9Tx7SxtHSh1fxvx3jTLLYvmVhiQZZrJzqqU0jKbN32kb5VOKiLEQI/3bIjgQ==",
+ "node_modules/normalize-package-data": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
+ "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==",
"dev": true,
- "engines": {
- "node": ">=14.16"
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "hosted-git-info": "^4.0.1",
+ "is-core-module": "^2.5.0",
+ "semver": "^7.3.4",
+ "validate-npm-package-license": "^3.0.1"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "engines": {
+ "node": ">=10"
}
},
- "node_modules/p-try": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
- "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==",
+ "node_modules/normalize-package-data/node_modules/semver": {
+ "version": "7.7.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.0.tgz",
+ "integrity": "sha512-DrfFnPzblFmNrIZzg5RzHegbiRWg7KMR7btwi2yjHwx06zsUbO5g613sVwEV7FTwmzJu+Io0lJe2GJ3LxqpvBQ==",
"dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
"engines": {
- "node": ">=6"
+ "node": ">=10"
}
},
- "node_modules/package-hash": {
+ "node_modules/normalize-path": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz",
- "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true,
- "dependencies": {
- "graceful-fs": "^4.1.15",
- "hasha": "^3.0.0",
- "lodash.flattendeep": "^4.4.0",
- "release-zalgo": "^1.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=6"
+ "node": ">=0.10.0"
}
},
- "node_modules/package-json": {
- "version": "8.1.1",
- "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.1.tgz",
- "integrity": "sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==",
+ "node_modules/npm-run-path": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz",
+ "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "got": "^12.1.0",
- "registry-auth-token": "^5.0.1",
- "registry-url": "^6.0.0",
- "semver": "^7.3.7"
+ "path-key": "^4.0.0"
},
"engines": {
- "node": ">=14.16"
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/package-json/node_modules/@sindresorhus/is": {
- "version": "5.4.1",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.4.1.tgz",
- "integrity": "sha512-axlrvsHlHlFmKKMEg4VyvMzFr93JWJj4eIfXY1STVuO2fsImCa7ncaiG5gC8HKOX590AW5RtRsC41/B+OfrSqw==",
+ "node_modules/npm-run-path/node_modules/path-key": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
+ "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=14.16"
+ "node": ">=12"
},
"funding": {
- "url": "https://github.com/sindresorhus/is?sponsor=1"
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/package-json/node_modules/@szmarczak/http-timer": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz",
- "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==",
+ "node_modules/nth-check": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
+ "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
- "defer-to-connect": "^2.0.1"
+ "boolbase": "^1.0.0"
},
- "engines": {
- "node": ">=14.16"
+ "funding": {
+ "url": "https://github.com/fb55/nth-check?sponsor=1"
}
},
- "node_modules/package-json/node_modules/cacheable-lookup": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz",
- "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==",
- "dev": true,
- "engines": {
- "node": ">=14.16"
- }
+ "node_modules/omggif": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz",
+ "integrity": "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==",
+ "license": "MIT"
},
- "node_modules/package-json/node_modules/cacheable-request": {
- "version": "10.2.12",
- "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.12.tgz",
- "integrity": "sha512-qtWGB5kn2OLjx47pYUkWicyOpK1vy9XZhq8yRTXOy+KAmjjESSRLx6SiExnnaGGUP1NM6/vmygMu0fGylNh9tw==",
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "@types/http-cache-semantics": "^4.0.1",
- "get-stream": "^6.0.1",
- "http-cache-semantics": "^4.1.1",
- "keyv": "^4.5.2",
- "mimic-response": "^4.0.0",
- "normalize-url": "^8.0.0",
- "responselike": "^3.0.0"
- },
- "engines": {
- "node": ">=14.16"
+ "wrappy": "1"
}
},
- "node_modules/package-json/node_modules/get-stream": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
- "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
+ "node_modules/onetime": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
+ "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "mimic-fn": "^4.0.0"
+ },
"engines": {
- "node": ">=10"
+ "node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/package-json/node_modules/got": {
- "version": "12.6.1",
- "resolved": "https://registry.npmjs.org/got/-/got-12.6.1.tgz",
- "integrity": "sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==",
+ "node_modules/open": {
+ "version": "8.4.2",
+ "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz",
+ "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@sindresorhus/is": "^5.2.0",
- "@szmarczak/http-timer": "^5.0.1",
- "cacheable-lookup": "^7.0.0",
- "cacheable-request": "^10.2.8",
- "decompress-response": "^6.0.0",
- "form-data-encoder": "^2.1.2",
- "get-stream": "^6.0.1",
- "http2-wrapper": "^2.1.10",
- "lowercase-keys": "^3.0.0",
- "p-cancelable": "^3.0.0",
- "responselike": "^3.0.0"
+ "define-lazy-prop": "^2.0.0",
+ "is-docker": "^2.1.1",
+ "is-wsl": "^2.2.0"
},
"engines": {
- "node": ">=14.16"
+ "node": ">=12"
},
"funding": {
- "url": "https://github.com/sindresorhus/got?sponsor=1"
- }
- },
- "node_modules/package-json/node_modules/http2-wrapper": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz",
- "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==",
- "dev": true,
- "dependencies": {
- "quick-lru": "^5.1.1",
- "resolve-alpn": "^1.2.0"
- },
- "engines": {
- "node": ">=10.19.0"
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/package-json/node_modules/lowercase-keys": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz",
- "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==",
+ "node_modules/opencollective-postinstall": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz",
+ "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==",
"dev": true,
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "license": "MIT",
+ "bin": {
+ "opencollective-postinstall": "index.js"
}
},
- "node_modules/package-json/node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "node_modules/optionator": {
+ "version": "0.9.4",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
+ "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "yallist": "^4.0.0"
+ "deep-is": "^0.1.3",
+ "fast-levenshtein": "^2.0.6",
+ "levn": "^0.4.1",
+ "prelude-ls": "^1.2.1",
+ "type-check": "^0.4.0",
+ "word-wrap": "^1.2.5"
},
"engines": {
- "node": ">=10"
+ "node": ">= 0.8.0"
}
},
- "node_modules/package-json/node_modules/mimic-response": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz",
- "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==",
+ "node_modules/os-tmpdir": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">=0.10.0"
}
},
- "node_modules/package-json/node_modules/normalize-url": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz",
- "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==",
+ "node_modules/outvariant": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz",
+ "integrity": "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
"engines": {
- "node": ">=14.16"
+ "node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/package-json/node_modules/p-cancelable": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz",
- "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==",
- "dev": true,
- "engines": {
- "node": ">=12.20"
- }
- },
- "node_modules/package-json/node_modules/quick-lru": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
- "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
+ "node_modules/p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
"engines": {
"node": ">=10"
},
@@ -14004,71 +10491,68 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/package-json/node_modules/registry-auth-token": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz",
- "integrity": "sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==",
+ "node_modules/p-try": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true,
- "dependencies": {
- "@pnpm/npm-conf": "^2.1.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=14"
+ "node": ">=6"
}
},
- "node_modules/package-json/node_modules/responselike": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz",
- "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==",
+ "node_modules/pac-proxy-agent": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.1.0.tgz",
+ "integrity": "sha512-Z5FnLVVZSnX7WjBg0mhDtydeRZ1xMcATZThjySQUHqr+0ksP8kqaw23fNKkaaN/Z8gwLUs/W7xdl0I75eP2Xyw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "lowercase-keys": "^3.0.0"
+ "@tootallnate/quickjs-emscripten": "^0.23.0",
+ "agent-base": "^7.1.2",
+ "debug": "^4.3.4",
+ "get-uri": "^6.0.1",
+ "http-proxy-agent": "^7.0.0",
+ "https-proxy-agent": "^7.0.6",
+ "pac-resolver": "^7.0.1",
+ "socks-proxy-agent": "^8.0.5"
},
"engines": {
- "node": ">=14.16"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">= 14"
}
},
- "node_modules/package-json/node_modules/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "node_modules/pac-resolver": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz",
+ "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "lru-cache": "^6.0.0"
- },
- "bin": {
- "semver": "bin/semver.js"
+ "degenerator": "^5.0.0",
+ "netmask": "^2.0.2"
},
"engines": {
- "node": ">=10"
+ "node": ">= 14"
}
},
- "node_modules/package-json/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
- },
- "node_modules/package-name-conflict": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/package-name-conflict/-/package-name-conflict-1.0.3.tgz",
- "integrity": "sha512-DPBNWSUWC0wPofXeNThao0uP4a93J7r90UyhagmJS0QcacTTkorZwXYsOop70phn1hKdcf/2e9lJIhazS8bx5A==",
- "dev": true
+ "node_modules/package-json-from-dist": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
+ "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
+ "dev": true,
+ "license": "BlueOak-1.0.0"
},
"node_modules/pako": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz",
- "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==",
- "dev": true
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz",
+ "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug=="
},
"node_modules/parent-module": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
"integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"callsites": "^3.0.0"
},
@@ -14076,33 +10560,12 @@
"node": ">=6"
}
},
- "node_modules/parents": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz",
- "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=",
- "dev": true,
- "dependencies": {
- "path-platform": "~0.11.15"
- }
- },
- "node_modules/parse-asn1": {
- "version": "5.1.6",
- "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz",
- "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==",
- "dev": true,
- "dependencies": {
- "asn1.js": "^5.2.0",
- "browserify-aes": "^1.0.0",
- "evp_bytestokey": "^1.0.0",
- "pbkdf2": "^3.0.3",
- "safe-buffer": "^5.1.1"
- }
- },
"node_modules/parse-filepath": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
- "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=",
+ "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"is-absolute": "^1.0.0",
"map-cache": "^0.2.0",
@@ -14112,98 +10575,155 @@
"node": ">=0.8"
}
},
+ "node_modules/parse-imports-exports": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/parse-imports-exports/-/parse-imports-exports-0.2.4.tgz",
+ "integrity": "sha512-4s6vd6dx1AotCx/RCI2m7t7GCh5bDRUtGNvRfHSP2wbBQdMi67pPe7mtzmgwcaQ8VKK/6IB7Glfyu3qdZJPybQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "parse-statements": "1.0.11"
+ }
+ },
"node_modules/parse-json": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
- "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "error-ex": "^1.2.0"
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-even-better-errors": "^2.3.0",
+ "lines-and-columns": "^1.1.6"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/parse-json-object": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/parse-json-object/-/parse-json-object-2.0.1.tgz",
- "integrity": "sha512-/oF7PUUBjCqHmMEE6xIQeX5ZokQ9+miudACzPt4KBU2qi6CxZYPdisPXx4ad7wpZJYi2ZpcW2PacLTU3De3ebw==",
+ "node_modules/parse-path": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-7.0.0.tgz",
+ "integrity": "sha512-Euf9GG8WT9CdqwuWJGdf3RkUcTBArppHABkO7Lm8IzRQp0e2r/kkFnmhu4TSK30Wcu5rVAZLmfPKSBBi9tWFog==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "types-json": "^1.2.0"
+ "protocols": "^2.0.0"
}
},
- "node_modules/parse-passwd": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
- "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
+ "node_modules/parse-statements": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/parse-statements/-/parse-statements-1.0.11.tgz",
+ "integrity": "sha512-HlsyYdMBnbPQ9Jr/VgJ1YF4scnldvJpJxCVx6KgqPL4dxppsWrJHCIIxQXMJrqGnsRkNPATbeMJ8Yxu7JMsYcA==",
"dev": true,
- "engines": {
- "node": ">=0.10.0"
+ "license": "MIT"
+ },
+ "node_modules/parse-url": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-8.1.0.tgz",
+ "integrity": "sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "parse-path": "^7.0.0"
}
},
- "node_modules/parseurl": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
- "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "node_modules/parse5": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
+ "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/parse5-htmlparser2-tree-adapter": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz",
+ "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==",
"dev": true,
- "engines": {
- "node": ">= 0.8"
+ "license": "MIT",
+ "dependencies": {
+ "domhandler": "^5.0.3",
+ "parse5": "^7.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/inikulin/parse5?sponsor=1"
}
},
- "node_modules/path-browserify": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz",
- "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==",
- "dev": true
+ "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": {
+ "version": "7.2.1",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz",
+ "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "entities": "^4.5.0"
+ },
+ "funding": {
+ "url": "https://github.com/inikulin/parse5?sponsor=1"
+ }
+ },
+ "node_modules/parse5-parser-stream": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz",
+ "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "parse5": "^7.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/inikulin/parse5?sponsor=1"
+ }
+ },
+ "node_modules/parse5-parser-stream/node_modules/parse5": {
+ "version": "7.2.1",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz",
+ "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "entities": "^4.5.0"
+ },
+ "funding": {
+ "url": "https://github.com/inikulin/parse5?sponsor=1"
+ }
},
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
- "node_modules/path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/path-key": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=4"
+ "node": ">=8"
}
},
"node_modules/path-parse": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
- "dev": true
- },
- "node_modules/path-platform": {
- "version": "0.11.15",
- "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz",
- "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=",
"dev": true,
- "engines": {
- "node": ">= 0.8.0"
- }
+ "license": "MIT"
},
"node_modules/path-root": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
- "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
+ "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"path-root-regex": "^0.1.0"
},
@@ -14214,48 +10734,77 @@
"node_modules/path-root-regex": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
- "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=",
+ "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
+ "node_modules/path-scurry": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
+ "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "dependencies": {
+ "lru-cache": "^10.2.0",
+ "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/path-scurry/node_modules/lru-cache": {
+ "version": "10.4.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
+ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
+ "dev": true,
+ "license": "ISC"
+ },
"node_modules/path-to-regexp": {
- "version": "0.1.10",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz",
- "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==",
- "dev": true
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz",
+ "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==",
+ "dev": true,
+ "license": "MIT"
},
"node_modules/path-type": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
- "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==",
+ "node_modules/pathe": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz",
+ "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",
"dev": true,
- "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"
- },
+ "license": "MIT"
+ },
+ "node_modules/pathval": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz",
+ "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==",
+ "dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.12"
+ "node": ">= 14.16"
}
},
"node_modules/pegjs": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz",
- "integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0=",
+ "integrity": "sha512-qI5+oFNEGi3L5HAxDwN2LA4Gg7irF70Zs25edhjld9QemOgp0CbvMtbFcMvFtEo1OityPrcCzkQFB8JP/hxgow==",
"dev": true,
+ "license": "MIT",
"bin": {
"pegjs": "bin/pegjs"
},
@@ -14267,84 +10816,77 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
"integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
- "dev": true
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "dev": true,
+ "license": "ISC"
},
"node_modules/picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
+ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8.6"
+ "node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
}
},
- "node_modules/pify": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
- "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
+ "node_modules/pidtree": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz",
+ "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==",
"dev": true,
+ "license": "MIT",
+ "bin": {
+ "pidtree": "bin/pidtree.js"
+ },
"engines": {
- "node": ">=6"
+ "node": ">=0.10"
}
},
- "node_modules/pinkie": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
- "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
+ "node_modules/pify": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz",
+ "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/pinkie-promise": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
- "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
- "dev": true,
- "dependencies": {
- "pinkie": "^2.0.0"
+ "node": ">=10"
},
- "engines": {
- "node": ">=0.10.0"
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/pirates": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz",
- "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==",
- "dev": true,
+ "node_modules/pixelmatch": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-7.1.0.tgz",
+ "integrity": "sha512-1wrVzJ2STrpmONHKBy228LM1b84msXDUoAzVEl0R8Mz4Ce6EPr+IVtxm8+yvrqLYMHswREkjYFaMxnyGnaY3Ng==",
"dependencies": {
- "node-modules-regexp": "^1.0.0"
+ "pngjs": "^7.0.0"
},
- "engines": {
- "node": ">= 6"
+ "bin": {
+ "pixelmatch": "bin/pixelmatch"
}
},
"node_modules/pkg-dir": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
- "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==",
- "dev": true,
- "dependencies": {
- "find-up": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/pkg-dir/node_modules/find-up": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
- "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz",
+ "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "locate-path": "^3.0.0"
+ "find-up": "^5.0.0"
},
"engines": {
- "node": ">=6"
+ "node": ">=10"
}
},
"node_modules/please-upgrade-node": {
@@ -14352,22 +10894,46 @@
"resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz",
"integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"semver-compare": "^1.0.0"
}
},
- "node_modules/portscanner": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.2.0.tgz",
- "integrity": "sha512-IFroCz/59Lqa2uBvzK3bKDbDDIEaAY8XJ1jFxcLWTqosrsc32//P4VuSB2vZXoHiHqOmx8B5L5hnKOxL/7FlPw==",
+ "node_modules/pngjs": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-7.0.0.tgz",
+ "integrity": "sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==",
+ "engines": {
+ "node": ">=14.19.0"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.1",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.1.tgz",
+ "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==",
"dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "async": "^2.6.0",
- "is-number-like": "^1.0.3"
+ "nanoid": "^3.3.8",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.1"
},
"engines": {
- "node": ">=0.4",
- "npm": ">=1.0.0"
+ "node": "^10 || ^12 || >=14"
}
},
"node_modules/prelude-ls": {
@@ -14375,344 +10941,185 @@
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
"integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">= 0.8.0"
}
},
- "node_modules/pretty-bytes": {
- "version": "5.6.0",
- "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz",
- "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==",
- "dev": true,
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/pretty-fast": {
- "version": "0.2.7",
- "resolved": "https://registry.npmjs.org/pretty-fast/-/pretty-fast-0.2.7.tgz",
- "integrity": "sha512-pc70Uq1tyO+/fuW30e4eF/r1uZospIVpy+jdXeb3hbh2WJMEyqCzvEUDNhXxTCy3GsG7u7rty2lm2zj+2wooJA==",
- "dev": true,
- "dependencies": {
- "acorn": "~8.2.4",
- "optimist": "~0.6.1",
- "source-map": "^0.5.7"
- },
- "bin": {
- "pretty-fast": "bin/pretty-fast"
- }
- },
- "node_modules/pretty-fast/node_modules/acorn": {
- "version": "8.2.4",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.4.tgz",
- "integrity": "sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==",
+ "node_modules/prettier": {
+ "version": "2.8.8",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
+ "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
"dev": true,
+ "license": "MIT",
+ "optional": true,
"bin": {
- "acorn": "bin/acorn"
+ "prettier": "bin-prettier.js"
},
"engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/pretty-fast/node_modules/source-map": {
- "version": "0.5.7",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/pretty-format": {
- "version": "21.2.1",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-21.2.1.tgz",
- "integrity": "sha512-ZdWPGYAnYfcVP8yKA3zFjCn8s4/17TeYH28MXuC8vTp0o21eXjbFGcOAXZEaDaOFJjc3h2qa7HQNHNshhvoh2A==",
- "dev": true,
- "dependencies": {
- "ansi-regex": "^3.0.0",
- "ansi-styles": "^3.2.0"
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
}
},
- "node_modules/pretty-format/node_modules/ansi-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+ "node_modules/pretty-format": {
+ "version": "27.5.1",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",
+ "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^5.0.1",
+ "ansi-styles": "^5.0.0",
+ "react-is": "^17.0.1"
+ },
"engines": {
- "node": ">=4"
+ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
}
},
- "node_modules/private": {
- "version": "0.1.8",
- "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
- "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
+ "node_modules/pretty-format/node_modules/ansi-styles": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">= 0.6"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
- "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
+ "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">= 0.6.0"
}
},
"node_modules/process-nextick-args": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
- "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
- "dev": true
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+ "dev": true,
+ "license": "MIT"
},
"node_modules/progress": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.4.0"
}
},
- "node_modules/promise-map-series": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/promise-map-series/-/promise-map-series-0.2.3.tgz",
- "integrity": "sha1-wtN3r8kyU/a9A9u3d1XriKsgqEc=",
+ "node_modules/property-information": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz",
+ "integrity": "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==",
"dev": true,
- "dependencies": {
- "rsvp": "^3.0.14"
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/proto-list": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
- "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==",
- "dev": true
+ "node_modules/protocols": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.1.tgz",
+ "integrity": "sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/proxy-addr": {
- "version": "2.0.7",
- "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
- "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "node_modules/proxy-agent": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz",
+ "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "forwarded": "0.2.0",
- "ipaddr.js": "1.9.1"
+ "agent-base": "^7.1.2",
+ "debug": "^4.3.4",
+ "http-proxy-agent": "^7.0.1",
+ "https-proxy-agent": "^7.0.6",
+ "lru-cache": "^7.14.1",
+ "pac-proxy-agent": "^7.1.0",
+ "proxy-from-env": "^1.1.0",
+ "socks-proxy-agent": "^8.0.5"
},
"engines": {
- "node": ">= 0.10"
+ "node": ">= 14"
+ }
+ },
+ "node_modules/proxy-agent/node_modules/lru-cache": {
+ "version": "7.18.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
+ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
}
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
- "dev": true
- },
- "node_modules/pseudomap": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
- "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
- "dev": true
- },
- "node_modules/psl": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
- "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==",
"dev": true,
- "optional": true
+ "license": "MIT"
},
- "node_modules/public-encrypt": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
- "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==",
+ "node_modules/psl": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz",
+ "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "bn.js": "^4.1.0",
- "browserify-rsa": "^4.0.0",
- "create-hash": "^1.1.0",
- "parse-asn1": "^5.0.0",
- "randombytes": "^2.0.1",
- "safe-buffer": "^5.1.2"
+ "punycode": "^2.3.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/lupomontero"
}
},
- "node_modules/public-encrypt/node_modules/safe-buffer": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
- "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==",
- "dev": true
- },
"node_modules/pump": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
- "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz",
+ "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
},
"node_modules/punycode": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
- "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
- "dev": true
- },
- "node_modules/pupa": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz",
- "integrity": "sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==",
- "dev": true,
- "dependencies": {
- "escape-goat": "^4.0.0"
- },
- "engines": {
- "node": ">=12.20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/puppeteer": {
- "version": "18.2.1",
- "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-18.2.1.tgz",
- "integrity": "sha512-7+UhmYa7wxPh2oMRwA++k8UGVDxh3YdWFB52r9C3tM81T6BU7cuusUSxImz0GEYSOYUKk/YzIhkQ6+vc0gHbxQ==",
- "deprecated": "< 19.4.0 is no longer supported",
- "dev": true,
- "hasInstallScript": true,
- "dependencies": {
- "https-proxy-agent": "5.0.1",
- "progress": "2.0.3",
- "proxy-from-env": "1.1.0",
- "puppeteer-core": "18.2.1"
- },
- "engines": {
- "node": ">=14.1.0"
- }
- },
- "node_modules/puppeteer-core": {
- "version": "18.2.1",
- "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-18.2.1.tgz",
- "integrity": "sha512-MRtTAZfQTluz3U2oU/X2VqVWPcR1+94nbA2V6ZrSZRVEwLqZ8eclZ551qGFQD/vD2PYqHJwWOW/fpC721uznVw==",
- "dev": true,
- "dependencies": {
- "cross-fetch": "3.1.5",
- "debug": "4.3.4",
- "devtools-protocol": "0.0.1045489",
- "extract-zip": "2.0.1",
- "https-proxy-agent": "5.0.1",
- "proxy-from-env": "1.1.0",
- "rimraf": "3.0.2",
- "tar-fs": "2.1.1",
- "unbzip2-stream": "1.4.3",
- "ws": "8.9.0"
- },
- "engines": {
- "node": ">=14.1.0"
- }
- },
- "node_modules/puppeteer-core/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dev": true,
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/puppeteer-core/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node_modules/puppeteer-core/node_modules/rimraf": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
- "dev": true,
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/puppeteer-core/node_modules/ws": {
- "version": "8.9.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz",
- "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==",
- "dev": true,
- "engines": {
- "node": ">=10.0.0"
- },
- "peerDependencies": {
- "bufferutil": "^4.0.1",
- "utf-8-validate": "^5.0.2"
- },
- "peerDependenciesMeta": {
- "bufferutil": {
- "optional": true
- },
- "utf-8-validate": {
- "optional": true
- }
- }
- },
- "node_modules/qs": {
- "version": "6.13.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
- "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
- "dev": true,
- "dependencies": {
- "side-channel": "^1.0.6"
- },
- "engines": {
- "node": ">=0.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/querystring": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
- "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
- "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.",
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.4.x"
+ "node": ">=6"
}
},
- "node_modules/querystring-es3": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
- "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
+ "node_modules/query-selector-shadow-dom": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/query-selector-shadow-dom/-/query-selector-shadow-dom-1.0.1.tgz",
+ "integrity": "sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw==",
"dev": true,
- "engines": {
- "node": ">=0.4.x"
- }
+ "license": "MIT"
},
"node_modules/querystringify": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==",
"dev": true,
- "optional": true
+ "license": "MIT"
},
"node_modules/queue-microtask": {
"version": "1.2.3",
@@ -14732,121 +11139,32 @@
"type": "consulting",
"url": "https://feross.org/support"
}
- ]
- },
- "node_modules/quick-lru": {
- "version": "6.1.1",
- "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-6.1.1.tgz",
- "integrity": "sha512-S27GBT+F0NTRiehtbrgaSE1idUAJ5bX8dPAQTdylEyNlrdcH5X4Lz7Edz3DYzecbsCluD5zO8ZNEe04z3D3u6Q==",
- "dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
+ ],
+ "license": "MIT"
},
"node_modules/randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"safe-buffer": "^5.1.0"
}
},
- "node_modules/randomfill": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
- "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
- "dev": true,
- "dependencies": {
- "randombytes": "^2.0.5",
- "safe-buffer": "^5.1.0"
- }
- },
- "node_modules/range-parser": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
- "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
- "dev": true,
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/raw-body": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz",
- "integrity": "sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU=",
- "dev": true,
- "dependencies": {
- "bytes": "1",
- "string_decoder": "0.10"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/raw-body/node_modules/string_decoder": {
- "version": "0.10.31",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
- "dev": true
- },
- "node_modules/rc": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
- "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
- "dev": true,
- "dependencies": {
- "deep-extend": "^0.6.0",
- "ini": "~1.3.0",
- "minimist": "^1.2.0",
- "strip-json-comments": "~2.0.1"
- },
- "bin": {
- "rc": "cli.js"
- }
- },
- "node_modules/read-file-safe": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/read-file-safe/-/read-file-safe-1.0.10.tgz",
- "integrity": "sha512-qW25fd2uMX3dV6Ui/R0jYK1MhTpjx8FO/VHaHTXzwWsGnkNwLRcqYfCXd9qDM+NZ273DPUvP2RaimYuLSu1K/g==",
- "dev": true
- },
- "node_modules/read-json-safe": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/read-json-safe/-/read-json-safe-1.0.5.tgz",
- "integrity": "sha512-SJyNY/U9+vW35FPus22Qvv1oilnR7PCfN2E70uKQEGaJS313A5/cz9Yhv7ZtWzZ+XIwrtEPxXf10BOyYemHehA==",
- "dev": true,
- "dependencies": {
- "parse-json-object": "^1.0.5",
- "read-file-safe": "^1.0.5"
- }
- },
- "node_modules/read-json-safe/node_modules/parse-json-object": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/parse-json-object/-/parse-json-object-1.1.0.tgz",
- "integrity": "sha512-4w5s6uJY1tW9REY8UwUOyaZKSKsrbQrMEzlV/Le/g5t4iMWuuyK83pZZ0OZimSOL9iyv2ORvRSgz71Ekd7iD3g==",
- "dev": true,
- "dependencies": {
- "types-json": "^1.0.6"
- }
- },
- "node_modules/read-only-stream": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz",
- "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=",
+ "node_modules/react-is": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
"dev": true,
- "dependencies": {
- "readable-stream": "^2.0.2"
- }
+ "license": "MIT"
},
"node_modules/read-pkg": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-7.1.0.tgz",
"integrity": "sha512-5iOehe+WF75IccPc30bWTbpdDQLOCc3Uu8bi3Dte3Eueij81yx1Mrufk8qBx/YAbR4uL1FdUr+7BKXDwEtisXg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"@types/normalize-package-data": "^2.4.1",
"normalize-package-data": "^3.0.2",
@@ -14865,6 +11183,7 @@
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-9.1.0.tgz",
"integrity": "sha512-vaMRR1AC1nrd5CQM0PhlRsO5oc2AAigqr7cCrZ/MW/Rsaflz4RlgzkpL4qoU/z1F6wrbd85iFv1OQj/y5RdGvg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"find-up": "^6.3.0",
"read-pkg": "^7.1.0",
@@ -14882,6 +11201,7 @@
"resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz",
"integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"locate-path": "^7.1.0",
"path-exists": "^5.0.0"
@@ -14898,6 +11218,7 @@
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz",
"integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"p-locate": "^6.0.0"
},
@@ -14913,6 +11234,7 @@
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
"integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"yocto-queue": "^1.0.0"
},
@@ -14928,6 +11250,7 @@
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz",
"integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"p-limit": "^4.0.0"
},
@@ -14943,6 +11266,7 @@
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
"integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
}
@@ -14952,6 +11276,7 @@
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
"integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
"dev": true,
+ "license": "(MIT OR CC0-1.0)",
"engines": {
"node": ">=12.20"
},
@@ -14960,87 +11285,16 @@
}
},
"node_modules/read-pkg-up/node_modules/yocto-queue": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz",
- "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==",
- "dev": true,
- "engines": {
- "node": ">=12.20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/read-pkg/node_modules/hosted-git-info": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz",
- "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==",
- "dev": true,
- "dependencies": {
- "lru-cache": "^6.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/read-pkg/node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/read-pkg/node_modules/normalize-package-data": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
- "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==",
- "dev": true,
- "dependencies": {
- "hosted-git-info": "^4.0.1",
- "is-core-module": "^2.5.0",
- "semver": "^7.3.4",
- "validate-npm-package-license": "^3.0.1"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/read-pkg/node_modules/parse-json": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
- "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
- "dev": true,
- "dependencies": {
- "@babel/code-frame": "^7.0.0",
- "error-ex": "^1.3.1",
- "json-parse-even-better-errors": "^2.3.0",
- "lines-and-columns": "^1.1.6"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/read-pkg/node_modules/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz",
+ "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==",
"dev": true,
- "dependencies": {
- "lru-cache": "^6.0.0"
- },
- "bin": {
- "semver": "bin/semver.js"
- },
+ "license": "MIT",
"engines": {
- "node": ">=10"
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/read-pkg/node_modules/type-fest": {
@@ -15048,6 +11302,7 @@
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
"integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
"dev": true,
+ "license": "(MIT OR CC0-1.0)",
"engines": {
"node": ">=12.20"
},
@@ -15055,237 +11310,210 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/read-pkg/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
- },
"node_modules/readable-stream": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
- "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
- "dev": true,
- "dependencies": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~1.0.6",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.0.3",
- "util-deprecate": "~1.0.1"
- }
- },
- "node_modules/readdirp": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
- "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "version": "4.7.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
+ "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "picomatch": "^2.2.1"
+ "abort-controller": "^3.0.0",
+ "buffer": "^6.0.3",
+ "events": "^3.3.0",
+ "process": "^0.11.10",
+ "string_decoder": "^1.3.0"
},
"engines": {
- "node": ">=8.10.0"
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
- "node_modules/redent": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz",
- "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==",
+ "node_modules/readdir-glob": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz",
+ "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "indent-string": "^5.0.0",
- "strip-indent": "^4.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "minimatch": "^5.1.0"
}
},
- "node_modules/redent/node_modules/indent-string": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
- "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
+ "node_modules/readdir-glob/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0"
}
},
- "node_modules/regenerate": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz",
- "integrity": "sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==",
- "dev": true
- },
- "node_modules/regenerate-unicode-properties": {
- "version": "8.2.0",
- "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz",
- "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==",
+ "node_modules/readdir-glob/node_modules/minimatch": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "regenerate": "^1.4.0"
+ "brace-expansion": "^2.0.1"
},
"engines": {
- "node": ">=4"
- }
- },
- "node_modules/regenerator-runtime": {
- "version": "0.13.3",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz",
- "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==",
- "dev": true
- },
- "node_modules/regenerator-transform": {
- "version": "0.14.4",
- "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz",
- "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==",
- "dev": true,
- "dependencies": {
- "@babel/runtime": "^7.8.4",
- "private": "^0.1.8"
+ "node": ">=10"
}
},
- "node_modules/regenerator-transform/node_modules/@babel/runtime": {
- "version": "7.10.2",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.2.tgz",
- "integrity": "sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg==",
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "regenerator-runtime": "^0.13.4"
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
}
},
- "node_modules/regenerator-transform/node_modules/regenerator-runtime": {
- "version": "0.13.5",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
- "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==",
- "dev": true
- },
- "node_modules/regexpp": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
- "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==",
+ "node_modules/readdirp/node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=8.6"
},
"funding": {
- "url": "https://github.com/sponsors/mysticatea"
+ "url": "https://github.com/sponsors/jonschlinkert"
}
},
- "node_modules/regexpu-core": {
- "version": "4.7.0",
- "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz",
- "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==",
+ "node_modules/regenerator-runtime": {
+ "version": "0.14.1",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
+ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
+ "license": "MIT"
+ },
+ "node_modules/remark": {
+ "version": "14.0.3",
+ "resolved": "https://registry.npmjs.org/remark/-/remark-14.0.3.tgz",
+ "integrity": "sha512-bfmJW1dmR2LvaMJuAnE88pZP9DktIFYXazkTfOIKZzi3Knk9lT0roItIA24ydOucI3bV/g/tXBA6hzqq3FV9Ew==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "regenerate": "^1.4.0",
- "regenerate-unicode-properties": "^8.2.0",
- "regjsgen": "^0.5.1",
- "regjsparser": "^0.6.4",
- "unicode-match-property-ecmascript": "^1.0.4",
- "unicode-match-property-value-ecmascript": "^1.2.0"
+ "@types/mdast": "^3.0.0",
+ "remark-parse": "^10.0.0",
+ "remark-stringify": "^10.0.0",
+ "unified": "^10.0.0"
},
- "engines": {
- "node": ">=4"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/registry-auth-token": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.2.tgz",
- "integrity": "sha512-PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg==",
+ "node_modules/remark-gfm": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-3.0.1.tgz",
+ "integrity": "sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "rc": "1.2.8"
+ "@types/mdast": "^3.0.0",
+ "mdast-util-gfm": "^2.0.0",
+ "micromark-extension-gfm": "^2.0.0",
+ "unified": "^10.0.0"
},
- "engines": {
- "node": ">=6.0.0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/registry-url": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz",
- "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==",
+ "node_modules/remark-html": {
+ "version": "15.0.2",
+ "resolved": "https://registry.npmjs.org/remark-html/-/remark-html-15.0.2.tgz",
+ "integrity": "sha512-/CIOI7wzHJzsh48AiuIyIe1clxVkUtreul73zcCXLub0FmnevQE0UMFDQm7NUx8/3rl/4zCshlMfqBdWScQthw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "rc": "1.2.8"
- },
- "engines": {
- "node": ">=12"
+ "@types/mdast": "^3.0.0",
+ "hast-util-sanitize": "^4.0.0",
+ "hast-util-to-html": "^8.0.0",
+ "mdast-util-to-hast": "^12.0.0",
+ "unified": "^10.0.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/regjsgen": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz",
- "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==",
- "dev": true
- },
- "node_modules/regjsparser": {
- "version": "0.6.4",
- "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz",
- "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==",
+ "node_modules/remark-parse": {
+ "version": "10.0.2",
+ "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.2.tgz",
+ "integrity": "sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "jsesc": "~0.5.0"
+ "@types/mdast": "^3.0.0",
+ "mdast-util-from-markdown": "^1.0.0",
+ "unified": "^10.0.0"
},
- "bin": {
- "regjsparser": "bin/parser"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/regjsparser/node_modules/jsesc": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
- "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
+ "node_modules/remark-reference-links": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/remark-reference-links/-/remark-reference-links-6.0.1.tgz",
+ "integrity": "sha512-34wY2C6HXSuKVTRtyJJwefkUD8zBOZOSHFZ4aSTnU2F656gr9WeuQ2dL6IJDK3NPd2F6xKF2t4XXcQY9MygAXg==",
"dev": true,
- "bin": {
- "jsesc": "bin/jsesc"
+ "license": "MIT",
+ "dependencies": {
+ "@types/mdast": "^3.0.0",
+ "unified": "^10.0.0",
+ "unist-util-visit": "^4.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/release-zalgo": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz",
- "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=",
+ "node_modules/remark-stringify": {
+ "version": "10.0.3",
+ "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-10.0.3.tgz",
+ "integrity": "sha512-koyOzCMYoUHudypbj4XpnAKFbkddRMYZHwghnxd7ue5210WzGw6kOBwauJTRUMq16jsovXx8dYNvSSWP89kZ3A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "es6-error": "^4.0.1"
+ "@types/mdast": "^3.0.0",
+ "mdast-util-to-markdown": "^1.0.0",
+ "unified": "^10.0.0"
},
- "engines": {
- "node": ">=4"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/repeating": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
- "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
+ "node_modules/remark-toc": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/remark-toc/-/remark-toc-8.0.1.tgz",
+ "integrity": "sha512-7he2VOm/cy13zilnOTZcyAoyoolV26ULlon6XyCFU+vG54Z/LWJnwphj/xKIDLOt66QmJUgTyUvLVHi2aAElyg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "is-finite": "^1.0.0"
+ "@types/mdast": "^3.0.0",
+ "mdast-util-toc": "^6.0.0",
+ "unified": "^10.0.0"
},
- "engines": {
- "node": ">=0.10.0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/require-from-string": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz",
- "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
@@ -15294,81 +11522,70 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
- "dev": true
+ "dev": true,
+ "license": "ISC"
},
"node_modules/requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
"dev": true,
- "optional": true
+ "license": "MIT"
},
"node_modules/resolve": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz",
- "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==",
- "dev": true,
- "dependencies": {
- "path-parse": "^1.0.5"
- }
- },
- "node_modules/resolve-alpn": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",
- "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",
- "dev": true
- },
- "node_modules/resolve-cwd": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
- "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
+ "version": "1.22.10",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
+ "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "resolve-from": "^5.0.0"
+ "is-core-module": "^2.16.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
},
"engines": {
- "node": ">=8"
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/resolve-cwd/node_modules/resolve-from": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
- "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "node_modules/resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=4"
}
},
- "node_modules/resolve-dir": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
- "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
+ "node_modules/resq": {
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/resq/-/resq-1.11.0.tgz",
+ "integrity": "sha512-G10EBz+zAAy3zUd/CDoBbXRL6ia9kOo3xRHrMDsHljI0GDkhYlyjwoCx5+3eCC4swi1uCoZQhskuJkj7Gp57Bw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "expand-tilde": "^2.0.0",
- "global-modules": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
+ "fast-deep-equal": "^2.0.1"
}
},
- "node_modules/responselike": {
+ "node_modules/resq/node_modules/fast-deep-equal": {
"version": "2.0.1",
- "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz",
- "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
+ "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==",
"dev": true,
- "dependencies": {
- "lowercase-keys": "^2.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
+ "license": "MIT"
},
"node_modules/restore-cursor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
"integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"onetime": "^5.1.0",
"signal-exit": "^3.0.2"
@@ -15377,203 +11594,239 @@
"node": ">=8"
}
},
- "node_modules/reusify": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
- "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+ "node_modules/restore-cursor/node_modules/mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
"dev": true,
+ "license": "MIT",
"engines": {
- "iojs": ">=1.0.0",
- "node": ">=0.10.0"
+ "node": ">=6"
}
},
- "node_modules/rimraf": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
- "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+ "node_modules/restore-cursor/node_modules/onetime": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "glob": "^7.1.3"
+ "mimic-fn": "^2.1.0"
},
- "bin": {
- "rimraf": "bin.js"
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/ripemd160": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
- "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
+ "node_modules/restore-cursor/node_modules/signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
"dev": true,
- "dependencies": {
- "hash-base": "^3.0.0",
- "inherits": "^2.0.1"
- }
+ "license": "ISC"
},
- "node_modules/rsvp": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz",
- "integrity": "sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==",
+ "node_modules/reusify": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
+ "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": "0.12.* || 4.* || 6.* || >= 7.*"
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
}
},
- "node_modules/run-applescript": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz",
- "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==",
+ "node_modules/rfdc": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
+ "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==",
"dev": true,
+ "license": "MIT"
+ },
+ "node_modules/rgb2hex": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/rgb2hex/-/rgb2hex-0.2.5.tgz",
+ "integrity": "sha512-22MOP1Rh7sAo1BZpDG6R5RFYzR2lYEgwq7HEmyW2qcsOqR2lQKmn+O//xV3YG/0rrhMC6KVX2hU+ZXuaw9a5bw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/rollup": {
+ "version": "4.34.0",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.0.tgz",
+ "integrity": "sha512-+4C/cgJ9w6sudisA0nZz0+O7lTP9a3CzNLsoDwaRumM8QHwghUsu6tqHXiTmNUp/rqNiM14++7dkzHDyCRs0Jg==",
+ "dev": true,
+ "license": "MIT",
"dependencies": {
- "execa": "^5.0.0"
+ "@types/estree": "1.0.6"
+ },
+ "bin": {
+ "rollup": "dist/bin/rollup"
},
"engines": {
- "node": ">=12"
+ "node": ">=18.0.0",
+ "npm": ">=8.0.0"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "optionalDependencies": {
+ "@rollup/rollup-android-arm-eabi": "4.34.0",
+ "@rollup/rollup-android-arm64": "4.34.0",
+ "@rollup/rollup-darwin-arm64": "4.34.0",
+ "@rollup/rollup-darwin-x64": "4.34.0",
+ "@rollup/rollup-freebsd-arm64": "4.34.0",
+ "@rollup/rollup-freebsd-x64": "4.34.0",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.34.0",
+ "@rollup/rollup-linux-arm-musleabihf": "4.34.0",
+ "@rollup/rollup-linux-arm64-gnu": "4.34.0",
+ "@rollup/rollup-linux-arm64-musl": "4.34.0",
+ "@rollup/rollup-linux-loongarch64-gnu": "4.34.0",
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.34.0",
+ "@rollup/rollup-linux-riscv64-gnu": "4.34.0",
+ "@rollup/rollup-linux-s390x-gnu": "4.34.0",
+ "@rollup/rollup-linux-x64-gnu": "4.34.0",
+ "@rollup/rollup-linux-x64-musl": "4.34.0",
+ "@rollup/rollup-win32-arm64-msvc": "4.34.0",
+ "@rollup/rollup-win32-ia32-msvc": "4.34.0",
+ "@rollup/rollup-win32-x64-msvc": "4.34.0",
+ "fsevents": "~2.3.2"
}
},
- "node_modules/run-applescript/node_modules/cross-spawn": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
- "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "node_modules/rollup-plugin-string": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-string/-/rollup-plugin-string-3.0.0.tgz",
+ "integrity": "sha512-vqyzgn9QefAgeKi+Y4A7jETeIAU1zQmS6VotH6bzm/zmUQEnYkpIGRaOBPY41oiWYV4JyBoGAaBjYMYuv+6wVw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "path-key": "^3.1.0",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
- },
- "engines": {
- "node": ">= 8"
+ "rollup-pluginutils": "^2.4.1"
}
},
- "node_modules/run-applescript/node_modules/execa": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
- "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
+ "node_modules/rollup-plugin-visualizer": {
+ "version": "5.14.0",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.14.0.tgz",
+ "integrity": "sha512-VlDXneTDaKsHIw8yzJAFWtrzguoJ/LnQ+lMpoVfYJ3jJF4Ihe5oYLAqLklIK/35lgUY+1yEzCkHyZ1j4A5w5fA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "cross-spawn": "^7.0.3",
- "get-stream": "^6.0.0",
- "human-signals": "^2.1.0",
- "is-stream": "^2.0.0",
- "merge-stream": "^2.0.0",
- "npm-run-path": "^4.0.1",
- "onetime": "^5.1.2",
- "signal-exit": "^3.0.3",
- "strip-final-newline": "^2.0.0"
+ "open": "^8.4.0",
+ "picomatch": "^4.0.2",
+ "source-map": "^0.7.4",
+ "yargs": "^17.5.1"
},
- "engines": {
- "node": ">=10"
+ "bin": {
+ "rollup-plugin-visualizer": "dist/bin/cli.js"
},
- "funding": {
- "url": "https://github.com/sindresorhus/execa?sponsor=1"
- }
- },
- "node_modules/run-applescript/node_modules/get-stream": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
- "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
- "dev": true,
"engines": {
- "node": ">=10"
+ "node": ">=18"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/run-applescript/node_modules/human-signals": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
- "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
- "dev": true,
- "engines": {
- "node": ">=10.17.0"
+ "peerDependencies": {
+ "rolldown": "1.x",
+ "rollup": "2.x || 3.x || 4.x"
+ },
+ "peerDependenciesMeta": {
+ "rolldown": {
+ "optional": true
+ },
+ "rollup": {
+ "optional": true
+ }
}
},
- "node_modules/run-applescript/node_modules/is-stream": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
- "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
+ "node_modules/rollup-plugin-visualizer/node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
"dev": true,
- "engines": {
- "node": ">=8"
+ "license": "ISC",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "engines": {
+ "node": ">=12"
}
},
- "node_modules/run-applescript/node_modules/npm-run-path": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
- "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
+ "node_modules/rollup-plugin-visualizer/node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "path-key": "^3.0.0"
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
- "node_modules/run-applescript/node_modules/path-key": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
- "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "node_modules/rollup-plugin-visualizer/node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
"dev": true,
+ "license": "ISC",
"engines": {
- "node": ">=8"
+ "node": ">=10"
}
},
- "node_modules/run-applescript/node_modules/shebang-command": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
- "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "node_modules/rollup-plugin-visualizer/node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "shebang-regex": "^3.0.0"
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
},
"engines": {
- "node": ">=8"
+ "node": ">=12"
}
},
- "node_modules/run-applescript/node_modules/shebang-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
- "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "node_modules/rollup-plugin-visualizer/node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
"dev": true,
+ "license": "ISC",
"engines": {
- "node": ">=8"
+ "node": ">=12"
}
},
- "node_modules/run-applescript/node_modules/strip-final-newline": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
- "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
+ "node_modules/rollup-pluginutils": {
+ "version": "2.8.2",
+ "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz",
+ "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==",
"dev": true,
- "engines": {
- "node": ">=6"
+ "license": "MIT",
+ "dependencies": {
+ "estree-walker": "^0.6.1"
}
},
- "node_modules/run-applescript/node_modules/which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "node_modules/rollup-pluginutils/node_modules/estree-walker": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz",
+ "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==",
"dev": true,
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/node-which"
- },
- "engines": {
- "node": ">= 8"
- }
+ "license": "MIT"
},
"node_modules/run-async": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
"integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.12.0"
}
@@ -15597,120 +11850,95 @@
"url": "https://feross.org/support"
}
],
+ "license": "MIT",
"dependencies": {
"queue-microtask": "^1.2.2"
}
},
"node_modules/rxjs": {
- "version": "5.5.6",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz",
- "integrity": "sha512-v4Q5HDC0FHAQ7zcBX7T2IL6O5ltl1a2GX4ENjPXg6SjDY69Cmx9v4113C99a4wGF16ClPv5Z8mghuYorVkg/kg==",
+ "version": "7.8.1",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
+ "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "tslib": "^2.1.0"
+ }
+ },
+ "node_modules/sade": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz",
+ "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "symbol-observable": "1.0.1"
+ "mri": "^1.1.0"
},
"engines": {
- "npm": ">=2.0.0"
+ "node": ">=6"
}
},
- "node_modules/safe-buffer": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
- "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
- "dev": true
+ "node_modules/safaridriver": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/safaridriver/-/safaridriver-1.0.0.tgz",
+ "integrity": "sha512-J92IFbskyo7OYB3Dt4aTdyhag1GlInrfbPCmMteb7aBK7PwlnGz1HI0+oyNN97j7pV9DqUAVoVgkNRMrfY47mQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ }
},
- "node_modules/safe-json-parse": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz",
- "integrity": "sha1-PnZyPjjf3aE8mx0poeB//uSzC1c=",
- "dev": true
+ "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/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
- "dev": true
- },
- "node_modules/scoped-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/scoped-regex/-/scoped-regex-3.0.0.tgz",
- "integrity": "sha512-yEsN6TuxZhZ1Tl9iB81frTNS292m0I/IG7+w8lTvfcJQP2x3vnpOoevjBoE3Np5A6KnZM2+RtVenihj9t6NiYg==",
"dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
+ "license": "MIT"
},
"node_modules/semver": {
- "version": "5.4.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
- "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true,
+ "license": "ISC",
"bin": {
- "semver": "bin/semver"
+ "semver": "bin/semver.js"
}
},
"node_modules/semver-compare": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
- "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=",
- "dev": true
- },
- "node_modules/semver-diff": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-4.0.0.tgz",
- "integrity": "sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==",
- "dev": true,
- "dependencies": {
- "semver": "^7.3.5"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/semver-diff/node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/semver-diff/node_modules/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==",
"dev": true,
- "dependencies": {
- "lru-cache": "^6.0.0"
- },
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/semver-diff/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
+ "license": "MIT"
},
"node_modules/semver-regex": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.4.tgz",
"integrity": "sha512-6IiqeZNgq01qGf0TId0t3NvKzSvUsjcpdEO3AQNeIjR6A2+ckTnQlDpl4qu1bjRv0RzN3FP9hzFmws3lKqRWkA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
},
@@ -15718,250 +11946,88 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/send": {
- "version": "0.19.0",
- "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
- "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
- "dev": true,
- "dependencies": {
- "debug": "2.6.9",
- "depd": "2.0.0",
- "destroy": "1.2.0",
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "etag": "~1.8.1",
- "fresh": "0.5.2",
- "http-errors": "2.0.0",
- "mime": "1.6.0",
- "ms": "2.1.3",
- "on-finished": "2.4.1",
- "range-parser": "~1.2.1",
- "statuses": "2.0.1"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/send/node_modules/depd": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
- "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
- "dev": true,
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/send/node_modules/http-errors": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
- "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "node_modules/serialize-error": {
+ "version": "11.0.3",
+ "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-11.0.3.tgz",
+ "integrity": "sha512-2G2y++21dhj2R7iHAdd0FIzjGwuKZld+7Pl/bTU6YIkrC2ZMbVUjm+luj6A6V34Rv9XfKJDKpTWu9W4Gse1D9g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "depd": "2.0.0",
- "inherits": "2.0.4",
- "setprototypeof": "1.2.0",
- "statuses": "2.0.1",
- "toidentifier": "1.0.1"
+ "type-fest": "^2.12.2"
},
"engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/send/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
- },
- "node_modules/send/node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
- "dev": true
- },
- "node_modules/send/node_modules/on-finished": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
- "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
- "dev": true,
- "dependencies": {
- "ee-first": "1.1.1"
+ "node": ">=14.16"
},
- "engines": {
- "node": ">= 0.8"
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/send/node_modules/setprototypeof": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
- "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
- "dev": true
- },
- "node_modules/send/node_modules/statuses": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
- "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "node_modules/serialize-error/node_modules/type-fest": {
+ "version": "2.19.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
+ "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
"dev": true,
+ "license": "(MIT OR CC0-1.0)",
"engines": {
- "node": ">= 0.8"
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/serialize-javascript": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz",
- "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==",
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
+ "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
"dev": true,
+ "license": "BSD-3-Clause",
"dependencies": {
"randombytes": "^2.1.0"
}
},
- "node_modules/serve-index": {
- "version": "1.9.1",
- "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz",
- "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==",
- "dev": true,
- "dependencies": {
- "accepts": "~1.3.4",
- "batch": "0.6.1",
- "debug": "2.6.9",
- "escape-html": "~1.0.3",
- "http-errors": "~1.6.2",
- "mime-types": "~2.1.17",
- "parseurl": "~1.3.2"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/serve-static": {
- "version": "1.16.2",
- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
- "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
- "dev": true,
- "dependencies": {
- "encodeurl": "~2.0.0",
- "escape-html": "~1.0.3",
- "parseurl": "~1.3.3",
- "send": "0.19.0"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/serve-static/node_modules/encodeurl": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
- "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
- "dev": true,
- "engines": {
- "node": ">= 0.8"
- }
- },
"node_modules/set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
- "dev": true
- },
- "node_modules/set-function-length": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
- "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
+ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
"dev": true,
- "dependencies": {
- "define-data-property": "^1.1.4",
- "es-errors": "^1.3.0",
- "function-bind": "^1.1.2",
- "get-intrinsic": "^1.2.4",
- "gopd": "^1.0.1",
- "has-property-descriptors": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- }
+ "license": "ISC"
},
"node_modules/setimmediate": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
"integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==",
- "dev": true
- },
- "node_modules/setprototypeof": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
- "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==",
- "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==",
- "dev": true,
- "dependencies": {
- "inherits": "^2.0.1",
- "safe-buffer": "^5.0.1"
- },
- "bin": {
- "sha.js": "bin.js"
- }
- },
- "node_modules/shasum": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz",
- "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=",
- "dev": true,
- "dependencies": {
- "json-stable-stringify": "~0.0.0",
- "sha.js": "~2.4.4"
- }
- },
- "node_modules/shasum-object": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz",
- "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==",
"dev": true,
- "dependencies": {
- "fast-safe-stringify": "^2.0.7"
- }
+ "license": "MIT"
},
"node_modules/shebang-command": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
- "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "shebang-regex": "^1.0.0"
+ "shebang-regex": "^3.0.0"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=8"
}
},
"node_modules/shebang-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=8"
}
},
"node_modules/shell-quote": {
- "version": "1.7.3",
- "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz",
- "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==",
- "dev": true
- },
- "node_modules/side-channel": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
- "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
+ "version": "1.8.2",
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.2.tgz",
+ "integrity": "sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==",
"dev": true,
- "dependencies": {
- "call-bind": "^1.0.7",
- "es-errors": "^1.3.0",
- "get-intrinsic": "^1.2.4",
- "object-inspect": "^1.13.1"
- },
+ "license": "MIT",
"engines": {
"node": ">= 0.4"
},
@@ -15969,491 +12035,454 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/signal-exit": {
- "version": "3.0.7",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
- "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
- "dev": true
+ "node_modules/siginfo": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
+ "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==",
+ "dev": true,
+ "license": "ISC"
},
- "node_modules/simple-cli": {
- "version": "5.0.5",
- "resolved": "https://registry.npmjs.org/simple-cli/-/simple-cli-5.0.5.tgz",
- "integrity": "sha512-Er2FhsIayL/sktxg6fOCdNQJBTXhlf/fswNFsdmks88xsHzQ/IXGwxYgSSKeXBq4yqn83/iD4Sg8yjagwysUgw==",
+ "node_modules/signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
"dev": true,
- "dependencies": {
- "async": "^3.1.0",
- "chalk": "^2.4.2",
- "cross-spawn": "^7.0.0",
- "key-list": "^0.1.4",
- "lodash": "^4.17.15",
- "opted": "^1.0.0"
+ "license": "ISC",
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/simple-cli/node_modules/async": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz",
- "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==",
- "dev": true
- },
- "node_modules/simple-cli/node_modules/cross-spawn": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz",
- "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==",
+ "node_modules/sirv": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.0.tgz",
+ "integrity": "sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "path-key": "^3.1.0",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
+ "@polka/url": "^1.0.0-next.24",
+ "mrmime": "^2.0.0",
+ "totalist": "^3.0.0"
},
"engines": {
- "node": ">= 8"
+ "node": ">=18"
}
},
- "node_modules/simple-cli/node_modules/path-key": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
- "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "node_modules/slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=8"
}
},
- "node_modules/simple-cli/node_modules/shebang-command": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
- "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "node_modules/slice-ansi": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",
+ "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "shebang-regex": "^3.0.0"
+ "ansi-styles": "^6.0.0",
+ "is-fullwidth-code-point": "^4.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/slice-ansi?sponsor=1"
}
},
- "node_modules/simple-cli/node_modules/shebang-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
- "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "node_modules/slice-ansi/node_modules/ansi-styles": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+ "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/simple-cli/node_modules/which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "node_modules/smart-buffer": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
+ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
"dev": true,
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/node-which"
- },
+ "license": "MIT",
"engines": {
- "node": ">= 8"
+ "node": ">= 6.0.0",
+ "npm": ">= 3.0.0"
}
},
- "node_modules/simple-concat": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz",
- "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=",
- "dev": true
+ "node_modules/smob": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz",
+ "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/simple-git": {
- "version": "3.16.1",
- "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.16.1.tgz",
- "integrity": "sha512-xzRxMKiy1zEYeHGXgAzvuXffDS0xgsq07Oi4LWEEcVH29vLpcZ2tyQRWyK0NLLlCVaKysZeem5tC1qHEOxsKwA==",
+ "node_modules/socks": {
+ "version": "2.8.3",
+ "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz",
+ "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "@kwsites/file-exists": "^1.1.1",
- "@kwsites/promise-deferred": "^1.1.1",
- "debug": "^4.3.4"
+ "ip-address": "^9.0.5",
+ "smart-buffer": "^4.2.0"
},
- "funding": {
- "type": "github",
- "url": "https://github.com/steveukx/git-js?sponsor=1"
+ "engines": {
+ "node": ">= 10.0.0",
+ "npm": ">= 3.0.0"
}
},
- "node_modules/simple-git/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "node_modules/socks-proxy-agent": {
+ "version": "8.0.5",
+ "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz",
+ "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ms": "2.1.2"
+ "agent-base": "^7.1.2",
+ "debug": "^4.3.4",
+ "socks": "^2.8.3"
},
"engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
+ "node": ">= 14"
}
},
- "node_modules/simple-git/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
+ "node_modules/source-map": {
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz",
+ "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">= 8"
+ }
},
- "node_modules/slash": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "node_modules/source-map-js": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
"dev": true,
+ "license": "BSD-3-Clause",
"engines": {
- "node": ">=8"
+ "node": ">=0.10.0"
}
},
- "node_modules/sntp": {
- "version": "0.2.4",
- "resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz",
- "integrity": "sha1-+4hfGLDzqtGJ+CSGJTa87ux1CQA=",
- "deprecated": "This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.",
+ "node_modules/source-map-support": {
+ "version": "0.5.21",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
"dev": true,
- "optional": true,
+ "license": "MIT",
"dependencies": {
- "hoek": "0.9.x"
- },
- "engines": {
- "node": ">=0.8.0"
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
}
},
- "node_modules/source-map": {
+ "node_modules/source-map-support/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
+ "license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
}
},
- "node_modules/source-map-support": {
- "version": "0.5.16",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz",
- "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==",
+ "node_modules/space-separated-tokens": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz",
+ "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==",
"dev": true,
- "dependencies": {
- "buffer-from": "^1.0.0",
- "source-map": "^0.6.0"
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/spawn-wrap": {
- "version": "1.4.3",
- "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.3.tgz",
- "integrity": "sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw==",
+ "node_modules/spacetrim": {
+ "version": "0.11.59",
+ "resolved": "https://registry.npmjs.org/spacetrim/-/spacetrim-0.11.59.tgz",
+ "integrity": "sha512-lLYsktklSRKprreOm7NXReW8YiX2VBjbgmXYEziOoGf/qsJqAEACaDvoTtUOycwjpaSh+bT8eu0KrJn7UNxiCg==",
"dev": true,
- "dependencies": {
- "foreground-child": "^1.5.6",
- "mkdirp": "^0.5.0",
- "os-homedir": "^1.0.1",
- "rimraf": "^2.6.2",
- "signal-exit": "^3.0.2",
- "which": "^1.3.0"
- }
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://buymeacoffee.com/hejny"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/hejny/spacetrim/blob/main/README.md#%EF%B8%8F-contributing"
+ }
+ ],
+ "license": "Apache-2.0"
+ },
+ "node_modules/spawn-command": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz",
+ "integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==",
+ "dev": true
},
"node_modules/spdx-correct": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz",
"integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
"spdx-expression-parse": "^3.0.0",
"spdx-license-ids": "^3.0.0"
}
},
"node_modules/spdx-exceptions": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
- "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
- "dev": true
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz",
+ "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==",
+ "dev": true,
+ "license": "CC-BY-3.0"
},
"node_modules/spdx-expression-parse": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
"integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"spdx-exceptions": "^2.1.0",
"spdx-license-ids": "^3.0.0"
}
},
"node_modules/spdx-license-ids": {
- "version": "3.0.13",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz",
- "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==",
- "dev": true
- },
- "node_modules/sprintf-js": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
- "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
- "dev": true
- },
- "node_modules/staged-git-files": {
- "version": "0.0.4",
- "resolved": "https://registry.npmjs.org/staged-git-files/-/staged-git-files-0.0.4.tgz",
- "integrity": "sha1-15fhtVHKemOd7AI33G60u5vhfTU=",
- "dev": true
+ "version": "3.0.21",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz",
+ "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==",
+ "dev": true,
+ "license": "CC0-1.0"
},
- "node_modules/statuses": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
- "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
+ "node_modules/split2": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
+ "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
"dev": true,
+ "license": "ISC",
"engines": {
- "node": ">= 0.6"
+ "node": ">= 10.x"
}
},
- "node_modules/stream-browserify": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz",
- "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==",
+ "node_modules/sprintf-js": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
+ "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==",
"dev": true,
- "dependencies": {
- "inherits": "~2.0.1",
- "readable-stream": "^2.0.2"
- }
+ "license": "BSD-3-Clause"
},
- "node_modules/stream-combiner2": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
- "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=",
+ "node_modules/stackback": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",
+ "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",
"dev": true,
- "dependencies": {
- "duplexer2": "~0.1.0",
- "readable-stream": "^2.0.2"
- }
+ "license": "MIT"
},
- "node_modules/stream-http": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.0.tgz",
- "integrity": "sha512-cuB6RgO7BqC4FBYzmnvhob5Do3wIdIsXAgGycHJnW+981gHqoYcYz9lqjJrk8WXRddbwPuqPYRl+bag6mYv4lw==",
+ "node_modules/statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
"dev": true,
- "dependencies": {
- "builtin-status-codes": "^3.0.0",
- "inherits": "^2.0.1",
- "readable-stream": "^3.0.6",
- "xtend": "^4.0.0"
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
}
},
- "node_modules/stream-http/node_modules/readable-stream": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
- "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
+ "node_modules/std-env": {
+ "version": "3.8.0",
+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz",
+ "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==",
"dev": true,
+ "license": "MIT"
+ },
+ "node_modules/streamx": {
+ "version": "2.22.0",
+ "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.0.tgz",
+ "integrity": "sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw==",
+ "dev": true,
+ "license": "MIT",
"dependencies": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
+ "fast-fifo": "^1.3.2",
+ "text-decoder": "^1.1.0"
},
- "engines": {
- "node": ">= 6"
+ "optionalDependencies": {
+ "bare-events": "^2.2.0"
}
},
- "node_modules/stream-http/node_modules/safe-buffer": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
- "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==",
- "dev": true
+ "node_modules/strict-event-emitter": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz",
+ "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/stream-http/node_modules/string_decoder": {
+ "node_modules/string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"safe-buffer": "~5.2.0"
}
},
- "node_modules/stream-shift": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz",
- "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==",
- "dev": true
- },
- "node_modules/stream-splicer": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz",
- "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==",
- "dev": true,
- "dependencies": {
- "inherits": "^2.0.1",
- "readable-stream": "^2.0.2"
- }
- },
- "node_modules/stream-to-observable": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.1.0.tgz",
- "integrity": "sha1-Rb8dny19wJvtgfHDB8Qw5ouEz/4=",
+ "node_modules/string-argv": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz",
+ "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.12.0"
- }
- },
- "node_modules/string_decoder": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
- "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
- "dev": true,
- "dependencies": {
- "safe-buffer": "~5.1.0"
+ "node": ">=0.6.19"
}
},
- "node_modules/string-template": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz",
- "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=",
- "dev": true
- },
"node_modules/string-width": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
- "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
- "dev": true,
- "dependencies": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/string.prototype.codepointat": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/string.prototype.codepointat/-/string.prototype.codepointat-0.2.1.tgz",
- "integrity": "sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg==",
- "dev": true
- },
- "node_modules/stringify-object": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.2.1.tgz",
- "integrity": "sha512-jPcQYw/52HUPP8uOE4kkjxl5bB9LfHkKCTptIk3qw7ozP5XMIMlHMLjt00GGSwW6DJAf/njY5EU6Vpwl4LlBKQ==",
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "get-own-enumerable-property-symbols": "^2.0.1",
- "is-obj": "^1.0.1",
- "is-regexp": "^1.0.0"
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
},
"engines": {
- "node": ">=4"
+ "node": ">=8"
}
},
- "node_modules/stringstream": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz",
- "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==",
- "dev": true,
- "optional": true
- },
- "node_modules/strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "node_modules/string-width-cjs": {
+ "name": "string-width",
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^2.0.0"
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=8"
}
},
- "node_modules/strip-eof": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
- "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
+ "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">=8"
}
},
- "node_modules/strip-final-newline": {
+ "node_modules/string-width/node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
- "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">=8"
}
},
- "node_modules/strip-indent": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz",
- "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==",
+ "node_modules/stringify-entities": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz",
+ "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "min-indent": "^1.0.1"
- },
- "engines": {
- "node": ">=12"
+ "character-entities-html4": "^2.0.0",
+ "character-entities-legacy": "^3.0.0"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/subarg": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",
- "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=",
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "minimist": "^1.1.0"
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
}
},
- "node_modules/supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "node_modules/strip-ansi-cjs": {
+ "name": "strip-ansi",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "has-flag": "^3.0.0"
+ "ansi-regex": "^5.0.1"
},
"engines": {
- "node": ">=4"
+ "node": ">=8"
}
},
- "node_modules/supports-hyperlinks": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz",
- "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==",
+ "node_modules/strip-final-newline": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
+ "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
"dev": true,
- "dependencies": {
- "has-flag": "^4.0.0",
- "supports-color": "^7.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/supports-hyperlinks/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "node_modules/strip-json-comments": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.1.tgz",
+ "integrity": "sha512-0fk9zBqO67Nq5M/m45qHCJxylV/DhBlIOVExqgOMiCCrzrhU6tCibRXNqE3jwJLftzE9SNuZtYbpzcO+i9FiKw==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/supports-hyperlinks/node_modules/supports-color": {
+ "node_modules/strnum": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz",
+ "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"has-flag": "^4.0.0"
},
@@ -16466,6 +12495,7 @@
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">= 0.4"
},
@@ -16473,641 +12503,667 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/symbol-observable": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz",
- "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=",
- "dev": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/syntax-error": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz",
- "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==",
- "dev": true,
- "dependencies": {
- "acorn-node": "^1.2.0"
- }
- },
"node_modules/tar-fs": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
- "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.8.tgz",
+ "integrity": "sha512-ZoROL70jptorGAlgAYiLoBLItEKw/fUxg9BSYK/dF/GAGYFJOJJJMvjPAKDJraCXFwadD456FCuvLWgfhMsPwg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "chownr": "^1.1.1",
- "mkdirp-classic": "^0.5.2",
"pump": "^3.0.0",
- "tar-stream": "^2.1.4"
+ "tar-stream": "^3.1.5"
+ },
+ "optionalDependencies": {
+ "bare-fs": "^4.0.1",
+ "bare-path": "^3.0.0"
}
},
"node_modules/tar-stream": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
- "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
+ "version": "3.1.7",
+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz",
+ "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "bl": "^4.0.3",
- "end-of-stream": "^1.4.1",
- "fs-constants": "^1.0.0",
- "inherits": "^2.0.3",
- "readable-stream": "^3.1.1"
- },
- "engines": {
- "node": ">=6"
+ "b4a": "^1.6.4",
+ "fast-fifo": "^1.2.0",
+ "streamx": "^2.15.0"
}
},
- "node_modules/tar-stream/node_modules/readable-stream": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
- "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "node_modules/terser": {
+ "version": "5.37.0",
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.37.0.tgz",
+ "integrity": "sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
+ "@jridgewell/source-map": "^0.3.3",
+ "acorn": "^8.8.2",
+ "commander": "^2.20.0",
+ "source-map-support": "~0.5.20"
+ },
+ "bin": {
+ "terser": "bin/terser"
},
"engines": {
- "node": ">= 6"
+ "node": ">=10"
}
},
- "node_modules/tar-stream/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==",
+ "node_modules/terser/node_modules/commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"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/tar-stream/node_modules/string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "node_modules/text-decoder": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz",
+ "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "safe-buffer": "~5.2.0"
+ "b4a": "^1.6.4"
}
},
- "node_modules/terminal-link": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-3.0.0.tgz",
- "integrity": "sha512-flFL3m4wuixmf6IfhFJd1YPiLiMuxEc8uHRM1buzIeZPm22Au2pDqBJQgdo7n1WfPU1ONFGv7YDwpFBmHGF6lg==",
+ "node_modules/through": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
"dev": true,
- "dependencies": {
- "ansi-escapes": "^5.0.0",
- "supports-hyperlinks": "^2.2.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
+ "license": "MIT"
},
- "node_modules/terminal-link/node_modules/ansi-escapes": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-5.0.0.tgz",
- "integrity": "sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==",
+ "node_modules/tinybench": {
+ "version": "2.9.0",
+ "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz",
+ "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==",
"dev": true,
- "dependencies": {
- "type-fest": "^1.0.2"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
+ "license": "MIT"
},
- "node_modules/terminal-link/node_modules/type-fest": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
- "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
+ "node_modules/tinyexec": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz",
+ "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==",
"dev": true,
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
+ "license": "MIT"
},
- "node_modules/test-exclude": {
- "version": "5.2.3",
- "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz",
- "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==",
+ "node_modules/tinypool": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz",
+ "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==",
"dev": true,
- "dependencies": {
- "glob": "^7.1.3",
- "minimatch": "^3.0.4",
- "read-pkg-up": "^4.0.0",
- "require-main-filename": "^2.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=6"
+ "node": "^18.0.0 || >=20.0.0"
}
},
- "node_modules/test-exclude/node_modules/find-up": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
- "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "node_modules/tinyrainbow": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-1.2.0.tgz",
+ "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==",
"dev": true,
- "dependencies": {
- "locate-path": "^3.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=6"
+ "node": ">=14.0.0"
}
},
- "node_modules/test-exclude/node_modules/load-json-file": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
- "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
+ "node_modules/tinyspy": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz",
+ "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==",
"dev": true,
- "dependencies": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^4.0.0",
- "pify": "^3.0.0",
- "strip-bom": "^3.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=4"
+ "node": ">=14.0.0"
}
},
- "node_modules/test-exclude/node_modules/parse-json": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
- "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
+ "node_modules/tmp": {
+ "version": "0.0.33",
+ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
+ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "error-ex": "^1.3.1",
- "json-parse-better-errors": "^1.0.1"
+ "os-tmpdir": "~1.0.2"
},
"engines": {
- "node": ">=4"
+ "node": ">=0.6.0"
}
},
- "node_modules/test-exclude/node_modules/path-type": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
- "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "pify": "^3.0.0"
+ "is-number": "^7.0.0"
},
"engines": {
- "node": ">=4"
+ "node": ">=8.0"
}
},
- "node_modules/test-exclude/node_modules/pify": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
- "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "node_modules/totalist": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz",
+ "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=4"
+ "node": ">=6"
}
},
- "node_modules/test-exclude/node_modules/read-pkg": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
- "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
+ "node_modules/tough-cookie": {
+ "version": "4.1.4",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz",
+ "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==",
"dev": true,
+ "license": "BSD-3-Clause",
"dependencies": {
- "load-json-file": "^4.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^3.0.0"
+ "psl": "^1.1.33",
+ "punycode": "^2.1.1",
+ "universalify": "^0.2.0",
+ "url-parse": "^1.5.3"
},
"engines": {
- "node": ">=4"
+ "node": ">=6"
}
},
- "node_modules/test-exclude/node_modules/read-pkg-up": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz",
- "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==",
+ "node_modules/tr46": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
"dev": true,
- "dependencies": {
- "find-up": "^3.0.0",
- "read-pkg": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
+ "license": "MIT"
},
- "node_modules/test-exclude/node_modules/strip-bom": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
- "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+ "node_modules/tree-kill": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
+ "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==",
"dev": true,
- "engines": {
- "node": ">=4"
+ "license": "MIT",
+ "bin": {
+ "tree-kill": "cli.js"
}
},
- "node_modules/text-table": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
- "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
- "dev": true
- },
- "node_modules/through": {
- "version": "2.3.8",
- "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
- "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
- "dev": true
+ "node_modules/trim-lines": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz",
+ "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
},
- "node_modules/through2": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
- "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
+ "node_modules/trough": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz",
+ "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==",
"dev": true,
- "dependencies": {
- "readable-stream": "^2.1.5",
- "xtend": "~4.0.1"
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/timers-browserify": {
- "version": "1.4.2",
- "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz",
- "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=",
+ "node_modules/ts-api-utils": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz",
+ "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==",
"dev": true,
- "dependencies": {
- "process": "~0.11.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=0.6.0"
+ "node": ">=18.12"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4"
}
},
- "node_modules/tiny-inflate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.2.tgz",
- "integrity": "sha1-k9nez/yIBb1X6uQxDwt0Xptvs6c=",
- "dev": true
- },
- "node_modules/tiny-lr": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz",
- "integrity": "sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA==",
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"dev": true,
- "dependencies": {
- "body": "^5.1.0",
- "debug": "^3.1.0",
- "faye-websocket": "~0.10.0",
- "livereload-js": "^2.3.0",
- "object-assign": "^4.1.0",
- "qs": "^6.4.0"
- }
+ "license": "0BSD"
},
- "node_modules/tiny-lr/node_modules/debug": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "node_modules/type-check": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ms": "2.0.0"
+ "prelude-ls": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
}
},
- "node_modules/titleize": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz",
- "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==",
+ "node_modules/type-fest": {
+ "version": "0.21.3",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
+ "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
"dev": true,
+ "license": "(MIT OR CC0-1.0)",
"engines": {
- "node": ">=12"
+ "node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/tmp": {
- "version": "0.0.33",
- "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
- "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
+ "node_modules/typescript": {
+ "version": "5.8.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
+ "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"dev": true,
- "dependencies": {
- "os-tmpdir": "~1.0.2"
+ "license": "Apache-2.0",
+ "peer": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
},
"engines": {
- "node": ">=0.6.0"
+ "node": ">=14.17"
}
},
- "node_modules/to-fast-properties": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
- "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
+ "node_modules/unbzip2-stream": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
+ "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "buffer": "^5.2.1",
+ "through": "^2.3.8"
+ }
+ },
+ "node_modules/unbzip2-stream/node_modules/buffer": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+ "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",
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.1.13"
+ }
+ },
+ "node_modules/unc-path-regex": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
+ "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=4"
+ "node": ">=0.10.0"
}
},
- "node_modules/to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "node_modules/undici": {
+ "version": "6.21.1",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz",
+ "integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==",
"dev": true,
- "dependencies": {
- "is-number": "^7.0.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=8.0"
+ "node": ">=18.17"
}
},
- "node_modules/toidentifier": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
- "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "node_modules/undici-types": {
+ "version": "6.19.8",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
+ "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
- "engines": {
- "node": ">=0.6"
- }
+ "license": "MIT"
},
- "node_modules/tough-cookie": {
- "version": "4.1.3",
- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz",
- "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==",
+ "node_modules/unified": {
+ "version": "10.1.2",
+ "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz",
+ "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==",
"dev": true,
- "optional": true,
+ "license": "MIT",
"dependencies": {
- "psl": "^1.1.33",
- "punycode": "^2.1.1",
- "universalify": "^0.2.0",
- "url-parse": "^1.5.3"
+ "@types/unist": "^2.0.0",
+ "bail": "^2.0.0",
+ "extend": "^3.0.0",
+ "is-buffer": "^2.0.0",
+ "is-plain-obj": "^4.0.0",
+ "trough": "^2.0.0",
+ "vfile": "^5.0.0"
},
- "engines": {
- "node": ">=6"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/tough-cookie/node_modules/punycode": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
- "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
+ "node_modules/unist-builder": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-3.0.1.tgz",
+ "integrity": "sha512-gnpOw7DIpCA0vpr6NqdPvTWnlPTApCTRzr+38E6hCWx3rz/cjo83SsKIlS1Z+L5ttScQ2AwutNnb8+tAvpb6qQ==",
"dev": true,
- "optional": true,
- "engines": {
- "node": ">=6"
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/tr46": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
- "dev": true
- },
- "node_modules/trim-newlines": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-5.0.0.tgz",
- "integrity": "sha512-kstfs+hgwmdsOadN3KgA+C68wPJwnZq4DN6WMDCvZapDWEF34W2TyPKN2v2+BJnZgIz5QOfxFeldLyYvdgRAwg==",
+ "node_modules/unist-util-generated": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-2.0.1.tgz",
+ "integrity": "sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==",
"dev": true,
- "engines": {
- "node": ">=14.16"
- },
+ "license": "MIT",
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/tslib": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
- "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
- "dev": true
- },
- "node_modules/tty-browserify": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz",
- "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==",
- "dev": true
- },
- "node_modules/tunnel-agent": {
- "version": "0.4.3",
- "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
- "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=",
+ "node_modules/unist-util-is": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz",
+ "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==",
"dev": true,
- "optional": true,
- "engines": {
- "node": "*"
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/type-check": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
- "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+ "node_modules/unist-util-position": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.4.tgz",
+ "integrity": "sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "prelude-ls": "^1.2.1"
+ "@types/unist": "^2.0.0"
},
- "engines": {
- "node": ">= 0.8.0"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/type-detect": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz",
- "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=",
+ "node_modules/unist-util-stringify-position": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz",
+ "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==",
"dev": true,
- "engines": {
- "node": "*"
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^2.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/type-fest": {
- "version": "0.21.3",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
- "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
+ "node_modules/unist-util-visit": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz",
+ "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==",
"dev": true,
- "engines": {
- "node": ">=10"
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^2.0.0",
+ "unist-util-is": "^5.0.0",
+ "unist-util-visit-parents": "^5.1.1"
},
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/type-is": {
- "version": "1.6.18",
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
- "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "node_modules/unist-util-visit-parents": {
+ "version": "5.1.3",
+ "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz",
+ "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "media-typer": "0.3.0",
- "mime-types": "~2.1.24"
+ "@types/unist": "^2.0.0",
+ "unist-util-is": "^5.0.0"
},
- "engines": {
- "node": ">= 0.6"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/typedarray": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
- "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
- "dev": true
+ "node_modules/universalify": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz",
+ "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4.0.0"
+ }
},
- "node_modules/typedarray-to-buffer": {
- "version": "3.1.5",
- "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
- "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
+ "node_modules/update-browserslist-db": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz",
+ "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==",
"dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
"dependencies": {
- "is-typedarray": "^1.0.0"
+ "escalade": "^3.2.0",
+ "picocolors": "^1.1.1"
+ },
+ "bin": {
+ "update-browserslist-db": "cli.js"
+ },
+ "peerDependencies": {
+ "browserslist": ">= 4.21.0"
}
},
- "node_modules/types-eslintrc": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/types-eslintrc/-/types-eslintrc-1.0.3.tgz",
- "integrity": "sha512-zKTR6aKHEudQpl+JoZjS3qh0B5IzSpQK/BCpYBECujcnKtqL87DJJ1sJKe5B8k/y8/UJ5sukq42QDvlaJyCO2w==",
+ "node_modules/uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dev": true,
+ "license": "BSD-2-Clause",
"dependencies": {
- "types-json": "^1.2.2"
+ "punycode": "^2.1.0"
}
},
- "node_modules/types-json": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/types-json/-/types-json-1.2.2.tgz",
- "integrity": "sha512-VfVLISHypS7ayIHvhacOESOTib4Sm4mAhnsgR8fzQdGp89YoBwMqvGmqENjtYehUQzgclT+7NafpEXkK/MHKwA==",
- "dev": true
- },
- "node_modules/types-pkg-json": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/types-pkg-json/-/types-pkg-json-1.2.1.tgz",
- "integrity": "sha512-Wj75lCkPwfj1BhmaJxMPpTQj9YGpihjs3WICigt1IjTAswr7zPXP0iJYPZjU0Rw/IriODhMJjAImkCIxt9KeuQ==",
+ "node_modules/url-parse": {
+ "version": "1.5.10",
+ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
+ "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "types-eslintrc": "^1.0.3",
- "types-json": "^1.2.2"
+ "querystringify": "^2.1.1",
+ "requires-port": "^1.0.0"
}
},
- "node_modules/uc.micro": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.3.tgz",
- "integrity": "sha1-ftUNXg+an7ClczeSWfKndFjVAZI=",
- "dev": true
- },
- "node_modules/ultron": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
- "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==",
- "dev": true
+ "node_modules/urlpattern-polyfill": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz",
+ "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==",
+ "dev": true,
+ "license": "MIT"
},
- "node_modules/umd": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz",
- "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==",
+ "node_modules/userhome": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/userhome/-/userhome-1.0.1.tgz",
+ "integrity": "sha512-5cnLm4gseXjAclKowC4IjByaGsjtAoV6PrOQOljplNB54ReUYJP8HdAFq2muHinSDAh09PPX/uXDPfdxRHvuSA==",
"dev": true,
- "bin": {
- "umd": "bin/cli.js"
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8.0"
}
},
- "node_modules/unbzip2-stream": {
- "version": "1.4.3",
- "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
- "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==",
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/uvu": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz",
+ "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "buffer": "^5.2.1",
- "through": "^2.3.8"
+ "dequal": "^2.0.0",
+ "diff": "^5.0.0",
+ "kleur": "^4.0.3",
+ "sade": "^1.7.3"
+ },
+ "bin": {
+ "uvu": "bin.js"
+ },
+ "engines": {
+ "node": ">=8"
}
},
- "node_modules/unc-path-regex": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
- "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
+ "node_modules/validate-npm-package-license": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
+ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
"dev": true,
- "engines": {
- "node": ">=0.10.0"
+ "license": "Apache-2.0",
+ "dependencies": {
+ "spdx-correct": "^3.0.0",
+ "spdx-expression-parse": "^3.0.0"
}
},
- "node_modules/undeclared-identifiers": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz",
- "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==",
+ "node_modules/vfile": {
+ "version": "5.3.7",
+ "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz",
+ "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "acorn-node": "^1.3.0",
- "dash-ast": "^1.0.0",
- "get-assigned-identifiers": "^1.2.0",
- "simple-concat": "^1.0.0",
- "xtend": "^4.0.1"
+ "@types/unist": "^2.0.0",
+ "is-buffer": "^2.0.0",
+ "unist-util-stringify-position": "^3.0.0",
+ "vfile-message": "^3.0.0"
},
- "bin": {
- "undeclared-identifiers": "bin.js"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/underscore.string": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz",
- "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==",
+ "node_modules/vfile-location": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-4.1.0.tgz",
+ "integrity": "sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "sprintf-js": "^1.1.1",
- "util-deprecate": "^1.0.2"
+ "@types/unist": "^2.0.0",
+ "vfile": "^5.0.0"
},
- "engines": {
- "node": "*"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/underscore.string/node_modules/sprintf-js": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz",
- "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==",
- "dev": true
- },
- "node_modules/unicode-canonical-property-names-ecmascript": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
- "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==",
+ "node_modules/vfile-message": {
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz",
+ "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==",
"dev": true,
- "engines": {
- "node": ">=4"
+ "license": "MIT",
+ "dependencies": {
+ "@types/unist": "^2.0.0",
+ "unist-util-stringify-position": "^3.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/unicode-match-property-ecmascript": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz",
- "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==",
+ "node_modules/vfile-reporter": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-7.0.5.tgz",
+ "integrity": "sha512-NdWWXkv6gcd7AZMvDomlQbK3MqFWL1RlGzMn++/O2TI+68+nqxCPTvLugdOtfSzXmjh+xUyhp07HhlrbJjT+mw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "unicode-canonical-property-names-ecmascript": "^1.0.4",
- "unicode-property-aliases-ecmascript": "^1.0.4"
+ "@types/supports-color": "^8.0.0",
+ "string-width": "^5.0.0",
+ "supports-color": "^9.0.0",
+ "unist-util-stringify-position": "^3.0.0",
+ "vfile": "^5.0.0",
+ "vfile-message": "^3.0.0",
+ "vfile-sort": "^3.0.0",
+ "vfile-statistics": "^2.0.0"
},
- "engines": {
- "node": ">=4"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/unicode-match-property-value-ecmascript": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz",
- "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==",
+ "node_modules/vfile-reporter/node_modules/ansi-regex": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
+ "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=4"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
}
},
- "node_modules/unicode-property-aliases-ecmascript": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz",
- "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==",
+ "node_modules/vfile-reporter/node_modules/emoji-regex": {
+ "version": "9.2.2",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
"dev": true,
- "engines": {
- "node": ">=4"
- }
+ "license": "MIT"
},
- "node_modules/unique-string": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz",
- "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==",
+ "node_modules/vfile-reporter/node_modules/string-width": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+ "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "crypto-random-string": "^4.0.0"
+ "eastasianwidth": "^0.2.0",
+ "emoji-regex": "^9.2.2",
+ "strip-ansi": "^7.0.1"
},
"engines": {
"node": ">=12"
@@ -17116,588 +13172,650 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/universalify": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz",
- "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==",
- "dev": true,
- "optional": true,
- "engines": {
- "node": ">= 4.0.0"
- }
- },
- "node_modules/unpipe": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
- "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
- "dev": true,
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/untildify": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz",
- "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==",
+ "node_modules/vfile-reporter/node_modules/strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^6.0.1"
+ },
"engines": {
- "node": ">=8"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
- "node_modules/update-notifier": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-6.0.2.tgz",
- "integrity": "sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==",
+ "node_modules/vfile-reporter/node_modules/supports-color": {
+ "version": "9.4.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz",
+ "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==",
"dev": true,
- "dependencies": {
- "boxen": "^7.0.0",
- "chalk": "^5.0.1",
- "configstore": "^6.0.0",
- "has-yarn": "^3.0.0",
- "import-lazy": "^4.0.0",
- "is-ci": "^3.0.1",
- "is-installed-globally": "^0.4.0",
- "is-npm": "^6.0.0",
- "is-yarn-global": "^0.4.0",
- "latest-version": "^7.0.0",
- "pupa": "^3.1.0",
- "semver": "^7.3.7",
- "semver-diff": "^4.0.0",
- "xdg-basedir": "^5.1.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=14.16"
+ "node": ">=12"
},
"funding": {
- "url": "https://github.com/yeoman/update-notifier?sponsor=1"
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
}
},
- "node_modules/update-notifier/node_modules/chalk": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
- "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+ "node_modules/vfile-sort": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/vfile-sort/-/vfile-sort-3.0.1.tgz",
+ "integrity": "sha512-1os1733XY6y0D5x0ugqSeaVJm9lYgj0j5qdcZQFyxlZOSy1jYarL77lLyb5gK4Wqr1d5OxmuyflSO3zKyFnTFw==",
"dev": true,
- "engines": {
- "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ "license": "MIT",
+ "dependencies": {
+ "vfile": "^5.0.0",
+ "vfile-message": "^3.0.0"
},
"funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/update-notifier/node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "node_modules/vfile-statistics": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/vfile-statistics/-/vfile-statistics-2.0.1.tgz",
+ "integrity": "sha512-W6dkECZmP32EG/l+dp2jCLdYzmnDBIw6jwiLZSER81oR5AHRcVqL+k3Z+pfH1R73le6ayDkJRMk0sutj1bMVeg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "yallist": "^4.0.0"
+ "vfile": "^5.0.0",
+ "vfile-message": "^3.0.0"
},
- "engines": {
- "node": ">=10"
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/unified"
}
},
- "node_modules/update-notifier/node_modules/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "node_modules/vite": {
+ "version": "5.4.14",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz",
+ "integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "lru-cache": "^6.0.0"
+ "esbuild": "^0.21.3",
+ "postcss": "^8.4.43",
+ "rollup": "^4.20.0"
},
"bin": {
- "semver": "bin/semver.js"
+ "vite": "bin/vite.js"
},
"engines": {
- "node": ">=10"
+ "node": "^18.0.0 || >=20.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ },
+ "peerDependencies": {
+ "@types/node": "^18.0.0 || >=20.0.0",
+ "less": "*",
+ "lightningcss": "^1.21.0",
+ "sass": "*",
+ "sass-embedded": "*",
+ "stylus": "*",
+ "sugarss": "*",
+ "terser": "^5.4.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ }
}
},
- "node_modules/update-notifier/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
- },
- "node_modules/uri-js": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
- "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "node_modules/vite-node": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.8.tgz",
+ "integrity": "sha512-uPAwSr57kYjAUux+8E2j0q0Fxpn8M9VoyfGiRI8Kfktz9NcYMCenwY5RnZxnF1WTu3TGiYipirIzacLL3VVGFg==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "punycode": "^2.1.0"
- }
- },
- "node_modules/uri-js/node_modules/punycode": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
- "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
- "dev": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/uri-path": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz",
- "integrity": "sha512-8pMuAn4KacYdGMkFaoQARicp4HSw24/DHOVKWqVRJ8LhhAwPPFpdGvdL9184JVmUwe7vz7Z9n6IqI6t5n2ELdg==",
- "dev": true,
+ "cac": "^6.7.14",
+ "debug": "^4.3.7",
+ "es-module-lexer": "^1.5.4",
+ "pathe": "^1.1.2",
+ "vite": "^5.0.0"
+ },
+ "bin": {
+ "vite-node": "vite-node.mjs"
+ },
"engines": {
- "node": ">= 0.10"
+ "node": "^18.0.0 || >=20.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
}
},
- "node_modules/url": {
- "version": "0.11.0",
- "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
- "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
+ "node_modules/vite-plugin-string": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/vite-plugin-string/-/vite-plugin-string-1.2.3.tgz",
+ "integrity": "sha512-zw2jL0c4B6CAvxO8PshX04494jTcqJjNH2kW1AugBH+fImRY0evdNtVgmeS1i1VFdua/OFhL7fMqIPh0uF21/Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "punycode": "1.3.2",
- "querystring": "0.2.0"
+ "@rollup/pluginutils": ">=4.1.0"
+ },
+ "peerDependencies": {
+ "vite": ">=2"
+ }
+ },
+ "node_modules/vitest": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.8.tgz",
+ "integrity": "sha512-1vBKTZskHw/aosXqQUlVWWlGUxSJR8YtiyZDJAFeW2kPAeX6S3Sool0mjspO+kXLuxVWlEDDowBAeqeAQefqLQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@vitest/expect": "2.1.8",
+ "@vitest/mocker": "2.1.8",
+ "@vitest/pretty-format": "^2.1.8",
+ "@vitest/runner": "2.1.8",
+ "@vitest/snapshot": "2.1.8",
+ "@vitest/spy": "2.1.8",
+ "@vitest/utils": "2.1.8",
+ "chai": "^5.1.2",
+ "debug": "^4.3.7",
+ "expect-type": "^1.1.0",
+ "magic-string": "^0.30.12",
+ "pathe": "^1.1.2",
+ "std-env": "^3.8.0",
+ "tinybench": "^2.9.0",
+ "tinyexec": "^0.3.1",
+ "tinypool": "^1.0.1",
+ "tinyrainbow": "^1.2.0",
+ "vite": "^5.0.0",
+ "vite-node": "2.1.8",
+ "why-is-node-running": "^2.3.0"
+ },
+ "bin": {
+ "vitest": "vitest.mjs"
+ },
+ "engines": {
+ "node": "^18.0.0 || >=20.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/vitest"
+ },
+ "peerDependencies": {
+ "@edge-runtime/vm": "*",
+ "@types/node": "^18.0.0 || >=20.0.0",
+ "@vitest/browser": "2.1.8",
+ "@vitest/ui": "2.1.8",
+ "happy-dom": "*",
+ "jsdom": "*"
+ },
+ "peerDependenciesMeta": {
+ "@edge-runtime/vm": {
+ "optional": true
+ },
+ "@types/node": {
+ "optional": true
+ },
+ "@vitest/browser": {
+ "optional": true
+ },
+ "@vitest/ui": {
+ "optional": true
+ },
+ "happy-dom": {
+ "optional": true
+ },
+ "jsdom": {
+ "optional": true
+ }
}
},
- "node_modules/url-parse": {
- "version": "1.5.10",
- "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
- "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
+ "node_modules/vue-template-compiler": {
+ "version": "2.7.16",
+ "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz",
+ "integrity": "sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==",
"dev": true,
+ "license": "MIT",
"optional": true,
"dependencies": {
- "querystringify": "^2.1.1",
- "requires-port": "^1.0.0"
+ "de-indent": "^1.0.2",
+ "he": "^1.2.0"
}
},
- "node_modules/url/node_modules/punycode": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
- "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
- "dev": true
- },
- "node_modules/util": {
- "version": "0.10.4",
- "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
- "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
+ "node_modules/wait-port": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/wait-port/-/wait-port-1.1.0.tgz",
+ "integrity": "sha512-3e04qkoN3LxTMLakdqeWth8nih8usyg+sf1Bgdf9wwUkp05iuK1eSY/QpLvscT/+F/gA89+LpUmmgBtesbqI2Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "inherits": "2.0.3"
+ "chalk": "^4.1.2",
+ "commander": "^9.3.0",
+ "debug": "^4.3.4"
+ },
+ "bin": {
+ "wait-port": "bin/wait-port.js"
+ },
+ "engines": {
+ "node": ">=10"
}
},
- "node_modules/util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
- "dev": true
- },
- "node_modules/utils-merge": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
- "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
+ "node_modules/wait-port/node_modules/commander": {
+ "version": "9.5.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",
+ "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">= 0.4.0"
+ "node": "^12.20.0 || >=14"
}
},
- "node_modules/v8flags": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz",
- "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==",
+ "node_modules/web-namespaces": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz",
+ "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==",
"dev": true,
- "dependencies": {
- "homedir-polyfill": "^1.0.1"
- },
- "engines": {
- "node": ">= 0.10"
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/vali-date": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz",
- "integrity": "sha512-sgECfZthyaCKW10N0fm27cg8HYTFK5qMWgypqkXMQ4Wbl/zZKx7xZICgcoxIIE+WFAP/MBL2EFwC/YvLxw3Zeg==",
+ "node_modules/web-streams-polyfill": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
+ "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=0.10.0"
+ "node": ">= 8"
}
},
- "node_modules/validate-npm-package-license": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
- "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
- "dev": true,
- "dependencies": {
- "spdx-correct": "^3.0.0",
- "spdx-expression-parse": "^3.0.0"
+ "node_modules/webdriver": {
+ "version": "9.7.2",
+ "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-9.7.2.tgz",
+ "integrity": "sha512-FcPokssrgzwCHL0sQRiiX8H6he30q+W/jy1TvzcUdbQRgpTqnxUPT+hopd6xVhuZecUeHo/KSVXZ1hhcwwJKmQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "^20.1.0",
+ "@types/ws": "^8.5.3",
+ "@wdio/config": "9.7.2",
+ "@wdio/logger": "9.4.4",
+ "@wdio/protocols": "9.7.0",
+ "@wdio/types": "9.6.3",
+ "@wdio/utils": "9.7.2",
+ "deepmerge-ts": "^7.0.3",
+ "undici": "^6.20.1",
+ "ws": "^8.8.0"
+ },
+ "engines": {
+ "node": ">=18.20.0"
+ }
+ },
+ "node_modules/webdriverio": {
+ "version": "9.7.2",
+ "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-9.7.2.tgz",
+ "integrity": "sha512-zpGCn+pb63w9ZltCzIeGfEUSLLFwEsr0N4R25BdDFlBPQ5467VugPdSw/hWGTwgx7BzeKSdUgbKHqZMxb77nbQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "^20.11.30",
+ "@types/sinonjs__fake-timers": "^8.1.5",
+ "@wdio/config": "9.7.2",
+ "@wdio/logger": "9.4.4",
+ "@wdio/protocols": "9.7.0",
+ "@wdio/repl": "9.4.4",
+ "@wdio/types": "9.6.3",
+ "@wdio/utils": "9.7.2",
+ "archiver": "^7.0.1",
+ "aria-query": "^5.3.0",
+ "cheerio": "^1.0.0-rc.12",
+ "css-shorthand-properties": "^1.1.1",
+ "css-value": "^0.0.1",
+ "grapheme-splitter": "^1.0.4",
+ "htmlfy": "^0.6.0",
+ "import-meta-resolve": "^4.0.0",
+ "is-plain-obj": "^4.1.0",
+ "jszip": "^3.10.1",
+ "lodash.clonedeep": "^4.5.0",
+ "lodash.zip": "^4.2.0",
+ "minimatch": "^9.0.3",
+ "query-selector-shadow-dom": "^1.0.1",
+ "resq": "^1.11.0",
+ "rgb2hex": "0.2.5",
+ "serialize-error": "^11.0.3",
+ "urlpattern-polyfill": "^10.0.0",
+ "webdriver": "9.7.2"
+ },
+ "engines": {
+ "node": ">=18.20.0"
+ },
+ "peerDependencies": {
+ "puppeteer-core": "^22.3.0"
+ },
+ "peerDependenciesMeta": {
+ "puppeteer-core": {
+ "optional": true
+ }
}
},
- "node_modules/validate-npm-package-name": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz",
- "integrity": "sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw==",
+ "node_modules/webdriverio/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "builtins": "^1.0.3"
- }
- },
- "node_modules/vary": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
- "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
- "dev": true,
- "engines": {
- "node": ">= 0.8"
+ "balanced-match": "^1.0.0"
}
},
- "node_modules/vm-browserify": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz",
- "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==",
- "dev": true
- },
- "node_modules/wcwidth": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
- "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
+ "node_modules/webdriverio/node_modules/minimatch": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dev": true,
+ "license": "ISC",
"dependencies": {
- "defaults": "^1.0.3"
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
- "dev": true
+ "dev": true,
+ "license": "BSD-2-Clause"
},
- "node_modules/websocket-driver": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz",
- "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=",
+ "node_modules/whatwg-encoding": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz",
+ "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "http-parser-js": ">=0.4.0",
- "websocket-extensions": ">=0.1.1"
+ "iconv-lite": "0.6.3"
},
"engines": {
- "node": ">=0.8.0"
+ "node": ">=18"
}
},
- "node_modules/websocket-extensions": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
- "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
+ "node_modules/whatwg-encoding/node_modules/iconv-lite": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
"engines": {
- "node": ">=0.8.0"
+ "node": ">=0.10.0"
}
},
- "node_modules/websocket-stream": {
- "version": "5.5.2",
- "resolved": "https://registry.npmjs.org/websocket-stream/-/websocket-stream-5.5.2.tgz",
- "integrity": "sha512-8z49MKIHbGk3C4HtuHWDtYX8mYej1wWabjthC/RupM9ngeukU4IWoM46dgth1UOS/T4/IqgEdCDJuMe2039OQQ==",
+ "node_modules/whatwg-mimetype": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz",
+ "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==",
"dev": true,
- "dependencies": {
- "duplexify": "^3.5.1",
- "inherits": "^2.0.1",
- "readable-stream": "^2.3.3",
- "safe-buffer": "^5.1.2",
- "ws": "^3.2.0",
- "xtend": "^4.0.0"
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
}
},
- "node_modules/websocket-stream/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"
- }
- ]
- },
- "node_modules/whatwg-fetch": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz",
- "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==",
- "dev": true
- },
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
- "which": "bin/which"
- }
- },
- "node_modules/which-module": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
- "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
- "dev": true
- },
- "node_modules/which-pm-runs": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz",
- "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=",
- "dev": true
- },
- "node_modules/widest-line": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz",
- "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==",
- "dev": true,
- "dependencies": {
- "string-width": "^5.0.1"
+ "node-which": "bin/node-which"
},
"engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">= 8"
}
},
- "node_modules/widest-line/node_modules/ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "node_modules/which-module": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz",
+ "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==",
"dev": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
- }
- },
- "node_modules/widest-line/node_modules/emoji-regex": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
- "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
- "dev": true
+ "license": "ISC"
},
- "node_modules/widest-line/node_modules/string-width": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
- "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
- "dev": true,
- "dependencies": {
- "eastasianwidth": "^0.2.0",
- "emoji-regex": "^9.2.2",
- "strip-ansi": "^7.0.1"
- },
+ "node_modules/which-pm-runs": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.1.0.tgz",
+ "integrity": "sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA==",
+ "dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">=4"
}
},
- "node_modules/widest-line/node_modules/strip-ansi": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
- "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "node_modules/why-is-node-running": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz",
+ "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^6.0.1"
+ "siginfo": "^2.0.0",
+ "stackback": "0.0.2"
},
- "engines": {
- "node": ">=12"
+ "bin": {
+ "why-is-node-running": "cli.js"
},
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ "engines": {
+ "node": ">=8"
}
},
"node_modules/word-wrap": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz",
- "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==",
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
+ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
- "node_modules/workerpool": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz",
- "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==",
- "dev": true
- },
"node_modules/wrap-ansi": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
- "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz",
+ "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^6.2.1",
+ "string-width": "^7.0.0",
+ "strip-ansi": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi-cjs": {
+ "name": "wrap-ansi",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/wrap-ansi/node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
+ "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
}
},
"node_modules/wrap-ansi/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+ "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
"dev": true,
- "dependencies": {
- "color-convert": "^2.0.1"
- },
+ "license": "MIT",
"engines": {
- "node": ">=8"
+ "node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/wrap-ansi/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
"node_modules/wrap-ansi/node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz",
+ "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==",
"dev": true,
- "engines": {
- "node": ">=8"
- }
+ "license": "MIT"
},
"node_modules/wrap-ansi/node_modules/string-width": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
- "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
+ "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
+ "emoji-regex": "^10.3.0",
+ "get-east-asian-width": "^1.0.0",
+ "strip-ansi": "^7.1.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/wrap-ansi/node_modules/strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^5.0.0"
+ "ansi-regex": "^6.0.1"
},
"engines": {
- "node": ">=8"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
- "dev": true
- },
- "node_modules/write-file-atomic": {
- "version": "2.4.3",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz",
- "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
"dev": true,
- "dependencies": {
- "graceful-fs": "^4.1.11",
- "imurmurhash": "^0.1.4",
- "signal-exit": "^3.0.2"
- }
+ "license": "ISC"
},
"node_modules/ws": {
- "version": "3.3.3",
- "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz",
- "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==",
- "dev": true,
- "dependencies": {
- "async-limiter": "~1.0.0",
- "safe-buffer": "~5.1.0",
- "ultron": "~1.1.0"
- }
- },
- "node_modules/xdg-basedir": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz",
- "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==",
+ "version": "8.18.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
+ "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=12"
+ "node": ">=10.0.0"
},
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/xtend": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
- "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
- "dev": true,
- "engines": {
- "node": ">=0.4"
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
}
},
"node_modules/y18n": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
- "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==",
- "dev": true
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
+ "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
+ "dev": true,
+ "license": "ISC"
},
"node_modules/yallist": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
- "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
- "dev": true
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+ "dev": true,
+ "license": "ISC"
},
"node_modules/yaml": {
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
"dev": true,
+ "license": "ISC",
"engines": {
"node": ">= 6"
}
@@ -17707,6 +13825,7 @@
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
"integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"cliui": "^6.0.0",
"decamelize": "^1.2.0",
@@ -17725,124 +13844,93 @@
}
},
"node_modules/yargs-parser": {
- "version": "13.1.2",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
- "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
+ "version": "18.1.3",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
+ "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
"dev": true,
+ "license": "ISC",
"dependencies": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
- }
- },
- "node_modules/yargs-unparser": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz",
- "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==",
- "dev": true,
- "dependencies": {
- "camelcase": "^6.0.0",
- "decamelize": "^4.0.0",
- "flat": "^5.0.2",
- "is-plain-obj": "^2.1.0"
},
"engines": {
- "node": ">=10"
+ "node": ">=6"
}
},
- "node_modules/yargs-unparser/node_modules/camelcase": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
- "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
+ "node_modules/yargs-parser/node_modules/decamelize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">=0.10.0"
}
},
- "node_modules/yargs-unparser/node_modules/decamelize": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz",
- "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==",
+ "node_modules/yargs/node_modules/decamelize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
"dev": true,
+ "license": "MIT",
"engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "node": ">=0.10.0"
}
},
- "node_modules/yargs-unparser/node_modules/is-plain-obj": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
- "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==",
+ "node_modules/yargs/node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
"engines": {
"node": ">=8"
}
},
- "node_modules/yargs/node_modules/ansi-regex": {
+ "node_modules/yargs/node_modules/locate-path": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/yargs/node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
- },
- "node_modules/yargs/node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/yargs/node_modules/string-width": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
- "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
+ "p-locate": "^4.1.0"
},
"engines": {
"node": ">=8"
}
},
- "node_modules/yargs/node_modules/strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "node_modules/yargs/node_modules/p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "ansi-regex": "^5.0.0"
+ "p-try": "^2.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/yargs/node_modules/yargs-parser": {
- "version": "18.1.3",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
- "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
+ "node_modules/yargs/node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "camelcase": "^5.0.0",
- "decamelize": "^1.2.0"
+ "p-limit": "^2.2.0"
},
"engines": {
- "node": ">=6"
+ "node": ">=8"
}
},
"node_modules/yauzl": {
@@ -17850,16 +13938,28 @@
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
"integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"buffer-crc32": "~0.2.3",
"fd-slicer": "~1.1.0"
}
},
+ "node_modules/yauzl/node_modules/buffer-crc32": {
+ "version": "0.2.13",
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
+ "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=10"
},
@@ -17867,79 +13967,52 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/yui": {
- "version": "3.18.1",
- "resolved": "https://registry.npmjs.org/yui/-/yui-3.18.1.tgz",
- "integrity": "sha1-4AAmnsCntvvHQcu4/L0OZRF7AUw=",
+ "node_modules/yoctocolors-cjs": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz",
+ "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==",
"dev": true,
- "dependencies": {
- "request": "~2.40.0"
- },
+ "license": "MIT",
"engines": {
- "node": ">=0.8.0"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/yui/node_modules/mime-types": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz",
- "integrity": "sha1-mVrhOSq4r/y/yyZB3QVOlDwNXc4=",
+ "node_modules/zip-stream": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-6.0.1.tgz",
+ "integrity": "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==",
"dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "archiver-utils": "^5.0.0",
+ "compress-commons": "^6.0.2",
+ "readable-stream": "^4.0.0"
+ },
"engines": {
- "node": ">= 0.8.0"
+ "node": ">= 14"
}
},
- "node_modules/yui/node_modules/qs": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/qs/-/qs-1.0.2.tgz",
- "integrity": "sha1-UKk+K1r2aRwxvOpdrnjubqGQN2g=",
- "dev": true
+ "node_modules/zod": {
+ "version": "3.25.51",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.51.tgz",
+ "integrity": "sha512-TQSnBldh+XSGL+opiSIq0575wvDPqu09AqWe1F7JhUMKY+M91/aGlK4MhpVNO7MgYfHcVCB1ffwAUTJzllKJqg==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
},
- "node_modules/yui/node_modules/request": {
- "version": "2.40.0",
- "resolved": "https://registry.npmjs.org/request/-/request-2.40.0.tgz",
- "integrity": "sha1-TdZw9pbx5uhC5mtLXoOTAaub62c=",
- "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
+ "node_modules/zwitch": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz",
+ "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==",
"dev": true,
- "engines": [
- "node >= 0.8.0"
- ],
- "dependencies": {
- "forever-agent": "~0.5.0",
- "json-stringify-safe": "~5.0.0",
- "mime-types": "~1.0.1",
- "node-uuid": "~1.4.0",
- "qs": "~1.0.0"
- },
- "optionalDependencies": {
- "aws-sign2": "~0.5.0",
- "form-data": "~0.1.0",
- "hawk": "1.1.1",
- "http-signature": "~0.10.0",
- "oauth-sign": "~0.3.0",
- "stringstream": "~0.0.4",
- "tough-cookie": ">=0.12.0",
- "tunnel-agent": "~0.4.0"
- }
- },
- "node_modules/yuidocjs": {
- "version": "0.10.2",
- "resolved": "https://registry.npmjs.org/yuidocjs/-/yuidocjs-0.10.2.tgz",
- "integrity": "sha1-M5JJZ85hkCTNcO9pTiZ9L5iPc/Y=",
- "dev": true,
- "dependencies": {
- "express": "^4.13.1",
- "graceful-fs": "^4.1.2",
- "markdown-it": "^4.3.0",
- "mdn-links": "^0.1.0",
- "minimatch": "^3.0.2",
- "rimraf": "^2.4.1",
- "yui": "^3.18.1"
- },
- "bin": {
- "yuidoc": "lib/cli.js"
- },
- "engines": {
- "node": ">=0.10.0"
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
}
}
}
diff --git a/package.json b/package.json
index 3de1f9e9a0..c18ed30084 100644
--- a/package.json
+++ b/package.json
@@ -2,146 +2,115 @@
"name": "p5",
"repository": "processing/p5.js",
"scripts": {
- "build": "grunt build",
- "dev": "grunt yui browserify:dev connect:yui watch:quick",
- "docs": "grunt yui",
- "docs:dev": "grunt yui:dev",
- "test": "grunt",
- "lint": "grunt lint",
- "lint:fix": "grunt lint-fix"
+ "build": "rollup -c",
+ "dev": "vite preview/",
+ "dev:global": "concurrently -n build,server \"rollup -c -w\" \"npx vite preview/global/\"",
+ "docs": "documentation build ./src/**/*.js ./src/**/**/*.js -o ./docs/data.json && node ./utils/convert.mjs",
+ "bench": "vitest bench",
+ "bench:report": "vitest bench --reporter=verbose",
+ "test": "vitest",
+ "lint": "eslint .",
+ "lint:fix": "eslint --fix .",
+ "generate-types": "npm run docs && node utils/generate-types.mjs && node utils/patch.mjs"
},
"lint-staged": {
- "ignore": [
- "test/js/**/*.js"
- ],
- "Gruntfile.js": "eslint",
- "docs/preprocessor.js": "eslint",
- "utils/**/*.js": "eslint",
- "tasks/**/*.js": "eslint",
+ "src/**/*.js": "eslint",
"test/**/*.js": "eslint",
- "src/**/*.js": [
- "eslint",
- "node --require @babel/register ./utils/sample-linter.js"
- ]
+ "utils/**/*.{js,mjs}": "eslint"
},
- "version": "1.11.3",
- "devDependencies": {
- "@babel/core": "^7.7.7",
- "@babel/preset-env": "^7.10.2",
- "@babel/register": "^7.7.7",
- "all-contributors-cli": "^6.19.0",
- "babel-plugin-i18next-extract": "^0.5.0",
- "babel-plugin-istanbul": "^5.2.0",
- "babelify": "^10.0.0",
- "brfs-babel": "^2.0.0",
- "browserify": "^16.5.0",
- "chai": "^3.5.0",
- "connect-modrewrite": "^0.10.1",
- "core-js": "^3.6.5",
- "derequire": "^2.0.0",
- "es6-promise": "^4.2.8",
- "eslint": "^8.23.1",
- "fetch-jsonp": "^1.1.3",
+ "version": "2.0.5",
+ "dependencies": {
+ "@davepagurek/bezier-path": "^0.0.2",
+ "@japont/unicode-range": "^1.0.0",
+ "acorn": "^8.12.1",
+ "acorn-walk": "^8.3.4",
+ "colorjs.io": "^0.5.2",
+ "escodegen": "^2.1.0",
"file-saver": "^1.3.8",
"gifenc": "^1.0.3",
- "grunt": "^1.6.1",
- "grunt-cli": "^1.4.3",
- "grunt-contrib-clean": "^2.0.1",
- "grunt-contrib-connect": "^3.0.0",
- "grunt-contrib-uglify": "^5.2.2",
- "grunt-contrib-watch": "^1.1.0",
- "grunt-contrib-yuidoc": "1.0.0",
- "grunt-eslint": "^24.0.0",
- "grunt-minjson": "^0.4.0",
- "grunt-mocha-test": "^0.13.3",
- "grunt-newer": "^1.3.0",
- "grunt-simple-nyc": "^3.0.1",
- "html-entities": "^1.3.1",
- "husky": "^4.2.3",
"i18next": "^19.0.2",
"i18next-browser-languagedetector": "^4.0.1",
"libtess": "^1.2.2",
- "lint-staged": "^4.3.0",
- "marked": "^4.0.10",
- "mocha": "^10.2.0",
- "np": "^8.0.4",
"omggif": "^1.0.10",
- "open": "^7.0.3",
- "opentype.js": "^0.9.0",
- "pretty-fast": "^0.2.7",
- "promise-map-series": "^0.2.3",
- "puppeteer": "^18.2.1",
- "regenerator-runtime": "^0.13.3",
- "simple-git": "^3.16.1",
- "whatwg-fetch": "^2.0.4"
+ "pako": "^2.1.0",
+ "pixelmatch": "^7.1.0",
+ "zod": "^3.25.51"
+ },
+ "devDependencies": {
+ "@eslint/compat": "^1.2.9",
+ "@eslint/js": "^9.28.0",
+ "@eslint/markdown": "^6.5.0",
+ "@rollup/plugin-alias": "^5.1.1",
+ "@rollup/plugin-commonjs": "^25.0.7",
+ "@rollup/plugin-json": "^6.1.0",
+ "@rollup/plugin-node-resolve": "^15.2.3",
+ "@rollup/plugin-replace": "^5.0.7",
+ "@rollup/plugin-terser": "^0.4.4",
+ "@stylistic/eslint-plugin": "^4.4.1",
+ "@vitest/browser": "^2.1.5",
+ "all-contributors-cli": "^6.19.0",
+ "concurrently": "^8.2.2",
+ "documentation": "^14.0.3",
+ "eslint": "^9.28.0",
+ "eslint-plugin-jsdoc": "^50.8.0",
+ "glob": "^11.0.1",
+ "globals": "^16.2.0",
+ "husky": "^4.2.3",
+ "lint-staged": "^15.1.0",
+ "msw": "^2.6.3",
+ "rollup": "^4.9.6",
+ "rollup-plugin-string": "^3.0.0",
+ "rollup-plugin-visualizer": "^5.12.0",
+ "vite": "^5.0.2",
+ "vite-plugin-string": "^1.2.2",
+ "vitest": "^2.1.5",
+ "webdriverio": "^9.0.7"
},
"license": "LGPL-2.1",
- "main": "./lib/p5.min.js",
+ "browser": "./lib/p5.min.js",
+ "exports": {
+ ".": "./dist/app.js",
+ "./core": "./dist/core/main.js",
+ "./shape": "./dist/shape/index.js",
+ "./accessibility": "./dist/accessibility/index.js",
+ "./friendlyErrors": "./dist/core/friendlyErrors/index.js",
+ "./data": "./dist/data/index.js",
+ "./dom": "./dist/dom/index.js",
+ "./events": "./dist/events/index.js",
+ "./image": "./dist/image/index.js",
+ "./io": "./dist/io/index.js",
+ "./math": "./dist/math/index.js",
+ "./utilities": "./dist/utilities/index.js",
+ "./webgl": "./dist/webgl/index.js",
+ "./type": "./dist/type/index.js"
+ },
"files": [
+ "dist/**",
"license.txt",
"lib/p5.min.js",
"lib/p5.js",
- "lib/addons/p5.sound.js",
- "lib/addons/p5.sound.min.js",
- "translations/**"
+ "lib/p5.esm.js",
+ "lib/p5.esm.min.js",
+ "translations/**",
+ "types/**"
],
"description": "[](https://www.npmjs.com/package/p5)",
"bugs": {
"url": "https://github.com/processing/p5.js/issues"
},
- "homepage": "https://github.com/processing/p5.js#readme",
+ "homepage": "https://p5js.org",
"directories": {
"doc": "docs",
"test": "test"
},
- "babel": {
- "presets": [
- [
- "@babel/preset-env",
- {
- "useBuiltIns": "usage",
- "corejs": 3
- }
- ]
- ],
- "plugins": [
- [
- "i18next-extract",
- {
- "locales": [
- "en",
- "es"
- ],
- "outputPath": "translations/{{locale}}/{{ns}}.json",
- "tFunctionNames": [
- "translator"
- ]
- }
- ]
- ],
- "env": {
- "test": {
- "plugins": [
- [
- "istanbul",
- {
- "include": [
- "src/**/*.js"
- ]
- }
- ]
- ]
- }
- }
- },
- "browserslist": [
- "last 2 versions",
- "not dead"
- ],
"author": "",
"husky": {
- "hooks": {
- "pre-commit": "lint-staged"
- }
- }
+ "hooks": {}
+ },
+ "msw": {
+ "workerDirectory": [
+ "test"
+ ]
+ },
+ "types": "./types/p5.d.ts"
}
diff --git a/preview/global/index.html b/preview/global/index.html
new file mode 100644
index 0000000000..3235c1e5bd
--- /dev/null
+++ b/preview/global/index.html
@@ -0,0 +1,21 @@
+
+
+
+ P5 test
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/preview/global/sketch.js b/preview/global/sketch.js
new file mode 100644
index 0000000000..990b750d27
--- /dev/null
+++ b/preview/global/sketch.js
@@ -0,0 +1,128 @@
+let instancedShader;
+let instancedStrokeShader;
+let stars;
+let originalImage;
+let pixelateShader;
+let fresnelShader;
+let bloomShader;
+
+function fresnelShaderCallback() {
+ const fresnelPower = uniformFloat(2);
+ const fresnelBias = uniformFloat(-0.1);
+ const fresnelScale = uniformFloat(2);
+
+ getCameraInputs((inputs) => {
+ let n = normalize(inputs.normal);
+ let v = normalize(-inputs.position);
+ let base = 1.0 - dot(n, v);
+ let fresnel = fresnelScale * pow(base, fresnelPower) + fresnelBias;
+ let col = mix([0, 0, 0], [1, .5, .7], fresnel);
+ inputs.color = [col, 1];
+ return inputs;
+ });
+}
+
+function starShaderCallback() {
+ const time = uniformFloat(() => millis());
+ const skyRadius = uniformFloat(250);
+
+ function rand2(st) {
+ return fract(sin(dot(st, [12.9898, 78.233])) * 43758.5453123);
+ }
+
+ function semiSphere() {
+ let id = instanceID();
+ let theta = rand2([id, 0.1234]) * TWO_PI + time / 100000;
+ let phi = rand2([id, 3.321]) * PI + time / 50000;
+
+ let r = skyRadius;
+ r *= sin(phi);
+ let x = r * sin(phi) * cos(theta);
+ let y = r * 1.5 * cos(phi);
+ let z = r * sin(phi) * sin(theta);
+ return [x, y, z];
+ }
+
+ getWorldInputs((inputs) => {
+ inputs.position += semiSphere();
+ return inputs;
+ });
+
+ getObjectInputs((inputs) => {
+ let size = 1 + 0.5 * sin(time * 0.002 + instanceID());
+ inputs.position *= size;
+ return inputs;
+ });
+}
+
+function pixelateShaderCallback() {
+ const pixelCountX = uniformFloat(()=> 280);
+
+ getColor((inputs, canvasContent) => {
+ const aspectRatio = inputs.canvasSize.x / inputs.canvasSize.y;
+ const pixelSize = [pixelCountX, pixelCountX / aspectRatio];
+
+ let coord = inputs.texCoord;
+ coord = floor(coord * pixelSize) / pixelSize;
+
+ let col = getTexture(canvasContent, coord);
+ return col//[coord, 0, 1];
+ });
+}
+
+function bloomShaderCallback() {
+ const preBlur = uniformTexture(() => originalImage);
+
+ getColor((input, canvasContent) => {
+ const blurredCol = getTexture(canvasContent, input.texCoord);
+ const originalCol = getTexture(preBlur, input.texCoord);
+
+ const intensity = max(originalCol, 0.1) * 12.2;
+ const bloom = originalCol + blurredCol * intensity;
+ return [bloom.rgb, 1];
+ });
+}
+
+async function setup(){
+ createCanvas(800, 600, WEBGL);
+ pixelDensity(1);
+ stars = buildGeometry(() => sphere(8, 4, 2))
+ originalImage = createFramebuffer();
+
+ starShader = baseMaterialShader().modify(starShaderCallback);
+ starStrokeShader = baseStrokeShader().modify(starShaderCallback)
+ fresnelShader = baseColorShader().modify(fresnelShaderCallback);
+ bloomShader = baseFilterShader().modify(bloomShaderCallback);
+ pixelateShader = baseFilterShader().modify(pixelateShaderCallback);
+}
+
+function draw(){
+ originalImage.begin();
+ background(0);
+ orbitControl();
+
+ push()
+ strokeWeight(2)
+ stroke(255,0,0)
+ rotateX(PI/2 + millis() * 0.0005);
+ fill(255,100, 150)
+ strokeShader(starStrokeShader)
+ shader(starShader);
+ model(stars, 1000);
+ pop()
+
+ push()
+ shader(fresnelShader)
+ noStroke()
+ sphere(90);
+ filter(pixelateShader);
+ pop()
+
+ originalImage.end();
+
+ imageMode(CENTER)
+ image(originalImage, 0, 0)
+
+ filter(BLUR, 15)
+ filter(bloomShader);
+}
\ No newline at end of file
diff --git a/preview/global/vite.config.mjs b/preview/global/vite.config.mjs
new file mode 100644
index 0000000000..ed95741666
--- /dev/null
+++ b/preview/global/vite.config.mjs
@@ -0,0 +1,32 @@
+import { defineConfig } from 'vitest/config';
+import vitePluginString from 'vite-plugin-string';
+import path from 'node:path';
+
+const libPath = path.resolve(__dirname, '../../lib');
+
+export default defineConfig({
+ root: '.',
+ publicDir: libPath,
+ plugins: [
+ vitePluginString({
+ include: [
+ 'src/webgl/shaders/**/*'
+ ]
+ }),
+ {
+ name: 'reload',
+ configureServer(server) {
+ const { ws, watcher } = server;
+ const buildLibPath = path.resolve(libPath, './p5.js');
+ watcher.add(buildLibPath);
+ watcher.on('change', file => {
+ if(file === buildLibPath){
+ ws.send({
+ type: 'full-reload'
+ });
+ }
+ });
+ }
+ }
+ ]
+});
diff --git a/preview/index.html b/preview/index.html
new file mode 100644
index 0000000000..d0f3b329ae
--- /dev/null
+++ b/preview/index.html
@@ -0,0 +1,51 @@
+
+
+
+
+ P5 test
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/preview/vite.config.mjs b/preview/vite.config.mjs
new file mode 100644
index 0000000000..3f528f6925
--- /dev/null
+++ b/preview/vite.config.mjs
@@ -0,0 +1,14 @@
+import { defineConfig } from 'vitest/config';
+import vitePluginString from 'vite-plugin-string';
+
+export default defineConfig({
+ root: './',
+ appType: 'mpa',
+ plugins: [
+ vitePluginString({
+ include: [
+ 'src/webgl/shaders/**/*'
+ ]
+ })
+ ]
+});
diff --git a/rfc_p5js_2.md b/rfc_p5js_2.md
new file mode 100644
index 0000000000..fb9bcf2baa
--- /dev/null
+++ b/rfc_p5js_2.md
@@ -0,0 +1,437 @@
+# p5.js 2.0
+
+## Introduction
+This is a RFC document for a proposal of p5.js 2.0.
+
+---
+
+- [Build and test system](#build-and-test-system)
+- [Refactors](#refactors)
+- [Modular](#modular)
+- [Libraries](#libraries)
+- [Renderers](#renderers)
+- [Async](#async)
+- [Algorithm Changes](#algorithm-changes)
+- [Reference](#reference)
+- [Typography](#typography)
+- [Misc](#misc)
+
+---
+
+## Motivation
+p5.js 1.0.0 was released on February 29, 2020, while it may not seem to be that long ago (a bit less than four years ago at the time of writing) in the very fast moving landscape of JavaScript it is a great amount of time. In this time, the JS landscape has advanced a lot with new paradigms and expectations of what a JS library should be. In the time between the 1.0 release till now, p5.js has not been standing still either, with major progress and focuses on accessibility features, bug fixes, updates & enhancements to existing features, and more, contributed by a great number of contributors consistently over the past several years.
+
+However by being within a semver 1.0 release means that we have to consider full backwards compatibility of the library when reviewing any proposals around bug fixes, feature enhancements, and potentially adding new features. At the same time we have continously put off updating several aspects of the library, including things such as tooling, algorithms, and newer APIs, because of either lack of maturity in the JavaScript ecosystem or the overall scope of changes. With the view that p5.js will be getting a new website and simply just because this is long overdue, we propose this RFC to start the process of overhauling many aspects of p5.js and bring about a 2.0 version release.
+
+## Goals and non-goals
+This project will continue to adhere to p5.js being an accessible and inclusive creative coding library first and foremost, all the proposals outlined below will continue to aim towards increasing access of p5.js. On a technical level, the larger goals of this project are:
+* Update p5.js to use more modern JavaScript conventions, both in terms of its internal implementation and the interface it exposes to the user.
+* Enable the use of p5.js through ES modules semantically.
+* Keeping backwards compatibility with current 1.x version of p5.js as much as reasonable.
+
+A few non-goals of p5.js 2.0 are:
+* Do everything possible: p5.js will have a powerful and easy to use addon library system and so should not include every feature possible.
+
+## Organization
+Some exploratory work has been done and can be explored [here](https://github.com/limzykenneth/p5.js/tree/test-exploration) with future work to continue from it if feasible. The goal is to complete all necessary work listed and agreed upon below by end of March 2024 with a full release in April 2024. Public issues and a project tracker will be used to build up a clear roadmap towards an April 2024 release.
+
+The first stage of this process is for the whole community of p5.js to discuss and review the proposals below and to put forward their own proposals for p5.js 2.0. Exploratory prototyping can be done at this stage using the above linked exploratory version as a starting point. There may be a few rounds of synchronous calls available for community to discuss proposals in real time, the result of which will continue to be tracked here. This document will be constantly updated at this stage as proposals are hashed out, added, or removed throughout the discussions.
+
+The second stage will focus on implementation work. Proposals should be hashed out and accepted at this point to start implementation, continuing from the exploratory branch as the working branch and using feature branches for implementation and submitting PR back to the working branch.
+
+The third and final stage will be the prerelease process. Several prerelease (Release Candidate, RC) versions will be released in the run up to the final release in April 2024. Implementation work in the second stage should be completed at this point and features will be frozen at this point onward, only bug fixes should be worked on at this stage.
+
+After stage 3, p5.js 2.0 will be released!
+
+During this process, p5.js 1.0 will still continue to be worked on and we will review bug reports, fixing them, and create releases as necessary. However we will not review feature enchancements or new feature requests for p5.js 1.0, these should be filed towards a proposal for p5.js 2.0 instead.
+
+## Proposals and Solutions
+See the below for the full list of current proposals under considerations. There may be overlaps between different proposals, which may be assigned to the same contributor for implementation in the second stage. For the purpose of derisking the use of bundled external dependencies, wherever possible, external dependencies should be avoided with preference to original implementation or inlining implementations of external dependencies, if external dependencies are to be used for practical reasons, they need to be fully vetted in stage 1.
+
+---
+
+### Build and test system
+The build system for p5.js will be updated to use [Rollup](https://rollupjs.org/), development server will use [Vite](https://vitejs.dev/), and the test runner will use [Vitest](https://vitest.dev/).
+
+* Rollup
+ * Significantly improves the build speed of the library with the core library taking just a few seconds to build.
+ * Have more semantic support of ESM.
+ * Simpler config and overall a more modern set of tools.
+* Vite
+ * Also Vite has a library mode and uses Rollup under the hood for production build, it lacks the flexibility to support complex library build where multiple inputs need to correspond to multiple outputs.
+ * Provides a very good development server that can be used to speed up library development. An `index.html` file is added to the repo for using this development server.
+* Vitest
+ * Uses the same idea behind Vite's development server to run tests which speeds up tests running significantly.
+ * Supports headless browsers, parallel tests running, granular test running in watch mode, and more.
+ * While many tests already works, the overall tests will need to have a pass through to correct everything, update to use latest ESM syntax library will be using, and integrate any new test methods where necessary.
+ * All tests will run in headless browsers and not test should be run in Node.js as it is not the intended environment for p5.js to run in.
+
+#### To do
+In conjuction with refactoring and modularization, the build need to be updated as necessary.
+
+The Vite development server can benefit from a more comprehensive `index.html` that includes common visual regression cases that contributors can check while they work on the code base.
+
+The majority of pending work will be to update all tests to work with Vitest. The priority being all the existing unit tests. Visual tests may be added after.
+
+---
+
+### Refactors
+The overall codebase will undergo extensive refactoring, with the goal of using more semantic JavaScript syntax (modules, classes, newer APIs). The use of side effect imports in the codebase will also be reduced to a minimum if complete removal is not possible.
+
+#### API Consistency
+The overall public API of p5.js should be checked for consistency to ensure a uniform API is provided to the sketch authors where possible. An example for this is `beginShape()` by default does not close the path without `endShape(CLOSE)` being provided whereas `beginContour()` does. The behavior between the two should be made consistent, either both default to closing the path or both default to not close the path. Breaking changes are allowed for these cases.
+
+#### Deprecated code
+Code marked as deprecated in the code base should be removed. Any older behavior if agreed to be kept around for the time being but will be removed in the future should be marked as deprecated with deprecation message printed in the console when used, this should be avoided as much as possible however.
+
+---
+
+### Modular
+p5.js will have a core that contains only the absolute essential functionalities, while all other code will be separately import-able. Take as example the core only build of p5.js and the math module as a separate module not included in core, two versions of each will be built from the source code: IIFE and ESM. Rollup is setup to create build for both with IIFE being the preferred format for most users using `
+
+
+```
+
+In the above example, both `p5.js` and `p5.math.js` are built with the `iife` format. This usage is similar if not identical to the usage of addon libraries currently (deliberately so). The `math` module here is a bundled module taken from all the source located in `src/math` folder. Each file in that folder can be independenly built into the `iife` format with Rollup if desired and the whole module can be included in the final `p5.js` bundle if desired as well.
+
+```js
+// src/math/index.js
+import calculation from './calculation.js';
+import noise from './noise.js';
+import random from './random.js';
+import trigonometry from './trigonometry.js';
+import math from './math.js';
+import vector from './p5.Vector.js';
+
+export default function(p5, fn){
+ p5.registerAddon(calculation);
+ p5.registerAddon(noise);
+ p5.registerAddon(random);
+ p5.registerAddon(trigonometry);
+ p5.registerAddon(math);
+ p5.registerAddon(vector);
+}
+```
+```js
+// src/math/calculation.js (redacted)
+function calculation(p5, fn){
+ fn.abs = Math.abs;
+}
+
+export default calculation;
+
+if(typeof p5 !== 'undefined'){
+ calculation(p5, p5.prototype);
+}
+```
+```js
+// src/app.js (redacted)
+// math (include if to be bundled as part of p5.js)
+import './math/calculation';
+import './math/math';
+import './math/noise';
+import './math/p5.Vector';
+import './math/random';
+import './math/trigonometry';
+```
+
+Please see relevant examples in the exploration fork for implementation.
+
+#### ESM
+ESM or ES Module is the current standard in JavaScript for working with modular JavaScript code. ESM are now very widely supported with all major browsers natively supporting it, all modern build tools supports or are even built around it, and Node.js have native support for it as well. p5.js 1.0's code is already written with ESM and transpiled into a UMD module. As part of the refactor mentioned in a previos section, the syntax of the internal use of ESM will be updated to match semantic usage. The main goal will be to limit cross dependencies between modules and minimize the use of side effects imports.
+
+```js
+import p5 from 'p5';
+import math from 'p5/math';
+
+p5.registerAddon(math);
+
+// The same instance mode syntax
+const sketch = (p => {
+ p.setup = () => {
+ p.createCanvas(400, 400);
+ console.log(p.ceil(2.1));
+ };
+
+ p.draw = () => {
+ p.background(200);
+ p.circle(200, 200, 100);
+ };
+});
+
+new p5(sketch);
+```
+
+The above example assumes the user is using Node.js module resolution and have installed `p5` through NPM. However, distributable ESM modules are built and will be published via CDN as well. To use this, the first two lines will instead be:
+
+```js
+import p5 from './js/p5.esm.js';
+import math from './js/p5.math.esm.js';
+```
+
+Across both formats above, one thing that was not elaborated on is the static method `p5.registerAddon`. This will be discussed in the Libraries section below.
+
+---
+
+### Libraries
+Existing libraries should have a level of compatibility or require minimal updates to work with p5.js 2.0.
+
+A new method of authoring libraries will be introduced that is more ergonomic. This will be through a factory function that exposes reasonable interfaces for completing the following tasks as necessary:
+* Attaching methods and properties to prototype
+* Lifecycle hooks
+* Extending internal functionalities (eg. adding a new renderer)
+
+As reference, Day.js provide plugin interface in the following way:
+```js
+export default (option, dayjsClass, dayjsFactory) => {
+ // extend dayjs()
+ // e.g. add dayjs().isSameOrBefore()
+ dayjsClass.prototype.isSameOrBefore = function(arguments) {}
+
+ // extend dayjs
+ // e.g. add dayjs.utc()
+ dayjsFactory.utc = arguments => {}
+
+ // overriding existing API
+ // e.g. extend dayjs().format()
+ const oldFormat = dayjsClass.prototype.format
+ dayjsClass.prototype.format = function(arguments) {
+ // original format result
+ const result = oldFormat.bind(this)(arguments)
+ // return modified result
+ }
+}
+```
+And is used with:
+```js
+dayjs.extend(myPlugin);
+```
+
+While jQuery provides the following interface:
+```js
+$.fn.greenify = function() {
+ this.css('color', 'green');
+};
+
+$('a').greenify();
+```
+`fn` above is just an alias to `prototype` which in essense makes jQuery's plugin system identical to what p5.js does.
+
+p5.js plugins have some properties that are not present in the Day.js or jQuery use case. With Day.js, plugins are expected to be explicitly provided through `dayjs.extend()` while p5.js addons should have the expectations of being available immediately upon inclusion/load. jQuery plugin don't need to content with lifecycle hooks or other non-class instance related features. A p5.js addon should also have the flexibility of being imported as a ES module or included through a script tag, ie. there should be a ES module version and a UMD version ideally.
+
+The proposed interface that a p5.js 2.0 plugin can have is as the following:
+```js
+(function(p5){
+ p5.registerAddon((p5, fn, lifecycles) => {
+ // `fn` being the prototype
+ fn.myMethod = function(){
+ // Perform some tasks
+ };
+
+ // Instead of requiring register preload,
+ // async/await is preferred instead.
+ fn.loadMyData = async function(){
+ // Load some data asynchronously
+ };
+
+ lifecycles.presetup = function(){
+ // Run actions before `setup()` runs
+ };
+
+ lifecycles.postdraw = function(){
+ // Run actions after `draw()` runs
+ };
+ });
+})(p5);
+```
+
+---
+
+### Renderers
+p5.js 1.0 is bundled with two renderers: 2D and WebGL. They corresponds to the HTML Canvas `2d` and `webgl` context respectively. However, there had been requests over the years to add additional renderers such as an SVG renderer or a renderer with scene graph capabilities. As the web evolve, we are also seeing new a possible standard renderer being developed, ie. [WebGPU](https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API).
+
+As currently implemented, adding a new renderer to p5.js is not an easy task which involves many parts that expects to behave differently depending on whether the current sketch is in 2D or WebGL mode.
+
+```js
+createCanvas(400, 400, WEBGL);
+```
+
+The constant value to determine whether a canvas is in 2D or WEBGL mode is also not easily extendable by addon libraries.
+
+With p5.js 2.0, the renderer system is redesigned and tweaked with a few key points.
+1. `p5.Renderer` class which both `p5.Renderer2D` and `p5.RendererGL` classes inherit from will now act more like an abstract class that it is meant to be.
+ * The `p5.Renderer` class will determine a set of basic properties and methods any renderer class inheriting from it should implement, while extra functionalities can still be implemented on top. (eg. all renderers should implement the `ellipse()` method but the WebGL renderer will also implement a `sphere()` method that 2D renderers don't need).
+ * The `p5.Renderer` class should never be instantiated directly.
+2. The core will not have implicit knowledge of what renderers are available. Previously the two modes supported (`P2D` and `WEBGL`) are harded coded into functions like `createCanvas()` making creating a new rendering mode difficult without also modifying core functionalities.
+ * A list of renderers should be kept under the `p5.renderers` object with value being the class object of the renderer (that inherits from `p5.Renderer` class).
+```js
+p5.renderers = {
+ [constants.P2D]: Renderer2D,
+ [constants.WEBGL]: RendererGL
+};
+```
+
+For an addon library to create a new renderer to work with p5, it will need to first create a class that inherits and implements the `p5.Renderer` abstract class, then register the renderer under the `p5.renderers` object.
+
+```js
+(function(p5){
+ class MyRenderer extends p5.Renderer {
+ ellipse(x, y, w, h) {
+ // ...
+ }
+
+ // ...
+ }
+
+ p5.registerAddon((p5, fn, lifecycles) => {
+ p5.renderers.myRenderer = MyRenderer;
+ });
+})(p5);
+```
+
+When a sketch author wants to use the addon provided renderer above, they can use the following code when creating a canvas.
+
+```js
+function setup(){
+ createCanvas(400, 400, 'myRenderer');
+}
+```
+
+For usage that are more similar to p5.js' own renderers, constants registration can be exposed to addon library authors as well. In this case, it is recommended to make the constant value a `Symbol` matching behavior in the core library itself.
+
+#### Core question
+Part of the motivation for this proposal is to enable a leaner build of the library for users who only use the 2D renderer but not the WebGL renderer and vice versa. If someone uses only the 2D canvas, there is no need for most if not all of the WebGL components to be included.
+
+This creates a question, should p5.js still be bundled with both renderers for distribution? What about new renderers in the future? There are a few options for this:
+* Bundling both 2D and WebGL renderers, bundling also any new renderers if they are included in the library directly.
+* Bundle only 2D renderer. Log a warning message if the sketch author tries to create a WebGL canvas without loading in the WebGL renderer as an addon.
+* Bundle no renderer. All and any renderers should be included as addons.
+
+The third options is probably too extreme and probably should not be considered. Either of the first two options are open for discussions.
+
+---
+
+### Async
+Data loading functions will all be updated to be fully async using promises (with `async`/`await`) while keeping the callback syntax if necessary. `setup()` will be awaited in the runtime and if the user define it as `async` functions, the promisified data loading functions can be awaited in them. With an async `setup()` function, the `draw()` loop will only start after the `setup()` function has resolved.
+
+`draw()` can be defined as an `async` function as well, although this is not recommended because of the possible timing conflict it may have with `requestAnimationFrame`.
+
+The async `setup()` function eliminates the need to have the `preload()` function. As such the data loading codebase will be refactored to remove `preload()` related code, while documentation around data loading should be updated accordingly.
+
+---
+
+### Algorithm changes
+#### RNG
+Seeded random number generator (RNG) will use xorshift128+. The current algorithm for RNG used in p5.js is an version of a Linear Congruential Generator (LCG).
+
+The main reasoning for this change is for performance. xorshift128+ performs better than LCG and it is the internal implementation of most of the current major browsers for `Math.random()`. The random property of xorshift128+ is similar if not better than LCG.
+
+This will be a breaking change as existing seeded RNG will not give the same random number sequence once the algoritm has switched to use xorshift128+. Consideration can be made to create a compatibility addon library that patch seeded RNG to use the old LCG RNG if necessary.
+
+Example implementation of a xorshift128+ backed RNG with compatible API to p5.js can be found [here](https://github.com/limzykenneth/js-xorshift128p).
+
+#### Noise
+`noise()` function will use [Simplex noise](https://en.wikipedia.org/wiki/Simplex_noise) instead of the current [Perlin noise](https://en.wikipedia.org/wiki/Perlin_noise). Simplex noise has better performance than Perlin noise and no noticeable directional artifacts.
+
+Until January 8, 2022, Simplex noise is protected by a US Patent, making adopting it problematic in certain cases. The patent has since expired, opening the way for its implementation in p5.js. This will be a breaking change as existing seeded `noise()` output will not give the same output after the algorithm has switched to use Simplex noise. Consideration can be made to create a compatibility addon library that patch seeded `noise()` to use Perlin noise if necessary.
+
+`noise()` will also accept higher dimensional input with the new implementation through accepting any number of numerical arguments passed to it (currently only accept either 2 or 3 arguments).
+
+#### Color
+A new color module will be implemented. The requirements of this new color module are:
+* Full compatibility with CSS color space support.
+* Possibility for addon libraries to introduce additional color spaces.
+* Accurate gamut mapping.
+* API as close to existing implementation as possible.
+
+#### Math
+A new math module will be implemented. The requirements of this new math module are:
+* Unified vector and matrices support with compatible API with ml5.js.
+* Explore reasonable performance optimizations through the use of specific algorithms, GPU implementation, or others.
+* Possibility for addon libraries to provide own implementation (so that any external libraries can be made compatible without being implemented internally by p5.js).
+
+---
+
+### Reference
+The inline reference of p5.js while following a largely compatible syntax with JSDoc, under the hood is actually compiled with YUIDoc into a JSON file that the website can consume to render the actual reference page. While YUIDoc serves its purpose since the first reference documentation of p5.js, it is a tool that is no longer being worked on for over 6 years. In these 6 years, many issues and limitations means that p5.js is tied in some ways to how YUIDoc expects documentation to be authored. Several issues with setting up a development environment has also previously been tied to YUIDoc getting outdated with the overall JS ecosystem.
+
+While YUIDoc has a very similar syntax with JSDoc, there are subtle differences. For p5.js 2.0, we will move inline reference authoring to use the JSDoc syntax and generation/compilation to use [Documentation.js](https://github.com/documentationjs/documentation).
+
+#### Syntax
+JSDoc syntax has for the most part settled into being a de facto standard for documentation authoring in the JavaScript ecosystem, in fact the current inline reference of p5.js is actually full compatible with JSDoc, in that it successfully compiles with JSDoc with no errors. This does not mean documentation generated through JSDoc will have the correct structure, only that it is valid syntax.
+
+Depending on the next step and the structure of what the website might expect from the reference data file, there will likely need to be minor changes to the reference throughout the codebase.
+
+#### Compilation
+For compililng the inline reference into data file that can be used by the website to generate the reference pages, instead of using JSDoc, Documentation.js will be used. The reason to prefer Documentation.js over JSDoc in mainly in terms of build tool ergonomics. JSDoc is designed as a site generator with its ability to generate JSON output more of a debugging functionality instead of an intended feature; Documentation.js however supports generating JSON data files as its primary output.
+
+Documentation.js does not have as active a maintenance history as JSDoc which is a potential downside. However, since it fully supports JSDoc syntax and JSDoc syntax having widespread ubiquity, in the future if need be the transition to another tool (even JSDoc) should not require the same effort as transitioning from YUIDoc to JSDoc since the inline reference will stay the same still.
+
+#### Typing
+A benefit fully adopting JSDoc syntax is that it enables direct generation of Typescript type declarations (and type checks if desired) from the JSDoc definitions. This is similar to how the source code of [SvelteKit](https://github.com/sveltejs/kit) is authored using just JavaScript while keeping type generation and type checks.
+
+This feature however is a nice to have. p5.js will aim to follow typing rules as much as possible but will not impose it as a strict requirement for contributors. Type declaration generation will also not be brought into the repo itself (including type checks) which also means types won't be published officially.
+
+---
+
+### Typography
+The typography module can benefit from an overall refactor or even rewrite. The aim should be to leverage native browser/CSS capabilities as much as possible and limit the use of external library (ie. opentype.js) to only things not achievable otherwise.
+
+---
+
+### Misc
+These are a collection of minor modifications that don't necessarily have enough scope to be a full proposal on its own.
+* Remove some internal aliases to Web API. Their API references can be kept.
+* Retire `p5.Table` for more semantic JavaScript data structure.
+* Turn all constants that don't rely on underlying value to use `Symbol`.
+* Remove support for JSONP in `loadJSON` function.
+ * This feature adds complexity and bypasses security feature.
+ * If a server was able to serve JSONP, it should be able to serve CORS resources instead.
+ * If required, JSONP functionality can be readded through an addon but it should not be part of p5.js core.
+* Regression fixes
+ * FES should not be using `eval()` partly because it is not compatible with Rollup's bundling
+
+---
+
+## Future
+The new architecture design should aim for as much pluggability as possible, enabling additional features to be changed, added, or extended through addon libraries. Some of the possible future features that may be implemented are listed below along with reasons they are and are not targeted for immediate implementation.
+* [OffscreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas)
+ * Provides a possibility of rendering `p5.Graphics` in web worker, potentially offloading frequent drawing of many graphics into multi-threaded like environment.
+ * Considered using `creatElement('canvas')` then `transferControlToOffscreen()` (and other methods) to move a `p5.Graphics` canvas to the web worker. The offscreen canvas can then be drawn onto the on screen canvas with `drawImage()`.
+ * WebGL context not currently supported in Safari.
+ * Firefox currently does not support drawing offscreen canvas onto on screen canvas. Alternative of `transferToImageBitmap()` is too slow to achieve real time performance.
+
+### p5.js 1.0
+The 1.x version of p5.js will continue to receive bug and critical fixes for another 12 months after the release of p5.js 2.0. No new features or feature updates will be accepted to 1.x version of p5.js and new releases will be created only when as necessary. Any existing code or addon libraries should aim to migrate to support p5.js 2.0 where possible.
+
+## Conclusion
+All the above ideas for p5.js 2.0 would not be possible without all the people who has worked on p5.js over the years, all the contributors who provided so much insight and ideas that greatly inspired this project, the many different open source projects and their contributors that directly or indirectly enabled p5.js to be the project that it is, and many many more.
+
+We welcome you to participate in this process of realizing p5.js 2.0 and to continue contributing to p5.js in the future as well!
+
+## References
+* https://github.com/AndreasMadsen/xorshift
+* https://learn.jquery.com/plugins/basic-plugin-creation/
+* https://day.js.org/docs/en/plugin/plugin
+* https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
+* https://colorjs.io/docs/gamut-mapping
+* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol
+* https://rollupjs.org/configuration-options/
+* https://vitejs.dev/guide/
+* https://vitest.dev/guide/browser.html
diff --git a/rollup.config.mjs b/rollup.config.mjs
new file mode 100644
index 0000000000..e2928ad207
--- /dev/null
+++ b/rollup.config.mjs
@@ -0,0 +1,201 @@
+import { nodeResolve } from '@rollup/plugin-node-resolve';
+import json from '@rollup/plugin-json';
+import { string } from 'rollup-plugin-string';
+import commonjs from '@rollup/plugin-commonjs';
+import terser from '@rollup/plugin-terser';
+import pkg from './package.json' with { type: 'json' };
+import { visualizer } from 'rollup-plugin-visualizer';
+import replace from '@rollup/plugin-replace';
+import alias from '@rollup/plugin-alias';
+import { globSync } from 'glob';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+import { rmSync } from 'node:fs';
+
+const plugins = [
+ commonjs(),
+ nodeResolve(),
+ json(),
+ string({
+ include: 'src/webgl/shaders/**/*'
+ }),
+ replace({
+ values: {
+ 'VERSION_WILL_BE_REPLACED_BY_BUILD': pkg.version
+ },
+ preventAssignment: true
+ })
+];
+const banner = `/*! p5.js v${pkg.version} ${new Intl.DateTimeFormat('en-US', { month: 'long', day: 'numeric', year: 'numeric' }).format(new Date())} */`;
+const bundleSize = (name, sourcemap) => {
+ return visualizer({
+ filename: `analyzer/${name}.html`,
+ gzipSize: true,
+ brotliSize: true,
+ sourcemap
+ });
+};
+
+const modules = ['math'];
+const generateModuleBuild = () => {
+ return modules.map(module => {
+ return {
+ input: `src/${module}/index.js`,
+ output: [
+ {
+ file: `./lib/p5.${module}.js`,
+ format: 'iife',
+ plugins: [
+ bundleSize(`p5.${module}.js`)
+ ]
+ },
+ {
+ file: `./lib/p5.${module}.min.js`,
+ format: 'iife',
+ sourcemap: 'hidden',
+ plugins: [
+ terser({
+ compress: {
+ global_defs: {
+ IS_MINIFIED: true
+ }
+ },
+ format: {
+ comments: false
+ }
+ }),
+ bundleSize(`p5.${module}.min.js`)
+ ]
+ },
+ {
+ file: `./lib/p5.${module}.esm.js`,
+ format: 'esm',
+ plugins: [
+ bundleSize(`p5.${module}.esm.js`)
+ ]
+ }
+ ],
+ external: ['../core/main'],
+ plugins: [
+ ...plugins
+ ]
+ };
+ });
+};
+
+rmSync('./dist', {
+ force: true,
+ recursive: true
+});
+
+export default [
+ //// Library builds (IIFE and ESM) ////
+ {
+ input: 'src/app.js',
+ output: [
+ {
+ file: './lib/p5.js',
+ format: 'iife',
+ name: 'p5',
+ banner,
+ plugins: [
+ bundleSize('p5.js')
+ ]
+ },
+ {
+ file: './lib/p5.esm.js',
+ format: 'esm',
+ banner,
+ plugins: [
+ bundleSize('p5.esm.js')
+ ]
+ },
+ {
+ file: './lib/p5.esm.min.js',
+ format: 'esm',
+ banner,
+ sourcemap: 'hidden',
+ plugins: [
+ terser({
+ compress: {
+ global_defs: {
+ IS_MINIFIED: true
+ }
+ },
+ format: {
+ comments: false
+ }
+ }),
+ bundleSize('p5.esm.min.js', true)
+ ]
+ }
+ ],
+ treeshake: {
+ preset: 'smallest'
+ },
+ plugins: [
+ ...plugins
+ ]
+ },
+ //// Minified build ////
+ {
+ input: 'src/app.js',
+ output: [
+ {
+ file: './lib/p5.min.js',
+ format: 'iife',
+ name: 'p5',
+ banner,
+ sourcemap: 'hidden',
+ plugins: [
+ terser({
+ compress: {
+ global_defs: {
+ IS_MINIFIED: true
+ }
+ },
+ format: {
+ comments: false
+ }
+ }),
+ bundleSize('p5.min.js', true)
+ ]
+ }
+ ],
+ treeshake: {
+ preset: 'smallest'
+ },
+ plugins: [
+ alias({
+ entries: [
+ { find: './core/friendly_errors', replacement: './core/noop' }
+ ]
+ }),
+ ...plugins
+ ]
+ },
+ //// ESM source build ////
+ {
+ input: Object.fromEntries(
+ globSync('src/**/*.js').map(file => [
+ // This removes `src/` as well as the file extension from each
+ // file, so e.g. src/nested/foo.js becomes nested/foo
+ path.relative(
+ 'src',
+ file.slice(0, file.length - path.extname(file).length)
+ ),
+ // This expands the relative paths to absolute paths, so e.g.
+ // src/nested/foo becomes /project/src/nested/foo.js
+ fileURLToPath(new URL(file, import.meta.url))
+ ])
+ ),
+ output: {
+ format: 'es',
+ dir: 'dist'
+ },
+ external: /node_modules/,
+ plugins
+ }
+ // NOTE: comment to NOT build standalone math module
+ // ...generateModuleBuild()
+];
diff --git a/src/accessibility/color_namer.js b/src/accessibility/color_namer.js
index 4509280e5b..bfe1c96a58 100644
--- a/src/accessibility/color_namer.js
+++ b/src/accessibility/color_namer.js
@@ -5,711 +5,716 @@
* @requires core
*/
-import p5 from '../core/main';
import color_conversion from '../color/color_conversion';
-//stores the original hsb values
-let originalHSB;
+function colorNamer(p5, fn){
+ //stores the original hsb values
+ let originalHSB;
-//stores values for color name exceptions
-const colorExceptions = [
- {
- h: 0,
- s: 0,
- b: 0.8275,
- name: 'gray'
- },
- {
- h: 0,
- s: 0,
- b: 0.8627,
- name: 'gray'
- },
- {
- h: 0,
- s: 0,
- b: 0.7529,
- name: 'gray'
- },
- {
- h: 0.0167,
- s: 0.1176,
- b: 1,
- name: 'light pink'
- }
-];
-
-//stores values for color names
-const colorLookUp = [
- {
- h: 0,
- s: 0,
- b: 0,
- name: 'black'
- },
- {
- h: 0,
- s: 0,
- b: 0.5,
- name: 'gray'
- },
- {
- h: 0,
- s: 0,
- b: 1,
- name: 'white'
- },
- {
- h: 0,
- s: 0.5,
- b: 0.5,
- name: 'dark maroon'
- },
- {
- h: 0,
- s: 0.5,
- b: 1,
- name: 'salmon pink'
- },
- {
- h: 0,
- s: 1,
- b: 0,
- name: 'black'
- },
- {
- h: 0,
- s: 1,
- b: 0.5,
- name: 'dark red'
- },
- {
- h: 0,
- s: 1,
- b: 1,
- name: 'red'
- },
- {
- h: 5,
- s: 0,
- b: 1,
- name: 'very light peach'
- },
- {
- h: 5,
- s: 0.5,
- b: 0.5,
- name: 'brown'
- },
- {
- h: 5,
- s: 0.5,
- b: 1,
- name: 'peach'
- },
- {
- h: 5,
- s: 1,
- b: 0.5,
- name: 'brick red'
- },
- {
- h: 5,
- s: 1,
- b: 1,
- name: 'crimson'
- },
- {
- h: 10,
- s: 0,
- b: 1,
- name: 'light peach'
- },
- {
- h: 10,
- s: 0.5,
- b: 0.5,
- name: 'brown'
- },
- {
- h: 10,
- s: 0.5,
- b: 1,
- name: 'light orange'
- },
- {
- h: 10,
- s: 1,
- b: 0.5,
- name: 'brown'
- },
- {
- h: 10,
- s: 1,
- b: 1,
- name: 'orange'
- },
- {
- h: 15,
- s: 0,
- b: 1,
- name: 'very light yellow'
- },
- {
- h: 15,
- s: 0.5,
- b: 0.5,
- name: 'olive green'
- },
- {
- h: 15,
- s: 0.5,
- b: 1,
- name: 'light yellow'
- },
- {
- h: 15,
- s: 1,
- b: 0,
- name: 'dark olive green'
- },
- {
- h: 15,
- s: 1,
- b: 0.5,
- name: 'olive green'
- },
- {
- h: 15,
- s: 1,
- b: 1,
- name: 'yellow'
- },
- {
- h: 20,
- s: 0,
- b: 1,
- name: 'very light yellow'
- },
- {
- h: 20,
- s: 0.5,
- b: 0.5,
- name: 'olive green'
- },
- {
- h: 20,
- s: 0.5,
- b: 1,
- name: 'light yellow green'
- },
- {
- h: 20,
- s: 1,
- b: 0,
- name: 'dark olive green'
- },
- {
- h: 20,
- s: 1,
- b: 0.5,
- name: 'dark yellow green'
- },
- {
- h: 20,
- s: 1,
- b: 1,
- name: 'yellow green'
- },
- {
- h: 25,
- s: 0.5,
- b: 0.5,
- name: 'dark yellow green'
- },
- {
- h: 25,
- s: 0.5,
- b: 1,
- name: 'light green'
- },
- {
- h: 25,
- s: 1,
- b: 0.5,
- name: 'dark green'
- },
- {
- h: 25,
- s: 1,
- b: 1,
- name: 'green'
- },
- {
- h: 30,
- s: 0.5,
- b: 1,
- name: 'light green'
- },
- {
- h: 30,
- s: 1,
- b: 0.5,
- name: 'dark green'
- },
- {
- h: 30,
- s: 1,
- b: 1,
- name: 'green'
- },
- {
- h: 35,
- s: 0,
- b: 0.5,
- name: 'light green'
- },
- {
- h: 35,
- s: 0,
- b: 1,
- name: 'very light green'
- },
- {
- h: 35,
- s: 0.5,
- b: 0.5,
- name: 'dark green'
- },
- {
- h: 35,
- s: 0.5,
- b: 1,
- name: 'light green'
- },
- {
- h: 35,
- s: 1,
- b: 0,
- name: 'very dark green'
- },
- {
- h: 35,
- s: 1,
- b: 0.5,
- name: 'dark green'
- },
- {
- h: 35,
- s: 1,
- b: 1,
- name: 'green'
- },
- {
- h: 40,
- s: 0,
- b: 1,
- name: 'very light green'
- },
- {
- h: 40,
- s: 0.5,
- b: 0.5,
- name: 'dark green'
- },
- {
- h: 40,
- s: 0.5,
- b: 1,
- name: 'light green'
- },
- {
- h: 40,
- s: 1,
- b: 0.5,
- name: 'dark green'
- },
- {
- h: 40,
- s: 1,
- b: 1,
- name: 'green'
- },
- {
- h: 45,
- s: 0.5,
- b: 1,
- name: 'light turquoise'
- },
- {
- h: 45,
- s: 1,
- b: 0.5,
- name: 'dark turquoise'
- },
- {
- h: 45,
- s: 1,
- b: 1,
- name: 'turquoise'
- },
- {
- h: 50,
- s: 0,
- b: 1,
- name: 'light sky blue'
- },
- {
- h: 50,
- s: 0.5,
- b: 0.5,
- name: 'dark cyan'
- },
- {
- h: 50,
- s: 0.5,
- b: 1,
- name: 'light cyan'
- },
- {
- h: 50,
- s: 1,
- b: 0.5,
- name: 'dark cyan'
- },
- {
- h: 50,
- s: 1,
- b: 1,
- name: 'cyan'
- },
- {
- h: 55,
- s: 0,
- b: 1,
- name: 'light sky blue'
- },
- {
- h: 55,
- s: 0.5,
- b: 1,
- name: 'light sky blue'
- },
- {
- h: 55,
- s: 1,
- b: 0.5,
- name: 'dark blue'
- },
- {
- h: 55,
- s: 1,
- b: 1,
- name: 'sky blue'
- },
- {
- h: 60,
- s: 0,
- b: 0.5,
- name: 'gray'
- },
- {
- h: 60,
- s: 0,
- b: 1,
- name: 'very light blue'
- },
- {
- h: 60,
- s: 0.5,
- b: 0.5,
- name: 'blue'
- },
- {
- h: 60,
- s: 0.5,
- b: 1,
- name: 'light blue'
- },
- {
- h: 60,
- s: 1,
- b: 0.5,
- name: 'navy blue'
- },
- {
- h: 60,
- s: 1,
- b: 1,
- name: 'blue'
- },
- {
- h: 65,
- s: 0,
- b: 1,
- name: 'lavender'
- },
- {
- h: 65,
- s: 0.5,
- b: 0.5,
- name: 'navy blue'
- },
- {
- h: 65,
- s: 0.5,
- b: 1,
- name: 'light purple'
- },
- {
- h: 65,
- s: 1,
- b: 0.5,
- name: 'dark navy blue'
- },
- {
- h: 65,
- s: 1,
- b: 1,
- name: 'blue'
- },
- {
- h: 70,
- s: 0,
- b: 1,
- name: 'lavender'
- },
- {
- h: 70,
- s: 0.5,
- b: 0.5,
- name: 'navy blue'
- },
- {
- h: 70,
- s: 0.5,
- b: 1,
- name: 'lavender blue'
- },
- {
- h: 70,
- s: 1,
- b: 0.5,
- name: 'dark navy blue'
- },
- {
- h: 70,
- s: 1,
- b: 1,
- name: 'blue'
- },
- {
- h: 75,
- s: 0.5,
- b: 1,
- name: 'lavender'
- },
- {
- h: 75,
- s: 1,
- b: 0.5,
- name: 'dark purple'
- },
- {
- h: 75,
- s: 1,
- b: 1,
- name: 'purple'
- },
- {
- h: 80,
- s: 0.5,
- b: 1,
- name: 'pinkish purple'
- },
- {
- h: 80,
- s: 1,
- b: 0.5,
- name: 'dark purple'
- },
- {
- h: 80,
- s: 1,
- b: 1,
- name: 'purple'
- },
- {
- h: 85,
- s: 0,
- b: 1,
- name: 'light pink'
- },
- {
- h: 85,
- s: 0.5,
- b: 0.5,
- name: 'purple'
- },
- {
- h: 85,
- s: 0.5,
- b: 1,
- name: 'light fuchsia'
- },
- {
- h: 85,
- s: 1,
- b: 0.5,
- name: 'dark fuchsia'
- },
- {
- h: 85,
- s: 1,
- b: 1,
- name: 'fuchsia'
- },
- {
- h: 90,
- s: 0.5,
- b: 0.5,
- name: 'dark fuchsia'
- },
- {
- h: 90,
- s: 0.5,
- b: 1,
- name: 'hot pink'
- },
- {
- h: 90,
- s: 1,
- b: 0.5,
- name: 'dark fuchsia'
- },
- {
- h: 90,
- s: 1,
- b: 1,
- name: 'fuchsia'
- },
- {
- h: 95,
- s: 0,
- b: 1,
- name: 'pink'
- },
- {
- h: 95,
- s: 0.5,
- b: 1,
- name: 'light pink'
- },
- {
- h: 95,
- s: 1,
- b: 0.5,
- name: 'dark magenta'
- },
- {
- h: 95,
- s: 1,
- b: 1,
- name: 'magenta'
- }
-];
+ //stores values for color name exceptions
+ const colorExceptions = [
+ {
+ h: 0,
+ s: 0,
+ b: 0.8275,
+ name: 'gray'
+ },
+ {
+ h: 0,
+ s: 0,
+ b: 0.8627,
+ name: 'gray'
+ },
+ {
+ h: 0,
+ s: 0,
+ b: 0.7529,
+ name: 'gray'
+ },
+ {
+ h: 0.0167,
+ s: 0.1176,
+ b: 1,
+ name: 'light pink'
+ }
+ ];
-//returns text with color name
-function _calculateColor(hsb) {
- let colortext;
- //round hue
- if (hsb[0] !== 0) {
- hsb[0] = Math.round(hsb[0] * 100);
- let hue = hsb[0].toString().split('');
- const last = hue.length - 1;
- hue[last] = parseInt(hue[last]);
- //if last digit of hue is < 2.5 make it 0
- if (hue[last] < 2.5) {
- hue[last] = 0;
- //if last digit of hue is >= 2.5 and less than 7.5 make it 5
- } else if (hue[last] >= 2.5 && hue[last] < 7.5) {
- hue[last] = 5;
+ //stores values for color names
+ const colorLookUp = [
+ {
+ h: 0,
+ s: 0,
+ b: 0,
+ name: 'black'
+ },
+ {
+ h: 0,
+ s: 0,
+ b: 0.5,
+ name: 'gray'
+ },
+ {
+ h: 0,
+ s: 0,
+ b: 1,
+ name: 'white'
+ },
+ {
+ h: 0,
+ s: 0.5,
+ b: 0.5,
+ name: 'dark maroon'
+ },
+ {
+ h: 0,
+ s: 0.5,
+ b: 1,
+ name: 'salmon pink'
+ },
+ {
+ h: 0,
+ s: 1,
+ b: 0,
+ name: 'black'
+ },
+ {
+ h: 0,
+ s: 1,
+ b: 0.5,
+ name: 'dark red'
+ },
+ {
+ h: 0,
+ s: 1,
+ b: 1,
+ name: 'red'
+ },
+ {
+ h: 5,
+ s: 0,
+ b: 1,
+ name: 'very light peach'
+ },
+ {
+ h: 5,
+ s: 0.5,
+ b: 0.5,
+ name: 'brown'
+ },
+ {
+ h: 5,
+ s: 0.5,
+ b: 1,
+ name: 'peach'
+ },
+ {
+ h: 5,
+ s: 1,
+ b: 0.5,
+ name: 'brick red'
+ },
+ {
+ h: 5,
+ s: 1,
+ b: 1,
+ name: 'crimson'
+ },
+ {
+ h: 10,
+ s: 0,
+ b: 1,
+ name: 'light peach'
+ },
+ {
+ h: 10,
+ s: 0.5,
+ b: 0.5,
+ name: 'brown'
+ },
+ {
+ h: 10,
+ s: 0.5,
+ b: 1,
+ name: 'light orange'
+ },
+ {
+ h: 10,
+ s: 1,
+ b: 0.5,
+ name: 'brown'
+ },
+ {
+ h: 10,
+ s: 1,
+ b: 1,
+ name: 'orange'
+ },
+ {
+ h: 15,
+ s: 0,
+ b: 1,
+ name: 'very light yellow'
+ },
+ {
+ h: 15,
+ s: 0.5,
+ b: 0.5,
+ name: 'olive green'
+ },
+ {
+ h: 15,
+ s: 0.5,
+ b: 1,
+ name: 'light yellow'
+ },
+ {
+ h: 15,
+ s: 1,
+ b: 0,
+ name: 'dark olive green'
+ },
+ {
+ h: 15,
+ s: 1,
+ b: 0.5,
+ name: 'olive green'
+ },
+ {
+ h: 15,
+ s: 1,
+ b: 1,
+ name: 'yellow'
+ },
+ {
+ h: 20,
+ s: 0,
+ b: 1,
+ name: 'very light yellow'
+ },
+ {
+ h: 20,
+ s: 0.5,
+ b: 0.5,
+ name: 'olive green'
+ },
+ {
+ h: 20,
+ s: 0.5,
+ b: 1,
+ name: 'light yellow green'
+ },
+ {
+ h: 20,
+ s: 1,
+ b: 0,
+ name: 'dark olive green'
+ },
+ {
+ h: 20,
+ s: 1,
+ b: 0.5,
+ name: 'dark yellow green'
+ },
+ {
+ h: 20,
+ s: 1,
+ b: 1,
+ name: 'yellow green'
+ },
+ {
+ h: 25,
+ s: 0.5,
+ b: 0.5,
+ name: 'dark yellow green'
+ },
+ {
+ h: 25,
+ s: 0.5,
+ b: 1,
+ name: 'light green'
+ },
+ {
+ h: 25,
+ s: 1,
+ b: 0.5,
+ name: 'dark green'
+ },
+ {
+ h: 25,
+ s: 1,
+ b: 1,
+ name: 'green'
+ },
+ {
+ h: 30,
+ s: 0.5,
+ b: 1,
+ name: 'light green'
+ },
+ {
+ h: 30,
+ s: 1,
+ b: 0.5,
+ name: 'dark green'
+ },
+ {
+ h: 30,
+ s: 1,
+ b: 1,
+ name: 'green'
+ },
+ {
+ h: 35,
+ s: 0,
+ b: 0.5,
+ name: 'light green'
+ },
+ {
+ h: 35,
+ s: 0,
+ b: 1,
+ name: 'very light green'
+ },
+ {
+ h: 35,
+ s: 0.5,
+ b: 0.5,
+ name: 'dark green'
+ },
+ {
+ h: 35,
+ s: 0.5,
+ b: 1,
+ name: 'light green'
+ },
+ {
+ h: 35,
+ s: 1,
+ b: 0,
+ name: 'very dark green'
+ },
+ {
+ h: 35,
+ s: 1,
+ b: 0.5,
+ name: 'dark green'
+ },
+ {
+ h: 35,
+ s: 1,
+ b: 1,
+ name: 'green'
+ },
+ {
+ h: 40,
+ s: 0,
+ b: 1,
+ name: 'very light green'
+ },
+ {
+ h: 40,
+ s: 0.5,
+ b: 0.5,
+ name: 'dark green'
+ },
+ {
+ h: 40,
+ s: 0.5,
+ b: 1,
+ name: 'light green'
+ },
+ {
+ h: 40,
+ s: 1,
+ b: 0.5,
+ name: 'dark green'
+ },
+ {
+ h: 40,
+ s: 1,
+ b: 1,
+ name: 'green'
+ },
+ {
+ h: 45,
+ s: 0.5,
+ b: 1,
+ name: 'light turquoise'
+ },
+ {
+ h: 45,
+ s: 1,
+ b: 0.5,
+ name: 'dark turquoise'
+ },
+ {
+ h: 45,
+ s: 1,
+ b: 1,
+ name: 'turquoise'
+ },
+ {
+ h: 50,
+ s: 0,
+ b: 1,
+ name: 'light sky blue'
+ },
+ {
+ h: 50,
+ s: 0.5,
+ b: 0.5,
+ name: 'dark cyan'
+ },
+ {
+ h: 50,
+ s: 0.5,
+ b: 1,
+ name: 'light cyan'
+ },
+ {
+ h: 50,
+ s: 1,
+ b: 0.5,
+ name: 'dark cyan'
+ },
+ {
+ h: 50,
+ s: 1,
+ b: 1,
+ name: 'cyan'
+ },
+ {
+ h: 55,
+ s: 0,
+ b: 1,
+ name: 'light sky blue'
+ },
+ {
+ h: 55,
+ s: 0.5,
+ b: 1,
+ name: 'light sky blue'
+ },
+ {
+ h: 55,
+ s: 1,
+ b: 0.5,
+ name: 'dark blue'
+ },
+ {
+ h: 55,
+ s: 1,
+ b: 1,
+ name: 'sky blue'
+ },
+ {
+ h: 60,
+ s: 0,
+ b: 0.5,
+ name: 'gray'
+ },
+ {
+ h: 60,
+ s: 0,
+ b: 1,
+ name: 'very light blue'
+ },
+ {
+ h: 60,
+ s: 0.5,
+ b: 0.5,
+ name: 'blue'
+ },
+ {
+ h: 60,
+ s: 0.5,
+ b: 1,
+ name: 'light blue'
+ },
+ {
+ h: 60,
+ s: 1,
+ b: 0.5,
+ name: 'navy blue'
+ },
+ {
+ h: 60,
+ s: 1,
+ b: 1,
+ name: 'blue'
+ },
+ {
+ h: 65,
+ s: 0,
+ b: 1,
+ name: 'lavender'
+ },
+ {
+ h: 65,
+ s: 0.5,
+ b: 0.5,
+ name: 'navy blue'
+ },
+ {
+ h: 65,
+ s: 0.5,
+ b: 1,
+ name: 'light purple'
+ },
+ {
+ h: 65,
+ s: 1,
+ b: 0.5,
+ name: 'dark navy blue'
+ },
+ {
+ h: 65,
+ s: 1,
+ b: 1,
+ name: 'blue'
+ },
+ {
+ h: 70,
+ s: 0,
+ b: 1,
+ name: 'lavender'
+ },
+ {
+ h: 70,
+ s: 0.5,
+ b: 0.5,
+ name: 'navy blue'
+ },
+ {
+ h: 70,
+ s: 0.5,
+ b: 1,
+ name: 'lavender blue'
+ },
+ {
+ h: 70,
+ s: 1,
+ b: 0.5,
+ name: 'dark navy blue'
+ },
+ {
+ h: 70,
+ s: 1,
+ b: 1,
+ name: 'blue'
+ },
+ {
+ h: 75,
+ s: 0.5,
+ b: 1,
+ name: 'lavender'
+ },
+ {
+ h: 75,
+ s: 1,
+ b: 0.5,
+ name: 'dark purple'
+ },
+ {
+ h: 75,
+ s: 1,
+ b: 1,
+ name: 'purple'
+ },
+ {
+ h: 80,
+ s: 0.5,
+ b: 1,
+ name: 'pinkish purple'
+ },
+ {
+ h: 80,
+ s: 1,
+ b: 0.5,
+ name: 'dark purple'
+ },
+ {
+ h: 80,
+ s: 1,
+ b: 1,
+ name: 'purple'
+ },
+ {
+ h: 85,
+ s: 0,
+ b: 1,
+ name: 'light pink'
+ },
+ {
+ h: 85,
+ s: 0.5,
+ b: 0.5,
+ name: 'purple'
+ },
+ {
+ h: 85,
+ s: 0.5,
+ b: 1,
+ name: 'light fuchsia'
+ },
+ {
+ h: 85,
+ s: 1,
+ b: 0.5,
+ name: 'dark fuchsia'
+ },
+ {
+ h: 85,
+ s: 1,
+ b: 1,
+ name: 'fuchsia'
+ },
+ {
+ h: 90,
+ s: 0.5,
+ b: 0.5,
+ name: 'dark fuchsia'
+ },
+ {
+ h: 90,
+ s: 0.5,
+ b: 1,
+ name: 'hot pink'
+ },
+ {
+ h: 90,
+ s: 1,
+ b: 0.5,
+ name: 'dark fuchsia'
+ },
+ {
+ h: 90,
+ s: 1,
+ b: 1,
+ name: 'fuchsia'
+ },
+ {
+ h: 95,
+ s: 0,
+ b: 1,
+ name: 'pink'
+ },
+ {
+ h: 95,
+ s: 0.5,
+ b: 1,
+ name: 'light pink'
+ },
+ {
+ h: 95,
+ s: 1,
+ b: 0.5,
+ name: 'dark magenta'
+ },
+ {
+ h: 95,
+ s: 1,
+ b: 1,
+ name: 'magenta'
}
- //if hue only has two digits
- if (hue.length === 2) {
- hue[0] = parseInt(hue[0]);
- //if last is greater than 7.5
- if (hue[last] >= 7.5) {
- //add one to the tens
+ ];
+
+ //returns text with color name
+ function _calculateColor(hsb) {
+ let colortext;
+ //round hue
+ if (hsb[0] !== 0) {
+ hsb[0] = Math.round(hsb[0] * 100);
+ let hue = hsb[0].toString().split('');
+ const last = hue.length - 1;
+ hue[last] = parseInt(hue[last]);
+ //if last digit of hue is < 2.5 make it 0
+ if (hue[last] < 2.5) {
hue[last] = 0;
- hue[0] = hue[0] + 1;
+ //if last digit of hue is >= 2.5 and less than 7.5 make it 5
+ } else if (hue[last] >= 2.5 && hue[last] < 7.5) {
+ hue[last] = 5;
}
- hsb[0] = hue[0] * 10 + hue[1];
- } else {
- if (hue[last] >= 7.5) {
- hsb[0] = 10;
+ //if hue only has two digits
+ if (hue.length === 2) {
+ hue[0] = parseInt(hue[0]);
+ //if last is greater than 7.5
+ if (hue[last] >= 7.5) {
+ //add one to the tens
+ hue[last] = 0;
+ hue[0] = hue[0] + 1;
+ }
+ hsb[0] = hue[0] * 10 + hue[1];
} else {
- hsb[0] = hue[last];
+ if (hue[last] >= 7.5) {
+ hsb[0] = 10;
+ } else {
+ hsb[0] = hue[last];
+ }
}
}
- }
- //map brightness from 0 to 1
- hsb[2] = hsb[2] / 255;
- //round saturation and brightness
- for (let i = hsb.length - 1; i >= 1; i--) {
- if (hsb[i] <= 0.25) {
- hsb[i] = 0;
- } else if (hsb[i] > 0.25 && hsb[i] < 0.75) {
- hsb[i] = 0.5;
- } else {
- hsb[i] = 1;
- }
- }
- //after rounding, if the values are hue 0, saturation 0 and brightness 1
- //look at color exceptions which includes several tones from white to gray
- if (hsb[0] === 0 && hsb[1] === 0 && hsb[2] === 1) {
- //round original hsb values
- for (let i = 2; i >= 0; i--) {
- originalHSB[i] = Math.round(originalHSB[i] * 10000) / 10000;
- }
- //compare with the values in the colorExceptions array
- for (let e = 0; e < colorExceptions.length; e++) {
- if (
- colorExceptions[e].h === originalHSB[0] &&
- colorExceptions[e].s === originalHSB[1] &&
- colorExceptions[e].b === originalHSB[2]
- ) {
- colortext = colorExceptions[e].name;
- break;
+ //map brightness from 0 to 1
+ hsb[2] = hsb[2] / 255;
+ //round saturation and brightness
+ for (let i = hsb.length - 1; i >= 1; i--) {
+ if (hsb[i] <= 0.25) {
+ hsb[i] = 0;
+ } else if (hsb[i] > 0.25 && hsb[i] < 0.75) {
+ hsb[i] = 0.5;
} else {
- //if there is no match return white
- colortext = 'white';
+ hsb[i] = 1;
}
}
- } else {
- //otherwise, compare with values in colorLookUp
- for (let i = 0; i < colorLookUp.length; i++) {
- if (
- colorLookUp[i].h === hsb[0] &&
- colorLookUp[i].s === hsb[1] &&
- colorLookUp[i].b === hsb[2]
- ) {
- colortext = colorLookUp[i].name;
- break;
+ //after rounding, if the values are hue 0, saturation 0 and brightness 1
+ //look at color exceptions which includes several tones from white to gray
+ if (hsb[0] === 0 && hsb[1] === 0 && hsb[2] === 1) {
+ //round original hsb values
+ for (let i = 2; i >= 0; i--) {
+ originalHSB[i] = Math.round(originalHSB[i] * 10000) / 10000;
+ }
+ //compare with the values in the colorExceptions array
+ for (let e = 0; e < colorExceptions.length; e++) {
+ if (
+ colorExceptions[e].h === originalHSB[0] &&
+ colorExceptions[e].s === originalHSB[1] &&
+ colorExceptions[e].b === originalHSB[2]
+ ) {
+ colortext = colorExceptions[e].name;
+ break;
+ } else {
+ //if there is no match return white
+ colortext = 'white';
+ }
+ }
+ } else {
+ //otherwise, compare with values in colorLookUp
+ for (let i = 0; i < colorLookUp.length; i++) {
+ if (
+ colorLookUp[i].h === hsb[0] &&
+ colorLookUp[i].s === hsb[1] &&
+ colorLookUp[i].b === hsb[2]
+ ) {
+ colortext = colorLookUp[i].name;
+ break;
+ }
}
}
+ return colortext;
}
- return colortext;
+
+ //gets rgba and returs a color name
+ fn._rgbColorName = function(arg) {
+ //conversts rgba to hsb
+ let hsb = color_conversion._rgbaToHSBA(arg);
+ //stores hsb in global variable
+ originalHSB = hsb;
+ //calculate color name
+ return _calculateColor([hsb[0], hsb[1], hsb[2]]);
+ };
}
-//gets rgba and returs a color name
-p5.prototype._rgbColorName = function(arg) {
- //conversts rgba to hsb
- let hsb = color_conversion._rgbaToHSBA(arg);
- //stores hsb in global variable
- originalHSB = hsb;
- //calculate color name
- return _calculateColor([hsb[0], hsb[1], hsb[2]]);
-};
+export default colorNamer;
-export default p5;
+if(typeof p5 !== 'undefined'){
+ colorNamer(p5, p5.prototype);
+}
diff --git a/src/accessibility/describe.js b/src/accessibility/describe.js
index 563e891958..8a5e0a1398 100644
--- a/src/accessibility/describe.js
+++ b/src/accessibility/describe.js
@@ -5,497 +5,511 @@
* @requires core
*/
-import p5 from '../core/main';
-const descContainer = '_Description'; //Fallback container
-const fallbackDescId = '_fallbackDesc'; //Fallback description
-const fallbackTableId = '_fallbackTable'; //Fallback Table
-const fallbackTableElId = '_fte_'; //Fallback Table Element
-const labelContainer = '_Label'; //Label container
-const labelDescId = '_labelDesc'; //Label description
-const labelTableId = '_labelTable'; //Label Table
-const labelTableElId = '_lte_'; //Label Table Element
+function describe(p5, fn){
+ const descContainer = '_Description'; //Fallback container
+ const fallbackDescId = '_fallbackDesc'; //Fallback description
+ const fallbackTableId = '_fallbackTable'; //Fallback Table
+ const fallbackTableElId = '_fte_'; //Fallback Table Element
+ const labelContainer = '_Label'; //Label container
+ const labelDescId = '_labelDesc'; //Label description
+ const labelTableId = '_labelTable'; //Label Table
+ const labelTableElId = '_lte_'; //Label Table Element
-/**
- * Creates a screen reader-accessible description of the canvas.
- *
- * The first parameter, `text`, is the description of the canvas.
- *
- * The second parameter, `display`, is optional. It determines how the
- * description is displayed. If `LABEL` is passed, as in
- * `describe('A description.', LABEL)`, the description will be visible in
- * a div element next to the canvas. If `FALLBACK` is passed, as in
- * `describe('A description.', FALLBACK)`, the description will only be
- * visible to screen readers. This is the default mode.
- *
- * Read
- * Writing accessible canvas descriptions
- * to learn more about making sketches accessible.
- *
- * @method describe
- * @param {String} text description of the canvas.
- * @param {Constant} [display] either LABEL or FALLBACK.
- *
- * @example
- *
- *
- * function setup() {
- * background('pink');
- *
- * // Draw a heart.
- * fill('red');
- * noStroke();
- * circle(67, 67, 20);
- * circle(83, 67, 20);
- * triangle(91, 73, 75, 95, 59, 73);
- *
- * // Add a general description of the canvas.
- * describe('A pink square with a red heart in the bottom-right corner.');
- * }
- *
- *
- *
- *
- *
- * function setup() {
- * background('pink');
- *
- * // Draw a heart.
- * fill('red');
- * noStroke();
- * circle(67, 67, 20);
- * circle(83, 67, 20);
- * triangle(91, 73, 75, 95, 59, 73);
- *
- * // Add a general description of the canvas
- * // and display it for debugging.
- * describe('A pink square with a red heart in the bottom-right corner.', LABEL);
- * }
- *
- *
- *
- *
- *
- * function draw() {
- * background(200);
- *
- * // The expression
- * // frameCount % 100
- * // causes x to increase from 0
- * // to 99, then restart from 0.
- * let x = frameCount % 100;
- *
- * // Draw the circle.
- * fill(0, 255, 0);
- * circle(x, 50, 40);
- *
- * // Add a general description of the canvas.
- * describe(`A green circle at (${x}, 50) moves from left to right on a gray square.`);
- * }
- *
- *
- *
- *
- *
- * function draw() {
- * background(200);
- *
- * // The expression
- * // frameCount % 100
- * // causes x to increase from 0
- * // to 99, then restart from 0.
- * let x = frameCount % 100;
- *
- * // Draw the circle.
- * fill(0, 255, 0);
- * circle(x, 50, 40);
- *
- * // Add a general description of the canvas
- * // and display it for debugging.
- * describe(`A green circle at (${x}, 50) moves from left to right on a gray square.`, LABEL);
- * }
- *
- *
- */
-
-p5.prototype.describe = function(text, display) {
- p5._validateParameters('describe', arguments);
- if (typeof text !== 'string') {
- return;
- }
- const cnvId = this.canvas.id;
- //calls function that adds punctuation for better screen reading
- text = _descriptionText(text);
- //if there is no dummyDOM
- if (!this.dummyDOM) {
- this.dummyDOM = document.getElementById(cnvId).parentNode;
- }
- if (!this.descriptions) {
- this.descriptions = {};
- }
- //check if html structure for description is ready
- if (this.descriptions.fallback) {
- //check if text is different from current description
- if (this.descriptions.fallback.innerHTML !== text) {
- //update description
- this.descriptions.fallback.innerHTML = text;
+ /**
+ * Creates a screen reader-accessible description of the canvas.
+ *
+ * The first parameter, `text`, is the description of the canvas.
+ *
+ * The second parameter, `display`, is optional. It determines how the
+ * description is displayed. If `LABEL` is passed, as in
+ * `describe('A description.', LABEL)`, the description will be visible in
+ * a div element next to the canvas. If `FALLBACK` is passed, as in
+ * `describe('A description.', FALLBACK)`, the description will only be
+ * visible to screen readers. This is the default mode.
+ *
+ * Read
+ * Writing accessible canvas descriptions
+ * to learn more about making sketches accessible.
+ *
+ * @method describe
+ * @param {String} text description of the canvas.
+ * @param {(FALLBACK|LABEL)} [display] either LABEL or FALLBACK.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * background('pink');
+ *
+ * // Draw a heart.
+ * fill('red');
+ * noStroke();
+ * circle(67, 67, 20);
+ * circle(83, 67, 20);
+ * triangle(91, 73, 75, 95, 59, 73);
+ *
+ * // Add a general description of the canvas.
+ * describe('A pink square with a red heart in the bottom-right corner.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * background('pink');
+ *
+ * // Draw a heart.
+ * fill('red');
+ * noStroke();
+ * circle(67, 67, 20);
+ * circle(83, 67, 20);
+ * triangle(91, 73, 75, 95, 59, 73);
+ *
+ * // Add a general description of the canvas
+ * // and display it for debugging.
+ * describe('A pink square with a red heart in the bottom-right corner.', LABEL);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * function setup(){
+ * createCanvas(100, 100);
+ * };
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // The expression
+ * // frameCount % 100
+ * // causes x to increase from 0
+ * // to 99, then restart from 0.
+ * let x = frameCount % 100;
+ *
+ * // Draw the circle.
+ * fill(0, 255, 0);
+ * circle(x, 50, 40);
+ *
+ * // Add a general description of the canvas.
+ * describe(`A green circle at (${x}, 50) moves from left to right on a gray square.`);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * function setup(){
+ * createCanvas(100, 100);
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // The expression
+ * // frameCount % 100
+ * // causes x to increase from 0
+ * // to 99, then restart from 0.
+ * let x = frameCount % 100;
+ *
+ * // Draw the circle.
+ * fill(0, 255, 0);
+ * circle(x, 50, 40);
+ *
+ * // Add a general description of the canvas
+ * // and display it for debugging.
+ * describe(`A green circle at (${x}, 50) moves from left to right on a gray square.`, LABEL);
+ * }
+ *
+ *
+ */
+ fn.describe = function(text, display) {
+ // p5._validateParameters('describe', arguments);
+ if (typeof text !== 'string') {
+ return;
}
- } else {
- //create fallback html structure
- this._describeHTML('fallback', text);
- }
- //if display is LABEL
- if (display === this.LABEL) {
- //check if html structure for label is ready
- if (this.descriptions.label) {
- //check if text is different from current label
- if (this.descriptions.label.innerHTML !== text) {
- //update label description
- this.descriptions.label.innerHTML = text;
+ const cnvId = this.canvas.id;
+ //calls function that adds punctuation for better screen reading
+ text = _descriptionText(text);
+ //if there is no dummyDOM
+ if (!this.dummyDOM) {
+ this.dummyDOM = document.getElementById(cnvId).parentNode;
+ }
+ if (!this.descriptions) {
+ this.descriptions = {};
+ }
+ //check if html structure for description is ready
+ if (this.descriptions.fallback) {
+ //check if text is different from current description
+ if (this.descriptions.fallback.innerHTML !== text) {
+ //update description
+ this.descriptions.fallback.innerHTML = text;
}
} else {
- //create label html structure
- this._describeHTML('label', text);
+ //create fallback html structure
+ this._describeHTML('fallback', text);
}
- }
-};
+ //if display is LABEL
+ if (display === this.LABEL) {
+ //check if html structure for label is ready
+ if (this.descriptions.label) {
+ //check if text is different from current label
+ if (this.descriptions.label.innerHTML !== text) {
+ //update label description
+ this.descriptions.label.innerHTML = text;
+ }
+ } else {
+ //create label html structure
+ this._describeHTML('label', text);
+ }
+ }
+ };
-/**
- * Creates a screen reader-accessible description of elements in the canvas.
- *
- * Elements are shapes or groups of shapes that create meaning together. For
- * example, a few overlapping circles could make an "eye" element.
- *
- * The first parameter, `name`, is the name of the element.
- *
- * The second parameter, `text`, is the description of the element.
- *
- * The third parameter, `display`, is optional. It determines how the
- * description is displayed. If `LABEL` is passed, as in
- * `describe('A description.', LABEL)`, the description will be visible in
- * a div element next to the canvas. Using `LABEL` creates unhelpful
- * duplicates for screen readers. Only use `LABEL` during development. If
- * `FALLBACK` is passed, as in `describe('A description.', FALLBACK)`, the
- * description will only be visible to screen readers. This is the default
- * mode.
- *
- * Read
- * Writing accessible canvas descriptions
- * to learn more about making sketches accessible.
- *
- * @method describeElement
- * @param {String} name name of the element.
- * @param {String} text description of the element.
- * @param {Constant} [display] either LABEL or FALLBACK.
- *
- * @example
- *
- *
- * function setup() {
- * background('pink');
- *
- * // Describe the first element
- * // and draw it.
- * describeElement('Circle', 'A yellow circle in the top-left corner.');
- * noStroke();
- * fill('yellow');
- * circle(25, 25, 40);
- *
- * // Describe the second element
- * // and draw it.
- * describeElement('Heart', 'A red heart in the bottom-right corner.');
- * fill('red');
- * circle(66.6, 66.6, 20);
- * circle(83.2, 66.6, 20);
- * triangle(91.2, 72.6, 75, 95, 58.6, 72.6);
- *
- * // Add a general description of the canvas.
- * describe('A red heart and yellow circle over a pink background.');
- * }
- *
- *
- *
- *
- *
- * function setup() {
- * background('pink');
- *
- * // Describe the first element
- * // and draw it. Display the
- * // description for debugging.
- * describeElement('Circle', 'A yellow circle in the top-left corner.', LABEL);
- * noStroke();
- * fill('yellow');
- * circle(25, 25, 40);
- *
- * // Describe the second element
- * // and draw it. Display the
- * // description for debugging.
- * describeElement('Heart', 'A red heart in the bottom-right corner.', LABEL);
- * fill('red');
- * circle(66.6, 66.6, 20);
- * circle(83.2, 66.6, 20);
- * triangle(91.2, 72.6, 75, 95, 58.6, 72.6);
- *
- * // Add a general description of the canvas.
- * describe('A red heart and yellow circle over a pink background.');
- * }
- *
- *
- */
+ /**
+ * Creates a screen reader-accessible description of elements in the canvas.
+ *
+ * Elements are shapes or groups of shapes that create meaning together. For
+ * example, a few overlapping circles could make an "eye" element.
+ *
+ * The first parameter, `name`, is the name of the element.
+ *
+ * The second parameter, `text`, is the description of the element.
+ *
+ * The third parameter, `display`, is optional. It determines how the
+ * description is displayed. If `LABEL` is passed, as in
+ * `describe('A description.', LABEL)`, the description will be visible in
+ * a div element next to the canvas. Using `LABEL` creates unhelpful
+ * duplicates for screen readers. Only use `LABEL` during development. If
+ * `FALLBACK` is passed, as in `describe('A description.', FALLBACK)`, the
+ * description will only be visible to screen readers. This is the default
+ * mode.
+ *
+ * Read
+ * Writing accessible canvas descriptions
+ * to learn more about making sketches accessible.
+ *
+ * @method describeElement
+ * @param {String} name name of the element.
+ * @param {String} text description of the element.
+ * @param {(FALLBACK|LABEL)} [display] either LABEL or FALLBACK.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * background('pink');
+ *
+ * // Describe the first element
+ * // and draw it.
+ * describeElement('Circle', 'A yellow circle in the top-left corner.');
+ * noStroke();
+ * fill('yellow');
+ * circle(25, 25, 40);
+ *
+ * // Describe the second element
+ * // and draw it.
+ * describeElement('Heart', 'A red heart in the bottom-right corner.');
+ * fill('red');
+ * circle(66.6, 66.6, 20);
+ * circle(83.2, 66.6, 20);
+ * triangle(91.2, 72.6, 75, 95, 58.6, 72.6);
+ *
+ * // Add a general description of the canvas.
+ * describe('A red heart and yellow circle over a pink background.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * background('pink');
+ *
+ * // Describe the first element
+ * // and draw it. Display the
+ * // description for debugging.
+ * describeElement('Circle', 'A yellow circle in the top-left corner.', LABEL);
+ * noStroke();
+ * fill('yellow');
+ * circle(25, 25, 40);
+ *
+ * // Describe the second element
+ * // and draw it. Display the
+ * // description for debugging.
+ * describeElement('Heart', 'A red heart in the bottom-right corner.', LABEL);
+ * fill('red');
+ * circle(66.6, 66.6, 20);
+ * circle(83.2, 66.6, 20);
+ * triangle(91.2, 72.6, 75, 95, 58.6, 72.6);
+ *
+ * // Add a general description of the canvas.
+ * describe('A red heart and yellow circle over a pink background.');
+ * }
+ *
+ *
+ */
-p5.prototype.describeElement = function(name, text, display) {
- p5._validateParameters('describeElement', arguments);
- if (typeof text !== 'string' || typeof name !== 'string') {
- return;
- }
- const cnvId = this.canvas.id;
- //calls function that adds punctuation for better screen reading
- text = _descriptionText(text);
- //calls function that adds punctuation for better screen reading
- let elementName = _elementName(name);
- //remove any special characters from name to use it as html id
- name = name.replace(/[^a-zA-Z0-9]/g, '');
+ fn.describeElement = function(name, text, display) {
+ // p5._validateParameters('describeElement', arguments);
+ if (typeof text !== 'string' || typeof name !== 'string') {
+ return;
+ }
+ const cnvId = this.canvas.id;
+ //calls function that adds punctuation for better screen reading
+ text = _descriptionText(text);
+ //calls function that adds punctuation for better screen reading
+ let elementName = _elementName(name);
+ //remove any special characters from name to use it as html id
+ name = name.replace(/[^a-zA-Z0-9]/g, '');
- //store element description
- let inner = `${elementName} ${text} `;
- //if there is no dummyDOM
- if (!this.dummyDOM) {
- this.dummyDOM = document.getElementById(cnvId).parentNode;
- }
- if (!this.descriptions) {
- this.descriptions = { fallbackElements: {} };
- } else if (!this.descriptions.fallbackElements) {
- this.descriptions.fallbackElements = {};
- }
- //check if html structure for element description is ready
- if (this.descriptions.fallbackElements[name]) {
- //if current element description is not the same as inner
- if (this.descriptions.fallbackElements[name].innerHTML !== inner) {
- //update element description
- this.descriptions.fallbackElements[name].innerHTML = inner;
+ //store element description
+ let inner = `${elementName} ${text} `;
+ //if there is no dummyDOM
+ if (!this.dummyDOM) {
+ this.dummyDOM = document.getElementById(cnvId).parentNode;
}
- } else {
- //create fallback html structure
- this._describeElementHTML('fallback', name, inner);
- }
- //if display is LABEL
- if (display === this.LABEL) {
- if (!this.descriptions.labelElements) {
- this.descriptions.labelElements = {};
+ if (!this.descriptions) {
+ this.descriptions = { fallbackElements: {} };
+ } else if (!this.descriptions.fallbackElements) {
+ this.descriptions.fallbackElements = {};
}
- //if html structure for label element description is ready
- if (this.descriptions.labelElements[name]) {
- //if label element description is different
- if (this.descriptions.labelElements[name].innerHTML !== inner) {
- //update label element description
- this.descriptions.labelElements[name].innerHTML = inner;
+ //check if html structure for element description is ready
+ if (this.descriptions.fallbackElements[name]) {
+ //if current element description is not the same as inner
+ if (this.descriptions.fallbackElements[name].innerHTML !== inner) {
+ //update element description
+ this.descriptions.fallbackElements[name].innerHTML = inner;
}
} else {
- //create label element html structure
- this._describeElementHTML('label', name, inner);
+ //create fallback html structure
+ this._describeElementHTML('fallback', name, inner);
}
- }
-};
+ //if display is LABEL
+ if (display === this.LABEL) {
+ if (!this.descriptions.labelElements) {
+ this.descriptions.labelElements = {};
+ }
+ //if html structure for label element description is ready
+ if (this.descriptions.labelElements[name]) {
+ //if label element description is different
+ if (this.descriptions.labelElements[name].innerHTML !== inner) {
+ //update label element description
+ this.descriptions.labelElements[name].innerHTML = inner;
+ }
+ } else {
+ //create label element html structure
+ this._describeElementHTML('label', name, inner);
+ }
+ }
+ };
-/*
- *
- * Helper functions for describe() and describeElement().
- *
- */
+ /*
+ *
+ * Helper functions for describe() and describeElement().
+ *
+ */
-// check that text is not LABEL or FALLBACK and ensure text ends with punctuation mark
-function _descriptionText(text) {
- if (text === 'label' || text === 'fallback') {
- throw new Error('description should not be LABEL or FALLBACK');
- }
- //if string does not end with '.'
- if (
- !text.endsWith('.') &&
- !text.endsWith(';') &&
- !text.endsWith(',') &&
- !text.endsWith('?') &&
- !text.endsWith('!')
- ) {
- //add '.' to the end of string
- text = text + '.';
+ // check that text is not LABEL or FALLBACK and ensure text ends with punctuation mark
+ function _descriptionText(text) {
+ if (text === 'label' || text === 'fallback') {
+ throw new Error('description should not be LABEL or FALLBACK');
+ }
+ //if string does not end with '.'
+ if (
+ !text.endsWith('.') &&
+ !text.endsWith(';') &&
+ !text.endsWith(',') &&
+ !text.endsWith('?') &&
+ !text.endsWith('!')
+ ) {
+ //add '.' to the end of string
+ text = text + '.';
+ }
+ return text;
}
- return text;
-}
-/*
- * Helper functions for describe()
- */
+ /*
+ * Helper functions for describe()
+ */
-//creates HTML structure for canvas descriptions
-p5.prototype._describeHTML = function(type, text) {
- const cnvId = this.canvas.id;
- if (type === 'fallback') {
- //if there is no description container
- if (!this.dummyDOM.querySelector(`#${cnvId + descContainer}`)) {
- //if there are no accessible outputs (see textOutput() and gridOutput())
- let html = ``;
- if (!this.dummyDOM.querySelector(`#${cnvId}accessibleOutput`)) {
- //create description container + for fallback description
- this.dummyDOM.querySelector(`#${cnvId}`).innerHTML = html;
+ //creates HTML structure for canvas descriptions
+ fn._describeHTML = function(type, text) {
+ const cnvId = this.canvas.id;
+ if (type === 'fallback') {
+ //if there is no description container
+ if (!this.dummyDOM.querySelector(`#${cnvId + descContainer}`)) {
+ //if there are no accessible outputs (see textOutput() and gridOutput())
+ let html = `
`;
+ if (!this.dummyDOM.querySelector(`#${cnvId}accessibleOutput`)) {
+ //create description container + for fallback description
+ this.dummyDOM.querySelector(`#${cnvId}`).innerHTML = html;
+ } else {
+ //create description container +
for fallback description before outputs
+ this.dummyDOM
+ .querySelector(`#${cnvId}accessibleOutput`)
+ .insertAdjacentHTML('beforebegin', html);
+ }
} else {
- //create description container +
for fallback description before outputs
+ //if describeElement() has already created the container and added a table of elements
+ //create fallback description
before the table
this.dummyDOM
- .querySelector(`#${cnvId}accessibleOutput`)
- .insertAdjacentHTML('beforebegin', html);
+ .querySelector('#' + cnvId + fallbackTableId)
+ .insertAdjacentHTML(
+ 'beforebegin',
+ `
`
+ );
}
- } else {
- //if describeElement() has already created the container and added a table of elements
- //create fallback description before the table
- this.dummyDOM
- .querySelector('#' + cnvId + fallbackTableId)
- .insertAdjacentHTML(
- 'beforebegin',
- `
`
- );
- }
- //if the container for the description exists
- this.descriptions.fallback = this.dummyDOM.querySelector(
- `#${cnvId}${fallbackDescId}`
- );
- this.descriptions.fallback.innerHTML = text;
- return;
- } else if (type === 'label') {
- //if there is no label container
- if (!this.dummyDOM.querySelector(`#${cnvId + labelContainer}`)) {
- let html = ``;
- //if there are no accessible outputs (see textOutput() and gridOutput())
- if (!this.dummyDOM.querySelector(`#${cnvId}accessibleOutputLabel`)) {
- //create label container + for label description
- this.dummyDOM
- .querySelector('#' + cnvId)
- .insertAdjacentHTML('afterend', html);
- } else {
- //create label container +
for label description before outputs
+ //if the container for the description exists
+ this.descriptions.fallback = this.dummyDOM.querySelector(
+ `#${cnvId}${fallbackDescId}`
+ );
+ this.descriptions.fallback.innerHTML = text;
+ return;
+ } else if (type === 'label') {
+ //if there is no label container
+ if (!this.dummyDOM.querySelector(`#${cnvId + labelContainer}`)) {
+ let html = `
`;
+ //if there are no accessible outputs (see textOutput() and gridOutput())
+ if (!this.dummyDOM.querySelector(`#${cnvId}accessibleOutputLabel`)) {
+ //create label container + for label description
+ this.dummyDOM
+ .querySelector('#' + cnvId)
+ .insertAdjacentHTML('afterend', html);
+ } else {
+ //create label container +
for label description before outputs
+ this.dummyDOM
+ .querySelector(`#${cnvId}accessibleOutputLabel`)
+ .insertAdjacentHTML('beforebegin', html);
+ }
+ } else if (this.dummyDOM.querySelector(`#${cnvId + labelTableId}`)) {
+ //if describeElement() has already created the container and added a table of elements
+ //create label description
before the table
this.dummyDOM
- .querySelector(`#${cnvId}accessibleOutputLabel`)
- .insertAdjacentHTML('beforebegin', html);
+ .querySelector(`#${cnvId + labelTableId}`)
+ .insertAdjacentHTML(
+ 'beforebegin',
+ `
`
+ );
}
- } else if (this.dummyDOM.querySelector(`#${cnvId + labelTableId}`)) {
- //if describeElement() has already created the container and added a table of elements
- //create label description before the table
- this.dummyDOM
- .querySelector(`#${cnvId + labelTableId}`)
- .insertAdjacentHTML(
- 'beforebegin',
- `
`
- );
+ this.descriptions.label = this.dummyDOM.querySelector(
+ '#' + cnvId + labelDescId
+ );
+ this.descriptions.label.innerHTML = text;
+ return;
}
- this.descriptions.label = this.dummyDOM.querySelector(
- '#' + cnvId + labelDescId
- );
- this.descriptions.label.innerHTML = text;
- return;
- }
-};
+ };
-/*
- * Helper functions for describeElement().
- */
+ /*
+ * Helper functions for describeElement().
+ */
-//check that name is not LABEL or FALLBACK and ensure text ends with colon
-function _elementName(name) {
- if (name === 'label' || name === 'fallback') {
- throw new Error('element name should not be LABEL or FALLBACK');
- }
- //check if last character of string n is '.', ';', or ','
- if (name.endsWith('.') || name.endsWith(';') || name.endsWith(',')) {
- //replace last character with ':'
- name = name.replace(/.$/, ':');
- } else if (!name.endsWith(':')) {
- //if string n does not end with ':'
- //add ':'' at the end of string
- name = name + ':';
+ //check that name is not LABEL or FALLBACK and ensure text ends with colon
+ function _elementName(name) {
+ if (name === 'label' || name === 'fallback') {
+ throw new Error('element name should not be LABEL or FALLBACK');
+ }
+ //check if last character of string n is '.', ';', or ','
+ if (name.endsWith('.') || name.endsWith(';') || name.endsWith(',')) {
+ //replace last character with ':'
+ name = name.replace(/.$/, ':');
+ } else if (!name.endsWith(':')) {
+ //if string n does not end with ':'
+ //add ':'' at the end of string
+ name = name + ':';
+ }
+ return name;
}
- return name;
-}
-//creates HTML structure for element descriptions
-p5.prototype._describeElementHTML = function(type, name, text) {
- const cnvId = this.canvas.id;
- if (type === 'fallback') {
- //if there is no description container
- if (!this.dummyDOM.querySelector(`#${cnvId + descContainer}`)) {
- //if there are no accessible outputs (see textOutput() and gridOutput())
- let html = `Canvas elements and their descriptions
`;
- if (!this.dummyDOM.querySelector(`#${cnvId}accessibleOutput`)) {
- //create container + table for element descriptions
- this.dummyDOM.querySelector('#' + cnvId).innerHTML = html;
- } else {
- //create container + table for element descriptions before outputs
+ //creates HTML structure for element descriptions
+ fn._describeElementHTML = function(type, name, text) {
+ const cnvId = this.canvas.id;
+ if (type === 'fallback') {
+ //if there is no description container
+ if (!this.dummyDOM.querySelector(`#${cnvId + descContainer}`)) {
+ //if there are no accessible outputs (see textOutput() and gridOutput())
+ let html = `Canvas elements and their descriptions
`;
+ if (!this.dummyDOM.querySelector(`#${cnvId}accessibleOutput`)) {
+ //create container + table for element descriptions
+ this.dummyDOM.querySelector('#' + cnvId).innerHTML = html;
+ } else {
+ //create container + table for element descriptions before outputs
+ this.dummyDOM
+ .querySelector(`#${cnvId}accessibleOutput`)
+ .insertAdjacentHTML('beforebegin', html);
+ }
+ } else if (!this.dummyDOM.querySelector('#' + cnvId + fallbackTableId)) {
+ //if describe() has already created the container and added a description
+ //and there is no table create fallback table for element description after
+ //fallback description
this.dummyDOM
- .querySelector(`#${cnvId}accessibleOutput`)
- .insertAdjacentHTML('beforebegin', html);
+ .querySelector('#' + cnvId + fallbackDescId)
+ .insertAdjacentHTML(
+ 'afterend',
+ `Canvas elements and their descriptions
`
+ );
}
- } else if (!this.dummyDOM.querySelector('#' + cnvId + fallbackTableId)) {
- //if describe() has already created the container and added a description
- //and there is no table create fallback table for element description after
- //fallback description
+ //create a table row for the element
+ let tableRow = document.createElement('tr');
+ tableRow.id = cnvId + fallbackTableElId + name;
this.dummyDOM
- .querySelector('#' + cnvId + fallbackDescId)
- .insertAdjacentHTML(
- 'afterend',
- `Canvas elements and their descriptions
`
- );
- }
- //create a table row for the element
- let tableRow = document.createElement('tr');
- tableRow.id = cnvId + fallbackTableElId + name;
- this.dummyDOM
- .querySelector('#' + cnvId + fallbackTableId)
- .appendChild(tableRow);
- //update element description
- this.descriptions.fallbackElements[name] = this.dummyDOM.querySelector(
- `#${cnvId}${fallbackTableElId}${name}`
- );
- this.descriptions.fallbackElements[name].innerHTML = text;
- return;
- } else if (type === 'label') {
- //If display is LABEL creates a div adjacent to the canvas element with
- //a table, a row header cell with the name of the elements,
- //and adds the description of the element in adjacent cell.
- //if there is no label description container
- if (!this.dummyDOM.querySelector(`#${cnvId + labelContainer}`)) {
- //if there are no accessible outputs (see textOutput() and gridOutput())
- let html = `
`;
- if (!this.dummyDOM.querySelector(`#${cnvId}accessibleOutputLabel`)) {
- //create container + table for element descriptions
- this.dummyDOM
- .querySelector('#' + cnvId)
- .insertAdjacentHTML('afterend', html);
- } else {
- //create container + table for element descriptions before outputs
+ .querySelector('#' + cnvId + fallbackTableId)
+ .appendChild(tableRow);
+ //update element description
+ this.descriptions.fallbackElements[name] = this.dummyDOM.querySelector(
+ `#${cnvId}${fallbackTableElId}${name}`
+ );
+ this.descriptions.fallbackElements[name].innerHTML = text;
+ return;
+ } else if (type === 'label') {
+ //If display is LABEL creates a div adjacent to the canvas element with
+ //a table, a row header cell with the name of the elements,
+ //and adds the description of the element in adjacent cell.
+ //if there is no label description container
+ if (!this.dummyDOM.querySelector(`#${cnvId + labelContainer}`)) {
+ //if there are no accessible outputs (see textOutput() and gridOutput())
+ let html = `
`;
+ if (!this.dummyDOM.querySelector(`#${cnvId}accessibleOutputLabel`)) {
+ //create container + table for element descriptions
+ this.dummyDOM
+ .querySelector('#' + cnvId)
+ .insertAdjacentHTML('afterend', html);
+ } else {
+ //create container + table for element descriptions before outputs
+ this.dummyDOM
+ .querySelector(`#${cnvId}accessibleOutputLabel`)
+ .insertAdjacentHTML('beforebegin', html);
+ }
+ } else if (!this.dummyDOM.querySelector(`#${cnvId + labelTableId}`)) {
+ //if describe() has already created the label container and added a description
+ //and there is no table create label table for element description after
+ //label description
this.dummyDOM
- .querySelector(`#${cnvId}accessibleOutputLabel`)
- .insertAdjacentHTML('beforebegin', html);
+ .querySelector('#' + cnvId + labelDescId)
+ .insertAdjacentHTML(
+ 'afterend',
+ `
`
+ );
}
- } else if (!this.dummyDOM.querySelector(`#${cnvId + labelTableId}`)) {
- //if describe() has already created the label container and added a description
- //and there is no table create label table for element description after
- //label description
+ //create a table row for the element label description
+ let tableRow = document.createElement('tr');
+ tableRow.id = cnvId + labelTableElId + name;
this.dummyDOM
- .querySelector('#' + cnvId + labelDescId)
- .insertAdjacentHTML(
- 'afterend',
- `
`
- );
+ .querySelector('#' + cnvId + labelTableId)
+ .appendChild(tableRow);
+ //update element label description
+ this.descriptions.labelElements[name] = this.dummyDOM.querySelector(
+ `#${cnvId}${labelTableElId}${name}`
+ );
+ this.descriptions.labelElements[name].innerHTML = text;
}
- //create a table row for the element label description
- let tableRow = document.createElement('tr');
- tableRow.id = cnvId + labelTableElId + name;
- this.dummyDOM
- .querySelector('#' + cnvId + labelTableId)
- .appendChild(tableRow);
- //update element label description
- this.descriptions.labelElements[name] = this.dummyDOM.querySelector(
- `#${cnvId}${labelTableElId}${name}`
- );
- this.descriptions.labelElements[name].innerHTML = text;
- }
-};
+ };
+}
+
+export default describe;
-export default p5;
+if(typeof p5 !== 'undefined'){
+ describe(p5, p5.prototype);
+}
diff --git a/src/accessibility/gridOutput.js b/src/accessibility/gridOutput.js
index 5b52a23eb8..ce19cb37b1 100644
--- a/src/accessibility/gridOutput.js
+++ b/src/accessibility/gridOutput.js
@@ -4,151 +4,157 @@
* @for p5
* @requires core
*/
-import p5 from '../core/main';
-//the functions in this file support updating the grid output
+function gridOutput(p5, fn){
+ //the functions in this file support updating the grid output
-//updates gridOutput
-p5.prototype._updateGridOutput = function(idT) {
- //if html structure is not there yet
- if (!this.dummyDOM.querySelector(`#${idT}_summary`)) {
- return;
- }
- let current = this._accessibleOutputs[idT];
- //create shape details list
- let innerShapeDetails = _gridShapeDetails(idT, this.ingredients.shapes);
- //create summary
- let innerSummary = _gridSummary(
- innerShapeDetails.numShapes,
- this.ingredients.colors.background,
- this.width,
- this.height
- );
- //create grid map
- let innerMap = _gridMap(idT, this.ingredients.shapes);
- //if it is different from current summary
- if (innerSummary !== current.summary.innerHTML) {
- //update
- current.summary.innerHTML = innerSummary;
- }
- //if it is different from current map
- if (innerMap !== current.map.innerHTML) {
- //update
- current.map.innerHTML = innerMap;
- }
- //if it is different from current shape details
- if (innerShapeDetails.details !== current.shapeDetails.innerHTML) {
- //update
- current.shapeDetails.innerHTML = innerShapeDetails.details;
- }
- this._accessibleOutputs[idT] = current;
-};
-
-//creates spatial grid that maps the location of shapes
-function _gridMap(idT, ingredients) {
- let shapeNumber = 0;
- let table = '';
- //create an array of arrays 10*10 of empty cells
- let cells = Array.from(Array(10), () => Array(10));
- for (let x in ingredients) {
- for (let y in ingredients[x]) {
- let fill;
- if (x !== 'line') {
- fill = `${
- ingredients[x][y].color
- } ${x}`;
- } else {
- fill = `${
- ingredients[x][y].color
- } ${x} midpoint`;
- }
+ //updates gridOutput
+ fn._updateGridOutput = function(idT) {
+ //if html structure is not there yet
+ if (!this.dummyDOM.querySelector(`#${idT}_summary`)) {
+ return;
+ }
+ let current = this._accessibleOutputs[idT];
+ //create shape details list
+ let innerShapeDetails = _gridShapeDetails(idT, this.ingredients.shapes);
+ //create summary
+ let innerSummary = _gridSummary(
+ innerShapeDetails.numShapes,
+ this.ingredients.colors.background,
+ this.width,
+ this.height
+ );
+ //create grid map
+ let innerMap = _gridMap(idT, this.ingredients.shapes);
+ //if it is different from current summary
+ if (innerSummary !== current.summary.innerHTML) {
+ //update
+ current.summary.innerHTML = innerSummary;
+ }
+ //if it is different from current map
+ if (innerMap !== current.map.innerHTML) {
+ //update
+ current.map.innerHTML = innerMap;
+ }
+ //if it is different from current shape details
+ if (innerShapeDetails.details !== current.shapeDetails.innerHTML) {
+ //update
+ current.shapeDetails.innerHTML = innerShapeDetails.details;
+ }
+ this._accessibleOutputs[idT] = current;
+ };
- // Check if shape is in canvas, skip if not
- if(
- ingredients[x][y].loc.locY < cells.length &&
- ingredients[x][y].loc.locX < cells[ingredients[x][y].loc.locY].length
- ){
- //if empty cell of location of shape is undefined
- if (!cells[ingredients[x][y].loc.locY][ingredients[x][y].loc.locX]) {
- //fill it with shape info
- cells[ingredients[x][y].loc.locY][ingredients[x][y].loc.locX] = fill;
- //if a shape is already in that location
+ //creates spatial grid that maps the location of shapes
+ function _gridMap(idT, ingredients) {
+ let shapeNumber = 0;
+ let table = '';
+ //create an array of arrays 10*10 of empty cells
+ let cells = Array.from(Array(10), () => Array(10));
+ for (let x in ingredients) {
+ for (let y in ingredients[x]) {
+ let fill;
+ if (x !== 'line') {
+ fill = `${
+ ingredients[x][y].color
+ } ${x}`;
} else {
- //add it
- cells[ingredients[x][y].loc.locY][ingredients[x][y].loc.locX] =
- cells[ingredients[x][y].loc.locY][ingredients[x][y].loc.locX] +
- ' ' +
- fill;
+ fill = `${
+ ingredients[x][y].color
+ } ${x} midpoint`;
+ }
+
+ // Check if shape is in canvas, skip if not
+ if(
+ ingredients[x][y].loc.locY < cells.length &&
+ ingredients[x][y].loc.locX < cells[ingredients[x][y].loc.locY].length
+ ){
+ //if empty cell of location of shape is undefined
+ if (!cells[ingredients[x][y].loc.locY][ingredients[x][y].loc.locX]) {
+ //fill it with shape info
+ cells[ingredients[x][y].loc.locY][ingredients[x][y].loc.locX] =
+ fill;
+ //if a shape is already in that location
+ } else {
+ //add it
+ cells[ingredients[x][y].loc.locY][ingredients[x][y].loc.locX] =
+ cells[ingredients[x][y].loc.locY][ingredients[x][y].loc.locX] +
+ ' ' +
+ fill;
+ }
+ shapeNumber++;
}
- shapeNumber++;
}
}
- }
- //make table based on array
- for (let _r in cells) {
- let row = '';
- for (let c in cells[_r]) {
- row = row + '';
- if (cells[_r][c] !== undefined) {
- row = row + cells[_r][c];
+ //make table based on array
+ for (let _r in cells) {
+ let row = ' ';
+ for (let c in cells[_r]) {
+ row = row + '';
+ if (cells[_r][c] !== undefined) {
+ row = row + cells[_r][c];
+ }
+ row = row + ' ';
}
- row = row + '';
+ table = table + row + ' ';
}
- table = table + row + '';
+ return table;
}
- return table;
-}
-//creates grid summary
-function _gridSummary(numShapes, background, width, height) {
- let text = `${background} canvas, ${width} by ${height} pixels, contains ${
- numShapes[0]
- }`;
- if (numShapes[0] === 1) {
- text = `${text} shape: ${numShapes[1]}`;
- } else {
- text = `${text} shapes: ${numShapes[1]}`;
+ //creates grid summary
+ function _gridSummary(numShapes, background, width, height) {
+ let text = `${background} canvas, ${width} by ${height} pixels, contains ${
+ numShapes[0]
+ }`;
+ if (numShapes[0] === 1) {
+ text = `${text} shape: ${numShapes[1]}`;
+ } else {
+ text = `${text} shapes: ${numShapes[1]}`;
+ }
+ return text;
}
- return text;
-}
-//creates list of shapes
-function _gridShapeDetails(idT, ingredients) {
- let shapeDetails = '';
- let shapes = '';
- let totalShapes = 0;
- //goes trhough every shape type in ingredients
- for (let x in ingredients) {
- let shapeNum = 0;
- for (let y in ingredients[x]) {
- //it creates a line in a list
- let line = `${
- ingredients[x][y].color
- } ${x},`;
- if (x === 'line') {
- line =
- line +
- ` location = ${ingredients[x][y].pos}, length = ${
- ingredients[x][y].length
- } pixels`;
- } else {
- line = line + ` location = ${ingredients[x][y].pos}`;
- if (x !== 'point') {
- line = line + `, area = ${ingredients[x][y].area} %`;
+ //creates list of shapes
+ function _gridShapeDetails(idT, ingredients) {
+ let shapeDetails = '';
+ let shapes = '';
+ let totalShapes = 0;
+ //goes trhough every shape type in ingredients
+ for (let x in ingredients) {
+ let shapeNum = 0;
+ for (let y in ingredients[x]) {
+ //it creates a line in a list
+ let line = ` ${
+ ingredients[x][y].color
+ } ${x},`;
+ if (x === 'line') {
+ line =
+ line +
+ ` location = ${ingredients[x][y].pos}, length = ${
+ ingredients[x][y].length
+ } pixels`;
+ } else {
+ line = line + ` location = ${ingredients[x][y].pos}`;
+ if (x !== 'point') {
+ line = line + `, area = ${ingredients[x][y].area} %`;
+ }
+ line = line + ' ';
}
- line = line + '
';
+ shapeDetails = shapeDetails + line;
+ shapeNum++;
+ totalShapes++;
+ }
+ if (shapeNum > 1) {
+ shapes = `${shapes} ${shapeNum} ${x}s`;
+ } else {
+ shapes = `${shapes} ${shapeNum} ${x}`;
}
- shapeDetails = shapeDetails + line;
- shapeNum++;
- totalShapes++;
- }
- if (shapeNum > 1) {
- shapes = `${shapes} ${shapeNum} ${x}s`;
- } else {
- shapes = `${shapes} ${shapeNum} ${x}`;
}
+ return { numShapes: [totalShapes, shapes], details: shapeDetails };
}
- return { numShapes: [totalShapes, shapes], details: shapeDetails };
}
-export default p5;
+export default gridOutput;
+
+if(typeof p5 !== 'undefined'){
+ gridOutput(p5, p5.prototype);
+}
diff --git a/src/accessibility/index.js b/src/accessibility/index.js
new file mode 100644
index 0000000000..4469b4fdef
--- /dev/null
+++ b/src/accessibility/index.js
@@ -0,0 +1,13 @@
+import describe from './describe.js';
+import gridOutput from './gridOutput.js';
+import textOutput from './textOutput.js';
+import outputs from './outputs.js';
+import colorNamer from './color_namer.js';
+
+export default function(p5){
+ p5.registerAddon(describe);
+ p5.registerAddon(gridOutput);
+ p5.registerAddon(textOutput);
+ p5.registerAddon(outputs);
+ p5.registerAddon(colorNamer);
+}
diff --git a/src/accessibility/outputs.js b/src/accessibility/outputs.js
index 4cdb308c27..352d39a811 100644
--- a/src/accessibility/outputs.js
+++ b/src/accessibility/outputs.js
@@ -5,684 +5,706 @@
* @requires core
*/
-import p5 from '../core/main';
-
-/**
- * Creates a screen reader-accessible description of shapes on the canvas.
- *
- * `textOutput()` adds a general description, list of shapes, and
- * table of shapes to the web page. The general description includes the
- * canvas size, canvas color, and number of shapes. For example,
- * `Your output is a, 100 by 100 pixels, gray canvas containing the following 2 shapes:`.
- *
- * A list of shapes follows the general description. The list describes the
- * color, location, and area of each shape. For example,
- * `a red circle at middle covering 3% of the canvas`. Each shape can be
- * selected to get more details.
- *
- * `textOutput()` uses its table of shapes as a list. The table describes the
- * shape, color, location, coordinates and area. For example,
- * `red circle location = middle area = 3%`. This is different from
- * gridOutput(), which uses its table as a grid.
- *
- * The `display` parameter is optional. It determines how the description is
- * displayed. If `LABEL` is passed, as in `textOutput(LABEL)`, the description
- * will be visible in a div element next to the canvas. Using `LABEL` creates
- * unhelpful duplicates for screen readers. Only use `LABEL` during
- * development. If `FALLBACK` is passed, as in `textOutput(FALLBACK)`, the
- * description will only be visible to screen readers. This is the default
- * mode.
- *
- * Read
- * Writing accessible canvas descriptions
- * to learn more about making sketches accessible.
- *
- * @method textOutput
- * @param {Constant} [display] either FALLBACK or LABEL.
- *
- * @example
- *
- *
- * function setup() {
- * // Add the text description.
- * textOutput();
- *
- * // Draw a couple of shapes.
- * background(200);
- * fill(255, 0, 0);
- * circle(20, 20, 20);
- * fill(0, 0, 255);
- * square(50, 50, 50);
- *
- * // Add a general description of the canvas.
- * describe('A red circle and a blue square on a gray background.');
- * }
- *
- *
- *
- *
- *
- * function setup() {
- * // Add the text description and
- * // display it for debugging.
- * textOutput(LABEL);
- *
- * // Draw a couple of shapes.
- * background(200);
- * fill(255, 0, 0);
- * circle(20, 20, 20);
- * fill(0, 0, 255);
- * square(50, 50, 50);
- *
- * // Add a general description of the canvas.
- * describe('A red circle and a blue square on a gray background.');
- * }
- *
- *
- *
- *
- *
- * function draw() {
- * // Add the text description.
- * textOutput();
- *
- * // Draw a moving circle.
- * background(200);
- * let x = frameCount * 0.1;
- * fill(255, 0, 0);
- * circle(x, 20, 20);
- * fill(0, 0, 255);
- * square(50, 50, 50);
- *
- * // Add a general description of the canvas.
- * describe('A red circle moves from left to right above a blue square.');
- * }
- *
- *
- *
- *
- *
- * function draw() {
- * // Add the text description and
- * // display it for debugging.
- * textOutput(LABEL);
- *
- * // Draw a moving circle.
- * background(200);
- * let x = frameCount * 0.1;
- * fill(255, 0, 0);
- * circle(x, 20, 20);
- * fill(0, 0, 255);
- * square(50, 50, 50);
- *
- * // Add a general description of the canvas.
- * describe('A red circle moves from left to right above a blue square.');
- * }
- *
- *
- */
-
-p5.prototype.textOutput = function(display) {
- p5._validateParameters('textOutput', arguments);
- //if textOutput is already true
- if (this._accessibleOutputs.text) {
- return;
- } else {
- //make textOutput true
- this._accessibleOutputs.text = true;
- //create output for fallback
- this._createOutput('textOutput', 'Fallback');
- if (display === this.LABEL) {
- //make textOutput label true
- this._accessibleOutputs.textLabel = true;
- //create output for label
- this._createOutput('textOutput', 'Label');
+function outputs(p5, fn){
+ /**
+ * Creates a screen reader-accessible description of shapes on the canvas.
+ *
+ * `textOutput()` adds a general description, list of shapes, and
+ * table of shapes to the web page. The general description includes the
+ * canvas size, canvas color, and number of shapes. For example,
+ * `Your output is a, 100 by 100 pixels, gray canvas containing the following 2 shapes:`.
+ *
+ * A list of shapes follows the general description. The list describes the
+ * color, location, and area of each shape. For example,
+ * `a red circle at middle covering 3% of the canvas`. Each shape can be
+ * selected to get more details.
+ *
+ * `textOutput()` uses its table of shapes as a list. The table describes the
+ * shape, color, location, coordinates and area. For example,
+ * `red circle location = middle area = 3%`. This is different from
+ * gridOutput(), which uses its table as a grid.
+ *
+ * The `display` parameter is optional. It determines how the description is
+ * displayed. If `LABEL` is passed, as in `textOutput(LABEL)`, the description
+ * will be visible in a div element next to the canvas. Using `LABEL` creates
+ * unhelpful duplicates for screen readers. Only use `LABEL` during
+ * development. If `FALLBACK` is passed, as in `textOutput(FALLBACK)`, the
+ * description will only be visible to screen readers. This is the default
+ * mode.
+ *
+ * Read
+ * Writing accessible canvas descriptions
+ * to learn more about making sketches accessible.
+ *
+ * @method textOutput
+ * @param {(FALLBACK|LABEL)} [display] either FALLBACK or LABEL.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * // Add the text description.
+ * textOutput();
+ *
+ * // Draw a couple of shapes.
+ * background(200);
+ * fill(255, 0, 0);
+ * circle(20, 20, 20);
+ * fill(0, 0, 255);
+ * square(50, 50, 50);
+ *
+ * // Add a general description of the canvas.
+ * describe('A red circle and a blue square on a gray background.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * // Add the text description and
+ * // display it for debugging.
+ * textOutput(LABEL);
+ *
+ * // Draw a couple of shapes.
+ * background(200);
+ * fill(255, 0, 0);
+ * circle(20, 20, 20);
+ * fill(0, 0, 255);
+ * square(50, 50, 50);
+ *
+ * // Add a general description of the canvas.
+ * describe('A red circle and a blue square on a gray background.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * function setup(){
+ * createCanvas(100, 100);
+ * }
+ *
+ * function draw() {
+ * // Add the text description.
+ * textOutput();
+ *
+ * // Draw a moving circle.
+ * background(200);
+ * let x = frameCount * 0.1;
+ * fill(255, 0, 0);
+ * circle(x, 20, 20);
+ * fill(0, 0, 255);
+ * square(50, 50, 50);
+ *
+ * // Add a general description of the canvas.
+ * describe('A red circle moves from left to right above a blue square.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * function setup(){
+ * createCanvas(100, 100);
+ * }
+ *
+ * function draw() {
+ * // Add the text description and
+ * // display it for debugging.
+ * textOutput(LABEL);
+ *
+ * // Draw a moving circle.
+ * background(200);
+ * let x = frameCount * 0.1;
+ * fill(255, 0, 0);
+ * circle(x, 20, 20);
+ * fill(0, 0, 255);
+ * square(50, 50, 50);
+ *
+ * // Add a general description of the canvas.
+ * describe('A red circle moves from left to right above a blue square.');
+ * }
+ *
+ *
+ */
+ fn.textOutput = function(display) {
+ // p5._validateParameters('textOutput', arguments);
+ //if textOutput is already true
+ if (this._accessibleOutputs.text) {
+ return;
+ } else {
+ //make textOutput true
+ this._accessibleOutputs.text = true;
+ //create output for fallback
+ this._createOutput('textOutput', 'Fallback');
+ if (display === this.LABEL) {
+ //make textOutput label true
+ this._accessibleOutputs.textLabel = true;
+ //create output for label
+ this._createOutput('textOutput', 'Label');
+ }
}
- }
-};
+ };
+
+ /**
+ * Creates a screen reader-accessible description of shapes on the canvas.
+ *
+ * `gridOutput()` adds a general description, table of shapes, and list of
+ * shapes to the web page. The general description includes the canvas size,
+ * canvas color, and number of shapes. For example,
+ * `gray canvas, 100 by 100 pixels, contains 2 shapes: 1 circle 1 square`.
+ *
+ * `gridOutput()` uses its table of shapes as a grid. Each shape in the grid
+ * is placed in a cell whose row and column correspond to the shape's location
+ * on the canvas. The grid cells describe the color and type of shape at that
+ * location. For example, `red circle`. These descriptions can be selected
+ * individually to get more details. This is different from
+ * textOutput(), which uses its table as a list.
+ *
+ * A list of shapes follows the table. The list describes the color, type,
+ * location, and area of each shape. For example,
+ * `red circle, location = middle, area = 3 %`.
+ *
+ * The `display` parameter is optional. It determines how the description is
+ * displayed. If `LABEL` is passed, as in `gridOutput(LABEL)`, the description
+ * will be visible in a div element next to the canvas. Using `LABEL` creates
+ * unhelpful duplicates for screen readers. Only use `LABEL` during
+ * development. If `FALLBACK` is passed, as in `gridOutput(FALLBACK)`, the
+ * description will only be visible to screen readers. This is the default
+ * mode.
+ *
+ * Read
+ * Writing accessible canvas descriptions
+ * to learn more about making sketches accessible.
+ *
+ * @method gridOutput
+ * @param {(FALLBACK|LABEL)} [display] either FALLBACK or LABEL.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * // Add the grid description.
+ * gridOutput();
+ *
+ * // Draw a couple of shapes.
+ * background(200);
+ * fill(255, 0, 0);
+ * circle(20, 20, 20);
+ * fill(0, 0, 255);
+ * square(50, 50, 50);
+ *
+ * // Add a general description of the canvas.
+ * describe('A red circle and a blue square on a gray background.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * // Add the grid description and
+ * // display it for debugging.
+ * gridOutput(LABEL);
+ *
+ * // Draw a couple of shapes.
+ * background(200);
+ * fill(255, 0, 0);
+ * circle(20, 20, 20);
+ * fill(0, 0, 255);
+ * square(50, 50, 50);
+ *
+ * // Add a general description of the canvas.
+ * describe('A red circle and a blue square on a gray background.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ * }
+ *
+ * function draw() {
+ * // Add the grid description.
+ * gridOutput();
+ *
+ * // Draw a moving circle.
+ * background(200);
+ * let x = frameCount * 0.1;
+ * fill(255, 0, 0);
+ * circle(x, 20, 20);
+ * fill(0, 0, 255);
+ * square(50, 50, 50);
+ *
+ * // Add a general description of the canvas.
+ * describe('A red circle moves from left to right above a blue square.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * function setup(){
+ * createCanvas(100, 100);
+ * }
+ *
+ * function draw() {
+ * // Add the grid description and
+ * // display it for debugging.
+ * gridOutput(LABEL);
+ *
+ * // Draw a moving circle.
+ * background(200);
+ * let x = frameCount * 0.1;
+ * fill(255, 0, 0);
+ * circle(x, 20, 20);
+ * fill(0, 0, 255);
+ * square(50, 50, 50);
+ *
+ * // Add a general description of the canvas.
+ * describe('A red circle moves from left to right above a blue square.');
+ * }
+ *
+ *
+ */
-/**
- * Creates a screen reader-accessible description of shapes on the canvas.
- *
- * `gridOutput()` adds a general description, table of shapes, and list of
- * shapes to the web page. The general description includes the canvas size,
- * canvas color, and number of shapes. For example,
- * `gray canvas, 100 by 100 pixels, contains 2 shapes: 1 circle 1 square`.
- *
- * `gridOutput()` uses its table of shapes as a grid. Each shape in the grid
- * is placed in a cell whose row and column correspond to the shape's location
- * on the canvas. The grid cells describe the color and type of shape at that
- * location. For example, `red circle`. These descriptions can be selected
- * individually to get more details. This is different from
- * textOutput(), which uses its table as a list.
- *
- * A list of shapes follows the table. The list describes the color, type,
- * location, and area of each shape. For example,
- * `red circle, location = middle, area = 3 %`.
- *
- * The `display` parameter is optional. It determines how the description is
- * displayed. If `LABEL` is passed, as in `gridOutput(LABEL)`, the description
- * will be visible in a div element next to the canvas. Using `LABEL` creates
- * unhelpful duplicates for screen readers. Only use `LABEL` during
- * development. If `FALLBACK` is passed, as in `gridOutput(FALLBACK)`, the
- * description will only be visible to screen readers. This is the default
- * mode.
- *
- * Read
- * Writing accessible canvas descriptions
- * to learn more about making sketches accessible.
- *
- * @method gridOutput
- * @param {Constant} [display] either FALLBACK or LABEL.
- *
- * @example
- *
- *
- * function setup() {
- * // Add the grid description.
- * gridOutput();
- *
- * // Draw a couple of shapes.
- * background(200);
- * fill(255, 0, 0);
- * circle(20, 20, 20);
- * fill(0, 0, 255);
- * square(50, 50, 50);
- *
- * // Add a general description of the canvas.
- * describe('A red circle and a blue square on a gray background.');
- * }
- *
- *
- *
- *
- *
- * function setup() {
- * // Add the grid description and
- * // display it for debugging.
- * gridOutput(LABEL);
- *
- * // Draw a couple of shapes.
- * background(200);
- * fill(255, 0, 0);
- * circle(20, 20, 20);
- * fill(0, 0, 255);
- * square(50, 50, 50);
- *
- * // Add a general description of the canvas.
- * describe('A red circle and a blue square on a gray background.');
- * }
- *
- *
- *
- *
- *
- * function draw() {
- * // Add the grid description.
- * gridOutput();
- *
- * // Draw a moving circle.
- * background(200);
- * let x = frameCount * 0.1;
- * fill(255, 0, 0);
- * circle(x, 20, 20);
- * fill(0, 0, 255);
- * square(50, 50, 50);
- *
- * // Add a general description of the canvas.
- * describe('A red circle moves from left to right above a blue square.');
- * }
- *
- *
- *
- *
- *
- * function draw() {
- * // Add the grid description and
- * // display it for debugging.
- * gridOutput(LABEL);
- *
- * // Draw a moving circle.
- * background(200);
- * let x = frameCount * 0.1;
- * fill(255, 0, 0);
- * circle(x, 20, 20);
- * fill(0, 0, 255);
- * square(50, 50, 50);
- *
- * // Add a general description of the canvas.
- * describe('A red circle moves from left to right above a blue square.');
- * }
- *
- *
- */
-p5.prototype.gridOutput = function(display) {
- p5._validateParameters('gridOutput', arguments);
- //if gridOutput is already true
- if (this._accessibleOutputs.grid) {
- return;
- } else {
- //make gridOutput true
- this._accessibleOutputs.grid = true;
- //create output for fallback
- this._createOutput('gridOutput', 'Fallback');
- if (display === this.LABEL) {
- //make gridOutput label true
- this._accessibleOutputs.gridLabel = true;
- //create output for label
- this._createOutput('gridOutput', 'Label');
+ fn.gridOutput = function(display) {
+ // p5._validateParameters('gridOutput', arguments);
+ //if gridOutput is already true
+ if (this._accessibleOutputs.grid) {
+ return;
+ } else {
+ //make gridOutput true
+ this._accessibleOutputs.grid = true;
+ //create output for fallback
+ this._createOutput('gridOutput', 'Fallback');
+ if (display === this.LABEL) {
+ //make gridOutput label true
+ this._accessibleOutputs.gridLabel = true;
+ //create output for label
+ this._createOutput('gridOutput', 'Label');
+ }
}
- }
-};
+ };
-//helper function returns true when accessible outputs are true
-p5.prototype._addAccsOutput = function() {
- //if there are no accessible outputs create object with all false
- if (!this._accessibleOutputs) {
- this._accessibleOutputs = {
- text: false,
- grid: false,
- textLabel: false,
- gridLabel: false
- };
- }
- return this._accessibleOutputs.grid || this._accessibleOutputs.text;
-};
+ //helper function returns true when accessible outputs are true
+ fn._addAccsOutput = function() {
+ //if there are no accessible outputs create object with all false
+ if (!this._accessibleOutputs) {
+ this._accessibleOutputs = {
+ text: false,
+ grid: false,
+ textLabel: false,
+ gridLabel: false
+ };
+ }
+ return this._accessibleOutputs.grid || this._accessibleOutputs.text;
+ };
-//helper function that creates html structure for accessible outputs
-p5.prototype._createOutput = function(type, display) {
- let cnvId = this.canvas.id;
- //if there are no ingredients create object. this object stores data for the outputs
- if (!this.ingredients) {
- this.ingredients = {
- shapes: {},
- colors: { background: 'white', fill: 'white', stroke: 'black' },
- pShapes: '',
- pBackground: ''
- };
- }
- //if there is no dummyDOM create it
- if (!this.dummyDOM) {
- this.dummyDOM = document.getElementById(cnvId).parentNode;
- }
- let cIdT, container, inner;
- let query = '';
- if (display === 'Fallback') {
- cIdT = cnvId + type;
- container = cnvId + 'accessibleOutput';
- if (!this.dummyDOM.querySelector(`#${container}`)) {
- //if there is no canvas description (see describe() and describeElement())
- if (!this.dummyDOM.querySelector(`#${cnvId}_Description`)) {
- //create html structure inside of canvas
- this.dummyDOM.querySelector(
- `#${cnvId}`
- ).innerHTML = ``;
- } else {
- //create html structure after canvas description container
- this.dummyDOM
- .querySelector(`#${cnvId}_Description`)
- .insertAdjacentHTML(
- 'afterend',
- ``
- );
+ //helper function that creates html structure for accessible outputs
+ fn._createOutput = function(type, display) {
+ let cnvId = this.canvas.id;
+ //if there are no ingredients create object. this object stores data for the outputs
+ if (!this.ingredients) {
+ this.ingredients = {
+ shapes: {},
+ colors: { background: 'white', fill: 'white', stroke: 'black' },
+ pShapes: '',
+ pBackground: ''
+ };
+ }
+ //if there is no dummyDOM create it
+ if (!this.dummyDOM) {
+ this.dummyDOM = document.getElementById(cnvId).parentNode;
+ }
+ let cIdT, container, inner;
+ let query = '';
+ if (display === 'Fallback') {
+ cIdT = cnvId + type;
+ container = cnvId + 'accessibleOutput';
+ if (!this.dummyDOM.querySelector(`#${container}`)) {
+ //if there is no canvas description (see describe() and describeElement())
+ if (!this.dummyDOM.querySelector(`#${cnvId}_Description`)) {
+ //create html structure inside of canvas
+ this.dummyDOM.querySelector(
+ `#${cnvId}`
+ ).innerHTML = ``;
+ } else {
+ //create html structure after canvas description container
+ this.dummyDOM
+ .querySelector(`#${cnvId}_Description`)
+ .insertAdjacentHTML(
+ 'afterend',
+ ``
+ );
+ }
+ }
+ } else if (display === 'Label') {
+ query = display;
+ cIdT = cnvId + type + display;
+ container = cnvId + 'accessibleOutput' + display;
+ if (!this.dummyDOM.querySelector(`#${container}`)) {
+ //if there is no canvas description label (see describe() and describeElement())
+ if (!this.dummyDOM.querySelector(`#${cnvId}_Label`)) {
+ //create html structure adjacent to canvas
+ this.dummyDOM
+ .querySelector(`#${cnvId}`)
+ .insertAdjacentHTML('afterend', ``);
+ } else {
+ //create html structure after canvas label
+ this.dummyDOM
+ .querySelector(`#${cnvId}_Label`)
+ .insertAdjacentHTML('afterend', ``);
+ }
}
}
- } else if (display === 'Label') {
- query = display;
- cIdT = cnvId + type + display;
- container = cnvId + 'accessibleOutput' + display;
- if (!this.dummyDOM.querySelector(`#${container}`)) {
- //if there is no canvas description label (see describe() and describeElement())
- if (!this.dummyDOM.querySelector(`#${cnvId}_Label`)) {
- //create html structure adjacent to canvas
+ //create an object to store the latest output. this object is used in _updateTextOutput() and _updateGridOutput()
+ this._accessibleOutputs[cIdT] = {};
+ if (type === 'textOutput') {
+ query = `#${cnvId}gridOutput${query}`; //query is used to check if gridOutput already exists
+ inner = `Text Output
`;
+ //if gridOutput already exists
+ if (this.dummyDOM.querySelector(query)) {
+ //create textOutput before gridOutput
this.dummyDOM
- .querySelector(`#${cnvId}`)
- .insertAdjacentHTML('afterend', ``);
+ .querySelector(query)
+ .insertAdjacentHTML('beforebegin', inner);
} else {
- //create html structure after canvas label
- this.dummyDOM
- .querySelector(`#${cnvId}_Label`)
- .insertAdjacentHTML('afterend', ``);
+ //create output inside of container
+ this.dummyDOM.querySelector(`#${container}`).innerHTML = inner;
}
+ //store output html elements
+ this._accessibleOutputs[cIdT].list = this.dummyDOM.querySelector(
+ `#${cIdT}_list`
+ );
+ } else if (type === 'gridOutput') {
+ query = `#${cnvId}textOutput${query}`; //query is used to check if textOutput already exists
+ inner = `Grid Output
`;
+ //if textOutput already exists
+ if (this.dummyDOM.querySelector(query)) {
+ //create gridOutput after textOutput
+ this.dummyDOM.querySelector(query).insertAdjacentHTML('afterend', inner);
+ } else {
+ //create output inside of container
+ this.dummyDOM.querySelector(`#${container}`).innerHTML = inner;
+ }
+ //store output html elements
+ this._accessibleOutputs[cIdT].map = this.dummyDOM.querySelector(
+ `#${cIdT}_map`
+ );
}
- }
- //create an object to store the latest output. this object is used in _updateTextOutput() and _updateGridOutput()
- this._accessibleOutputs[cIdT] = {};
- if (type === 'textOutput') {
- query = `#${cnvId}gridOutput${query}`; //query is used to check if gridOutput already exists
- inner = `Text Output
`;
- //if gridOutput already exists
- if (this.dummyDOM.querySelector(query)) {
- //create textOutput before gridOutput
- this.dummyDOM
- .querySelector(query)
- .insertAdjacentHTML('beforebegin', inner);
- } else {
- //create output inside of container
- this.dummyDOM.querySelector(`#${container}`).innerHTML = inner;
- }
- //store output html elements
- this._accessibleOutputs[cIdT].list = this.dummyDOM.querySelector(
- `#${cIdT}_list`
+ this._accessibleOutputs[cIdT].shapeDetails = this.dummyDOM.querySelector(
+ `#${cIdT}_shapeDetails`
);
- } else if (type === 'gridOutput') {
- query = `#${cnvId}textOutput${query}`; //query is used to check if textOutput already exists
- inner = `Grid Output
`;
- //if textOutput already exists
- if (this.dummyDOM.querySelector(query)) {
- //create gridOutput after textOutput
- this.dummyDOM.querySelector(query).insertAdjacentHTML('afterend', inner);
- } else {
- //create output inside of container
- this.dummyDOM.querySelector(`#${container}`).innerHTML = inner;
- }
- //store output html elements
- this._accessibleOutputs[cIdT].map = this.dummyDOM.querySelector(
- `#${cIdT}_map`
+ this._accessibleOutputs[cIdT].summary = this.dummyDOM.querySelector(
+ `#${cIdT}_summary`
);
- }
- this._accessibleOutputs[cIdT].shapeDetails = this.dummyDOM.querySelector(
- `#${cIdT}_shapeDetails`
- );
- this._accessibleOutputs[cIdT].summary = this.dummyDOM.querySelector(
- `#${cIdT}_summary`
- );
-};
+ };
+
+ //this function is called at the end of setup and draw if using
+ //accessibleOutputs and calls update functions of outputs
+ fn._updateAccsOutput = function() {
+ let cnvId = this.canvas.id;
+ //if the shapes are not the same as before
+ if (
+ JSON.stringify(this.ingredients.shapes) !== this.ingredients.pShapes ||
+ this.ingredients.colors.background !== this.ingredients.pBackground
+ ) {
+ //save current shapes as string in pShapes
+ this.ingredients.pShapes = JSON.stringify(this.ingredients.shapes);
+ if (this._accessibleOutputs.text) {
+ this._updateTextOutput(cnvId + 'textOutput');
+ }
+ if (this._accessibleOutputs.grid) {
+ this._updateGridOutput(cnvId + 'gridOutput');
+ }
+ if (this._accessibleOutputs.textLabel) {
+ this._updateTextOutput(cnvId + 'textOutputLabel');
+ }
+ if (this._accessibleOutputs.gridLabel) {
+ this._updateGridOutput(cnvId + 'gridOutputLabel');
+ }
+ }
+ };
-//this function is called at the end of setup and draw if using
-//accessibleOutputs and calls update functions of outputs
-p5.prototype._updateAccsOutput = function() {
- let cnvId = this.canvas.id;
- //if the shapes are not the same as before
- if (
- JSON.stringify(this.ingredients.shapes) !== this.ingredients.pShapes ||
- this.ingredients.colors.background !== this.ingredients.pBackground
- ) {
+ //helper function that resets all ingredients when background is called
+ //and saves background color name
+ fn._accsBackground = function(args) {
//save current shapes as string in pShapes
this.ingredients.pShapes = JSON.stringify(this.ingredients.shapes);
- if (this._accessibleOutputs.text) {
- this._updateTextOutput(cnvId + 'textOutput');
- }
- if (this._accessibleOutputs.grid) {
- this._updateGridOutput(cnvId + 'gridOutput');
- }
- if (this._accessibleOutputs.textLabel) {
- this._updateTextOutput(cnvId + 'textOutputLabel');
- }
- if (this._accessibleOutputs.gridLabel) {
- this._updateGridOutput(cnvId + 'gridOutputLabel');
+ this.ingredients.pBackground = this.ingredients.colors.background;
+ //empty shapes JSON
+ this.ingredients.shapes = {};
+ //update background different
+ if (this.ingredients.colors.backgroundRGBA !== args) {
+ this.ingredients.colors.backgroundRGBA = args;
+ this.ingredients.colors.background = this._rgbColorName(args);
}
- }
-};
-
-//helper function that resets all ingredients when background is called
-//and saves background color name
-p5.prototype._accsBackground = function(args) {
- //save current shapes as string in pShapes
- this.ingredients.pShapes = JSON.stringify(this.ingredients.shapes);
- this.ingredients.pBackground = this.ingredients.colors.background;
- //empty shapes JSON
- this.ingredients.shapes = {};
- //update background different
- if (this.ingredients.colors.backgroundRGBA !== args) {
- this.ingredients.colors.backgroundRGBA = args;
- this.ingredients.colors.background = this._rgbColorName(args);
- }
-};
+ };
-//helper function that gets fill and stroke of shapes
-p5.prototype._accsCanvasColors = function(f, args) {
- if (f === 'fill') {
- //update fill different
- if (this.ingredients.colors.fillRGBA !== args) {
- this.ingredients.colors.fillRGBA = args;
- this.ingredients.colors.fill = this._rgbColorName(args);
- }
- } else if (f === 'stroke') {
- //update stroke if different
- if (this.ingredients.colors.strokeRGBA !== args) {
- this.ingredients.colors.strokeRGBA = args;
- this.ingredients.colors.stroke = this._rgbColorName(args);
+ //helper function that gets fill and stroke of shapes
+ fn._accsCanvasColors = function(f, args) {
+ if (f === 'fill') {
+ //update fill different
+ if (this.ingredients.colors.fillRGBA !== args) {
+ this.ingredients.colors.fillRGBA = args;
+ this.ingredients.colors.fill = this._rgbColorName(args);
+ }
+ } else if (f === 'stroke') {
+ //update stroke if different
+ if (this.ingredients.colors.strokeRGBA !== args) {
+ this.ingredients.colors.strokeRGBA = args;
+ this.ingredients.colors.stroke = this._rgbColorName(args);
+ }
}
- }
-};
+ };
-//builds ingredients.shapes used for building outputs
-p5.prototype._accsOutput = function(f, args) {
- if (f === 'ellipse' && args[2] === args[3]) {
- f = 'circle';
- } else if (f === 'rectangle' && args[2] === args[3]) {
- f = 'square';
- }
- let include = {};
- let add = true;
- let middle = _getMiddle(f, args);
- if (f === 'line') {
- //make color stroke
- include.color = this.ingredients.colors.stroke;
- //get lenght
- include.length = Math.round(this.dist(args[0], args[1], args[2], args[3]));
- //get position of end points
- let p1 = this._getPos(args[0], [1]);
- let p2 = this._getPos(args[2], [3]);
- include.loc = _canvasLocator(middle, this.width, this.height);
- if (p1 === p2) {
- include.pos = `at ${p1}`;
- } else {
- include.pos = `from ${p1} to ${p2}`;
+ //builds ingredients.shapes used for building outputs
+ fn._accsOutput = function(f, args) {
+ if (f === 'ellipse' && args[2] === args[3]) {
+ f = 'circle';
+ } else if (f === 'rectangle' && args[2] === args[3]) {
+ f = 'square';
}
- } else {
- if (f === 'point') {
+ let include = {};
+ let add = true;
+ let middle = _getMiddle(f, args);
+ if (f === 'line') {
//make color stroke
include.color = this.ingredients.colors.stroke;
+ //get lenght
+ include.length = Math.round(
+ Math.hypot(args[2] - args[0], args[3] - args[1])
+ );
+ //get position of end points
+ let p1 = this._getPos(args[0], [1]);
+ let p2 = this._getPos(args[2], [3]);
+ include.loc = _canvasLocator(middle, this.width, this.height);
+ if (p1 === p2) {
+ include.pos = `at ${p1}`;
+ } else {
+ include.pos = `from ${p1} to ${p2}`;
+ }
} else {
- //make color fill
- include.color = this.ingredients.colors.fill;
- //get area of shape
- include.area = this._getArea(f, args);
- }
- //get middle of shapes
- //calculate position using middle of shape
- include.pos = this._getPos(...middle);
- //calculate location using middle of shape
- include.loc = _canvasLocator(middle, this.width, this.height);
- }
- //if it is the first time this shape is created
- 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]) {
- //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
- if (
- JSON.stringify(this.ingredients.shapes[f][y]) ===
- JSON.stringify(include)
- ) {
- add = false;
+ if (f === 'point') {
+ //make color stroke
+ include.color = this.ingredients.colors.stroke;
+ } else {
+ //make color fill
+ include.color = this.ingredients.colors.fill;
+ //get area of shape
+ include.area = this._getArea(f, args);
}
+ //get middle of shapes
+ //calculate position using middle of shape
+ include.pos = this._getPos(...middle);
+ //calculate location using middle of shape
+ include.loc = _canvasLocator(middle, this.width, this.height);
}
- //add shape by pushing it to the end
- if (add === true) {
- this.ingredients.shapes[f].push(include);
+ //if it is the first time this shape is created
+ if (!this.ingredients.shapes[f]) {
+ this.ingredients.shapes[f] = [include];
+ //if other shapes of this type have been created
+ } 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
+ if (
+ JSON.stringify(this.ingredients.shapes[f][y]) ===
+ JSON.stringify(include)
+ ) {
+ add = false;
+ }
+ }
+ //add shape by pushing it to the end
+ if (add === true) {
+ this.ingredients.shapes[f].push(include);
+ }
}
- }
-};
+ };
-//gets middle point / centroid of shape
-function _getMiddle(f, args) {
- let x, y;
- if (
- f === 'rectangle' ||
- f === 'ellipse' ||
- f === 'arc' ||
- f === 'circle' ||
- f === 'square'
- ) {
- x = Math.round(args[0] + args[2] / 2);
- y = Math.round(args[1] + args[3] / 2);
- } else if (f === 'triangle') {
- x = (args[0] + args[2] + args[4]) / 3;
- y = (args[1] + args[3] + args[5]) / 3;
- } else if (f === 'quadrilateral') {
- x = (args[0] + args[2] + args[4] + args[6]) / 4;
- y = (args[1] + args[3] + args[5] + args[7]) / 4;
- } else if (f === 'line') {
- x = (args[0] + args[2]) / 2;
- y = (args[1] + args[3]) / 2;
- } else {
- x = args[0];
- y = args[1];
+ //gets middle point / centroid of shape
+ function _getMiddle(f, args) {
+ let x, y;
+ if (
+ f === 'rectangle' ||
+ f === 'ellipse' ||
+ f === 'arc' ||
+ f === 'circle' ||
+ f === 'square'
+ ) {
+ x = Math.round(args[0] + args[2] / 2);
+ y = Math.round(args[1] + args[3] / 2);
+ } else if (f === 'triangle') {
+ x = (args[0] + args[2] + args[4]) / 3;
+ y = (args[1] + args[3] + args[5]) / 3;
+ } else if (f === 'quadrilateral') {
+ x = (args[0] + args[2] + args[4] + args[6]) / 4;
+ y = (args[1] + args[3] + args[5] + args[7]) / 4;
+ } else if (f === 'line') {
+ x = (args[0] + args[2]) / 2;
+ y = (args[1] + args[3]) / 2;
+ } else {
+ x = args[0];
+ y = args[1];
+ }
+ return [x, y];
}
- return [x, y];
-}
-//gets position of shape in the canvas
-p5.prototype._getPos = function (x, y) {
- const untransformedPosition = new DOMPointReadOnly(x, y);
- const currentTransform = this._renderer.isP3D ?
- new DOMMatrix(this._renderer.uMVMatrix.mat4) :
- this.drawingContext.getTransform();
- const { x: transformedX, y: transformedY } = untransformedPosition
- .matrixTransform(currentTransform);
- const canvasWidth = this.width * this._pixelDensity;
- const canvasHeight = this.height * this._pixelDensity;
- if (transformedX < 0.4 * canvasWidth) {
- if (transformedY < 0.4 * canvasHeight) {
- return 'top left';
- } else if (transformedY > 0.6 * canvasHeight) {
- return 'bottom left';
+ //gets position of shape in the canvas
+ fn._getPos = function (x, y) {
+ const { x: transformedX, y: transformedY } =
+ this.worldToScreen(new p5.Vector(x, y));
+ const canvasWidth = this.width;
+ const canvasHeight = this.height;
+ if (transformedX < 0.4 * canvasWidth) {
+ if (transformedY < 0.4 * canvasHeight) {
+ return 'top left';
+ } else if (transformedY > 0.6 * canvasHeight) {
+ return 'bottom left';
+ } else {
+ return 'mid left';
+ }
+ } else if (transformedX > 0.6 * canvasWidth) {
+ if (transformedY < 0.4 * canvasHeight) {
+ return 'top right';
+ } else if (transformedY > 0.6 * canvasHeight) {
+ return 'bottom right';
+ } else {
+ return 'mid right';
+ }
} else {
- return 'mid left';
+ if (transformedY < 0.4 * canvasHeight) {
+ return 'top middle';
+ } else if (transformedY > 0.6 * canvasHeight) {
+ return 'bottom middle';
+ } else {
+ return 'middle';
+ }
}
- } else if (transformedX > 0.6 * canvasWidth) {
- if (transformedY < 0.4 * canvasHeight) {
- return 'top right';
- } else if (transformedY > 0.6 * canvasHeight) {
- return 'bottom right';
- } else {
- return 'mid right';
+ };
+
+ //locates shape in a 10*10 grid
+ function _canvasLocator(args, canvasWidth, canvasHeight) {
+ const noRows = 10;
+ const noCols = 10;
+ let locX = Math.floor(args[0] / canvasWidth * noRows);
+ let locY = Math.floor(args[1] / canvasHeight * noCols);
+ if (locX === noRows) {
+ locX = locX - 1;
}
- } else {
- if (transformedY < 0.4 * canvasHeight) {
- return 'top middle';
- } else if (transformedY > 0.6 * canvasHeight) {
- return 'bottom middle';
- } else {
- return 'middle';
+ if (locY === noCols) {
+ locY = locY - 1;
}
+ return {
+ locX,
+ locY
+ };
}
-};
-//locates shape in a 10*10 grid
-function _canvasLocator(args, canvasWidth, canvasHeight) {
- const noRows = 10;
- const noCols = 10;
- let locX = Math.floor(args[0] / canvasWidth * noRows);
- let locY = Math.floor(args[1] / canvasHeight * noCols);
- if (locX === noRows) {
- locX = locX - 1;
- }
- if (locY === noCols) {
- locY = locY - 1;
- }
- return {
- locX,
- locY
+ //calculates area of shape
+ fn._getArea = function (objectType, shapeArgs) {
+ let objectArea = 0;
+ if (objectType === 'arc') {
+ // area of full ellipse = PI * horizontal radius * vertical radius.
+ // therefore, area of arc = difference bet. arc's start and end radians * horizontal radius * vertical radius.
+ // the below expression is adjusted for negative values and differences in arc's start and end radians over PI*2
+ const arcSizeInRadians =
+ ((shapeArgs[5] - shapeArgs[4]) % (Math.PI * 2) + Math.PI * 2) %
+ (Math.PI * 2);
+ objectArea = arcSizeInRadians * shapeArgs[2] * shapeArgs[3] / 8;
+ if (shapeArgs[6] === 'open' || shapeArgs[6] === 'chord') {
+ // when the arc's mode is OPEN or CHORD, we need to account for the area of the triangle that is formed to close the arc
+ // (Ax( By − Cy) + Bx(Cy − Ay) + Cx(Ay − By ) )/2
+ const Ax = shapeArgs[0];
+ const Ay = shapeArgs[1];
+ const Bx =
+ shapeArgs[0] + shapeArgs[2] / 2 * Math.cos(shapeArgs[4]).toFixed(2);
+ const By =
+ shapeArgs[1] + shapeArgs[3] / 2 * Math.sin(shapeArgs[4]).toFixed(2);
+ const Cx =
+ shapeArgs[0] + shapeArgs[2] / 2 * Math.cos(shapeArgs[5]).toFixed(2);
+ const Cy =
+ shapeArgs[1] + shapeArgs[3] / 2 * Math.sin(shapeArgs[5]).toFixed(2);
+ const areaOfExtraTriangle =
+ Math.abs(Ax * (By - Cy) + Bx * (Cy - Ay) + Cx * (Ay - By)) / 2;
+ if (arcSizeInRadians > Math.PI) {
+ objectArea = objectArea + areaOfExtraTriangle;
+ } else {
+ objectArea = objectArea - areaOfExtraTriangle;
+ }
+ }
+ } else if (objectType === 'ellipse' || objectType === 'circle') {
+ objectArea = 3.14 * shapeArgs[2] / 2 * shapeArgs[3] / 2;
+ } else if (objectType === 'line') {
+ objectArea = 0;
+ } else if (objectType === 'point') {
+ objectArea = 0;
+ } else if (objectType === 'quadrilateral') {
+ // ((x4+x1)*(y4-y1)+(x1+x2)*(y1-y2)+(x2+x3)*(y2-y3)+(x3+x4)*(y3-y4))/2
+ objectArea =
+ Math.abs(
+ (shapeArgs[6] + shapeArgs[0]) * (shapeArgs[7] - shapeArgs[1]) +
+ (shapeArgs[0] + shapeArgs[2]) * (shapeArgs[1] - shapeArgs[3]) +
+ (shapeArgs[2] + shapeArgs[4]) * (shapeArgs[3] - shapeArgs[5]) +
+ (shapeArgs[4] + shapeArgs[6]) * (shapeArgs[5] - shapeArgs[7])
+ ) / 2;
+ } else if (objectType === 'rectangle' || objectType === 'square') {
+ objectArea = shapeArgs[2] * shapeArgs[3];
+ } else if (objectType === 'triangle') {
+ objectArea =
+ Math.abs(
+ shapeArgs[0] * (shapeArgs[3] - shapeArgs[5]) +
+ shapeArgs[2] * (shapeArgs[5] - shapeArgs[1]) +
+ shapeArgs[4] * (shapeArgs[1] - shapeArgs[3])
+ ) / 2;
+ // (Ax( By − Cy) + Bx(Cy − Ay) + Cx(Ay − By ))/2
+ }
+ // Store the positions of the canvas corners
+ const canvasWidth = this.width * this._renderer._pixelDensity;
+ const canvasHeight = this.height * this._renderer._pixelDensity;
+ const canvasCorners = [
+ new DOMPoint(0, 0),
+ new DOMPoint(canvasWidth, 0),
+ new DOMPoint(canvasWidth, canvasHeight),
+ new DOMPoint(0, canvasHeight)
+ ];
+ // Apply the inverse of the current transformations to the canvas corners
+ const currentTransform = this._renderer.isP3D ?
+ new DOMMatrix(this._renderer.uMVMatrix.mat4) :
+ this.drawingContext.getTransform();
+ const invertedTransform = currentTransform.inverse();
+ const tc = canvasCorners.map(
+ corner => corner.matrixTransform(invertedTransform)
+ );
+ /* Use same shoelace formula used for quad area (above) to calculate
+ the area of the canvas with inverted transformation applied */
+ const transformedCanvasArea = Math.abs(
+ (tc[3].x + tc[0].x) * (tc[3].y - tc[0].y) +
+ (tc[0].x + tc[1].x) * (tc[0].y - tc[1].y) +
+ (tc[1].x + tc[2].x) * (tc[1].y - tc[2].y)+
+ (tc[2].x + tc[3].x) * (tc[2].y - tc[3].y)
+ ) / 2;
+ /* Compare area of shape (minus transformations) to area of canvas
+ with inverted transformation applied.
+ Return percentage */
+ const untransformedArea = Math.round(
+ objectArea * 100 / (transformedCanvasArea)
+ );
+ return untransformedArea;
};
}
-//calculates area of shape
-p5.prototype._getArea = function (objectType, shapeArgs) {
- let objectArea = 0;
- if (objectType === 'arc') {
- // area of full ellipse = PI * horizontal radius * vertical radius.
- // therefore, area of arc = difference bet. arc's start and end radians * horizontal radius * vertical radius.
- // the below expression is adjusted for negative values and differences in arc's start and end radians over PI*2
- const arcSizeInRadians =
- ((shapeArgs[5] - shapeArgs[4]) % (Math.PI * 2) + Math.PI * 2) %
- (Math.PI * 2);
- objectArea = arcSizeInRadians * shapeArgs[2] * shapeArgs[3] / 8;
- if (shapeArgs[6] === 'open' || shapeArgs[6] === 'chord') {
- // when the arc's mode is OPEN or CHORD, we need to account for the area of the triangle that is formed to close the arc
- // (Ax( By − Cy) + Bx(Cy − Ay) + Cx(Ay − By ) )/2
- const Ax = shapeArgs[0];
- const Ay = shapeArgs[1];
- const Bx =
- shapeArgs[0] + shapeArgs[2] / 2 * Math.cos(shapeArgs[4]).toFixed(2);
- const By =
- shapeArgs[1] + shapeArgs[3] / 2 * Math.sin(shapeArgs[4]).toFixed(2);
- const Cx =
- shapeArgs[0] + shapeArgs[2] / 2 * Math.cos(shapeArgs[5]).toFixed(2);
- const Cy =
- shapeArgs[1] + shapeArgs[3] / 2 * Math.sin(shapeArgs[5]).toFixed(2);
- const areaOfExtraTriangle =
- Math.abs(Ax * (By - Cy) + Bx * (Cy - Ay) + Cx * (Ay - By)) / 2;
- if (arcSizeInRadians > Math.PI) {
- objectArea = objectArea + areaOfExtraTriangle;
- } else {
- objectArea = objectArea - areaOfExtraTriangle;
- }
- }
- } else if (objectType === 'ellipse' || objectType === 'circle') {
- objectArea = 3.14 * shapeArgs[2] / 2 * shapeArgs[3] / 2;
- } else if (objectType === 'line') {
- objectArea = 0;
- } else if (objectType === 'point') {
- objectArea = 0;
- } else if (objectType === 'quadrilateral') {
- // ((x4+x1)*(y4-y1)+(x1+x2)*(y1-y2)+(x2+x3)*(y2-y3)+(x3+x4)*(y3-y4))/2
- objectArea =
- Math.abs(
- (shapeArgs[6] + shapeArgs[0]) * (shapeArgs[7] - shapeArgs[1]) +
- (shapeArgs[0] + shapeArgs[2]) * (shapeArgs[1] - shapeArgs[3]) +
- (shapeArgs[2] + shapeArgs[4]) * (shapeArgs[3] - shapeArgs[5]) +
- (shapeArgs[4] + shapeArgs[6]) * (shapeArgs[5] - shapeArgs[7])
- ) / 2;
- } else if (objectType === 'rectangle' || objectType === 'square') {
- objectArea = shapeArgs[2] * shapeArgs[3];
- } else if (objectType === 'triangle') {
- objectArea =
- Math.abs(
- shapeArgs[0] * (shapeArgs[3] - shapeArgs[5]) +
- shapeArgs[2] * (shapeArgs[5] - shapeArgs[1]) +
- shapeArgs[4] * (shapeArgs[1] - shapeArgs[3])
- ) / 2;
- // (Ax( By − Cy) + Bx(Cy − Ay) + Cx(Ay − By ))/2
- }
- // Store the positions of the canvas corners
- const canvasWidth = this.width * this._pixelDensity;
- const canvasHeight = this.height * this._pixelDensity;
- const canvasCorners = [
- new DOMPoint(0, 0),
- new DOMPoint(canvasWidth, 0),
- new DOMPoint(canvasWidth, canvasHeight),
- new DOMPoint(0, canvasHeight)
- ];
- // Apply the inverse of the current transformations to the canvas corners
- const currentTransform = this._renderer.isP3D ?
- new DOMMatrix(this._renderer.uMVMatrix.mat4) :
- this.drawingContext.getTransform();
- const invertedTransform = currentTransform.inverse();
- const tc = canvasCorners.map(
- corner => corner.matrixTransform(invertedTransform)
- );
- /* Use same shoelace formula used for quad area (above) to calculate
- the area of the canvas with inverted transformation applied */
- const transformedCanvasArea = Math.abs(
- (tc[3].x + tc[0].x) * (tc[3].y - tc[0].y) +
- (tc[0].x + tc[1].x) * (tc[0].y - tc[1].y) +
- (tc[1].x + tc[2].x) * (tc[1].y - tc[2].y)+
- (tc[2].x + tc[3].x) * (tc[2].y - tc[3].y)
- ) / 2;
- /* Compare area of shape (minus transformations) to area of canvas
- with inverted transformation applied.
- Return percentage */
- const untransformedArea = Math.round(
- objectArea * 100 / (transformedCanvasArea)
- );
- return untransformedArea;
-};
+export default outputs;
-export default p5;
+if(typeof p5 !== 'undefined'){
+ outputs(p5, p5.prototype);
+}
diff --git a/src/accessibility/textOutput.js b/src/accessibility/textOutput.js
index 5e37fd5781..59c55401e7 100644
--- a/src/accessibility/textOutput.js
+++ b/src/accessibility/textOutput.js
@@ -4,118 +4,123 @@
* @for p5
* @requires core
*/
-import p5 from '../core/main';
-//the functions in this file support updating the text output
+function textOutput(p5, fn){
+ //the functions in this file support updating the text output
-//updates textOutput
-p5.prototype._updateTextOutput = function(idT) {
- //if html structure is not there yet
- if (!this.dummyDOM.querySelector(`#${idT}_summary`)) {
- return;
- }
- let current = this._accessibleOutputs[idT];
- //create shape list
- let innerList = _shapeList(idT, this.ingredients.shapes);
- //create output summary
- let innerSummary = _textSummary(
- innerList.numShapes,
- this.ingredients.colors.background,
- this.width,
- this.height
- );
- //create shape details
- let innerShapeDetails = _shapeDetails(idT, this.ingredients.shapes);
- //if it is different from current summary
- if (innerSummary !== current.summary.innerHTML) {
- //update
- current.summary.innerHTML = innerSummary;
- }
- //if it is different from current shape list
- if (innerList.listShapes !== current.list.innerHTML) {
- //update
- current.list.innerHTML = innerList.listShapes;
- }
- //if it is different from current shape details
- if (innerShapeDetails !== current.shapeDetails.innerHTML) {
- //update
- current.shapeDetails.innerHTML = innerShapeDetails;
- }
- this._accessibleOutputs[idT] = current;
-};
+ //updates textOutput
+ fn._updateTextOutput = function(idT) {
+ //if html structure is not there yet
+ if (!this.dummyDOM.querySelector(`#${idT}_summary`)) {
+ return;
+ }
+ let current = this._accessibleOutputs[idT];
+ //create shape list
+ let innerList = _shapeList(idT, this.ingredients.shapes);
+ //create output summary
+ let innerSummary = _textSummary(
+ innerList.numShapes,
+ this.ingredients.colors.background,
+ this.width,
+ this.height
+ );
+ //create shape details
+ let innerShapeDetails = _shapeDetails(idT, this.ingredients.shapes);
+ //if it is different from current summary
+ if (innerSummary !== current.summary.innerHTML) {
+ //update
+ current.summary.innerHTML = innerSummary;
+ }
+ //if it is different from current shape list
+ if (innerList.listShapes !== current.list.innerHTML) {
+ //update
+ current.list.innerHTML = innerList.listShapes;
+ }
+ //if it is different from current shape details
+ if (innerShapeDetails !== current.shapeDetails.innerHTML) {
+ //update
+ current.shapeDetails.innerHTML = innerShapeDetails;
+ }
+ this._accessibleOutputs[idT] = current;
+ };
-//Builds textOutput summary
-function _textSummary(numShapes, background, width, height) {
- let text = `Your output is a, ${width} by ${height} pixels, ${background} canvas containing the following`;
- if (numShapes === 1) {
- text = `${text} shape:`;
- } else {
- text = `${text} ${numShapes} shapes:`;
+ //Builds textOutput summary
+ function _textSummary(numShapes, background, width, height) {
+ let text = `Your output is a, ${width} by ${height} pixels, ${background} canvas containing the following`;
+ if (numShapes === 1) {
+ text = `${text} shape:`;
+ } else {
+ text = `${text} ${numShapes} shapes:`;
+ }
+ return text;
}
- return text;
-}
-//Builds textOutput table with shape details
-function _shapeDetails(idT, ingredients) {
- let shapeDetails = '';
- let shapeNumber = 0;
- //goes trhough every shape type in ingredients
- for (let x in ingredients) {
- //and for every shape
- for (let y in ingredients[x]) {
- //it creates a table row
- let row = `${
- ingredients[x][y].color
- } ${x} `;
- if (x === 'line') {
- row =
- row +
- `location = ${ingredients[x][y].pos} length = ${
- ingredients[x][y].length
- } pixels `;
- } else {
- row = row + `location = ${ingredients[x][y].pos} `;
- if (x !== 'point') {
- row = row + ` area = ${ingredients[x][y].area}% `;
+ //Builds textOutput table with shape details
+ function _shapeDetails(idT, ingredients) {
+ let shapeDetails = '';
+ let shapeNumber = 0;
+ //goes trhough every shape type in ingredients
+ for (let x in ingredients) {
+ //and for every shape
+ for (let y in ingredients[x]) {
+ //it creates a table row
+ let row = `${
+ ingredients[x][y].color
+ } ${x} `;
+ if (x === 'line') {
+ row =
+ row +
+ `location = ${ingredients[x][y].pos} length = ${
+ ingredients[x][y].length
+ } pixels `;
+ } else {
+ row = row + `location = ${ingredients[x][y].pos} `;
+ if (x !== 'point') {
+ row = row + ` area = ${ingredients[x][y].area}% `;
+ }
+ row = row + '';
}
- row = row + '';
+ shapeDetails = shapeDetails + row;
+ shapeNumber++;
}
- shapeDetails = shapeDetails + row;
- shapeNumber++;
}
+ return shapeDetails;
}
- return shapeDetails;
-}
-//Builds textOutput shape list
-function _shapeList(idT, ingredients) {
- let shapeList = '';
- let shapeNumber = 0;
- //goes trhough every shape type in ingredients
- for (let x in ingredients) {
- for (let y in ingredients[x]) {
- //it creates a line in a list
- let _line = `${
- ingredients[x][y].color
- } ${x}`;
- if (x === 'line') {
- _line =
- _line +
- `, ${ingredients[x][y].pos}, ${
- ingredients[x][y].length
- } pixels long. `;
- } else {
- _line = _line + `, at ${ingredients[x][y].pos}`;
- if (x !== 'point') {
- _line = _line + `, covering ${ingredients[x][y].area}% of the canvas`;
+ //Builds textOutput shape list
+ function _shapeList(idT, ingredients) {
+ let shapeList = '';
+ let shapeNumber = 0;
+ //goes trhough every shape type in ingredients
+ for (let x in ingredients) {
+ for (let y in ingredients[x]) {
+ //it creates a line in a list
+ let _line = `${
+ ingredients[x][y].color
+ } ${x}`;
+ if (x === 'line') {
+ _line =
+ _line +
+ `, ${ingredients[x][y].pos}, ${
+ ingredients[x][y].length
+ } pixels long. `;
+ } else {
+ _line = _line + `, at ${ingredients[x][y].pos}`;
+ if (x !== 'point') {
+ _line = _line + `, covering ${ingredients[x][y].area}% of the canvas`;
+ }
+ _line = _line + '.
';
}
- _line = _line + '.';
+ shapeList = shapeList + _line;
+ shapeNumber++;
}
- shapeList = shapeList + _line;
- shapeNumber++;
}
+ return { numShapes: shapeNumber, listShapes: shapeList };
}
- return { numShapes: shapeNumber, listShapes: shapeList };
}
-export default p5;
+export default textOutput;
+
+if(typeof p5 !== 'undefined'){
+ textOutput(p5, p5.prototype);
+}
diff --git a/src/app.js b/src/app.js
index 672acc6142..ce3d1fcd4a 100644
--- a/src/app.js
+++ b/src/app.js
@@ -1,106 +1,61 @@
// core
import p5 from './core/main';
-import './core/constants';
-import './core/environment';
-import './core/friendly_errors/stacktrace';
-import './core/friendly_errors/validate_params';
-import './core/friendly_errors/file_errors';
-import './core/friendly_errors/fes_core';
-import './core/friendly_errors/sketch_reader';
-import './core/helpers';
-import './core/legacy';
-import './core/preload';
-import './core/p5.Element';
-import './core/p5.Graphics';
-import './core/p5.Renderer';
-import './core/p5.Renderer2D';
-import './core/rendering';
-import './core/shim';
-import './core/structure';
-import './core/transform';
-import './core/shape/2d_primitives';
-import './core/shape/attributes';
-import './core/shape/curves';
-import './core/shape/vertex';
+
+// shape
+import shape from './shape';
+shape(p5);
+
//accessibility
-import './accessibility/outputs';
-import './accessibility/textOutput';
-import './accessibility/gridOutput';
-import './accessibility/color_namer';
+import accessibility from './accessibility';
+accessibility(p5);
+
// color
-import './color/color_conversion';
-import './color/creating_reading';
-import './color/p5.Color';
-import './color/setting';
+import color from './color';
+color(p5);
+
+// core
+// currently, it only contains the test for parameter validation
+import friendlyErrors from './core/friendly_errors';
+friendlyErrors(p5);
// data
-import './data/p5.TypedDict';
-import './data/local_storage.js';
+import data from './data';
+data(p5);
// DOM
-import './dom/dom';
-
-// accessibility
-import './accessibility/describe';
+import dom from './dom';
+dom(p5);
// events
-import './events/acceleration';
-import './events/keyboard';
-import './events/mouse';
-import './events/touch';
+import events from './events';
+events(p5);
// image
-import './image/filters';
-import './image/image';
-import './image/loading_displaying';
-import './image/p5.Image';
-import './image/pixels';
+import image from './image';
+image(p5);
// io
-import './io/files';
-import './io/p5.Table';
-import './io/p5.TableRow';
-import './io/p5.XML';
+import io from './io';
+io(p5);
// math
-import './math/calculation';
-import './math/math';
-import './math/noise';
-import './math/p5.Vector';
-import './math/random';
-import './math/trigonometry';
-
-// typography
-import './typography/attributes';
-import './typography/loading_displaying';
-import './typography/p5.Font';
+import math from './math';
+math(p5);
// utilities
-import './utilities/array_functions';
-import './utilities/conversion';
-import './utilities/string_functions';
-import './utilities/time_date';
+import utilities from './utilities';
+utilities(p5);
// webgl
-import './webgl/3d_primitives';
-import './webgl/interaction';
-import './webgl/light';
-import './webgl/loading';
-import './webgl/material';
-import './webgl/p5.Camera';
-import './webgl/p5.DataArray';
-import './webgl/p5.Geometry';
-import './webgl/p5.Matrix';
-import './webgl/p5.Quat';
-import './webgl/p5.RendererGL.Immediate';
-import './webgl/p5.RendererGL';
-import './webgl/p5.RendererGL.Retained';
-import './webgl/p5.Framebuffer';
-import './webgl/p5.Shader';
-import './webgl/p5.RenderBuffer';
-import './webgl/p5.Texture';
-import './webgl/text';
-
-import './core/init';
-
-module.exports = p5;
+import webgl from './webgl';
+webgl(p5);
+
+// typography
+import type from './type';
+type(p5);
+
+import { waitForDocumentReady, waitingForTranslator, _globalInit } from './core/init';
+Promise.all([waitForDocumentReady(), waitingForTranslator]).then(_globalInit);
+
+export default p5;
+
diff --git a/src/color/color_spaces/hsb.js b/src/color/color_spaces/hsb.js
new file mode 100644
index 0000000000..2b3ece6619
--- /dev/null
+++ b/src/color/color_spaces/hsb.js
@@ -0,0 +1,142 @@
+import { ColorSpace, sRGB } from 'colorjs.io/fn';
+
+export default new ColorSpace({
+ id: 'hsb',
+ name: 'HSB',
+ coords: {
+ h: {
+ refRange: [0, 360],
+ type: 'angle',
+ name: 'Hue'
+ },
+ s: {
+ range: [0, 100],
+ name: 'Saturation'
+ },
+ b: {
+ range: [0, 100],
+ name: 'Brightness'
+ }
+ },
+
+ base: sRGB,
+
+ fromBase: rgb => {
+ const val = Math.max(...rgb);
+ const chroma = val - Math.min(...rgb);
+
+ let [red, green, blue] = rgb;
+
+ let hue, sat;
+ if (chroma === 0) {
+ // Return early if grayscale.
+ hue = 0;
+ sat = 0;
+ } else {
+ sat = chroma / val;
+ if (red === val) {
+ // Magenta to yellow.
+ hue = (green - blue) / chroma;
+ } else if (green === val) {
+ // Yellow to cyan.
+ hue = 2 + (blue - red) / chroma;
+ } else if (blue === val) {
+ // Cyan to magenta.
+ hue = 4 + (red - green) / chroma;
+ }
+ if (hue < 0) {
+ // Confine hue to the interval [0, 1).
+ hue += 6;
+ } else if (hue >= 6) {
+ hue -= 6;
+ }
+ }
+
+ return [hue / 6 * 360, sat * 100, val * 100];
+ },
+ toBase,
+
+ formats: {
+ default: {
+ type: 'custom',
+ serialize: (coords, alpha) => {
+ const rgb = toBase(coords);
+ let ret = `rgb(${
+ Math.round(rgb[0] * 100 * 100) / 100
+ }% ${
+ Math.round(rgb[1] * 100 * 100) / 100
+ }% ${
+ Math.round(rgb[2] * 100 * 100) / 100
+ }%`;
+
+ if (alpha < 1) {
+ ret += ` / ${alpha}`;
+ }
+
+ ret += ')';
+
+ return ret;
+ }
+ },
+ 'hsb': {
+ coords: [' | ', '', '']
+ },
+ 'hsba': {
+ coords: [' | ', '', ''],
+ commans: true,
+ lastAlpha: true
+ }
+ }
+});
+
+function toBase(hsb){
+ const hue = hsb[0] / 360 * 6; // We will split hue into 6 sectors.
+ const sat = hsb[1] / 100;
+ const val = hsb[2] / 100;
+
+ let RGB = [];
+
+ if (sat === 0) {
+ RGB = [val, val, val]; // Return early if grayscale.
+ } else {
+ const sector = Math.floor(hue);
+ const tint1 = val * (1 - sat);
+ const tint2 = val * (1 - sat * (hue - sector));
+ const tint3 = val * (1 - sat * (1 + sector - hue));
+ let red, green, blue;
+ if (sector === 1) {
+ // Yellow to green.
+ red = tint2;
+ green = val;
+ blue = tint1;
+ } else if (sector === 2) {
+ // Green to cyan.
+ red = tint1;
+ green = val;
+ blue = tint3;
+ } else if (sector === 3) {
+ // Cyan to blue.
+ red = tint1;
+ green = tint2;
+ blue = val;
+ } else if (sector === 4) {
+ // Blue to magenta.
+ red = tint3;
+ green = tint1;
+ blue = val;
+ } else if (sector === 5) {
+ // Magenta to red.
+ red = val;
+ green = tint1;
+ blue = tint2;
+ } else {
+ // Red to yellow (sector could be 0 or 6).
+ red = val;
+ green = tint3;
+ blue = tint1;
+ }
+ RGB = [red, green, blue];
+ }
+
+ return RGB;
+}
diff --git a/src/color/creating_reading.js b/src/color/creating_reading.js
index d918f09845..3a03100b1a 100644
--- a/src/color/creating_reading.js
+++ b/src/color/creating_reading.js
@@ -6,1587 +6,1657 @@
* @requires constants
*/
-import p5 from '../core/main';
-import * as constants from '../core/constants';
-import './p5.Color';
-import '../core/friendly_errors/validate_params';
-import '../core/friendly_errors/file_errors';
-import '../core/friendly_errors/fes_core';
+import { Color } from './p5.Color';
/**
- * Gets the alpha (transparency) value of a color.
- *
- * `alpha()` extracts the alpha value from a
- * p5.Color object, an array of color components, or
- * a CSS color string.
- *
- * @method alpha
- * @param {p5.Color|Number[]|String} color p5.Color object, array of
- * color components, or CSS color string.
- * @return {Number} the alpha value.
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object.
- * let c = color(0, 126, 255, 102);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'alphaValue' to 102.
- * let alphaValue = alpha(c);
- *
- * // Draw the right rectangle.
- * fill(alphaValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light blue and the right one is charcoal gray.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a color array.
- * let c = [0, 126, 255, 102];
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'alphaValue' to 102.
- * let alphaValue = alpha(c);
- *
- * // Draw the left rectangle.
- * fill(alphaValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light blue and the right one is charcoal gray.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a CSS color string.
- * let c = 'rgba(0, 126, 255, 0.4)';
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'alphaValue' to 102.
- * let alphaValue = alpha(c);
- *
- * // Draw the right rectangle.
- * fill(alphaValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light blue and the right one is charcoal gray.');
- * }
- *
- *
+ * @typedef {'rgb'} RGB
+ * @property {RGB} RGB
+ * @final
*/
-p5.prototype.alpha = function(c) {
- p5._validateParameters('alpha', arguments);
- return this.color(c)._getAlpha();
-};
-
+export const RGB = 'rgb';
/**
- * Gets the blue value of a color.
- *
- * `blue()` extracts the blue value from a
- * p5.Color object, an array of color components, or
- * a CSS color string.
- *
- * By default, `blue()` returns a color's blue value in the range 0
- * to 255. If the colorMode() is set to RGB, it
- * returns the blue value in the given range.
- *
- * @method blue
- * @param {p5.Color|Number[]|String} color p5.Color object, array of
- * color components, or CSS color string.
- * @return {Number} the blue value.
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object using RGB values.
- * let c = color(175, 100, 220);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'blueValue' to 220.
- * let blueValue = blue(c);
- *
- * // Draw the right rectangle.
- * fill(0, 0, blueValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light purple and the right one is royal blue.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a color array.
- * let c = [175, 100, 220];
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'blueValue' to 220.
- * let blueValue = blue(c);
- *
- * // Draw the right rectangle.
- * fill(0, 0, blueValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light purple and the right one is royal blue.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a CSS color string.
- * let c = 'rgb(175, 100, 220)';
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'blueValue' to 220.
- * let blueValue = blue(c);
- *
- * // Draw the right rectangle.
- * fill(0, 0, blueValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light purple and the right one is royal blue.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use RGB color with values in the range 0-100.
- * colorMode(RGB, 100);
- *
- * // Create a p5.Color object using RGB values.
- * let c = color(69, 39, 86);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'blueValue' to 86.
- * let blueValue = blue(c);
- *
- * // Draw the right rectangle.
- * fill(0, 0, blueValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light purple and the right one is royal blue.');
- * }
- *
- *
+ * @typedef {'rgbhdr'} RGBHDR
+ * @property {RGBHDR} RGBHDR
+ * @final
*/
-p5.prototype.blue = function(c) {
- p5._validateParameters('blue', arguments);
- return this.color(c)._getBlue();
-};
-
+export const RGBHDR = 'rgbhdr';
/**
- * Gets the brightness value of a color.
- *
- * `brightness()` extracts the HSB brightness value from a
- * p5.Color object, an array of color components, or
- * a CSS color string.
- *
- * By default, `brightness()` returns a color's HSB brightness in the range 0
- * to 100. If the colorMode() is set to HSB, it
- * returns the brightness value in the given range.
- *
- * @method brightness
- * @param {p5.Color|Number[]|String} color p5.Color object, array of
- * color components, or CSS color string.
- * @return {Number} the brightness value.
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use HSB color.
- * colorMode(HSB);
- *
- * // Create a p5.Color object.
- * let c = color(0, 50, 100);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'brightValue' to 100.
- * let brightValue = brightness(c);
- *
- * // Draw the right rectangle.
- * fill(brightValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is salmon pink and the right one is white.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use HSB color.
- * colorMode(HSB);
+ * HSB (hue, saturation, brightness) is a type of color model.
+ * You can learn more about it at
+ * HSB.
*
- * // Create a color array.
- * let c = [0, 50, 100];
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'brightValue' to 100.
- * let brightValue = brightness(c);
- *
- * // Draw the right rectangle.
- * fill(brightValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is salmon pink and the right one is white.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use HSB color.
- * colorMode(HSB);
- *
- * // Create a CSS color string.
- * let c = 'rgb(255, 128, 128)';
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'brightValue' to 100.
- * let brightValue = brightness(c);
- *
- * // Draw the right rectangle.
- * fill(brightValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is salmon pink and the right one is white.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use HSB color with values in the range 0-255.
- * colorMode(HSB, 255);
- *
- * // Create a p5.Color object.
- * let c = color(0, 127, 255);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'brightValue' to 255.
- * let brightValue = brightness(c);
- *
- * // Draw the right rectangle.
- * fill(brightValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is salmon pink and the right one is white.');
- * }
- *
- *
+ * @typedef {'hsb'} HSB
+ * @property {HSB} HSB
+ * @final
*/
-p5.prototype.brightness = function(c) {
- p5._validateParameters('brightness', arguments);
- return this.color(c)._getBrightness();
-};
-
+export const HSB = 'hsb';
/**
- * Creates a p5.Color object.
- *
- * By default, the parameters are interpreted as RGB values. Calling
- * `color(255, 204, 0)` will return a bright yellow color. The way these
- * parameters are interpreted may be changed with the
- * colorMode() function.
- *
- * The version of `color()` with one parameter interprets the value one of two
- * ways. If the parameter is a number, it's interpreted as a grayscale value.
- * If the parameter is a string, it's interpreted as a CSS color string.
- *
- * The version of `color()` with two parameters interprets the first one as a
- * grayscale value. The second parameter sets the alpha (transparency) value.
- *
- * The version of `color()` with three parameters interprets them as RGB, HSB,
- * or HSL colors, depending on the current `colorMode()`.
- *
- * The version of `color()` 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 color
- * @param {Number} gray number specifying value between white and black.
- * @param {Number} [alpha] alpha value relative to current color range
- * (default is 0-255).
- * @return {p5.Color} resulting color.
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object using RGB values.
- * let c = color(255, 204, 0);
- *
- * // Draw the square.
- * fill(c);
- * noStroke();
- * square(30, 20, 55);
- *
- * describe('A yellow square on a gray canvas.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object using RGB values.
- * let c1 = color(255, 204, 0);
- *
- * // Draw the left circle.
- * fill(c1);
- * noStroke();
- * circle(25, 25, 80);
- *
- * // Create a p5.Color object using a grayscale value.
- * let c2 = color(65);
- *
- * // Draw the right circle.
- * fill(c2);
- * circle(75, 75, 80);
- *
- * describe(
- * 'Two circles on a gray canvas. The circle in the top-left corner is yellow and the one at the bottom-right is gray.'
- * );
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object using a named color.
- * let c = color('magenta');
- *
- * // Draw the square.
- * fill(c);
- * noStroke();
- * square(20, 20, 60);
- *
- * describe('A magenta square on a gray canvas.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object using a hex color code.
- * let c1 = color('#0f0');
- *
- * // Draw the left rectangle.
- * fill(c1);
- * noStroke();
- * rect(0, 10, 45, 80);
- *
- * // Create a p5.Color object using a hex color code.
- * let c2 = color('#00ff00');
- *
- * // Draw the right rectangle.
- * fill(c2);
- * rect(55, 10, 45, 80);
- *
- * describe('Two bright green rectangles on a gray canvas.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object using a RGB color string.
- * let c1 = color('rgb(0, 0, 255)');
- *
- * // Draw the top-left square.
- * fill(c1);
- * square(10, 10, 35);
- *
- * // Create a p5.Color object using a RGB color string.
- * let c2 = color('rgb(0%, 0%, 100%)');
- *
- * // Draw the top-right square.
- * fill(c2);
- * square(55, 10, 35);
- *
- * // Create a p5.Color object using a RGBA color string.
- * let c3 = color('rgba(0, 0, 255, 1)');
- *
- * // Draw the bottom-left square.
- * fill(c3);
- * square(10, 55, 35);
- *
- * // Create a p5.Color object using a RGBA color string.
- * let c4 = color('rgba(0%, 0%, 100%, 1)');
- *
- * // Draw the bottom-right square.
- * fill(c4);
- * square(55, 55, 35);
- *
- * describe('Four blue squares in the corners of a gray canvas.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object using a HSL color string.
- * let c1 = color('hsl(160, 100%, 50%)');
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c1);
- * rect(0, 10, 45, 80);
- *
- * // Create a p5.Color object using a HSLA color string.
- * let c2 = color('hsla(160, 100%, 50%, 0.5)');
- *
- * // Draw the right rectangle.
- * fill(c2);
- * rect(55, 10, 45, 80);
- *
- * describe('Two sea green rectangles. A darker rectangle on the left and a brighter one on the right.');
- * }
- *
- *
- *
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object using a HSB color string.
- * let c1 = color('hsb(160, 100%, 50%)');
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c1);
- * rect(0, 10, 45, 80);
- *
- * // Create a p5.Color object using a HSBA color string.
- * let c2 = color('hsba(160, 100%, 50%, 0.5)');
- *
- * // Draw the right rectangle.
- * fill(c2);
- * rect(55, 10, 45, 80);
- *
- * describe('Two green rectangles. A darker rectangle on the left and a brighter one on the right.');
- * }
- *
- *
- *
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object using RGB values.
- * let c1 = color(50, 55, 100);
- *
- * // Draw the left rectangle.
- * fill(c1);
- * rect(0, 10, 45, 80);
- *
- * // Switch the color mode to HSB.
- * colorMode(HSB, 100);
- *
- * // Create a p5.Color object using HSB values.
- * let c2 = color(50, 55, 100);
- *
- * // Draw the right rectangle.
- * fill(c2);
- * rect(55, 10, 45, 80);
- *
- * describe('Two blue rectangles. A darker rectangle on the left and a brighter one on the right.');
- * }
- *
- *
+ * @typedef {'hsl'} HSL
+ * @property {HSL} HSL
+ * @final
*/
-
+export const HSL = 'hsl';
/**
- * @method color
- * @param {Number} v1 red or hue value relative to
- * the current color range.
- * @param {Number} v2 green or saturation value
- * relative to the current color range.
- * @param {Number} v3 blue or brightness value
- * relative to the current color range.
- * @param {Number} [alpha]
- * @return {p5.Color}
+ * @typedef {'hwb'} HWB
+ * @property {HWB} HWB
+ * @final
*/
-
+export const HWB = 'hwb';
/**
- * @method color
- * @param {String} value a color string.
- * @return {p5.Color}
+ * @typedef {'lab'} LAB
+ * @property {LAB} LAB
+ * @final
*/
-
+export const LAB = 'lab';
/**
- * @method color
- * @param {Number[]} values an array containing the red, green, blue,
- * and alpha components of the color.
- * @return {p5.Color}
+ * @typedef {'lch'} LCH
+ * @property {LCH} LCH
+ * @final
*/
-
+export const LCH = 'lch';
/**
- * @method color
- * @param {p5.Color} color
- * @return {p5.Color}
+ * @typedef {'oklab'} OKLAB
+ * @property {OKLAB} OKLAB
+ * @final
*/
-p5.prototype.color = function(...args) {
- p5._validateParameters('color', args);
- if (args[0] instanceof p5.Color) {
- return args[0]; // Do nothing if argument is already a color object.
- }
-
- const arg = Array.isArray(args[0]) ? args[0] : args;
- return new p5.Color(this, arg);
-};
-
+export const OKLAB = 'oklab';
/**
- * Gets the green value of a color.
- *
- * `green()` extracts the green value from a
- * p5.Color object, an array of color components, or
- * a CSS color string.
- *
- * By default, `green()` returns a color's green value in the range 0
- * to 255. If the colorMode() is set to RGB, it
- * returns the green value in the given range.
- *
- * @method green
- * @param {p5.Color|Number[]|String} color p5.Color object, array of
- * color components, or CSS color string.
- * @return {Number} the green value.
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object.
- * let c = color(175, 100, 220);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'greenValue' to 100.
- * let greenValue = green(c);
- *
- * // Draw the right rectangle.
- * fill(0, greenValue, 0);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light purple and the right one is dark green.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a color array.
- * let c = [175, 100, 220];
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'greenValue' to 100.
- * let greenValue = green(c);
- *
- * // Draw the right rectangle.
- * fill(0, greenValue, 0);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light purple and the right one is dark green.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a CSS color string.
- * let c = 'rgb(175, 100, 220)';
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'greenValue' to 100.
- * let greenValue = green(c);
- *
- * // Draw the right rectangle.
- * fill(0, greenValue, 0);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light purple and the right one is dark green.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use RGB color with values in the range 0-100.
- * colorMode(RGB, 100);
- *
- * // Create a p5.Color object using RGB values.
- * let c = color(69, 39, 86);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'greenValue' to 39.
- * let greenValue = green(c);
- *
- * // Draw the right rectangle.
- * fill(0, greenValue, 0);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light purple and the right one is dark green.');
- * }
- *
- *
+ * @typedef {'oklch'} OKLCH
+ * @property {OKLCH} OKLCH
+ * @final
*/
-p5.prototype.green = function(c) {
- p5._validateParameters('green', arguments);
- return this.color(c)._getGreen();
-};
-
+export const OKLCH = 'oklch';
/**
- * Gets the hue value of a color.
- *
- * `hue()` extracts the hue value from a
- * p5.Color object, an array of color components, or
- * a CSS color string.
- *
- * Hue describes a color's position on the color wheel. By default, `hue()`
- * returns a color's HSL hue in the range 0 to 360. If the
- * colorMode() is set to HSB or HSL, it returns the hue
- * value in the given mode.
- *
- * @method hue
- * @param {p5.Color|Number[]|String} color p5.Color object, array of
- * color components, or CSS color string.
- * @return {Number} the hue value.
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use HSL color.
- * colorMode(HSL);
- *
- * // Create a p5.Color object.
- * let c = color(0, 50, 100);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 20, 35, 60);
- *
- * // Set 'hueValue' to 0.
- * let hueValue = hue(c);
- *
- * // Draw the right rectangle.
- * fill(hueValue);
- * rect(50, 20, 35, 60);
- *
- * describe(
- * 'Two rectangles. The rectangle on the left is salmon pink and the one on the right is black.'
- * );
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use HSL color.
- * colorMode(HSL);
- *
- * // Create a color array.
- * let c = [0, 50, 100];
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 20, 35, 60);
- *
- * // Set 'hueValue' to 0.
- * let hueValue = hue(c);
- *
- * // Draw the right rectangle.
- * fill(hueValue);
- * rect(50, 20, 35, 60);
- *
- * describe(
- * 'Two rectangles. The rectangle on the left is salmon pink and the one on the right is black.'
- * );
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use HSL color.
- * colorMode(HSL);
- *
- * // Create a CSS color string.
- * let c = 'rgb(255, 128, 128)';
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 20, 35, 60);
- *
- * // Set 'hueValue' to 0.
- * let hueValue = hue(c);
- *
- * // Draw the right rectangle.
- * fill(hueValue);
- * rect(50, 20, 35, 60);
- *
- * describe(
- * 'Two rectangles. The rectangle on the left is salmon pink and the one on the right is black.'
- * );
- * }
- *
- *
+ * @typedef {'rgba'} RGBA
+ * @property {RGBA} RGBA
+ * @final
*/
-p5.prototype.hue = function(c) {
- p5._validateParameters('hue', arguments);
- return this.color(c)._getHue();
-};
+export const RGBA = 'rgba';
-/**
- * Blends two colors to find a third color between them.
- *
- * The `amt` parameter specifies the amount to interpolate between the two
- * values. 0 is equal to the first color, 0.1 is very near the first color,
- * 0.5 is halfway between the two colors, and so on. Negative numbers are set
- * to 0. Numbers greater than 1 are set to 1. This differs from the behavior of
- * lerp. It's necessary because numbers outside of the
- * interval [0, 1] will produce strange and unexpected colors.
- *
- * The way that colors are interpolated depends on the current
- * colorMode().
- *
- * @method lerpColor
- * @param {p5.Color} c1 interpolate from this color (any value created by the color() function).
- * @param {p5.Color} c2 interpolate to this color (any value created by the color() function).
- * @param {Number} amt number between 0 and 1.
- * @return {p5.Color} interpolated color.
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create p5.Color objects to interpolate between.
- * let from = color(218, 165, 32);
- * let to = color(72, 61, 139);
- *
- * // Create intermediate colors.
- * let interA = lerpColor(from, to, 0.33);
- * let interB = lerpColor(from, to, 0.66);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(from);
- * rect(10, 20, 20, 60);
- *
- * // Draw the left-center rectangle.
- * fill(interA);
- * rect(30, 20, 20, 60);
- *
- * // Draw the right-center rectangle.
- * fill(interB);
- * rect(50, 20, 20, 60);
- *
- * // Draw the right rectangle.
- * fill(to);
- * rect(70, 20, 20, 60);
- *
- * describe(
- * 'Four rectangles. From left to right, the rectangles are tan, brown, brownish purple, and purple.'
- * );
- * }
- *
- *
- */
-p5.prototype.lerpColor = function(c1, c2, amt) {
- p5._validateParameters('lerpColor', arguments);
+function creatingReading(p5, fn){
+ fn.RGB = RGB;
+ fn.RGBHDR = RGBHDR;
+ fn.HSB = HSB;
+ fn.HSL = HSL;
+ fn.HWB = HWB;
- if (!(c1 instanceof p5.Color)) {
- c1 = color(c1);
- }
- if (!(c2 instanceof p5.Color)) {
- c2 = color(c2);
- }
+ fn.LAB = LAB;
+ fn.LCH = LCH;
- const mode = this._colorMode;
- const maxes = this._colorMaxes;
- let l0, l1, l2, l3;
- let fromArray, toArray;
+ fn.OKLAB = OKLAB;
+ fn.OKLCH = OKLCH;
- if (mode === constants.RGB) {
- fromArray = c1.levels.map(level => level / 255);
- toArray = c2.levels.map(level => level / 255);
- } else if (mode === constants.HSB) {
- c1._getBrightness(); // Cache hsba so it definitely exists.
- c2._getBrightness();
- fromArray = c1.hsba;
- toArray = c2.hsba;
- } else if (mode === constants.HSL) {
- c1._getLightness(); // Cache hsla so it definitely exists.
- c2._getLightness();
- fromArray = c1.hsla;
- toArray = c2.hsla;
- } else {
- throw new Error(`${mode} cannot be used for interpolation.`);
- }
+ fn.RGBA = RGBA;
- // Prevent extrapolation.
- amt = Math.max(Math.min(amt, 1), 0);
+ // Add color states to renderer state machine
+ p5.Renderer.states.colorMode = RGB;
+ p5.Renderer.states.colorMaxes = {
+ [RGB]: [255, 255, 255, 255],
+ [RGBHDR]: [255, 255, 255, 255],
+ [HSB]: [360, 100, 100, 1],
+ [HSL]: [360, 100, 100, 1],
+ [HWB]: [360, 100, 100, 1],
- // Define lerp here itself if user isn't using math module.
- // Maintains the definition as found in math/calculation.js
- if (typeof this.lerp === 'undefined') {
- this.lerp = (start, stop, amt) => amt * (stop - start) + start;
- }
+ [LAB]: [100, [-125, 125], [-125, 125], 1],
+ [LCH]: [100, 150, 360, 1],
- // Perform interpolation.
- if (mode === constants.RGB) {
- l0 = this.lerp(fromArray[0], toArray[0], amt);
- }
- // l0 (hue) has to wrap around (and it's between 0 and 1)
- else {
- // find shortest path in the color wheel
- if (Math.abs(fromArray[0] - toArray[0]) > 0.5) {
- if (fromArray[0] > toArray[0]) {
- toArray[0] += 1;
- } else {
- fromArray[0] += 1;
+ [OKLAB]: [100, [-125, 125], [-125, 125], 1],
+ [OKLCH]: [100, 150, 360, 1],
+ clone: function(){
+ const cloned = { ...this };
+ for (const key in cloned) {
+ if (cloned[key] instanceof Array) {
+ cloned[key] = [...cloned[key]];
+ }
}
+ return cloned;
}
- l0 = this.lerp(fromArray[0], toArray[0], amt);
- if (l0 >= 1) { l0 -= 1; }
- }
- l1 = this.lerp(fromArray[1], toArray[1], amt);
- l2 = this.lerp(fromArray[2], toArray[2], amt);
- l3 = this.lerp(fromArray[3], toArray[3], amt);
+ };
- // Scale components.
- l0 *= maxes[mode][0];
- l1 *= maxes[mode][1];
- l2 *= maxes[mode][2];
- l3 *= maxes[mode][3];
+ /**
+ * Creates a p5.Color object.
+ *
+ * By default, the parameters are interpreted as RGB values. Calling
+ * `color(255, 204, 0)` will return a bright yellow color. The way these
+ * parameters are interpreted may be changed with the
+ * colorMode() function.
+ *
+ * The version of `color()` with one parameter interprets the value one of two
+ * ways. If the parameter is a number, it's interpreted as a grayscale value.
+ * If the parameter is a string, it's interpreted as a CSS color string.
+ *
+ * The version of `color()` with two parameters interprets the first one as a
+ * grayscale value. The second parameter sets the alpha (transparency) value.
+ *
+ * The version of `color()` with three parameters interprets them as RGB, HSB,
+ * or HSL colors, depending on the current `colorMode()`.
+ *
+ * The version of `color()` 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 color
+ * @param {Number} gray number specifying value between white and black.
+ * @param {Number} [alpha] alpha value relative to current color range
+ * (default is 0-255).
+ * @return {p5.Color} resulting color.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object using RGB values.
+ * let c = color(255, 204, 0);
+ *
+ * // Draw the square.
+ * fill(c);
+ * noStroke();
+ * square(30, 20, 55);
+ *
+ * describe('A yellow square on a gray canvas.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object using RGB values.
+ * let c1 = color(255, 204, 0);
+ *
+ * // Draw the left circle.
+ * fill(c1);
+ * noStroke();
+ * circle(25, 25, 80);
+ *
+ * // Create a p5.Color object using a grayscale value.
+ * let c2 = color(65);
+ *
+ * // Draw the right circle.
+ * fill(c2);
+ * circle(75, 75, 80);
+ *
+ * describe(
+ * 'Two circles on a gray canvas. The circle in the top-left corner is yellow and the one at the bottom-right is gray.'
+ * );
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object using a named color.
+ * let c = color('magenta');
+ *
+ * // Draw the square.
+ * fill(c);
+ * noStroke();
+ * square(20, 20, 60);
+ *
+ * describe('A magenta square on a gray canvas.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object using a hex color code.
+ * let c1 = color('#0f0');
+ *
+ * // Draw the left rectangle.
+ * fill(c1);
+ * noStroke();
+ * rect(0, 10, 45, 80);
+ *
+ * // Create a p5.Color object using a hex color code.
+ * let c2 = color('#00ff00');
+ *
+ * // Draw the right rectangle.
+ * fill(c2);
+ * rect(55, 10, 45, 80);
+ *
+ * describe('Two bright green rectangles on a gray canvas.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object using a RGB color string.
+ * let c1 = color('rgb(0, 0, 255)');
+ *
+ * // Draw the top-left square.
+ * fill(c1);
+ * square(10, 10, 35);
+ *
+ * // Create a p5.Color object using a RGB color string.
+ * let c2 = color('rgb(0%, 0%, 100%)');
+ *
+ * // Draw the top-right square.
+ * fill(c2);
+ * square(55, 10, 35);
+ *
+ * // Create a p5.Color object using a RGBA color string.
+ * let c3 = color('rgba(0, 0, 255, 1)');
+ *
+ * // Draw the bottom-left square.
+ * fill(c3);
+ * square(10, 55, 35);
+ *
+ * // Create a p5.Color object using a RGBA color string.
+ * let c4 = color('rgba(0%, 0%, 100%, 1)');
+ *
+ * // Draw the bottom-right square.
+ * fill(c4);
+ * square(55, 55, 35);
+ *
+ * describe('Four blue squares in the corners of a gray canvas.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object using a HSL color string.
+ * let c1 = color('hsl(160, 100%, 50%)');
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c1);
+ * rect(0, 10, 45, 80);
+ *
+ * // Create a p5.Color object using a HSLA color string.
+ * let c2 = color('hsla(160, 100%, 50%, 0.5)');
+ *
+ * // Draw the right rectangle.
+ * fill(c2);
+ * rect(55, 10, 45, 80);
+ *
+ * describe('Two sea green rectangles. A darker rectangle on the left and a brighter one on the right.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object using a HSB color string.
+ * let c1 = color('hsb(160, 100%, 50%)');
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c1);
+ * rect(0, 10, 45, 80);
+ *
+ * // Create a p5.Color object using a HSBA color string.
+ * let c2 = color('hsba(160, 100%, 50%, 0.5)');
+ *
+ * // Draw the right rectangle.
+ * fill(c2);
+ * rect(55, 10, 45, 80);
+ *
+ * describe('Two green rectangles. A darker rectangle on the left and a brighter one on the right.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object using RGB values.
+ * let c1 = color(50, 55, 100);
+ *
+ * // Draw the left rectangle.
+ * fill(c1);
+ * rect(0, 10, 45, 80);
+ *
+ * // Switch the color mode to HSB.
+ * colorMode(HSB, 100);
+ *
+ * // Create a p5.Color object using HSB values.
+ * let c2 = color(50, 55, 100);
+ *
+ * // Draw the right rectangle.
+ * fill(c2);
+ * rect(55, 10, 45, 80);
+ *
+ * describe('Two blue rectangles. A darker rectangle on the left and a brighter one on the right.');
+ * }
+ *
+ *
+ */
- return this.color(l0, l1, l2, l3);
-};
+ /**
+ * @method color
+ * @param {Number} v1 red or hue value relative to
+ * the current color range.
+ * @param {Number} v2 green or saturation value
+ * relative to the current color range.
+ * @param {Number} v3 blue or brightness value
+ * relative to the current color range.
+ * @param {Number} [alpha]
+ * @return {p5.Color}
+ */
-/**
- * Blends multiple colors to find a color between them.
- *
- * The `amt` parameter specifies the amount to interpolate between the color
- * stops which are colors at each `amt` value "location" with `amt` values
- * that are between 2 color stops interpolating between them based on its relative
- * distance to both.
- *
- * The way that colors are interpolated depends on the current
- * colorMode().
- *
- * @method paletteLerp
- * @param {[p5.Color, Number][]} colors_stops color stops to interpolate from
- * @param {Number} amt number to use to interpolate relative to color stops
- * @return {p5.Color} interpolated color.
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(400, 400);
- * }
- *
- * function draw() {
- * // The background goes from white to red to green to blue fill
- * background(paletteLerp([
- * ['white', 0],
- * ['red', 0.05],
- * ['green', 0.25],
- * ['blue', 1]
- * ], millis() / 10000 % 1));
- * }
- *
- *
- */
-p5.prototype.paletteLerp = function(color_stops, amt) {
- const first_color_stop = color_stops[0];
- if (amt < first_color_stop[1])
- return this.color(first_color_stop[0]);
+ /**
+ * @method color
+ * @param {String} value a color string.
+ * @return {p5.Color}
+ */
+
+ /**
+ * @method color
+ * @param {Number[]} values an array containing the red, green, blue,
+ * and alpha components of the color.
+ * @return {p5.Color}
+ */
- for (let i = 1; i < color_stops.length; i++) {
- const color_stop = color_stops[i];
- if (amt < color_stop[1]) {
- const prev_color_stop = color_stops[i - 1];
- return this.lerpColor(
- this.color(prev_color_stop[0]),
- this.color(color_stop[0]),
- (amt - prev_color_stop[1]) / (color_stop[1] - prev_color_stop[1])
- );
+ /**
+ * @method color
+ * @param {p5.Color} color
+ * @return {p5.Color}
+ */
+ fn.color = function(...args) {
+ // p5._validateParameters('color', args);
+ if (args[0] instanceof Color) {
+ // TODO: perhaps change color mode to match instance mode?
+ return args[0]; // Do nothing if argument is already a color object.
}
- }
- return this.color(color_stops[color_stops.length - 1][0]);
-};
+ const arg = Array.isArray(args[0]) ? args[0] : args;
+ return new Color(
+ arg,
+ this._renderer.states.colorMode,
+ this._renderer.states.colorMaxes[this._renderer.states.colorMode],
+ { clamp: true }
+ );
+ };
-/**
- * Gets the lightness value of a color.
- *
- * `lightness()` extracts the HSL lightness value from a
- * p5.Color object, an array of color components, or
- * a CSS color string.
- *
- * By default, `lightness()` returns a color's HSL lightness in the range 0
- * to 100. If the colorMode() is set to HSL, it
- * returns the lightness value in the given range.
- *
- * @method lightness
- * @param {p5.Color|Number[]|String} color p5.Color object, array of
- * color components, or CSS color string.
- * @return {Number} the lightness value.
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Use HSL color.
- * colorMode(HSL);
- *
- * // Create a p5.Color object using HSL values.
- * let c = color(0, 100, 75);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'lightValue' to 75.
- * let lightValue = lightness(c);
- *
- * // Draw the right rectangle.
- * fill(lightValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is salmon pink and the right one is gray.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Use HSL color.
- * colorMode(HSL);
- *
- * // Create a color array.
- * let c = [0, 100, 75];
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'lightValue' to 75.
- * let lightValue = lightness(c);
- *
- * // Draw the right rectangle.
- * fill(lightValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is salmon pink and the right one is gray.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Use HSL color.
- * colorMode(HSL);
- *
- * // Create a CSS color string.
- * let c = 'rgb(255, 128, 128)';
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'lightValue' to 75.
- * let lightValue = lightness(c);
- *
- * // Draw the right rectangle.
- * fill(lightValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is salmon pink and the right one is gray.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Use HSL color with values in the range 0-255.
- * colorMode(HSL, 255);
- *
- * // Create a p5.Color object using HSL values.
- * let c = color(0, 255, 191.5);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'lightValue' to 191.5.
- * let lightValue = lightness(c);
- *
- * // Draw the right rectangle.
- * fill(lightValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is salmon pink and the right one is gray.');
- * }
- *
- *
- */
-p5.prototype.lightness = function(c) {
- p5._validateParameters('lightness', arguments);
- return this.color(c)._getLightness();
-};
+ /**
+ * Gets the red value of a color.
+ *
+ * `red()` extracts the red value from a
+ * p5.Color object, an array of color components, or
+ * a CSS color string.
+ *
+ * By default, `red()` returns a color's red value in the range 0
+ * to 255. If the colorMode() is set to RGB, it
+ * returns the red value in the given range.
+ *
+ * @method red
+ * @param {p5.Color|Number[]|String} color p5.Color object, array of
+ * color components, or CSS color string.
+ * @return {Number} the red value.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object.
+ * let c = color(175, 100, 220);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'redValue' to 175.
+ * let redValue = red(c);
+ *
+ * // Draw the right rectangle.
+ * fill(redValue, 0, 0);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light purple and the right one is red.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a color array.
+ * let c = [175, 100, 220];
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'redValue' to 175.
+ * let redValue = red(c);
+ *
+ * // Draw the right rectangle.
+ * fill(redValue, 0, 0);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light purple and the right one is red.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a CSS color string.
+ * let c = 'rgb(175, 100, 220)';
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'redValue' to 175.
+ * let redValue = red(c);
+ *
+ * // Draw the right rectangle.
+ * fill(redValue, 0, 0);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light purple and the right one is red.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use RGB color with values in the range 0-100.
+ * colorMode(RGB, 100);
+ *
+ * // Create a p5.Color object.
+ * let c = color(69, 39, 86);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'redValue' to 69.
+ * let redValue = red(c);
+ *
+ * // Draw the right rectangle.
+ * fill(redValue, 0, 0);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light purple and the right one is red.');
+ * }
+ *
+ *
+ */
+ fn.red = function(c) {
+ // p5._validateParameters('red', arguments);
+ // Get current red max
+ return this.color(c)._getRed();
+ };
-/**
- * Gets the red value of a color.
- *
- * `red()` extracts the red value from a
- * p5.Color object, an array of color components, or
- * a CSS color string.
- *
- * By default, `red()` returns a color's red value in the range 0
- * to 255. If the colorMode() is set to RGB, it
- * returns the red value in the given range.
- *
- * @method red
- * @param {p5.Color|Number[]|String} color p5.Color object, array of
- * color components, or CSS color string.
- * @return {Number} the red value.
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object.
- * let c = color(175, 100, 220);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'redValue' to 175.
- * let redValue = red(c);
- *
- * // Draw the right rectangle.
- * fill(redValue, 0, 0);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light purple and the right one is red.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a color array.
- * let c = [175, 100, 220];
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'redValue' to 175.
- * let redValue = red(c);
- *
- * // Draw the right rectangle.
- * fill(redValue, 0, 0);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light purple and the right one is red.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a CSS color string.
- * let c = 'rgb(175, 100, 220)';
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'redValue' to 175.
- * let redValue = red(c);
- *
- * // Draw the right rectangle.
- * fill(redValue, 0, 0);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light purple and the right one is red.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use RGB color with values in the range 0-100.
- * colorMode(RGB, 100);
- *
- * // Create a p5.Color object.
- * let c = color(69, 39, 86);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'redValue' to 69.
- * let redValue = red(c);
- *
- * // Draw the right rectangle.
- * fill(redValue, 0, 0);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is light purple and the right one is red.');
- * }
- *
- *
- */
-p5.prototype.red = function(c) {
- p5._validateParameters('red', arguments);
- return this.color(c)._getRed();
-};
+ /**
+ * Gets the green value of a color.
+ *
+ * `green()` extracts the green value from a
+ * p5.Color object, an array of color components, or
+ * a CSS color string.
+ *
+ * By default, `green()` returns a color's green value in the range 0
+ * to 255. If the colorMode() is set to RGB, it
+ * returns the green value in the given range.
+ *
+ * @method green
+ * @param {p5.Color|Number[]|String} color p5.Color object, array of
+ * color components, or CSS color string.
+ * @return {Number} the green value.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object.
+ * let c = color(175, 100, 220);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'greenValue' to 100.
+ * let greenValue = green(c);
+ *
+ * // Draw the right rectangle.
+ * fill(0, greenValue, 0);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light purple and the right one is dark green.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a color array.
+ * let c = [175, 100, 220];
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'greenValue' to 100.
+ * let greenValue = green(c);
+ *
+ * // Draw the right rectangle.
+ * fill(0, greenValue, 0);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light purple and the right one is dark green.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a CSS color string.
+ * let c = 'rgb(175, 100, 220)';
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'greenValue' to 100.
+ * let greenValue = green(c);
+ *
+ * // Draw the right rectangle.
+ * fill(0, greenValue, 0);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light purple and the right one is dark green.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use RGB color with values in the range 0-100.
+ * colorMode(RGB, 100);
+ *
+ * // Create a p5.Color object using RGB values.
+ * let c = color(69, 39, 86);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'greenValue' to 39.
+ * let greenValue = green(c);
+ *
+ * // Draw the right rectangle.
+ * fill(0, greenValue, 0);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light purple and the right one is dark green.');
+ * }
+ *
+ *
+ */
+ fn.green = function(c) {
+ // p5._validateParameters('green', arguments);
+ // Get current green max
+ return this.color(c)._getGreen();
+ };
-/**
- * Gets the saturation value of a color.
- *
- * `saturation()` extracts the saturation value from a
- * p5.Color object, an array of color components, or
- * a CSS color string.
- *
- * Saturation is scaled differently in HSB and HSL. By default, `saturation()`
- * returns a color's HSL saturation in the range 0 to 100. If the
- * colorMode() is set to HSB or HSL, it returns the
- * saturation value in the given mode.
- *
- * @method saturation
- * @param {p5.Color|Number[]|String} color p5.Color object, array of
- * color components, or CSS color string.
- * @return {Number} the saturation value
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Use HSB color.
- * colorMode(HSB);
- *
- * // Create a p5.Color object.
- * let c = color(0, 50, 100);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'satValue' to 50.
- * let satValue = saturation(c);
- *
- * // Draw the right rectangle.
- * fill(satValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is salmon pink and the right one is dark gray.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Use HSB color.
- * colorMode(HSB);
- *
- * // Create a color array.
- * let c = [0, 50, 100];
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'satValue' to 100.
- * let satValue = saturation(c);
- *
- * // Draw the right rectangle.
- * fill(satValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is salmon pink and the right one is gray.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Use HSB color.
- * colorMode(HSB);
- *
- * // Create a CSS color string.
- * let c = 'rgb(255, 128, 128)';
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'satValue' to 100.
- * let satValue = saturation(c);
- *
- * // Draw the right rectangle.
- * fill(satValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is salmon pink and the right one is gray.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Use HSL color.
- * colorMode(HSL);
- *
- * // Create a p5.Color object.
- * let c = color(0, 100, 75);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'satValue' to 100.
- * let satValue = saturation(c);
- *
- * // Draw the right rectangle.
- * fill(satValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is salmon pink and the right one is white.');
- * }
- *
- *
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Use HSL color with values in the range 0-255.
- * colorMode(HSL, 255);
- *
- * // Create a p5.Color object.
- * let c = color(0, 255, 191.5);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(c);
- * rect(15, 15, 35, 70);
- *
- * // Set 'satValue' to 255.
- * let satValue = saturation(c);
- *
- * // Draw the right rectangle.
- * fill(satValue);
- * rect(50, 15, 35, 70);
- *
- * describe('Two rectangles. The left one is salmon pink and the right one is white.');
- * }
- *
- *
- */
-p5.prototype.saturation = function(c) {
- p5._validateParameters('saturation', arguments);
- return this.color(c)._getSaturation();
-};
+ /**
+ * Gets the blue value of a color.
+ *
+ * `blue()` extracts the blue value from a
+ * p5.Color object, an array of color components, or
+ * a CSS color string.
+ *
+ * By default, `blue()` returns a color's blue value in the range 0
+ * to 255. If the colorMode() is set to RGB, it
+ * returns the blue value in the given range.
+ *
+ * @method blue
+ * @param {p5.Color|Number[]|String} color p5.Color object, array of
+ * color components, or CSS color string.
+ * @return {Number} the blue value.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object using RGB values.
+ * let c = color(175, 100, 220);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'blueValue' to 220.
+ * let blueValue = blue(c);
+ *
+ * // Draw the right rectangle.
+ * fill(0, 0, blueValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light purple and the right one is royal blue.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a color array.
+ * let c = [175, 100, 220];
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'blueValue' to 220.
+ * let blueValue = blue(c);
+ *
+ * // Draw the right rectangle.
+ * fill(0, 0, blueValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light purple and the right one is royal blue.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a CSS color string.
+ * let c = 'rgb(175, 100, 220)';
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'blueValue' to 220.
+ * let blueValue = blue(c);
+ *
+ * // Draw the right rectangle.
+ * fill(0, 0, blueValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light purple and the right one is royal blue.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use RGB color with values in the range 0-100.
+ * colorMode(RGB, 100);
+ *
+ * // Create a p5.Color object using RGB values.
+ * let c = color(69, 39, 86);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'blueValue' to 86.
+ * let blueValue = blue(c);
+ *
+ * // Draw the right rectangle.
+ * fill(0, 0, blueValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light purple and the right one is royal blue.');
+ * }
+ *
+ *
+ */
+ fn.blue = function(c) {
+ // p5._validateParameters('blue', arguments);
+ // Get current blue max
+ return this.color(c)._getBlue();
+ };
+
+ /**
+ * Gets the alpha (transparency) value of a color.
+ *
+ * `alpha()` extracts the alpha value from a
+ * p5.Color object, an array of color components, or
+ * a CSS color string.
+ *
+ * @method alpha
+ * @param {p5.Color|Number[]|String} color p5.Color object, array of
+ * color components, or CSS color string.
+ * @return {Number} the alpha value.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object.
+ * let c = color(0, 126, 255, 102);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'alphaValue' to 102.
+ * let alphaValue = alpha(c);
+ *
+ * // Draw the right rectangle.
+ * fill(alphaValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light blue and the right one is charcoal gray.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a color array.
+ * let c = [0, 126, 255, 102];
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'alphaValue' to 102.
+ * let alphaValue = alpha(c);
+ *
+ * // Draw the left rectangle.
+ * fill(alphaValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light blue and the right one is charcoal gray.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a CSS color string.
+ * let c = 'rgba(0, 126, 255, 0.4)';
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'alphaValue' to 102.
+ * let alphaValue = alpha(c);
+ *
+ * // Draw the right rectangle.
+ * fill(alphaValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is light blue and the right one is charcoal gray.');
+ * }
+ *
+ *
+ */
+ fn.alpha = function(c) {
+ // p5._validateParameters('alpha', arguments);
+ // Get current alpha max
+ return this.color(c)._getAlpha();
+ };
+
+ /**
+ * Gets the hue value of a color.
+ *
+ * `hue()` extracts the hue value from a
+ * p5.Color object, an array of color components, or
+ * a CSS color string.
+ *
+ * Hue describes a color's position on the color wheel. By default, `hue()`
+ * returns a color's HSL hue in the range 0 to 360. If the
+ * colorMode() is set to HSB or HSL, it returns the hue
+ * value in the given mode.
+ *
+ * @method hue
+ * @param {p5.Color|Number[]|String} color p5.Color object, array of
+ * color components, or CSS color string.
+ * @return {Number} the hue value.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use HSL color.
+ * colorMode(HSL);
+ *
+ * // Create a p5.Color object.
+ * let c = color(0, 50, 100);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 20, 35, 60);
+ *
+ * // Set 'hueValue' to 0.
+ * let hueValue = hue(c);
+ *
+ * // Draw the right rectangle.
+ * fill(hueValue);
+ * rect(50, 20, 35, 60);
+ *
+ * describe(
+ * 'Two rectangles. The rectangle on the left is salmon pink and the one on the right is black.'
+ * );
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use HSL color.
+ * colorMode(HSL);
+ *
+ * // Create a color array.
+ * let c = [0, 50, 100];
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 20, 35, 60);
+ *
+ * // Set 'hueValue' to 0.
+ * let hueValue = hue(c);
+ *
+ * // Draw the right rectangle.
+ * fill(hueValue);
+ * rect(50, 20, 35, 60);
+ *
+ * describe(
+ * 'Two rectangles. The rectangle on the left is salmon pink and the one on the right is black.'
+ * );
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use HSL color.
+ * colorMode(HSL);
+ *
+ * // Create a CSS color string.
+ * let c = 'rgb(255, 128, 128)';
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 20, 35, 60);
+ *
+ * // Set 'hueValue' to 0.
+ * let hueValue = hue(c);
+ *
+ * // Draw the right rectangle.
+ * fill(hueValue);
+ * rect(50, 20, 35, 60);
+ *
+ * describe(
+ * 'Two rectangles. The rectangle on the left is salmon pink and the one on the right is black.'
+ * );
+ * }
+ *
+ *
+ */
+ fn.hue = function(c) {
+ let colorMode = HSL;
+ let i = 0;
+
+ if(
+ this._renderer.states.colorMode === HSB ||
+ this._renderer.states.colorMode === HSL
+ ){
+ colorMode = this._renderer.states.colorMode;
+ }else if(
+ this._renderer.states.colorMode === LCH ||
+ this._renderer.states.colorMode === OKLCH
+ ){
+ colorMode = this._renderer.states.colorMode;
+ i = 2;
+ }
+
+ return this.color(c)._getHue(
+ this._renderer.states.colorMaxes[colorMode][i]
+ );
+ };
+
+ /**
+ * Gets the saturation value of a color.
+ *
+ * `saturation()` extracts the saturation value from a
+ * p5.Color object, an array of color components, or
+ * a CSS color string.
+ *
+ * Saturation is scaled differently in HSB and HSL. By default, `saturation()`
+ * returns a color's HSL saturation in the range 0 to 100. If the
+ * colorMode() is set to HSB or HSL, it returns the
+ * saturation value in the given mode.
+ *
+ * @method saturation
+ * @param {p5.Color|Number[]|String} color p5.Color object, array of
+ * color components, or CSS color string.
+ * @return {Number} the saturation value
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Use HSB color.
+ * colorMode(HSB);
+ *
+ * // Create a p5.Color object.
+ * let c = color(0, 50, 100);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'satValue' to 50.
+ * let satValue = saturation(c);
+ *
+ * // Draw the right rectangle.
+ * fill(satValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is salmon pink and the right one is dark gray.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Use HSB color.
+ * colorMode(HSB);
+ *
+ * // Create a color array.
+ * let c = [0, 50, 100];
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'satValue' to 100.
+ * let satValue = saturation(c);
+ *
+ * // Draw the right rectangle.
+ * fill(satValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is salmon pink and the right one is gray.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Use HSB color.
+ * colorMode(HSB);
+ *
+ * // Create a CSS color string.
+ * let c = 'rgb(255, 128, 128)';
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'satValue' to 100.
+ * let satValue = saturation(c);
+ *
+ * // Draw the right rectangle.
+ * fill(satValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is salmon pink and the right one is gray.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Use HSL color.
+ * colorMode(HSL);
+ *
+ * // Create a p5.Color object.
+ * let c = color(0, 100, 75);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'satValue' to 100.
+ * let satValue = saturation(c);
+ *
+ * // Draw the right rectangle.
+ * fill(satValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is salmon pink and the right one is white.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Use HSL color with values in the range 0-255.
+ * colorMode(HSL, 255);
+ *
+ * // Create a p5.Color object.
+ * let c = color(0, 255, 191.5);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'satValue' to 255.
+ * let satValue = saturation(c);
+ *
+ * // Draw the right rectangle.
+ * fill(satValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is salmon pink and the right one is white.');
+ * }
+ *
+ *
+ */
+ fn.saturation = function(c) {
+ const colorMode = (this._renderer.states.colorMode === HSB) ? HSB : HSL;
+ return this.color(c)._getSaturation(
+ this._renderer.states.colorMaxes[colorMode][1]
+ );
+ };
+
+ /**
+ * Gets the brightness value of a color.
+ *
+ * `brightness()` extracts the HSB brightness value from a
+ * p5.Color object, an array of color components, or
+ * a CSS color string.
+ *
+ * By default, `brightness()` returns a color's HSB brightness in the range 0
+ * to 100. If the colorMode() is set to HSB, it
+ * returns the brightness value in the given range.
+ *
+ * @method brightness
+ * @param {p5.Color|Number[]|String} color p5.Color object, array of
+ * color components, or CSS color string.
+ * @return {Number} the brightness value.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use HSB color.
+ * colorMode(HSB);
+ *
+ * // Create a p5.Color object.
+ * let c = color(0, 50, 100);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'brightValue' to 100.
+ * let brightValue = brightness(c);
+ *
+ * // Draw the right rectangle.
+ * fill(brightValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is salmon pink and the right one is white.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use HSB color.
+ * colorMode(HSB);
+ *
+ * // Create a color array.
+ * let c = [0, 50, 100];
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'brightValue' to 100.
+ * let brightValue = brightness(c);
+ *
+ * // Draw the right rectangle.
+ * fill(brightValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is salmon pink and the right one is white.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use HSB color.
+ * colorMode(HSB);
+ *
+ * // Create a CSS color string.
+ * let c = 'rgb(255, 128, 128)';
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'brightValue' to 100.
+ * let brightValue = brightness(c);
+ *
+ * // Draw the right rectangle.
+ * fill(brightValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is salmon pink and the right one is white.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use HSB color with values in the range 0-255.
+ * colorMode(HSB, 255);
+ *
+ * // Create a p5.Color object.
+ * let c = color(0, 127, 255);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'brightValue' to 255.
+ * let brightValue = brightness(c);
+ *
+ * // Draw the right rectangle.
+ * fill(brightValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is salmon pink and the right one is white.');
+ * }
+ *
+ *
+ */
+ fn.brightness = function(c) {
+ return this.color(c)._getBrightness(
+ this._renderer.states.colorMaxes.hsb[2]
+ );
+ };
+
+ /**
+ * Gets the lightness value of a color.
+ *
+ * `lightness()` extracts the HSL lightness value from a
+ * p5.Color object, an array of color components, or
+ * a CSS color string.
+ *
+ * By default, `lightness()` returns a color's HSL lightness in the range 0
+ * to 100. If the colorMode() is set to HSL, it
+ * returns the lightness value in the given range.
+ *
+ * @method lightness
+ * @param {p5.Color|Number[]|String} color p5.Color object, array of
+ * color components, or CSS color string.
+ * @return {Number} the lightness value.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Use HSL color.
+ * colorMode(HSL);
+ *
+ * // Create a p5.Color object using HSL values.
+ * let c = color(0, 100, 75);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'lightValue' to 75.
+ * let lightValue = lightness(c);
+ *
+ * // Draw the right rectangle.
+ * fill(lightValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is salmon pink and the right one is gray.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Use HSL color.
+ * colorMode(HSL);
+ *
+ * // Create a color array.
+ * let c = [0, 100, 75];
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'lightValue' to 75.
+ * let lightValue = lightness(c);
+ *
+ * // Draw the right rectangle.
+ * fill(lightValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is salmon pink and the right one is gray.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Use HSL color.
+ * colorMode(HSL);
+ *
+ * // Create a CSS color string.
+ * let c = 'rgb(255, 128, 128)';
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'lightValue' to 75.
+ * let lightValue = lightness(c);
+ *
+ * // Draw the right rectangle.
+ * fill(lightValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is salmon pink and the right one is gray.');
+ * }
+ *
+ *
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Use HSL color with values in the range 0-255.
+ * colorMode(HSL, 255);
+ *
+ * // Create a p5.Color object using HSL values.
+ * let c = color(0, 255, 191.5);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(c);
+ * rect(15, 15, 35, 70);
+ *
+ * // Set 'lightValue' to 191.5.
+ * let lightValue = lightness(c);
+ *
+ * // Draw the right rectangle.
+ * fill(lightValue);
+ * rect(50, 15, 35, 70);
+ *
+ * describe('Two rectangles. The left one is salmon pink and the right one is gray.');
+ * }
+ *
+ *
+ */
+ fn.lightness = function(c) {
+ return this.color(c)._getLightness(
+ this._renderer.states.colorMaxes.hsl[2]
+ );
+ };
+
+ /**
+ * Blends two colors to find a third color between them.
+ *
+ * The `amt` parameter specifies the amount to interpolate between the two
+ * values. 0 is equal to the first color, 0.1 is very near the first color,
+ * 0.5 is halfway between the two colors, and so on. Negative numbers are set
+ * to 0. Numbers greater than 1 are set to 1. This differs from the behavior of
+ * lerp. It's necessary because numbers outside of the
+ * interval [0, 1] will produce strange and unexpected colors.
+ *
+ * The way that colors are interpolated depends on the current
+ * colorMode().
+ *
+ * @method lerpColor
+ * @param {p5.Color} c1 interpolate from this color.
+ * @param {p5.Color} c2 interpolate to this color.
+ * @param {Number} amt number between 0 and 1.
+ * @return {p5.Color} interpolated color.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create p5.Color objects to interpolate between.
+ * let from = color(218, 165, 32);
+ * let to = color(72, 61, 139);
+ *
+ * // Create intermediate colors.
+ * let interA = lerpColor(from, to, 0.33);
+ * let interB = lerpColor(from, to, 0.66);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(from);
+ * rect(10, 20, 20, 60);
+ *
+ * // Draw the left-center rectangle.
+ * fill(interA);
+ * rect(30, 20, 20, 60);
+ *
+ * // Draw the right-center rectangle.
+ * fill(interB);
+ * rect(50, 20, 20, 60);
+ *
+ * // Draw the right rectangle.
+ * fill(to);
+ * rect(70, 20, 20, 60);
+ *
+ * describe(
+ * 'Four rectangles. From left to right, the rectangles are tan, brown, brownish purple, and purple.'
+ * );
+ * }
+ *
+ *
+ */
+ fn.lerpColor = function(c1, c2, amt) {
+ // p5._validateParameters('lerpColor', arguments);
+ return c1.lerp(c2, amt, this._renderer.states.colorMode);
+ };
+
+ /**
+ * Blends multiple colors to find a color between them.
+ *
+ * The `amt` parameter specifies the amount to interpolate between the color
+ * stops which are colors at each `amt` value "location" with `amt` values
+ * that are between 2 color stops interpolating between them based on its relative
+ * distance to both.
+ *
+ * The way that colors are interpolated depends on the current
+ * colorMode().
+ *
+ * @method paletteLerp
+ * @param {Array<[(p5.Color|String|Number|Number[]), Number]>} colors_stops color stops to interpolate from
+ * @param {Number} amt number to use to interpolate relative to color stops
+ * @return {p5.Color} interpolated color.
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(400, 400);
+ * }
+ *
+ * function draw() {
+ * // The background goes from white to red to green to blue fill
+ * background(paletteLerp([
+ * ['white', 0],
+ * ['red', 0.05],
+ * ['green', 0.25],
+ * ['blue', 1]
+ * ], millis() / 10000 % 1));
+ * }
+ *
+ *
+ */
+ fn.paletteLerp = function(color_stops, amt) {
+ const first_color_stop = color_stops[0];
+ if (amt < first_color_stop[1])
+ return this.color(first_color_stop[0]);
+
+ for (let i = 1; i < color_stops.length; i++) {
+ const color_stop = color_stops[i];
+ if (amt < color_stop[1]) {
+ const prev_color_stop = color_stops[i - 1];
+ return this.lerpColor(
+ this.color(prev_color_stop[0]),
+ this.color(color_stop[0]),
+ (amt - prev_color_stop[1]) / (color_stop[1] - prev_color_stop[1])
+ );
+ }
+ }
+
+ return this.color(color_stops[color_stops.length - 1][0]);
+ };
+}
+
+export default creatingReading;
-export default p5;
+if(typeof p5 !== 'undefined'){
+ creatingReading(p5, p5.prototype);
+}
diff --git a/src/color/index.js b/src/color/index.js
new file mode 100644
index 0000000000..bd0fb96f58
--- /dev/null
+++ b/src/color/index.js
@@ -0,0 +1,9 @@
+import creatingReading from './creating_reading.js';
+import p5color from './p5.Color.js';
+import setting from './setting.js';
+
+export default function(p5){
+ p5.registerAddon(creatingReading);
+ p5.registerAddon(p5color);
+ p5.registerAddon(setting);
+}
diff --git a/src/color/p5.Color.culori.js b/src/color/p5.Color.culori.js
new file mode 100644
index 0000000000..12ce7e724d
--- /dev/null
+++ b/src/color/p5.Color.culori.js
@@ -0,0 +1,66 @@
+export class Color {
+ _color;
+ maxes;
+ mode;
+ array;
+
+ static addColorMode(mode, definition){
+
+ }
+
+ constructor(vals){
+
+ }
+
+ toString(){
+
+ }
+
+ setRed(new_red){
+
+ }
+
+ setGreen(new_green){
+
+ }
+
+ setBlue(new_blue){
+
+ }
+
+ setAlpha(new_alpha){
+
+ }
+
+ _getRed(){
+
+ }
+
+ _getGreen(){
+
+ }
+
+ _getBlue(){
+
+ }
+
+ _getAlpha(){
+
+ }
+
+ _getHue(){
+
+ }
+
+ _getSaturation(){
+
+ }
+
+ _getBrightness(){
+
+ }
+
+ _getLightness(){
+
+ }
+}
diff --git a/src/color/p5.Color.js b/src/color/p5.Color.js
index 5dee81c61d..888c9606d6 100644
--- a/src/color/p5.Color.js
+++ b/src/color/p5.Color.js
@@ -3,360 +3,272 @@
* @submodule Creating & Reading
* @for p5
* @requires core
- * @requires constants
* @requires color_conversion
*/
-import p5 from '../core/main';
-import * as constants from '../core/constants';
-import color_conversion from './color_conversion';
+import { RGB, RGBHDR, HSL, HSB, HWB, LAB, LCH, OKLAB, OKLCH } from './creating_reading';
-/**
- * CSS named colors.
- */
-const namedColors = {
- aliceblue: '#f0f8ff',
- antiquewhite: '#faebd7',
- aqua: '#00ffff',
- aquamarine: '#7fffd4',
- azure: '#f0ffff',
- beige: '#f5f5dc',
- bisque: '#ffe4c4',
- black: '#000000',
- blanchedalmond: '#ffebcd',
- blue: '#0000ff',
- blueviolet: '#8a2be2',
- brown: '#a52a2a',
- burlywood: '#deb887',
- cadetblue: '#5f9ea0',
- chartreuse: '#7fff00',
- chocolate: '#d2691e',
- coral: '#ff7f50',
- cornflowerblue: '#6495ed',
- cornsilk: '#fff8dc',
- crimson: '#dc143c',
- cyan: '#00ffff',
- darkblue: '#00008b',
- darkcyan: '#008b8b',
- darkgoldenrod: '#b8860b',
- darkgray: '#a9a9a9',
- darkgreen: '#006400',
- darkgrey: '#a9a9a9',
- darkkhaki: '#bdb76b',
- darkmagenta: '#8b008b',
- darkolivegreen: '#556b2f',
- darkorange: '#ff8c00',
- darkorchid: '#9932cc',
- darkred: '#8b0000',
- darksalmon: '#e9967a',
- darkseagreen: '#8fbc8f',
- darkslateblue: '#483d8b',
- darkslategray: '#2f4f4f',
- darkslategrey: '#2f4f4f',
- darkturquoise: '#00ced1',
- darkviolet: '#9400d3',
- deeppink: '#ff1493',
- deepskyblue: '#00bfff',
- dimgray: '#696969',
- dimgrey: '#696969',
- dodgerblue: '#1e90ff',
- firebrick: '#b22222',
- floralwhite: '#fffaf0',
- forestgreen: '#228b22',
- fuchsia: '#ff00ff',
- gainsboro: '#dcdcdc',
- ghostwhite: '#f8f8ff',
- gold: '#ffd700',
- goldenrod: '#daa520',
- gray: '#808080',
- green: '#008000',
- greenyellow: '#adff2f',
- grey: '#808080',
- honeydew: '#f0fff0',
- hotpink: '#ff69b4',
- indianred: '#cd5c5c',
- indigo: '#4b0082',
- ivory: '#fffff0',
- khaki: '#f0e68c',
- lavender: '#e6e6fa',
- lavenderblush: '#fff0f5',
- lawngreen: '#7cfc00',
- lemonchiffon: '#fffacd',
- lightblue: '#add8e6',
- lightcoral: '#f08080',
- lightcyan: '#e0ffff',
- lightgoldenrodyellow: '#fafad2',
- lightgray: '#d3d3d3',
- lightgreen: '#90ee90',
- lightgrey: '#d3d3d3',
- lightpink: '#ffb6c1',
- lightsalmon: '#ffa07a',
- lightseagreen: '#20b2aa',
- lightskyblue: '#87cefa',
- lightslategray: '#778899',
- lightslategrey: '#778899',
- lightsteelblue: '#b0c4de',
- lightyellow: '#ffffe0',
- lime: '#00ff00',
- limegreen: '#32cd32',
- linen: '#faf0e6',
- magenta: '#ff00ff',
- maroon: '#800000',
- mediumaquamarine: '#66cdaa',
- mediumblue: '#0000cd',
- mediumorchid: '#ba55d3',
- mediumpurple: '#9370db',
- mediumseagreen: '#3cb371',
- mediumslateblue: '#7b68ee',
- mediumspringgreen: '#00fa9a',
- mediumturquoise: '#48d1cc',
- mediumvioletred: '#c71585',
- midnightblue: '#191970',
- mintcream: '#f5fffa',
- mistyrose: '#ffe4e1',
- moccasin: '#ffe4b5',
- navajowhite: '#ffdead',
- navy: '#000080',
- oldlace: '#fdf5e6',
- olive: '#808000',
- olivedrab: '#6b8e23',
- orange: '#ffa500',
- orangered: '#ff4500',
- orchid: '#da70d6',
- palegoldenrod: '#eee8aa',
- palegreen: '#98fb98',
- paleturquoise: '#afeeee',
- palevioletred: '#db7093',
- papayawhip: '#ffefd5',
- peachpuff: '#ffdab9',
- peru: '#cd853f',
- pink: '#ffc0cb',
- plum: '#dda0dd',
- powderblue: '#b0e0e6',
- purple: '#800080',
- rebeccapurple: '#663399',
- red: '#ff0000',
- rosybrown: '#bc8f8f',
- royalblue: '#4169e1',
- saddlebrown: '#8b4513',
- salmon: '#fa8072',
- sandybrown: '#f4a460',
- seagreen: '#2e8b57',
- seashell: '#fff5ee',
- sienna: '#a0522d',
- silver: '#c0c0c0',
- skyblue: '#87ceeb',
- slateblue: '#6a5acd',
- slategray: '#708090',
- slategrey: '#708090',
- snow: '#fffafa',
- springgreen: '#00ff7f',
- steelblue: '#4682b4',
- tan: '#d2b48c',
- teal: '#008080',
- thistle: '#d8bfd8',
- tomato: '#ff6347',
- turquoise: '#40e0d0',
- violet: '#ee82ee',
- wheat: '#f5deb3',
- white: '#ffffff',
- whitesmoke: '#f5f5f5',
- yellow: '#ffff00',
- yellowgreen: '#9acd32'
-};
+import {
+ ColorSpace,
+ to,
+ toGamut,
+ serialize,
+ parse,
+ range,
-/**
- * These regular expressions are used to build up the patterns for matching
- * viable CSS color strings: fragmenting the regexes in this way increases the
- * legibility and comprehensibility of the code.
- *
- * Note that RGB values of .9 are not parsed by IE, but are supported here for
- * color string consistency.
- */
-const WHITESPACE = /\s*/; // Match zero or more whitespace characters.
-const INTEGER = /(\d{1,3})/; // Match integers: 79, 255, etc.
-const DECIMAL = /((?:\d+(?:\.\d+)?)|(?:\.\d+))/; // Match 129.6, 79, .9, etc.
-const PERCENT = new RegExp(`${DECIMAL.source}%`); // Match 12.9%, 79%, .9%, etc.
+ sRGB,
+ HSL as HSLSpace,
+ HWB as HWBSpace,
-/**
- * Full color string patterns. The capture groups are necessary.
- */
-const colorPatterns = {
- // Match colors in format #XXX, e.g. #416.
- HEX3: /^#([a-f0-9])([a-f0-9])([a-f0-9])$/i,
-
- // Match colors in format #XXXX, e.g. #5123.
- HEX4: /^#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])$/i,
-
- // Match colors in format #XXXXXX, e.g. #b4d455.
- HEX6: /^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,
-
- // Match colors in format #XXXXXXXX, e.g. #b4d45535.
- HEX8: /^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,
-
- // Match colors in format rgb(R, G, B), e.g. rgb(255, 0, 128).
- RGB: new RegExp(
- [
- '^rgb\\(',
- INTEGER.source,
- ',',
- INTEGER.source,
- ',',
- INTEGER.source,
- '\\)$'
- ].join(WHITESPACE.source),
- 'i'
- ),
-
- // Match colors in format rgb(R%, G%, B%), e.g. rgb(100%, 0%, 28.9%).
- RGB_PERCENT: new RegExp(
- [
- '^rgb\\(',
- PERCENT.source,
- ',',
- PERCENT.source,
- ',',
- PERCENT.source,
- '\\)$'
- ].join(WHITESPACE.source),
- 'i'
- ),
-
- // Match colors in format rgb(R, G, B, A), e.g. rgb(255, 0, 128, 0.25).
- RGBA: new RegExp(
- [
- '^rgba\\(',
- INTEGER.source,
- ',',
- INTEGER.source,
- ',',
- INTEGER.source,
- ',',
- DECIMAL.source,
- '\\)$'
- ].join(WHITESPACE.source),
- 'i'
- ),
-
- // Match colors in format rgb(R%, G%, B%, A), e.g. rgb(100%, 0%, 28.9%, 0.5).
- RGBA_PERCENT: new RegExp(
- [
- '^rgba\\(',
- PERCENT.source,
- ',',
- PERCENT.source,
- ',',
- PERCENT.source,
- ',',
- DECIMAL.source,
- '\\)$'
- ].join(WHITESPACE.source),
- 'i'
- ),
-
- // Match colors in format hsla(H, S%, L%), e.g. hsl(100, 40%, 28.9%).
- HSL: new RegExp(
- [
- '^hsl\\(',
- INTEGER.source,
- ',',
- PERCENT.source,
- ',',
- PERCENT.source,
- '\\)$'
- ].join(WHITESPACE.source),
- 'i'
- ),
-
- // Match colors in format hsla(H, S%, L%, A), e.g. hsla(100, 40%, 28.9%, 0.5).
- HSLA: new RegExp(
- [
- '^hsla\\(',
- INTEGER.source,
- ',',
- PERCENT.source,
- ',',
- PERCENT.source,
- ',',
- DECIMAL.source,
- '\\)$'
- ].join(WHITESPACE.source),
- 'i'
- ),
-
- // Match colors in format hsb(H, S%, B%), e.g. hsb(100, 40%, 28.9%).
- HSB: new RegExp(
- [
- '^hsb\\(',
- INTEGER.source,
- ',',
- PERCENT.source,
- ',',
- PERCENT.source,
- '\\)$'
- ].join(WHITESPACE.source),
- 'i'
- ),
-
- // Match colors in format hsba(H, S%, B%, A), e.g. hsba(100, 40%, 28.9%, 0.5).
- HSBA: new RegExp(
- [
- '^hsba\\(',
- INTEGER.source,
- ',',
- PERCENT.source,
- ',',
- PERCENT.source,
- ',',
- DECIMAL.source,
- '\\)$'
- ].join(WHITESPACE.source),
- 'i'
- )
-};
+ Lab,
+ LCH as LCHSpace,
-/**
- * A class to describe a color.
- *
- * Each `p5.Color` object stores the color mode
- * and level maxes that were active during its construction. These values are
- * used to interpret the arguments passed to the object's constructor. They
- * also determine output formatting such as when
- * saturation() is called.
- *
- * Color is stored internally as an array of ideal RGBA values in floating
- * point form, normalized from 0 to 1. These values are used to calculate the
- * closest screen colors, which are RGBA levels from 0 to 255. Screen colors
- * are sent to the renderer.
- *
- * When different color representations are calculated, the results are cached
- * for performance. These values are normalized, floating-point numbers.
- *
- * Note: color() is the recommended way to create an
- * instance of this class.
- *
- * @class p5.Color
- * @constructor
- * @param {p5} [pInst] pointer to p5 instance.
- *
- * @param {Number[]|String} vals an array containing the color values
- * for red, green, blue and alpha channel
- * or CSS color.
- */
-p5.Color = class Color {
- constructor(pInst, vals) {
- // Record color mode and maxes at time of construction.
- this._storeModeAndMaxes(pInst._colorMode, pInst._colorMaxes);
-
- // Calculate normalized RGBA values.
- if (![constants.RGB, constants.HSL, constants.HSB].includes(this.mode)) {
- throw new Error(`${this.mode} is an invalid colorMode.`);
- } else {
- this._array = Color._parseInputs.apply(this, vals);
+ OKLab,
+ OKLCH as OKLCHSpace,
+
+ P3
+} from 'colorjs.io/fn';
+import HSBSpace from './color_spaces/hsb.js';
+
+const map = (n, start1, stop1, start2, stop2, clamp) => {
+ let result = ((n - start1) / (stop1 - start1) * (stop2 - start2) + start2);
+ if (clamp) {
+ result = Math.max(result, Math.min(start2, stop2));
+ result = Math.min(result, Math.max(start2, stop2));
+ }
+ return result;
+}
+
+const serializationMap = {};
+
+class Color {
+ // Reference to underlying color object depending on implementation
+ // Not meant to be used publicly unless the implementation is known for sure
+ _color;
+ // Color mode of the Color object, uses p5 color modes
+ mode;
+
+ static colorMap = {};
+ static #colorjsMaxes = {};
+ static #grayscaleMap = {};
+
+ // Used to add additional color modes to p5.js
+ // Uses underlying library's definition
+ static addColorMode(mode, definition){
+ ColorSpace.register(definition);
+ Color.colorMap[mode] = definition.id;
+
+ // Get colorjs maxes
+ Color.#colorjsMaxes[mode] = Object.values(definition.coords)
+ .reduce((acc, v) => {
+ acc.push(v.refRange || v.range);
+ return acc;
+ }, []);
+ Color.#colorjsMaxes[mode].push([0, 1]);
+
+ // Get grayscale mapping
+ Color.#grayscaleMap[mode] = definition.fromGray;
+ }
+
+ constructor(vals, colorMode, colorMaxes, { clamp = false } = {}) {
+ // This changes with the color object
+ this.mode = colorMode || RGB;
+
+ if(vals instanceof Color){
+ // Received Color object to be used for color mode conversion
+ const mode = colorMode ?
+ Color.colorMap[colorMode] :
+ Color.colorMap[vals.mode];
+ this._color = to(vals._color, mode);
+ this.mode = mode;
+
+ }else if (typeof vals === 'object' && !Array.isArray(vals) && vals !== null){
+ // Received color.js object to be used internally
+ const mode = colorMode ?
+ Color.colorMap[colorMode] :
+ vals.spaceId;
+ this._color = to(vals, mode);
+ this.mode = colorMode || Object.entries(Color.colorMap)
+ .find(([key, val]) => {
+ return val === this._color.spaceId;
+ });
+
+ } else if(typeof vals[0] === 'string') {
+ // Received string
+ try{
+ this._color = parse(vals[0]);
+ const [mode] = Object.entries(Color.colorMap).find(([key, val]) => {
+ return val === this._color.spaceId;
+ });
+ this.mode = mode;
+ this._color = to(this._color, this._color.spaceId);
+ }catch(err){
+ // TODO: Invalid color string
+ throw new Error('Invalid color string');
+ }
+
+ }else{
+ // Received individual channel values
+ let mappedVals;
+
+ if(colorMaxes){
+ // NOTE: need to consider different number of arguments (eg. CMYK)
+ if(vals.length === 4){
+ mappedVals = Color.mapColorRange(vals, this.mode, colorMaxes, clamp);
+ }else if(vals.length === 3){
+ mappedVals = Color.mapColorRange(
+ [vals[0], vals[1], vals[2]],
+ this.mode,
+ colorMaxes,
+ clamp
+ );
+ mappedVals.push(1);
+ }else if(vals.length === 2){
+ // Grayscale with alpha
+ if(Color.#grayscaleMap[this.mode]){
+ mappedVals = Color.#grayscaleMap[this.mode](
+ vals[0],
+ colorMaxes,
+ clamp
+ );
+ }else{
+ mappedVals = Color.mapColorRange(
+ [vals[0], vals[0], vals[0]],
+ this.mode,
+ colorMaxes,
+ clamp
+ );
+ }
+ const alphaMaxes = Array.isArray(colorMaxes[colorMaxes.length-1]) ?
+ colorMaxes[colorMaxes.length-1] :
+ [0, colorMaxes[colorMaxes.length-1]];
+ mappedVals.push(
+ map(
+ vals[1],
+ alphaMaxes[0],
+ alphaMaxes[1],
+ 0,
+ 1,
+ clamp
+ )
+ );
+ }else if(vals.length === 1){
+ // Grayscale only
+ if(Color.#grayscaleMap[this.mode]){
+ mappedVals = Color.#grayscaleMap[this.mode](
+ vals[0],
+ colorMaxes,
+ clamp
+ );
+ }else{
+ mappedVals = Color.mapColorRange(
+ [vals[0], vals[0], vals[0]],
+ this.mode,
+ colorMaxes,
+ clamp
+ );
+ }
+ mappedVals.push(1);
+ }else{
+ throw new Error('Invalid color');
+ }
+ }else{
+ mappedVals = vals;
+ }
+
+ const space = Color.colorMap[this.mode] || console.error('Invalid color mode');
+ const coords = mappedVals.slice(0, 3);
+
+ const color = {
+ space,
+ coords,
+ alpha: mappedVals[3]
+ };
+ this._color = to(color, space);
}
+ }
+
+ // Convert from p5 color range to color.js color range
+ static mapColorRange(origin, mode, maxes, clamp){
+ const p5Maxes = maxes.map(max => {
+ if(!Array.isArray(max)){
+ return [0, max];
+ }else{
+ return max;
+ }
+ });
+ const colorjsMaxes = Color.#colorjsMaxes[mode];
+
+ return origin.map((channel, i) => {
+ const newval = map(
+ channel,
+ p5Maxes[i][0], p5Maxes[i][1],
+ colorjsMaxes[i][0], colorjsMaxes[i][1],
+ clamp
+ );
+ return newval;
+ });
+ }
+
+ // Convert from color.js color range to p5 color range
+ static unmapColorRange(origin, mode, maxes){
+ const p5Maxes = maxes.map(max => {
+ if(!Array.isArray(max)){
+ return [0, max];
+ }else{
+ return max;
+ }
+ });
+ const colorjsMaxes = Color.#colorjsMaxes[mode];
+
+ return origin.map((channel, i) => {
+ const newval = map(
+ channel,
+ colorjsMaxes[i][0], colorjsMaxes[i][1],
+ p5Maxes[i][0], p5Maxes[i][1]
+ );
+ return newval;
+ });
+ }
+
+ // Will do conversion in-Gamut as out of Gamut conversion is only really useful for futher conversions
+ #toColorMode(mode){
+ return new Color(this._color, mode);
+ }
- // Expose closest screen color.
- this._calculateLevels();
+ // Get raw coordinates of underlying library, can differ between libraries
+ get _array() {
+ return this._getRGBA();
+ }
+
+ array(){
+ return this._array;
+ }
+
+ lerp(color, amt, mode){
+ // Find the closest common ancestor color space
+ let spaceIndex = -1;
+ while(
+ (
+ spaceIndex+1 < this._color.space.path.length ||
+ spaceIndex+1 < color._color.space.path.length
+ ) &&
+ this._color.space.path[spaceIndex+1] ===
+ color._color.space.path[spaceIndex+1]
+ ){
+ spaceIndex += 1;
+ }
+
+ if (spaceIndex === -1) {
+ // This probably will not occur in practice
+ throw new Error('Cannot lerp colors. No common color space found');
+ }
+
+ const obj = range(this._color, color._color, {
+ space: this._color.space.path[spaceIndex].id
+ })(amt);
+
+ return new Color(obj, mode || this.mode);
}
/**
@@ -370,7 +282,6 @@ p5.Color = class Color {
* `myColor.toString('#rrggbb')`, it will determine how the color string is
* formatted. By default, color strings are formatted as `'rgba(r, g, b, a)'`.
*
- * @method toString
* @param {String} [format] how the color string will be formatted.
* Leaving this empty formats the string as rgba(r, g, b, a).
* '#rgb' '#rgba' '#rrggbb' and '#rrggbbaa' format as hexadecimal color codes.
@@ -403,170 +314,16 @@ p5.Color = class Color {
*
*/
toString(format) {
- const a = this.levels;
- const f = this._array;
- const alpha = f[3]; // String representation uses normalized alpha
-
- switch (format) {
- case '#rrggbb':
- return '#'.concat(
- a[0] < 16 ? '0'.concat(a[0].toString(16)) : a[0].toString(16),
- a[1] < 16 ? '0'.concat(a[1].toString(16)) : a[1].toString(16),
- a[2] < 16 ? '0'.concat(a[2].toString(16)) : a[2].toString(16)
- );
-
- case '#rrggbbaa':
- return '#'.concat(
- a[0] < 16 ? '0'.concat(a[0].toString(16)) : a[0].toString(16),
- a[1] < 16 ? '0'.concat(a[1].toString(16)) : a[1].toString(16),
- a[2] < 16 ? '0'.concat(a[2].toString(16)) : a[2].toString(16),
- a[3] < 16 ? '0'.concat(a[3].toString(16)) : a[3].toString(16)
- );
-
- case '#rgb':
- return '#'.concat(
- Math.round(f[0] * 15).toString(16),
- Math.round(f[1] * 15).toString(16),
- Math.round(f[2] * 15).toString(16)
- );
-
- case '#rgba':
- return '#'.concat(
- Math.round(f[0] * 15).toString(16),
- Math.round(f[1] * 15).toString(16),
- Math.round(f[2] * 15).toString(16),
- Math.round(f[3] * 15).toString(16)
- );
-
- case 'rgb':
- return 'rgb('.concat(a[0], ', ', a[1], ', ', a[2], ')');
-
- case 'rgb%':
- return 'rgb('.concat(
- (100 * f[0]).toPrecision(3),
- '%, ',
- (100 * f[1]).toPrecision(3),
- '%, ',
- (100 * f[2]).toPrecision(3),
- '%)'
- );
-
- case 'rgba%':
- return 'rgba('.concat(
- (100 * f[0]).toPrecision(3),
- '%, ',
- (100 * f[1]).toPrecision(3),
- '%, ',
- (100 * f[2]).toPrecision(3),
- '%, ',
- (100 * f[3]).toPrecision(3),
- '%)'
- );
-
- case 'hsb':
- case 'hsv':
- if (!this.hsba) this.hsba = color_conversion._rgbaToHSBA(this._array);
- return 'hsb('.concat(
- this.hsba[0] * this.maxes[constants.HSB][0],
- ', ',
- this.hsba[1] * this.maxes[constants.HSB][1],
- ', ',
- this.hsba[2] * this.maxes[constants.HSB][2],
- ')'
- );
-
- case 'hsb%':
- case 'hsv%':
- if (!this.hsba) this.hsba = color_conversion._rgbaToHSBA(this._array);
- return 'hsb('.concat(
- (100 * this.hsba[0]).toPrecision(3),
- '%, ',
- (100 * this.hsba[1]).toPrecision(3),
- '%, ',
- (100 * this.hsba[2]).toPrecision(3),
- '%)'
- );
-
- case 'hsba':
- case 'hsva':
- if (!this.hsba) this.hsba = color_conversion._rgbaToHSBA(this._array);
- return 'hsba('.concat(
- this.hsba[0] * this.maxes[constants.HSB][0],
- ', ',
- this.hsba[1] * this.maxes[constants.HSB][1],
- ', ',
- this.hsba[2] * this.maxes[constants.HSB][2],
- ', ',
- alpha,
- ')'
- );
-
- case 'hsba%':
- case 'hsva%':
- if (!this.hsba) this.hsba = color_conversion._rgbaToHSBA(this._array);
- return 'hsba('.concat(
- (100 * this.hsba[0]).toPrecision(3),
- '%, ',
- (100 * this.hsba[1]).toPrecision(3),
- '%, ',
- (100 * this.hsba[2]).toPrecision(3),
- '%, ',
- (100 * alpha).toPrecision(3),
- '%)'
- );
-
- case 'hsl':
- if (!this.hsla) this.hsla = color_conversion._rgbaToHSLA(this._array);
- return 'hsl('.concat(
- this.hsla[0] * this.maxes[constants.HSL][0],
- ', ',
- this.hsla[1] * this.maxes[constants.HSL][1],
- ', ',
- this.hsla[2] * this.maxes[constants.HSL][2],
- ')'
- );
-
- case 'hsl%':
- if (!this.hsla) this.hsla = color_conversion._rgbaToHSLA(this._array);
- return 'hsl('.concat(
- (100 * this.hsla[0]).toPrecision(3),
- '%, ',
- (100 * this.hsla[1]).toPrecision(3),
- '%, ',
- (100 * this.hsla[2]).toPrecision(3),
- '%)'
- );
-
- case 'hsla':
- if (!this.hsla) this.hsla = color_conversion._rgbaToHSLA(this._array);
- return 'hsla('.concat(
- this.hsla[0] * this.maxes[constants.HSL][0],
- ', ',
- this.hsla[1] * this.maxes[constants.HSL][1],
- ', ',
- this.hsla[2] * this.maxes[constants.HSL][2],
- ', ',
- alpha,
- ')'
- );
-
- case 'hsla%':
- if (!this.hsla) this.hsla = color_conversion._rgbaToHSLA(this._array);
- return 'hsl('.concat(
- (100 * this.hsla[0]).toPrecision(3),
- '%, ',
- (100 * this.hsla[1]).toPrecision(3),
- '%, ',
- (100 * this.hsla[2]).toPrecision(3),
- '%, ',
- (100 * alpha).toPrecision(3),
- '%)'
- );
-
- case 'rgba':
- default:
- return 'rgba('.concat(a[0], ',', a[1], ',', a[2], ',', alpha, ')');
+ const key = `${this._color.space.id}-${this._color.coords.join(',')}-${this._color.alpha}-${format}`;
+ let colorString = serializationMap[key];
+
+ if(!colorString){
+ colorString = serialize(this._color, {
+ format
+ });
+ serializationMap[key] = colorString;
}
+ return colorString;
}
/**
@@ -575,7 +332,6 @@ p5.Color = class Color {
* The range depends on the colorMode(). In the
* default RGB mode it's between 0 and 255.
*
- * @method setRed
* @param {Number} red the new red value.
*
* @example
@@ -606,9 +362,23 @@ p5.Color = class Color {
*
*
*/
- setRed(new_red) {
- this._array[0] = new_red / this.maxes[constants.RGB][0];
- this._calculateLevels();
+ setRed(new_red, max=[0, 1]) {
+ if(!Array.isArray(max)){
+ max = [0, max];
+ }
+
+ const colorjsMax = Color.#colorjsMaxes[RGB][0];
+ const newval = map(new_red, max[0], max[1], colorjsMax[0], colorjsMax[1]);
+
+ if(this.mode === RGB || this.mode === RGBHDR){
+ this._color.coords[0] = newval;
+ }else{
+ // Will do an imprecise conversion to 'srgb', not recommended
+ const space = this._color.space.id;
+ const representation = to(this._color, 'srgb');
+ representation.coords[0] = newval;
+ this._color = to(representation, space);
+ }
}
/**
@@ -617,7 +387,6 @@ p5.Color = class Color {
* The range depends on the colorMode(). In the
* default RGB mode it's between 0 and 255.
*
- * @method setGreen
* @param {Number} green the new green value.
*
* @example
@@ -647,10 +416,24 @@ p5.Color = class Color {
* }
*
*
- * // todo
- * //
- * // describe('');
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a mask.
- * beginClip();
- * triangle(15, 37, 30, 13, 43, 37);
- * circle(45, 45, 7);
- * endClip();
- *
- * // Draw a backing shape.
- * square(5, 5, 45);
- *
- * describe('A white triangle and circle on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create an inverted mask.
- * beginClip({ invert: true });
- * triangle(15, 37, 30, 13, 43, 37);
- * circle(45, 45, 7);
- * endClip();
- *
- * // Draw a backing shape.
- * square(5, 5, 45);
- *
- * describe('A white square at the top-left corner of a gray square. The white square has a triangle and a circle cut out of it.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * noStroke();
- *
- * // Draw a masked shape.
- * push();
- * // Create a mask.
- * beginClip();
- * triangle(15, 37, 30, 13, 43, 37);
- * circle(45, 45, 7);
- * endClip();
- *
- * // Draw a backing shape.
- * square(5, 5, 45);
- * pop();
- *
- * // Translate the origin to the center.
- * translate(50, 50);
- *
- * // Draw an inverted masked shape.
- * push();
- * // Create an inverted mask.
- * beginClip({ invert: true });
- * triangle(15, 37, 30, 13, 43, 37);
- * circle(45, 45, 7);
- * endClip();
- *
- * // Draw a backing shape.
- * square(5, 5, 45);
- * pop();
- *
- * describe('In the top left, a white triangle and circle. In the bottom right, a white square with a triangle and circle cut out of it.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A silhouette of a rotating torus colored fuchsia.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Create a mask.
- * beginClip();
- * push();
- * rotateX(frameCount * 0.01);
- * rotateY(frameCount * 0.01);
- * scale(0.5);
- * torus(30, 15);
- * pop();
- * endClip();
- *
- * // Draw a backing shape.
- * noStroke();
- * fill('fuchsia');
- * plane(100);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A silhouette of a rotating torus colored with a gradient from cyan to purple.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Create a mask.
- * beginClip();
- * push();
- * rotateX(frameCount * 0.01);
- * rotateY(frameCount * 0.01);
- * scale(0.5);
- * torus(30, 15);
- * pop();
- * endClip();
- *
- * // Draw a backing shape.
- * noStroke();
- * beginShape(QUAD_STRIP);
- * fill(0, 255, 255);
- * vertex(-width / 2, -height / 2);
- * vertex(width / 2, -height / 2);
- * fill(100, 0, 100);
- * vertex(-width / 2, height / 2);
- * vertex(width / 2, height / 2);
- * endShape();
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a mask.
+ * beginClip();
+ * triangle(15, 37, 30, 13, 43, 37);
+ * circle(45, 45, 7);
+ * endClip();
+ *
+ * // Draw a backing shape.
+ * square(5, 5, 45);
+ *
+ * describe('A white triangle and circle on a gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create an inverted mask.
+ * beginClip({ invert: true });
+ * triangle(15, 37, 30, 13, 43, 37);
+ * circle(45, 45, 7);
+ * endClip();
+ *
+ * // Draw a backing shape.
+ * square(5, 5, 45);
+ *
+ * describe('A white square at the top-left corner of a gray square. The white square has a triangle and a circle cut out of it.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * noStroke();
+ *
+ * // Draw a masked shape.
+ * push();
+ * // Create a mask.
+ * beginClip();
+ * triangle(15, 37, 30, 13, 43, 37);
+ * circle(45, 45, 7);
+ * endClip();
+ *
+ * // Draw a backing shape.
+ * square(5, 5, 45);
+ * pop();
+ *
+ * // Translate the origin to the center.
+ * translate(50, 50);
+ *
+ * // Draw an inverted masked shape.
+ * push();
+ * // Create an inverted mask.
+ * beginClip({ invert: true });
+ * triangle(15, 37, 30, 13, 43, 37);
+ * circle(45, 45, 7);
+ * endClip();
+ *
+ * // Draw a backing shape.
+ * square(5, 5, 45);
+ * pop();
+ *
+ * describe('In the top left, a white triangle and circle. In the bottom right, a white square with a triangle and circle cut out of it.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A silhouette of a rotating torus colored fuchsia.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Create a mask.
+ * beginClip();
+ * push();
+ * rotateX(frameCount * 0.01);
+ * rotateY(frameCount * 0.01);
+ * scale(0.5);
+ * torus(30, 15);
+ * pop();
+ * endClip();
+ *
+ * // Draw a backing shape.
+ * noStroke();
+ * fill('fuchsia');
+ * plane(100);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A silhouette of a rotating torus colored with a gradient from cyan to purple.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Create a mask.
+ * beginClip();
+ * push();
+ * rotateX(frameCount * 0.01);
+ * rotateY(frameCount * 0.01);
+ * scale(0.5);
+ * torus(30, 15);
+ * pop();
+ * endClip();
+ *
+ * // Draw a backing shape.
+ * noStroke();
+ * beginShape(QUAD_STRIP);
+ * fill(0, 255, 255);
+ * vertex(-width / 2, -height / 2);
+ * vertex(width / 2, -height / 2);
+ * fill(100, 0, 100);
+ * vertex(-width / 2, height / 2);
+ * vertex(width / 2, height / 2);
+ * endShape();
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a mask.
- * beginClip();
- * triangle(15, 37, 30, 13, 43, 37);
- * circle(45, 45, 7);
- * endClip();
- *
- * // Draw a backing shape.
- * square(5, 5, 45);
- *
- * describe('A white triangle and circle on a gray background.');
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a mask.
+ * beginClip();
+ * triangle(15, 37, 30, 13, 43, 37);
+ * circle(45, 45, 7);
+ * endClip();
+ *
+ * // Draw a backing shape.
+ * square(5, 5, 45);
+ *
+ * describe('A white triangle and circle on a gray background.');
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a mask.
- * clip(mask);
- *
- * // Draw a backing shape.
- * square(5, 5, 45);
- *
- * describe('A white triangle and circle on a gray background.');
- * }
- *
- * // Declare a function that defines the mask.
- * function mask() {
- * triangle(15, 37, 30, 13, 43, 37);
- * circle(45, 45, 7);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create an inverted mask.
- * clip(mask, { invert: true });
- *
- * // Draw a backing shape.
- * square(5, 5, 45);
- *
- * describe('A white square at the top-left corner of a gray square. The white square has a triangle and a circle cut out of it.');
- * }
- *
- * // Declare a function that defines the mask.
- * function mask() {
- * triangle(15, 37, 30, 13, 43, 37);
- * circle(45, 45, 7);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * noStroke();
- *
- * // Draw a masked shape.
- * push();
- * // Create a mask.
- * clip(mask);
- *
- * // Draw a backing shape.
- * square(5, 5, 45);
- * pop();
- *
- * // Translate the origin to the center.
- * translate(50, 50);
- *
- * // Draw an inverted masked shape.
- * push();
- * // Create an inverted mask.
- * clip(mask, { invert: true });
- *
- * // Draw a backing shape.
- * square(5, 5, 45);
- * pop();
- *
- * describe('In the top left, a white triangle and circle. In the bottom right, a white square with a triangle and circle cut out of it.');
- * }
- *
- * // Declare a function that defines the mask.
- * function mask() {
- * triangle(15, 37, 30, 13, 43, 37);
- * circle(45, 45, 7);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A silhouette of a rotating torus colored fuchsia.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Create a mask.
- * clip(mask);
- *
- * // Draw a backing shape.
- * noStroke();
- * fill('fuchsia');
- * plane(100);
- * }
- *
- * // Declare a function that defines the mask.
- * function mask() {
- * push();
- * rotateX(frameCount * 0.01);
- * rotateY(frameCount * 0.01);
- * scale(0.5);
- * torus(30, 15);
- * pop();
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A silhouette of a rotating torus colored with a gradient from cyan to purple.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Create a mask.
- * clip(mask);
- *
- * // Draw a backing shape.
- * noStroke();
- * beginShape(QUAD_STRIP);
- * fill(0, 255, 255);
- * vertex(-width / 2, -height / 2);
- * vertex(width / 2, -height / 2);
- * fill(100, 0, 100);
- * vertex(-width / 2, height / 2);
- * vertex(width / 2, height / 2);
- * endShape();
- * }
- *
- * // Declare a function that defines the mask.
- * function mask() {
- * push();
- * rotateX(frameCount * 0.01);
- * rotateY(frameCount * 0.01);
- * scale(0.5);
- * torus(30, 15);
- * pop();
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a mask.
+ * clip(mask);
+ *
+ * // Draw a backing shape.
+ * square(5, 5, 45);
+ *
+ * describe('A white triangle and circle on a gray background.');
+ * }
+ *
+ * // Declare a function that defines the mask.
+ * function mask() {
+ * triangle(15, 37, 30, 13, 43, 37);
+ * circle(45, 45, 7);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create an inverted mask.
+ * clip(mask, { invert: true });
+ *
+ * // Draw a backing shape.
+ * square(5, 5, 45);
+ *
+ * describe('A white square at the top-left corner of a gray square. The white square has a triangle and a circle cut out of it.');
+ * }
+ *
+ * // Declare a function that defines the mask.
+ * function mask() {
+ * triangle(15, 37, 30, 13, 43, 37);
+ * circle(45, 45, 7);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * noStroke();
+ *
+ * // Draw a masked shape.
+ * push();
+ * // Create a mask.
+ * clip(mask);
+ *
+ * // Draw a backing shape.
+ * square(5, 5, 45);
+ * pop();
+ *
+ * // Translate the origin to the center.
+ * translate(50, 50);
+ *
+ * // Draw an inverted masked shape.
+ * push();
+ * // Create an inverted mask.
+ * clip(mask, { invert: true });
+ *
+ * // Draw a backing shape.
+ * square(5, 5, 45);
+ * pop();
+ *
+ * describe('In the top left, a white triangle and circle. In the bottom right, a white square with a triangle and circle cut out of it.');
+ * }
+ *
+ * // Declare a function that defines the mask.
+ * function mask() {
+ * triangle(15, 37, 30, 13, 43, 37);
+ * circle(45, 45, 7);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A silhouette of a rotating torus colored fuchsia.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Create a mask.
+ * clip(mask);
+ *
+ * // Draw a backing shape.
+ * noStroke();
+ * fill('fuchsia');
+ * plane(100);
+ * }
+ *
+ * // Declare a function that defines the mask.
+ * function mask() {
+ * push();
+ * rotateX(frameCount * 0.01);
+ * rotateY(frameCount * 0.01);
+ * scale(0.5);
+ * torus(30, 15);
+ * pop();
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A silhouette of a rotating torus colored with a gradient from cyan to purple.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Create a mask.
+ * clip(mask);
+ *
+ * // Draw a backing shape.
+ * noStroke();
+ * beginShape(QUAD_STRIP);
+ * fill(0, 255, 255);
+ * vertex(-width / 2, -height / 2);
+ * vertex(width / 2, -height / 2);
+ * fill(100, 0, 100);
+ * vertex(-width / 2, height / 2);
+ * vertex(width / 2, height / 2);
+ * endShape();
+ * }
+ *
+ * // Declare a function that defines the mask.
+ * function mask() {
+ * push();
+ * rotateX(frameCount * 0.01);
+ * rotateY(frameCount * 0.01);
+ * scale(0.5);
+ * torus(30, 15);
+ * pop();
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // A grayscale value.
- * background(51);
- *
- * describe('A canvas with a dark charcoal gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // A grayscale value and an alpha value.
- * background(51, 0.4);
- * describe('A canvas with a transparent gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // R, G & B values.
- * background(255, 204, 0);
- *
- * describe('A canvas with a yellow background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Use HSB color.
- * colorMode(HSB);
- *
- * // H, S & B values.
- * background(255, 204, 100);
- *
- * describe('A canvas with a royal blue background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // A CSS named color.
- * background('red');
- *
- * describe('A canvas with a red background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Three-digit hex RGB notation.
- * background('#fae');
- *
- * describe('A canvas with a pink background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Six-digit hex RGB notation.
- * background('#222222');
- *
- * describe('A canvas with a black background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Integer RGB notation.
- * background('rgb(0, 255, 0)');
- *
- * describe('A canvas with a bright green background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Integer RGBA notation.
- * background('rgba(0, 255, 0, 0.25)');
- *
- * describe('A canvas with a transparent green background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Percentage RGB notation.
- * background('rgb(100%, 0%, 10%)');
- *
- * describe('A canvas with a red background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Percentage RGBA notation.
- * background('rgba(100%, 0%, 100%, 0.5)');
- *
- * describe('A canvas with a transparent purple background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // A p5.Color object.
- * let c = color(0, 0, 255);
- * background(c);
- *
- * describe('A canvas with a blue background.');
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // A grayscale value.
+ * background(51);
+ *
+ * describe('A canvas with a dark charcoal gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // A grayscale value and an alpha value.
+ * background(51, 0.4);
+ * describe('A canvas with a transparent gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // R, G & B values.
+ * background(255, 204, 0);
+ *
+ * describe('A canvas with a yellow background.');
+ * }
+ *
+ *
+ * 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);
+ *
+ * // H, S & B values.
+ * background(255, 204, 100);
+ *
+ * describe('A canvas with a royal blue background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // A CSS named color.
+ * background('red');
+ *
+ * describe('A canvas with a red background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Three-digit hex RGB notation.
+ * background('#fae');
+ *
+ * describe('A canvas with a pink background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Six-digit hex RGB notation.
+ * background('#222222');
+ *
+ * describe('A canvas with a black background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Integer RGB notation.
+ * background('rgb(0, 255, 0)');
+ *
+ * describe('A canvas with a bright green background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Integer RGBA notation.
+ * background('rgba(0, 255, 0, 0.25)');
+ *
+ * describe('A canvas with a transparent green background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Percentage RGB notation.
+ * background('rgb(100%, 0%, 10%)');
+ *
+ * describe('A canvas with a red background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Percentage RGBA notation.
+ * background('rgba(100%, 0%, 100%, 0.5)');
+ *
+ * describe('A canvas with a transparent purple background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // A p5.Color object.
+ * let c = color(0, 0, 255);
+ * background(c);
+ *
+ * describe('A canvas with a blue background.');
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * describe('A gray square. White circles are drawn as the user moves the mouse. The circles disappear when the user presses the mouse.');
- * }
- *
- * function draw() {
- * circle(mouseX, mouseY, 20);
- * }
- *
- * function mousePressed() {
- * clear();
- * background(200);
- * }
- *
- *
- * let pg;
- *
- * function setup() {
- * createCanvas(100, 100);
- * background(200);
- *
- * pg = createGraphics(60, 60);
- * pg.background(200);
- * pg.noStroke();
- * pg.circle(pg.width / 2, pg.height / 2, 15);
- * image(pg, 20, 20);
- *
- * describe('A white circle drawn on a gray square. The square gets smaller when the mouse is pressed.');
- * }
- *
- * function mousePressed() {
- * clear();
- * image(pg, 20, 20);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * describe('A gray square. White circles are drawn as the user moves the mouse. The circles disappear when the user presses the mouse.');
+ * }
+ *
+ * function draw() {
+ * circle(mouseX, mouseY, 20);
+ * }
+ *
+ * function mousePressed() {
+ * clear();
+ * background(200);
+ * }
+ *
+ *
+ * let pg;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ * background(200);
+ *
+ * pg = createGraphics(60, 60);
+ * pg.background(200);
+ * pg.noStroke();
+ * pg.circle(pg.width / 2, pg.height / 2, 15);
+ * image(pg, 20, 20);
+ *
+ * describe('A white circle drawn on a gray square. The square gets smaller when the mouse is pressed.');
+ * }
+ *
+ * function mousePressed() {
+ * clear();
+ * image(pg, 20, 20);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Fill with pure red.
- * fill(255, 0, 0);
- *
- * circle(50, 50, 25);
- *
- * describe('A gray square with a red circle at its center.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use RGB color with values in the range 0-100.
- * colorMode(RGB, 100);
- *
- * // Fill with pure red.
- * fill(100, 0, 0);
- *
- * circle(50, 50, 25);
- *
- * describe('A gray square with a red circle at its center.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use HSB color.
- * colorMode(HSB);
- *
- * // Fill with pure red.
- * fill(0, 100, 100);
- *
- * circle(50, 50, 25);
- *
- * describe('A gray square with a red circle at its center.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use HSL color.
- * colorMode(HSL);
- *
- * // Fill with pure red.
- * fill(0, 100, 50);
- *
- * circle(50, 50, 25);
- *
- * describe('A gray square with a red circle at its center.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Use RGB color with values in the range 0-100.
- * colorMode(RGB, 100);
- *
- * for (let x = 0; x < 100; x += 1) {
- * for (let y = 0; y < 100; y += 1) {
- * stroke(x, y, 0);
- * point(x, y);
- * }
- * }
- *
- * describe(
- * 'A diagonal green to red gradient from bottom-left to top-right with shading transitioning to black at top-left corner.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Use HSB color with values in the range 0-100.
- * colorMode(HSB, 100);
- *
- * for (let x = 0; x < 100; x += 1) {
- * for (let y = 0; y < 100; y += 1) {
- * stroke(x, y, 100);
- * point(x, y);
- * }
- * }
- *
- * describe('A rainbow gradient from left-to-right. Brightness transitions to white at the top.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.Color object.
- * let myColor = color(180, 175, 230);
- * background(myColor);
- *
- * // Use RGB color with values in the range 0-1.
- * colorMode(RGB, 1);
- *
- * // Get the red, green, and blue color components.
- * let redValue = red(myColor);
- * let greenValue = green(myColor);
- * let blueValue = blue(myColor);
- *
- * // Round the color components for display.
- * redValue = round(redValue, 2);
- * greenValue = round(greenValue, 2);
- * blueValue = round(blueValue, 2);
- *
- * // Display the color components.
- * text(`Red: ${redValue}`, 10, 10, 80, 80);
- * text(`Green: ${greenValue}`, 10, 40, 80, 80);
- * text(`Blue: ${blueValue}`, 10, 70, 80, 80);
- *
- * describe('A purple canvas with the red, green, and blue decimal values of the color written on it.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(255);
- *
- * // Use RGB color with alpha values in the range 0-1.
- * colorMode(RGB, 255, 255, 255, 1);
- *
- * noFill();
- * strokeWeight(4);
- * stroke(255, 0, 10, 0.3);
- * circle(40, 40, 50);
- * circle(50, 60, 50);
- *
- * describe('Two overlapping translucent pink circle outlines.');
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Fill with pure red.
+ * fill(255, 0, 0);
+ *
+ * circle(50, 50, 25);
+ *
+ * describe('A gray square with a red circle at its center.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use RGB color with values in the range 0-100.
+ * colorMode(RGB, 100);
+ *
+ * // Fill with pure red.
+ * fill(100, 0, 0);
+ *
+ * circle(50, 50, 25);
+ *
+ * describe('A gray square with a red circle at its center.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use HSB color.
+ * colorMode(HSB);
+ *
+ * // Fill with pure red.
+ * fill(0, 100, 100);
+ *
+ * circle(50, 50, 25);
+ *
+ * describe('A gray square with a red circle at its center.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use HSL color.
+ * colorMode(HSL);
+ *
+ * // Fill with pure red.
+ * fill(0, 100, 50);
+ *
+ * circle(50, 50, 25);
+ *
+ * describe('A gray square with a red circle at its center.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Draw a neutral gray background using the default color mode.
+ * background(200);
+ *
+ * // Switch to HWB color mode.
+ * // (Assuming p5.js supports HWB with a range of:
+ * // hue: 0–360, whiteness: 0–100, blackness: 0–100.)
+ * colorMode(HWB);
+ *
+ * // Set fill to pure red in HWB.
+ * // Pure red in HWB is: hue = 0°, whiteness = 0%, blackness = 0%.
+ * fill(0, 0, 0);
+ *
+ * // Draw a circle at the center.
+ * circle(50, 50, 25);
+ *
+ * describe('A gray square with a red circle at its center, drawn using HWB color mode.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Draw a neutral gray background using the default color mode.
+ * background(200);
+ *
+ * // Switch to LAB color mode.
+ * // In this mode, L typically ranges from 0 to 100 while a and b span roughly -128 to 127.
+ * colorMode(LAB);
+ *
+ * // Set fill to pure red in LAB.
+ * // The sRGB red (255, 0, 0) converts approximately to LAB as:
+ * // L = 53, a = 80, b = 67.
+ * fill(53, 80, 67);
+ *
+ * // Draw a circle at the center.
+ * circle(50, 50, 25);
+ *
+ * describe('A gray square with a red circle at its center, drawn using LAB color mode.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Draw a neutral gray background.
+ * background(200);
+ *
+ * // Switch to LCH color mode.
+ * // In LCH, colors are defined by Lightness, Chroma, and Hue (in degrees).
+ * colorMode(LCH);
+ *
+ * // Set fill to an approximation of pure red in LCH:
+ * // Lightness ≈ 53, Chroma ≈ 104, Hue ≈ 40°.
+ * fill(53, 104, 40);
+ *
+ * // Draw a circle at the center.
+ * circle(50, 50, 25);
+ *
+ * describe('A gray square with a red circle at its center, drawn using LCH color mode.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Use RGB color with values in the range 0-100.
+ * colorMode(RGB, 100);
+ *
+ * for (let x = 0; x < 100; x += 1) {
+ * for (let y = 0; y < 100; y += 1) {
+ * stroke(x, y, 0);
+ * point(x, y);
+ * }
+ * }
+ *
+ * describe(
+ * 'A diagonal green to red gradient from bottom-left to top-right with shading transitioning to black at top-left corner.'
+ * );
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Use HSB color with values in the range 0-100.
+ * colorMode(HSB, 100);
+ *
+ * for (let x = 0; x < 100; x += 1) {
+ * for (let y = 0; y < 100; y += 1) {
+ * stroke(x, y, 100);
+ * point(x, y);
+ * }
+ * }
+ *
+ * describe('A rainbow gradient from left-to-right. Brightness transitions to white at the top.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.Color object.
+ * let myColor = color(180, 175, 230);
+ * background(myColor);
+ *
+ * // Use RGB color with values in the range 0-1.
+ * colorMode(RGB, 1);
+ *
+ * // Get the red, green, and blue color components.
+ * let redValue = red(myColor);
+ * let greenValue = green(myColor);
+ * let blueValue = blue(myColor);
+ *
+ * // Round the color components for display.
+ * redValue = round(redValue, 2);
+ * greenValue = round(greenValue, 2);
+ * blueValue = round(blueValue, 2);
+ *
+ * // Display the color components.
+ * text(`Red: ${redValue}`, 10, 10, 80, 80);
+ * text(`Green: ${greenValue}`, 10, 40, 80, 80);
+ * text(`Blue: ${blueValue}`, 10, 70, 80, 80);
+ *
+ * describe('A purple canvas with the red, green, and blue decimal values of the color written on it.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(255);
+ *
+ * // Use RGB color with alpha values in the range 0-1.
+ * colorMode(RGB, 255, 255, 255, 1);
+ *
+ * noFill();
+ * strokeWeight(4);
+ * stroke(255, 0, 10, 0.3);
+ * circle(40, 40, 50);
+ * circle(50, 60, 50);
+ *
+ * describe('Two overlapping translucent pink circle outlines.');
+ * }
+ *
+ *
+ * let hslGraphic, lchGraphic, oklchGraphic;
+ *
+ * function setup() {
+ * createCanvas(600, 200);
+ * noLoop();
+ *
+ * // Create three graphics objects for HSL, LCH, and OKLCH color modes
+ * hslGraphic = createGraphics(200, 200);
+ * lchGraphic = createGraphics(200, 200);
+ * oklchGraphic = createGraphics(200, 200);
+ *
+ * // Draw HSL color wheel
+ * colorMode(HSL);
+ * hslGraphic.translate(100, 100);
+ * for (let i = 0; i < 1000; i++) {
+ * hslGraphic.stroke(360 / 1000 * i, 70, 50);
+ * hslGraphic.line(0, 0, hslGraphic.width / 2, 0);
+ * hslGraphic.rotate(TAU / 1000);
+ * }
+ *
+ * // Draw LCH color wheel
+ * colorMode(LCH);
+ * lchGraphic.translate(100, 100);
+ * for (let i = 0; i < 1000; i++) {
+ * lchGraphic.stroke(54, 106, 360 / 1000 * i);
+ * lchGraphic.line(0, 0, lchGraphic.width / 2, 0);
+ * lchGraphic.rotate(TAU / 1000);
+ * }
+ *
+ * // Draw OKLCH color wheel
+ * colorMode(OKLCH);
+ * oklchGraphic.translate(100, 100);
+ * for (let i = 0; i < 1000; i++) {
+ * oklchGraphic.stroke(54, 106, 360 / 1000 * i);
+ * oklchGraphic.line(0, 0, oklchGraphic.width / 2, 0);
+ * oklchGraphic.rotate(TAU / 1000);
+ * }
+ * }
+ *
+ * function draw() {
+ * // Set the styles
+ * colorMode(RGB);
+ * background(220);
+ *
+ * // Display the color wheels
+ * image(hslGraphic, 0, 0);
+ * image(lchGraphic, 200, 0);
+ * image(oklchGraphic, 400, 0);
+ * }
+ *
+ *
+ * // Example: Single-value (Grayscale) colors in different color modes.
+ * // The rectangle is filled with one parameter, but its final color depends
+ * // on how that parameter is interpreted by the current color mode.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ * noStroke();
+ * noLoop();
+ * }
+ *
+ * function draw() {
+ * // Set color mode to RGB with range 0-255
+ * colorMode(RGB, 255);
+ *
+ * // Fill with single grayscale value
+ * fill(128);
+ * rect(0, 0, 100, 100);
+ *
+ * // Add text label
+ * fill(0); // Switch to black text for clarity
+ * textSize(14);
+ * text("RGB (128)", 10, 20);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // A grayscale value.
- * fill(51);
- * square(20, 20, 60);
- *
- * describe('A dark charcoal gray square with a black outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // R, G & B values.
- * fill(255, 204, 0);
- * square(20, 20, 60);
- *
- * describe('A yellow square with a black outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(100);
- *
- * // Use HSB color.
- * colorMode(HSB);
- *
- * // H, S & B values.
- * fill(255, 204, 100);
- * square(20, 20, 60);
- *
- * describe('A royal blue square with a black outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // A CSS named color.
- * fill('red');
- * square(20, 20, 60);
- *
- * describe('A red square with a black outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Three-digit hex RGB notation.
- * fill('#fae');
- * square(20, 20, 60);
- *
- * describe('A pink square with a black outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Six-digit hex RGB notation.
- * fill('#A251FA');
- * square(20, 20, 60);
- *
- * describe('A purple square with a black outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Integer RGB notation.
- * fill('rgb(0, 255, 0)');
- * square(20, 20, 60);
- *
- * describe('A bright green square with a black outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Integer RGBA notation.
- * fill('rgba(0, 255, 0, 0.25)');
- * square(20, 20, 60);
- *
- * describe('A soft green rectange with a black outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Percentage RGB notation.
- * fill('rgb(100%, 0%, 10%)');
- * square(20, 20, 60);
- *
- * describe('A red square with a black outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Percentage RGBA notation.
- * fill('rgba(100%, 0%, 100%, 0.5)');
- * square(20, 20, 60);
- *
- * describe('A dark fuchsia square with a black outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // A p5.Color object.
- * let c = color(0, 0, 255);
- * fill(c);
- * square(20, 20, 60);
- *
- * describe('A blue square with a black outline.');
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // A grayscale value.
+ * fill(51);
+ * square(20, 20, 60);
+ *
+ * describe('A dark charcoal gray square with a black outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // R, G & B values.
+ * fill(255, 204, 0);
+ * square(20, 20, 60);
+ *
+ * describe('A yellow square with a black outline.');
+ * }
+ *
+ *
+ * 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.
+ * colorMode(HSB);
+ *
+ * // H, S & B values.
+ * fill(255, 204, 100);
+ * square(20, 20, 60);
+ *
+ * describe('A royal blue square with a black outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // A CSS named color.
+ * fill('red');
+ * square(20, 20, 60);
+ *
+ * describe('A red square with a black outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Three-digit hex RGB notation.
+ * fill('#fae');
+ * square(20, 20, 60);
+ *
+ * describe('A pink square with a black outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Six-digit hex RGB notation.
+ * fill('#A251FA');
+ * square(20, 20, 60);
+ *
+ * describe('A purple square with a black outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Integer RGB notation.
+ * fill('rgb(0, 255, 0)');
+ * square(20, 20, 60);
+ *
+ * describe('A bright green square with a black outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Integer RGBA notation.
+ * fill('rgba(0, 255, 0, 0.25)');
+ * square(20, 20, 60);
+ *
+ * describe('A soft green rectange with a black outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Percentage RGB notation.
+ * fill('rgb(100%, 0%, 10%)');
+ * square(20, 20, 60);
+ *
+ * describe('A red square with a black outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Percentage RGBA notation.
+ * fill('rgba(100%, 0%, 100%, 0.5)');
+ * square(20, 20, 60);
+ *
+ * describe('A dark fuchsia square with a black outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // A p5.Color object.
+ * let c = color(0, 0, 255);
+ * fill(c);
+ * square(20, 20, 60);
+ *
+ * describe('A blue square with a black outline.');
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Draw the top square.
- * square(32, 10, 35);
- *
- * // Draw the bottom square.
- * noFill();
- * square(32, 55, 35);
- *
- * describe('A white square on above an empty square. Both squares have black outlines.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A purple cube wireframe spinning on a black canvas.');
- * }
- *
- * function draw() {
- * background(0);
- *
- * // Style the box.
- * noFill();
- * stroke(100, 100, 240);
- *
- * // Rotate the coordinates.
- * rotateX(frameCount * 0.01);
- * rotateY(frameCount * 0.01);
- *
- * // Draw the box.
- * box(45);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Draw the top square.
+ * square(32, 10, 35);
+ *
+ * // Draw the bottom square.
+ * noFill();
+ * square(32, 55, 35);
+ *
+ * describe('A white square on above an empty square. Both squares have black outlines.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A purple cube wireframe spinning on a black canvas.');
+ * }
+ *
+ * function draw() {
+ * background(0);
+ *
+ * // Style the box.
+ * noFill();
+ * stroke(100, 100, 240);
+ *
+ * // Rotate the coordinates.
+ * rotateX(frameCount * 0.01);
+ * rotateY(frameCount * 0.01);
+ *
+ * // Draw the box.
+ * box(45);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * noStroke();
- * square(20, 20, 60);
- *
- * describe('A white square with no outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A pink cube with no edge outlines spinning on a black canvas.');
- * }
- *
- * function draw() {
- * background(0);
- *
- * // Style the box.
- * noStroke();
- * fill(240, 150, 150);
- *
- * // Rotate the coordinates.
- * rotateX(frameCount * 0.01);
- * rotateY(frameCount * 0.01);
- *
- * // Draw the box.
- * box(45);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * noStroke();
+ * square(20, 20, 60);
+ *
+ * describe('A white square with no outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A pink cube with no edge outlines spinning on a black canvas.');
+ * }
+ *
+ * function draw() {
+ * background(0);
+ *
+ * // Style the box.
+ * noStroke();
+ * fill(240, 150, 150);
+ *
+ * // Rotate the coordinates.
+ * rotateX(frameCount * 0.01);
+ * rotateY(frameCount * 0.01);
+ *
+ * // Draw the box.
+ * box(45);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // A grayscale value.
- * strokeWeight(4);
- * stroke(51);
- * square(20, 20, 60);
- *
- * describe('A white square with a dark charcoal gray outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // R, G & B values.
- * stroke(255, 204, 0);
- * strokeWeight(4);
- * square(20, 20, 60);
- *
- * describe('A white square with a yellow outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use HSB color.
- * colorMode(HSB);
- *
- * // H, S & B values.
- * strokeWeight(4);
- * stroke(255, 204, 100);
- * square(20, 20, 60);
- *
- * describe('A white square with a royal blue outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // A CSS named color.
- * stroke('red');
- * strokeWeight(4);
- * square(20, 20, 60);
- *
- * describe('A white square with a red outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Three-digit hex RGB notation.
- * stroke('#fae');
- * strokeWeight(4);
- * square(20, 20, 60);
- *
- * describe('A white square with a pink outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Six-digit hex RGB notation.
- * stroke('#222222');
- * strokeWeight(4);
- * square(20, 20, 60);
- *
- * describe('A white square with a black outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Integer RGB notation.
- * stroke('rgb(0, 255, 0)');
- * strokeWeight(4);
- * square(20, 20, 60);
- *
- * describe('A whiite square with a bright green outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Integer RGBA notation.
- * stroke('rgba(0, 255, 0, 0.25)');
- * strokeWeight(4);
- * square(20, 20, 60);
- *
- * describe('A white square with a soft green outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Percentage RGB notation.
- * stroke('rgb(100%, 0%, 10%)');
- * strokeWeight(4);
- * square(20, 20, 60);
- *
- * describe('A white square with a red outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Percentage RGBA notation.
- * stroke('rgba(100%, 0%, 100%, 0.5)');
- * strokeWeight(4);
- * square(20, 20, 60);
- *
- * describe('A white square with a dark fuchsia outline.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // A p5.Color object.
- * stroke(color(0, 0, 255));
- * strokeWeight(4);
- * square(20, 20, 60);
- *
- * describe('A white square with a blue outline.');
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // A grayscale value.
+ * strokeWeight(4);
+ * stroke(51);
+ * square(20, 20, 60);
+ *
+ * describe('A white square with a dark charcoal gray outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // R, G & B values.
+ * stroke(255, 204, 0);
+ * strokeWeight(4);
+ * square(20, 20, 60);
+ *
+ * describe('A white square with a yellow outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use HSB color.
+ * colorMode(HSB);
+ *
+ * // H, S & B values.
+ * strokeWeight(4);
+ * stroke(255, 204, 100);
+ * square(20, 20, 60);
+ *
+ * describe('A white square with a royal blue outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // A CSS named color.
+ * stroke('red');
+ * strokeWeight(4);
+ * square(20, 20, 60);
+ *
+ * describe('A white square with a red outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Three-digit hex RGB notation.
+ * stroke('#fae');
+ * strokeWeight(4);
+ * square(20, 20, 60);
+ *
+ * describe('A white square with a pink outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Six-digit hex RGB notation.
+ * stroke('#222222');
+ * strokeWeight(4);
+ * square(20, 20, 60);
+ *
+ * describe('A white square with a black outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Integer RGB notation.
+ * stroke('rgb(0, 255, 0)');
+ * strokeWeight(4);
+ * square(20, 20, 60);
+ *
+ * describe('A white square with a bright green outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Integer RGBA notation.
+ * stroke('rgba(0, 255, 0, 0.25)');
+ * strokeWeight(4);
+ * square(20, 20, 60);
+ *
+ * describe('A white square with a soft green outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Percentage RGB notation.
+ * stroke('rgb(100%, 0%, 10%)');
+ * strokeWeight(4);
+ * square(20, 20, 60);
+ *
+ * describe('A white square with a red outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Percentage RGBA notation.
+ * stroke('rgba(100%, 0%, 100%, 0.5)');
+ * strokeWeight(4);
+ * square(20, 20, 60);
+ *
+ * describe('A white square with a dark fuchsia outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // A p5.Color object.
+ * stroke(color(0, 0, 255));
+ * strokeWeight(4);
+ * square(20, 20, 60);
+ *
+ * describe('A white square with a blue outline.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(100, 100, 250);
+ *
+ * // Draw a pink square.
+ * fill(250, 100, 100);
+ * square(20, 20, 60);
+ *
+ * // Erase a circular area.
+ * erase();
+ * circle(25, 30, 30);
+ * noErase();
+ *
+ * describe('A purple canvas with a pink square in the middle. A circle is erased from the top-left, leaving a hole.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(100, 100, 250);
+ *
+ * // Draw a pink square.
+ * fill(250, 100, 100);
+ * square(20, 20, 60);
+ *
+ * // Erase a circular area.
+ * strokeWeight(5);
+ * erase(150, 255);
+ * circle(25, 30, 30);
+ * noErase();
+ *
+ * describe('A purple canvas with a pink square in the middle. A circle at the top-left partially erases its interior and a fully erases its outline.');
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(100, 100, 250);
- *
- * // Draw a pink square.
- * fill(250, 100, 100);
- * square(20, 20, 60);
- *
- * // Erase a circular area.
- * erase();
- * circle(25, 30, 30);
- * noErase();
- *
- * describe('A purple canvas with a pink square in the middle. A circle is erased from the top-left, leaving a hole.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(100, 100, 250);
- *
- * // Draw a pink square.
- * fill(250, 100, 100);
- * square(20, 20, 60);
- *
- * // Erase a circular area.
- * strokeWeight(5);
- * erase(150, 255);
- * circle(25, 30, 30);
- * noErase();
- *
- * describe('A purple canvas with a pink square in the middle. A circle at the top-left partially erases its interior and a fully erases its outline.');
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(235, 145, 15);
+ *
+ * // Draw the left rectangle.
+ * noStroke();
+ * fill(30, 45, 220);
+ * rect(30, 10, 10, 80);
+ *
+ * // Erase a circle.
+ * erase();
+ * circle(50, 50, 60);
+ * noErase();
+ *
+ * // Draw the right rectangle.
+ * rect(70, 10, 10, 80);
+ *
+ * describe('An orange canvas with two tall blue rectangles. A circular hole in the center erases the rectangle on the left but not the one on the right.');
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(235, 145, 15);
- *
- * // Draw the left rectangle.
- * noStroke();
- * fill(30, 45, 220);
- * rect(30, 10, 10, 80);
- *
- * // Erase a circle.
- * erase();
- * circle(50, 50, 60);
- * noErase();
- *
- * // Draw the right rectangle.
- * rect(70, 10, 10, 80);
- *
- * describe('An orange canvas with two tall blue rectangles. A circular hole in the center erases the rectangle on the left but not the one on the right.');
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use the default blend mode.
+ * blendMode(BLEND);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A blue line and a red line form an X on a gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(ADD);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A faint blue line and a faint red line form an X on a gray background. The area where they overlap is faint magenta.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(DARKEST);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A blue line and a red line form an X on a gray background. The area where they overlap is black.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(LIGHTEST);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A faint blue line and a faint red line form an X on a gray background. The area where they overlap is faint magenta.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(EXCLUSION);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A yellow line and a cyan line form an X on a gray background. The area where they overlap is green.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(MULTIPLY);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A blue line and a red line form an X on a gray background. The area where they overlap is black.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(SCREEN);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A faint blue line and a faint red line form an X on a gray background. The area where they overlap is faint magenta.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(REPLACE);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A diagonal red line.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(REMOVE);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('The silhouette of an X is missing from a gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(DIFFERENCE);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A yellow line and a cyan line form an X on a gray background. The area where they overlap is green.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(OVERLAY);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A faint blue line and a faint red line form an X on a gray background. The area where they overlap is bright magenta.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(HARD_LIGHT);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A blue line and a red line form an X on a gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(SOFT_LIGHT);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A faint blue line and a faint red line form an X on a gray background. The area where they overlap is violet.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(DODGE);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A faint blue line and a faint red line form an X on a gray background. The area where they overlap is faint violet.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(BURN);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A blue line and a red line form an X on a gray background. The area where they overlap is black.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the blend mode.
+ * blendMode(SUBTRACT);
+ *
+ * // Style the lines.
+ * strokeWeight(30);
+ *
+ * // Draw the blue line.
+ * stroke('blue');
+ * line(25, 25, 75, 75);
+ *
+ * // Draw the red line.
+ * stroke('red');
+ * line(75, 25, 25, 75);
+ *
+ * describe('A yellow line and a turquoise line form an X on a gray background. The area where they overlap is green.');
+ * }
+ *
+ *
- * function setup() {
- * // Prints "hello, world" to the console.
- * print('hello, world');
- * }
- *
- *
- * function setup() {
- * let name = 'ada';
- * // Prints "hello, ada" to the console.
- * print(`hello, ${name}`);
- * }
- *
- *
+ * function setup() {
+ * // Prints "hello, world" to the console.
+ * print('hello, world');
+ * }
+ *
+ *
+ * function setup() {
+ * let name = 'ada';
+ * // Prints "hello, ada" to the console.
+ * print(`hello, ${name}`);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Display the value of
- * // frameCount.
- * textSize(30);
- * textAlign(CENTER, CENTER);
- * text(frameCount, 50, 50);
- *
- * describe('The number 0 written in black in the middle of a gray square.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Set the frameRate to 30.
- * frameRate(30);
- *
- * textSize(30);
- * textAlign(CENTER, CENTER);
- *
- * describe('A number written in black in the middle of a gray square. Its value increases rapidly.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Display the value of
- * // frameCount.
- * text(frameCount, 50, 50);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Display the value of
+ * // frameCount.
+ * textSize(30);
+ * textAlign(CENTER, CENTER);
+ * text(frameCount, 50, 50);
+ *
+ * describe('The number 0 written in black in the middle of a gray square.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Set the frameRate to 30.
+ * frameRate(30);
+ *
+ * textSize(30);
+ * textAlign(CENTER, CENTER);
+ *
+ * describe('A number written in black in the middle of a gray square. Its value increases rapidly.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Display the value of
+ * // frameCount.
+ * text(frameCount, 50, 50);
+ * }
+ *
+ *
- * let x = 0;
- * let speed = 0.05;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Set the frameRate to 30.
- * frameRate(30);
- *
- * describe('A white circle moves from left to right on a gray background. It reappears on the left side when it reaches the right side.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Use deltaTime to calculate
- * // a change in position.
- * let deltaX = speed * deltaTime;
- *
- * // Update the x variable.
- * x += deltaX;
- *
- * // Reset x to 0 if it's
- * // greater than 100.
- * if (x > 100) {
- * x = 0;
- * }
- *
- * // Use x to set the circle's
- * // position.
- * circle(x, 50, 20);
- * }
- *
- *
+ * let x = 0;
+ * let speed = 0.05;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Set the frameRate to 30.
+ * frameRate(30);
+ *
+ * describe('A white circle moves from left to right on a gray background. It reappears on the left side when it reaches the right side.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Use deltaTime to calculate
+ * // a change in position.
+ * let deltaX = speed * deltaTime;
+ *
+ * // Update the x variable.
+ * x += deltaX;
+ *
+ * // Reset x to 0 if it's
+ * // greater than 100.
+ * if (x > 100) {
+ * x = 0;
+ * }
+ *
+ * // Use x to set the circle's
+ * // position.
+ * circle(x, 50, 20);
+ * }
+ *
+ *
- * // Open this example in two separate browser
- * // windows placed side-by-side to demonstrate.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A square changes color from green to red when the browser window is out of focus.');
- * }
- *
- * function draw() {
- * // Change the background color
- * // when the browser window
- * // goes in/out of focus.
- * if (focused === true) {
- * background(0, 255, 0);
- * } else {
- * background(255, 0, 0);
- * }
- * }
- *
- *
+ * // Open this example in two separate browser
+ * // windows placed side-by-side to demonstrate.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A square changes color from green to red when the browser window is out of focus.');
+ * }
+ *
+ * function draw() {
+ * // Change the background color
+ * // when the browser window
+ * // goes in/out of focus.
+ * if (focused === true) {
+ * background(0, 255, 0);
+ * } else {
+ * background(255, 0, 0);
+ * }
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A gray square. The cursor appears as crosshairs.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Set the cursor to crosshairs: +
- * cursor(CROSS);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A gray square divided into quadrants. The cursor image changes when the mouse moves to each quadrant.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Divide the canvas into quadrants.
- * line(50, 0, 50, 100);
- * line(0, 50, 100, 50);
- *
- * // Change cursor based on mouse position.
- * if (mouseX < 50 && mouseY < 50) {
- * cursor(CROSS);
- * } else if (mouseX > 50 && mouseY < 50) {
- * cursor('progress');
- * } else if (mouseX > 50 && mouseY > 50) {
- * cursor('https://avatars0.githubusercontent.com/u/1617169?s=16');
- * } else {
- * cursor('grab');
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('An image of three purple curves follows the mouse. The image shifts when the mouse is pressed.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Change the cursor's active spot
- * // when the mouse is pressed.
- * if (mouseIsPressed === true) {
- * cursor('https://avatars0.githubusercontent.com/u/1617169?s=16', 8, 8);
- * } else {
- * cursor('https://avatars0.githubusercontent.com/u/1617169?s=16');
- * }
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A gray square. The cursor appears as crosshairs.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Set the cursor to crosshairs: +
+ * cursor(CROSS);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A gray square divided into quadrants. The cursor image changes when the mouse moves to each quadrant.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Divide the canvas into quadrants.
+ * line(50, 0, 50, 100);
+ * line(0, 50, 100, 50);
+ *
+ * // Change cursor based on mouse position.
+ * if (mouseX < 50 && mouseY < 50) {
+ * cursor(CROSS);
+ * } else if (mouseX > 50 && mouseY < 50) {
+ * cursor('progress');
+ * } else if (mouseX > 50 && mouseY > 50) {
+ * cursor('https://avatars0.githubusercontent.com/u/1617169?s=16');
+ * } else {
+ * cursor('grab');
+ * }
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('An image of three purple curves follows the mouse. The image shifts when the mouse is pressed.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Change the cursor's active spot
+ * // when the mouse is pressed.
+ * if (mouseIsPressed === true) {
+ * cursor('https://avatars0.githubusercontent.com/u/1617169?s=16', 8, 8);
+ * } else {
+ * cursor('https://avatars0.githubusercontent.com/u/1617169?s=16');
+ * }
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A white circle on a gray background. The circle moves from left to right in a loop. It slows down when the mouse is pressed.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Set the x variable based
- * // on the current frameCount.
- * let x = frameCount % 100;
- *
- * // If the mouse is pressed,
- * // decrease the frame rate.
- * if (mouseIsPressed === true) {
- * frameRate(10);
- * } else {
- * frameRate(60);
- * }
- *
- * // Use x to set the circle's
- * // position.
- * circle(x, 50, 20);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A number written in black on a gray background. The number decreases when the mouse is pressed.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // If the mouse is pressed, do lots
- * // of math to slow down drawing.
- * if (mouseIsPressed === true) {
- * for (let i = 0; i < 1000000; i += 1) {
- * random();
- * }
- * }
- *
- * // Get the current frame rate
- * // and display it.
- * let fps = frameRate();
- * text(fps, 50, 50);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A white circle on a gray background. The circle moves from left to right in a loop. It slows down when the mouse is pressed.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Set the x variable based
+ * // on the current frameCount.
+ * let x = frameCount % 100;
+ *
+ * // If the mouse is pressed,
+ * // decrease the frame rate.
+ * if (mouseIsPressed === true) {
+ * frameRate(10);
+ * } else {
+ * frameRate(60);
+ * }
+ *
+ * // Use x to set the circle's
+ * // position.
+ * circle(x, 50, 20);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A number written in black on a gray background. The number decreases when the mouse is pressed.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // If the mouse is pressed, do lots
+ * // of math to slow down drawing.
+ * if (mouseIsPressed === true) {
+ * for (let i = 0; i < 1000000; i += 1) {
+ * random();
+ * }
+ * }
+ *
+ * // Get the current frame rate
+ * // and display it.
+ * let fps = frameRate();
+ * text(fps, 50, 50);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('The number 20 written in black on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Set the frame rate to 20.
- * frameRate(20);
- *
- * // Get the target frame rate and
- * // display it.
- * let fps = getTargetFrameRate();
- * text(fps, 43, 54);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('The number 20 written in black on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Set the frame rate to 20.
+ * frameRate(20);
+ *
+ * // Get the target frame rate and
+ * // display it.
+ * let fps = getTargetFrameRate();
+ * text(fps, 43, 54);
+ * }
+ *
+ *
- * function setup() {
- * // Hide the cursor.
- * noCursor();
- * }
- *
- * function draw() {
- * background(200);
- *
- * circle(mouseX, mouseY, 10);
- *
- * describe('A white circle on a gray background. The circle follows the mouse as it moves. The cursor is hidden.');
- * }
- *
- *
+ * function setup() {
+ * // Hide the cursor.
+ * noCursor();
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * circle(mouseX, mouseY, 10);
+ *
+ * describe('A white circle on a gray background. The circle follows the mouse as it moves. The cursor is hidden.');
+ * }
+ *
+ *
- * function setup() {
- * background(200);
- *
- * // Display the current WebGL version.
- * text(webglVersion, 42, 54);
- *
- * describe('The text "p2d" written in black on a gray background.');
- * }
- *
- *
- * let font;
- *
- * function preload() {
- * // Load a font to use.
- * font = loadFont('assets/inconsolata.otf');
- * }
- *
- * function setup() {
- * // Create a canvas using WEBGL mode.
- * createCanvas(100, 50, WEBGL);
- * background(200);
- *
- * // Display the current WebGL version.
- * fill(0);
- * textFont(font);
- * text(webglVersion, -15, 5);
- *
- * describe('The text "webgl2" written in black on a gray background.');
- * }
- *
- *
- * let font;
- *
- * function preload() {
- * // Load a font to use.
- * font = loadFont('assets/inconsolata.otf');
- * }
- *
- * function setup() {
- * // Create a canvas using WEBGL mode.
- * createCanvas(100, 50, WEBGL);
- *
- * // Set WebGL to version 1.
- * setAttributes({ version: 1 });
- *
- * background(200);
- *
- * // Display the current WebGL version.
- * fill(0);
- * textFont(font);
- * text(webglVersion, -14, 5);
- *
- * describe('The text "webgl" written in black on a gray background.');
- * }
- *
- *
+ * function setup() {
+ * background(200);
+ *
+ * // Display the current WebGL version.
+ * text(webglVersion, 42, 54);
+ *
+ * describe('The text "p2d" written in black on a gray background.');
+ * }
+ *
+ *
+ * let font;
+ *
+ * async function setup() {
+ * // Load a font to use.
+ * font = await loadFont('assets/inconsolata.otf');
+ *
+ * // Create a canvas using WEBGL mode.
+ * createCanvas(100, 50, WEBGL);
+ * background(200);
+ *
+ * // Display the current WebGL version.
+ * fill(0);
+ * textFont(font);
+ * text(webglVersion, -15, 5);
+ *
+ * describe('The text "webgl2" written in black on a gray background.');
+ * }
+ *
+ *
+ * let font;
+ *
+ * async function setup() {
+ * // Load a font to use.
+ * font = await loadFont('assets/inconsolata.otf');
+ *
+ * // Create a canvas using WEBGL mode.
+ * createCanvas(100, 50, WEBGL);
+ *
+ * // Set WebGL to version 1.
+ * setAttributes({ version: 1 });
+ *
+ * background(200);
+ *
+ * // Display the current WebGL version.
+ * fill(0);
+ * textFont(font);
+ * text(webglVersion, -14, 5);
+ *
+ * describe('The text "webgl" written in black on a gray background.');
+ * }
+ *
+ *
- * function setup() {
- * // Set the canvas' width and height
- * // using the display's dimensions.
- * createCanvas(displayWidth, displayHeight);
- *
- * background(200);
- *
- * describe('A gray canvas that is the same size as the display.');
- * }
- *
- *
+ * function setup() {
+ * // Set the canvas' width and height
+ * // using the display's dimensions.
+ * createCanvas(displayWidth, displayHeight);
+ *
+ * background(200);
+ *
+ * describe('A gray canvas that is the same size as the display.');
+ * }
+ *
+ *
- * function setup() {
- * // Set the canvas' width and height
- * // using the display's dimensions.
- * createCanvas(displayWidth, displayHeight);
- *
- * background(200);
- *
- * describe('A gray canvas that is the same size as the display.');
- * }
- *
- *
+ * function setup() {
+ * // Set the canvas' width and height
+ * // using the display's dimensions.
+ * createCanvas(displayWidth, displayHeight);
+ *
+ * background(200);
+ *
+ * describe('A gray canvas that is the same size as the display.');
+ * }
+ *
+ *
- * function setup() {
- * // Set the canvas' width and height
- * // using the browser's dimensions.
- * createCanvas(windowWidth, windowHeight);
- *
- * background(200);
- *
- * describe('A gray canvas that takes up the entire browser window.');
- * }
- *
- *
+ * function setup() {
+ * // Set the canvas' width and height
+ * // using the browser's dimensions.
+ * createCanvas(windowWidth, windowHeight);
+ *
+ * background(200);
+ *
+ * describe('A gray canvas that takes up the entire browser window.');
+ * }
+ *
+ *
- * function setup() {
- * // Set the canvas' width and height
- * // using the browser's dimensions.
- * createCanvas(windowWidth, windowHeight);
- *
- * background(200);
- *
- * describe('A gray canvas that takes up the entire browser window.');
- * }
- *
- *
+ * function setup() {
+ * // Set the canvas' width and height
+ * // using the browser's dimensions.
+ * createCanvas(windowWidth, windowHeight);
+ *
+ * background(200);
+ *
+ * describe('A gray canvas that takes up the entire browser window.');
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(windowWidth, windowHeight);
- *
- * describe('A gray canvas with a white circle at its center. The canvas takes up the entire browser window. It changes size to match the browser window.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw a circle at the center.
- * circle(width / 2, height / 2, 50);
- * }
- *
- * // Resize the canvas when the
- * // browser's size changes.
- * function windowResized() {
- * resizeCanvas(windowWidth, windowHeight);
- * }
- *
- *
- * function setup() {
- * createCanvas(windowWidth, windowHeight);
- * }
- *
- * function draw() {
- * background(200);
- *
- * describe('A gray canvas that takes up the entire browser window. It changes size to match the browser window.');
- * }
- *
- * function windowResized(event) {
- * // Resize the canvas when the
- * // browser's size changes.
- * resizeCanvas(windowWidth, windowHeight);
- *
- * // Print the resize event to the console for debugging.
- * print(event);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(windowWidth, windowHeight);
+ *
+ * describe('A gray canvas with a white circle at its center. The canvas takes up the entire browser window. It changes size to match the browser window.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw a circle at the center.
+ * circle(width / 2, height / 2, 50);
+ * }
+ *
+ * // Resize the canvas when the
+ * // browser's size changes.
+ * function windowResized() {
+ * resizeCanvas(windowWidth, windowHeight);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(windowWidth, windowHeight);
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * describe('A gray canvas that takes up the entire browser window. It changes size to match the browser window.');
+ * }
+ *
+ * function windowResized(event) {
+ * // Resize the canvas when the
+ * // browser's size changes.
+ * resizeCanvas(windowWidth, windowHeight);
+ *
+ * // Print the resize event to the console for debugging.
+ * print(event);
+ * }
+ *
+ *
+ * function setup() {
+ * background(200);
+ *
+ * // Display the canvas' width.
+ * text(width, 42, 54);
+ *
+ * describe('The number 100 written in black on a gray square.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(50, 100);
+ *
+ * background(200);
+ *
+ * // Display the canvas' width.
+ * text(width, 21, 54);
+ *
+ * describe('The number 50 written in black on a gray rectangle.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Display the canvas' width.
+ * text(width, 42, 54);
+ *
+ * describe('The number 100 written in black on a gray square. When the mouse is pressed, the square becomes a rectangle and the number becomes 50.');
+ * }
+ *
+ * // If the mouse is pressed, reisze
+ * // the canvas and display its new
+ * // width.
+ * function mousePressed() {
+ * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {
+ * resizeCanvas(50, 100);
+ * background(200);
+ * text(width, 21, 54);
+ * }
+ * }
+ *
+ *
- * function setup() {
- * background(200);
- *
- * // Display the canvas' width.
- * text(width, 42, 54);
- *
- * describe('The number 100 written in black on a gray square.');
- * }
- *
- *
- * function setup() {
- * createCanvas(50, 100);
- *
- * background(200);
- *
- * // Display the canvas' width.
- * text(width, 21, 54);
- *
- * describe('The number 50 written in black on a gray rectangle.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Display the canvas' width.
- * text(width, 42, 54);
- *
- * describe('The number 100 written in black on a gray square. When the mouse is pressed, the square becomes a rectangle and the number becomes 50.');
- * }
- *
- * // If the mouse is pressed, reisze
- * // the canvas and display its new
- * // width.
- * function mousePressed() {
- * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {
- * resizeCanvas(50, 100);
- * background(200);
- * text(width, 21, 54);
- * }
- * }
- *
- *
+ * function setup() {
+ * background(200);
+ *
+ * // Display the canvas' height.
+ * text(height, 42, 54);
+ *
+ * describe('The number 100 written in black on a gray square.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 50);
+ *
+ * background(200);
+ *
+ * // Display the canvas' height.
+ * text(height, 42, 27);
+ *
+ * describe('The number 50 written in black on a gray rectangle.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Display the canvas' height.
+ * text(height, 42, 54);
+ *
+ * describe('The number 100 written in black on a gray square. When the mouse is pressed, the square becomes a rectangle and the number becomes 50.');
+ * }
+ *
+ * // If the mouse is pressed, reisze
+ * // the canvas and display its new
+ * // height.
+ * function mousePressed() {
+ * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {
+ * resizeCanvas(100, 50);
+ * background(200);
+ * text(height, 42, 27);
+ * }
+ * }
+ *
+ *
- * function setup() {
- * background(200);
- *
- * // Display the canvas' height.
- * text(height, 42, 54);
- *
- * describe('The number 100 written in black on a gray square.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 50);
- *
- * background(200);
- *
- * // Display the canvas' height.
- * text(height, 42, 27);
- *
- * describe('The number 50 written in black on a gray rectangle.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Display the canvas' height.
- * text(height, 42, 54);
- *
- * describe('The number 100 written in black on a gray square. When the mouse is pressed, the square becomes a rectangle and the number becomes 50.');
- * }
- *
- * // If the mouse is pressed, reisze
- * // the canvas and display its new
- * // height.
- * function mousePressed() {
- * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {
- * resizeCanvas(100, 50);
- * background(200);
- * text(height, 42, 27);
- * }
- * }
- *
- *
+ * function setup() {
+ * background(200);
+ *
+ * describe('A gray canvas that switches between default and full-screen display when clicked.');
+ * }
+ *
+ * // If the mouse is pressed,
+ * // toggle full-screen mode.
+ * function mousePressed() {
+ * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {
+ * let fs = fullscreen();
+ * fullscreen(!fs);
+ * }
+ * }
+ *
+ *
- * function setup() {
- * background(200);
- *
- * describe('A gray canvas that switches between default and full-screen display when clicked.');
- * }
- *
- * // If the mouse is pressed,
- * // toggle full-screen mode.
- * function mousePressed() {
- * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {
- * let fs = fullscreen();
- * fullscreen(!fs);
- * }
- * }
- *
- *
+ * function setup() {
+ * // Set the pixel density to 1.
+ * pixelDensity(1);
+ *
+ * // Create a canvas and draw
+ * // a circle.
+ * createCanvas(100, 100);
+ * background(200);
+ * circle(50, 50, 70);
+ *
+ * describe('A fuzzy white circle on a gray canvas.');
+ * }
+ *
+ *
+ * function setup() {
+ * // Set the pixel density to 3.
+ * pixelDensity(3);
+ *
+ * // Create a canvas, paint the
+ * // background, and draw a
+ * // circle.
+ * createCanvas(100, 100);
+ * background(200);
+ * circle(50, 50, 70);
+ *
+ * describe('A sharp white circle on a gray canvas.');
+ * }
+ *
+ *
+ * function setup() {
+ * // Set the pixel density to 1.
+ * pixelDensity(1);
+ *
+ * // Create a canvas and draw
+ * // a circle.
+ * createCanvas(100, 100);
+ * background(200);
+ * circle(50, 50, 70);
+ *
+ * describe('A fuzzy white circle drawn on a gray background. The circle becomes sharper when the mouse is pressed.');
+ * }
+ *
+ * function mousePressed() {
+ * // Get the current display density.
+ * let d = displayDensity();
+ *
+ * // Use the display density to set
+ * // the sketch's pixel density.
+ * pixelDensity(d);
+ *
+ * // Paint the background and
+ * // draw a circle.
+ * background(200);
+ * circle(50, 50, 70);
+ * }
+ *
+ *
- * function setup() {
- * // Set the pixel density to 1.
- * pixelDensity(1);
- *
- * // Create a canvas and draw
- * // a circle.
- * createCanvas(100, 100);
- * background(200);
- * circle(50, 50, 70);
- *
- * describe('A fuzzy white circle on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * // Set the pixel density to 3.
- * pixelDensity(3);
- *
- * // Create a canvas, paint the
- * // background, and draw a
- * // circle.
- * createCanvas(100, 100);
- * background(200);
- * circle(50, 50, 70);
- *
- * describe('A sharp white circle on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * // Set the pixel density to 1.
- * pixelDensity(1);
- *
- * // Create a canvas and draw
- * // a circle.
- * createCanvas(100, 100);
- * background(200);
- * circle(50, 50, 70);
- *
- * describe('A fuzzy white circle drawn on a gray background. The circle becomes sharper when the mouse is pressed.');
- * }
- *
- * function mousePressed() {
- * // Get the current display density.
- * let d = displayDensity();
- *
- * // Use the display density to set
- * // the sketch's pixel density.
- * pixelDensity(d);
- *
- * // Paint the background and
- * // draw a circle.
- * background(200);
- * circle(50, 50, 70);
- * }
- *
- *
+ * function setup() {
+ * background(200);
+ *
+ * // Get the sketch's URL
+ * // and display it.
+ * let url = getURL();
+ * textWrap(CHAR);
+ * text(url, 0, 40, 100);
+ *
+ * describe('The URL "https://p5js.org/reference/p5/getURL" written in black on a gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * background(200);
+ *
+ * // Get the sketch's URL path
+ * // and display the first
+ * // part.
+ * let path = getURLPath();
+ * text(path[0], 25, 54);
+ *
+ * describe('The word "reference" written in black on a gray background.');
+ * }
+ *
+ *
+ * // Imagine this sketch is hosted at the following URL:
+ * // https://p5js.org?year=2014&month=May&day=15
+ *
+ * function setup() {
+ * background(200);
+ *
+ * // Get the sketch's URL
+ * // parameters and display
+ * // them.
+ * let params = getURLParams();
+ * text(params.day, 10, 20);
+ * text(params.month, 10, 40);
+ * text(params.year, 10, 60);
+ *
+ * describe('The text "15", "May", and "2014" written in black on separate lines.');
+ * }
+ *
+ *
- * function setup() {
- * background(200);
- *
- * // Get the sketch's URL
- * // and display it.
- * let url = getURL();
- * textWrap(CHAR);
- * text(url, 0, 40, 100);
- *
- * describe('The URL "https://p5js.org/reference/p5/getURL" written in black on a gray background.');
- * }
- *
- *
+ *
+ * function setup() {
+ * createCanvas(150, 150);
+ * let vertices = [
+ * createVector(-20, -20),
+ * createVector(20, -20),
+ * createVector(20, 20),
+ * createVector(-20, 20)
+ * ];
+ *
+ * push();
+ * translate(75, 55);
+ * rotate(PI / 4);
+ *
+ * // Convert world coordinates to screen coordinates
+ * let screenPos = vertices.map(v => worldToScreen(v));
+ * pop();
+ *
+ * background(200);
+ *
+ * stroke(0);
+ * fill(100, 150, 255, 100);
+ * beginShape();
+ * screenPos.forEach(pos => vertex(pos.x, pos.y));
+ * endShape(CLOSE);
+ *
+ * screenPos.forEach((pos, i) => {
+ * fill(0);
+ * textSize(10);
+ * if (i === 0) {
+ * text(i + 1, pos.x + 3, pos.y - 7);
+ * } else if (i === 1) {
+ * text(i + 1, pos.x + 7, pos.y + 2);
+ * } else if (i === 2) {
+ * text(i + 1, pos.x - 2, pos.y + 12);
+ * } else if (i === 3) {
+ * text(i + 1, pos.x - 12, pos.y - 2);
+ * }
+ * });
+ *
+ * fill(0);
+ * noStroke();
+ * textSize(10);
+ * let legendY = height - 35;
+ * screenPos.forEach((pos, i) => {
+ * text(`Vertex ${i + 1}: (${pos.x.toFixed(1)}, ${pos.y.toFixed(1)})`, 5, legendY + i * 10);
+ * });
+ *
+ * describe('A rotating square is transformed and drawn using screen coordinates.');
+ *
+ * }
+ *
+ *
+ * let vertices;
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ * vertices = [
+ * createVector(-25, -25, -25),
+ * createVector(25, -25, -25),
+ * createVector(25, 25, -25),
+ * createVector(-25, 25, -25),
+ * createVector(-25, -25, 25),
+ * createVector(25, -25, 25),
+ * createVector(25, 25, 25),
+ * createVector(-25, 25, 25)
+ * ];
+ *
+ * describe('A rotating cube with points mapped to 2D screen space and displayed as ellipses.');
+ *
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Animate rotation
+ * let rotationX = millis() / 1000;
+ * let rotationY = millis() / 1200;
+ *
+ * push();
+ *
+ * rotateX(rotationX);
+ * rotateY(rotationY);
+ *
+ * // Convert world coordinates to screen coordinates
+ * let screenPos = vertices.map(v => worldToScreen(v));
+ *
+ * pop();
+ *
+ * screenPos.forEach((pos, i) => {
+ *
+ * let screenX = pos.x - width / 2;
+ * let screenY = pos.y - height / 2;
+ * fill(0);
+ * noStroke();
+ * ellipse(screenX, screenY, 3, 3);
+ * });
+ * }
+ *
+ *
- * function setup() {
- * background(200);
- *
- * // Get the sketch's URL path
- * // and display the first
- * // part.
- * let path = getURLPath();
- * text(path[0], 25, 54);
- *
- * describe('The word "reference" written in black on a gray background.');
- * }
- *
- *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ * describe('A rotating square with a line passing through the mouse drawn across it.');
+ * }
+ *
+ * function draw() {
+ * background(220);
+ *
+ * // Move to center and rotate
+ * translate(width/2, height/2);
+ * rotate(millis() / 1000);
+ * rect(-30, -30, 60);
+ *
+ * // Compute the location of the mouse in the coordinates of the square
+ * let localMouse = screenToWorld(createVector(mouseX, mouseY));
+ *
+ * // Draw a line parallel to the local Y axis, passing through the mouse
+ * line(localMouse.x, -30, localMouse.x, 30);
+ * }
+ *
+ *
+ *
- * // Imagine this sketch is hosted at the following URL:
- * // https://p5js.org?year=2014&month=May&day=15
- *
- * function setup() {
- * background(200);
- *
- * // Get the sketch's URL
- * // parameters and display
- * // them.
- * let params = getURLParams();
- * text(params.day, 10, 20);
- * text(params.month, 10, 40);
- * text(params.year, 10, 60);
- *
- * describe('The text "15", "May", and "2014" written in black on separate lines.');
- * }
- *
- *
- * let img;
- *
- * // Load an image and create a p5.Image object.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Draw the image.
- * image(img, 0, 0);
- *
- * describe('A red brick wall.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Draw the circle.
- * circle(50, 50, 40);
- *
- * describe('A white circle on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Paint the background once.
- * background(200);
- *
- * describe(
- * 'A white circle on a gray background. The circle follows the mouse as the user moves, leaving a trail.'
- * );
- * }
- *
- * function draw() {
- * // Draw circles repeatedly.
- * circle(mouseX, mouseY, 40);
- * }
- *
- *
- * let img;
- *
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Draw the image.
- * image(img, 0, 0);
- *
- * describe(
- * 'A white circle on a brick wall. The circle follows the mouse as the user moves, leaving a trail.'
- * );
- * }
- *
- * function draw() {
- * // Style the circle.
- * noStroke();
- *
- * // Draw the circle.
- * circle(mouseX, mouseY, 10);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Paint the background once.
- * background(200);
- *
- * describe(
- * 'A white circle on a gray background. The circle follows the mouse as the user moves, leaving a trail.'
- * );
- * }
- *
- * function draw() {
- * // Draw circles repeatedly.
- * circle(mouseX, mouseY, 40);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A white circle on a gray background. The circle follows the mouse as the user moves.'
- * );
- * }
- *
- * function draw() {
- * // Paint the background repeatedly.
- * background(200);
- *
- * // Draw circles repeatedly.
- * circle(mouseX, mouseY, 40);
- * }
- *
- *
- * // Double-click the canvas to change the circle's color.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A white circle on a gray background. The circle follows the mouse as the user moves. The circle changes color to pink when the user double-clicks.'
- * );
- * }
- *
- * function draw() {
- * // Paint the background repeatedly.
- * background(200);
- *
- * // Draw circles repeatedly.
- * circle(mouseX, mouseY, 40);
- * }
- *
- * // Change the fill color when the user double-clicks.
- * function doubleClicked() {
- * fill('deeppink');
- * }
- *
- *
- * // Double-click to remove the canvas.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A white circle on a gray background. The circle follows the mouse as the user moves. The sketch disappears when the user double-clicks.'
- * );
- * }
- *
- * function draw() {
- * // Paint the background repeatedly.
- * background(200);
- *
- * // Draw circles repeatedly.
- * circle(mouseX, mouseY, 40);
- * }
- *
- * // Remove the sketch when the user double-clicks.
- * function doubleClicked() {
- * remove();
- * }
- *
- *
+ * // Double-click to remove the canvas.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A white circle on a gray background. The circle follows the mouse as the user moves. The sketch disappears when the user double-clicks.'
+ * );
+ * }
+ *
+ * function draw() {
+ * // Paint the background repeatedly.
+ * background(200);
+ *
+ * // Draw circles repeatedly.
+ * circle(mouseX, mouseY, 40);
+ * }
+ *
+ * // Remove the sketch when the user double-clicks.
+ * function doubleClicked() {
+ * remove();
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Draw the circle.
+ * circle(50, 50, 40);
+ *
+ * describe('A white circle on a gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Paint the background once.
+ * background(200);
+ *
+ * describe(
+ * 'A white circle on a gray background. The circle follows the mouse as the user moves, leaving a trail.'
+ * );
+ * }
+ *
+ * function draw() {
+ * // Draw circles repeatedly.
+ * circle(mouseX, mouseY, 40);
+ * }
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Draw the image.
+ * image(img, 0, 0);
+ *
+ * describe(
+ * 'A white circle on a brick wall. The circle follows the mouse as the user moves, leaving a trail.'
+ * );
+ * }
+ *
+ * function draw() {
+ * // Style the circle.
+ * noStroke();
+ *
+ * // Draw the circle.
+ * circle(mouseX, mouseY, 10);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Paint the background once.
+ * background(200);
+ *
+ * describe(
+ * 'A white circle on a gray background. The circle follows the mouse as the user moves, leaving a trail.'
+ * );
+ * }
+ *
+ * function draw() {
+ * // Draw circles repeatedly.
+ * circle(mouseX, mouseY, 40);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A white circle on a gray background. The circle follows the mouse as the user moves.'
+ * );
+ * }
+ *
+ * function draw() {
+ * // Paint the background repeatedly.
+ * background(200);
+ *
+ * // Draw circles repeatedly.
+ * circle(mouseX, mouseY, 40);
+ * }
+ *
+ *
+ * // Double-click the canvas to change the circle's color.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A white circle on a gray background. The circle follows the mouse as the user moves. The circle changes color to pink when the user double-clicks.'
+ * );
+ * }
+ *
+ * function draw() {
+ * // Paint the background repeatedly.
+ * background(200);
+ *
+ * // Draw circles repeatedly.
+ * circle(mouseX, mouseY, 40);
+ * }
+ *
+ * // Change the fill color when the user double-clicks.
+ * function doubleClicked() {
+ * fill('deeppink');
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a button element and
- * // place it beneath the canvas.
- * let btn = createButton('change');
- * btn.position(0, 100);
- *
- * // Call randomColor() when
- * // the button is pressed.
- * btn.mousePressed(randomColor);
- *
- * describe('A gray square with a button that says "change" beneath it. The square changes color when the user presses the button.');
- * }
- *
- * // Paint the background either
- * // red, yellow, blue, or green.
- * function randomColor() {
- * let c = random(['red', 'yellow', 'blue', 'green']);
- * background(c);
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Set the border style for the
- * // canvas.
- * cnv.elt.style.border = '5px dashed deeppink';
- *
- * describe('A gray square with a pink border drawn with dashed lines.');
- * }
- *
- *
- * function setup() {
- * background(200);
- *
- * // Create a div element.
- * let div = createDiv();
- *
- * // Place the div in the top-left corner.
- * div.position(10, 20);
- *
- * // Set its width and height.
- * div.size(80, 60);
- *
- * // Set its background color to white
- * div.style('background-color', 'white');
- *
- * // Align any text to the center.
- * div.style('text-align', 'center');
- *
- * // Set its ID to "container".
- * div.id('container');
- *
- * // Create a paragraph element.
- * let p = createP('p5*js');
- *
- * // Make the div its parent
- * // using its ID "container".
- * p.parent('container');
- *
- * describe('The text "p5*js" written in black at the center of a white rectangle. The rectangle is inside a gray square.');
- * }
- *
- *
- * function setup() {
- * background(200);
- *
- * // Create rectangular div element.
- * let div = createDiv();
- *
- * // Place the div in the top-left corner.
- * div.position(10, 20);
- *
- * // Set its width and height.
- * div.size(80, 60);
- *
- * // Set its background color and align
- * // any text to the center.
- * div.style('background-color', 'white');
- * div.style('text-align', 'center');
- *
- * // Create a paragraph element.
- * let p = createP('p5*js');
- *
- * // Make the div its parent.
- * p.parent(div);
- *
- * describe('The text "p5*js" written in black at the center of a white rectangle. The rectangle is inside a gray square.');
- * }
- *
- *
- * function setup() {
- * background(200);
- *
- * // Create rectangular div element.
- * let div = createDiv();
- *
- * // Place the div in the top-left corner.
- * div.position(10, 20);
- *
- * // Set its width and height.
- * div.size(80, 60);
- *
- * // Set its background color and align
- * // any text to the center.
- * div.style('background-color', 'white');
- * div.style('text-align', 'center');
- *
- * // Create a paragraph element.
- * let p = createP('p5*js');
- *
- * // Make the div its parent
- * // using the underlying
- * // HTMLElement.
- * p.parent(div.elt);
- *
- * describe('The text "p5*js" written in black at the center of a white rectangle. The rectangle is inside a gray square.');
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Set the canvas' ID
- * // to "mycanvas".
- * cnv.id('mycanvas');
- *
- * // Get the canvas' ID.
- * let id = cnv.id();
- * text(id, 24, 54);
- *
- * describe('The text "mycanvas" written in black on a gray background.');
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Add the class "small" to the
- * // canvas element.
- * cnv.class('small');
- *
- * // Get the canvas element's class
- * // and display it.
- * let c = cnv.class();
- * text(c, 35, 54);
- *
- * describe('The word "small" written in black on a gray canvas.');
- *
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call randomColor() when the canvas
- * // is pressed.
- * cnv.mousePressed(randomColor);
- *
- * describe('A gray square changes color when the mouse is pressed.');
- * }
- *
- * // Paint the background either
- * // red, yellow, blue, or green.
- * function randomColor() {
- * let c = random(['red', 'yellow', 'blue', 'green']);
- * background(c);
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call randomColor() when the
- * // canvas is double-clicked.
- * cnv.doubleClicked(randomColor);
- *
- * describe('A gray square changes color when the user double-clicks the canvas.');
- * }
- *
- * // Paint the background either
- * // red, yellow, blue, or green.
- * function randomColor() {
- * let c = random(['red', 'yellow', 'blue', 'green']);
- * background(c);
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call randomColor() when the
- * // mouse wheel moves.
- * cnv.mouseWheel(randomColor);
- *
- * describe('A gray square changes color when the user scrolls the mouse wheel over the canvas.');
- * }
- *
- * // Paint the background either
- * // red, yellow, blue, or green.
- * function randomColor() {
- * let c = random(['red', 'yellow', 'blue', 'green']);
- * background(c);
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call changeBackground() when the
- * // mouse wheel moves.
- * cnv.mouseWheel(changeBackground);
- *
- * describe('A gray square. When the mouse wheel scrolls over the square, it changes color and displays shapes.');
- * }
- *
- * function changeBackground(event) {
- * // Change the background color
- * // based on deltaY.
- * if (event.deltaY > 0) {
- * background('deeppink');
- * } else if (event.deltaY < 0) {
- * background('cornflowerblue');
- * } else {
- * background(200);
- * }
- *
- * // Draw a shape based on deltaX.
- * if (event.deltaX > 0) {
- * circle(50, 50, 20);
- * } else if (event.deltaX < 0) {
- * square(40, 40, 20);
- * }
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call randomColor() when a
- * // mouse press ends.
- * cnv.mouseReleased(randomColor);
- *
- * describe('A gray square changes color when the user releases a mouse press.');
- * }
- *
- * // Paint the background either
- * // red, yellow, blue, or green.
- * function randomColor() {
- * let c = random(['red', 'yellow', 'blue', 'green']);
- * background(c);
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call randomColor() when a
- * // mouse press ends.
- * cnv.mouseClicked(randomColor);
- *
- * describe('A gray square changes color when the user releases a mouse press.');
- * }
- *
- * // Paint the background either
- * // red, yellow, blue, or green.
- * function randomColor() {
- * let c = random(['red', 'yellow', 'blue', 'green']);
- * background(c);
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call randomColor() when the
- * // mouse moves.
- * cnv.mouseMoved(randomColor);
- *
- * describe('A gray square changes color when the mouse moves over the canvas.');
- * }
- *
- * // Paint the background either
- * // red, yellow, blue, or green.
- * function randomColor() {
- * let c = random(['red', 'yellow', 'blue', 'green']);
- * background(c);
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call randomColor() when the
- * // mouse moves onto the canvas.
- * cnv.mouseOver(randomColor);
- *
- * describe('A gray square changes color when the mouse moves onto the canvas.');
- * }
- *
- * // Paint the background either
- * // red, yellow, blue, or green.
- * function randomColor() {
- * let c = random(['red', 'yellow', 'blue', 'green']);
- * background(c);
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call randomColor() when the
- * // mouse moves off the canvas.
- * cnv.mouseOut(randomColor);
- *
- * describe('A gray square changes color when the mouse moves off the canvas.');
- * }
- *
- * // Paint the background either
- * // red, yellow, blue, or green.
- * function randomColor() {
- * let c = random(['red', 'yellow', 'blue', 'green']);
- * background(c);
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call randomColor() when the
- * // user touches the canvas.
- * cnv.touchStarted(randomColor);
- *
- * describe('A gray square changes color when the user touches the canvas.');
- * }
- *
- * // Paint the background either
- * // red, yellow, blue, or green.
- * function randomColor() {
- * let c = random(['red', 'yellow', 'blue', 'green']);
- * background(c);
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call randomColor() when the
- * // user touches the canvas
- * // and moves.
- * cnv.touchMoved(randomColor);
- *
- * describe('A gray square changes color when the user touches the canvas and moves.');
- * }
- *
- * // Paint the background either
- * // red, yellow, blue, or green.
- * function randomColor() {
- * let c = random(['red', 'yellow', 'blue', 'green']);
- * background(c);
- * }
- *
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call randomColor() when the
- * // user touches the canvas,
- * // then lifts their finger.
- * cnv.touchEnded(randomColor);
- *
- * describe('A gray square changes color when the user touches the canvas, then lifts their finger.');
- * }
- *
- * // Paint the background either
- * // red, yellow, blue, or green.
- * function randomColor() {
- * let c = random(['red', 'yellow', 'blue', 'green']);
- * background(c);
- * }
- *
- *
- * // Drag a file over the canvas to test.
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call helloFile() when a
- * // file is dragged over
- * // the canvas.
- * cnv.dragOver(helloFile);
- *
- * describe('A gray square. The text "hello, file" appears when a file is dragged over the square.');
- * }
- *
- * function helloFile() {
- * text('hello, file', 50, 50);
- * }
- *
- *
- * // Drag a file over, then off
- * // the canvas to test.
- *
- * function setup() {
- * // Create a canvas element and
- * // assign it to cnv.
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call byeFile() when a
- * // file is dragged over,
- * // then off the canvas.
- * cnv.dragLeave(byeFile);
- *
- * describe('A gray square. The text "bye, file" appears when a file is dragged over, then off the square.');
- * }
- *
- * function byeFile() {
- * text('bye, file', 50, 50);
- * }
- *
- *
- * let pg;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.Graphics object.
- * pg = createGraphics(50, 50);
- *
- * // Draw to the p5.Graphics object.
- * pg.background(100);
- * pg.circle(25, 25, 20);
- *
- * describe('A dark gray square with a white circle at its center drawn on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Display the p5.Graphics object.
- * image(pg, 25, 25);
- * }
- *
- *
- * // Click the canvas to display the graphics buffer.
- *
- * let pg;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.Graphics object.
- * pg = createGraphics(50, 50);
- *
- * describe('A square appears on a gray background when the user presses the mouse. The square cycles between white and black.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Calculate the background color.
- * let bg = frameCount % 255;
- *
- * // Draw to the p5.Graphics object.
- * pg.background(bg);
- *
- * // Display the p5.Graphics object while
- * // the user presses the mouse.
- * if (mouseIsPressed === true) {
- * image(pg, 25, 25);
- * }
- * }
- *
- *
- * let pg;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.Graphics object.
- * pg = createGraphics(60, 60);
- *
- * describe('A white circle moves downward slowly within a dark square. The circle resets at the top of the dark square when the user presses the mouse.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Translate the p5.Graphics object's coordinate system.
- * // The translation accumulates; the white circle moves.
- * pg.translate(0, 0.1);
- *
- * // Draw to the p5.Graphics object.
- * pg.background(100);
- * pg.circle(30, 0, 10);
- *
- * // Display the p5.Graphics object.
- * image(pg, 20, 20);
- *
- * // Translate the main canvas' coordinate system.
- * // The translation doesn't accumulate; the dark
- * // square is always in the same place.
- * translate(0, 0.1);
- *
- * // Reset the p5.Graphics object when the
- * // user presses the mouse.
- * if (mouseIsPressed === true) {
- * pg.reset();
- * }
- * }
- *
- *
- * let pg;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.Graphics object.
- * pg = createGraphics(60, 60);
- *
- * describe('A white circle at the center of a dark gray square. The image is drawn on a light gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Translate the p5.Graphics object's coordinate system.
- * pg.translate(30, 30);
- *
- * // Draw to the p5.Graphics object.
- * pg.background(100);
- * pg.circle(0, 0, 10);
- *
- * // Display the p5.Graphics object.
- * image(pg, 20, 20);
- *
- * // Reset the p5.Graphics object automatically.
- * pg.reset();
- * }
- *
- *
- * let pg;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.Graphics object using WebGL mode.
- * pg = createGraphics(100, 100, WEBGL);
- *
- * describe("A sphere lit from above with a red light. The sphere's surface becomes glossy while the user clicks and holds the mouse.");
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Add a red point light from the top-right.
- * pg.pointLight(255, 0, 0, 50, -100, 50);
- *
- * // Style the sphere.
- * // It should appear glossy when the
- * // lighting values are reset.
- * pg.noStroke();
- * pg.specularMaterial(255);
- * pg.shininess(100);
- *
- * // Draw the sphere.
- * pg.sphere(30);
- *
- * // Display the p5.Graphics object.
- * image(pg, -50, -50);
- *
- * // Reset the p5.Graphics object when
- * // the user presses the mouse.
- * if (mouseIsPressed === true) {
- * pg.reset();
- * }
- * }
- *
- *
- * let pg;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.Graphics object using WebGL mode.
- * pg = createGraphics(100, 100, WEBGL);
- *
- * describe('A sphere with a glossy surface is lit from the top-right by a red light.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Add a red point light from the top-right.
- * pg.pointLight(255, 0, 0, 50, -100, 50);
- *
- * // Style the sphere.
- * pg.noStroke();
- * pg.specularMaterial(255);
- * pg.shininess(100);
- *
- * // Draw the sphere.
- * pg.sphere(30);
- *
- * // Display the p5.Graphics object.
- * image(pg, 0, 0);
- *
- * // Reset the p5.Graphics object automatically.
- * pg.reset();
- * }
- *
- *
+ * let pg;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.Graphics object.
+ * pg = createGraphics(60, 60);
+ *
+ * describe('A white circle moves downward slowly within a dark square. The circle resets at the top of the dark square when the user presses the mouse.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Translate the p5.Graphics object's coordinate system.
+ * // The translation accumulates; the white circle moves.
+ * pg.translate(0, 0.1);
+ *
+ * // Draw to the p5.Graphics object.
+ * pg.background(100);
+ * pg.circle(30, 0, 10);
+ *
+ * // Display the p5.Graphics object.
+ * image(pg, 20, 20);
+ *
+ * // Translate the main canvas' coordinate system.
+ * // The translation doesn't accumulate; the dark
+ * // square is always in the same place.
+ * translate(0, 0.1);
+ *
+ * // Reset the p5.Graphics object when the
+ * // user presses the mouse.
+ * if (mouseIsPressed === true) {
+ * pg.reset();
+ * }
+ * }
+ *
+ *
+ * let pg;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.Graphics object.
+ * pg = createGraphics(60, 60);
+ *
+ * describe('A white circle at the center of a dark gray square. The image is drawn on a light gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Translate the p5.Graphics object's coordinate system.
+ * pg.translate(30, 30);
+ *
+ * // Draw to the p5.Graphics object.
+ * pg.background(100);
+ * pg.circle(0, 0, 10);
+ *
+ * // Display the p5.Graphics object.
+ * image(pg, 20, 20);
+ *
+ * // Reset the p5.Graphics object automatically.
+ * pg.reset();
+ * }
+ *
+ *
+ * let pg;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.Graphics object using WebGL mode.
+ * pg = createGraphics(100, 100, WEBGL);
+ *
+ * describe("A sphere lit from above with a red light. The sphere's surface becomes glossy while the user clicks and holds the mouse.");
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Add a red point light from the top-right.
+ * pg.pointLight(255, 0, 0, 50, -100, 50);
+ *
+ * // Style the sphere.
+ * // It should appear glossy when the
+ * // lighting values are reset.
+ * pg.noStroke();
+ * pg.specularMaterial(255);
+ * pg.shininess(100);
+ *
+ * // Draw the sphere.
+ * pg.sphere(30);
+ *
+ * // Display the p5.Graphics object.
+ * image(pg, -50, -50);
+ *
+ * // Reset the p5.Graphics object when
+ * // the user presses the mouse.
+ * if (mouseIsPressed === true) {
+ * pg.reset();
+ * }
+ * }
+ *
+ *
+ * let pg;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.Graphics object using WebGL mode.
+ * pg = createGraphics(100, 100, WEBGL);
+ *
+ * describe('A sphere with a glossy surface is lit from the top-right by a red light.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Add a red point light from the top-right.
+ * pg.pointLight(255, 0, 0, 50, -100, 50);
+ *
+ * // Style the sphere.
+ * pg.noStroke();
+ * pg.specularMaterial(255);
+ * pg.shininess(100);
+ *
+ * // Draw the sphere.
+ * pg.sphere(30);
+ *
+ * // Display the p5.Graphics object.
+ * image(pg, 0, 0);
+ *
+ * // Reset the p5.Graphics object automatically.
+ * pg.reset();
+ * }
+ *
+ *
- * // Double-click to remove the p5.Graphics object.
- *
- * let pg;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.Graphics object.
- * pg = createGraphics(60, 60);
- *
- * // Draw to the p5.Graphics object.
- * pg.background(100);
- * pg.circle(30, 30, 20);
- *
- * describe('A white circle at the center of a dark gray square disappears when the user double-clicks.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Display the p5.Graphics object if
- * // it's available.
- * if (pg) {
- * image(pg, 20, 20);
- * }
- * }
- *
- * // Remove the p5.Graphics object when the
- * // the user double-clicks.
- * function doubleClicked() {
- * // Remove the p5.Graphics object from the web page.
- * pg.remove();
- * pg = undefined;
- * }
- *
- *
+ * // Double-click to remove the p5.Graphics object.
+ *
+ * let pg;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.Graphics object.
+ * pg = createGraphics(60, 60);
+ *
+ * // Draw to the p5.Graphics object.
+ * pg.background(100);
+ * pg.circle(30, 30, 20);
+ *
+ * describe('A white circle at the center of a dark gray square disappears when the user double-clicks.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Display the p5.Graphics object if
+ * // it's available.
+ * if (pg) {
+ * image(pg, 20, 20);
+ * }
+ * }
+ *
+ * // Remove the p5.Graphics object when the
+ * // the user double-clicks.
+ * function doubleClicked() {
+ * // Remove the p5.Graphics object from the web page.
+ * pg.remove();
+ * pg = undefined;
+ * }
+ *
+ *
+ * let pg;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.Graphics object.
+ * pg = createGraphics(50, 50);
+ *
+ * // Draw to the p5.Graphics object.
+ * pg.background(100);
+ * pg.circle(25, 25, 20);
+ *
+ * describe('A dark gray square with a white circle at its center drawn on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Display the p5.Graphics object.
+ * image(pg, 25, 25);
+ * }
+ *
+ *
+ * // Click the canvas to display the graphics buffer.
+ *
+ * let pg;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.Graphics object.
+ * pg = createGraphics(50, 50);
+ *
+ * describe('A square appears on a gray background when the user presses the mouse. The square cycles between white and black.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Calculate the background color.
+ * let bg = frameCount % 255;
+ *
+ * // Draw to the p5.Graphics object.
+ * pg.background(bg);
+ *
+ * // Display the p5.Graphics object while
+ * // the user presses the mouse.
+ * if (mouseIsPressed === true) {
+ * image(pg, 25, 25);
+ * }
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * let shape;
+ *
+ * // Load the file and create a p5.Geometry object.
+ * async function setup() {
+ * shape = await loadModel('/assets/teapot.obj');
+ *
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A white teapot drawn against a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Draw the shape.
+ * model(shape);
+ * }
+ *
+ *
+ * let font;
+ *
+ * async function setup() {
+ * // Load a font for WebGL mode.
+ * font = await loadFont('assets/inconsolata.otf');
+ *
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe(
+ * "A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse."
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ * textFont(font);
+ * fill(0);
+ *
+ * // Display the mouse's coordinates.
+ * text(`x: ${mouseX} y: ${mouseY}`, 0, 0);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Draw a diagonal line.
- * line(0, 0, width, height);
- *
- * describe('A diagonal line drawn from top-left to bottom-right on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 50);
- *
- * background(180);
- *
- * // Draw a diagonal line.
- * line(0, 0, width, height);
- *
- * describe('A diagonal line drawn from top-left to bottom-right on a gray background.');
- * }
- *
- *
- * // Use WebGL mode.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(180);
- *
- * // Draw a diagonal line.
- * line(-width / 2, -height / 2, width / 2, height / 2);
- *
- * describe('A diagonal line drawn from top-left to bottom-right on a gray background.');
- * }
- *
- *
- * function setup() {
- * // Create a p5.Render object.
- * let cnv = createCanvas(50, 50);
- *
- * // Position the canvas.
- * cnv.position(10, 20);
- *
- * background(180);
- *
- * // Draw a diagonal line.
- * line(0, 0, width, height);
- *
- * describe('A diagonal line drawn from top-left to bottom-right on a gray background.');
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Draw a diagonal line.
+ * line(0, 0, width, height);
+ *
+ * describe('A diagonal line drawn from top-left to bottom-right on a gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 50);
+ *
+ * background(200);
+ *
+ * // Draw a diagonal line.
+ * line(0, 0, width, height);
+ *
+ * describe('A diagonal line drawn from top-left to bottom-right on a gray background.');
+ * }
+ *
+ *
+ * // Use WebGL mode.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * background(200);
+ *
+ * // Draw a diagonal line.
+ * line(-width / 2, -height / 2, width / 2, height / 2);
+ *
+ * describe('A diagonal line drawn from top-left to bottom-right on a gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * // Create a p5.Render object.
+ * let cnv = createCanvas(50, 50);
+ *
+ * // Position the canvas.
+ * cnv.position(10, 20);
+ *
+ * background(200);
+ *
+ * // Draw a diagonal line.
+ * line(0, 0, width, height);
+ *
+ * describe('A diagonal line drawn from top-left to bottom-right on a gray background.');
+ * }
+ *
+ *
- * // Double-click to resize the canvas.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A white circle drawn on a gray background. The canvas shrinks by half the first time the user double-clicks.'
- * );
- * }
- *
- * function draw() {
- * background(180);
- *
- * // Draw a circle at the center of the canvas.
- * circle(width / 2, height / 2, 20);
- * }
- *
- * // Resize the canvas when the user double-clicks.
- * function doubleClicked() {
- * resizeCanvas(50, 50);
- * }
- *
- *
- * // Resize the web browser to change the canvas size.
- *
- * function setup() {
- * createCanvas(windowWidth, windowHeight);
- *
- * describe('A white circle drawn on a gray background.');
- * }
- *
- * function draw() {
- * background(180);
- *
- * // Draw a circle at the center of the canvas.
- * circle(width / 2, height / 2, 20);
- * }
- *
- * // Always resize the canvas to fill the browser window.
- * function windowResized() {
- * resizeCanvas(windowWidth, windowHeight);
- * }
- *
- *
+ * // Double-click to resize the canvas.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A white circle drawn on a gray background. The canvas shrinks by half the first time the user double-clicks.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw a circle at the center of the canvas.
+ * circle(width / 2, height / 2, 20);
+ * }
+ *
+ * // Resize the canvas when the user double-clicks.
+ * function doubleClicked() {
+ * resizeCanvas(50, 50);
+ * }
+ *
+ *
+ * // Resize the web browser to change the canvas size.
+ *
+ * function setup() {
+ * createCanvas(windowWidth, windowHeight);
+ *
+ * describe('A white circle drawn on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw a circle at the center of the canvas.
+ * circle(width / 2, height / 2, 20);
+ * }
+ *
+ * // Always resize the canvas to fill the browser window.
+ * function windowResized() {
+ * resizeCanvas(windowWidth, windowHeight);
+ * }
+ *
+ *
- * function setup() {
- * noCanvas();
- * }
- *
- *
+ * function setup() {
+ * noCanvas();
+ * }
+ *
+ *
- * // Double-click to draw the contents of the graphics buffer.
- *
- * let pg;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Create the p5.Graphics object.
- * pg = createGraphics(50, 50);
- *
- * // Draw to the graphics buffer.
- * pg.background(100);
- * pg.circle(pg.width / 2, pg.height / 2, 20);
- *
- * describe('A gray square. A smaller, darker square with a white circle at its center appears when the user double-clicks.');
- * }
- *
- * // Display the graphics buffer when the user double-clicks.
- * function doubleClicked() {
- * if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {
- * image(pg, 25, 25);
- * }
- * }
- *
- *
- * // Double-click to draw the contents of the graphics buffer.
- *
- * let pg;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Create the p5.Graphics object in WebGL mode.
- * pg = createGraphics(50, 50, WEBGL);
- *
- * // Draw to the graphics buffer.
- * pg.background(100);
- * pg.lights();
- * pg.noStroke();
- * pg.rotateX(QUARTER_PI);
- * pg.rotateY(QUARTER_PI);
- * pg.torus(15, 5);
- *
- * describe('A gray square. A smaller, darker square with a white torus at its center appears when the user double-clicks.');
- * }
- *
- * // Display the graphics buffer when the user double-clicks.
- * function doubleClicked() {
- * if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {
- * image(pg, 25, 25);
- * }
- * }
- *
- *
+ * // Double-click to draw the contents of the graphics buffer.
+ *
+ * let pg;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create the p5.Graphics object.
+ * pg = createGraphics(50, 50);
+ *
+ * // Draw to the graphics buffer.
+ * pg.background(100);
+ * pg.circle(pg.width / 2, pg.height / 2, 20);
+ *
+ * describe('A gray square. A smaller, darker square with a white circle at its center appears when the user double-clicks.');
+ * }
+ *
+ * // Display the graphics buffer when the user double-clicks.
+ * function doubleClicked() {
+ * if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {
+ * image(pg, 25, 25);
+ * }
+ * }
+ *
+ *
+ * // Double-click to draw the contents of the graphics buffer.
+ *
+ * let pg;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create the p5.Graphics object in WebGL mode.
+ * pg = createGraphics(50, 50, WEBGL);
+ *
+ * // Draw to the graphics buffer.
+ * pg.background(100);
+ * pg.lights();
+ * pg.noStroke();
+ * pg.rotateX(QUARTER_PI);
+ * pg.rotateY(QUARTER_PI);
+ * pg.torus(15, 5);
+ *
+ * describe('A gray square. A smaller, darker square with a white torus at its center appears when the user double-clicks.');
+ * }
+ *
+ * // Display the graphics buffer when the user double-clicks.
+ * function doubleClicked() {
+ * if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {
+ * image(pg, 25, 25);
+ * }
+ * }
+ *
+ *
- * let myBuffer;
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * // Create a p5.Framebuffer object.
- * myBuffer = createFramebuffer();
- *
- * describe('A grid of white toruses rotating against a dark gray background.');
- * }
- *
- * function draw() {
- * background(50);
- *
- * // Start drawing to the p5.Framebuffer object.
- * myBuffer.begin();
- *
- * // Clear the drawing surface.
- * clear();
- *
- * // Turn on the lights.
- * lights();
- *
- * // Rotate the coordinate system.
- * rotateX(frameCount * 0.01);
- * rotateY(frameCount * 0.01);
- *
- * // Style the torus.
- * noStroke();
- *
- * // Draw the torus.
- * torus(20);
- *
- * // Stop drawing to the p5.Framebuffer object.
- * myBuffer.end();
- *
- * // Iterate from left to right.
- * for (let x = -50; x < 50; x += 25) {
- * // Iterate from top to bottom.
- * for (let y = -50; y < 50; y += 25) {
- * // Draw the p5.Framebuffer object to the canvas.
- * image(myBuffer, x, y, 25, 25);
- * }
- * }
- * }
- *
- *
- * let myBuffer;
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * // Create an options object.
- * let options = { width: 25, height: 25 };
- *
- * // Create a p5.Framebuffer object.
- * // Use options for configuration.
- * myBuffer = createFramebuffer(options);
- *
- * describe('A grid of white toruses rotating against a dark gray background.');
- * }
- *
- * function draw() {
- * background(50);
- *
- * // Start drawing to the p5.Framebuffer object.
- * myBuffer.begin();
- *
- * // Clear the drawing surface.
- * clear();
- *
- * // Turn on the lights.
- * lights();
- *
- * // Rotate the coordinate system.
- * rotateX(frameCount * 0.01);
- * rotateY(frameCount * 0.01);
- *
- * // Style the torus.
- * noStroke();
- *
- * // Draw the torus.
- * torus(5, 2.5);
- *
- * // Stop drawing to the p5.Framebuffer object.
- * myBuffer.end();
- *
- * // Iterate from left to right.
- * for (let x = -50; x < 50; x += 25) {
- * // Iterate from top to bottom.
- * for (let y = -50; y < 50; y += 25) {
- * // Draw the p5.Framebuffer object to the canvas.
- * image(myBuffer, x, y);
- * }
- * }
- * }
- *
- *
+ * let myBuffer;
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * // Create a p5.Framebuffer object.
+ * myBuffer = createFramebuffer();
+ *
+ * describe('A grid of white toruses rotating against a dark gray background.');
+ * }
+ *
+ * function draw() {
+ * background(50);
+ *
+ * // Start drawing to the p5.Framebuffer object.
+ * myBuffer.begin();
+ *
+ * // Clear the drawing surface.
+ * clear();
+ *
+ * // Turn on the lights.
+ * lights();
+ *
+ * // Rotate the coordinate system.
+ * rotateX(frameCount * 0.01);
+ * rotateY(frameCount * 0.01);
+ *
+ * // Style the torus.
+ * noStroke();
+ *
+ * // Draw the torus.
+ * torus(20);
+ *
+ * // Stop drawing to the p5.Framebuffer object.
+ * myBuffer.end();
+ *
+ * // Iterate from left to right.
+ * for (let x = -50; x < 50; x += 25) {
+ * // Iterate from top to bottom.
+ * for (let y = -50; y < 50; y += 25) {
+ * // Draw the p5.Framebuffer object to the canvas.
+ * image(myBuffer, x, y, 25, 25);
+ * }
+ * }
+ * }
+ *
+ *
+ * let myBuffer;
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * // Create an options object.
+ * let options = { width: 25, height: 25 };
+ *
+ * // Create a p5.Framebuffer object.
+ * // Use options for configuration.
+ * myBuffer = createFramebuffer(options);
+ *
+ * describe('A grid of white toruses rotating against a dark gray background.');
+ * }
+ *
+ * function draw() {
+ * background(50);
+ *
+ * // Start drawing to the p5.Framebuffer object.
+ * myBuffer.begin();
+ *
+ * // Clear the drawing surface.
+ * clear();
+ *
+ * // Turn on the lights.
+ * lights();
+ *
+ * // Rotate the coordinate system.
+ * rotateX(frameCount * 0.01);
+ * rotateY(frameCount * 0.01);
+ *
+ * // Style the torus.
+ * noStroke();
+ *
+ * // Draw the torus.
+ * torus(5, 2.5);
+ *
+ * // Stop drawing to the p5.Framebuffer object.
+ * myBuffer.end();
+ *
+ * // Iterate from left to right.
+ * for (let x = -50; x < 50; x += 25) {
+ * // Iterate from top to bottom.
+ * for (let y = -50; y < 50; y += 25) {
+ * // Draw the p5.Framebuffer object to the canvas.
+ * image(myBuffer, x, y);
+ * }
+ * }
+ * }
+ *
+ *
- * let previous;
- * let current;
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * // Create the p5.Framebuffer objects.
- * previous = createFramebuffer({ format: FLOAT });
- * current = createFramebuffer({ format: FLOAT });
- *
- * describe(
- * 'A multicolor box drifts from side to side on a white background. It leaves a trail that fades over time.'
- * );
- * }
- *
- * function draw() {
- * // Swap the previous p5.Framebuffer and the
- * // current one so it can be used as a texture.
- * [previous, current] = [current, previous];
- *
- * // Start drawing to the current p5.Framebuffer.
- * current.begin();
- *
- * // Paint the background.
- * background(255);
- *
- * // Draw the previous p5.Framebuffer.
- * // Clear the depth buffer so the previous
- * // frame doesn't block the current one.
- * push();
- * tint(255, 250);
- * image(previous, -50, -50);
- * clearDepth();
- * pop();
- *
- * // Draw the box on top of the previous frame.
- * push();
- * let x = 25 * sin(frameCount * 0.01);
- * let y = 25 * sin(frameCount * 0.02);
- * translate(x, y, 0);
- * rotateX(frameCount * 0.01);
- * rotateY(frameCount * 0.01);
- * normalMaterial();
- * box(12);
- * pop();
- *
- * // Stop drawing to the current p5.Framebuffer.
- * current.end();
- *
- * // Display the current p5.Framebuffer.
- * image(current, -50, -50);
- * }
- *
- *
+ * let previous;
+ * let current;
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * // Create the p5.Framebuffer objects.
+ * previous = createFramebuffer({ format: FLOAT });
+ * current = createFramebuffer({ format: FLOAT });
+ *
+ * describe(
+ * 'A multicolor box drifts from side to side on a white background. It leaves a trail that fades over time.'
+ * );
+ * }
+ *
+ * function draw() {
+ * // Swap the previous p5.Framebuffer and the
+ * // current one so it can be used as a texture.
+ * [previous, current] = [current, previous];
+ *
+ * // Start drawing to the current p5.Framebuffer.
+ * current.begin();
+ *
+ * // Paint the background.
+ * background(255);
+ *
+ * // Draw the previous p5.Framebuffer.
+ * // Clear the depth buffer so the previous
+ * // frame doesn't block the current one.
+ * push();
+ * tint(255, 250);
+ * image(previous, -50, -50);
+ * clearDepth();
+ * pop();
+ *
+ * // Draw the box on top of the previous frame.
+ * push();
+ * let x = 25 * sin(frameCount * 0.01);
+ * let y = 25 * sin(frameCount * 0.02);
+ * translate(x, y, 0);
+ * rotateX(frameCount * 0.01);
+ * rotateY(frameCount * 0.01);
+ * normalMaterial();
+ * box(12);
+ * pop();
+ *
+ * // Stop drawing to the current p5.Framebuffer.
+ * current.end();
+ *
+ * // Display the current p5.Framebuffer.
+ * image(current, -50, -50);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Use the default blend mode.
- * blendMode(BLEND);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('A Sky Blue line and a Deep Rose line form an X on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(HARD_LIGHT);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('An ocean blue line and a hot pink line form an X on a gray background. The area where they overlap is Magenta purple.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(ADD);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('An icy blue line and a light lavender line form an X on a gray background. The area where they overlap is white.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(DARKEST);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('A steel blue line and a cranberry line form an X on a gray background. The area where they overlap is deep purple.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(BURN);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('A cobalt blue line and a burgundy line form an X on a gray background. The area where they overlap is black.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(LIGHTEST);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('A pale lavender line and a soft beige line form an X on a gray background. The area where they overlap is pale lilac.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(EXCLUSION);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('An earthy brown line and a muted sage line form an X on a gray background. The area where they overlap is sage green.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(MULTIPLY);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('A slate blue line and a plum line form an X on a gray background. The area where they overlap is dark Indigo.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(SCREEN);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('A baby blue line and a peach pink line form an X on a gray background. The area where they overlap is misty lilac.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(REPLACE);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('A diagonal deep rose line.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(REMOVE);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('The silhouette of an X is missing from a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(DIFFERENCE);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('A light burgundy line and a forest green line form an X on a gray background. The area where they overlap is dark cocoa.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(OVERLAY);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('A cornflower blue line and a light rose line form an X on a gray background. The area where they overlap is violet.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(SOFT_LIGHT);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('A pale sky line and a rose blush line form an X on a gray background. The area where they overlap is lavender.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Set the blend mode.
- * blendMode(DODGE);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the first line.
- * stroke('#1a85ff');
- * line(25, 25, 75, 75);
- *
- * // Draw the second line.
- * stroke('#d41159');
- * line(75, 25, 25, 75);
- *
- * describe('An aqua blue line and a light pink line form an X on a gray background. The area where they overlap is white.');
- * }
- *
- *
- * function setup() {
- * // Create a canvas with WEBGL mode.
- * createCanvas(100, 100, WEBGL);
- *
- * // Set the background color.
- * background(180);
- *
- * // Set the blend mode to SUBTRACT.
- * blendMode(SUBTRACT);
- *
- * // Style the lines.
- * strokeWeight(30);
- *
- * // Draw the blue line.
- * stroke('#1a85ff');
- * line(-25, -25, 25, 25);
- *
- * // Draw the red line.
- * stroke('#d41159');
- * line(25, -25, -25, 25);
- *
- * describe('A burnt orange and a sea green line form an X on a gray background. The area where they overlap is forest green.');
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Style the circle using shadows.
+ * drawingContext.shadowOffsetX = 5;
+ * drawingContext.shadowOffsetY = -5;
+ * drawingContext.shadowBlur = 10;
+ * drawingContext.shadowColor = 'black';
+ *
+ * // Draw the circle.
+ * circle(50, 50, 40);
+ *
+ * describe("A white circle on a gray background. The circle's edges are shadowy.");
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background('skyblue');
+ *
+ * // Style the circle using a color gradient.
+ * let myGradient = drawingContext.createRadialGradient(50, 50, 3, 50, 50, 40);
+ * myGradient.addColorStop(0, 'yellow');
+ * myGradient.addColorStop(0.6, 'orangered');
+ * myGradient.addColorStop(1, 'yellow');
+ * drawingContext.fillStyle = myGradient;
+ * drawingContext.strokeStyle = 'rgba(0, 0, 0, 0)';
+ *
+ * // Draw the circle.
+ * circle(50, 50, 40);
+ *
+ * describe('A fiery sun drawn on a light blue background.');
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(180);
- *
- * // Style the circle using shadows.
- * drawingContext.shadowOffsetX = 5;
- * drawingContext.shadowOffsetY = -5;
- * drawingContext.shadowBlur = 10;
- * drawingContext.shadowColor = 'black';
- *
- * // Draw the circle.
- * circle(50, 50, 40);
- *
- * describe("A white circle on a gray background. The circle's edges are shadowy.");
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background('skyblue');
- *
- * // Style the circle using a color gradient.
- * let myGradient = drawingContext.createRadialGradient(50, 50, 3, 50, 50, 40);
- * myGradient.addColorStop(0, 'yellow');
- * myGradient.addColorStop(0.6, 'orangered');
- * myGradient.addColorStop(1, 'yellow');
- * drawingContext.fillStyle = myGradient;
- * drawingContext.strokeStyle = 'rgba(0, 0, 0, 0)';
- *
- * // Draw the circle.
- * circle(50, 50, 40);
- *
- * describe('A fiery sun drawn on a light blue background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * arc(50, 50, 80, 80, 0, PI + HALF_PI);
- *
- * describe('A white circle on a gray canvas. The top-right quarter of the circle is missing.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * arc(50, 50, 80, 40, 0, PI + HALF_PI);
- *
- * describe('A white ellipse on a gray canvas. The top-right quarter of the ellipse is missing.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Bottom-right.
- * arc(50, 55, 50, 50, 0, HALF_PI);
- *
- * noFill();
- *
- * // Bottom-left.
- * arc(50, 55, 60, 60, HALF_PI, PI);
- *
- * // Top-left.
- * arc(50, 55, 70, 70, PI, PI + QUARTER_PI);
- *
- * // Top-right.
- * arc(50, 55, 80, 80, PI + QUARTER_PI, TWO_PI);
- *
- * describe(
- * 'A shattered outline of an circle with a quarter of a white circle at the bottom-right.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Default fill mode.
- * arc(50, 50, 80, 80, 0, PI + QUARTER_PI);
- *
- * describe('A white circle with the top-right third missing. The bottom is outlined in black.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // OPEN fill mode.
- * arc(50, 50, 80, 80, 0, PI + QUARTER_PI, OPEN);
- *
- * describe(
- * 'A white circle missing a section from the top-right. The bottom is outlined in black.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // CHORD fill mode.
- * arc(50, 50, 80, 80, 0, PI + QUARTER_PI, CHORD);
- *
- * describe('A white circle with a black outline missing a section from the top-right.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // PIE fill mode.
- * arc(50, 50, 80, 80, 0, PI + QUARTER_PI, PIE);
- *
- * describe('A white circle with a black outline. The top-right third is missing.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * // PIE fill mode.
- * arc(0, 0, 80, 80, 0, PI + QUARTER_PI, PIE);
- *
- * describe('A white circle with a black outline. The top-right third is missing.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * // PIE fill mode with 5 vertices.
- * arc(0, 0, 80, 80, 0, PI + QUARTER_PI, PIE, 5);
- *
- * describe('A white circle with a black outline. The top-right third is missing.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A yellow circle on a black background. The circle opens and closes its mouth.');
- * }
- *
- * function draw() {
- * background(0);
- *
- * // Style the arc.
- * noStroke();
- * fill(255, 255, 0);
- *
- * // Update start and stop angles.
- * let biteSize = PI / 16;
- * let startAngle = biteSize * sin(frameCount * 0.1) + biteSize;
- * let endAngle = TWO_PI - startAngle;
- *
- * // Draw the arc.
- * arc(50, 50, 80, 80, startAngle, endAngle, PIE);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * ellipse(50, 50, 80, 80);
- *
- * describe('A white circle on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * ellipse(50, 50, 80);
- *
- * describe('A white circle on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * ellipse(50, 50, 80, 40);
- *
- * describe('A white ellipse on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * ellipse(0, 0, 80, 40);
- *
- * describe('A white ellipse on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * // Use 6 vertices.
- * ellipse(0, 0, 80, 40, 6);
- *
- * describe('A white hexagon on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * circle(50, 50, 25);
- *
- * describe('A white circle with black outline in the middle of a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * circle(0, 0, 25);
- *
- * describe('A white circle with black outline in the middle of a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * line(30, 20, 85, 75);
- *
- * describe(
- * 'A black line on a gray canvas running from top-center to bottom-right.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the line.
- * stroke('magenta');
- * strokeWeight(5);
- *
- * line(30, 20, 85, 75);
- *
- * describe(
- * 'A thick, magenta line on a gray canvas running from top-center to bottom-right.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Top.
- * line(30, 20, 85, 20);
- *
- * // Right.
- * stroke(126);
- * line(85, 20, 85, 75);
- *
- * // Bottom.
- * stroke(255);
- * line(85, 75, 30, 75);
- *
- * describe(
- * 'Three lines drawn in grayscale on a gray canvas. They form the top, right, and bottom sides of a square.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * line(-20, -30, 35, 25);
- *
- * describe(
- * 'A black line on a gray canvas running from top-center to bottom-right.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A black line connecting two spheres. The scene spins slowly.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate around the y-axis.
- * rotateY(frameCount * 0.01);
- *
- * // Draw a line.
- * line(0, 0, 0, 30, 20, -10);
- *
- * // Draw the center sphere.
- * sphere(10);
- *
- * // Translate to the second point.
- * translate(30, 20, -10);
- *
- * // Draw the bottom-right sphere.
- * sphere(10);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Top-left.
- * point(30, 20);
- *
- * // Top-right.
- * point(85, 20);
- *
- * // Bottom-right.
- * point(85, 75);
- *
- * // Bottom-left.
- * point(30, 75);
- *
- * describe(
- * 'Four small, black points drawn on a gray canvas. The points form the corners of a square.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Top-left.
- * point(30, 20);
- *
- * // Top-right.
- * point(70, 20);
- *
- * // Style the next points.
- * stroke('purple');
- * strokeWeight(10);
- *
- * // Bottom-right.
- * point(70, 80);
- *
- * // Bottom-left.
- * point(30, 80);
- *
- * describe(
- * 'Four points drawn on a gray canvas. Two are black and two are purple. The points form the corners of a square.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Top-left.
- * let a = createVector(30, 20);
- * point(a);
- *
- * // Top-right.
- * let b = createVector(70, 20);
- * point(b);
- *
- * // Bottom-right.
- * let c = createVector(70, 80);
- * point(c);
- *
- * // Bottom-left.
- * let d = createVector(30, 80);
- * point(d);
- *
- * describe(
- * 'Four small, black points drawn on a gray canvas. The points form the corners of a square.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('Two purple points drawn on a gray canvas.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the points.
- * stroke('purple');
- * strokeWeight(10);
- *
- * // Top-left.
- * point(-20, -30);
- *
- * // Bottom-right.
- * point(20, 30);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('Two purple points drawn on a gray canvas. The scene spins slowly.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate around the y-axis.
- * rotateY(frameCount * 0.01);
- *
- * // Style the points.
- * stroke('purple');
- * strokeWeight(10);
- *
- * // Top-left.
- * point(-20, -30, 0);
- *
- * // Bottom-right.
- * point(20, 30, -50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * quad(20, 20, 80, 20, 80, 80, 20, 80);
- *
- * describe('A white square with a black outline drawn on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * quad(20, 30, 80, 30, 80, 70, 20, 70);
- *
- * describe('A white rectangle with a black outline drawn on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * quad(50, 62, 86, 50, 50, 38, 14, 50);
- *
- * describe('A white rhombus with a black outline drawn on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * quad(20, 50, 80, 30, 80, 70, 20, 70);
- *
- * describe('A white trapezoid with a black outline drawn on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * quad(-30, -30, 30, -30, 30, 30, -30, 30);
- *
- * describe('A white square with a black outline drawn on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A wavy white surface spins around on gray canvas.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate around the y-axis.
- * rotateY(frameCount * 0.01);
- *
- * // Draw the quad.
- * quad(-30, -30, 0, 30, -30, 0, 30, 30, 20, -30, 30, -20);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * rect(30, 20, 55, 55);
- *
- * describe('A white square with a black outline on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * rect(30, 20, 55, 40);
- *
- * describe('A white rectangle with a black outline on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Give all corners a radius of 20.
- * rect(30, 20, 55, 50, 20);
- *
- * describe('A white rectangle with a black outline and round edges on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Give each corner a unique radius.
- * rect(30, 20, 55, 50, 20, 15, 10, 5);
- *
- * describe('A white rectangle with a black outline and round edges of different radii.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * rect(-20, -30, 55, 55);
- *
- * describe('A white square with a black outline on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white square spins around on gray canvas.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate around the y-axis.
- * rotateY(frameCount * 0.01);
- *
- * // Draw the rectangle.
- * rect(-20, -30, 55, 55);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * square(30, 20, 55);
- *
- * describe('A white square with a black outline in on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Give all corners a radius of 20.
- * square(30, 20, 55, 20);
- *
- * describe(
- * 'A white square with a black outline and round edges on a gray canvas.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Give each corner a unique radius.
- * square(30, 20, 55, 20, 15, 10, 5);
- *
- * describe('A white square with a black outline and round edges of different radii.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * square(-20, -30, 55);
- *
- * describe('A white square with a black outline in on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white square spins around on gray canvas.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate around the y-axis.
- * rotateY(frameCount * 0.01);
- *
- * // Draw the square.
- * square(-20, -30, 55);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * triangle(30, 75, 58, 20, 86, 75);
- *
- * describe('A white triangle with a black outline on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * triangle(-20, 25, 8, -30, 36, 25);
- *
- * describe('A white triangle with a black outline on a gray canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white triangle spins around on a gray canvas.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate around the y-axis.
- * rotateY(frameCount * 0.01);
- *
- * // Draw the triangle.
- * triangle(-20, 25, 8, -30, 36, 25);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // White ellipse.
- * ellipseMode(RADIUS);
- * fill(255);
- * ellipse(50, 50, 30, 30);
- *
- * // Gray ellipse.
- * ellipseMode(CENTER);
- * fill(100);
- * ellipse(50, 50, 30, 30);
- *
- * describe('A white circle with a gray circle at its center. Both circles have black outlines.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // White ellipse.
- * ellipseMode(CORNER);
- * fill(255);
- * ellipse(25, 25, 50, 50);
- *
- * // Gray ellipse.
- * ellipseMode(CORNERS);
- * fill(100);
- * ellipse(25, 25, 50, 50);
- *
- * describe('A white circle with a gray circle at its top-left corner. Both circles have black outlines.');
- * }
- *
- *
- * let heart;
- *
- * // Load a pixelated heart image from an image data string.
- * function preload() {
- * heart = loadImage('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAAXNSR0IArs4c6QAAAEZJREFUGFd9jcsNACAIQ9tB2MeR3YdBMBBq8CIXPi2vBICIiOwkOedatllqWO6Y8yOWoyuNf1GZwgmf+RRG2YXr+xVFmA8HZ9Mx/KGPMtcAAAAASUVORK5CYII=');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Antialiased hearts.
- * image(heart, 10, 10);
- * image(heart, 20, 10, 16, 16);
- * image(heart, 40, 10, 32, 32);
- *
- * // Aliased hearts.
- * noSmooth();
- * image(heart, 10, 60);
- * image(heart, 20, 60, 16, 16);
- * image(heart, 40, 60, 32, 32);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * circle(0, 0, 80);
- *
- * describe('A white circle on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * // Disable smoothing.
- * noSmooth();
- *
- * background(200);
- *
- * circle(0, 0, 80);
- *
- * describe('A pixelated white circle on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * rectMode(CORNER);
- * fill(255);
- * rect(25, 25, 50, 50);
- *
- * rectMode(CORNERS);
- * fill(100);
- * rect(25, 25, 50, 50);
- *
- * describe('A small gray square drawn at the top-left corner of a white square.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * rectMode(RADIUS);
- * fill(255);
- * rect(50, 50, 30, 30);
- *
- * rectMode(CENTER);
- * fill(100);
- * rect(50, 50, 30, 30);
- *
- * describe('A small gray square drawn at the center of a white square.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * rectMode(CORNER);
- * fill(255);
- * square(25, 25, 50);
- *
- * describe('A white square.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * rectMode(RADIUS);
- * fill(255);
- * square(50, 50, 30);
- *
- * rectMode(CENTER);
- * fill(100);
- * square(50, 50, 30);
- *
- * describe('A small gray square drawn at the center of a white square.');
- * }
- *
- *
- * let heart;
- *
- * // Load a pixelated heart image from an image data string.
- * function preload() {
- * heart = loadImage('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAAXNSR0IArs4c6QAAAEZJREFUGFd9jcsNACAIQ9tB2MeR3YdBMBBq8CIXPi2vBICIiOwkOedatllqWO6Y8yOWoyuNf1GZwgmf+RRG2YXr+xVFmA8HZ9Mx/KGPMtcAAAAASUVORK5CYII=');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Antialiased hearts.
- * image(heart, 10, 10);
- * image(heart, 20, 10, 16, 16);
- * image(heart, 40, 10, 32, 32);
- *
- * // Aliased hearts.
- * noSmooth();
- * image(heart, 10, 60);
- * image(heart, 20, 60, 16, 16);
- * image(heart, 40, 60, 32, 32);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * circle(0, 0, 80);
- *
- * describe('A white circle on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * // Disable smoothing.
- * noSmooth();
- *
- * background(200);
- *
- * circle(0, 0, 80);
- *
- * describe('A pixelated white circle on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * strokeWeight(12);
- *
- * // Top.
- * strokeCap(ROUND);
- * line(20, 30, 80, 30);
- *
- * // Middle.
- * strokeCap(SQUARE);
- * line(20, 50, 80, 50);
- *
- * // Bottom.
- * strokeCap(PROJECT);
- * line(20, 70, 80, 70);
- *
- * describe(
- * 'Three horizontal lines. The top line has rounded ends, the middle line has squared ends, and the bottom line has longer, squared ends.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the line.
- * noFill();
- * strokeWeight(10);
- * strokeJoin(MITER);
- *
- * // Draw the line.
- * beginShape();
- * vertex(35, 20);
- * vertex(65, 50);
- * vertex(35, 80);
- * endShape();
- *
- * describe('A right-facing arrowhead shape with a pointed tip in center of canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the line.
- * noFill();
- * strokeWeight(10);
- * strokeJoin(BEVEL);
- *
- * // Draw the line.
- * beginShape();
- * vertex(35, 20);
- * vertex(65, 50);
- * vertex(35, 80);
- * endShape();
- *
- * describe('A right-facing arrowhead shape with a flat tip in center of canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the line.
- * noFill();
- * strokeWeight(10);
- * strokeJoin(ROUND);
- *
- * // Draw the line.
- * beginShape();
- * vertex(35, 20);
- * vertex(65, 50);
- * vertex(35, 80);
- * endShape();
- *
- * describe('A right-facing arrowhead shape with a rounded tip in center of canvas.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Top.
- * line(20, 20, 80, 20);
- *
- * // Middle.
- * strokeWeight(4);
- * line(20, 40, 80, 40);
- *
- * // Bottom.
- * strokeWeight(10);
- * line(20, 70, 80, 70);
- *
- * describe('Three horizontal black lines. The top line is thin, the middle is medium, and the bottom is thick.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Top.
- * line(20, 20, 80, 20);
- *
- * // Scale by a factor of 5.
- * scale(5);
- *
- * // Bottom. Coordinates are adjusted for scaling.
- * line(4, 8, 16, 8);
- *
- * describe('Two horizontal black lines. The top line is thin and the bottom is five times thicker than the top.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Draw the anchor points in black.
- * stroke(0);
- * strokeWeight(5);
- * point(85, 20);
- * point(15, 80);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(10, 10);
- * point(90, 90);
- *
- * // Draw a black bezier curve.
- * noFill();
- * stroke(0);
- * strokeWeight(1);
- * bezier(85, 20, 10, 10, 90, 90, 15, 80);
- *
- * // Draw red lines from the anchor points to the control points.
- * stroke(255, 0, 0);
- * line(85, 20, 10, 10);
- * line(15, 80, 90, 90);
- *
- * describe(
- * 'A gray square with three curves. A black s-curve has two straight, red lines that extend from its ends. The endpoints of all the curves are marked with dots.'
- * );
- * }
- *
- *
- * // Click the mouse near the red dot in the top-left corner
- * // and drag to change the curve's shape.
- *
- * let x2 = 10;
- * let y2 = 10;
- * let isChanging = false;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with three curves. A black s-curve has two straight, red lines that extend from its ends. The endpoints of all the curves are marked with dots.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw the anchor points in black.
- * stroke(0);
- * strokeWeight(5);
- * point(85, 20);
- * point(15, 80);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(x2, y2);
- * point(90, 90);
- *
- * // Draw a black bezier curve.
- * noFill();
- * stroke(0);
- * strokeWeight(1);
- * bezier(85, 20, x2, y2, 90, 90, 15, 80);
- *
- * // Draw red lines from the anchor points to the control points.
- * stroke(255, 0, 0);
- * line(85, 20, x2, y2);
- * line(15, 80, 90, 90);
- * }
- *
- * // Start changing the first control point if the user clicks near it.
- * function mousePressed() {
- * if (dist(mouseX, mouseY, x2, y2) < 20) {
- * isChanging = true;
- * }
- * }
- *
- * // Stop changing the first control point when the user releases the mouse.
- * function mouseReleased() {
- * isChanging = false;
- * }
- *
- * // Update the first control point while the user drags the mouse.
- * function mouseDragged() {
- * if (isChanging === true) {
- * x2 = mouseX;
- * y2 = mouseY;
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background('skyblue');
- *
- * // Draw the red balloon.
- * fill('red');
- * bezier(50, 60, 5, 15, 95, 15, 50, 60);
- *
- * // Draw the balloon string.
- * line(50, 60, 50, 80);
- *
- * describe('A red balloon in a blue sky.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A red balloon in a blue sky. The balloon rotates slowly, revealing that it is flat.');
- * }
- *
- * function draw() {
- * background('skyblue');
- *
- * // Rotate around the y-axis.
- * rotateY(frameCount * 0.01);
- *
- * // Draw the red balloon.
- * fill('red');
- * bezier(0, 0, 0, -45, -45, 0, 45, -45, 0, 0, 0, 0);
- *
- * // Draw the balloon string.
- * line(0, 0, 0, 0, 20, 0);
- * }
- *
- *
- * // Draw the original curve.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Draw the anchor points in black.
- * stroke(0);
- * strokeWeight(5);
- * point(85, 20);
- * point(15, 80);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(10, 10);
- * point(90, 90);
- *
- * // Draw a black bezier curve.
- * noFill();
- * stroke(0);
- * strokeWeight(1);
- * bezier(85, 20, 10, 10, 90, 90, 15, 80);
- *
- * // Draw red lines from the anchor points to the control points.
- * stroke(255, 0, 0);
- * line(85, 20, 10, 10);
- * line(15, 80, 90, 90);
- *
- * describe(
- * 'A gray square with three curves. A black s-curve has two straight, red lines that extend from its ends. The endpoints of all the curves are marked with dots.'
- * );
- * }
- *
- *
- * // Draw the curve with less detail.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * // Set the curveDetail() to 5.
- * bezierDetail(5);
- *
- * // Draw the anchor points in black.
- * stroke(0);
- * strokeWeight(5);
- * point(35, -30, 0);
- * point(-35, 30, 0);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(-40, -40, 0);
- * point(40, 40, 0);
- *
- * // Draw a black bezier curve.
- * noFill();
- * stroke(0);
- * strokeWeight(1);
- * bezier(35, -30, 0, -40, -40, 0, 40, 40, 0, -35, 30, 0);
- *
- * // Draw red lines from the anchor points to the control points.
- * stroke(255, 0, 0);
- * line(35, -30, -40, -40);
- * line(-35, 30, 40, 40);
- *
- * describe(
- * 'A gray square with three curves. A black s-curve is drawn with jagged segments. Two straight, red lines that extend from its ends. The endpoints of all the curves are marked with dots.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Set the coordinates for the curve's anchor and control points.
- * let x1 = 85;
- * let x2 = 10;
- * let x3 = 90;
- * let x4 = 15;
- * let y1 = 20;
- * let y2 = 10;
- * let y3 = 90;
- * let y4 = 80;
- *
- * // Style the curve.
- * noFill();
- *
- * // Draw the curve.
- * bezier(x1, y1, x2, y2, x3, y3, x4, y4);
- *
- * // Draw circles along the curve's path.
- * fill(255);
- *
- * // Top-right.
- * let x = bezierPoint(x1, x2, x3, x4, 0);
- * let y = bezierPoint(y1, y2, y3, y4, 0);
- * circle(x, y, 5);
- *
- * // Center.
- * x = bezierPoint(x1, x2, x3, x4, 0.5);
- * y = bezierPoint(y1, y2, y3, y4, 0.5);
- * circle(x, y, 5);
- *
- * // Bottom-left.
- * x = bezierPoint(x1, x2, x3, x4, 1);
- * y = bezierPoint(y1, y2, y3, y4, 1);
- * circle(x, y, 5);
- *
- * describe('A black s-curve on a gray square. The endpoints and center of the curve are marked with white circles.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A black s-curve on a gray square. A white circle moves back and forth along the curve.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Set the coordinates for the curve's anchor and control points.
- * let x1 = 85;
- * let x2 = 10;
- * let x3 = 90;
- * let x4 = 15;
- * let y1 = 20;
- * let y2 = 10;
- * let y3 = 90;
- * let y4 = 80;
- *
- * // Draw the curve.
- * noFill();
- * bezier(x1, y1, x2, y2, x3, y3, x4, y4);
- *
- * // Calculate the circle's coordinates.
- * let t = 0.5 * sin(frameCount * 0.01) + 0.5;
- * let x = bezierPoint(x1, x2, x3, x4, t);
- * let y = bezierPoint(y1, y2, y3, y4, t);
- *
- * // Draw the circle.
- * fill(255);
- * circle(x, y, 5);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Set the coordinates for the curve's anchor and control points.
- * let x1 = 85;
- * let x2 = 10;
- * let x3 = 90;
- * let x4 = 15;
- * let y1 = 20;
- * let y2 = 10;
- * let y3 = 90;
- * let y4 = 80;
- *
- * // Style the curve.
- * noFill();
- *
- * // Draw the curve.
- * bezier(x1, y1, x2, y2, x3, y3, x4, y4);
- *
- * // Draw tangents along the curve's path.
- * fill(255);
- *
- * // Top-right circle.
- * stroke(0);
- * let x = bezierPoint(x1, x2, x3, x4, 0);
- * let y = bezierPoint(y1, y2, y3, y4, 0);
- * circle(x, y, 5);
- *
- * // Top-right tangent line.
- * // Scale the tangent point to draw a shorter line.
- * stroke(255, 0, 0);
- * let tx = 0.1 * bezierTangent(x1, x2, x3, x4, 0);
- * let ty = 0.1 * bezierTangent(y1, y2, y3, y4, 0);
- * line(x + tx, y + ty, x - tx, y - ty);
- *
- * // Center circle.
- * stroke(0);
- * x = bezierPoint(x1, x2, x3, x4, 0.5);
- * y = bezierPoint(y1, y2, y3, y4, 0.5);
- * circle(x, y, 5);
- *
- * // Center tangent line.
- * // Scale the tangent point to draw a shorter line.
- * stroke(255, 0, 0);
- * tx = 0.1 * bezierTangent(x1, x2, x3, x4, 0.5);
- * ty = 0.1 * bezierTangent(y1, y2, y3, y4, 0.5);
- * line(x + tx, y + ty, x - tx, y - ty);
- *
- * // Bottom-left circle.
- * stroke(0);
- * x = bezierPoint(x1, x2, x3, x4, 1);
- * y = bezierPoint(y1, y2, y3, y4, 1);
- * circle(x, y, 5);
- *
- * // Bottom-left tangent.
- * // Scale the tangent point to draw a shorter line.
- * stroke(255, 0, 0);
- * tx = 0.1 * bezierTangent(x1, x2, x3, x4, 1);
- * ty = 0.1 * bezierTangent(y1, y2, y3, y4, 1);
- * line(x + tx, y + ty, x - tx, y - ty);
- *
- * describe(
- * 'A black s-curve on a gray square. The endpoints and center of the curve are marked with white circles. Red tangent lines extend from the white circles.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Draw a black spline curve.
- * noFill();
- * strokeWeight(1);
- * stroke(0);
- * curve(5, 26, 73, 24, 73, 61, 15, 65);
- *
- * // Draw red spline curves from the anchor points to the control points.
- * stroke(255, 0, 0);
- * curve(5, 26, 5, 26, 73, 24, 73, 61);
- * curve(73, 24, 73, 61, 15, 65, 15, 65);
- *
- * // Draw the anchor points in black.
- * strokeWeight(5);
- * stroke(0);
- * point(73, 24);
- * point(73, 61);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(5, 26);
- * point(15, 65);
- *
- * describe(
- * 'A gray square with a curve drawn in three segments. The curve is a sideways U shape with red segments on top and bottom, and a black segment on the right. The endpoints of all the segments are marked with dots.'
- * );
- * }
- *
- *
- * let x1 = 5;
- * let y1 = 26;
- * let isChanging = false;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a curve drawn in three segments. The curve is a sideways U shape with red segments on top and bottom, and a black segment on the right. The endpoints of all the segments are marked with dots.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw a black spline curve.
- * noFill();
- * strokeWeight(1);
- * stroke(0);
- * curve(x1, y1, 73, 24, 73, 61, 15, 65);
- *
- * // Draw red spline curves from the anchor points to the control points.
- * stroke(255, 0, 0);
- * curve(x1, y1, x1, y1, 73, 24, 73, 61);
- * curve(73, 24, 73, 61, 15, 65, 15, 65);
- *
- * // Draw the anchor points in black.
- * strokeWeight(5);
- * stroke(0);
- * point(73, 24);
- * point(73, 61);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(x1, y1);
- * point(15, 65);
- * }
- *
- * // Start changing the first control point if the user clicks near it.
- * function mousePressed() {
- * if (dist(mouseX, mouseY, x1, y1) < 20) {
- * isChanging = true;
- * }
- * }
- *
- * // Stop changing the first control point when the user releases the mouse.
- * function mouseReleased() {
- * isChanging = false;
- * }
- *
- * // Update the first control point while the user drags the mouse.
- * function mouseDragged() {
- * if (isChanging === true) {
- * x1 = mouseX;
- * y1 = mouseY;
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background('skyblue');
- *
- * // Draw the red balloon.
- * fill('red');
- * curve(-150, 275, 50, 60, 50, 60, 250, 275);
- *
- * // Draw the balloon string.
- * line(50, 60, 50, 80);
- *
- * describe('A red balloon in a blue sky.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A red balloon in a blue sky.');
- * }
- *
- * function draw() {
- * background('skyblue');
- *
- * // Rotate around the y-axis.
- * rotateY(frameCount * 0.01);
- *
- * // Draw the red balloon.
- * fill('red');
- * curve(-200, 225, 0, 0, 10, 0, 0, 10, 0, 200, 225, 0);
- *
- * // Draw the balloon string.
- * line(0, 10, 0, 0, 30, 0);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Draw a black spline curve.
- * noFill();
- * strokeWeight(1);
- * stroke(0);
- * curve(5, 26, 73, 24, 73, 61, 15, 65);
- *
- * // Draw red spline curves from the anchor points to the control points.
- * stroke(255, 0, 0);
- * curve(5, 26, 5, 26, 73, 24, 73, 61);
- * curve(73, 24, 73, 61, 15, 65, 15, 65);
- *
- * // Draw the anchor points in black.
- * strokeWeight(5);
- * stroke(0);
- * point(73, 24);
- * point(73, 61);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(5, 26);
- * point(15, 65);
- *
- * describe(
- * 'A gray square with a curve drawn in three segments. The curve is a sideways U shape with red segments on top and bottom, and a black segment on the right. The endpoints of all the segments are marked with dots.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * // Set the curveDetail() to 3.
- * curveDetail(3);
- *
- * // Draw a black spline curve.
- * noFill();
- * strokeWeight(1);
- * stroke(0);
- * curve(-45, -24, 0, 23, -26, 0, 23, 11, 0, -35, 15, 0);
- *
- * // Draw red spline curves from the anchor points to the control points.
- * stroke(255, 0, 0);
- * curve(-45, -24, 0, -45, -24, 0, 23, -26, 0, 23, 11, 0);
- * curve(23, -26, 0, 23, 11, 0, -35, 15, 0, -35, 15, 0);
- *
- * // Draw the anchor points in black.
- * strokeWeight(5);
- * stroke(0);
- * point(23, -26);
- * point(23, 11);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(-45, -24);
- * point(-35, 15);
- *
- * describe(
- * 'A gray square with a jagged curve drawn in three segments. The curve is a sideways U shape with red segments on top and bottom, and a black segment on the right. The endpoints of all the segments are marked with dots.'
- * );
- * }
- *
- *
- * // Move the mouse left and right to see the curve change.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A black curve forms a sideways U shape. The curve deforms as the user moves the mouse from left to right');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Set the curve's tightness using the mouse.
- * let t = map(mouseX, 0, 100, -5, 5, true);
- * curveTightness(t);
- *
- * // Draw the curve.
- * noFill();
- * beginShape();
- * curveVertex(10, 26);
- * curveVertex(10, 26);
- * curveVertex(83, 24);
- * curveVertex(83, 61);
- * curveVertex(25, 65);
- * curveVertex(25, 65);
- * endShape();
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Set the coordinates for the curve's anchor and control points.
- * let x1 = 5;
- * let y1 = 26;
- * let x2 = 73;
- * let y2 = 24;
- * let x3 = 73;
- * let y3 = 61;
- * let x4 = 15;
- * let y4 = 65;
- *
- * // Draw the curve.
- * noFill();
- * curve(x1, y1, x2, y2, x3, y3, x4, y4);
- *
- * // Draw circles along the curve's path.
- * fill(255);
- *
- * // Top.
- * let x = curvePoint(x1, x2, x3, x4, 0);
- * let y = curvePoint(y1, y2, y3, y4, 0);
- * circle(x, y, 5);
- *
- * // Center.
- * x = curvePoint(x1, x2, x3, x4, 0.5);
- * y = curvePoint(y1, y2, y3, y4, 0.5);
- * circle(x, y, 5);
- *
- * // Bottom.
- * x = curvePoint(x1, x2, x3, x4, 1);
- * y = curvePoint(y1, y2, y3, y4, 1);
- * circle(x, y, 5);
- *
- * describe('A black curve on a gray square. The endpoints and center of the curve are marked with white circles.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A black curve on a gray square. A white circle moves back and forth along the curve.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Set the coordinates for the curve's anchor and control points.
- * let x1 = 5;
- * let y1 = 26;
- * let x2 = 73;
- * let y2 = 24;
- * let x3 = 73;
- * let y3 = 61;
- * let x4 = 15;
- * let y4 = 65;
- *
- * // Draw the curve.
- * noFill();
- * curve(x1, y1, x2, y2, x3, y3, x4, y4);
- *
- * // Calculate the circle's coordinates.
- * let t = 0.5 * sin(frameCount * 0.01) + 0.5;
- * let x = curvePoint(x1, x2, x3, x4, t);
- * let y = curvePoint(y1, y2, y3, y4, t);
- *
- * // Draw the circle.
- * fill(255);
- * circle(x, y, 5);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Set the coordinates for the curve's anchor and control points.
- * let x1 = 5;
- * let y1 = 26;
- * let x2 = 73;
- * let y2 = 24;
- * let x3 = 73;
- * let y3 = 61;
- * let x4 = 15;
- * let y4 = 65;
- *
- * // Draw the curve.
- * noFill();
- * curve(x1, y1, x2, y2, x3, y3, x4, y4);
- *
- * // Draw tangents along the curve's path.
- * fill(255);
- *
- * // Top circle.
- * stroke(0);
- * let x = curvePoint(x1, x2, x3, x4, 0);
- * let y = curvePoint(y1, y2, y3, y4, 0);
- * circle(x, y, 5);
- *
- * // Top tangent line.
- * // Scale the tangent point to draw a shorter line.
- * stroke(255, 0, 0);
- * let tx = 0.2 * curveTangent(x1, x2, x3, x4, 0);
- * let ty = 0.2 * curveTangent(y1, y2, y3, y4, 0);
- * line(x + tx, y + ty, x - tx, y - ty);
- *
- * // Center circle.
- * stroke(0);
- * x = curvePoint(x1, x2, x3, x4, 0.5);
- * y = curvePoint(y1, y2, y3, y4, 0.5);
- * circle(x, y, 5);
- *
- * // Center tangent line.
- * // Scale the tangent point to draw a shorter line.
- * stroke(255, 0, 0);
- * tx = 0.2 * curveTangent(x1, x2, x3, x4, 0.5);
- * ty = 0.2 * curveTangent(y1, y2, y3, y4, 0.5);
- * line(x + tx, y + ty, x - tx, y - ty);
- *
- * // Bottom circle.
- * stroke(0);
- * x = curvePoint(x1, x2, x3, x4, 1);
- * y = curvePoint(y1, y2, y3, y4, 1);
- * circle(x, y, 5);
- *
- * // Bottom tangent line.
- * // Scale the tangent point to draw a shorter line.
- * stroke(255, 0, 0);
- * tx = 0.2 * curveTangent(x1, x2, x3, x4, 1);
- * ty = 0.2 * curveTangent(y1, y2, y3, y4, 1);
- * line(x + tx, y + ty, x - tx, y - ty);
- *
- * describe(
- * 'A black curve on a gray square. A white circle moves back and forth along the curve.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Exterior vertices, clockwise winding.
- * vertex(10, 10);
- * vertex(90, 10);
- * vertex(90, 90);
- * vertex(10, 90);
- *
- * // Interior vertices, counter-clockwise winding.
- * beginContour();
- * vertex(30, 30);
- * vertex(30, 70);
- * vertex(70, 70);
- * vertex(70, 30);
- * endContour();
- *
- * // Stop drawing the shape.
- * endShape(CLOSE);
- *
- * describe('A white square with a square hole in its center drawn on a gray background.');
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white square with a square hole in its center drawn on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Exterior vertices, clockwise winding.
- * vertex(-40, -40);
- * vertex(40, -40);
- * vertex(40, 40);
- * vertex(-40, 40);
- *
- * // Interior vertices, counter-clockwise winding.
- * beginContour();
- * vertex(-20, -20);
- * vertex(-20, 20);
- * vertex(20, 20);
- * vertex(20, -20);
- * endContour();
- *
- * // Stop drawing the shape.
- * endShape(CLOSE);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add vertices.
- * vertex(30, 20);
- * vertex(85, 20);
- * vertex(85, 75);
- * vertex(30, 75);
- *
- * // Stop drawing the shape.
- * endShape(CLOSE);
- *
- * describe('A white square on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * // Only draw the vertices (points).
- * beginShape(POINTS);
- *
- * // Add vertices.
- * vertex(30, 20);
- * vertex(85, 20);
- * vertex(85, 75);
- * vertex(30, 75);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * describe('Four black dots that form a square are drawn on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * // Only draw lines between alternating pairs of vertices.
- * beginShape(LINES);
- *
- * // Add vertices.
- * vertex(30, 20);
- * vertex(85, 20);
- * vertex(85, 75);
- * vertex(30, 75);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * describe('Two horizontal black lines on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the shape.
- * noFill();
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add vertices.
- * vertex(30, 20);
- * vertex(85, 20);
- * vertex(85, 75);
- * vertex(30, 75);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * describe('Three black lines form a sideways U shape on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the shape.
- * noFill();
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add vertices.
- * vertex(30, 20);
- * vertex(85, 20);
- * vertex(85, 75);
- * vertex(30, 75);
- *
- * // Stop drawing the shape.
- * // Connect the first and last vertices.
- * endShape(CLOSE);
- *
- * describe('A black outline of a square drawn on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * // Draw a series of triangles.
- * beginShape(TRIANGLES);
- *
- * // Left triangle.
- * vertex(30, 75);
- * vertex(40, 20);
- * vertex(50, 75);
- *
- * // Right triangle.
- * vertex(60, 20);
- * vertex(70, 75);
- * vertex(80, 20);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * describe('Two white triangles drawn on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * // Draw a series of triangles.
- * beginShape(TRIANGLE_STRIP);
- *
- * // Add vertices.
- * vertex(30, 75);
- * vertex(40, 20);
- * vertex(50, 75);
- * vertex(60, 20);
- * vertex(70, 75);
- * vertex(80, 20);
- * vertex(90, 75);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * describe('Five white triangles that are interleaved drawn on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * // Draw a series of triangles that share their first vertex.
- * beginShape(TRIANGLE_FAN);
- *
- * // Add vertices.
- * vertex(57.5, 50);
- * vertex(57.5, 15);
- * vertex(92, 50);
- * vertex(57.5, 85);
- * vertex(22, 50);
- * vertex(57.5, 15);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * describe('Four white triangles form a square are drawn on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * // Draw a series of quadrilaterals.
- * beginShape(QUADS);
- *
- * // Left rectangle.
- * vertex(30, 20);
- * vertex(30, 75);
- * vertex(50, 75);
- * vertex(50, 20);
- *
- * // Right rectangle.
- * vertex(65, 20);
- * vertex(65, 75);
- * vertex(85, 75);
- * vertex(85, 20);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * describe('Two white rectangles drawn on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * // Draw a series of quadrilaterals.
- * beginShape(QUAD_STRIP);
- *
- * // Add vertices.
- * vertex(30, 20);
- * vertex(30, 75);
- * vertex(50, 20);
- * vertex(50, 75);
- * vertex(65, 20);
- * vertex(65, 75);
- * vertex(85, 20);
- * vertex(85, 75);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * describe('Three white rectangles that share edges are drawn on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * // Draw a series of quadrilaterals.
- * beginShape(TESS);
- *
- * // Add the vertices.
- * vertex(-30, -30, 0);
- * vertex(30, -30, 0);
- * vertex(30, -10, 0);
- * vertex(-10, -10, 0);
- * vertex(-10, 10, 0);
- * vertex(30, 10, 0);
- * vertex(30, 30, 0);
- * vertex(-30, 30, 0);
- *
- * // Stop drawing the shape.
- * // Connect the first and last vertices.
- * endShape(CLOSE);
- *
- * describe('A blocky C shape drawn in white on a gray background.');
- * }
- *
- *
- * // Click and drag with the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A blocky C shape drawn in red, blue, and green on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Start drawing the shape.
- * // Draw a series of quadrilaterals.
- * beginShape(TESS);
- *
- * // Add the vertices.
- * fill('red');
- * stroke('red');
- * vertex(-30, -30, 0);
- * vertex(30, -30, 0);
- * vertex(30, -10, 0);
- * fill('green');
- * stroke('green');
- * vertex(-10, -10, 0);
- * vertex(-10, 10, 0);
- * vertex(30, 10, 0);
- * fill('blue');
- * stroke('blue');
- * vertex(30, 30, 0);
- * vertex(-30, 30, 0);
- *
- * // Stop drawing the shape.
- * // Connect the first and last vertices.
- * endShape(CLOSE);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the shape.
- * noFill();
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add the first anchor point.
- * vertex(30, 20);
- *
- * // Add the Bézier vertex.
- * bezierVertex(80, 0, 80, 75, 30, 75);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * describe('A black C curve on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Draw the anchor points in black.
- * stroke(0);
- * strokeWeight(5);
- * point(30, 20);
- * point(30, 75);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(80, 0);
- * point(80, 75);
- *
- * // Style the shape.
- * noFill();
- * stroke(0);
- * strokeWeight(1);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add the first anchor point.
- * vertex(30, 20);
- *
- * // Add the Bézier vertex.
- * bezierVertex(80, 0, 80, 75, 30, 75);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * // Draw red lines from the anchor points to the control points.
- * stroke(255, 0, 0);
- * line(30, 20, 80, 0);
- * line(30, 75, 80, 75);
- *
- * describe(
- * 'A gray square with three curves. A black curve has two straight, red lines that extend from its ends. The endpoints of all the curves are marked with dots.'
- * );
- * }
- *
- *
- * // Click the mouse near the red dot in the top-right corner
- * // and drag to change the curve's shape.
- *
- * let x2 = 80;
- * let y2 = 0;
- * let isChanging = false;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with three curves. A black curve has two straight, red lines that extend from its ends. The endpoints of all the curves are marked with dots.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw the anchor points in black.
- * stroke(0);
- * strokeWeight(5);
- * point(30, 20);
- * point(30, 75);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(x2, y2);
- * point(80, 75);
- *
- * // Style the shape.
- * noFill();
- * stroke(0);
- * strokeWeight(1);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add the first anchor point.
- * vertex(30, 20);
- *
- * // Add the Bézier vertex.
- * bezierVertex(x2, y2, 80, 75, 30, 75);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * // Draw red lines from the anchor points to the control points.
- * stroke(255, 0, 0);
- * line(30, 20, x2, y2);
- * line(30, 75, 80, 75);
- * }
- *
- * // Start changing the first control point if the user clicks near it.
- * function mousePressed() {
- * if (dist(mouseX, mouseY, x2, y2) < 20) {
- * isChanging = true;
- * }
- * }
- *
- * // Stop changing the first control point when the user releases the mouse.
- * function mouseReleased() {
- * isChanging = false;
- * }
- *
- * // Update the first control point while the user drags the mouse.
- * function mouseDragged() {
- * if (isChanging === true) {
- * x2 = mouseX;
- * y2 = mouseY;
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add the first anchor point.
- * vertex(30, 20);
- *
- * // Add the Bézier vertices.
- * bezierVertex(80, 0, 80, 75, 30, 75);
- * bezierVertex(50, 80, 60, 25, 30, 20);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * describe('A crescent moon shape drawn in white on a gray background.');
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A crescent moon shape drawn in white on a blue background. When the user drags the mouse, the scene rotates and a second moon is revealed.');
- * }
- *
- * function draw() {
- * background('midnightblue');
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Style the moons.
- * noStroke();
- * fill('lemonchiffon');
- *
- * // Draw the first moon.
- * beginShape();
- * vertex(-20, -30, 0);
- * bezierVertex(30, -50, 0, 30, 25, 0, -20, 25, 0);
- * bezierVertex(0, 30, 0, 10, -25, 0, -20, -30, 0);
- * endShape();
- *
- * // Draw the second moon.
- * beginShape();
- * vertex(-20, -30, -20);
- * bezierVertex(30, -50, -20, 30, 25, -20, -20, 25, -20);
- * bezierVertex(0, 30, -20, 10, -25, -20, -20, -30, -20);
- * endShape();
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the shape.
- * noFill();
- * strokeWeight(1);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add the first control point.
- * curveVertex(32, 91);
- *
- * // Add the anchor points.
- * curveVertex(21, 17);
- * curveVertex(68, 19);
- *
- * // Add the second control point.
- * curveVertex(84, 91);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * // Style the anchor and control points.
- * strokeWeight(5);
- *
- * // Draw the anchor points in black.
- * stroke(0);
- * point(21, 17);
- * point(68, 19);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(32, 91);
- * point(84, 91);
- *
- * describe(
- * 'A black curve drawn on a gray background. The curve has black dots at its ends. Two red dots appear near the bottom of the canvas.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the shape.
- * noFill();
- * strokeWeight(1);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add the first control point and draw a segment to it.
- * curveVertex(32, 91);
- * curveVertex(32, 91);
- *
- * // Add the anchor points.
- * curveVertex(21, 17);
- * curveVertex(68, 19);
- *
- * // Add the second control point.
- * curveVertex(84, 91);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * // Style the anchor and control points.
- * strokeWeight(5);
- *
- * // Draw the anchor points in black.
- * stroke(0);
- * point(21, 17);
- * point(68, 19);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(32, 91);
- * point(84, 91);
- *
- * describe(
- * 'A black curve drawn on a gray background. The curve passes through one red dot and two black dots. Another red dot appears near the bottom of the canvas.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the shape.
- * noFill();
- * strokeWeight(1);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add the first control point and draw a segment to it.
- * curveVertex(32, 91);
- * curveVertex(32, 91);
- *
- * // Add the anchor points.
- * curveVertex(21, 17);
- * curveVertex(68, 19);
- *
- * // Add the second control point and draw a segment to it.
- * curveVertex(84, 91);
- * curveVertex(84, 91);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * // Style the anchor and control points.
- * strokeWeight(5);
- *
- * // Draw the anchor points in black.
- * stroke(0);
- * point(21, 17);
- * point(68, 19);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(32, 91);
- * point(84, 91);
- *
- * describe(
- * 'A black U curve drawn upside down on a gray background. The curve passes from one red dot through two black dots and ends at another red dot.'
- * );
- * }
- *
- *
- * // Click the mouse near the red dot in the bottom-left corner
- * // and drag to change the curve's shape.
- *
- * let x1 = 32;
- * let y1 = 91;
- * let isChanging = false;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A black U curve drawn upside down on a gray background. The curve passes from one red dot through two black dots and ends at another red dot.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the shape.
- * noFill();
- * stroke(0);
- * strokeWeight(1);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add the first control point and draw a segment to it.
- * curveVertex(x1, y1);
- * curveVertex(x1, y1);
- *
- * // Add the anchor points.
- * curveVertex(21, 17);
- * curveVertex(68, 19);
- *
- * // Add the second control point and draw a segment to it.
- * curveVertex(84, 91);
- * curveVertex(84, 91);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * // Style the anchor and control points.
- * strokeWeight(5);
- *
- * // Draw the anchor points in black.
- * stroke(0);
- * point(21, 17);
- * point(68, 19);
- *
- * // Draw the control points in red.
- * stroke(255, 0, 0);
- * point(x1, y1);
- * point(84, 91);
- * }
- *
- * // Start changing the first control point if the user clicks near it.
- * function mousePressed() {
- * if (dist(mouseX, mouseY, x1, y1) < 20) {
- * isChanging = true;
- * }
- * }
- *
- * // Stop changing the first control point when the user releases the mouse.
- * function mouseReleased() {
- * isChanging = false;
- * }
- *
- * // Update the first control point while the user drags the mouse.
- * function mouseDragged() {
- * if (isChanging === true) {
- * x1 = mouseX;
- * y1 = mouseY;
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add the first control point and draw a segment to it.
- * curveVertex(32, 91);
- * curveVertex(32, 91);
- *
- * // Add the anchor points.
- * curveVertex(21, 17);
- * curveVertex(68, 19);
- *
- * // Add the second control point.
- * curveVertex(84, 91);
- * curveVertex(84, 91);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * describe('A ghost shape drawn in white on a gray background.');
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A ghost shape drawn in white on a blue background. When the user drags the mouse, the scene rotates to reveal the outline of a second ghost.');
- * }
- *
- * function draw() {
- * background('midnightblue');
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Draw the first ghost.
- * noStroke();
- * fill('ghostwhite');
- *
- * beginShape();
- * curveVertex(-28, 41, 0);
- * curveVertex(-28, 41, 0);
- * curveVertex(-29, -33, 0);
- * curveVertex(18, -31, 0);
- * curveVertex(34, 41, 0);
- * curveVertex(34, 41, 0);
- * endShape();
- *
- * // Draw the second ghost.
- * noFill();
- * stroke('ghostwhite');
- *
- * beginShape();
- * curveVertex(-28, 41, -20);
- * curveVertex(-28, 41, -20);
- * curveVertex(-29, -33, -20);
- * curveVertex(18, -31, -20);
- * curveVertex(34, 41, -20);
- * curveVertex(34, 41, -20);
- * endShape();
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Exterior vertices, clockwise winding.
- * vertex(10, 10);
- * vertex(90, 10);
- * vertex(90, 90);
- * vertex(10, 90);
- *
- * // Interior vertices, counter-clockwise winding.
- * beginContour();
- * vertex(30, 30);
- * vertex(30, 70);
- * vertex(70, 70);
- * vertex(70, 30);
- * endContour();
- *
- * // Stop drawing the shape.
- * endShape(CLOSE);
- *
- * describe('A white square with a square hole in its center drawn on a gray background.');
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white square with a square hole in its center drawn on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Exterior vertices, clockwise winding.
- * vertex(-40, -40);
- * vertex(40, -40);
- * vertex(40, 40);
- * vertex(-40, 40);
- *
- * // Interior vertices, counter-clockwise winding.
- * beginContour();
- * vertex(-20, -20);
- * vertex(-20, 20);
- * vertex(20, 20);
- * vertex(20, -20);
- * endContour();
- *
- * // Stop drawing the shape.
- * endShape(CLOSE);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the shapes.
- * noFill();
- *
- * // Left triangle.
- * beginShape();
- * vertex(20, 20);
- * vertex(45, 20);
- * vertex(45, 80);
- * endShape(CLOSE);
- *
- * // Right triangle.
- * beginShape();
- * vertex(50, 20);
- * vertex(75, 20);
- * vertex(75, 80);
- * endShape();
- *
- * describe(
- * 'Two sets of black lines drawn on a gray background. The three lines on the left form a right triangle. The two lines on the right form a right angle.'
- * );
- * }
- *
- *
- * // Note: A "uniform" is a global variable within a shader program.
- *
- * // Create a string with the vertex shader program.
- * // The vertex shader is called for each vertex.
- * let vertSrc = `#version 300 es
- *
- * precision mediump float;
- *
- * in vec3 aPosition;
- * flat out int instanceID;
- *
- * uniform mat4 uModelViewMatrix;
- * uniform mat4 uProjectionMatrix;
- *
- * void main() {
- *
- * // Copy the instance ID to the fragment shader.
- * instanceID = gl_InstanceID;
- * vec4 positionVec4 = vec4(aPosition, 1.0);
- *
- * // gl_InstanceID represents a numeric value for each instance.
- * // Using gl_InstanceID allows us to move each instance separately.
- * // Here we move each instance horizontally by ID * 23.
- * float xOffset = float(gl_InstanceID) * 23.0;
- *
- * // Apply the offset to the final position.
- * gl_Position = uProjectionMatrix * uModelViewMatrix * (positionVec4 -
- * vec4(xOffset, 0.0, 0.0, 0.0));
- * }
- * `;
- *
- * // Create a string with the fragment shader program.
- * // The fragment shader is called for each pixel.
- * let fragSrc = `#version 300 es
- *
- * precision mediump float;
- *
- * out vec4 outColor;
- * flat in int instanceID;
- * uniform float numInstances;
- *
- * void main() {
- * vec4 red = vec4(1.0, 0.0, 0.0, 1.0);
- * vec4 blue = vec4(0.0, 0.0, 1.0, 1.0);
- *
- * // Normalize the instance ID.
- * float normId = float(instanceID) / numInstances;
- *
- * // Mix between two colors using the normalized instance ID.
- * outColor = mix(red, blue, normId);
- * }
- * `;
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * // Create a p5.Shader object.
- * let myShader = createShader(vertSrc, fragSrc);
- *
- * background(220);
- *
- * // Compile and apply the p5.Shader.
- * shader(myShader);
- *
- * // Set the numInstances uniform.
- * myShader.setUniform('numInstances', 4);
- *
- * // Translate the origin to help align the drawing.
- * translate(25, -10);
- *
- * // Style the shapes.
- * noStroke();
- *
- * // Draw the shapes.
- * beginShape();
- * vertex(0, 0);
- * vertex(0, 20);
- * vertex(20, 20);
- * vertex(20, 0);
- * vertex(0, 0);
- * endShape(CLOSE, 4);
- *
- * describe('A row of four squares. Their colors transition from purple on the left to red on the right');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the curve.
- * noFill();
- *
- * // Draw the curve.
- * beginShape();
- * vertex(20, 20);
- * quadraticVertex(80, 20, 50, 50);
- * endShape();
- *
- * describe('A black curve drawn on a gray square. The curve starts at the top-left corner and ends at the center.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Draw the curve.
- * noFill();
- * beginShape();
- * vertex(20, 20);
- * quadraticVertex(80, 20, 50, 50);
- * endShape();
- *
- * // Draw red lines from the anchor points to the control point.
- * stroke(255, 0, 0);
- * line(20, 20, 80, 20);
- * line(50, 50, 80, 20);
- *
- * // Draw the anchor points in black.
- * strokeWeight(5);
- * stroke(0);
- * point(20, 20);
- * point(50, 50);
- *
- * // Draw the control point in red.
- * stroke(255, 0, 0);
- * point(80, 20);
- *
- * describe('A black curve that starts at the top-left corner and ends at the center. Its anchor and control points are marked with dots. Red lines connect both anchor points to the control point.');
- * }
- *
- *
- * // Click the mouse near the red dot in the top-right corner
- * // and drag to change the curve's shape.
- *
- * let x2 = 80;
- * let y2 = 20;
- * let isChanging = false;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A black curve that starts at the top-left corner and ends at the center. Its anchor and control points are marked with dots. Red lines connect both anchor points to the control point.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the curve.
- * noFill();
- * strokeWeight(1);
- * stroke(0);
- *
- * // Draw the curve.
- * beginShape();
- * vertex(20, 20);
- * quadraticVertex(x2, y2, 50, 50);
- * endShape();
- *
- * // Draw red lines from the anchor points to the control point.
- * stroke(255, 0, 0);
- * line(20, 20, x2, y2);
- * line(50, 50, x2, y2);
- *
- * // Draw the anchor points in black.
- * strokeWeight(5);
- * stroke(0);
- * point(20, 20);
- * point(50, 50);
- *
- * // Draw the control point in red.
- * stroke(255, 0, 0);
- * point(x2, y2);
- * }
- *
- * // Start changing the first control point if the user clicks near it.
- * function mousePressed() {
- * if (dist(mouseX, mouseY, x2, y2) < 20) {
- * isChanging = true;
- * }
- * }
- *
- * // Stop changing the first control point when the user releases the mouse.
- * function mouseReleased() {
- * isChanging = false;
- * }
- *
- * // Update the first control point while the user drags the mouse.
- * function mouseDragged() {
- * if (isChanging === true) {
- * x2 = mouseX;
- * y2 = mouseY;
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add the curved segments.
- * vertex(20, 20);
- * quadraticVertex(80, 20, 50, 50);
- * quadraticVertex(20, 80, 80, 80);
- *
- * // Add the straight segments.
- * vertex(80, 10);
- * vertex(20, 10);
- * vertex(20, 20);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * describe('A white puzzle piece drawn on a gray background.');
- * }
- *
- *
- * // Click the and drag the mouse to view the scene from a different angle.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white puzzle piece on a dark gray background. When the user clicks and drags the scene, the outline of a second puzzle piece is revealed.');
- * }
- *
- * function draw() {
- * background(50);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Style the first puzzle piece.
- * noStroke();
- * fill(255);
- *
- * // Draw the first puzzle piece.
- * beginShape();
- * vertex(-30, -30, 0);
- * quadraticVertex(30, -30, 0, 0, 0, 0);
- * quadraticVertex(-30, 30, 0, 30, 30, 0);
- * vertex(30, -40, 0);
- * vertex(-30, -40, 0);
- * vertex(-30, -30, 0);
- * endShape();
- *
- * // Style the second puzzle piece.
- * stroke(255);
- * noFill();
- *
- * // Draw the second puzzle piece.
- * beginShape();
- * vertex(-30, -30, -20);
- * quadraticVertex(30, -30, -20, 0, 0, -20);
- * quadraticVertex(-30, 30, -20, 30, 30, -20);
- * vertex(30, -40, -20);
- * vertex(-30, -40, -20);
- * vertex(-30, -30, -20);
- * endShape();
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the shape.
- * strokeWeight(3);
- *
- * // Start drawing the shape.
- * // Only draw the vertices.
- * beginShape(POINTS);
- *
- * // Add the vertices.
- * vertex(30, 20);
- * vertex(85, 20);
- * vertex(85, 75);
- * vertex(30, 75);
- *
- * // Stop drawing the shape.
- * endShape();
- *
- * describe('Four black dots that form a square are drawn on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add vertices.
- * vertex(30, 20);
- * vertex(85, 20);
- * vertex(85, 75);
- * vertex(30, 75);
- *
- * // Stop drawing the shape.
- * endShape(CLOSE);
- *
- * describe('A white square on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * background(200);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add vertices.
- * vertex(-20, -30, 0);
- * vertex(35, -30, 0);
- * vertex(35, 25, 0);
- * vertex(-20, 25, 0);
- *
- * // Stop drawing the shape.
- * endShape(CLOSE);
- *
- * describe('A white square on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white square spins around slowly on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate around the y-axis.
- * rotateY(frameCount * 0.01);
- *
- * // Start drawing the shape.
- * beginShape();
- *
- * // Add vertices.
- * vertex(-20, -30, 0);
- * vertex(35, -30, 0);
- * vertex(35, 25, 0);
- * vertex(-20, 25, 0);
- *
- * // Stop drawing the shape.
- * endShape(CLOSE);
- * }
- *
- *
- * let img;
- *
- * // Load an image to apply as a texture.
- * function preload() {
- * img = loadImage('assets/laDefense.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A photograph of a ceiling rotates slowly against a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate around the y-axis.
- * rotateY(frameCount * 0.01);
- *
- * // Style the shape.
- * noStroke();
- *
- * // Apply the texture.
- * texture(img);
- * textureMode(NORMAL);
- *
- * // Start drawing the shape
- * beginShape();
- *
- * // Add vertices.
- * vertex(-20, -30, 0, 0, 0);
- * vertex(35, -30, 0, 1, 0);
- * vertex(35, 25, 0, 1, 1);
- * vertex(-20, 25, 0, 0, 1);
- *
- * // Stop drawing the shape.
- * endShape();
- * }
- *
- *
- * // Click the and drag the mouse to view the scene from a different angle.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe(
- * 'A colorful square on a black background. The square changes color and rotates when the user drags the mouse. Parts of its surface reflect light in different directions.'
- * );
- * }
- *
- * function draw() {
- * background(0);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Style the shape.
- * normalMaterial();
- * noStroke();
- *
- * // Draw the shape.
- * beginShape();
- * vertex(-30, -30, 0);
- * vertex(30, -30, 0);
- * vertex(30, 30, 0);
- * vertex(-30, 30, 0);
- * endShape();
- * }
- *
- *
- * // Click the and drag the mouse to view the scene from a different angle.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe(
- * 'A colorful square on a black background. The square changes color and rotates when the user drags the mouse. Parts of its surface reflect light in different directions.'
- * );
- * }
- *
- * function draw() {
- * background(0);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Style the shape.
- * normalMaterial();
- * noStroke();
- *
- * // Draw the shape.
- * // Use normal() to set vertex normals.
- * beginShape();
- * normal(-0.4, -0.4, 0.8);
- * vertex(-30, -30, 0);
- *
- * normal(0, 0, 1);
- * vertex(30, -30, 0);
- * vertex(30, 30, 0);
- *
- * normal(0.4, -0.4, 0.8);
- * vertex(-30, 30, 0);
- * endShape();
- * }
- *
- *
- * // Click the and drag the mouse to view the scene from a different angle.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe(
- * 'A colorful square on a black background. The square changes color and rotates when the user drags the mouse. Parts of its surface reflect light in different directions.'
- * );
- * }
- *
- * function draw() {
- * background(0);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Style the shape.
- * normalMaterial();
- * noStroke();
- *
- * // Create p5.Vector objects.
- * let n1 = createVector(-0.4, -0.4, 0.8);
- * let n2 = createVector(0, 0, 1);
- * let n3 = createVector(0.4, -0.4, 0.8);
- *
- * // Draw the shape.
- * // Use normal() to set vertex normals.
- * beginShape();
- * normal(n1);
- * vertex(-30, -30, 0);
- *
- * normal(n2);
- * vertex(30, -30, 0);
- * vertex(30, 30, 0);
- *
- * normal(n3);
- * vertex(-30, 30, 0);
- * endShape();
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Turn off the draw loop.
- * noLoop();
- *
- * describe('A white half-circle on the left edge of a gray square.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Calculate the circle's x-coordinate.
- * let x = frameCount;
- *
- * // Draw the circle.
- * // Normally, the circle would move from left to right.
- * circle(x, 50, 20);
- * }
- *
- *
- * // Double-click to stop the draw loop.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Slow the frame rate.
- * frameRate(5);
- *
- * describe('A white circle moves randomly on a gray background. It stops moving when the user double-clicks.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Calculate the circle's coordinates.
- * let x = random(0, 100);
- * let y = random(0, 100);
- *
- * // Draw the circle.
- * // Normally, the circle would move from left to right.
- * circle(x, y, 20);
- * }
- *
- * // Stop the draw loop when the user double-clicks.
- * function doubleClicked() {
- * noLoop();
- * }
- *
- *
- * let startButton;
- * let stopButton;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create the button elements and place them
- * // beneath the canvas.
- * startButton = createButton('▶');
- * startButton.position(0, 100);
- * startButton.size(50, 20);
- * stopButton = createButton('◾');
- * stopButton.position(50, 100);
- * stopButton.size(50, 20);
- *
- * // Set functions to call when the buttons are pressed.
- * startButton.mousePressed(loop);
- * stopButton.mousePressed(noLoop);
- *
- * // Slow the frame rate.
- * frameRate(5);
- *
- * describe(
- * 'A white circle moves randomly on a gray background. Play and stop buttons are shown beneath the canvas. The circle stops or starts moving when the user presses a button.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Calculate the circle's coordinates.
- * let x = random(0, 100);
- * let y = random(0, 100);
- *
- * // Draw the circle.
- * // Normally, the circle would move from left to right.
- * circle(x, y, 20);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Turn off the draw loop.
+ * noLoop();
+ *
+ * describe('A white half-circle on the left edge of a gray square.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Calculate the circle's x-coordinate.
+ * let x = frameCount;
+ *
+ * // Draw the circle.
+ * // Normally, the circle would move from left to right.
+ * circle(x, 50, 20);
+ * }
+ *
+ *
+ * // Double-click to stop the draw loop.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Slow the frame rate.
+ * frameRate(5);
+ *
+ * describe('A white circle moves randomly on a gray background. It stops moving when the user double-clicks.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Calculate the circle's coordinates.
+ * let x = random(0, 100);
+ * let y = random(0, 100);
+ *
+ * // Draw the circle.
+ * // Normally, the circle would move from left to right.
+ * circle(x, y, 20);
+ * }
+ *
+ * // Stop the draw loop when the user double-clicks.
+ * function doubleClicked() {
+ * noLoop();
+ * }
+ *
+ *
+ * let startButton;
+ * let stopButton;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create the button elements and place them
+ * // beneath the canvas.
+ * startButton = createButton('▶');
+ * startButton.position(0, 100);
+ * startButton.size(50, 20);
+ * stopButton = createButton('◾');
+ * stopButton.position(50, 100);
+ * stopButton.size(50, 20);
+ *
+ * // Set functions to call when the buttons are pressed.
+ * startButton.mousePressed(loop);
+ * stopButton.mousePressed(noLoop);
+ *
+ * // Slow the frame rate.
+ * frameRate(5);
+ *
+ * describe(
+ * 'A white circle moves randomly on a gray background. Play and stop buttons are shown beneath the canvas. The circle stops or starts moving when the user presses a button.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Calculate the circle's coordinates.
+ * let x = random(0, 100);
+ * let y = random(0, 100);
+ *
+ * // Draw the circle.
+ * // Normally, the circle would move from left to right.
+ * circle(x, y, 20);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Turn off the draw loop.
- * noLoop();
- *
- * describe(
- * 'A white half-circle on the left edge of a gray square. The circle starts moving to the right when the user double-clicks.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Calculate the circle's x-coordinate.
- * let x = frameCount;
- *
- * // Draw the circle.
- * circle(x, 50, 20);
- * }
- *
- * // Resume the draw loop when the user double-clicks.
- * function doubleClicked() {
- * loop();
- * }
- *
- *
- * let startButton;
- * let stopButton;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create the button elements and place them
- * // beneath the canvas.
- * startButton = createButton('▶');
- * startButton.position(0, 100);
- * startButton.size(50, 20);
- * stopButton = createButton('◾');
- * stopButton.position(50, 100);
- * stopButton.size(50, 20);
- *
- * // Set functions to call when the buttons are pressed.
- * startButton.mousePressed(loop);
- * stopButton.mousePressed(noLoop);
- *
- * // Slow the frame rate.
- * frameRate(5);
- *
- * describe(
- * 'A white circle moves randomly on a gray background. Play and stop buttons are shown beneath the canvas. The circle stops or starts moving when the user presses a button.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Calculate the circle's coordinates.
- * let x = random(0, 100);
- * let y = random(0, 100);
- *
- * // Draw the circle.
- * // Normally, the circle would move from left to right.
- * circle(x, y, 20);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Turn off the draw loop.
+ * noLoop();
+ *
+ * describe(
+ * 'A white half-circle on the left edge of a gray square. The circle starts moving to the right when the user double-clicks.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Calculate the circle's x-coordinate.
+ * let x = frameCount;
+ *
+ * // Draw the circle.
+ * circle(x, 50, 20);
+ * }
+ *
+ * // Resume the draw loop when the user double-clicks.
+ * function doubleClicked() {
+ * loop();
+ * }
+ *
+ *
+ * let startButton;
+ * let stopButton;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create the button elements and place them
+ * // beneath the canvas.
+ * startButton = createButton('▶');
+ * startButton.position(0, 100);
+ * startButton.size(50, 20);
+ * stopButton = createButton('◾');
+ * stopButton.position(50, 100);
+ * stopButton.size(50, 20);
+ *
+ * // Set functions to call when the buttons are pressed.
+ * startButton.mousePressed(loop);
+ * stopButton.mousePressed(noLoop);
+ *
+ * // Slow the frame rate.
+ * frameRate(5);
+ *
+ * describe(
+ * 'A white circle moves randomly on a gray background. Play and stop buttons are shown beneath the canvas. The circle stops or starts moving when the user presses a button.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Calculate the circle's coordinates.
+ * let x = random(0, 100);
+ * let y = random(0, 100);
+ *
+ * // Draw the circle.
+ * // Normally, the circle would move from left to right.
+ * circle(x, y, 20);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A white circle drawn against a gray background. When the user double-clicks, the circle stops or resumes following the mouse.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw the circle at the mouse's position.
- * circle(mouseX, mouseY, 20);
- * }
- *
- * // Toggle the draw loop when the user double-clicks.
- * function doubleClicked() {
- * if (isLooping() === true) {
- * noLoop();
- * } else {
- * loop();
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Draw the left circle.
- * circle(25, 50, 20);
- *
- * // Begin the drawing group.
- * push();
- *
- * // Translate the origin to the center.
- * translate(50, 50);
- *
- * // Style the circle.
- * strokeWeight(5);
- * stroke('royalblue');
- * fill('orange');
- *
- * // Draw the circle.
- * circle(0, 0, 20);
- *
- * // End the drawing group.
- * pop();
- *
- * // Draw the right circle.
- * circle(75, 50, 20);
- *
- * describe(
- * 'Three circles drawn in a row on a gray background. The left and right circles are white with thin, black borders. The middle circle is orange with a thick, blue border.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Slow the frame rate.
- * frameRate(24);
- *
- * describe('A mosquito buzzes in front of a green frog. The frog follows the mouse as the user moves.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Begin the drawing group.
- * push();
- *
- * // Translate the origin to the mouse's position.
- * translate(mouseX, mouseY);
- *
- * // Style the face.
- * noStroke();
- * fill('green');
- *
- * // Draw a face.
- * circle(0, 0, 60);
- *
- * // Style the eyes.
- * fill('white');
- *
- * // Draw the left eye.
- * push();
- * translate(-20, -20);
- * ellipse(0, 0, 30, 20);
- * fill('black');
- * circle(0, 0, 8);
- * pop();
- *
- * // Draw the right eye.
- * push();
- * translate(20, -20);
- * ellipse(0, 0, 30, 20);
- * fill('black');
- * circle(0, 0, 8);
- * pop();
- *
- * // End the drawing group.
- * pop();
- *
- * // Draw a bug.
- * let x = random(0, 100);
- * let y = random(0, 100);
- * text('🦟', x, y);
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe(
- * 'Two spheres drawn on a gray background. The sphere on the left is red and lit from the front. The sphere on the right is a blue wireframe.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Draw the red sphere.
- * push();
- * translate(-25, 0, 0);
- * noStroke();
- * directionalLight(255, 0, 0, 0, 0, -1);
- * sphere(20);
- * pop();
- *
- * // Draw the blue sphere.
- * push();
- * translate(25, 0, 0);
- * strokeWeight(0.3);
- * stroke(0, 0, 255);
- * noFill();
- * sphere(20);
- * pop();
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A white circle drawn against a gray background. When the user double-clicks, the circle stops or resumes following the mouse.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw the circle at the mouse's position.
+ * circle(mouseX, mouseY, 20);
+ * }
+ *
+ * // Toggle the draw loop when the user double-clicks.
+ * function doubleClicked() {
+ * if (isLooping() === true) {
+ * noLoop();
+ * } else {
+ * loop();
+ * }
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Draw the left circle.
- * circle(25, 50, 20);
- *
- * // Begin the drawing group.
- * push();
- *
- * // Translate the origin to the center.
- * translate(50, 50);
- *
- * // Style the circle.
- * strokeWeight(5);
- * stroke('royalblue');
- * fill('orange');
- *
- * // Draw the circle.
- * circle(0, 0, 20);
- *
- * // End the drawing group.
- * pop();
- *
- * // Draw the right circle.
- * circle(75, 50, 20);
- *
- * describe(
- * 'Three circles drawn in a row on a gray background. The left and right circles are white with thin, black borders. The middle circle is orange with a thick, blue border.'
- * );
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Slow the frame rate.
- * frameRate(24);
- *
- * describe('A mosquito buzzes in front of a green frog. The frog follows the mouse as the user moves.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Begin the drawing group.
- * push();
- *
- * // Translate the origin to the mouse's position.
- * translate(mouseX, mouseY);
- *
- * // Style the face.
- * noStroke();
- * fill('green');
- *
- * // Draw a face.
- * circle(0, 0, 60);
- *
- * // Style the eyes.
- * fill('white');
- *
- * // Draw the left eye.
- * push();
- * translate(-20, -20);
- * ellipse(0, 0, 30, 20);
- * fill('black');
- * circle(0, 0, 8);
- * pop();
- *
- * // Draw the right eye.
- * push();
- * translate(20, -20);
- * ellipse(0, 0, 30, 20);
- * fill('black');
- * circle(0, 0, 8);
- * pop();
- *
- * // End the drawing group.
- * pop();
- *
- * // Draw a bug.
- * let x = random(0, 100);
- * let y = random(0, 100);
- * text('🦟', x, y);
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe(
- * 'Two spheres drawn on a gray background. The sphere on the left is red and lit from the front. The sphere on the right is a blue wireframe.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Draw the red sphere.
- * push();
- * translate(-25, 0, 0);
- * noStroke();
- * directionalLight(255, 0, 0, 0, 0, -1);
- * sphere(20);
- * pop();
- *
- * // Draw the blue sphere.
- * push();
- * translate(25, 0, 0);
- * strokeWeight(0.3);
- * stroke(0, 0, 255);
- * noFill();
- * sphere(20);
- * pop();
- * }
- *
- *
- * // Double-click the canvas to move the circle.
- *
- * let x = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Turn off the draw loop.
- * noLoop();
- *
- * describe(
- * 'A white half-circle on the left edge of a gray square. The circle moves a little to the right when the user double-clicks.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw the circle.
- * circle(x, 50, 20);
- *
- * // Increment x.
- * x += 5;
- * }
- *
- * // Run the draw loop when the user double-clicks.
- * function doubleClicked() {
- * redraw();
- * }
- *
- *
- * // Double-click the canvas to move the circle.
- *
- * let x = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Turn off the draw loop.
- * noLoop();
- *
- * describe(
- * 'A white half-circle on the left edge of a gray square. The circle hops to the right when the user double-clicks.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw the circle.
- * circle(x, 50, 20);
- *
- * // Increment x.
- * x += 5;
- * }
- *
- * // Run the draw loop three times when the user double-clicks.
- * function doubleClicked() {
- * redraw(3);
- * }
- *
- *
+ * // Double-click the canvas to move the circle.
+ *
+ * let x = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Turn off the draw loop.
+ * noLoop();
+ *
+ * describe(
+ * 'A white half-circle on the left edge of a gray square. The circle moves a little to the right when the user double-clicks.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw the circle.
+ * circle(x, 50, 20);
+ *
+ * // Increment x.
+ * x += 5;
+ * }
+ *
+ * // Run the draw loop when the user double-clicks.
+ * function doubleClicked() {
+ * redraw();
+ * }
+ *
+ *
+ * // Double-click the canvas to move the circle.
+ *
+ * let x = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Turn off the draw loop.
+ * noLoop();
+ *
+ * describe(
+ * 'A white half-circle on the left edge of a gray square. The circle hops to the right when the user double-clicks.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw the circle.
+ * circle(x, 50, 20);
+ *
+ * // Increment x.
+ * x += 5;
+ * }
+ *
+ * // Run the draw loop three times when the user double-clicks.
+ * function doubleClicked() {
+ * redraw(3);
+ * }
+ *
+ *
- * // Declare the function containing the sketch.
- * function sketch(p) {
- *
- * // Declare the setup() method.
- * p.setup = function () {
- * p.createCanvas(100, 100);
- *
- * p.describe('A white circle drawn on a gray background.');
- * };
- *
- * // Declare the draw() method.
- * p.draw = function () {
- * p.background(200);
- *
- * // Draw the circle.
- * p.circle(50, 50, 20);
- * };
- * }
- *
- * // Initialize the sketch.
- * new p5(sketch);
- *
- *
- * // Declare the function containing the sketch.
- * function sketch(p) {
- * // Create the sketch's variables within its scope.
- * let x = 50;
- * let y = 50;
- *
- * // Declare the setup() method.
- * p.setup = function () {
- * p.createCanvas(100, 100);
- *
- * p.describe('A white circle moves randomly on a gray background.');
- * };
- *
- * // Declare the draw() method.
- * p.draw = function () {
- * p.background(200);
- *
- * // Update x and y.
- * x += p.random(-1, 1);
- * y += p.random(-1, 1);
- *
- * // Draw the circle.
- * p.circle(x, y, 20);
- * };
- * }
- *
- * // Initialize the sketch.
- * new p5(sketch);
- *
- *
- * // Declare the function containing the sketch.
- * function sketch(p) {
- *
- * // Declare the setup() method.
- * p.setup = function () {
- * p.createCanvas(100, 100);
- *
- * p.describe('A white circle drawn on a gray background.');
- * };
- *
- * // Declare the draw() method.
- * p.draw = function () {
- * p.background(200);
- *
- * // Draw the circle.
- * p.circle(50, 50, 20);
- * };
- * }
- *
- * // Select the web page's body element.
- * let body = document.querySelector('body');
- *
- * // Initialize the sketch and attach it to the web page's body.
- * new p5(sketch, body);
- *
- *
- * // Declare the function containing the sketch.
- * function sketch(p) {
- *
- * // Declare the setup() method.
- * p.setup = function () {
- * p.createCanvas(100, 100);
- *
- * p.describe(
- * 'A white circle drawn on a gray background. The circle follows the mouse as the user moves.'
- * );
- * };
- *
- * // Declare the draw() method.
- * p.draw = function () {
- * p.background(200);
- *
- * // Draw the circle.
- * p.circle(p.mouseX, p.mouseY, 20);
- * };
- * }
- *
- * // Initialize the sketch.
- * new p5(sketch);
- *
- *
- * // Declare the function containing the sketch.
- * function sketch(p) {
- *
- * // Declare the setup() method.
- * p.setup = function () {
- * p.createCanvas(100, 100);
- *
- * p.describe(
- * 'A white circle drawn on a gray background. The circle follows the mouse as the user moves. The circle becomes black when the user double-clicks.'
- * );
- * };
- *
- * // Declare the draw() method.
- * p.draw = function () {
- * p.background(200);
- *
- * // Draw the circle.
- * p.circle(p.mouseX, p.mouseY, 20);
- * };
- *
- * // Declare the doubleClicked() method.
- * p.doubleClicked = function () {
- * // Change the fill color when the user double-clicks.
- * p.fill(0);
- * };
- * }
- *
- * // Initialize the sketch.
- * new p5(sketch);
- *
- *
+ * // Declare the function containing the sketch.
+ * function sketch(p) {
+ *
+ * // Declare the setup() method.
+ * p.setup = function () {
+ * p.createCanvas(100, 100);
+ *
+ * p.describe('A white circle drawn on a gray background.');
+ * };
+ *
+ * // Declare the draw() method.
+ * p.draw = function () {
+ * p.background(200);
+ *
+ * // Draw the circle.
+ * p.circle(50, 50, 20);
+ * };
+ * }
+ *
+ * // Initialize the sketch.
+ * new p5(sketch);
+ *
+ *
+ * // Declare the function containing the sketch.
+ * function sketch(p) {
+ * // Create the sketch's variables within its scope.
+ * let x = 50;
+ * let y = 50;
+ *
+ * // Declare the setup() method.
+ * p.setup = function () {
+ * p.createCanvas(100, 100);
+ *
+ * p.describe('A white circle moves randomly on a gray background.');
+ * };
+ *
+ * // Declare the draw() method.
+ * p.draw = function () {
+ * p.background(200);
+ *
+ * // Update x and y.
+ * x += p.random(-1, 1);
+ * y += p.random(-1, 1);
+ *
+ * // Draw the circle.
+ * p.circle(x, y, 20);
+ * };
+ * }
+ *
+ * // Initialize the sketch.
+ * new p5(sketch);
+ *
+ *
+ * // Declare the function containing the sketch.
+ * function sketch(p) {
+ *
+ * // Declare the setup() method.
+ * p.setup = function () {
+ * p.createCanvas(100, 100);
+ *
+ * p.describe('A white circle drawn on a gray background.');
+ * };
+ *
+ * // Declare the draw() method.
+ * p.draw = function () {
+ * p.background(200);
+ *
+ * // Draw the circle.
+ * p.circle(50, 50, 20);
+ * };
+ * }
+ *
+ * // Select the web page's body element.
+ * let body = document.querySelector('body');
+ *
+ * // Initialize the sketch and attach it to the web page's body.
+ * new p5(sketch, body);
+ *
+ *
+ * // Declare the function containing the sketch.
+ * function sketch(p) {
+ *
+ * // Declare the setup() method.
+ * p.setup = function () {
+ * p.createCanvas(100, 100);
+ *
+ * p.describe(
+ * 'A white circle drawn on a gray background. The circle follows the mouse as the user moves.'
+ * );
+ * };
+ *
+ * // Declare the draw() method.
+ * p.draw = function () {
+ * p.background(200);
+ *
+ * // Draw the circle.
+ * p.circle(p.mouseX, p.mouseY, 20);
+ * };
+ * }
+ *
+ * // Initialize the sketch.
+ * new p5(sketch);
+ *
+ *
+ * // Declare the function containing the sketch.
+ * function sketch(p) {
+ *
+ * // Declare the setup() method.
+ * p.setup = function () {
+ * p.createCanvas(100, 100);
+ *
+ * p.describe(
+ * 'A white circle drawn on a gray background. The circle follows the mouse as the user moves. The circle becomes black when the user double-clicks.'
+ * );
+ * };
+ *
+ * // Declare the draw() method.
+ * p.draw = function () {
+ * p.background(200);
+ *
+ * // Draw the circle.
+ * p.circle(p.mouseX, p.mouseY, 20);
+ * };
+ *
+ * // Declare the doubleClicked() method.
+ * p.doubleClicked = function () {
+ * // Change the fill color when the user double-clicks.
+ * p.fill(0);
+ * };
+ * }
+ *
+ * // Initialize the sketch.
+ * new p5(sketch);
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A white circle on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Translate the origin to the center.
+ * applyMatrix(1, 0, 0, 1, 50, 50);
+ *
+ * // Draw the circle at coordinates (0, 0).
+ * circle(0, 0, 40);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A white circle on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Translate the origin to the center.
+ * let m = [1, 0, 0, 1, 50, 50];
+ * applyMatrix(m);
+ *
+ * // Draw the circle at coordinates (0, 0).
+ * circle(0, 0, 40);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe("A white rectangle on a gray background. The rectangle's long axis runs from top-left to bottom-right.");
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Rotate the coordinate system 1/8 turn.
+ * let angle = QUARTER_PI;
+ * let ca = cos(angle);
+ * let sa = sin(angle);
+ * applyMatrix(ca, sa, -sa, ca, 0, 0);
+ *
+ * // Draw a rectangle at coordinates (50, 0).
+ * rect(50, 0, 40, 20);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'Two white squares on a gray background. The larger square appears at the top-center. The smaller square appears at the top-left.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw a square at (30, 20).
+ * square(30, 20, 40);
+ *
+ * // Scale the coordinate system by a factor of 0.5.
+ * applyMatrix(0.5, 0, 0, 0.5, 0, 0);
+ *
+ * // Draw a square at (30, 20).
+ * // It appears at (15, 10) after scaling.
+ * square(30, 20, 40);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A white quadrilateral on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Calculate the shear factor.
+ * let angle = QUARTER_PI;
+ * let shearFactor = 1 / tan(HALF_PI - angle);
+ *
+ * // Shear the coordinate system along the x-axis.
+ * applyMatrix(1, 0, shearFactor, 1, 0, 0);
+ *
+ * // Draw the square.
+ * square(0, 0, 50);
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A white cube rotates slowly against a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Rotate the coordinate system a little more each frame.
+ * let angle = frameCount * 0.01;
+ * let ca = cos(angle);
+ * let sa = sin(angle);
+ * applyMatrix(ca, 0, sa, 0, 0, 1, 0, 0, -sa, 0, ca, 0, 0, 0, 0, 1);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A white circle on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Translate the origin to the center.
- * applyMatrix(1, 0, 0, 1, 50, 50);
- *
- * // Draw the circle at coordinates (0, 0).
- * circle(0, 0, 40);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A white circle on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Translate the origin to the center.
- * let m = [1, 0, 0, 1, 50, 50];
- * applyMatrix(m);
- *
- * // Draw the circle at coordinates (0, 0).
- * circle(0, 0, 40);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe("A white rectangle on a gray background. The rectangle's long axis runs from top-left to bottom-right.");
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate the coordinate system 1/8 turn.
- * let angle = QUARTER_PI;
- * let ca = cos(angle);
- * let sa = sin(angle);
- * applyMatrix(ca, sa, -sa, ca, 0, 0);
- *
- * // Draw a rectangle at coordinates (50, 0).
- * rect(50, 0, 40, 20);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'Two white squares on a gray background. The larger square appears at the top-center. The smaller square appears at the top-left.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw a square at (30, 20).
- * square(30, 20, 40);
- *
- * // Scale the coordinate system by a factor of 0.5.
- * applyMatrix(0.5, 0, 0, 0.5, 0, 0);
- *
- * // Draw a square at (30, 20).
- * // It appears at (15, 10) after scaling.
- * square(30, 20, 40);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A white quadrilateral on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Calculate the shear factor.
- * let angle = QUARTER_PI;
- * let shearFactor = 1 / tan(HALF_PI - angle);
- *
- * // Shear the coordinate system along the x-axis.
- * applyMatrix(1, 0, shearFactor, 1, 0, 0);
- *
- * // Draw the square.
- * square(0, 0, 50);
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white cube rotates slowly against a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Rotate the coordinate system a little more each frame.
- * let angle = frameCount * 0.01;
- * let ca = cos(angle);
- * let sa = sin(angle);
- * applyMatrix(ca, 0, sa, 0, 0, 1, 0, 0, -sa, 0, ca, 0, 0, 0, 0, 1);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'Two circles drawn on a gray background. A blue circle is at the top-left and a red circle is at the bottom-right.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Translate the origin to the center.
+ * translate(50, 50);
+ *
+ * // Draw a blue circle at the coordinates (25, 25).
+ * fill('blue');
+ * circle(25, 25, 20);
+ *
+ * // Clear all transformations.
+ * // The origin is now at the top-left corner.
+ * resetMatrix();
+ *
+ * // Draw a red circle at the coordinates (25, 25).
+ * fill('red');
+ * circle(25, 25, 20);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'Two circles drawn on a gray background. A blue circle is at the top-left and a red circle is at the bottom-right.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Translate the origin to the center.
- * translate(50, 50);
- *
- * // Draw a blue circle at the coordinates (25, 25).
- * fill('blue');
- * circle(25, 25, 20);
- *
- * // Clear all transformations.
- * // The origin is now at the top-left corner.
- * resetMatrix();
- *
- * // Draw a red circle at the coordinates (25, 25).
- * fill('red');
- * circle(25, 25, 20);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * "A white rectangle on a gray background. The rectangle's long axis runs from top-left to bottom-right."
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Rotate the coordinate system 1/8 turn.
+ * rotate(QUARTER_PI);
+ *
+ * // Draw a rectangle at coordinates (50, 0).
+ * rect(50, 0, 40, 20);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * "A white rectangle on a gray background. The rectangle's long axis runs from top-left to bottom-right."
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Rotate the coordinate system 1/16 turn.
+ * rotate(QUARTER_PI / 2);
+ *
+ * // Rotate the coordinate system another 1/16 turn.
+ * rotate(QUARTER_PI / 2);
+ *
+ * // Draw a rectangle at coordinates (50, 0).
+ * rect(50, 0, 40, 20);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Use degrees.
+ * angleMode(DEGREES);
+ *
+ * describe(
+ * "A white rectangle on a gray background. The rectangle's long axis runs from top-left to bottom-right."
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Rotate the coordinate system 1/8 turn.
+ * rotate(45);
+ *
+ * // Draw a rectangle at coordinates (50, 0).
+ * rect(50, 0, 40, 20);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A white rectangle on a gray background. The rectangle rotates slowly about the top-left corner. It disappears and reappears periodically.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Rotate the coordinate system a little more each frame.
+ * let angle = frameCount * 0.01;
+ * rotate(angle);
+ *
+ * // Draw a rectangle at coordinates (50, 0).
+ * rect(50, 0, 40, 20);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe("A cube on a gray background. The cube's front face points to the top-right.");
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Rotate the coordinate system 1/8 turn about
+ * // the axis [1, 1, 0].
+ * let axis = createVector(1, 1, 0);
+ * rotate(QUARTER_PI, axis);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe("A cube on a gray background. The cube's front face points to the top-right.");
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Rotate the coordinate system 1/8 turn about
+ * // the axis [1, 1, 0].
+ * let axis = [1, 1, 0];
+ * rotate(QUARTER_PI, axis);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * "A white rectangle on a gray background. The rectangle's long axis runs from top-left to bottom-right."
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate the coordinate system 1/8 turn.
- * rotate(QUARTER_PI);
- *
- * // Draw a rectangle at coordinates (50, 0).
- * rect(50, 0, 40, 20);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * "A white rectangle on a gray background. The rectangle's long axis runs from top-left to bottom-right."
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate the coordinate system 1/16 turn.
- * rotate(QUARTER_PI / 2);
- *
- * // Rotate the coordinate system another 1/16 turn.
- * rotate(QUARTER_PI / 2);
- *
- * // Draw a rectangle at coordinates (50, 0).
- * rect(50, 0, 40, 20);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Use degrees.
- * angleMode(DEGREES);
- *
- * describe(
- * "A white rectangle on a gray background. The rectangle's long axis runs from top-left to bottom-right."
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate the coordinate system 1/8 turn.
- * rotate(45);
- *
- * // Draw a rectangle at coordinates (50, 0).
- * rect(50, 0, 40, 20);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A white rectangle on a gray background. The rectangle rotates slowly about the top-left corner. It disappears and reappears periodically.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate the coordinate system a little more each frame.
- * let angle = frameCount * 0.01;
- * rotate(angle);
- *
- * // Draw a rectangle at coordinates (50, 0).
- * rect(50, 0, 40, 20);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe("A cube on a gray background. The cube's front face points to the top-right.");
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate the coordinate system 1/8 turn about
- * // the axis [1, 1, 0].
- * let axis = createVector(1, 1, 0);
- * rotate(QUARTER_PI, axis);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe("A cube on a gray background. The cube's front face points to the top-right.");
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Rotate the coordinate system 1/8 turn about
- * // the axis [1, 1, 0].
- * let axis = [1, 1, 0];
- * rotate(QUARTER_PI, axis);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A white cube on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Rotate the coordinate system 1/8 turn.
+ * rotateX(QUARTER_PI);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A white cube on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Rotate the coordinate system 1/16 turn.
+ * rotateX(QUARTER_PI / 2);
+ *
+ * // Rotate the coordinate system 1/16 turn.
+ * rotateX(QUARTER_PI / 2);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * // Use degrees.
+ * angleMode(DEGREES);
+ *
+ * describe('A white cube on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Rotate the coordinate system 1/8 turn.
+ * rotateX(45);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A white cube rotates slowly against a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Rotate the coordinate system a little more each frame.
+ * let angle = frameCount * 0.01;
+ * rotateX(angle);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white cube on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Rotate the coordinate system 1/8 turn.
- * rotateX(QUARTER_PI);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white cube on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Rotate the coordinate system 1/16 turn.
- * rotateX(QUARTER_PI / 2);
- *
- * // Rotate the coordinate system 1/16 turn.
- * rotateX(QUARTER_PI / 2);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * // Use degrees.
- * angleMode(DEGREES);
- *
- * describe('A white cube on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Rotate the coordinate system 1/8 turn.
- * rotateX(45);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white cube rotates slowly against a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Rotate the coordinate system a little more each frame.
- * let angle = frameCount * 0.01;
- * rotateX(angle);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A white cube on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Rotate the coordinate system 1/8 turn.
+ * rotateY(QUARTER_PI);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A white cube on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Rotate the coordinate system 1/16 turn.
+ * rotateY(QUARTER_PI / 2);
+ *
+ * // Rotate the coordinate system 1/16 turn.
+ * rotateY(QUARTER_PI / 2);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * // Use degrees.
+ * angleMode(DEGREES);
+ *
+ * describe('A white cube on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Rotate the coordinate system 1/8 turn.
+ * rotateY(45);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A white cube rotates slowly against a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Rotate the coordinate system a little more each frame.
+ * let angle = frameCount * 0.01;
+ * rotateY(angle);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white cube on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Rotate the coordinate system 1/8 turn.
- * rotateY(QUARTER_PI);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white cube on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Rotate the coordinate system 1/16 turn.
- * rotateY(QUARTER_PI / 2);
- *
- * // Rotate the coordinate system 1/16 turn.
- * rotateY(QUARTER_PI / 2);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * // Use degrees.
- * angleMode(DEGREES);
- *
- * describe('A white cube on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Rotate the coordinate system 1/8 turn.
- * rotateY(45);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white cube rotates slowly against a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Rotate the coordinate system a little more each frame.
- * let angle = frameCount * 0.01;
- * rotateY(angle);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A white cube on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Rotate the coordinate system 1/8 turn.
+ * rotateZ(QUARTER_PI);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A white cube on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Rotate the coordinate system 1/16 turn.
+ * rotateZ(QUARTER_PI / 2);
+ *
+ * // Rotate the coordinate system 1/16 turn.
+ * rotateZ(QUARTER_PI / 2);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * // Use degrees.
+ * angleMode(DEGREES);
+ *
+ * describe('A white cube on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Rotate the coordinate system 1/8 turn.
+ * rotateZ(45);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A white cube rotates slowly against a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Rotate the coordinate system a little more each frame.
+ * let angle = frameCount * 0.01;
+ * rotateZ(angle);
+ *
+ * // Draw a box.
+ * box();
+ * }
+ *
+ *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white cube on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Rotate the coordinate system 1/8 turn.
- * rotateZ(QUARTER_PI);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white cube on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Rotate the coordinate system 1/16 turn.
- * rotateZ(QUARTER_PI / 2);
- *
- * // Rotate the coordinate system 1/16 turn.
- * rotateZ(QUARTER_PI / 2);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * // Use degrees.
- * angleMode(DEGREES);
- *
- * describe('A white cube on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Rotate the coordinate system 1/8 turn.
- * rotateZ(45);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A white cube rotates slowly against a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Rotate the coordinate system a little more each frame.
- * let angle = frameCount * 0.01;
- * rotateZ(angle);
- *
- * // Draw a box.
- * box();
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'Two white squares on a gray background. The larger square appears at the top-center. The smaller square appears at the top-left.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw a square at (30, 20).
+ * square(30, 20, 40);
+ *
+ * // Scale the coordinate system by a factor of 0.5.
+ * scale(0.5);
+ *
+ * // Draw a square at (30, 20).
+ * // It appears at (15, 10) after scaling.
+ * square(30, 20, 40);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A rectangle and a square drawn in white on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw a square at (30, 20).
+ * square(30, 20, 40);
+ *
+ * // Scale the coordinate system by factors of
+ * // 0.5 along the x-axis and
+ * // 1.3 along the y-axis.
+ * scale(0.5, 1.3);
+ *
+ * // Draw a square at (30, 20).
+ * // It appears as a rectangle at (15, 26) after scaling.
+ * square(30, 20, 40);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A rectangle and a square drawn in white on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw a square at (30, 20).
+ * square(30, 20, 40);
+ *
+ * // Create a p5.Vector object.
+ * let v = createVector(0.5, 1.3);
+ *
+ * // Scale the coordinate system by factors of
+ * // 0.5 along the x-axis and
+ * // 1.3 along the y-axis.
+ * scale(v);
+ *
+ * // Draw a square at (30, 20).
+ * // It appears as a rectangle at (15, 26) after scaling.
+ * square(30, 20, 40);
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe(
+ * 'A red box and a blue box drawn on a gray background. The red box appears embedded in the blue box.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Turn on the lights.
+ * lights();
+ *
+ * // Style the spheres.
+ * noStroke();
+ *
+ * // Draw the red sphere.
+ * fill('red');
+ * box();
+ *
+ * // Scale the coordinate system by factors of
+ * // 0.5 along the x-axis and
+ * // 1.3 along the y-axis and
+ * // 2 along the z-axis.
+ * scale(0.5, 1.3, 2);
+ *
+ * // Draw the blue sphere.
+ * fill('blue');
+ * box();
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'Two white squares on a gray background. The larger square appears at the top-center. The smaller square appears at the top-left.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw a square at (30, 20).
- * square(30, 20, 40);
- *
- * // Scale the coordinate system by a factor of 0.5.
- * scale(0.5);
- *
- * // Draw a square at (30, 20).
- * // It appears at (15, 10) after scaling.
- * square(30, 20, 40);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A rectangle and a square drawn in white on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw a square at (30, 20).
- * square(30, 20, 40);
- *
- * // Scale the coordinate system by factors of
- * // 0.5 along the x-axis and
- * // 1.3 along the y-axis.
- * scale(0.5, 1.3);
- *
- * // Draw a square at (30, 20).
- * // It appears as a rectangle at (15, 26) after scaling.
- * square(30, 20, 40);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A rectangle and a square drawn in white on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw a square at (30, 20).
- * square(30, 20, 40);
- *
- * // Create a p5.Vector object.
- * let v = createVector(0.5, 1.3);
- *
- * // Scale the coordinate system by factors of
- * // 0.5 along the x-axis and
- * // 1.3 along the y-axis.
- * scale(v);
- *
- * // Draw a square at (30, 20).
- * // It appears as a rectangle at (15, 26) after scaling.
- * square(30, 20, 40);
- * }
- *
- *
- * // Click and drag the mouse to view the scene from different angles.
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe(
- * 'A red box and a blue box drawn on a gray background. The red box appears embedded in the blue box.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Enable orbiting with the mouse.
- * orbitControl();
- *
- * // Turn on the lights.
- * lights();
- *
- * // Style the spheres.
- * noStroke();
- *
- * // Draw the red sphere.
- * fill('red');
- * box();
- *
- * // Scale the coordinate system by factors of
- * // 0.5 along the x-axis and
- * // 1.3 along the y-axis and
- * // 2 along the z-axis.
- * scale(0.5, 1.3, 2);
- *
- * // Draw the blue sphere.
- * fill('blue');
- * box();
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A white quadrilateral on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Shear the coordinate system along the x-axis.
+ * shearX(QUARTER_PI);
+ *
+ * // Draw the square.
+ * square(0, 0, 50);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Use degrees.
+ * angleMode(DEGREES);
+ *
+ * describe('A white quadrilateral on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Shear the coordinate system along the x-axis.
+ * shearX(45);
+ *
+ * // Draw the square.
+ * square(0, 0, 50);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A white quadrilateral on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Shear the coordinate system along the x-axis.
- * shearX(QUARTER_PI);
- *
- * // Draw the square.
- * square(0, 0, 50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Use degrees.
- * angleMode(DEGREES);
- *
- * describe('A white quadrilateral on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Shear the coordinate system along the x-axis.
- * shearX(45);
- *
- * // Draw the square.
- * square(0, 0, 50);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A white quadrilateral on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Shear the coordinate system along the y-axis.
+ * shearY(QUARTER_PI);
+ *
+ * // Draw the square.
+ * square(0, 0, 50);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Use degrees.
+ * angleMode(DEGREES);
+ *
+ * describe('A white quadrilateral on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Shear the coordinate system along the y-axis.
+ * shearY(45);
+ *
+ * // Draw the square.
+ * square(0, 0, 50);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A white quadrilateral on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Shear the coordinate system along the x-axis.
- * shearY(QUARTER_PI);
- *
- * // Draw the square.
- * square(0, 0, 50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Use degrees.
- * angleMode(DEGREES);
- *
- * describe('A white quadrilateral on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Shear the coordinate system along the x-axis.
- * shearY(45);
- *
- * // Draw the square.
- * square(0, 0, 50);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A white circle on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Translate the origin to the center.
+ * translate(50, 50);
+ *
+ * // Draw a circle at coordinates (0, 0).
+ * circle(0, 0, 40);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'Two circles drawn on a gray background. The blue circle on the right overlaps the red circle at the center.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Translate the origin to the center.
+ * translate(50, 50);
+ *
+ * // Draw the red circle.
+ * fill('red');
+ * circle(0, 0, 40);
+ *
+ * // Translate the origin to the right.
+ * translate(25, 0);
+ *
+ * // Draw the blue circle.
+ * fill('blue');
+ * circle(0, 0, 40);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A white circle moves slowly from left to right on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Calculate the x-coordinate.
+ * let x = frameCount * 0.2;
+ *
+ * // Translate the origin.
+ * translate(x, 50);
+ *
+ * // Draw a circle at coordinates (0, 0).
+ * circle(0, 0, 40);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A white circle on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Create a p5.Vector object.
+ * let v = createVector(50, 50);
+ *
+ * // Translate the origin by the vector.
+ * translate(v);
+ *
+ * // Draw a circle at coordinates (0, 0).
+ * circle(0, 0, 40);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe(
+ * 'Two spheres sitting side-by-side on gray background. The sphere at the center is red. The sphere on the right is blue.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Turn on the lights.
+ * lights();
+ *
+ * // Style the spheres.
+ * noStroke();
+ *
+ * // Draw the red sphere.
+ * fill('red');
+ * sphere(10);
+ *
+ * // Translate the origin to the right.
+ * translate(30, 0, 0);
+ *
+ * // Draw the blue sphere.
+ * fill('blue');
+ * sphere(10);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A white circle on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Translate the origin to the center.
- * translate(50, 50);
- *
- * // Draw a circle at coordinates (0, 0).
- * circle(0, 0, 40);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'Two circles drawn on a gray background. The blue circle on the right overlaps the red circle at the center.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Translate the origin to the center.
- * translate(50, 50);
- *
- * // Draw the red circle.
- * fill('red');
- * circle(0, 0, 40);
- *
- * // Translate the origin to the right.
- * translate(25, 0);
- *
- * // Draw the blue circle.
- * fill('blue');
- * circle(0, 0, 40);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A white circle moves slowly from left to right on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Calculate the x-coordinate.
- * let x = frameCount * 0.2;
- *
- * // Translate the origin.
- * translate(x, 50);
- *
- * // Draw a circle at coordinates (0, 0).
- * circle(0, 0, 40);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A white circle on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Create a p5.Vector object.
- * let v = createVector(50, 50);
- *
- * // Translate the origin by the vector.
- * translate(v);
- *
- * // Draw a circle at coordinates (0, 0).
- * circle(0, 0, 40);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe(
- * 'Two spheres sitting side-by-side on gray background. The sphere at the center is red. The sphere on the right is blue.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Turn on the lights.
- * lights();
- *
- * // Style the spheres.
- * noStroke();
- *
- * // Draw the red sphere.
- * fill('red');
- * sphere(10);
- *
- * // Translate the origin to the right.
- * translate(30, 0, 0);
- *
- * // Draw the blue sphere.
- * fill('blue');
- * sphere(10);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Draw the left circle.
+ * circle(25, 50, 20);
+ *
+ * // Begin the drawing group.
+ * push();
+ *
+ * // Translate the origin to the center.
+ * translate(50, 50);
+ *
+ * // Style the circle.
+ * strokeWeight(5);
+ * stroke('royalblue');
+ * fill('orange');
+ *
+ * // Draw the circle.
+ * circle(0, 0, 20);
+ *
+ * // End the drawing group.
+ * pop();
+ *
+ * // Draw the right circle.
+ * circle(75, 50, 20);
+ *
+ * describe(
+ * 'Three circles drawn in a row on a gray background. The left and right circles are white with thin, black borders. The middle circle is orange with a thick, blue border.'
+ * );
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Slow the frame rate.
+ * frameRate(24);
+ *
+ * describe('A mosquito buzzes in front of a green frog. The frog follows the mouse as the user moves.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Begin the drawing group.
+ * push();
+ *
+ * // Translate the origin to the mouse's position.
+ * translate(mouseX, mouseY);
+ *
+ * // Style the face.
+ * noStroke();
+ * fill('green');
+ *
+ * // Draw a face.
+ * circle(0, 0, 60);
+ *
+ * // Style the eyes.
+ * fill('white');
+ *
+ * // Draw the left eye.
+ * push();
+ * translate(-20, -20);
+ * ellipse(0, 0, 30, 20);
+ * fill('black');
+ * circle(0, 0, 8);
+ * pop();
+ *
+ * // Draw the right eye.
+ * push();
+ * translate(20, -20);
+ * ellipse(0, 0, 30, 20);
+ * fill('black');
+ * circle(0, 0, 8);
+ * pop();
+ *
+ * // End the drawing group.
+ * pop();
+ *
+ * // Draw a bug.
+ * let x = random(0, 100);
+ * let y = random(0, 100);
+ * text('🦟', x, y);
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe(
+ * 'Two spheres drawn on a gray background. The sphere on the left is red and lit from the front. The sphere on the right is a blue wireframe.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Draw the red sphere.
+ * push();
+ * translate(-25, 0, 0);
+ * noStroke();
+ * directionalLight(255, 0, 0, 0, 0, -1);
+ * sphere(20);
+ * pop();
+ *
+ * // Draw the blue sphere.
+ * push();
+ * translate(25, 0, 0);
+ * strokeWeight(0.3);
+ * stroke(0, 0, 255);
+ * noFill();
+ * sphere(20);
+ * pop();
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Draw the left circle.
+ * circle(25, 50, 20);
+ *
+ * // Begin the drawing group.
+ * push();
+ *
+ * // Translate the origin to the center.
+ * translate(50, 50);
+ *
+ * // Style the circle.
+ * strokeWeight(5);
+ * stroke('royalblue');
+ * fill('orange');
+ *
+ * // Draw the circle.
+ * circle(0, 0, 20);
+ *
+ * // End the drawing group.
+ * pop();
+ *
+ * // Draw the right circle.
+ * circle(75, 50, 20);
+ *
+ * describe(
+ * 'Three circles drawn in a row on a gray background. The left and right circles are white with thin, black borders. The middle circle is orange with a thick, blue border.'
+ * );
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Slow the frame rate.
+ * frameRate(24);
+ *
+ * describe('A mosquito buzzes in front of a green frog. The frog follows the mouse as the user moves.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Begin the drawing group.
+ * push();
+ *
+ * // Translate the origin to the mouse's position.
+ * translate(mouseX, mouseY);
+ *
+ * // Style the face.
+ * noStroke();
+ * fill('green');
+ *
+ * // Draw a face.
+ * circle(0, 0, 60);
+ *
+ * // Style the eyes.
+ * fill('white');
+ *
+ * // Draw the left eye.
+ * push();
+ * translate(-20, -20);
+ * ellipse(0, 0, 30, 20);
+ * fill('black');
+ * circle(0, 0, 8);
+ * pop();
+ *
+ * // Draw the right eye.
+ * push();
+ * translate(20, -20);
+ * ellipse(0, 0, 30, 20);
+ * fill('black');
+ * circle(0, 0, 8);
+ * pop();
+ *
+ * // End the drawing group.
+ * pop();
+ *
+ * // Draw a bug.
+ * let x = random(0, 100);
+ * let y = random(0, 100);
+ * text('🦟', x, y);
+ * }
+ *
+ *
+ * // Click and drag the mouse to view the scene from different angles.
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe(
+ * 'Two spheres drawn on a gray background. The sphere on the left is red and lit from the front. The sphere on the right is a blue wireframe.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Enable orbiting with the mouse.
+ * orbitControl();
+ *
+ * // Draw the red sphere.
+ * push();
+ * translate(-25, 0, 0);
+ * noStroke();
+ * directionalLight(255, 0, 0, 0, 0, -1);
+ * sphere(20);
+ * pop();
+ *
+ * // Draw the blue sphere.
+ * push();
+ * translate(25, 0, 0);
+ * strokeWeight(0.3);
+ * stroke(0, 0, 255);
+ * noFill();
+ * sphere(20);
+ * pop();
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Store the player's name.
- * storeItem('name', 'Feist');
- *
- * // Store the player's score.
- * storeItem('score', 1234);
- *
- * describe('The text "Feist: 1234" written in black on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER, CENTER);
- * textSize(14);
- *
- * // Retrieve the name.
- * let name = getItem('name');
- *
- * // Retrieve the score.
- * let score = getItem('score');
- *
- * // Display the score.
- * text(`${name}: ${score}`, 50, 50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create an object.
- * let p = { x: 50, y: 50 };
- *
- * // Store the object.
- * storeItem('position', p);
- *
- * describe('A white circle on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Retrieve the object.
- * let p = getItem('position');
- *
- * // Draw the circle.
- * circle(p.x, p.y, 30);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Store the player's name.
+ * storeItem('name', 'Feist');
+ *
+ * // Store the player's score.
+ * storeItem('score', 1234);
+ *
+ * describe('The text "Feist: 1234" written in black on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER, CENTER);
+ * textSize(14);
+ *
+ * // Retrieve the name.
+ * let name = getItem('name');
+ *
+ * // Retrieve the score.
+ * let score = getItem('score');
+ *
+ * // Display the score.
+ * text(`${name}: ${score}`, 50, 50);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create an object.
+ * let p = { x: 50, y: 50 };
+ *
+ * // Store the object.
+ * storeItem('position', p);
+ *
+ * describe('A white circle on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Retrieve the object.
+ * let p = getItem('position');
+ *
+ * // Draw the circle.
+ * circle(p.x, p.y, 30);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Store the player's name.
- * storeItem('name', 'Feist');
- *
- * // Store the player's score.
- * storeItem('score', 1234);
- *
- * describe('The text "Feist: 1234" written in black on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER, CENTER);
- * textSize(14);
- *
- * // Retrieve the name.
- * let name = getItem('name');
- *
- * // Retrieve the score.
- * let score = getItem('score');
- *
- * // Display the score.
- * text(`${name}: ${score}`, 50, 50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create an object.
- * let p = { x: 50, y: 50 };
- *
- * // Store the object.
- * storeItem('position', p);
- *
- * describe('A white circle on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Retrieve the object.
- * let p = getItem('position');
- *
- * // Draw the circle.
- * circle(p.x, p.y, 30);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.Color object.
- * let c = color('deeppink');
- *
- * // Store the object.
- * storeItem('color', c);
- *
- * describe('A pink circle on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Retrieve the object.
- * let c = getItem('color');
- *
- * // Style the circle.
- * fill(c);
- *
- * // Draw the circle.
- * circle(50, 50, 30);
- * }
- *
- *
- * // Double-click to clear localStorage.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Store the player's name.
- * storeItem('name', 'Feist');
- *
- * // Store the player's score.
- * storeItem('score', 1234);
- *
- * describe(
- * 'The text "Feist: 1234" written in black on a gray background. The text "null: null" appears when the user double-clicks.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER, CENTER);
- * textSize(14);
- *
- * // Retrieve the name.
- * let name = getItem('name');
- *
- * // Retrieve the score.
- * let score = getItem('score');
- *
- * // Display the score.
- * text(`${name}: ${score}`, 50, 50);
- * }
- *
- * // Clear localStorage when the user double-clicks.
- * function doubleClicked() {
- * clearStorage();
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Store the player's name.
+ * storeItem('name', 'Feist');
+ *
+ * // Store the player's score.
+ * storeItem('score', 1234);
+ *
+ * describe('The text "Feist: 1234" written in black on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER, CENTER);
+ * textSize(14);
+ *
+ * // Retrieve the name.
+ * let name = getItem('name');
+ *
+ * // Retrieve the score.
+ * let score = getItem('score');
+ *
+ * // Display the score.
+ * text(`${name}: ${score}`, 50, 50);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create an object.
+ * let p = { x: 50, y: 50 };
+ *
+ * // Store the object.
+ * storeItem('position', p);
+ *
+ * describe('A white circle on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Retrieve the object.
+ * let p = getItem('position');
+ *
+ * // Draw the circle.
+ * circle(p.x, p.y, 30);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.Color object.
+ * let c = color('deeppink');
+ *
+ * // Store the object.
+ * storeItem('color', c);
+ *
+ * describe('A pink circle on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Retrieve the object.
+ * let c = getItem('color');
+ *
+ * // Style the circle.
+ * fill(c);
+ *
+ * // Draw the circle.
+ * circle(50, 50, 30);
+ * }
+ *
+ *
- * // Double-click to remove an item from localStorage.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Store the player's name.
- * storeItem('name', 'Feist');
- *
- * // Store the player's score.
- * storeItem('score', 1234);
- *
- * describe(
- * 'The text "Feist: 1234" written in black on a gray background. The text "Feist: null" appears when the user double-clicks.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER, CENTER);
- * textSize(14);
- *
- * // Retrieve the name.
- * let name = getItem('name');
- *
- * // Retrieve the score.
- * let score = getItem('score');
- *
- * // Display the score.
- * text(`${name}: ${score}`, 50, 50);
- * }
- *
- * // Remove the word from localStorage when the user double-clicks.
- * function doubleClicked() {
- * removeItem('score');
- * }
- *
- *
+ * // Double-click to clear localStorage.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Store the player's name.
+ * storeItem('name', 'Feist');
+ *
+ * // Store the player's score.
+ * storeItem('score', 1234);
+ *
+ * describe(
+ * 'The text "Feist: 1234" written in black on a gray background. The text "null: null" appears when the user double-clicks.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER, CENTER);
+ * textSize(14);
+ *
+ * // Retrieve the name.
+ * let name = getItem('name');
+ *
+ * // Retrieve the score.
+ * let score = getItem('score');
+ *
+ * // Display the score.
+ * text(`${name}: ${score}`, 50, 50);
+ * }
+ *
+ * // Clear localStorage when the user double-clicks.
+ * function doubleClicked() {
+ * clearStorage();
+ * }
+ *
+ *
+ * // Double-click to remove an item from localStorage.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Store the player's name.
+ * storeItem('name', 'Feist');
+ *
+ * // Store the player's score.
+ * storeItem('score', 1234);
+ *
+ * describe(
+ * 'The text "Feist: 1234" written in black on a gray background. The text "Feist: null" appears when the user double-clicks.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER, CENTER);
+ * textSize(14);
+ *
+ * // Retrieve the name.
+ * let name = getItem('name');
+ *
+ * // Retrieve the score.
+ * let score = getItem('score');
+ *
+ * // Display the score.
+ * text(`${name}: ${score}`, 50, 50);
+ * }
+ *
+ * // Remove the word from localStorage when the user double-clicks.
+ * function doubleClicked() {
+ * removeItem('score');
+ * }
+ *
+ *
- * function setup() {
- * let myDictionary = createStringDict('p5', 'js');
- * print(myDictionary.hasKey('p5')); // logs true to console
- *
- * let anotherDictionary = createStringDict({ happy: 'coding' });
- * print(anotherDictionary.hasKey('happy')); // logs true to console
- * }
- *
- * function setup() {
- * let myDictionary = createNumberDict(100, 42);
- * print(myDictionary.hasKey(100)); // logs true to console
- *
- * let anotherDictionary = createNumberDict({ 200: 84 });
- * print(anotherDictionary.hasKey(200)); // logs true to console
- * }
- *
- * function setup() {
- * let myDictionary = createNumberDict(1, 10);
- * myDictionary.create(2, 20);
- * myDictionary.create(3, 30);
- * print(myDictionary.size()); // logs 3 to the console
- * }
- *
- * function setup() {
- * let myDictionary = createStringDict('p5', 'js');
- * print(myDictionary.hasKey('p5')); // logs true to console
- * }
- *
- * function setup() {
- * let myDictionary = createStringDict('p5', 'js');
- * let myValue = myDictionary.get('p5');
- * print(myValue === 'js'); // logs true to console
- * }
- *
- * function setup() {
- * let myDictionary = createStringDict('p5', 'js');
- * myDictionary.set('p5', 'JS');
- * myDictionary.print(); // logs "key: p5 - value: JS" to console
- * }
- *
- * function setup() {
- * let myDictionary = createStringDict('p5', 'js');
- * myDictionary.create('happy', 'coding');
- * myDictionary.print();
- * // above logs "key: p5 - value: js, key: happy - value: coding" to console
- * }
- *
- * function setup() {
- * let myDictionary = createStringDict('p5', 'js');
- * print(myDictionary.hasKey('p5')); // prints 'true'
- * myDictionary.clear();
- * print(myDictionary.hasKey('p5')); // prints 'false'
- * }
- *
- *
- * function setup() {
- * let myDictionary = createStringDict('p5', 'js');
- * myDictionary.create('happy', 'coding');
- * myDictionary.print();
- * // above logs "key: p5 - value: js, key: happy - value: coding" to console
- * myDictionary.remove('p5');
- * myDictionary.print();
- * // above logs "key: happy value: coding" to console
- * }
- *
- * function setup() {
- * let myDictionary = createStringDict('p5', 'js');
- * myDictionary.create('happy', 'coding');
- * myDictionary.print();
- * // above logs "key: p5 - value: js, key: happy - value: coding" to console
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- * background(200);
- * text('click here to save', 10, 10, 70, 80);
- * }
- *
- * function mousePressed() {
- * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {
- * createStringDict({
- * john: 1940,
- * paul: 1942,
- * george: 1943,
- * ringo: 1940
- * }).saveTable('beatles');
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- * background(200);
- * text('click here to save', 10, 10, 70, 80);
- * }
- *
- * function mousePressed() {
- * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {
- * createStringDict({
- * john: 1940,
- * paul: 1942,
- * george: 1943,
- * ringo: 1940
- * }).saveJSON('beatles');
- * }
- * }
- *
- *
- * function setup() {
- * let myDictionary = createNumberDict(2, 5);
- * myDictionary.add(2, 2);
- * print(myDictionary.get(2)); // logs 7 to console.
- * }
- *
- * function setup() {
- * let myDictionary = createNumberDict(2, 5);
- * myDictionary.sub(2, 2);
- * print(myDictionary.get(2)); // logs 3 to console.
- * }
- *
- * function setup() {
- * let myDictionary = createNumberDict(2, 4);
- * myDictionary.mult(2, 2);
- * print(myDictionary.get(2)); // logs 8 to console.
- * }
- *
- * function setup() {
- * let myDictionary = createNumberDict(2, 8);
- * myDictionary.div(2, 2);
- * print(myDictionary.get(2)); // logs 4 to console.
- * }
- *
- * function setup() {
- * let myDictionary = createNumberDict({ 2: -10, 4: 0.65, 1.2: 3 });
- * let lowestValue = myDictionary.minValue(); // value is -10
- * print(lowestValue);
- * }
- *
- * function setup() {
- * let myDictionary = createNumberDict({ 2: -10, 4: 0.65, 1.2: 3 });
- * let highestValue = myDictionary.maxValue(); // value is 3
- * print(highestValue);
- * }
- *
- * function setup() {
- * let myDictionary = createNumberDict({ 2: 4, 4: 6, 1.2: 3 });
- * let lowestKey = myDictionary.minKey(); // value is 1.2
- * print(lowestKey);
- * }
- *
- * function setup() {
- * let myDictionary = createNumberDict({ 2: 4, 4: 6, 1.2: 3 });
- * let highestKey = myDictionary.maxKey(); // value is 4
- * print(highestKey);
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- * background(200);
- *
- * // Select the canvas by its tag.
- * let cnv = select('canvas');
- * cnv.style('border', '5px deeppink dashed');
- *
- * describe('A gray square with a dashed pink border.');
- * }
- *
- *
- * function setup() {
- * let cnv = createCanvas(100, 100);
- *
- * // Add a class attribute to the canvas.
- * cnv.class('pinkborder');
- *
- * background(200);
- *
- * // Select the canvas by its class.
- * cnv = select('.pinkborder');
- *
- * // Style its border.
- * cnv.style('border', '5px deeppink dashed');
- *
- * describe('A gray square with a dashed pink border.');
- * }
- *
- *
- * function setup() {
- * let cnv = createCanvas(100, 100);
- *
- * // Set the canvas' ID.
- * cnv.id('mycanvas');
- *
- * background(200);
- *
- * // Select the canvas by its ID.
- * cnv = select('#mycanvas');
- *
- * // Style its border.
- * cnv.style('border', '5px deeppink dashed');
- *
- * describe('A gray square with a dashed pink border.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create three buttons.
- * createButton('1');
- * createButton('2');
- * createButton('3');
- *
- * // Select the buttons by their tag.
- * let buttons = selectAll('button');
- *
- * // Position the buttons.
- * for (let i = 0; i < 3; i += 1) {
- * buttons[i].position(0, i * 30);
- * }
- *
- * describe('Three buttons stacked vertically. The buttons are labeled, "1", "2", and "3".');
- * }
- *
- *
- * function setup() {
- * // Create three buttons and position them.
- * let b1 = createButton('1');
- * b1.position(0, 0);
- * let b2 = createButton('2');
- * b2.position(0, 30);
- * let b3 = createButton('3');
- * b3.position(0, 60);
- *
- * // Add a class attribute to each button.
- * b1.class('btn');
- * b2.class('btn btn-pink');
- * b3.class('btn');
- *
- * // Select the buttons by their class.
- * let buttons = selectAll('.btn');
- * let pinkButtons = selectAll('.btn-pink');
- *
- * // Style the selected buttons.
- * buttons.forEach(setFont);
- * pinkButtons.forEach(setColor);
- *
- * describe('Three buttons stacked vertically. The buttons are labeled, "1", "2", and "3". Buttons "1" and "3" are gray. Button "2" is pink.');
- * }
- *
- * // Set a button's font to Comic Sans MS.
- * function setFont(btn) {
- * btn.style('font-family', 'Comic Sans MS');
- * }
- *
- * // Set a button's background and font color.
- * function setColor(btn) {
- * btn.style('background', 'deeppink');
- * btn.style('color', 'white');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a paragraph element and place
- * // it in the middle of the canvas.
- * let p = createP('p5*js');
- * p.position(25, 25);
- *
- * describe('A gray square with the text "p5*js" written in its center. The text disappears when the mouse is pressed.');
- * }
- *
- * // Remove all elements when the mouse is pressed.
- * function mousePressed() {
- * removeElements();
- * }
- *
- *
- * let slider;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a paragraph element and place
- * // it at the top of the canvas.
- * let p = createP('p5*js');
- * p.position(25, 25);
- *
- * // Create a slider element and place it
- * // beneath the canvas.
- * slider = createSlider(0, 255, 200);
- * slider.position(0, 100);
- *
- * describe('A gray square with the text "p5*js" written in its center and a range slider beneath it. The square changes color when the slider is moved. The text and slider disappear when the square is double-clicked.');
- * }
- *
- * function draw() {
- * // Use the slider value to change the background color.
- * let g = slider.value();
- * background(g);
- * }
- *
- * // Remove all elements when the mouse is double-clicked.
- * function doubleClicked() {
- * removeElements();
- * }
- *
- *
- * let dropdown;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a dropdown menu and add a few color options.
- * dropdown = createSelect();
- * dropdown.position(0, 0);
- * dropdown.option('red');
- * dropdown.option('green');
- * dropdown.option('blue');
- *
- * // Call paintBackground() when the color option changes.
- * dropdown.changed(paintBackground);
- *
- * describe('A gray square with a dropdown menu at the top. The square changes color when an option is selected.');
- * }
- *
- * // Paint the background with the selected color.
- * function paintBackground() {
- * let c = dropdown.value();
- * background(c);
- * }
- *
- *
- * let checkbox;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a checkbox and place it beneath the canvas.
- * checkbox = createCheckbox(' circle');
- * checkbox.position(0, 100);
- *
- * // Call repaint() when the checkbox changes.
- * checkbox.changed(repaint);
- *
- * describe('A gray square with a checkbox underneath it that says "circle". A white circle appears when the box is checked and disappears otherwise.');
- * }
- *
- * // Paint the background gray and determine whether to draw a circle.
- * function repaint() {
- * background(200);
- * if (checkbox.checked() === true) {
- * circle(50, 50, 30);
- * }
- * }
- *
- *
- * let slider;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a slider and place it beneath the canvas.
- * slider = createSlider(0, 255, 200);
- * slider.position(0, 100);
- *
- * // Call repaint() when the slider changes.
- * slider.input(repaint);
- *
- * describe('A gray square with a range slider underneath it. The background changes shades of gray when the slider is moved.');
- * }
- *
- * // Paint the background using slider's value.
- * function repaint() {
- * let g = slider.value();
- * background(g);
- * }
- *
- *
- * let input;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create an input and place it beneath the canvas.
- * input = createInput('');
- * input.position(0, 100);
- *
- * // Call repaint() when input is detected.
- * input.input(repaint);
- *
- * describe('A gray square with a text input bar beneath it. Any text written in the input appears in the middle of the square.');
- * }
- *
- * // Paint the background gray and display the input's value.
- * function repaint() {
- * background(200);
- * let msg = input.value();
- * text(msg, 5, 50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a div element and set its position.
- * let div = createDiv('p5*js');
- * div.position(25, 35);
- *
- * describe('A gray square with the text "p5*js" written in its center.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create an h3 element within the div.
- * let div = createDiv('p5*js
');
- * div.position(20, 5);
- *
- * describe('A gray square with the text "p5*js" written in its center.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a paragraph element and set its position.
- * let p = createP('Tell me a story.');
- * p.position(5, 0);
- *
- * describe('A gray square displaying the text "Tell me a story." written in black.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a span element and set its position.
- * let span = createSpan('p5*js');
- * span.position(25, 35);
- *
- * describe('A gray square with the text "p5*js" written in its center.');
- * }
- *
- *
- * function setup() {
- * background(200);
- *
- * // Create a div element as a container.
- * let div = createDiv();
- *
- * // Place the div at the center.
- * div.position(25, 35);
- *
- * // Create a span element.
- * let s1 = createSpan('p5');
- *
- * // Create a second span element.
- * let s2 = createSpan('*');
- *
- * // Set the second span's font color.
- * s2.style('color', 'deeppink');
- *
- * // Create a third span element.
- * let s3 = createSpan('js');
- *
- * // Add all the spans to the container div.
- * s1.parent(div);
- * s2.parent(div);
- * s3.parent(div);
- *
- * describe('A gray square with the text "p5*js" written in black at its center. The asterisk is pink.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * let img = createImg(
- * 'https://p5js.org/assets/img/asterisk-01.png',
- * 'The p5.js magenta asterisk.'
- * );
- * img.position(0, -10);
- *
- * describe('A gray square with a magenta asterisk in its center.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create an anchor element that links to p5js.org.
- * let a = createA('http://p5js.org/', 'p5*js');
- * a.position(25, 35);
- *
- * describe('The text "p5*js" written at the center of a gray square.');
- * }
- *
- *
- * function setup() {
- * background(200);
- *
- * // Create an anchor tag that links to p5js.org.
- * // Open the link in a new tab.
- * let a = createA('http://p5js.org/', 'p5*js', '_blank');
- * a.position(25, 35);
- *
- * describe('The text "p5*js" written at the center of a gray square.');
- * }
- *
- *
- * let slider;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a slider and place it at the top of the canvas.
- * slider = createSlider(0, 255);
- * slider.position(10, 10);
- * slider.size(80);
- *
- * describe('A dark gray square with a range slider at the top. The square changes color when the slider is moved.');
- * }
- *
- * function draw() {
- * // Use the slider as a grayscale value.
- * let g = slider.value();
- * background(g);
- * }
- *
- *
- * let slider;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a slider and place it at the top of the canvas.
- * // Set its default value to 0.
- * slider = createSlider(0, 255, 0);
- * slider.position(10, 10);
- * slider.size(80);
- *
- * describe('A black square with a range slider at the top. The square changes color when the slider is moved.');
- * }
- *
- * function draw() {
- * // Use the slider as a grayscale value.
- * let g = slider.value();
- * background(g);
- * }
- *
- *
- * let slider;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a slider and place it at the top of the canvas.
- * // Set its default value to 0.
- * // Set its step size to 50.
- * slider = createSlider(0, 255, 0, 50);
- * slider.position(10, 10);
- * slider.size(80);
- *
- * describe('A black square with a range slider at the top. The square changes color when the slider is moved.');
- * }
- *
- * function draw() {
- * // Use the slider as a grayscale value.
- * let g = slider.value();
- * background(g);
- * }
- *
- *
- * let slider;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a slider and place it at the top of the canvas.
- * // Set its default value to 0.
- * // Set its step size to 0 so that it moves smoothly.
- * slider = createSlider(0, 255, 0, 0);
- * slider.position(10, 10);
- * slider.size(80);
- *
- * describe('A black square with a range slider at the top. The square changes color when the slider is moved.');
- * }
- *
- * function draw() {
- * // Use the slider as a grayscale value.
- * let g = slider.value();
- * background(g);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a button and place it beneath the canvas.
- * let button = createButton('click me');
- * button.position(0, 100);
- *
- * // Call repaint() when the button is pressed.
- * button.mousePressed(repaint);
- *
- * describe('A gray square with a button that says "click me" beneath it. The square changes color when the button is clicked.');
- * }
- *
- * // Change the background color.
- * function repaint() {
- * let g = random(255);
- * background(g);
- * }
- *
- *
- * let button;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a button and set its value to 0.
- * // Place the button beneath the canvas.
- * button = createButton('click me', 'red');
- * button.position(0, 100);
- *
- * // Call randomColor() when the button is pressed.
- * button.mousePressed(randomColor);
- *
- * describe('A red square with a button that says "click me" beneath it. The square changes color when the button is clicked.');
- * }
- *
- * function draw() {
- * // Use the button's value to set the background color.
- * let c = button.value();
- * background(c);
- * }
- *
- * // Set the button's value to a random color.
- * function randomColor() {
- * let c = random(['red', 'green', 'blue', 'yellow']);
- * button.value(c);
- * }
- *
- *
- * let checkbox;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a checkbox and place it beneath the canvas.
- * checkbox = createCheckbox();
- * checkbox.position(0, 100);
- *
- * describe('A black square with a checkbox beneath it. The square turns white when the box is checked.');
- * }
- *
- * function draw() {
- * // Use the checkbox to set the background color.
- * if (checkbox.checked()) {
- * background(255);
- * } else {
- * background(0);
- * }
- * }
- *
- *
- * let checkbox;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a checkbox and place it beneath the canvas.
- * // Label the checkbox "white".
- * checkbox = createCheckbox(' white');
- * checkbox.position(0, 100);
- *
- * describe('A black square with a checkbox labeled "white" beneath it. The square turns white when the box is checked.');
- * }
- *
- * function draw() {
- * // Use the checkbox to set the background color.
- * if (checkbox.checked()) {
- * background(255);
- * } else {
- * background(0);
- * }
- * }
- *
- *
- * let checkbox;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a checkbox and place it beneath the canvas.
- * // Label the checkbox "white" and set its value to true.
- * checkbox = createCheckbox(' white', true);
- * checkbox.position(0, 100);
- *
- * describe('A white square with a checkbox labeled "white" beneath it. The square turns black when the box is unchecked.');
- * }
- *
- * function draw() {
- * // Use the checkbox to set the background color.
- * if (checkbox.checked()) {
- * background(255);
- * } else {
- * background(0);
- * }
- * }
- *
- *
- * let mySelect;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a dropdown and place it beneath the canvas.
- * mySelect = createSelect();
- * mySelect.position(0, 100);
- *
- * // Add color options.
- * mySelect.option('red');
- * mySelect.option('green');
- * mySelect.option('blue');
- * mySelect.option('yellow');
- *
- * // Set the selected option to "red".
- * mySelect.selected('red');
- *
- * describe('A red square with a dropdown menu beneath it. The square changes color when a new color is selected.');
- * }
- *
- * function draw() {
- * // Use the selected value to paint the background.
- * let c = mySelect.selected();
- * background(c);
- * }
- *
- *
- * let mySelect;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a dropdown and place it beneath the canvas.
- * mySelect = createSelect();
- * mySelect.position(0, 100);
- *
- * // Add color options.
- * mySelect.option('red');
- * mySelect.option('green');
- * mySelect.option('blue');
- * mySelect.option('yellow');
- *
- * // Set the selected option to "red".
- * mySelect.selected('red');
- *
- * // Disable the "yellow" option.
- * mySelect.disable('yellow');
- *
- * describe('A red square with a dropdown menu beneath it. The square changes color when a new color is selected.');
- * }
- *
- * function draw() {
- * // Use the selected value to paint the background.
- * let c = mySelect.selected();
- * background(c);
- * }
- *
- *
- * let mySelect;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a dropdown and place it beneath the canvas.
- * mySelect = createSelect();
- * mySelect.position(0, 100);
- *
- * // Add color options with names and values.
- * mySelect.option('one', 'red');
- * mySelect.option('two', 'green');
- * mySelect.option('three', 'blue');
- * mySelect.option('four', 'yellow');
- *
- * // Set the selected option to "one".
- * mySelect.selected('one');
- *
- * describe('A red square with a dropdown menu beneath it. The square changes color when a new color is selected.');
- * }
- *
- * function draw() {
- * // Use the selected value to paint the background.
- * let c = mySelect.selected();
- * background(c);
- * }
- *
- *
- * // Hold CTRL to select multiple options on Windows and Linux.
- * // Hold CMD to select multiple options on macOS.
- * let mySelect;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a dropdown and allow multiple selections.
- * // Place it beneath the canvas.
- * mySelect = createSelect(true);
- * mySelect.position(0, 100);
- *
- * // Add color options.
- * mySelect.option('red');
- * mySelect.option('green');
- * mySelect.option('blue');
- * mySelect.option('yellow');
- *
- * describe('A gray square with a dropdown menu beneath it. Colorful circles appear when their color is selected.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Use the selected value(s) to draw circles.
- * let colors = mySelect.selected();
- * for (let i = 0; i < colors.length; i += 1) {
- * // Calculate the x-coordinate.
- * let x = 10 + i * 20;
- *
- * // Access the color.
- * let c = colors[i];
- *
- * // Draw the circle.
- * fill(c);
- * circle(x, 50, 20);
- * }
- * }
- *
- *
- * let style = document.createElement('style');
- * style.innerHTML = `
- * .p5-radio label {
- * display: flex;
- * align-items: center;
- * }
- * .p5-radio input {
- * margin-right: 5px;
- * }
- * `;
- * document.head.appendChild(style);
- *
- * let myRadio;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a radio button element and place it
- * // in the top-left corner.
- * myRadio = createRadio();
- * myRadio.position(0, 0);
- * myRadio.class('p5-radio');
- * myRadio.size(60);
- *
- * // Add a few color options.
- * myRadio.option('red');
- * myRadio.option('yellow');
- * myRadio.option('blue');
- *
- * // Choose a default option.
- * myRadio.selected('yellow');
- *
- * describe('A yellow square with three color options listed, "red", "yellow", and "blue". The square changes color when the user selects a new option.');
- * }
- *
- * function draw() {
- * // Set the background color using the radio button.
- * let g = myRadio.value();
- * background(g);
- * }
- *
- *
- * let myRadio;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a radio button element and place it
- * // in the top-left corner.
- * myRadio = createRadio();
- * myRadio.position(0, 0);
- * myRadio.size(50);
- *
- * // Add a few color options.
- * // Color values are labeled with
- * // emotions they evoke.
- * myRadio.option('red', 'love');
- * myRadio.option('yellow', 'joy');
- * myRadio.option('blue', 'trust');
- *
- * // Choose a default option.
- * myRadio.selected('yellow');
- *
- * describe('A yellow square with three options listed, "love", "joy", and "trust". The square changes color when the user selects a new option.');
- * }
- *
- * function draw() {
- * // Set the background color using the radio button.
- * let c = myRadio.value();
- * background(c);
- * }
- *
- *
- * let myRadio;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a radio button element and place it
- * // in the top-left corner.
- * myRadio = createRadio();
- * myRadio.position(0, 0);
- * myRadio.class('p5-radio');
- * myRadio.size(50);
- *
- * // Add a few color options.
- * myRadio.option('red');
- * myRadio.option('yellow');
- * myRadio.option('blue');
- *
- * // Choose a default option.
- * myRadio.selected('yellow');
- *
- * // Create a button and place it beneath the canvas.
- * let btn = createButton('disable');
- * btn.position(0, 100);
- *
- * // Call disableRadio() when btn is pressed.
- * btn.mousePressed(disableRadio);
- *
- * describe('A yellow square with three options listed, "red", "yellow", and "blue". The square changes color when the user selects a new option. A "disable" button beneath the canvas disables the color options when pressed.');
- * }
- *
- * function draw() {
- * // Set the background color using the radio button.
- * let c = myRadio.value();
- * background(c);
- * }
- *
- * // Disable myRadio.
- * function disableRadio() {
- * myRadio.disable(true);
- * }
- *
- *
- * let myPicker;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a color picker and set its position.
- * myPicker = createColorPicker('deeppink');
- * myPicker.position(0, 100);
- *
- * describe('A pink square with a color picker beneath it. The square changes color when the user picks a new color.');
- * }
- *
- * function draw() {
- * // Use the color picker to paint the background.
- * let c = myPicker.color();
- * background(c);
- * }
- *
- *
- * let myPicker;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a color picker and set its position.
- * myPicker = createColorPicker('deeppink');
- * myPicker.position(0, 100);
- *
- * describe('A number with the format "#rrggbb" is displayed on a pink canvas. The background color and number change when the user picks a new color.');
- * }
- *
- * function draw() {
- * // Use the color picker to paint the background.
- * let c = myPicker.value();
- * background(c);
- *
- * // Display the current color as a hex string.
- * text(c, 25, 55);
- * }
- *
- *
- * let myInput;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create an input element and place it
- * // beneath the canvas.
- * myInput = createInput();
- * myInput.position(0, 100);
- *
- * describe('A gray square with a text box beneath it. The text in the square changes when the user types something new in the input bar.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Use the input to display a message.
- * let msg = myInput.value();
- * text(msg, 25, 55);
- * }
- *
- *
- * let myInput;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create an input element and place it
- * // beneath the canvas. Set its default
- * // text to "hello!".
- * myInput = createInput('hello!');
- * myInput.position(0, 100);
- *
- * describe('The text "hello!" written at the center of a gray square. A text box beneath the square also says "hello!". The text in the square changes when the user types something new in the input bar.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Use the input to display a message.
- * let msg = myInput.value();
- * text(msg, 25, 55);
- * }
- *
- *
- * // Use the file input to select an image to
- * // load and display.
- * let input;
- * let img;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a file input and place it beneath
- * // the canvas.
- * input = createFileInput(handleImage);
- * input.position(0, 100);
- *
- * describe('A gray square with a file input beneath it. If the user selects an image file to load, it is displayed on the square.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw the image if loaded.
- * if (img) {
- * image(img, 0, 0, width, height);
- * }
- * }
- *
- * // Create an image if the file is an image.
- * function handleImage(file) {
- * if (file.type === 'image') {
- * img = createImg(file.data, '');
- * img.hide();
- * } else {
- * img = null;
- * }
- * }
- *
- *
- * // Use the file input to select multiple images
- * // to load and display.
- * let input;
- * let images = [];
- *
- * function setup() {
- * // Create a file input and place it beneath
- * // the canvas. Allow it to load multiple files.
- * input = createFileInput(handleImage, true);
- * input.position(0, 100);
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw the images if loaded. Each image
- * // is drawn 20 pixels lower than the
- * // previous image.
- * for (let i = 0; i < images.length; i += 1) {
- * // Calculate the y-coordinate.
- * let y = i * 20;
- *
- * // Draw the image.
- * image(img, 0, y, 100, 100);
- * }
- *
- * describe('A gray square with a file input beneath it. If the user selects multiple image files to load, they are displayed on the square.');
- * }
- *
- * // Create an image if the file is an image,
- * // then add it to the images array.
- * function handleImage(file) {
- * if (file.type === 'image') {
- * let img = createImg(file.data, '');
- * img.hide();
- * images.push(img);
- * }
- * }
- *
- *
- * function setup() {
- * noCanvas();
- *
- * // Load a video and add it to the page.
- * // Note: this may not work in some browsers.
- * let video = createVideo('assets/small.mp4');
- *
- * // Show the default video controls.
- * video.showControls();
- *
- * describe('A video of a toy robot with playback controls beneath it.');
- * }
- *
- *
- * function setup() {
- * noCanvas();
- *
- * // Load a video and add it to the page.
- * // Provide an array options for different file formats.
- * let video = createVideo(
- * ['assets/small.mp4', 'assets/small.ogv', 'assets/small.webm']
- * );
- *
- * // Show the default video controls.
- * video.showControls();
- *
- * describe('A video of a toy robot with playback controls beneath it.');
- * }
- *
- *
- * let video;
- *
- * function setup() {
- * noCanvas();
- *
- * // Load a video and add it to the page.
- * // Provide an array options for different file formats.
- * // Call mute() once the video loads.
- * video = createVideo(
- * ['assets/small.mp4', 'assets/small.ogv', 'assets/small.webm'],
- * muteVideo
- * );
- *
- * // Show the default video controls.
- * video.showControls();
- *
- * describe('A video of a toy robot with playback controls beneath it.');
- * }
- *
- * // Mute the video once it loads.
- * function muteVideo() {
- * video.volume(0);
- * }
- *
- *
- * function setup() {
- * noCanvas();
- *
- * // Load the audio.
- * let beat = createAudio('assets/beat.mp3');
- *
- * // Show the default audio controls.
- * beat.showControls();
- *
- * describe('An audio beat plays when the user double-clicks the square.');
- * }
- *
- *
- * function setup() {
- * noCanvas();
- *
- * // Create the video capture.
- * createCapture(VIDEO);
- *
- * describe('A video stream from the webcam.');
- * }
- *
- *
- * let capture;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create the video capture and hide the element.
- * capture = createCapture(VIDEO);
- * capture.hide();
- *
- * describe('A video stream from the webcam with inverted colors.');
- * }
- *
- * function draw() {
- * // Draw the video capture within the canvas.
- * image(capture, 0, 0, width, width * capture.height / capture.width);
- *
- * // Invert the colors in the stream.
- * filter(INVERT);
- * }
- *
- *
- * let capture;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create the video capture with mirrored output.
- * capture = createCapture(VIDEO,{ flipped:true });
- * capture.size(100,100);
- *
- * describe('A video stream from the webcam with flipped or mirrored output.');
- * }
- *
- *
- *
- * function setup() {
- * createCanvas(480, 120);
- *
- * // Create a constraints object.
- * let constraints = {
- * video: {
- * mandatory: {
- * minWidth: 1280,
- * minHeight: 720
- * },
- * optional: [{ maxFrameRate: 10 }]
- * },
- * audio: false
- * };
- *
- * // Create the video capture.
- * createCapture(constraints);
- *
- * describe('A video stream from the webcam.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create an h5 element with nothing in it.
- * createElement('h5');
- *
- * describe('A gray square.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create an h5 element with the content "p5*js".
- * let h5 = createElement('h5', 'p5*js');
- *
- * // Set the element's style and position.
- * h5.style('color', 'deeppink');
- * h5.position(30, 15);
- *
- * describe('The text "p5*js" written in pink in the middle of a gray square.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a div element.
- * let div = createDiv('div');
- *
- * // Add a class to the div.
- * div.addClass('myClass');
- *
- * describe('A gray square.');
- * }
- *
- *
- * // In this example, a class is set when the div is created
- * // and removed when mouse is pressed. This could link up
- * // with a CSS style rule to toggle style properties.
- *
- * let div;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a div element.
- * div = createDiv('div');
- *
- * // Add a class to the div.
- * div.addClass('myClass');
- *
- * describe('A gray square.');
- * }
- *
- * // Remove 'myClass' from the div when the user presses the mouse.
- * function mousePressed() {
- * div.removeClass('myClass');
- * }
- *
- *
- * let div;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a div element.
- * div = createDiv('div');
- *
- * // Add the class 'show' to the div.
- * div.addClass('show');
- *
- * describe('A gray square.');
- * }
- *
- * // Toggle the class 'show' when the mouse is pressed.
- * function mousePressed() {
- * if (div.hasClass('show')) {
- * div.addClass('show');
- * } else {
- * div.removeClass('show');
- * }
- * }
- *
- *
- * let div;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a div element.
- * div = createDiv('div');
- *
- * // Add the 'show' class to the div.
- * div.addClass('show');
- *
- * describe('A gray square.');
- * }
- *
- * // Toggle the 'show' class when the mouse is pressed.
- * function mousePressed() {
- * div.toggleClass('show');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create the div elements.
- * let div0 = createDiv('Parent');
- * let div1 = createDiv('Child');
- *
- * // Make div1 the child of div0
- * // using the p5.Element.
- * div0.child(div1);
- *
- * describe('A gray square with the words "Parent" and "Child" written beneath it.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create the div elements.
- * let div0 = createDiv('Parent');
- * let div1 = createDiv('Child');
- *
- * // Give div1 an ID.
- * div1.id('apples');
- *
- * // Make div1 the child of div0
- * // using its ID.
- * div0.child('apples');
- *
- * describe('A gray square with the words "Parent" and "Child" written beneath it.');
- * }
- *
- *
- * // This example assumes there is a div already on the page
- * // with id "myChildDiv".
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create the div elements.
- * let div0 = createDiv('Parent');
- *
- * // Select the child element by its ID.
- * let elt = document.getElementById('myChildDiv');
- *
- * // Make div1 the child of div0
- * // using its HTMLElement object.
- * div0.child(elt);
- *
- * describe('A gray square with the words "Parent" and "Child" written beneath it.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create the div element and style it.
- * let div = createDiv('');
- * div.size(10, 10);
- * div.style('background-color', 'orange');
- *
- * // Center the div relative to the page's body.
- * div.center();
- *
- * describe('A gray square and an orange rectangle. The rectangle is at the center of the page.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create the div element and set its size.
- * let div = createDiv('');
- * div.size(100, 100);
- *
- * // Set the inner HTML to "hi".
- * div.html('hi');
- *
- * describe('A gray square with the word "hi" written beneath it.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create the div element and set its size.
- * let div = createDiv('Hello ');
- * div.size(100, 100);
- *
- * // Append "World" to the div's HTML.
- * div.html('World', true);
- *
- * describe('A gray square with the text "Hello World" written beneath it.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create the div element.
- * let div = createDiv('Hello');
- *
- * // Prints "Hello" to the console.
- * print(div.html());
- *
- * describe('A gray square with the word "Hello!" written beneath it.');
- * }
- *
- *
- * function setup() {
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Positions the canvas 50px to the right and 100px
- * // below the top-left corner of the window.
- * cnv.position(50, 100);
- *
- * describe('A gray square that is 50 pixels to the right and 100 pixels down from the top-left corner of the web page.');
- * }
- *
- *
- * function setup() {
- * let cnv = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Positions the canvas at the top-left corner
- * // of the window with a 'fixed' position type.
- * cnv.position(0, 0, 'fixed');
- *
- * describe('A gray square in the top-left corner of the web page.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a paragraph element and set its font color to "deeppink".
- * let p = createP('p5*js');
- * p.position(25, 20);
- * p.style('color', 'deeppink');
- *
- * describe('The text p5*js written in pink on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object.
- * let c = color('deeppink');
- *
- * // Create a paragraph element and set its font color using a p5.Color object.
- * let p = createP('p5*js');
- * p.position(25, 20);
- * p.style('color', c);
- *
- * describe('The text p5*js written in pink on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a paragraph element and set its font color to "deeppink"
- * // using property:value syntax.
- * let p = createP('p5*js');
- * p.position(25, 20);
- * p.style('color:deeppink');
- *
- * describe('The text p5*js written in pink on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create an empty paragraph element and set its font color to "deeppink".
- * let p = createP();
- * p.position(5, 5);
- * p.style('color', 'deeppink');
- *
- * // Get the element's color as an RGB color string.
- * let c = p.style('color');
- *
- * // Set the element's inner HTML using the RGB color string.
- * p.html(c);
- *
- * describe('The text "rgb(255, 20, 147)" written in pink on a gray background.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a container div element and place it at the top-left corner.
- * let container = createDiv();
- * container.position(0, 0);
- *
- * // Create a paragraph element and place it within the container.
- * // Set its horizontal alignment to "left".
- * let p1 = createP('hi');
- * p1.parent(container);
- * p1.attribute('align', 'left');
- *
- * // Create a paragraph element and place it within the container.
- * // Set its horizontal alignment to "center".
- * let p2 = createP('hi');
- * p2.parent(container);
- * p2.attribute('align', 'center');
- *
- * // Create a paragraph element and place it within the container.
- * // Set its horizontal alignment to "right".
- * let p3 = createP('hi');
- * p3.parent(container);
- * p3.attribute('align', 'right');
- *
- * describe('A gray square with the text "hi" written on three separate lines, each placed further to the right.');
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ * background(200);
+ *
+ * // Select the canvas by its tag.
+ * let cnv = select('canvas');
+ * cnv.style('border', '5px deeppink dashed');
+ *
+ * describe('A gray square with a dashed pink border.');
+ * }
+ *
+ *
+ * function setup() {
+ * let cnv = createCanvas(100, 100);
+ *
+ * // Add a class attribute to the canvas.
+ * cnv.class('pinkborder');
+ *
+ * background(200);
+ *
+ * // Select the canvas by its class.
+ * cnv = select('.pinkborder');
+ *
+ * // Style its border.
+ * cnv.style('border', '5px deeppink dashed');
+ *
+ * describe('A gray square with a dashed pink border.');
+ * }
+ *
+ *
+ * function setup() {
+ * let cnv = createCanvas(100, 100);
+ *
+ * // Set the canvas' ID.
+ * cnv.id('mycanvas');
+ *
+ * background(200);
+ *
+ * // Select the canvas by its ID.
+ * cnv = select('#mycanvas');
+ *
+ * // Style its border.
+ * cnv.style('border', '5px deeppink dashed');
+ *
+ * describe('A gray square with a dashed pink border.');
+ * }
+ *
+ *
- * let p;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a paragraph element and place it in the center of the canvas.
- * // Set its "align" attribute to "center".
- * p = createP('hi');
- * p.position(0, 20);
- * p.attribute('align', 'center');
- *
- * describe('The text "hi" written in black at the center of a gray square. The text moves to the left edge when double-clicked.');
- * }
- *
- * // Remove the 'align' attribute when the user double-clicks the paragraph.
- * function doubleClicked() {
- * p.removeAttribute('align');
- * }
- *
- *
- * let input;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a text input and place it beneath the canvas.
- * // Set its default value to "hello".
- * input = createInput('hello');
- * input.position(0, 100);
- *
- * describe('The text from an input box is displayed on a gray square.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Use the input's value to display a message.
- * let msg = input.value();
- * text(msg, 0, 55);
- * }
- *
- *
- * let input;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a text input and place it beneath the canvas.
- * // Set its default value to "hello".
- * input = createInput('hello');
- * input.position(0, 100);
- *
- * describe('The text from an input box is displayed on a gray square. The text resets to "hello" when the user double-clicks the square.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Use the input's value to display a message.
- * let msg = input.value();
- * text(msg, 0, 55);
- * }
- *
- * // Reset the input's value.
- * function doubleClicked() {
- * input.value('hello');
- * }
- *
- *
- * let p;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a paragraph element and hide it.
- * p = createP('p5*js');
- * p.position(10, 10);
- * p.hide();
- *
- * describe('A gray square. The text "p5*js" appears when the user double-clicks the square.');
- * }
- *
- * // Show the paragraph when the user double-clicks.
- * function doubleClicked() {
- * p.show();
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a pink div element and place it at the top-left corner.
- * let div = createDiv();
- * div.position(10, 10);
- * div.style('background-color', 'deeppink');
- *
- * // Set the div's width to 80 pixels and height to 20 pixels.
- * div.size(80, 20);
- *
- * describe('A gray square with a pink rectangle near its top.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a pink div element and place it at the top-left corner.
- * let div = createDiv();
- * div.position(10, 10);
- * div.style('background-color', 'deeppink');
- *
- * // Set the div's width to 80 pixels and height to 40 pixels.
- * div.size(80, 40);
- *
- * // Get the div's size as an object.
- * let s = div.size();
- *
- * // Display the div's dimensions.
- * div.html(`${s.width} x ${s.height}`);
- *
- * describe('A gray square with a pink rectangle near its top. The text "80 x 40" is written within the rectangle.');
- * }
- *
- *
- * let img1;
- * let img2;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Load an image of an astronaut on the moon
- * // and place it at the top-left of the canvas.
- * img1 = createImg(
- * 'assets/moonwalk.jpg',
- * 'An astronaut walking on the moon',
- * ''
- * );
- * img1.position(0, 0);
- *
- * // Load an image of an astronaut on the moon
- * // and place it at the top-left of the canvas.
- * // Resize the image once it's loaded.
- * img2 = createImg(
- * 'assets/moonwalk.jpg',
- * 'An astronaut walking on the moon',
- * '',
- * resizeImage
- * );
- * img2.position(0, 0);
- *
- * describe('A gray square two copies of a space image at the top-left. The copy in front is smaller.');
- * }
- *
- * // Resize img2 and keep its aspect ratio.
- * function resizeImage() {
- * img2.size(50, AUTO);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create three buttons.
+ * createButton('1');
+ * createButton('2');
+ * createButton('3');
+ *
+ * // Select the buttons by their tag.
+ * let buttons = selectAll('button');
+ *
+ * // Position the buttons.
+ * for (let i = 0; i < 3; i += 1) {
+ * buttons[i].position(0, i * 30);
+ * }
+ *
+ * describe('Three buttons stacked vertically. The buttons are labeled, "1", "2", and "3".');
+ * }
+ *
+ *
+ * function setup() {
+ * // Create three buttons and position them.
+ * let b1 = createButton('1');
+ * b1.position(0, 0);
+ * let b2 = createButton('2');
+ * b2.position(0, 30);
+ * let b3 = createButton('3');
+ * b3.position(0, 60);
+ *
+ * // Add a class attribute to each button.
+ * b1.class('btn');
+ * b2.class('btn btn-pink');
+ * b3.class('btn');
+ *
+ * // Select the buttons by their class.
+ * let buttons = selectAll('.btn');
+ * let pinkButtons = selectAll('.btn-pink');
+ *
+ * // Style the selected buttons.
+ * buttons.forEach(setFont);
+ * pinkButtons.forEach(setColor);
+ *
+ * describe('Three buttons stacked vertically. The buttons are labeled, "1", "2", and "3". Buttons "1" and "3" are gray. Button "2" is pink.');
+ * }
+ *
+ * // Set a button's font to Comic Sans MS.
+ * function setFont(btn) {
+ * btn.style('font-family', 'Comic Sans MS');
+ * }
+ *
+ * // Set a button's background and font color.
+ * function setColor(btn) {
+ * btn.style('background', 'deeppink');
+ * btn.style('color', 'white');
+ * }
+ *
+ *
- * let p;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a paragraph element.
- * p = createP('p5*js');
- * p.position(10, 10);
- *
- * describe('The text "p5*js" written at the center of a gray square. ');
- * }
- *
- * // Remove the paragraph when the user double-clicks.
- * function doubleClicked() {
- * p.remove();
- * }
- *
- *
- * // Drop an image on the canvas to view
- * // this example.
- * let img;
- *
- * function setup() {
- * let c = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call handleFile() when a file that's dropped on the canvas has loaded.
- * c.drop(handleFile);
- *
- * describe('A gray square. When the user drops an image on the square, it is displayed.');
- * }
- *
- * // Remove the existing image and display the new one.
- * function handleFile(file) {
- * // Remove the current image, if any.
- * if (img) {
- * img.remove();
- * }
- *
- * // Create an
element with the
- * // dropped file.
- * img = createImg(file.data, '');
- * img.hide();
- *
- * // Draw the image.
- * image(img, 0, 0, width, height);
- * }
- *
- *
- * // Drop an image on the canvas to view
- * // this example.
- * let img;
- * let msg;
- *
- * function setup() {
- * let c = createCanvas(100, 100);
- *
- * background(200);
- *
- * // Call functions when the user drops a file on the canvas
- * // and when the file loads.
- * c.drop(handleFile, handleDrop);
- *
- * describe('A gray square. When the user drops an image on the square, it is displayed. The id attribute of canvas element is also displayed.');
- * }
- *
- * // Display the image when it loads.
- * function handleFile(file) {
- * // Remove the current image, if any.
- * if (img) {
- * img.remove();
- * }
- *
- * // Create an img element with the dropped file.
- * img = createImg(file.data, '');
- * img.hide();
- *
- * // Draw the image.
- * image(img, 0, 0, width, height);
- * }
- *
- * // Display the file's name when it loads.
- * function handleDrop(event) {
- * // Remove current paragraph, if any.
- * if (msg) {
- * msg.remove();
- * }
- *
- * // Use event to get the drop target's id.
- * let id = event.target.id;
- *
- * // Write the canvas' id beneath it.
- * msg = createP(id);
- * msg.position(0, 100);
- *
- * // Set the font color randomly for each drop.
- * let c = random(['red', 'green', 'blue']);
- * msg.style('color', c);
- * msg.style('font-size', '12px');
- * }
- *
- *
- * let stickyNote;
- * let textInput;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a div element and style it.
- * stickyNote = createDiv('Note');
- * stickyNote.position(5, 5);
- * stickyNote.size(80, 20);
- * stickyNote.style('font-size', '16px');
- * stickyNote.style('font-family', 'Comic Sans MS');
- * stickyNote.style('background', 'orchid');
- * stickyNote.style('padding', '5px');
- *
- * // Make the note draggable.
- * stickyNote.draggable();
- *
- * // Create a panel div and style it.
- * let panel = createDiv('');
- * panel.position(5, 40);
- * panel.size(80, 50);
- * panel.style('background', 'orchid');
- * panel.style('font-size', '16px');
- * panel.style('padding', '5px');
- * panel.style('text-align', 'center');
- *
- * // Make the panel draggable.
- * panel.draggable();
- *
- * // Create a text input and style it.
- * textInput = createInput('Note');
- * textInput.size(70);
- *
- * // Add the input to the panel.
- * textInput.parent(panel);
- *
- * // Call handleInput() when text is input.
- * textInput.input(handleInput);
- *
- * describe(
- * 'A gray square with two purple rectangles that move when dragged. The top rectangle displays the text that is typed into the bottom rectangle.'
- * );
- * }
- *
- * // Update stickyNote's HTML when text is input.
- * function handleInput() {
- * stickyNote.html(textInput.value());
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create an h5 element with nothing in it.
+ * createElement('h5');
+ *
+ * describe('A gray square.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create an h5 element with the content "p5*js".
+ * let h5 = createElement('h5', 'p5*js');
+ *
+ * // Set the element's style and position.
+ * h5.style('color', 'deeppink');
+ * h5.position(30, 15);
+ *
+ * describe('The text "p5*js" written in pink in the middle of a gray square.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a paragraph element and place
+ * // it in the middle of the canvas.
+ * let p = createP('p5*js');
+ * p.position(25, 25);
+ *
+ * describe('A gray square with the text "p5*js" written in its center. The text disappears when the mouse is pressed.');
+ * }
+ *
+ * // Remove all elements when the mouse is pressed.
+ * function mousePressed() {
+ * removeElements();
+ * }
+ *
+ *
+ * let slider;
+ *
+ * function setup() {
+ * createCanvas(200, 200);
+ *
+ * // Create a paragraph element and place
+ * // it at the top of the canvas.
+ * let p = createP('p5*js');
+ * p.position(25, 25);
+ *
+ * // Create a slider element and place it
+ * // beneath the canvas.
+ * slider = createSlider(0, 255, 200);
+ * slider.position(0, 100);
+ *
+ * describe('A gray square with the text "p5*js" written in its center and a range slider beneath it. The square changes color when the slider is moved. The text and slider disappear when the square is double-clicked.');
+ * }
+ *
+ * function draw() {
+ * // Use the slider value to change the background color.
+ * let g = slider.value();
+ * background(g);
+ * }
+ *
+ * // Remove all elements when the mouse is double-clicked.
+ * function doubleClicked() {
+ * removeElements();
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a div element and set its position.
+ * let div = createDiv('p5*js');
+ * div.position(25, 35);
+ *
+ * describe('A gray square with the text "p5*js" written in its center.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create an h3 element within the div.
+ * let div = createDiv('p5*js
');
+ * div.position(20, 5);
+ *
+ * describe('A gray square with the text "p5*js" written in its center.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a paragraph element and set its position.
+ * let p = createP('Tell me a story.');
+ * p.position(5, 0);
+ *
+ * describe('A gray square displaying the text "Tell me a story." written in black.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a span element and set its position.
+ * let span = createSpan('p5*js');
+ * span.position(25, 35);
+ *
+ * describe('A gray square with the text "p5*js" written in its center.');
+ * }
+ *
+ *
+ * function setup() {
+ * background(200);
+ *
+ * // Create a div element as a container.
+ * let div = createDiv();
+ *
+ * // Place the div at the center.
+ * div.position(25, 35);
+ *
+ * // Create a span element.
+ * let s1 = createSpan('p5');
+ *
+ * // Create a second span element.
+ * let s2 = createSpan('*');
+ *
+ * // Set the second span's font color.
+ * s2.style('color', 'deeppink');
+ *
+ * // Create a third span element.
+ * let s3 = createSpan('js');
+ *
+ * // Add all the spans to the container div.
+ * s1.parent(div);
+ * s2.parent(div);
+ * s3.parent(div);
+ *
+ * describe('A gray square with the text "p5*js" written in black at its center. The asterisk is pink.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * let img = createImg(
+ * '/assets/cat.jpg',
+ * 'image of a cat'
+ * );
+ * img.position(0, 10);
+ *
+ * describe('A gray square with a magenta asterisk in its center.');
+ * }
+ *
+ *
- * let capture;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.MediaElement using createCapture().
- * capture = createCapture(VIDEO);
- * capture.hide();
- *
- * describe('A webcam feed with inverted colors.');
- * }
- *
- * function draw() {
- * // Display the video stream and invert the colors.
- * image(capture, 0, 0, width, width * capture.height / capture.width);
- * filter(INVERT);
- * }
- *
- *
- * let beat;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.MediaElement using createAudio().
- * beat = createAudio('assets/beat.mp3');
- *
- * describe('The text "https://p5js.org/reference/assets/beat.mp3" written in black on a gray background.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * textWrap(CHAR);
- * text(beat.src, 10, 10, 80, 80);
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create an anchor element that links to p5js.org.
+ * let a = createA('https://p5js.org/', 'p5*js');
+ * a.position(25, 35);
+ *
+ * describe('The text "p5*js" written at the center of a gray square.');
+ * }
+ *
+ *
+ * function setup() {
+ * background(200);
+ *
+ * // Create an anchor tag that links to p5js.org.
+ * // Open the link in a new tab.
+ * let a = createA('https://p5js.org/', 'p5*js', '_blank');
+ * a.position(25, 35);
+ *
+ * describe('The text "p5*js" written at the center of a gray square.');
+ * }
+ *
+ *
+ * let slider;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a slider and place it at the top of the canvas.
+ * slider = createSlider(0, 255);
+ * slider.position(10, 10);
+ * slider.size(80);
+ *
+ * describe('A dark gray square with a range slider at the top. The square changes color when the slider is moved.');
+ * }
+ *
+ * function draw() {
+ * // Use the slider as a grayscale value.
+ * let g = slider.value();
+ * background(g);
+ * }
+ *
+ *
+ * let slider;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a slider and place it at the top of the canvas.
+ * // Set its default value to 0.
+ * slider = createSlider(0, 255, 0);
+ * slider.position(10, 10);
+ * slider.size(80);
+ *
+ * describe('A black square with a range slider at the top. The square changes color when the slider is moved.');
+ * }
+ *
+ * function draw() {
+ * // Use the slider as a grayscale value.
+ * let g = slider.value();
+ * background(g);
+ * }
+ *
+ *
+ * let slider;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a slider and place it at the top of the canvas.
+ * // Set its default value to 0.
+ * // Set its step size to 50.
+ * slider = createSlider(0, 255, 0, 50);
+ * slider.position(10, 10);
+ * slider.size(80);
+ *
+ * describe('A black square with a range slider at the top. The square changes color when the slider is moved.');
+ * }
+ *
+ * function draw() {
+ * // Use the slider as a grayscale value.
+ * let g = slider.value();
+ * background(g);
+ * }
+ *
+ *
+ * let slider;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a slider and place it at the top of the canvas.
+ * // Set its default value to 0.
+ * // Set its step size to 0 so that it moves smoothly.
+ * slider = createSlider(0, 255, 0, 0);
+ * slider.position(10, 10);
+ * slider.size(80);
+ *
+ * describe('A black square with a range slider at the top. The square changes color when the slider is moved.');
+ * }
+ *
+ * function draw() {
+ * // Use the slider as a grayscale value.
+ * let g = slider.value();
+ * background(g);
+ * }
+ *
+ *
- * let beat;
- *
* function setup() {
* createCanvas(100, 100);
*
* background(200);
*
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display a message.
- * text('Click to play', 50, 50);
+ * // Create a button and place it beneath the canvas.
+ * let button = createButton('click me');
+ * button.position(0, 100);
*
- * // Create a p5.MediaElement using createAudio().
- * beat = createAudio('assets/beat.mp3');
+ * // Call repaint() when the button is pressed.
+ * button.mousePressed(repaint);
*
- * describe('The text "Click to play" written in black on a gray background. A beat plays when the user clicks the square.');
+ * describe('A gray square with a button that says "click me" beneath it. The square changes color when the button is clicked.');
* }
*
- * // Play the beat when the user presses the mouse.
- * function mousePressed() {
- * beat.play();
+ * // Change the background color.
+ * function repaint() {
+ * let g = random(255);
+ * background(g);
* }
*
*
- * let beat;
- * let isStopped = true;
+ * let button;
*
* function setup() {
* createCanvas(100, 100);
*
- * // Create a p5.MediaElement using createAudio().
- * beat = createAudio('assets/beat.mp3');
+ * background(200);
*
- * describe('The text "Click to start" written in black on a gray background. The beat starts or stops when the user presses the mouse.');
- * }
+ * // Create a button and set its value to 0.
+ * // Place the button beneath the canvas.
+ * button = createButton('click me', 'red');
+ * button.position(0, 100);
*
- * function draw() {
- * background(200);
+ * // Call randomColor() when the button is pressed.
+ * button.mousePressed(randomColor);
*
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
+ * describe('A red square with a button that says "click me" beneath it. The square changes color when the button is clicked.');
+ * }
*
- * // Display different instructions based on playback.
- * if (isStopped === true) {
- * text('Click to start', 50, 50);
- * } else {
- * text('Click to stop', 50, 50);
- * }
+ * function draw() {
+ * // Use the button's value to set the background color.
+ * let c = button.value();
+ * background(c);
* }
*
- * // Adjust playback when the user presses the mouse.
- * function mousePressed() {
- * if (isStopped === true) {
- * // If the beat is stopped, play it.
- * beat.play();
- * isStopped = false;
- * } else {
- * // If the beat is playing, stop it.
- * beat.stop();
- * isStopped = true;
- * }
+ * // Set the button's value to a random color.
+ * function randomColor() {
+ * let c = random(['red', 'green', 'blue', 'yellow']);
+ * button.value(c);
* }
*
*
- * let beat;
- * let isPaused = true;
+ * let checkbox;
*
* function setup() {
* createCanvas(100, 100);
*
- * // Create a p5.MediaElement using createAudio().
- * beat = createAudio('assets/beat.mp3');
+ * // Create a checkbox and place it beneath the canvas.
+ * checkbox = createCheckbox();
+ * checkbox.position(0, 70);
*
- * describe('The text "Click to play" written in black on a gray background. The beat plays or pauses when the user clicks the square.');
+ * describe('A black square with a checkbox beneath it. The square turns white when the box is checked.');
* }
*
* function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display different instructions based on playback.
- * if (isPaused === true) {
- * text('Click to play', 50, 50);
+ * // Use the checkbox to set the background color.
+ * if (checkbox.checked()) {
+ * background(255);
* } else {
- * text('Click to pause', 50, 50);
- * }
- * }
- *
- * // Adjust playback when the user presses the mouse.
- * function mousePressed() {
- * if (isPaused === true) {
- * // If the beat is paused,
- * // play it.
- * beat.play();
- * isPaused = false;
- * } else {
- * // If the beat is playing,
- * // pause it.
- * beat.pause();
- * isPaused = true;
+ * background(0);
* }
* }
*
*
- * let beat;
- * let isLooping = false;
+ * let checkbox;
*
* function setup() {
* createCanvas(100, 100);
*
- * background(200);
- *
- * // Create a p5.MediaElement using createAudio().
- * beat = createAudio('assets/beat.mp3');
+ * // Create a checkbox and place it beneath the canvas.
+ * // Label the checkbox "white".
+ * checkbox = createCheckbox(' white');
+ * checkbox.position(0, 70);
*
- * describe('The text "Click to loop" written in black on a gray background. A beat plays repeatedly in a loop when the user clicks. The beat stops when the user clicks again.');
+ * describe('A black square with a checkbox labeled "white" beneath it. The square turns white when the box is checked.');
* }
*
* function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display different instructions based on playback.
- * if (isLooping === true) {
- * text('Click to stop', 50, 50);
+ * // Use the checkbox to set the background color.
+ * if (checkbox.checked()) {
+ * background(255);
* } else {
- * text('Click to loop', 50, 50);
- * }
- * }
- *
- * // Adjust playback when the user presses the mouse.
- * function mousePressed() {
- * if (isLooping === true) {
- * // If the beat is looping, stop it.
- * beat.stop();
- * isLooping = false;
- * } else {
- * // If the beat is stopped, loop it.
- * beat.loop();
- * isLooping = true;
+ * background(0);
* }
* }
*
*
- * let beat;
- * let isPlaying = false;
+ * let checkbox;
*
* function setup() {
* createCanvas(100, 100);
*
- * background(200);
- *
- * // Create a p5.MediaElement using createAudio().
- * beat = createAudio('assets/beat.mp3');
+ * // Create a checkbox and place it beneath the canvas.
+ * // Label the checkbox "white" and set its value to true.
+ * checkbox = createCheckbox(' white', true);
+ * checkbox.position(0, 70);
*
- * describe('The text "Click to play" written in black on a gray background. A beat plays when the user clicks. The beat stops when the user clicks again.');
+ * describe('A white square with a checkbox labeled "white" beneath it. The square turns black when the box is unchecked.');
* }
*
* function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display different instructions based on playback.
- * if (isPlaying === true) {
- * text('Click to stop', 50, 50);
+ * // Use the checkbox to set the background color.
+ * if (checkbox.checked()) {
+ * background(255);
* } else {
- * text('Click to play', 50, 50);
- * }
- * }
- *
- * // Adjust playback when the user presses the mouse.
- * function mousePressed() {
- * if (isPlaying === true) {
- * // If the beat is playing, stop it.
- * beat.stop();
- * isPlaying = false;
- * } else {
- * // If the beat is stopped, play it.
- * beat.play();
- * isPlaying = true;
+ * background(0);
* }
* }
*
*
- * let video;
+ * let mySelect;
*
* function setup() {
- * noCanvas();
+ * createCanvas(100, 100);
+ *
+ * // Create a dropdown and place it beneath the canvas.
+ * mySelect = createSelect();
+ * mySelect.position(0, 100);
+ *
+ * // Add color options.
+ * mySelect.option('red');
+ * mySelect.option('green');
+ * mySelect.option('blue');
+ * mySelect.option('yellow');
*
- * // Call handleVideo() once the video loads.
- * video = createVideo('assets/fingers.mov', handleVideo);
+ * // Set the selected option to "red".
+ * mySelect.selected('red');
*
- * describe('A video of fingers walking on a treadmill.');
+ * describe('A red square with a dropdown menu beneath it. The square changes color when a new color is selected.');
* }
*
- * // Set the video's size and play it.
- * function handleVideo() {
- * video.size(100, 100);
- * video.autoplay();
+ * function draw() {
+ * // Use the selected value to paint the background.
+ * let c = mySelect.selected();
+ * background(c);
* }
*
*
+ * let mySelect;
+ *
* function setup() {
- * noCanvas();
+ * createCanvas(100, 100);
*
- * // Load a video, but don't play it automatically.
- * let video = createVideo('assets/fingers.mov', handleVideo);
+ * // Create a dropdown and place it beneath the canvas.
+ * mySelect = createSelect();
+ * mySelect.position(0, 100);
*
- * // Play the video when the user clicks on it.
- * video.mousePressed(handlePress);
+ * // Add color options.
+ * mySelect.option('red');
+ * mySelect.option('green');
+ * mySelect.option('blue');
+ * mySelect.option('yellow');
*
- * describe('An image of fingers on a treadmill. They start walking when the user double-clicks on them.');
+ * // Set the selected option to "red".
+ * mySelect.selected('red');
+ *
+ * // Disable the "yellow" option.
+ * mySelect.disable('yellow');
+ *
+ * describe('A red square with a dropdown menu beneath it. The square changes color when a new color is selected.');
+ * }
+ *
+ * function draw() {
+ * // Use the selected value to paint the background.
+ * let c = mySelect.selected();
+ * background(c);
* }
*
*
+ * let mySelect;
*
- * // Play the video.
- * function handleClick() {
- * video.play();
- * }
- */
- autoplay(val) {
- const oldVal = this.elt.getAttribute('autoplay');
- this.elt.setAttribute('autoplay', val);
- // if we turned on autoplay
- if (val && !oldVal) {
- // bind method to this scope
- const setupAutoplayFailDetection =
- () => this._setupAutoplayFailDetection();
- // if media is ready to play, schedule check now
- if (this.elt.readyState === 4) {
- setupAutoplayFailDetection();
- } else {
- // otherwise, schedule check whenever it is ready
- this.elt.addEventListener('canplay', setupAutoplayFailDetection, {
- passive: true,
- once: true
- });
- }
- }
-
- return this;
- }
-
- /**
- * Sets the audio/video volume.
+ * function setup() {
+ * createCanvas(100, 100);
*
- * Calling `media.volume()` without an argument returns the current volume
- * as a number in the range 0 (off) to 1 (maximum).
+ * // Create a dropdown and place it beneath the canvas.
+ * mySelect = createSelect();
+ * mySelect.position(0, 100);
*
- * The parameter, `val`, is optional. It's a number that sets the volume
- * from 0 (off) to 1 (maximum). For example, calling `media.volume(0.5)`
- * sets the volume to half of its maximum.
+ * // Add color options with names and values.
+ * mySelect.option('one', 'red');
+ * mySelect.option('two', 'green');
+ * mySelect.option('three', 'blue');
+ * mySelect.option('four', 'yellow');
*
- * @method volume
- * @return {Number} current volume.
+ * // Set the selected option to "one".
+ * mySelect.selected('one');
+ *
+ * describe('A red square with a dropdown menu beneath it. The square changes color when a new color is selected.');
+ * }
+ *
+ * function draw() {
+ * // Use the selected value to paint the background.
+ * let c = mySelect.selected();
+ * background(c);
+ * }
+ *
+ *
- * let dragon;
+ * // Hold CTRL to select multiple options on Windows and Linux.
+ * // Hold CMD to select multiple options on macOS.
+ * let mySelect;
*
* function setup() {
* createCanvas(100, 100);
*
- * // Create a p5.MediaElement using createAudio().
- * dragon = createAudio('assets/lucky_dragons.mp3');
+ * // Create a dropdown and allow multiple selections.
+ * // Place it beneath the canvas.
+ * mySelect = createSelect(true);
+ * mySelect.position(0, 100);
*
- * // Show the default media controls.
- * dragon.showControls();
+ * // Add color options.
+ * mySelect.option('red');
+ * mySelect.option('green');
+ * mySelect.option('blue');
+ * mySelect.option('yellow');
*
- * describe('The text "Volume: V" on a gray square with media controls beneath it. The number "V" oscillates between 0 and 1 as the music plays.');
+ * describe('A gray square with a dropdown menu beneath it. Colorful circles appear when their color is selected.');
* }
*
* function draw() {
* background(200);
*
- * // Produce a number between 0 and 1.
- * let n = 0.5 * sin(frameCount * 0.01) + 0.5;
+ * // Use the selected value(s) to draw circles.
+ * let colors = mySelect.selected();
+ * for (let i = 0; i < colors.length; i += 1) {
+ * // Calculate the x-coordinate.
+ * let x = 10 + i * 20;
*
- * // Use n to set the volume.
- * dragon.volume(n);
+ * // Access the color.
+ * let c = colors[i];
*
- * // Get the current volume and display it.
- * let v = dragon.volume();
- *
- * // Round v to 1 decimal place for display.
- * v = round(v, 1);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display the volume.
- * text(`Volume: ${v}`, 50, 50);
+ * // Draw the circle.
+ * fill(c);
+ * circle(x, 50, 20);
+ * }
* }
*
*
+ * let style = document.createElement('style');
+ * style.innerHTML = `
+ * .p5-radio label {
+ * display: flex;
+ * align-items: center;
+ * }
+ * .p5-radio input {
+ * margin-right: 5px;
+ * }
+ * `;
+ * document.head.appendChild(style);
+ *
+ * let myRadio;
*
- * The parameter, `val`, is optional. It's a number that sets the playback
- * speed. 1 plays the media at normal speed, 0.5 plays it at half speed, 2
- * plays it at double speed, and so on. -1 plays the media at normal speed
- * in reverse.
+ * function setup() {
+ * createCanvas(100, 100);
*
- * Calling `media.speed()` returns the current speed as a number.
+ * // Create a radio button element and place it
+ * // in the top-left corner.
+ * myRadio = createRadio();
+ * myRadio.position(0, 0);
+ * myRadio.class('p5-radio');
+ * myRadio.size(60);
*
- * Note: Not all browsers support backward playback. Even if they do,
- * playback might not be smooth.
+ * // Add a few color options.
+ * myRadio.option('red');
+ * myRadio.option('yellow');
+ * myRadio.option('blue');
*
- * @method speed
- * @return {Number} current playback speed.
+ * // Choose a default option.
+ * myRadio.selected('yellow');
+ *
+ * describe('A yellow square with three color options listed, "red", "yellow", and "blue". The square changes color when the user selects a new option.');
+ * }
+ *
+ * function draw() {
+ * // Set the background color using the radio button.
+ * let g = myRadio.value();
+ * background(g);
+ * }
+ *
+ *
- * let dragon;
+ * let myRadio;
*
* function setup() {
* createCanvas(100, 100);
*
- * // Create a p5.MediaElement using createAudio().
- * dragon = createAudio('assets/lucky_dragons.mp3');
+ * // Create a radio button element and place it
+ * // in the top-left corner.
+ * myRadio = createRadio();
+ * myRadio.position(0, 0);
+ * myRadio.size(50);
*
- * // Show the default media controls.
- * dragon.showControls();
+ * // Add a few color options.
+ * // Color values are labeled with
+ * // emotions they evoke.
+ * myRadio.option('red', 'love');
+ * myRadio.option('yellow', 'joy');
+ * myRadio.option('blue', 'trust');
*
- * describe('The text "Speed: S" on a gray square with media controls beneath it. The number "S" oscillates between 0 and 1 as the music plays.');
+ * // Choose a default option.
+ * myRadio.selected('yellow');
+ *
+ * describe('A yellow square with three options listed, "love", "joy", and "trust". The square changes color when the user selects a new option.');
* }
*
* function draw() {
- * background(200);
+ * // Set the background color using the radio button.
+ * let c = myRadio.value();
+ * background(c);
+ * }
+ *
+ *
+ * let myRadio;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a radio button element and place it
+ * // in the top-left corner.
+ * myRadio = createRadio();
+ * myRadio.position(0, 0);
+ * myRadio.size(50);
*
- * // Produce a number between 0 and 2.
- * let n = sin(frameCount * 0.01) + 1;
+ * // Add a few color options.
+ * myRadio.option('red');
+ * myRadio.option('yellow');
+ * myRadio.option('blue');
*
- * // Use n to set the playback speed.
- * dragon.speed(n);
+ * // Choose a default option.
+ * myRadio.selected('yellow');
*
- * // Get the current speed and display it.
- * let s = dragon.speed();
+ * // Create a button and place it beneath the canvas.
+ * let btn = createButton('disable');
+ * btn.position(0, 100);
*
- * // Round s to 1 decimal place for display.
- * s = round(s, 1);
+ * // Call disableRadio() when btn is pressed.
+ * btn.mousePressed(disableRadio);
+ *
+ * describe('A yellow square with three options listed, "red", "yellow", and "blue". The square changes color when the user selects a new option. A "disable" button beneath the canvas disables the color options when pressed.');
+ * }
*
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
+ * function draw() {
+ * // Set the background color using the radio button.
+ * let c = myRadio.value();
+ * background(c);
+ * }
*
- * // Display the speed.
- * text(`Speed: ${s}`, 50, 50);
+ * // Disable myRadio.
+ * function disableRadio() {
+ * myRadio.disable(true);
* }
*
+ *
- * let dragon;
+ * let myPicker;
*
* function setup() {
* createCanvas(100, 100);
*
- * // Create a p5.MediaElement using createAudio().
- * dragon = createAudio('assets/lucky_dragons.mp3');
+ * // Create a color picker and set its position.
+ * myPicker = createColorPicker('deeppink');
+ * myPicker.position(0, 100);
*
- * // Show the default media controls.
- * dragon.showControls();
- *
- * describe('The text "S seconds" on a gray square with media controls beneath it. The number "S" increases as the song plays.');
+ * describe('A pink square with a color picker beneath it. The square changes color when the user picks a new color.');
* }
*
* function draw() {
- * background(200);
- *
- * // Get the current playback time.
- * let s = dragon.time();
- *
- * // Round s to 1 decimal place for display.
- * s = round(s, 1);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display the playback time.
- * text(`${s} seconds`, 50, 50);
+ * // Use the color picker to paint the background.
+ * let c = myPicker.color();
+ * background(c);
* }
*
*
- * let dragon;
+ * let myPicker;
*
* function setup() {
* createCanvas(100, 100);
*
- * // Create a p5.MediaElement using createAudio().
- * dragon = createAudio('assets/lucky_dragons.mp3');
- *
- * // Show the default media controls.
- * dragon.showControls();
- *
- * // Jump to 2 seconds to start.
- * dragon.time(2);
+ * // Create a color picker and set its position.
+ * myPicker = createColorPicker('deeppink');
+ * myPicker.position(0, 100);
*
- * describe('The text "S seconds" on a gray square with media controls beneath it. The number "S" increases as the song plays.');
+ * describe('A number with the format "#rrggbb" is displayed on a pink canvas. The background color and number change when the user picks a new color.');
* }
*
* function draw() {
- * background(200);
- *
- * // Get the current playback time.
- * let s = dragon.time();
- *
- * // Round s to 1 decimal place for display.
- * s = round(s, 1);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
+ * // Use the color picker to paint the background.
+ * let c = myPicker.value();
+ * background(c);
*
- * // Display the playback time.
- * text(`${s} seconds`, 50, 50);
+ * // Display the current color as a hex string.
+ * text(c, 25, 55);
* }
*
*
- * let dragon;
+ * let myInput;
*
* function setup() {
* createCanvas(100, 100);
*
- * background(200);
- *
- * // Create a p5.MediaElement using createAudio().
- * dragon = createAudio('assets/lucky_dragons.mp3');
+ * // Create an input element and place it
+ * // beneath the canvas.
+ * myInput = createInput();
+ * myInput.position(0, 100);
*
- * // Show the default media controls.
- * dragon.showControls();
- *
- * describe('The text "S seconds left" on a gray square with media controls beneath it. The number "S" decreases as the song plays.');
+ * describe('A gray square with a text box beneath it. The text in the square changes when the user types something new in the input bar.');
* }
*
* function draw() {
* background(200);
*
- * // Calculate the time remaining.
- * let s = dragon.duration() - dragon.time();
- *
- * // Round s to 1 decimal place for display.
- * s = round(s, 1);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display the time remaining.
- * text(`${s} seconds left`, 50, 50);
+ * // Use the input to display a message.
+ * let msg = myInput.value();
+ * text(msg, 25, 55);
* }
*
*
- * let beat;
- * let isPlaying = false;
- * let isDone = false;
+ * let myInput;
*
* function setup() {
* createCanvas(100, 100);
*
- * // Create a p5.MediaElement using createAudio().
- * beat = createAudio('assets/beat.mp3');
+ * // Create an input element and place it
+ * // beneath the canvas. Set its default
+ * // text to "hello!".
+ * myInput = createInput('hello!');
+ * myInput.position(0, 100);
*
- * // Call handleEnd() when the beat finishes.
- * beat.onended(handleEnd);
- *
- * describe('The text "Click to play" written in black on a gray square. A beat plays when the user clicks. The text "Done!" appears when the beat finishes playing.');
+ * describe('The text "hello!" written at the center of a gray square. A text box beneath the square also says "hello!". The text in the square changes when the user types something new in the input bar.');
* }
*
* function draw() {
* background(200);
*
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display different messages based on playback.
- * if (isDone === true) {
- * text('Done!', 50, 50);
- * } else if (isPlaying === false) {
- * text('Click to play', 50, 50);
- * } else {
- * text('Playing...', 50, 50);
- * }
- * }
- *
- * // Play the beat when the user presses the mouse.
- * function mousePressed() {
- * if (isPlaying === false) {
- * isPlaying = true;
- * beat.play();
- * }
- * }
- *
- * // Set isDone when playback ends.
- * function handleEnd() {
- * isDone = false;
+ * // Use the input to display a message.
+ * let msg = myInput.value();
+ * text(msg, 25, 55);
* }
*
*
- * function setup() {
- * createCanvas(100, 100);
+ * // Use the file input to select an image to
+ * // load and display.
+ * let input;
+ * let img;
*
- * background('cornflowerblue');
+ * function setup() {
+ * createCanvas(200, 200);
*
- * // Style the text.
- * textAlign(CENTER);
- * textSize(50);
+ * // Create a file input and place it beneath
+ * // the canvas.
+ * input = createFileInput(handleImage);
+ * input.position(0, 100);
*
- * // Display a dragon.
- * text('🐉', 50, 50);
+ * describe('A gray square with a file input beneath it. If the user selects an image file to load, it is displayed on the square.');
+ * }
*
- * // Create a p5.MediaElement using createAudio().
- * let dragon = createAudio('assets/lucky_dragons.mp3');
+ * function draw() {
+ * background(200);
*
- * // Show the default media controls.
- * dragon.showControls();
+ * // Draw the image if loaded.
+ * if (img) {
+ * image(img, 0, 0, width, height);
+ * }
+ * }
*
- * describe('A dragon emoji, 🐉, drawn in the center of a blue square. A song plays in the background. Audio controls are displayed beneath the canvas.');
+ * // Create an image if the file is an image.
+ * function handleImage(file) {
+ * if (file.type === 'image') {
+ * img = createImg(file.data, '');
+ * img.hide();
+ * } else {
+ * img = null;
+ * }
* }
*
*
- * let dragon;
- * let isHidden = false;
+ * // Use the file input to select multiple images
+ * // to load and display.
+ * let input;
+ * let images = [];
*
* function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.MediaElement using createAudio().
- * dragon = createAudio('assets/lucky_dragons.mp3');
- *
- * // Show the default media controls.
- * dragon.showControls();
- *
- * describe('The text "Double-click to hide controls" written in the middle of a gray square. A song plays in the background. Audio controls are displayed beneath the canvas. The controls appear/disappear when the user double-clicks the square.');
+ * // Create a file input and place it beneath
+ * // the canvas. Allow it to load multiple files.
+ * input = createFileInput(handleImage, true);
+ * input.position(0, 100);
* }
*
* function draw() {
* background(200);
*
- * // Style the text.
- * textAlign(CENTER);
+ * // Draw the images if loaded. Each image
+ * // is drawn 20 pixels lower than the
+ * // previous image.
+ * for (let i = 0; i < images.length; i += 1) {
+ * // Calculate the y-coordinate.
+ * let y = i * 20;
*
- * // Display a different message when controls are hidden or shown.
- * if (isHidden === true) {
- * text('Double-click to show controls', 10, 20, 80, 80);
- * } else {
- * text('Double-click to hide controls', 10, 20, 80, 80);
+ * // Draw the image.
+ * image(images[i], 0, y, 100, 100);
* }
+ *
+ * describe('A gray square with a file input beneath it. If the user selects multiple image files to load, they are displayed on the square.');
* }
*
- * // Show/hide controls based on a double-click.
- * function doubleClicked() {
- * if (isHidden === true) {
- * dragon.showControls();
- * isHidden = false;
- * } else {
- * dragon.hideControls();
- * isHidden = true;
+ * // Create an image if the file is an image,
+ * // then add it to the images array.
+ * function handleImage(file) {
+ * if (file.type === 'image') {
+ * let img = createImg(file.data, '');
+ * img.hide();
+ * images.push(img);
* }
* }
*
*
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.MediaElement using createAudio().
- * let beat = createAudio('assets/beat.mp3');
- *
- * // Play the beat in a loop.
- * beat.loop();
- *
- * // Schedule a few events.
- * beat.addCue(0, changeBackground, 'red');
- * beat.addCue(2, changeBackground, 'deeppink');
- * beat.addCue(4, changeBackground, 'orchid');
- * beat.addCue(6, changeBackground, 'lavender');
- *
- * describe('A red square with a beat playing in the background. Its color changes every 2 seconds while the audio plays.');
- * }
- *
- * // Change the background color.
- * function changeBackground(c) {
- * background(c);
- * }
- *
- *
- * let lavenderID;
- * let isRemoved = false;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.MediaElement using createAudio().
- * let beat = createAudio('assets/beat.mp3');
- *
- * // Play the beat in a loop.
- * beat.loop();
- *
- * // Schedule a few events.
- * beat.addCue(0, changeBackground, 'red');
- * beat.addCue(2, changeBackground, 'deeppink');
- * beat.addCue(4, changeBackground, 'orchid');
- *
- * // Record the ID of the "lavender" callback.
- * lavenderID = beat.addCue(6, changeBackground, 'lavender');
- *
- * describe('The text "Double-click to remove lavender." written on a red square. The color changes every 2 seconds while the audio plays. The lavender option is removed when the user double-clicks the square.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Display different instructions based on the available callbacks.
- * if (isRemoved === false) {
- * text('Double-click to remove lavender.', 10, 10, 80, 80);
- * } else {
- * text('No more lavender.', 10, 10, 80, 80);
- * }
- * }
- *
- * // Change the background color.
- * function changeBackground(c) {
- * background(c);
- * }
- *
- * // Remove the lavender color-change cue when the user double-clicks.
- * function doubleClicked() {
- * if (isRemoved === false) {
- * beat.removeCue(lavenderID);
- * isRemoved = true;
- * }
- * }
- *
- *
- * let isChanging = true;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.MediaElement using createAudio().
- * let beat = createAudio('assets/beat.mp3');
- *
- * // Play the beat in a loop.
- * beat.loop();
- *
- * // Schedule a few events.
- * beat.addCue(0, changeBackground, 'red');
- * beat.addCue(2, changeBackground, 'deeppink');
- * beat.addCue(4, changeBackground, 'orchid');
- * beat.addCue(6, changeBackground, 'lavender');
- *
- * describe('The text "Double-click to stop changing." written on a square. The color changes every 2 seconds while the audio plays. The color stops changing when the user double-clicks the square.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Display different instructions based on the available callbacks.
- * if (isChanging === true) {
- * text('Double-click to stop changing.', 10, 10, 80, 80);
- * } else {
- * text('No more changes.', 10, 10, 80, 80);
- * }
- * }
- *
- * // Change the background color.
- * function changeBackground(c) {
- * background(c);
- * }
- *
- * // Remove cued functions and stop changing colors when the user
- * // double-clicks.
- * function doubleClicked() {
- * if (isChanging === true) {
- * beat.clearCues();
- * isChanging = false;
- * }
- * }
- *
- *
- * // Use the file input to load a
- * // file and display its info.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a file input and place it beneath the canvas.
- * // Call displayInfo() when the file loads.
- * let input = createFileInput(displayInfo);
- * input.position(0, 100);
- *
- * describe('A gray square with a file input beneath it. If the user loads a file, its info is written in black.');
- * }
- *
- * // Display the p5.File's info once it loads.
- * function displayInfo(file) {
- * background(200);
- *
- * // Display the p5.File's name.
- * text(file.name, 10, 10, 80, 40);
- *
- * // Display the p5.File's type and subtype.
- * text(`${file.type}/${file.subtype}`, 10, 70);
- *
- * // Display the p5.File's size in bytes.
- * text(file.size, 10, 90);
- * }
- *
- *
- * // Use the file input to select an image to
- * // load and display.
- * let img;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a file input and place it beneath the canvas.
- * // Call handleImage() when the file image loads.
- * let input = createFileInput(handleImage);
- * input.position(0, 100);
- *
- * describe('A gray square with a file input beneath it. If the user selects an image file to load, it is displayed on the square.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw the image if it's ready.
- * if (img) {
- * image(img, 0, 0, width, height);
- * }
- * }
- *
- * // Use the p5.File's data once it loads.
- * function handleImage(file) {
- * // Check the p5.File's type.
- * if (file.type === 'image') {
- * // Create an image using using the p5.File's data.
- * img = createImg(file.data, '');
- *
- * // Hide the image element so it doesn't appear twice.
- * img.hide();
- * } else {
- * img = null;
- * }
- * }
- *
- *
- * // Use the file input to load a
- * // file and display its info.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a file input and place it beneath the canvas.
- * // Call displayInfo() when the file loads.
- * let input = createFileInput(displayInfo);
- * input.position(0, 100);
- *
- * describe('A gray square with a file input beneath it. If the user loads a file, its info is written in black.');
- * }
- *
- * // Use the p5.File once it loads.
- * function displayInfo(file) {
- * background(200);
- *
- * // Display the p5.File's name.
- * text(file.name, 10, 10, 80, 40);
- *
- * // Display the p5.File's type and subtype.
- * text(`${file.type}/${file.subtype}`, 10, 70);
- *
- * // Display the p5.File's size in bytes.
- * text(file.size, 10, 90);
- * }
- *
- *
- * // Use the file input to load a file and display its info.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a file input and place it beneath the canvas.
- * // Call displayType() when the file loads.
- * let input = createFileInput(displayType);
- * input.position(0, 100);
- *
- * describe('A gray square with a file input beneath it. If the user loads a file, its type is written in black.');
- * }
- *
- * // Display the p5.File's type once it loads.
- * function displayType(file) {
- * background(200);
- *
- * // Display the p5.File's type.
- * text(`This is file's type is: ${file.type}`, 10, 10, 80, 80);
- * }
- *
- *
- * // Use the file input to load a
- * // file and display its info.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a file input and place it beneath the canvas.
- * // Call displaySubtype() when the file loads.
- * let input = createFileInput(displaySubtype);
- * input.position(0, 100);
- *
- * describe('A gray square with a file input beneath it. If the user loads a file, its subtype is written in black.');
- * }
- *
- * // Display the p5.File's type once it loads.
- * function displaySubtype(file) {
- * background(200);
- *
- * // Display the p5.File's subtype.
- * text(`This is file's subtype is: ${file.subtype}`, 10, 10, 80, 80);
- * }
- *
- *
- * // Use the file input to load a
- * // file and display its info.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a file input and place it beneath the canvas.
- * // Call displayName() when the file loads.
- * let input = createFileInput(displayName);
- * input.position(0, 100);
- *
- * describe('A gray square with a file input beneath it. If the user loads a file, its name is written in black.');
- * }
- *
- * // Display the p5.File's name once it loads.
- * function displayName(file) {
- * background(200);
- *
- * // Display the p5.File's name.
- * text(`This is file's name is: ${file.name}`, 10, 10, 80, 80);
- * }
- *
- *
- * // Use the file input to load a file and display its info.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a file input and place it beneath the canvas.
- * // Call displaySize() when the file loads.
- * let input = createFileInput(displaySize);
- * input.position(0, 100);
- *
- * describe('A gray square with a file input beneath it. If the user loads a file, its size in bytes is written in black.');
- * }
- *
- * // Display the p5.File's size in bytes once it loads.
- * function displaySize(file) {
- * background(200);
- *
- * // Display the p5.File's size.
- * text(`This is file has ${file.size} bytes.`, 10, 10, 80, 80);
- * }
- *
- *
- * // Use the file input to load a file and display its info.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a file input and place it beneath the canvas.
- * // Call displayData() when the file loads.
- * let input = createFileInput(displayData);
- * input.position(0, 100);
- *
- * describe('A gray square with a file input beneath it. If the user loads a file, its data is written in black.');
- * }
- *
- * // Display the p5.File's data once it loads.
- * function displayData(file) {
- * background(200);
- *
- * // Display the p5.File's data, which looks like a random string of characters.
- * text(file.data, 10, 10, 80, 80);
- * }
- *
- *
+ * let p;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a paragraph element.
+ * p = createP('p5*js');
+ * p.position(10, 10);
+ *
+ * describe('The text "p5*js" written at the center of a gray square. ');
+ * }
+ *
+ * // Remove the paragraph when the user double-clicks.
+ * function doubleClicked() {
+ * p.remove();
+ * }
+ *
+ *
+ * function setup() {
+ * background(200);
+ *
+ * // Create a div element.
+ * let div = createDiv();
+ *
+ * // Place the div in the top-left corner.
+ * div.position(10, 20);
+ *
+ * // Set its width and height.
+ * div.size(80, 60);
+ *
+ * // Set its background color to white
+ * div.style('background-color', 'white');
+ *
+ * // Align any text to the center.
+ * div.style('text-align', 'center');
+ *
+ * // Set its ID to "container".
+ * div.id('container');
+ *
+ * // Create a paragraph element.
+ * let p = createP('p5*js');
+ *
+ * // Make the div its parent
+ * // using its ID "container".
+ * p.parent('container');
+ *
+ * describe('The text "p5*js" written in black at the center of a white rectangle. The rectangle is inside a gray square.');
+ * }
+ *
+ *
+ * function setup() {
+ * background(200);
+ *
+ * // Create rectangular div element.
+ * let div = createDiv();
+ *
+ * // Place the div in the top-left corner.
+ * div.position(10, 20);
+ *
+ * // Set its width and height.
+ * div.size(80, 60);
+ *
+ * // Set its background color and align
+ * // any text to the center.
+ * div.style('background-color', 'white');
+ * div.style('text-align', 'center');
+ *
+ * // Create a paragraph element.
+ * let p = createP('p5*js');
+ *
+ * // Make the div its parent.
+ * p.parent(div);
+ *
+ * describe('The text "p5*js" written in black at the center of a white rectangle. The rectangle is inside a gray square.');
+ * }
+ *
+ *
+ * function setup() {
+ * background(200);
+ *
+ * // Create rectangular div element.
+ * let div = createDiv();
+ *
+ * // Place the div in the top-left corner.
+ * div.position(10, 20);
+ *
+ * // Set its width and height.
+ * div.size(80, 60);
+ *
+ * // Set its background color and align
+ * // any text to the center.
+ * div.style('background-color', 'white');
+ * div.style('text-align', 'center');
+ *
+ * // Create a paragraph element.
+ * let p = createP('p5*js');
+ *
+ * // Make the div its parent
+ * // using the underlying
+ * // HTMLElement.
+ * p.parent(div.elt);
+ *
+ * describe('The text "p5*js" written in black at the center of a white rectangle. The rectangle is inside a gray square.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create the div elements.
+ * let div0 = createDiv('Parent');
+ * let div1 = createDiv('Child');
+ *
+ * // Make div1 the child of div0
+ * // using the p5.Element.
+ * div0.child(div1);
+ *
+ * describe('A gray square with the words "Parent" and "Child" written beneath it.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create the div elements.
+ * let div0 = createDiv('Parent');
+ * let div1 = createDiv('Child');
+ *
+ * // Give div1 an ID.
+ * div1.id('apples');
+ *
+ * // Make div1 the child of div0
+ * // using its ID.
+ * div0.child('apples');
+ *
+ * describe('A gray square with the words "Parent" and "Child" written beneath it.');
+ * }
+ *
+ *
+ * // This example assumes there is a div already on the page
+ * // with id "myChildDiv".
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create the div elements.
+ * let div0 = createDiv('Parent');
+ *
+ * // Select the child element by its ID.
+ * let elt = document.getElementById('myChildDiv');
+ *
+ * // Make div1 the child of div0
+ * // using its HTMLElement object.
+ * div0.child(elt);
+ *
+ * describe('A gray square with the words "Parent" and "Child" written beneath it.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create the div element and set its size.
+ * let div = createDiv('');
+ * div.size(100, 100);
+ *
+ * // Set the inner HTML to "hi".
+ * div.html('hi');
+ *
+ * describe('A gray square with the word "hi" written beneath it.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create the div element and set its size.
+ * let div = createDiv('Hello ');
+ * div.size(100, 100);
+ *
+ * // Append "World" to the div's HTML.
+ * div.html('World', true);
+ *
+ * describe('A gray square with the text "Hello World" written beneath it.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create the div element.
+ * let div = createDiv('Hello');
+ *
+ * // Prints "Hello" to the console.
+ * print(div.html());
+ *
+ * describe('A gray square with the word "Hello!" written beneath it.');
+ * }
+ *
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the canvas' ID
+ * // to "mycanvas".
+ * cnv.id('mycanvas');
+ *
+ * // Get the canvas' ID.
+ * let id = cnv.id();
+ * text(id, 24, 54);
+ *
+ * describe('The text "mycanvas" written in black on a gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Add the class "small" to the
+ * // canvas element.
+ * cnv.class('small');
+ *
+ * // Get the canvas element's class
+ * // and display it.
+ * let c = cnv.class();
+ * text(c, 35, 54);
+ *
+ * describe('The word "small" written in black on a gray canvas.');
+ *
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a div element.
+ * let div = createDiv('div');
+ *
+ * // Add a class to the div.
+ * div.addClass('myClass');
+ *
+ * describe('A gray square.');
+ * }
+ *
+ *
+ * // In this example, a class is set when the div is created
+ * // and removed when mouse is pressed. This could link up
+ * // with a CSS style rule to toggle style properties.
+ *
+ * let div;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a div element.
+ * div = createDiv('div');
+ *
+ * // Add a class to the div.
+ * div.addClass('myClass');
+ *
+ * describe('A gray square.');
+ * }
+ *
+ * // Remove 'myClass' from the div when the user presses the mouse.
+ * function mousePressed() {
+ * div.removeClass('myClass');
+ * }
+ *
+ *
+ * let div;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a div element.
+ * div = createDiv('div');
+ *
+ * // Add the class 'show' to the div.
+ * div.addClass('show');
+ *
+ * describe('A gray square.');
+ * }
+ *
+ * // Toggle the class 'show' when the mouse is pressed.
+ * function mousePressed() {
+ * if (div.hasClass('show')) {
+ * div.addClass('show');
+ * } else {
+ * div.removeClass('show');
+ * }
+ * }
+ *
+ *
+ * let div;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a div element.
+ * div = createDiv('div');
+ *
+ * // Add the 'show' class to the div.
+ * div.addClass('show');
+ *
+ * describe('A gray square.');
+ * }
+ *
+ * // Toggle the 'show' class when the mouse is pressed.
+ * function mousePressed() {
+ * div.toggleClass('show');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create the div element and style it.
+ * let div = createDiv('');
+ * div.size(10, 10);
+ * div.style('background-color', 'orange');
+ *
+ * // Center the div relative to the page's body.
+ * div.center();
+ *
+ * describe('A gray square and an orange rectangle. The rectangle is at the center of the page.');
+ * }
+ *
+ *
+ * function setup() {
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Positions the canvas 50px to the right and 100px
+ * // below the top-left corner of the window.
+ * cnv.position(50, 100);
+ *
+ * describe('A gray square that is 50 pixels to the right and 100 pixels down from the top-left corner of the web page.');
+ * }
+ *
+ *
+ * function setup() {
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Positions the canvas at the top-left corner
+ * // of the window with a 'fixed' position type.
+ * cnv.position(0, 0, 'fixed');
+ *
+ * describe('A gray square in the top-left corner of the web page.');
+ * }
+ *
+ *
+ * let p;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a paragraph element and hide it.
+ * p = createP('p5*js');
+ * p.position(10, 10);
+ * p.hide();
+ *
+ * describe('A gray square. The text "p5*js" appears when the user double-clicks the square.');
+ * }
+ *
+ * // Show the paragraph when the user double-clicks.
+ * function doubleClicked() {
+ * p.show();
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a pink div element and place it at the top-left corner.
+ * let div = createDiv();
+ * div.position(10, 10);
+ * div.style('background-color', 'deeppink');
+ *
+ * // Set the div's width to 80 pixels and height to 20 pixels.
+ * div.size(80, 20);
+ *
+ * describe('A gray square with a pink rectangle near its top.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a pink div element and place it at the top-left corner.
+ * let div = createDiv();
+ * div.position(10, 10);
+ * div.style('background-color', 'deeppink');
+ *
+ * // Set the div's width to 80 pixels and height to 40 pixels.
+ * div.size(80, 40);
+ *
+ * // Get the div's size as an object.
+ * let s = div.size();
+ *
+ * // Display the div's dimensions.
+ * div.html(`${s.width} x ${s.height}`);
+ *
+ * describe('A gray square with a pink rectangle near its top. The text "80 x 40" is written within the rectangle.');
+ * }
+ *
+ *
+ * let img1;
+ * let img2;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Load an image of an astronaut on the moon
+ * // and place it at the top-left of the canvas.
+ * img1 = createImg(
+ * 'assets/moonwalk.jpg',
+ * 'An astronaut walking on the moon',
+ * ''
+ * );
+ * img1.position(0, 0);
+ *
+ * // Load an image of an astronaut on the moon
+ * // and place it at the top-left of the canvas.
+ * // Resize the image once it's loaded.
+ * img2 = createImg(
+ * 'assets/moonwalk.jpg',
+ * 'An astronaut walking on the moon',
+ * '',
+ * resizeImage
+ * );
+ * img2.position(0, 0);
+ *
+ * describe('A gray square two copies of a space image at the top-left. The copy in front is smaller.');
+ * }
+ *
+ * // Resize img2 and keep its aspect ratio.
+ * function resizeImage() {
+ * img2.size(50, AUTO);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a paragraph element and set its font color to "deeppink".
+ * let p = createP('p5*js');
+ * p.position(25, 20);
+ * p.style('color', 'deeppink');
+ *
+ * describe('The text p5*js written in pink on a gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object.
+ * let c = color('deeppink');
+ *
+ * // Create a paragraph element and set its font color using a p5.Color object.
+ * let p = createP('p5*js');
+ * p.position(25, 20);
+ * p.style('color', c);
+ *
+ * describe('The text p5*js written in pink on a gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a paragraph element and set its font color to "deeppink"
+ * // using property:value syntax.
+ * let p = createP('p5*js');
+ * p.position(25, 20);
+ * p.style('color:deeppink');
+ *
+ * describe('The text p5*js written in pink on a gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create an empty paragraph element and set its font color to "deeppink".
+ * let p = createP();
+ * p.position(5, 5);
+ * p.style('color', 'deeppink');
+ *
+ * // Get the element's color as an RGB color string.
+ * let c = p.style('color');
+ *
+ * // Set the element's inner HTML using the RGB color string.
+ * p.html(c);
+ *
+ * describe('The text "rgb(255, 20, 147)" written in pink on a gray background.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a container div element and place it at the top-left corner.
+ * let container = createDiv();
+ * container.position(0, 0);
+ *
+ * // Create a paragraph element and place it within the container.
+ * // Set its horizontal alignment to "left".
+ * let p1 = createP('hi');
+ * p1.parent(container);
+ * p1.attribute('align', 'left');
+ *
+ * // Create a paragraph element and place it within the container.
+ * // Set its horizontal alignment to "center".
+ * let p2 = createP('hi');
+ * p2.parent(container);
+ * p2.attribute('align', 'center');
+ *
+ * // Create a paragraph element and place it within the container.
+ * // Set its horizontal alignment to "right".
+ * let p3 = createP('hi');
+ * p3.parent(container);
+ * p3.attribute('align', 'right');
+ *
+ * describe('A gray square with the text "hi" written on three separate lines, each placed further to the right.');
+ * }
+ *
+ *
+ * let p;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a paragraph element and place it in the center of the canvas.
+ * // Set its "align" attribute to "center".
+ * p = createP('hi');
+ * p.position(0, 20);
+ * p.attribute('align', 'center');
+ *
+ * describe('The text "hi" written in black at the center of a gray square. The text moves to the left edge when double-clicked.');
+ * }
+ *
+ * // Remove the 'align' attribute when the user double-clicks the paragraph.
+ * function doubleClicked() {
+ * p.removeAttribute('align');
+ * }
+ *
+ *
+ * let input;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a text input and place it beneath the canvas.
+ * // Set its default value to "hello".
+ * input = createInput('hello');
+ * input.position(0, 100);
+ *
+ * describe('The text from an input box is displayed on a gray square.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Use the input's value to display a message.
+ * let msg = input.value();
+ * text(msg, 0, 55);
+ * }
+ *
+ *
+ * let input;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a text input and place it beneath the canvas.
+ * // Set its default value to "hello".
+ * input = createInput('hello');
+ * input.position(0, 100);
+ *
+ * describe('The text from an input box is displayed on a gray square. The text resets to "hello" when the user double-clicks the square.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Use the input's value to display a message.
+ * let msg = input.value();
+ * text(msg, 0, 55);
+ * }
+ *
+ * // Reset the input's value.
+ * function doubleClicked() {
+ * input.value('hello');
+ * }
+ *
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Call randomColor() when the canvas
+ * // is pressed.
+ * cnv.mousePressed(randomColor);
+ *
+ * describe('A gray square changes color when the mouse is pressed.');
+ * }
+ *
+ * // Paint the background either
+ * // red, yellow, blue, or green.
+ * function randomColor() {
+ * let c = random(['red', 'yellow', 'blue', 'green']);
+ * background(c);
+ * }
+ *
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Call randomColor() when the
+ * // canvas is double-clicked.
+ * cnv.doubleClicked(randomColor);
+ *
+ * describe('A gray square changes color when the user double-clicks the canvas.');
+ * }
+ *
+ * // Paint the background either
+ * // red, yellow, blue, or green.
+ * function randomColor() {
+ * let c = random(['red', 'yellow', 'blue', 'green']);
+ * background(c);
+ * }
+ *
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Call randomColor() when the
+ * // mouse wheel moves.
+ * cnv.mouseWheel(randomColor);
+ *
+ * describe('A gray square changes color when the user scrolls the mouse wheel over the canvas.');
+ * }
+ *
+ * // Paint the background either
+ * // red, yellow, blue, or green.
+ * function randomColor() {
+ * let c = random(['red', 'yellow', 'blue', 'green']);
+ * background(c);
+ * }
+ *
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Call changeBackground() when the
+ * // mouse wheel moves.
+ * cnv.mouseWheel(changeBackground);
+ *
+ * describe('A gray square. When the mouse wheel scrolls over the square, it changes color and displays shapes.');
+ * }
+ *
+ * function changeBackground(event) {
+ * // Change the background color
+ * // based on deltaY.
+ * if (event.deltaY > 0) {
+ * background('deeppink');
+ * } else if (event.deltaY < 0) {
+ * background('cornflowerblue');
+ * } else {
+ * background(200);
+ * }
+ *
+ * // Draw a shape based on deltaX.
+ * if (event.deltaX > 0) {
+ * circle(50, 50, 20);
+ * } else if (event.deltaX < 0) {
+ * square(40, 40, 20);
+ * }
+ * }
+ *
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Call randomColor() when a
+ * // mouse press ends.
+ * cnv.mouseReleased(randomColor);
+ *
+ * describe('A gray square changes color when the user releases a mouse press.');
+ * }
+ *
+ * // Paint the background either
+ * // red, yellow, blue, or green.
+ * function randomColor() {
+ * let c = random(['red', 'yellow', 'blue', 'green']);
+ * background(c);
+ * }
+ *
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Call randomColor() when a
+ * // mouse press ends.
+ * cnv.mouseClicked(randomColor);
+ *
+ * describe('A gray square changes color when the user releases a mouse press.');
+ * }
+ *
+ * // Paint the background either
+ * // red, yellow, blue, or green.
+ * function randomColor() {
+ * let c = random(['red', 'yellow', 'blue', 'green']);
+ * background(c);
+ * }
+ *
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Call randomColor() when the
+ * // mouse moves.
+ * cnv.mouseMoved(randomColor);
+ *
+ * describe('A gray square changes color when the mouse moves over the canvas.');
+ * }
+ *
+ * // Paint the background either
+ * // red, yellow, blue, or green.
+ * function randomColor() {
+ * let c = random(['red', 'yellow', 'blue', 'green']);
+ * background(c);
+ * }
+ *
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Call randomColor() when the
+ * // mouse moves onto the canvas.
+ * cnv.mouseOver(randomColor);
+ *
+ * describe('A gray square changes color when the mouse moves onto the canvas.');
+ * }
+ *
+ * // Paint the background either
+ * // red, yellow, blue, or green.
+ * function randomColor() {
+ * let c = random(['red', 'yellow', 'blue', 'green']);
+ * background(c);
+ * }
+ *
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Call randomColor() when the
+ * // mouse moves off the canvas.
+ * cnv.mouseOut(randomColor);
+ *
+ * describe('A gray square changes color when the mouse moves off the canvas.');
+ * }
+ *
+ * // Paint the background either
+ * // red, yellow, blue, or green.
+ * function randomColor() {
+ * let c = random(['red', 'yellow', 'blue', 'green']);
+ * background(c);
+ * }
+ *
+ *
+ * // Drag a file over the canvas to test.
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Call helloFile() when a
+ * // file is dragged over
+ * // the canvas.
+ * cnv.dragOver(helloFile);
+ *
+ * describe('A gray square. The text "hello, file" appears when a file is dragged over the square.');
+ * }
+ *
+ * function helloFile() {
+ * text('hello, file', 50, 50);
+ * }
+ *
+ *
+ * // Drag a file over, then off
+ * // the canvas to test.
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Call byeFile() when a
+ * // file is dragged over,
+ * // then off the canvas.
+ * cnv.dragLeave(byeFile);
+ *
+ * describe('A gray square. The text "bye, file" appears when a file is dragged over, then off the square.');
+ * }
+ *
+ * function byeFile() {
+ * text('bye, file', 50, 50);
+ * }
+ *
+ *
+ * let dropdown;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a dropdown menu and add a few color options.
+ * dropdown = createSelect();
+ * dropdown.position(0, 0);
+ * dropdown.option('red');
+ * dropdown.option('green');
+ * dropdown.option('blue');
+ *
+ * // Call paintBackground() when the color option changes.
+ * dropdown.changed(paintBackground);
+ *
+ * describe('A gray square with a dropdown menu at the top. The square changes color when an option is selected.');
+ * }
+ *
+ * // Paint the background with the selected color.
+ * function paintBackground() {
+ * let c = dropdown.value();
+ * background(c);
+ * }
+ *
+ *
+ * let checkbox;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a checkbox and place it beneath the canvas.
+ * checkbox = createCheckbox(' circle');
+ * checkbox.position(0, 100);
+ *
+ * // Call repaint() when the checkbox changes.
+ * checkbox.changed(repaint);
+ *
+ * describe('A gray square with a checkbox underneath it that says "circle". A white circle appears when the box is checked and disappears otherwise.');
+ * }
+ *
+ * // Paint the background gray and determine whether to draw a circle.
+ * function repaint() {
+ * background(200);
+ * if (checkbox.checked() === true) {
+ * circle(50, 50, 30);
+ * }
+ * }
+ *
+ *
+ * let slider;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a slider and place it beneath the canvas.
+ * slider = createSlider(0, 255, 200);
+ * slider.position(0, 100);
+ *
+ * // Call repaint() when the slider changes.
+ * slider.input(repaint);
+ *
+ * describe('A gray square with a range slider underneath it. The background changes shades of gray when the slider is moved.');
+ * }
+ *
+ * // Paint the background using slider's value.
+ * function repaint() {
+ * let g = slider.value();
+ * background(g);
+ * }
+ *
+ *
+ * let input;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create an input and place it beneath the canvas.
+ * input = createInput('');
+ * input.position(0, 100);
+ *
+ * // Call repaint() when input is detected.
+ * input.input(repaint);
+ *
+ * describe('A gray square with a text input bar beneath it. Any text written in the input appears in the middle of the square.');
+ * }
+ *
+ * // Paint the background gray and display the input's value.
+ * function repaint() {
+ * background(200);
+ * let msg = input.value();
+ * text(msg, 5, 50);
+ * }
+ *
+ *
+ * // Drop an image on the canvas to view
+ * // this example.
+ * let img;
+ *
+ * function setup() {
+ * let c = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Call handleFile() when a file that's dropped on the canvas has loaded.
+ * c.drop(handleFile);
+ *
+ * describe('A gray square. When the user drops an image on the square, it is displayed.');
+ * }
+ *
+ * // Remove the existing image and display the new one.
+ * function handleFile(file) {
+ * // Remove the current image, if any.
+ * if (img) {
+ * img.remove();
+ * }
+ *
+ * // Create an
element with the
+ * // dropped file.
+ * img = createImg(file.data, '');
+ * img.hide();
+ *
+ * // Draw the image.
+ * image(img, 0, 0, width, height);
+ * }
+ *
+ *
+ * // Drop an image on the canvas to view
+ * // this example.
+ * let img;
+ * let msg;
+ *
+ * function setup() {
+ * let c = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Call functions when the user drops a file on the canvas
+ * // and when the file loads.
+ * c.drop(handleFile, handleDrop);
+ *
+ * describe('A gray square. When the user drops an image on the square, it is displayed. The id attribute of canvas element is also displayed.');
+ * }
+ *
+ * // Display the image when it loads.
+ * function handleFile(file) {
+ * // Remove the current image, if any.
+ * if (img) {
+ * img.remove();
+ * }
+ *
+ * // Create an img element with the dropped file.
+ * img = createImg(file.data, '');
+ * img.hide();
+ *
+ * // Draw the image.
+ * image(img, 0, 0, width, height);
+ * }
+ *
+ * // Display the file's name when it loads.
+ * function handleDrop(event) {
+ * // Remove current paragraph, if any.
+ * if (msg) {
+ * msg.remove();
+ * }
+ *
+ * // Use event to get the drop target's id.
+ * let id = event.target.id;
+ *
+ * // Write the canvas' id beneath it.
+ * msg = createP(id);
+ * msg.position(0, 100);
+ *
+ * // Set the font color randomly for each drop.
+ * let c = random(['red', 'green', 'blue']);
+ * msg.style('color', c);
+ * msg.style('font-size', '12px');
+ * }
+ *
+ *
+ * let stickyNote;
+ * let textInput;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a div element and style it.
+ * stickyNote = createDiv('Note');
+ * stickyNote.position(5, 5);
+ * stickyNote.size(80, 20);
+ * stickyNote.style('font-size', '16px');
+ * stickyNote.style('font-family', 'Comic Sans MS');
+ * stickyNote.style('background', 'orchid');
+ * stickyNote.style('padding', '5px');
+ *
+ * // Make the note draggable.
+ * stickyNote.draggable();
+ *
+ * // Create a panel div and style it.
+ * let panel = createDiv('');
+ * panel.position(5, 40);
+ * panel.size(80, 50);
+ * panel.style('background', 'orchid');
+ * panel.style('font-size', '16px');
+ * panel.style('padding', '5px');
+ * panel.style('text-align', 'center');
+ *
+ * // Make the panel draggable.
+ * panel.draggable();
+ *
+ * // Create a text input and style it.
+ * textInput = createInput('Note');
+ * textInput.size(70);
+ *
+ * // Add the input to the panel.
+ * textInput.parent(panel);
+ *
+ * // Call handleInput() when text is input.
+ * textInput.input(handleInput);
+ *
+ * describe(
+ * 'A gray square with two purple rectangles that move when dragged. The top rectangle displays the text that is typed into the bottom rectangle.'
+ * );
+ * }
+ *
+ * // Update stickyNote's HTML when text is input.
+ * function handleInput() {
+ * stickyNote.html(textInput.value());
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a button element and
+ * // place it beneath the canvas.
+ * let btn = createButton('change');
+ * btn.position(0, 100);
+ *
+ * // Call randomColor() when
+ * // the button is pressed.
+ * btn.mousePressed(randomColor);
+ *
+ * describe('A gray square with a button that says "change" beneath it. The square changes color when the user presses the button.');
+ * }
+ *
+ * // Paint the background either
+ * // red, yellow, blue, or green.
+ * function randomColor() {
+ * let c = random(['red', 'yellow', 'blue', 'green']);
+ * background(c);
+ * }
+ *
+ *
+ * function setup() {
+ * // Create a canvas element and
+ * // assign it to cnv.
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set the border style for the
+ * // canvas.
+ * cnv.elt.style.border = '5px dashed deeppink';
+ *
+ * describe('A gray square with a pink border drawn with dashed lines.');
+ * }
+ *
+ *
+ * // Use the file input to load a
+ * // file and display its info.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a file input and place it beneath the canvas.
+ * // Call displayInfo() when the file loads.
+ * let input = createFileInput(displayInfo);
+ * input.position(0, 100);
+ *
+ * describe('A gray square with a file input beneath it. If the user loads a file, its info is written in black.');
+ * }
+ *
+ * // Display the p5.File's info once it loads.
+ * function displayInfo(file) {
+ * background(200);
+ *
+ * // Display the p5.File's name.
+ * text(file.name, 10, 10, 80, 40);
+ *
+ * // Display the p5.File's type and subtype.
+ * text(`${file.type}/${file.subtype}`, 10, 70);
+ *
+ * // Display the p5.File's size in bytes.
+ * text(file.size, 10, 90);
+ * }
+ *
+ *
+ * // Use the file input to select an image to
+ * // load and display.
+ * let img;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a file input and place it beneath the canvas.
+ * // Call handleImage() when the file image loads.
+ * let input = createFileInput(handleImage);
+ * input.position(0, 100);
+ *
+ * describe('A gray square with a file input beneath it. If the user selects an image file to load, it is displayed on the square.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw the image if it's ready.
+ * if (img) {
+ * image(img, 0, 0, width, height);
+ * }
+ * }
+ *
+ * // Use the p5.File's data once it loads.
+ * function handleImage(file) {
+ * // Check the p5.File's type.
+ * if (file.type === 'image') {
+ * // Create an image using using the p5.File's data.
+ * img = createImg(file.data, '');
+ *
+ * // Hide the image element so it doesn't appear twice.
+ * img.hide();
+ * } else {
+ * img = null;
+ * }
+ * }
+ *
+ *
+ * // Use the file input to load a
+ * // file and display its info.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a file input and place it beneath the canvas.
+ * // Call displayInfo() when the file loads.
+ * let input = createFileInput(displayInfo);
+ * input.position(0, 100);
+ *
+ * describe('A gray square with a file input beneath it. If the user loads a file, its info is written in black.');
+ * }
+ *
+ * // Use the p5.File once it loads.
+ * function displayInfo(file) {
+ * background(200);
+ *
+ * // Display the p5.File's name.
+ * text(file.name, 10, 10, 80, 40);
+ *
+ * // Display the p5.File's type and subtype.
+ * text(`${file.type}/${file.subtype}`, 10, 70);
+ *
+ * // Display the p5.File's size in bytes.
+ * text(file.size, 10, 90);
+ * }
+ *
+ *
+ * // Use the file input to load a file and display its info.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a file input and place it beneath the canvas.
+ * // Call displayType() when the file loads.
+ * let input = createFileInput(displayType);
+ * input.position(0, 100);
+ *
+ * describe('A gray square with a file input beneath it. If the user loads a file, its type is written in black.');
+ * }
+ *
+ * // Display the p5.File's type once it loads.
+ * function displayType(file) {
+ * background(200);
+ *
+ * // Display the p5.File's type.
+ * text(`This is file's type is: ${file.type}`, 10, 10, 80, 80);
+ * }
+ *
+ *
+ * // Use the file input to load a
+ * // file and display its info.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a file input and place it beneath the canvas.
+ * // Call displaySubtype() when the file loads.
+ * let input = createFileInput(displaySubtype);
+ * input.position(0, 100);
+ *
+ * describe('A gray square with a file input beneath it. If the user loads a file, its subtype is written in black.');
+ * }
+ *
+ * // Display the p5.File's type once it loads.
+ * function displaySubtype(file) {
+ * background(200);
+ *
+ * // Display the p5.File's subtype.
+ * text(`This is file's subtype is: ${file.subtype}`, 10, 10, 80, 80);
+ * }
+ *
+ *
+ * // Use the file input to load a
+ * // file and display its info.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a file input and place it beneath the canvas.
+ * // Call displayName() when the file loads.
+ * let input = createFileInput(displayName);
+ * input.position(0, 100);
+ *
+ * describe('A gray square with a file input beneath it. If the user loads a file, its name is written in black.');
+ * }
+ *
+ * // Display the p5.File's name once it loads.
+ * function displayName(file) {
+ * background(200);
+ *
+ * // Display the p5.File's name.
+ * text(`This is file's name is: ${file.name}`, 10, 10, 80, 80);
+ * }
+ *
+ *
+ * // Use the file input to load a file and display its info.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a file input and place it beneath the canvas.
+ * // Call displaySize() when the file loads.
+ * let input = createFileInput(displaySize);
+ * input.position(0, 100);
+ *
+ * describe('A gray square with a file input beneath it. If the user loads a file, its size in bytes is written in black.');
+ * }
+ *
+ * // Display the p5.File's size in bytes once it loads.
+ * function displaySize(file) {
+ * background(200);
+ *
+ * // Display the p5.File's size.
+ * text(`This is file has ${file.size} bytes.`, 10, 10, 80, 80);
+ * }
+ *
+ *
+ * // Use the file input to load a file and display its info.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a file input and place it beneath the canvas.
+ * // Call displayData() when the file loads.
+ * let input = createFileInput(displayData);
+ * input.position(0, 100);
+ *
+ * describe('A gray square with a file input beneath it. If the user loads a file, its data is written in black.');
+ * }
+ *
+ * // Display the p5.File's data once it loads.
+ * function displayData(file) {
+ * background(200);
+ *
+ * // Display the p5.File's data, which looks like a random string of characters.
+ * text(file.data, 10, 10, 80, 80);
+ * }
+ *
+ *
+ * let beat;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display a message.
+ * text('Click to play', 50, 50);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * beat = createAudio('assets/beat.mp3');
+ *
+ * describe('The text "Click to play" written in black on a gray background. A beat plays when the user clicks the square.');
+ * }
+ *
+ * // Play the beat when the user presses the mouse.
+ * function mousePressed() {
+ * beat.play();
+ * }
+ *
+ *
+ * let beat;
+ * let isStopped = true;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * beat = createAudio('assets/beat.mp3');
+ *
+ * describe('The text "Click to start" written in black on a gray background. The beat starts or stops when the user presses the mouse.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display different instructions based on playback.
+ * if (isStopped === true) {
+ * text('Click to start', 50, 50);
+ * } else {
+ * text('Click to stop', 50, 50);
+ * }
+ * }
+ *
+ * // Adjust playback when the user presses the mouse.
+ * function mousePressed() {
+ * if (isStopped === true) {
+ * // If the beat is stopped, play it.
+ * beat.play();
+ * isStopped = false;
+ * } else {
+ * // If the beat is playing, stop it.
+ * beat.stop();
+ * isStopped = true;
+ * }
+ * }
+ *
+ *
+ * let beat;
+ * let isPaused = true;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * beat = createAudio('assets/beat.mp3');
+ *
+ * describe('The text "Click to play" written in black on a gray background. The beat plays or pauses when the user clicks the square.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display different instructions based on playback.
+ * if (isPaused === true) {
+ * text('Click to play', 50, 50);
+ * } else {
+ * text('Click to pause', 50, 50);
+ * }
+ * }
+ *
+ * // Adjust playback when the user presses the mouse.
+ * function mousePressed() {
+ * if (isPaused === true) {
+ * // If the beat is paused,
+ * // play it.
+ * beat.play();
+ * isPaused = false;
+ * } else {
+ * // If the beat is playing,
+ * // pause it.
+ * beat.pause();
+ * isPaused = true;
+ * }
+ * }
+ *
+ *
+ * let beat;
+ * let isLooping = false;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * beat = createAudio('assets/beat.mp3');
+ *
+ * describe('The text "Click to loop" written in black on a gray background. A beat plays repeatedly in a loop when the user clicks. The beat stops when the user clicks again.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display different instructions based on playback.
+ * if (isLooping === true) {
+ * text('Click to stop', 50, 50);
+ * } else {
+ * text('Click to loop', 50, 50);
+ * }
+ * }
+ *
+ * // Adjust playback when the user presses the mouse.
+ * function mousePressed() {
+ * if (isLooping === true) {
+ * // If the beat is looping, stop it.
+ * beat.stop();
+ * isLooping = false;
+ * } else {
+ * // If the beat is stopped, loop it.
+ * beat.loop();
+ * isLooping = true;
+ * }
+ * }
+ *
+ *
+ * let beat;
+ * let isPlaying = false;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * beat = createAudio('assets/beat.mp3');
+ *
+ * describe('The text "Click to play" written in black on a gray background. A beat plays when the user clicks. The beat stops when the user clicks again.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display different instructions based on playback.
+ * if (isPlaying === true) {
+ * text('Click to stop', 50, 50);
+ * } else {
+ * text('Click to play', 50, 50);
+ * }
+ * }
+ *
+ * // Adjust playback when the user presses the mouse.
+ * function mousePressed() {
+ * if (isPlaying === true) {
+ * // If the beat is playing, stop it.
+ * beat.stop();
+ * isPlaying = false;
+ * } else {
+ * // If the beat is stopped, play it.
+ * beat.play();
+ * isPlaying = true;
+ * }
+ * }
+ *
+ *
+ * let video;
+ *
+ * function setup() {
+ * noCanvas();
+ *
+ * // Call handleVideo() once the video loads.
+ * video = createVideo('assets/fingers.mov', handleVideo);
+ *
+ * describe('A video of fingers walking on a treadmill.');
+ * }
+ *
+ * // Set the video's size and play it.
+ * function handleVideo() {
+ * video.size(100, 100);
+ * video.autoplay();
+ * }
+ *
+ *
+ * function setup() {
+ * noCanvas();
+ *
+ * // Load a video, but don't play it automatically.
+ * let video = createVideo('assets/fingers.mov', handleVideo);
+ *
+ * // Play the video when the user clicks on it.
+ * video.mousePressed(handlePress);
+ *
+ * describe('An image of fingers on a treadmill. They start walking when the user double-clicks on them.');
+ * }
+ *
+ *
+ * let dragon;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * dragon = createAudio('assets/lucky_dragons.mp3');
+ *
+ * // Show the default media controls.
+ * dragon.showControls();
+ *
+ * describe('The text "Volume: V" on a gray square with media controls beneath it. The number "V" oscillates between 0 and 1 as the music plays.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Produce a number between 0 and 1.
+ * let n = 0.5 * sin(frameCount * 0.01) + 0.5;
+ *
+ * // Use n to set the volume.
+ * dragon.volume(n);
+ *
+ * // Get the current volume and display it.
+ * let v = dragon.volume();
+ *
+ * // Round v to 1 decimal place for display.
+ * v = round(v, 1);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the volume.
+ * text(`Volume: ${v}`, 50, 50);
+ * }
+ *
+ *
+ * let dragon;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * dragon = createAudio('assets/lucky_dragons.mp3');
+ *
+ * // Show the default media controls.
+ * dragon.showControls();
+ *
+ * describe('The text "Speed: S" on a gray square with media controls beneath it. The number "S" oscillates between 0 and 1 as the music plays.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Produce a number between 0 and 2.
+ * let n = sin(frameCount * 0.01) + 1;
+ *
+ * // Use n to set the playback speed.
+ * dragon.speed(n);
+ *
+ * // Get the current speed and display it.
+ * let s = dragon.speed();
+ *
+ * // Round s to 1 decimal place for display.
+ * s = round(s, 1);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the speed.
+ * text(`Speed: ${s}`, 50, 50);
+ * }
+ *
+ */
+ /**
+ * @param {Number} speed speed multiplier for playback.
+ * @chainable
+ */
+ speed(val) {
+ if (typeof val === 'undefined') {
+ return this.presetPlaybackRate || this.elt.playbackRate;
+ } else {
+ if (this.loadedmetadata) {
+ this.elt.playbackRate = val;
+ } else {
+ this.presetPlaybackRate = val;
+ }
+ }
+ }
+
+ /**
+ * Sets the media element's playback time.
+ *
+ * The parameter, `time`, is optional. It's a number that specifies the
+ * time, in seconds, to jump to when playback begins.
+ *
+ * Calling `media.time()` without an argument returns the number of seconds
+ * the audio/video has played.
+ *
+ * Note: Time resets to 0 when looping media restarts.
+ *
+ * @return {Number} current time (in seconds).
+ *
+ * @example
+ *
+ * let dragon;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * dragon = createAudio('assets/lucky_dragons.mp3');
+ *
+ * // Show the default media controls.
+ * dragon.showControls();
+ *
+ * describe('The text "S seconds" on a gray square with media controls beneath it. The number "S" increases as the song plays.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Get the current playback time.
+ * let s = dragon.time();
+ *
+ * // Round s to 1 decimal place for display.
+ * s = round(s, 1);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the playback time.
+ * text(`${s} seconds`, 50, 50);
+ * }
+ *
+ *
+ * let dragon;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * dragon = createAudio('assets/lucky_dragons.mp3');
+ *
+ * // Show the default media controls.
+ * dragon.showControls();
+ *
+ * // Jump to 2 seconds to start.
+ * dragon.time(2);
+ *
+ * describe('The text "S seconds" on a gray square with media controls beneath it. The number "S" increases as the song plays.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Get the current playback time.
+ * let s = dragon.time();
+ *
+ * // Round s to 1 decimal place for display.
+ * s = round(s, 1);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the playback time.
+ * text(`${s} seconds`, 50, 50);
+ * }
+ *
+ *
+ * let dragon;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * dragon = createAudio('assets/lucky_dragons.mp3');
+ *
+ * // Show the default media controls.
+ * dragon.showControls();
+ *
+ * describe('The text "S seconds left" on a gray square with media controls beneath it. The number "S" decreases as the song plays.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Calculate the time remaining.
+ * let s = dragon.duration() - dragon.time();
+ *
+ * // Round s to 1 decimal place for display.
+ * s = round(s, 1);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the time remaining.
+ * text(`${s} seconds left`, 50, 50);
+ * }
+ *
+ *
+ * let beat;
+ * let isPlaying = false;
+ * let isDone = false;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * beat = createAudio('assets/beat.mp3');
+ *
+ * // Call handleEnd() when the beat finishes.
+ * beat.onended(handleEnd);
+ *
+ * describe('The text "Click to play" written in black on a gray square. A beat plays when the user clicks. The text "Done!" appears when the beat finishes playing.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display different messages based on playback.
+ * if (isDone === true) {
+ * text('Done!', 50, 50);
+ * } else if (isPlaying === false) {
+ * text('Click to play', 50, 50);
+ * } else {
+ * text('Playing...', 50, 50);
+ * }
+ * }
+ *
+ * // Play the beat when the user presses the mouse.
+ * function mousePressed() {
+ * if (isPlaying === false) {
+ * isPlaying = true;
+ * beat.play();
+ * }
+ * }
+ *
+ * // Set isDone when playback ends.
+ * function handleEnd() {
+ * isDone = false;
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background('cornflowerblue');
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(50);
+ *
+ * // Display a dragon.
+ * text('🐉', 50, 50);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * let dragon = createAudio('assets/lucky_dragons.mp3');
+ *
+ * // Show the default media controls.
+ * dragon.showControls();
+ *
+ * describe('A dragon emoji, 🐉, drawn in the center of a blue square. A song plays in the background. Audio controls are displayed beneath the canvas.');
+ * }
+ *
+ *
+ * let dragon;
+ * let isHidden = false;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * dragon = createAudio('assets/lucky_dragons.mp3');
+ *
+ * // Show the default media controls.
+ * dragon.showControls();
+ *
+ * describe('The text "Double-click to hide controls" written in the middle of a gray square. A song plays in the background. Audio controls are displayed beneath the canvas. The controls appear/disappear when the user double-clicks the square.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ *
+ * // Display a different message when controls are hidden or shown.
+ * if (isHidden === true) {
+ * text('Double-click to show controls', 10, 20, 80, 80);
+ * } else {
+ * text('Double-click to hide controls', 10, 20, 80, 80);
+ * }
+ * }
+ *
+ * // Show/hide controls based on a double-click.
+ * function doubleClicked() {
+ * if (isHidden === true) {
+ * dragon.showControls();
+ * isHidden = false;
+ * } else {
+ * dragon.hideControls();
+ * isHidden = true;
+ * }
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * let beat = createAudio('assets/beat.mp3');
+ *
+ * // Play the beat in a loop.
+ * beat.loop();
+ *
+ * // Schedule a few events.
+ * beat.addCue(0, changeBackground, 'red');
+ * beat.addCue(2, changeBackground, 'deeppink');
+ * beat.addCue(4, changeBackground, 'orchid');
+ * beat.addCue(6, changeBackground, 'lavender');
+ *
+ * describe('A red square with a beat playing in the background. Its color changes every 2 seconds while the audio plays.');
+ * }
+ *
+ * // Change the background color.
+ * function changeBackground(c) {
+ * background(c);
+ * }
+ *
+ *
+ * let lavenderID;
+ * let isRemoved = false;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * let beat = createAudio('assets/beat.mp3');
+ *
+ * // Play the beat in a loop.
+ * beat.loop();
+ *
+ * // Schedule a few events.
+ * beat.addCue(0, changeBackground, 'red');
+ * beat.addCue(2, changeBackground, 'deeppink');
+ * beat.addCue(4, changeBackground, 'orchid');
+ *
+ * // Record the ID of the "lavender" callback.
+ * lavenderID = beat.addCue(6, changeBackground, 'lavender');
+ *
+ * describe('The text "Double-click to remove lavender." written on a red square. The color changes every 2 seconds while the audio plays. The lavender option is removed when the user double-clicks the square.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Display different instructions based on the available callbacks.
+ * if (isRemoved === false) {
+ * text('Double-click to remove lavender.', 10, 10, 80, 80);
+ * } else {
+ * text('No more lavender.', 10, 10, 80, 80);
+ * }
+ * }
+ *
+ * // Change the background color.
+ * function changeBackground(c) {
+ * background(c);
+ * }
+ *
+ * // Remove the lavender color-change cue when the user double-clicks.
+ * function doubleClicked() {
+ * if (isRemoved === false) {
+ * beat.removeCue(lavenderID);
+ * isRemoved = true;
+ * }
+ * }
+ *
+ *
+ * let isChanging = true;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * let beat = createAudio('assets/beat.mp3');
+ *
+ * // Play the beat in a loop.
+ * beat.loop();
+ *
+ * // Schedule a few events.
+ * beat.addCue(0, changeBackground, 'red');
+ * beat.addCue(2, changeBackground, 'deeppink');
+ * beat.addCue(4, changeBackground, 'orchid');
+ * beat.addCue(6, changeBackground, 'lavender');
+ *
+ * describe('The text "Double-click to stop changing." written on a square. The color changes every 2 seconds while the audio plays. The color stops changing when the user double-clicks the square.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Display different instructions based on the available callbacks.
+ * if (isChanging === true) {
+ * text('Double-click to stop changing.', 10, 10, 80, 80);
+ * } else {
+ * text('No more changes.', 10, 10, 80, 80);
+ * }
+ * }
+ *
+ * // Change the background color.
+ * function changeBackground(c) {
+ * background(c);
+ * }
+ *
+ * // Remove cued functions and stop changing colors when the user
+ * // double-clicks.
+ * function doubleClicked() {
+ * if (isChanging === true) {
+ * beat.clearCues();
+ * isChanging = false;
+ * }
+ * }
+ *
+ *
+ * function setup() {
+ * noCanvas();
+ *
+ * // Load a video and add it to the page.
+ * // Note: this may not work in some browsers.
+ * let video = createVideo('assets/small.mp4');
+ *
+ * // Show the default video controls.
+ * video.showControls();
+ *
+ * describe('A video of a toy robot with playback controls beneath it.');
+ * }
+ *
+ *
+ * function setup() {
+ * noCanvas();
+ *
+ * // Load a video and add it to the page.
+ * // Provide an array options for different file formats.
+ * let video = createVideo(
+ * ['assets/small.mp4', 'assets/small.ogv', 'assets/small.webm']
+ * );
+ *
+ * // Show the default video controls.
+ * video.showControls();
+ *
+ * describe('A video of a toy robot with playback controls beneath it.');
+ * }
+ *
+ *
+ * let video;
+ *
+ * function setup() {
+ * noCanvas();
+ *
+ * // Load a video and add it to the page.
+ * // Provide an array options for different file formats.
+ * // Call mute() once the video loads.
+ * video = createVideo(
+ * ['assets/small.mp4', 'assets/small.ogv', 'assets/small.webm'],
+ * muteVideo
+ * );
+ *
+ * // Show the default video controls.
+ * video.showControls();
+ *
+ * describe('A video of a toy robot with playback controls beneath it.');
+ * }
+ *
+ * // Mute the video once it loads.
+ * function muteVideo() {
+ * video.volume(0);
+ * }
+ *
+ *
+ * function setup() {
+ * noCanvas();
+ *
+ * // Load the audio.
+ * let beat = createAudio('assets/beat.mp3');
+ *
+ * // Show the default audio controls.
+ * beat.showControls();
+ *
+ * describe('An audio beat plays when the user double-clicks the square.');
+ * }
+ *
+ *
+ * function setup() {
+ * noCanvas();
+ *
+ * // Create the video capture.
+ * createCapture(VIDEO);
+ *
+ * describe('A video stream from the webcam.');
+ * }
+ *
+ *
+ * let capture;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create the video capture and hide the element.
+ * capture = createCapture(VIDEO);
+ * capture.hide();
+ *
+ * describe('A video stream from the webcam with inverted colors.');
+ * }
+ *
+ * function draw() {
+ * // Draw the video capture within the canvas.
+ * image(capture, 0, 0, width, width * capture.height / capture.width);
+ *
+ * // Invert the colors in the stream.
+ * filter(INVERT);
+ * }
+ *
+ *
+ * let capture;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create the video capture with mirrored output.
+ * capture = createCapture(VIDEO,{ flipped:true });
+ * capture.size(100,100);
+ *
+ * describe('A video stream from the webcam with flipped or mirrored output.');
+ * }
+ *
+ *
+ *
+ * function setup() {
+ * createCanvas(480, 120);
+ *
+ * // Create a constraints object.
+ * let constraints = {
+ * video: {
+ * mandatory: {
+ * minWidth: 1280,
+ * minHeight: 720
+ * },
+ * optional: [{ maxFrameRate: 10 }]
+ * },
+ * audio: false
+ * };
+ *
+ * // Create the video capture.
+ * createCapture(constraints);
+ *
+ * describe('A video stream from the webcam.');
+ * }
+ *
+ *
+ * let capture;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.MediaElement using createCapture().
+ * capture = createCapture(VIDEO);
+ * capture.hide();
+ *
+ * describe('A webcam feed with inverted colors.');
+ * }
+ *
+ * function draw() {
+ * // Display the video stream and invert the colors.
+ * image(capture, 0, 0, width, width * capture.height / capture.width);
+ * filter(INVERT);
+ * }
+ *
+ *
+ * let beat;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.MediaElement using createAudio().
+ * beat = createAudio('assets/beat.mp3');
+ *
+ * describe('The text "https://p5js.org/reference/assets/beat.mp3" written in black on a gray background.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * textWrap(CHAR);
+ * text(beat.src, 10, 10, 80, 80);
+ * }
+ *
+ *
- * // Move a touchscreen device to register
- * // acceleration changes.
- * function draw() {
- * background(220, 50);
- * fill('magenta');
- * ellipse(width / 2, height / 2, accelerationX);
- * describe('Magnitude of device acceleration is displayed as ellipse size.');
- * }
- *
- *
- * // Move a touchscreen device to register
- * // acceleration changes.
- * function draw() {
- * background(220, 50);
- * fill('magenta');
- * ellipse(width / 2, height / 2, accelerationY);
- * describe('Magnitude of device acceleration is displayed as ellipse size');
- * }
- *
- *
- * // Move a touchscreen device to register
- * // acceleration changes.
- * function draw() {
- * background(220, 50);
- * fill('magenta');
- * ellipse(width / 2, height / 2, accelerationZ);
- * describe('Magnitude of device acceleration is displayed as ellipse size');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- * }
- *
- * function draw() {
- * background(200);
- * //rotateZ(radians(rotationZ));
- * rotateX(radians(rotationX));
- * //rotateY(radians(rotationY));
- * box(200, 200, 200);
- * describe(`red horizontal line right, green vertical line bottom.
- * black background.`);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- * }
- *
- * function draw() {
- * background(200);
- * //rotateZ(radians(rotationZ));
- * //rotateX(radians(rotationX));
- * rotateY(radians(rotationY));
- * box(200, 200, 200);
- * describe(`red horizontal line right, green vertical line bottom.
- * black background.`);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- * }
- *
- * function draw() {
- * background(200);
- * rotateZ(radians(rotationZ));
- * //rotateX(radians(rotationX));
- * //rotateY(radians(rotationY));
- * box(200, 200, 200);
- * describe(`red horizontal line right, green vertical line bottom.
- * black background.`);
- * }
- *
- *
- * // A simple if statement looking at whether
- * // rotationX - pRotationX < 0 is true or not will be
- * // sufficient for determining the rotate direction
- * // in most cases.
- *
- * // Some extra logic is needed to account for cases where
- * // the angles wrap around.
- * let rotateDirection = 'clockwise';
- *
- * // Simple range conversion to make things simpler.
- * // This is not absolutely necessary but the logic
- * // will be different in that case.
- *
- * let rX = rotationX + 180;
- * let pRX = pRotationX + 180;
- *
- * if ((rX - pRX > 0 && rX - pRX < 270) || rX - pRX < -270) {
- * rotateDirection = 'clockwise';
- * } else if (rX - pRX < 0 || rX - pRX > 270) {
- * rotateDirection = 'counter-clockwise';
- * }
- *
- * print(rotateDirection);
- * describe('no image to display.');
- *
- *
- * // A simple if statement looking at whether
- * // rotationY - pRotationY < 0 is true or not will be
- * // sufficient for determining the rotate direction
- * // in most cases.
- *
- * // Some extra logic is needed to account for cases where
- * // the angles wrap around.
- * let rotateDirection = 'clockwise';
- *
- * // Simple range conversion to make things simpler.
- * // This is not absolutely necessary but the logic
- * // will be different in that case.
- *
- * let rY = rotationY + 180;
- * let pRY = pRotationY + 180;
- *
- * if ((rY - pRY > 0 && rY - pRY < 270) || rY - pRY < -270) {
- * rotateDirection = 'clockwise';
- * } else if (rY - pRY < 0 || rY - pRY > 270) {
- * rotateDirection = 'counter-clockwise';
- * }
- * print(rotateDirection);
- * describe('no image to display.');
- *
- *
- * // A simple if statement looking at whether
- * // rotationZ - pRotationZ < 0 is true or not will be
- * // sufficient for determining the rotate direction
- * // in most cases.
- *
- * // Some extra logic is needed to account for cases where
- * // the angles wrap around.
- * let rotateDirection = 'clockwise';
- *
- * if (
- * (rotationZ - pRotationZ > 0 && rotationZ - pRotationZ < 270) ||
- * rotationZ - pRotationZ < -270
- * ) {
- * rotateDirection = 'clockwise';
- * } else if (rotationZ - pRotationZ < 0 || rotationZ - pRotationZ > 270) {
- * rotateDirection = 'counter-clockwise';
- * }
- * print(rotateDirection);
- * describe('no image to display.');
- *
- *
- * // Run this example on a mobile device
- * // Rotate the device by 90 degrees in the
- * // X-axis to change the value.
- *
- * let value = 0;
- * function draw() {
- * fill(value);
- * rect(25, 25, 50, 50);
- * describe(`50-by-50 black rect in center of canvas.
- * turns white on mobile when device turns`);
- * describe(`50-by-50 black rect in center of canvas.
- * turns white on mobile when x-axis turns`);
- * }
- * function deviceTurned() {
- * if (turnAxis === 'X') {
- * if (value === 0) {
- * value = 255;
- * } else if (value === 255) {
- * value = 0;
- * }
- * }
- * }
- *
- *
- * // Run this example on a mobile device
- * // You will need to move the device incrementally further
- * // the closer the square's color gets to white in order to change the value.
- *
- * let value = 0;
- * let threshold = 0.5;
- * function setup() {
- * setMoveThreshold(threshold);
- * }
- * function draw() {
- * fill(value);
- * rect(25, 25, 50, 50);
- * describe(`50-by-50 black rect in center of canvas.
- * turns white on mobile when device moves`);
- * }
- * function deviceMoved() {
- * value = value + 5;
- * threshold = threshold + 0.1;
- * if (value > 255) {
- * value = 0;
- * threshold = 30;
- * }
- * setMoveThreshold(threshold);
- * }
- *
- *
- * // Run this example on a mobile device
- * // You will need to shake the device more firmly
- * // the closer the box's fill gets to white in order to change the value.
- *
- * let value = 0;
- * let threshold = 30;
- * function setup() {
- * setShakeThreshold(threshold);
- * }
- * function draw() {
- * fill(value);
- * rect(25, 25, 50, 50);
- * describe(`50-by-50 black rect in center of canvas.
- * turns white on mobile when device is being shaked`);
- * }
- * function deviceMoved() {
- * value = value + 5;
- * threshold = threshold + 5;
- * if (value > 255) {
- * value = 0;
- * threshold = 30;
- * }
- * setShakeThreshold(threshold);
- * }
- *
- *
- * // Run this example on a mobile device
- * // Move the device around
- * // to change the value.
- *
- * let value = 0;
- * function draw() {
- * fill(value);
- * rect(25, 25, 50, 50);
- * describe(`50-by-50 black rect in center of canvas.
- * turns white on mobile when device moves`);
- * }
- * function deviceMoved() {
- * value = value + 5;
- * if (value > 255) {
- * value = 0;
- * }
- * }
- *
- *
- * // Run this example on a mobile device
- * // Rotate the device by 90 degrees
- * // to change the value.
- *
- * let value = 0;
- * function draw() {
- * fill(value);
- * rect(25, 25, 50, 50);
- * describe(`50-by-50 black rect in center of canvas.
- * turns white on mobile when device turns`);
- * }
- * function deviceTurned() {
- * if (value === 0) {
- * value = 255;
- * } else if (value === 255) {
- * value = 0;
- * }
- * }
- *
- *
- * // Run this example on a mobile device
- * // Rotate the device by 90 degrees in the
- * // X-axis to change the value.
- *
- * let value = 0;
- * function draw() {
- * fill(value);
- * rect(25, 25, 50, 50);
- * describe(`50-by-50 black rect in center of canvas.
- * turns white on mobile when x-axis turns`);
- * }
- * function deviceTurned() {
- * if (turnAxis === 'X') {
- * if (value === 0) {
- * value = 255;
- * } else if (value === 255) {
- * value = 0;
- * }
- * }
- * }
- *
- *
- * // Run this example on a mobile device
- * // Shake the device to change the value.
- *
- * let value = 0;
- * function draw() {
- * fill(value);
- * rect(25, 25, 50, 50);
- * describe(`50-by-50 black rect in center of canvas.
- * turns white on mobile when device shakes`);
- * }
- * function deviceShaken() {
- * value = value + 5;
- * if (value > 255) {
- * value = 0;
- * }
- * }
- *
- *
+ * // Move a touchscreen device to register
+ * // acceleration changes.
+ * function draw() {
+ * background(220, 50);
+ * fill('magenta');
+ * ellipse(width / 2, height / 2, accelerationX);
+ * describe('Magnitude of device acceleration is displayed as ellipse size.');
+ * }
+ *
+ *
+ * // Move a touchscreen device to register
+ * // acceleration changes.
+ * function draw() {
+ * background(220, 50);
+ * fill('magenta');
+ * ellipse(width / 2, height / 2, accelerationY);
+ * describe('Magnitude of device acceleration is displayed as ellipse size');
+ * }
+ *
+ *
+ * // Move a touchscreen device to register
+ * // acceleration changes.
+ * function draw() {
+ * background(220, 50);
+ * fill('magenta');
+ * ellipse(width / 2, height / 2, accelerationZ);
+ * describe('Magnitude of device acceleration is displayed as ellipse size');
+ * }
+ *
+ *
+ * let rotationX = 0; // Angle in degrees
+ *
+ * function setup() {
+ * createCanvas(200, 200, WEBGL); // Create 3D canvas
+ * }
+ *
+ * function draw() {
+ * background(220); // Set light gray background
+ * rotateX(radians(rotationX)); // Rotate around X-axis
+ * normalMaterial(); // Apply simple shaded material
+ * box(60); // Draw 3D cube (60 units wide)
+ * rotationX = (rotationX + 2) % 360; // Increment rotation (2° per frame)
+ * }
+ *
+ *
+ * let rotationY = 0; // Angle in degrees
+ *
+ * function setup() {
+ * createCanvas(200, 200, WEBGL); // Create 3D canvas
+ * }
+ *
+ * function draw() {
+ * background(220); // Set light gray background
+ * rotateY(radians(rotationY)); // Rotate around Y-axis (vertical)
+ * normalMaterial(); // Apply simple shaded material
+ * box(60); // Draw 3D cube (60 units wide)
+ * rotationY = (rotationY + 2) % 360; // Increment rotation (2° per frame)
+ * }
+ *
+ *
+ * let rotationZ = 0; // Angle in degrees
+ *
+ * function setup() {
+ * createCanvas(200, 200, WEBGL); // Create 3D canvas
+ * }
+ *
+ * function draw() {
+ * background(220);
+ * rotateZ(radians(rotationZ)); // Rotate around Z-axis
+ * normalMaterial(); // Apply simple shaded material
+ * box(60); // Draw 3D cube
+ * rotationZ = (rotationZ + 2) % 360; // Increment rotation angle
+ * }
+ *
+ *
+ * // A simple if statement looking at whether
+ * // rotationX - pRotationX < 0 is true or not will be
+ * // sufficient for determining the rotate direction
+ * // in most cases.
+ *
+ * // Some extra logic is needed to account for cases where
+ * // the angles wrap around.
+ * let rotateDirection = 'clockwise';
+ *
+ * // Simple range conversion to make things simpler.
+ * // This is not absolutely necessary but the logic
+ * // will be different in that case.
+ *
+ * let rX = rotationX + 180;
+ * let pRX = pRotationX + 180;
+ *
+ * if ((rX - pRX > 0 && rX - pRX < 270) || rX - pRX < -270) {
+ * rotateDirection = 'clockwise';
+ * } else if (rX - pRX < 0 || rX - pRX > 270) {
+ * rotateDirection = 'counter-clockwise';
+ * }
+ *
+ * print(rotateDirection);
+ * describe('no image to display.');
+ *
+ *
+ * // A simple if statement looking at whether
+ * // rotationY - pRotationY < 0 is true or not will be
+ * // sufficient for determining the rotate direction
+ * // in most cases.
+ *
+ * // Some extra logic is needed to account for cases where
+ * // the angles wrap around.
+ * let rotateDirection = 'clockwise';
+ *
+ * // Simple range conversion to make things simpler.
+ * // This is not absolutely necessary but the logic
+ * // will be different in that case.
+ *
+ * let rY = rotationY + 180;
+ * let pRY = pRotationY + 180;
+ *
+ * if ((rY - pRY > 0 && rY - pRY < 270) || rY - pRY < -270) {
+ * rotateDirection = 'clockwise';
+ * } else if (rY - pRY < 0 || rY - pRY > 270) {
+ * rotateDirection = 'counter-clockwise';
+ * }
+ * print(rotateDirection);
+ * describe('no image to display.');
+ *
+ *
+ * // A simple if statement looking at whether
+ * // rotationZ - pRotationZ < 0 is true or not will be
+ * // sufficient for determining the rotate direction
+ * // in most cases.
+ *
+ * // Some extra logic is needed to account for cases where
+ * // the angles wrap around.
+ * let rotateDirection = 'clockwise';
+ *
+ * if (
+ * (rotationZ - pRotationZ > 0 && rotationZ - pRotationZ < 270) ||
+ * rotationZ - pRotationZ < -270
+ * ) {
+ * rotateDirection = 'clockwise';
+ * } else if (rotationZ - pRotationZ < 0 || rotationZ - pRotationZ > 270) {
+ * rotateDirection = 'counter-clockwise';
+ * }
+ * print(rotateDirection);
+ * describe('no image to display.');
+ *
+ *
+ * // Run this example on a mobile device
+ * // Rotate the device by 90 degrees in the
+ * // X-axis to change the value.
+ *
+ * let value = 0;
+ * function draw() {
+ * fill(value);
+ * rect(25, 25, 50, 50);
+ * describe(`50-by-50 black rect in center of canvas.
+ * turns white on mobile when device turns`);
+ * describe(`50-by-50 black rect in center of canvas.
+ * turns white on mobile when x-axis turns`);
+ * }
+ * function deviceTurned() {
+ * if (turnAxis === 'X') {
+ * if (value === 0) {
+ * value = 255;
+ * } else if (value === 255) {
+ * value = 0;
+ * }
+ * }
+ * }
+ *
+ *
+ * // Run this example on a mobile device
+ * // You will need to move the device incrementally further
+ * // the closer the square's color gets to white in order to change the value.
+ *
+ * let value = 0;
+ * let threshold = 0.5;
+ * function setup() {
+ * setMoveThreshold(threshold);
+ * }
+ * function draw() {
+ * fill(value);
+ * rect(25, 25, 50, 50);
+ * describe(`50-by-50 black rect in center of canvas.
+ * turns white on mobile when device moves`);
+ * }
+ * function deviceMoved() {
+ * value = value + 5;
+ * threshold = threshold + 0.1;
+ * if (value > 255) {
+ * value = 0;
+ * threshold = 30;
+ * }
+ * setMoveThreshold(threshold);
+ * }
+ *
+ *
+ * // Run this example on a mobile device
+ * // You will need to shake the device more firmly
+ * // the closer the box's fill gets to white in order to change the value.
+ *
+ * let value = 0;
+ * let threshold = 30;
+ * function setup() {
+ * setShakeThreshold(threshold);
+ * }
+ * function draw() {
+ * fill(value);
+ * rect(25, 25, 50, 50);
+ * describe(`50-by-50 black rect in center of canvas.
+ * turns white on mobile when device is being shaked`);
+ * }
+ * function deviceMoved() {
+ * value = value + 5;
+ * threshold = threshold + 5;
+ * if (value > 255) {
+ * value = 0;
+ * threshold = 30;
+ * }
+ * setShakeThreshold(threshold);
+ * }
+ *
+ *
+ * // Run this example on a mobile device
+ * // Move the device around
+ * // to change the value.
+ *
+ * let value = 0;
+ * function draw() {
+ * fill(value);
+ * rect(25, 25, 50, 50);
+ * describe(`50-by-50 black rect in center of canvas.
+ * turns white on mobile when device moves`);
+ * }
+ * function deviceMoved() {
+ * value = value + 5;
+ * if (value > 255) {
+ * value = 0;
+ * }
+ * }
+ *
+ *
+ * // Run this example on a mobile device
+ * // Rotate the device by 90 degrees
+ * // to change the value.
+ *
+ * let value = 0;
+ * function draw() {
+ * fill(value);
+ * rect(25, 25, 50, 50);
+ * describe(`50-by-50 black rect in center of canvas.
+ * turns white on mobile when device turns`);
+ * }
+ * function deviceTurned() {
+ * if (value === 0) {
+ * value = 255;
+ * } else if (value === 255) {
+ * value = 0;
+ * }
+ * }
+ *
+ *
+ * // Run this example on a mobile device
+ * // Rotate the device by 90 degrees in the
+ * // X-axis to change the value.
+ *
+ * let value = 0;
+ * function draw() {
+ * fill(value);
+ * rect(25, 25, 50, 50);
+ * describe(`50-by-50 black rect in center of canvas.
+ * turns white on mobile when x-axis turns`);
+ * }
+ * function deviceTurned() {
+ * if (turnAxis === 'X') {
+ * if (value === 0) {
+ * value = 255;
+ * } else if (value === 255) {
+ * value = 0;
+ * }
+ * }
+ * }
+ *
+ *
+ * // Run this example on a mobile device
+ * // Shake the device to change the value.
+ *
+ * let value = 0;
+ * function draw() {
+ * fill(value);
+ * rect(25, 25, 50, 50);
+ * describe(`50-by-50 black rect in center of canvas.
+ * turns white on mobile when device shakes`);
+ * }
+ * function deviceShaken() {
+ * value = value + 5;
+ * if (value > 255) {
+ * value = 0;
+ * }
+ * }
+ *
+ *
- * // Click on the canvas to begin detecting key presses.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a white square at its center. The white square turns black when the user presses a key.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * if (keyIsPressed === true) {
- * fill(0);
- * } else {
- * fill(255);
- * }
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- *
- * // Click on the canvas to begin detecting key presses.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a white square at its center. The white square turns black when the user presses a key.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * if (keyIsPressed) {
- * fill(0);
- * } else {
- * fill(255);
- * }
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- *
- * // Click on the canvas to begin detecting key presses.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with the word "false" at its center. The word switches to "true" when the user presses a key.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display the value of keyIsPressed.
- * text(keyIsPressed, 50, 50);
- * }
- *
- *
- * // Click on the canvas to begin detecting key presses.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square. The last key pressed is displayed at the center.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display the last key pressed.
- * text(key, 50, 50);
- * }
- *
- *
- * // Click on the canvas to begin detecting key presses.
- *
- * let x = 50;
- * let y = 50;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * describe(
- * 'A gray square with a black circle at its center. The circle moves when the user presses the keys "w", "a", "s", or "d". It leaves a trail as it moves.'
- * );
- * }
- *
- * function draw() {
- * // Update x and y if a key is pressed.
- * if (keyIsPressed === true) {
- * if (key === 'w') {
- * y -= 1;
- * } else if (key === 's') {
- * y += 1;
- * } else if (key === 'a') {
- * x -= 1;
- * } else if (key === 'd') {
- * x += 1;
- * }
- * }
- *
- * // Style the circle.
- * fill(0);
- *
- * // Draw the circle at (x, y).
- * circle(x, y, 5);
- * }
- *
- *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a white square at its center. The white square turns black when the user presses a key.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * if (keyIsPressed === true) {
+ * fill(0);
+ * } else {
+ * fill(255);
+ * }
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a white square at its center. The white square turns black when the user presses a key.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * if (keyIsPressed) {
+ * fill(0);
+ * } else {
+ * fill(255);
+ * }
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with the word "false" at its center. The word switches to "true" when the user presses a key.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the value of keyIsPressed.
+ * text(keyIsPressed, 50, 50);
+ * }
+ *
+ *
- * // Click on the canvas to begin detecting key presses.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square. The last key pressed and its code are displayed at the center.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display the last key pressed and its code.
- * text(`${key} : ${keyCode}`, 50, 50);
- * }
- *
- *
- * // Click on the canvas to begin detecting key presses.
- *
- * let x = 50;
- * let y = 50;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * describe(
- * 'A gray square with a black circle at its center. The circle moves when the user presses an arrow key. It leaves a trail as it moves.'
- * );
- * }
- *
- * function draw() {
- * // Update x and y if an arrow key is pressed.
- * if (keyIsPressed === true) {
- * if (keyCode === UP_ARROW) {
- * y -= 1;
- * } else if (keyCode === DOWN_ARROW) {
- * y += 1;
- * } else if (keyCode === LEFT_ARROW) {
- * x -= 1;
- * } else if (keyCode === RIGHT_ARROW) {
- * x += 1;
- * }
- * }
- *
- * // Style the circle.
- * fill(0);
- *
- * // Draw the circle at (x, y).
- * circle(x, y, 5);
- * }
- *
- *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square. The last key pressed is displayed at the center.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the last key pressed.
+ * text(key, 50, 50);
+ * }
+ *
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * let x = 50;
+ * let y = 50;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * describe(
+ * 'A gray square with a black circle at its center. The circle moves when the user presses the keys "w", "a", "s", or "d". It leaves a trail as it moves.'
+ * );
+ * }
+ *
+ * function draw() {
+ * // Update x and y if a key is pressed.
+ * if (keyIsPressed === true) {
+ * if (key === 'w') {
+ * y -= 1;
+ * } else if (key === 's') {
+ * y += 1;
+ * } else if (key === 'a') {
+ * x -= 1;
+ * } else if (key === 'd') {
+ * x += 1;
+ * }
+ * }
+ *
+ * // Style the circle.
+ * fill(0);
+ *
+ * // Draw the circle at (x, y).
+ * circle(x, y, 5);
+ * }
+ *
+ *
- * // Click on the canvas to begin detecting key presses.
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square changes color when the user presses a key.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * // Toggle the background color when the user presses a key.
- * function keyPressed() {
- * if (value === 0) {
- * value = 255;
- * } else {
- * value = 0;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * // Click on the canvas to begin detecting key presses.
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a white square at its center. The inner square turns black when the user presses the "b" key. It turns white when the user presses the "a" key.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * // Reassign value when the user presses the 'a' or 'b' key.
- * function keyPressed() {
- * if (key === 'a') {
- * value = 255;
- * } else if (key === 'b') {
- * value = 0;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * // Click on the canvas to begin detecting key presses.
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square turns white when the user presses the left arrow key. It turns black when the user presses the right arrow key.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * // Toggle the background color when the user presses an arrow key.
- * function keyPressed() {
- * if (keyCode === LEFT_ARROW) {
- * value = 255;
- * } else if (keyCode === RIGHT_ARROW) {
- * value = 0;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- * The table below summarizes how the main keyboard-related system variables changed between p5.js 1.x and 2.x.
+ *Variable | + *p5.js 1.x | + *p5.js 2.x | + *
---|---|---|
key |
+ * Text string (e.g., "ArrowUp" ). |
+ * Text string (e.g., "ArrowUp" , "f" or "F" ). |
+ *
code |
+ * Not supported. | + *Text String (e.g., "ArrowUp" , "KeyF" ). |
+ *
keyCode |
+ * Number (e.g., 70 ). |
+ * Number (unchanged; e.g., 70 ). |
+ *
System variables (BACKSPACE , UP_ARROW , …) |
+ * Number | + *Text String (e.g., "ArrowUp" ). |
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square. The last key pressed is displayed at the center.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the last key pressed.
+ * text(code, 50, 50);
+ * }
+ *
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ * }
+ *
+ * function draw() {
+ * background(220);
+ * fill("black");
+ * if (keyIsDown(BACKSPACE) || keyIsDown(ENTER) ||
+ * keyIsDown(DELETE) || keyIsDown(RETURN) ||
+ * keyIsDown(TAB) || keyIsDown(ESCAPE) ||
+ * keyIsDown(CONTROL) || keyIsDown(OPTION) ||
+ * keyIsDown(UP_ARROW) || keyIsDown(LEFT_ARROW) ||
+ * keyIsDown(RIGHT_ARROW) || keyIsDown(DOWN_ARROW) ||
+ * keyIsDown(SHIFT)) {
+ * fill("red");
+ * text("System Variable", 7, 75);
+ * }
+ *
+ * text(key, 30, 25);
+ * text(keyCode, 7, 25);
+ * text(code || " ", 30, 50);
+ * }
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * let x = 50;
+ * let y = 50;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * describe(
+ * 'A gray square with a black circle at its center. The circle moves when the user presses an arrow key. It leaves a trail as it moves.'
+ * );
+ * }
+ *
+ * function draw() {
+ * // Update x and y if an arrow key is pressed.
+ * if (keyIsPressed){
+ * if (keyIsDown(LEFT_ARROW)){
+ * x -= 1;
+ * }
+ *
+ * if (keyIsDown(RIGHT_ARROW)) {
+ * x += 1;
+ * }
+ *
+ * if (keyIsDown(UP_ARROW)) {
+ * y -= 1;
+ * }
+ *
+ * if (keyIsDown(DOWN_ARROW)) {
+ * y += 1;
+ * }
+ * }
+ *
+ * // Style the circle.
+ * fill(0);
+ *
+ * // Draw the circle.
+ * circle(x, y, 5);
+ * }
+ *
+ *
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square. The last key pressed and its code are displayed at the center.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the last key pressed and its code.
+ * text(`${key} : ${keyCode}`, 50, 50);
+ * }
+ *
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * let x = 50;
+ * let y = 50;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * describe(
+ * 'A gray square with a black circle at its center. The circle moves when the user presses an arrow key. It leaves a trail as it moves.'
+ * );
+ * }
+ *
+ * function draw() {
+ * // Update x and y if an arrow key is pressed.
+ * if (keyIsPressed === true) {
+ * if (keyCode === 38) { // Up arrow key
+ * y -= 1;
+ * } else if (keyCode === 40) { // Down arrow key
+ * y += 1;
+ * } else if (keyCode === 37) { // Left arrow key
+ * x -= 1;
+ * } else if (keyCode === 39) { // Right arrow key
+ * x += 1;
+ * }
+ * }
+ *
+ * // Style the circle.
+ * fill(0);
+ *
+ * // Draw the circle at (x, y).
+ * circle(x, y, 5);
+ * }
+ *
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a black square at its center. The inner square changes color when the user presses a key.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * // Toggle the background color when the user presses a key.
+ * function keyPressed() {
+ * if (value === 0) {
+ * value = 255;
+ * } else {
+ * value = 0;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a white square at its center. The inner square turns black when the user presses the "b" key. It turns white when the user presses the "a" key.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * // Reassign value when the user presses the 'a' or 'b' key.
+ * function keyPressed() {
+ * if (key === 'a') {
+ * value = 255;
+ * } else if (key === 'b') {
+ * value = 0;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a black square at its center. The inner square turns white when the user presses the left arrow key. It turns black when the user presses the right arrow key.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * // Toggle the background color when the user presses an arrow key.
+ * function keyPressed() {
+ * if (keyCode === 37) { // Left arrow key
+ * value = 255;
+ * } else if (keyCode === 39) { // Right arrow key
+ * value = 0;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
- * // Click on the canvas to begin detecting key presses.
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square changes color when the user releases a key.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * // Toggle value when the user releases a key.
- * function keyReleased() {
- * if (value === 0) {
- * value = 255;
- * } else {
- * value = 0;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * // Click on the canvas to begin detecting key presses.
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square becomes white when the user releases the "w" key.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * // Set value to 255 the user releases the 'w' key.
- * function keyReleased() {
- * if (key === 'w') {
- * value = 255;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * // Click on the canvas to begin detecting key presses.
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square turns white when the user presses and releases the left arrow key. It turns black when the user presses and releases the right arrow key.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * // Toggle the background color when the user releases an arrow key.
- * function keyReleased() {
- * if (keyCode === LEFT_ARROW) {
- * value = 255;
- * } else if (keyCode === RIGHT_ARROW) {
- * value = 0;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a black square at its center. The inner square changes color when the user releases a key.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * // Toggle value when the user releases a key.
+ * function keyReleased() {
+ * if (value === 0) {
+ * value = 255;
+ * } else {
+ * value = 0;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a black square at its center. The inner square becomes white when the user releases the "w" key.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * // Set value to 255 the user releases the 'w' key.
+ * function keyReleased() {
+ * if (key === 'w') {
+ * value = 255;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a black square at its center. The inner square turns white when the user presses and releases the left arrow key. It turns black when the user presses and releases the right arrow key.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * // Toggle the background color when the user releases an arrow key.
+ * function keyReleased() {
+ * if (keyCode === 37) { // Left arrow key
+ * value = 255;
+ * } else if (keyCode === 39) { // Right arrow key
+ * value = 0;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
- * // Click on the canvas to begin detecting key presses.
- * // Note: Pressing special keys such as SPACE have no effect.
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a white square at its center. The inner square changes color when the user presses a key.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * // Toggle the square's color when the user types a printable key.
- * function keyTyped() {
- * if (value === 0) {
- * value = 255;
- * } else {
- * value = 0;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * // Click on the canvas to begin detecting key presses.
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a white square at its center. The inner square turns black when the user types the "b" key. It turns white when the user types the "a" key.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * // Reassign value when the user types the 'a' or 'b' key.
- * function keyTyped() {
- * if (key === 'a') {
- * value = 255;
- * } else if (key === 'b') {
- * value = 0;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
+ * // Click on the canvas to begin detecting key presses.
+ * // Note: Pressing special keys such as SPACE have no effect.
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a white square at its center. The inner square changes color when the user presses a key.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * // Toggle the square's color when the user types a printable key.
+ * function keyTyped() {
+ * if (value === 0) {
+ * value = 255;
+ * } else {
+ * value = 0;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a white square at its center. The inner square turns black when the user types the "b" key. It turns white when the user types the "a" key.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * // Reassign value when the user types the 'a' or 'b' key.
+ * function keyTyped() {
+ * if (key === 'a') {
+ * value = 255;
+ * } else if (key === 'b') {
+ * value = 0;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
- * // Click on the canvas to begin detecting key presses.
- *
- * let x = 50;
- * let y = 50;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * describe(
- * 'A gray square with a black circle at its center. The circle moves when the user presses an arrow key. It leaves a trail as it moves.'
- * );
- * }
- *
- * function draw() {
- * // Update x and y if an arrow key is pressed.
- * if (keyIsDown(LEFT_ARROW) === true) {
- * x -= 1;
- * }
- *
- * if (keyIsDown(RIGHT_ARROW) === true) {
- * x += 1;
- * }
- *
- * if (keyIsDown(UP_ARROW) === true) {
- * y -= 1;
- * }
- *
- * if (keyIsDown(DOWN_ARROW) === true) {
- * y += 1;
- * }
- *
- * // Style the circle.
- * fill(0);
- *
- * // Draw the circle.
- * circle(x, y, 5);
- * }
- *
- *
- * // Click on the canvas to begin detecting key presses.
- *
- * let x = 50;
- * let y = 50;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * describe(
- * 'A gray square with a black circle at its center. The circle moves when the user presses an arrow key. It leaves a trail as it moves.'
- * );
- * }
- *
- * function draw() {
- * // Update x and y if an arrow key is pressed.
- * if (keyIsDown(37) === true) {
- * x -= 1;
- * }
- *
- * if (keyIsDown(39) === true) {
- * x += 1;
- * }
- *
- * if (keyIsDown(38) === true) {
- * y -= 1;
- * }
- *
- * if (keyIsDown(40) === true) {
- * y += 1;
- * }
- *
- * // Style the circle.
- * fill(0);
- *
- * // Draw the circle.
- * circle(x, y, 5);
- * }
- *
- *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * let x = 50;
+ * let y = 50;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * describe(
+ * 'A gray square with a black circle at its center. The circle moves when the user presses an arrow key. It leaves a trail as it moves.'
+ * );
+ * }
+ *
+ * function draw() {
+ * // Update x and y if an arrow key is pressed.
+ * if (keyIsDown(LEFT_ARROW) === true) {
+ * x -= 1;
+ * }
+ *
+ * if (keyIsDown(RIGHT_ARROW) === true) {
+ * x += 1;
+ * }
+ *
+ * if (keyIsDown(UP_ARROW) === true) {
+ * y -= 1;
+ * }
+ *
+ * if (keyIsDown(DOWN_ARROW) === true) {
+ * y += 1;
+ * }
+ *
+ * // Style the circle.
+ * fill(0);
+ *
+ * // Draw the circle.
+ * circle(x, y, 5);
+ * }
+ *
+ *
+ * // Click on the canvas to begin detecting key presses.
+ *
+ * let x = 50;
+ * let y = 50;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * describe(
+ * 'A gray square with a black circle at its center. The circle moves when the user presses an arrow key. It leaves a trail as it moves.'
+ * );
+ * }
+ *
+ * function draw() {
+ * // Update x and y if an arrow key is pressed.
+ * if (keyIsDown('ArrowLeft') === true) {
+ * x -= 1;
+ * }
+ *
+ * if (keyIsDown('ArrowRight') === true) {
+ * x += 1;
+ * }
+ *
+ * if (keyIsDown('ArrowUp') === true) {
+ * y -= 1;
+ * }
+ *
+ * if (keyIsDown('ArrowDown') === true) {
+ * y += 1;
+ * }
+ *
+ * // Style the circle.
+ * fill(0);
+ *
+ * // Draw the circle.
+ * circle(x, y, 5);
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square. The text ">>" appears when the user moves the mouse to the right. The text "<<" appears when the user moves the mouse to the left.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display >> when movedX is positive and
- * // << when it's negative.
- * if (movedX > 0) {
- * text('>>', 50, 50);
- * } else if (movedX < 0) {
- * text('<<', 50, 50);
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square. The text "▲" appears when the user moves the mouse upward. The text "▼" appears when the user moves the mouse downward.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display ▼ when movedY is positive and
- * // ▲ when it's negative.
- * if (movedY > 0) {
- * text('▼', 50, 50);
- * } else if (movedY < 0) {
- * text('▲', 50, 50);
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe("A vertical black line moves left and right following the mouse's x-position.");
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw a vertical line that follows the mouse's x-coordinate.
- * line(mouseX, 0, mouseX, 100);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe("A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.");
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display the mouse's coordinates.
- * text(`x: ${mouseX} y: ${mouseY}`, 50, 50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe("A vertical black line moves left and right following the mouse's x-position.");
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Adjust coordinates for WebGL mode.
- * // The origin (0, 0) is at the center of the canvas.
- * let mx = mouseX - 50;
- *
- * // Draw the line.
- * line(mx, -50, mx, 50);
- * }
- *
- *
- * let font;
- *
- * // Load a font for WebGL mode.
- * function preload() {
- * font = loadFont('assets/inconsolata.otf');
- * }
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe(
- * "A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse."
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- * textFont(font);
- * fill(0);
- *
- * // Display the mouse's coordinates.
- * text(`x: ${mouseX} y: ${mouseY}`, 0, 0);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe("A horizontal black line moves up and down following the mouse's y-position.");
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw a horizontal line that follows the mouse's y-coordinate.
- * line(0, mouseY, 100, mouseY);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe("A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.");
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display the mouse's coordinates.
- * text(`x: ${mouseX} y: ${mouseY}`, 50, 50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe("A horizontal black line moves up and down following the mouse's y-position.");
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Adjust coordinates for WebGL mode.
- * // The origin (0, 0) is at the center of the canvas.
- * let my = mouseY - 50;
- *
- * // Draw the line.
- * line(-50, my, 50, my);
- * }
- *
- *
- * let font;
- *
- * // Load a font for WebGL mode.
- * function preload() {
- * font = loadFont('assets/inconsolata.otf');
- * }
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe(
- * "A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse."
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- * textFont(font);
- * fill(0);
- *
- * // Display the mouse's coordinates.
- * text(`x: ${mouseX} y: ${mouseY}`, 0, 0);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Slow the frame rate.
- * frameRate(10);
- *
- * describe('A line follows the mouse as it moves. The line grows longer with faster movements.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * line(pmouseX, pmouseY, mouseX, mouseY);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A line follows the mouse as it moves. The line grows longer with faster movements.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Adjust coordinates for WebGL mode.
- * // The origin (0, 0) is at the center of the canvas.
- * let pmx = pmouseX - 50;
- * let pmy = pmouseY - 50;
- * let mx = mouseX - 50;
- * let my = mouseY - 50;
- *
- * // Draw the line.
- * line(pmx, pmy, mx, my);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Slow the frame rate.
- * frameRate(10);
- *
- * describe('A line follows the mouse as it moves. The line grows longer with faster movements.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * line(pmouseX, pmouseY, mouseX, mouseY);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100, WEBGL);
- *
- * describe('A line follows the mouse as it moves. The line grows longer with faster movements.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Adjust coordinates for WebGL mode.
- * // The origin (0, 0) is at the center of the canvas.
- * let pmx = pmouseX - 50;
- * let pmy = pmouseY - 50;
- * let mx = mouseX - 50;
- * let my = mouseY - 50;
- *
- * // Draw the line.
- * line(pmx, pmy, mx, my);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe("A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.");
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display the mouse's coordinates within the browser window.
- * text(`x: ${winMouseX} y: ${winMouseY}`, 50, 50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe("A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.");
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display the mouse's coordinates within the browser window.
- * text(`x: ${winMouseX} y: ${winMouseY}`, 50, 50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Slow the frame rate.
- * frameRate(10);
- *
- * describe('A gray square. A white circle at its center grows larger when the mouse moves horizontally.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Calculate the circle's diameter.
- * let d = winMouseX - pwinMouseX;
- *
- * // Draw the circle.
- * circle(50, 50, d);
- * }
- *
- *
- * function setup() {
- * // Create the canvas and set its position.
- * let cnv = createCanvas(100, 100);
- * cnv.position(20, 20);
- *
- * describe('A gray square with a number at its center. The number changes as the user moves the mouse vertically.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display pwinMouseX.
- * text(pwinMouseX, 50, 50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Slow the frame rate.
- * frameRate(10);
- *
- * describe('A gray square. A white circle at its center grows larger when the mouse moves vertically.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Calculate the circle's diameter.
- * let d = winMouseY - pwinMouseY;
- *
- * // Draw the circle.
- * circle(50, 50, d);
- * }
- *
- *
- * function setup() {
- * // Create the canvas and set its position.
- * let cnv = createCanvas(100, 100);
- * cnv.position(20, 20);
- *
- * describe('A gray square with a number at its center. The number changes as the user moves the mouse vertically.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display pwinMouseY.
- * text(pwinMouseY, 50, 50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with black text at its center. The text changes from 0 to either "left" or "right" when the user clicks a mouse button.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display the mouse button.
- * text(mouseButton, 50, 50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * "A gray square. Different shapes appear at its center depending on the mouse button that's clicked."
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * if (mouseIsPressed === true) {
- * if (mouseButton === LEFT) {
- * circle(50, 50, 50);
- * }
- * if (mouseButton === RIGHT) {
- * square(25, 25, 50);
- * }
- * if (mouseButton === CENTER) {
- * triangle(23, 75, 50, 20, 78, 75);
- * }
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with the word "false" at its center. The word changes to "true" when the user presses a mouse button.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display the mouseIsPressed variable.
- * text(mouseIsPressed, 25, 50);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a white square at its center. The inner square turns black when the user presses the mouse.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * if (mouseIsPressed === true) {
- * fill(0);
- * } else {
- * fill(255);
- * }
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square becomes lighter as the mouse moves.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * function mouseMoved() {
- * // Update the grayscale value.
- * value += 5;
- *
- * // Reset the grayscale value.
- * if (value > 255) {
- * value = 0;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square becomes lighter as the user drags the mouse.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * function mouseDragged() {
- * // Update the grayscale value.
- * value += 5;
- *
- * // Reset the grayscale value.
- * if (value > 255) {
- * value = 0;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square becomes lighter when the user presses a mouse button.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * function mousePressed() {
- * // Update the grayscale value.
- * value += 5;
- *
- * // Reset the grayscale value.
- * if (value > 255) {
- * value = 0;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Style the circle.
- * fill('orange');
- * stroke('royalblue');
- * strokeWeight(10);
- *
- * describe(
- * 'An orange circle with a thick, blue border drawn on a gray background. When the user presses and holds the mouse, the border becomes thin and pink. When the user releases the mouse, the border becomes thicker and changes color to blue.'
- * );
- * }
- *
- * function draw() {
- * background(220);
- *
- * // Draw the circle.
- * circle(50, 50, 20);
- * }
- *
- * // Set the stroke color and weight as soon as the user clicks.
- * function mousePressed() {
- * stroke('deeppink');
- * strokeWeight(3);
- * }
- *
- * // Set the stroke and fill colors as soon as the user releases
- * // the mouse.
- * function mouseReleased() {
- * stroke('royalblue');
- *
- * // This is never visible because fill() is called
- * // in mouseClicked() which runs immediately after
- * // mouseReleased();
- * fill('limegreen');
- * }
- *
- * // Set the fill color and stroke weight after
- * // mousePressed() and mouseReleased() are called.
- * function mouseClicked() {
- * fill('orange');
- * strokeWeight(10);
- * }
- *
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square becomes lighter when the user presses and releases a mouse button.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * function mouseReleased() {
- * // Update the grayscale value.
- * value += 5;
- *
- * // Reset the grayscale value.
- * if (value > 255) {
- * value = 0;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Style the circle.
- * fill('orange');
- * stroke('royalblue');
- * strokeWeight(10);
- *
- * describe(
- * 'An orange circle with a thick, blue border drawn on a gray background. When the user presses and holds the mouse, the border becomes thin and pink. When the user releases the mouse, the border becomes thicker and changes color to blue.'
- * );
- * }
- *
- * function draw() {
- * background(220);
- *
- * // Draw the circle.
- * circle(50, 50, 20);
- * }
- *
- * // Set the stroke color and weight as soon as the user clicks.
- * function mousePressed() {
- * stroke('deeppink');
- * strokeWeight(3);
- * }
- *
- * // Set the stroke and fill colors as soon as the user releases
- * // the mouse.
- * function mouseReleased() {
- * stroke('royalblue');
- *
- * // This is never visible because fill() is called
- * // in mouseClicked() which runs immediately after
- * // mouseReleased();
- * fill('limegreen');
- * }
- *
- * // Set the fill color and stroke weight after
- * // mousePressed() and mouseReleased() are called.
- * function mouseClicked() {
- * fill('orange');
- * strokeWeight(10);
- * }
- *
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square changes color when the user presses and releases a mouse button.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * // Toggle the square's color when the user clicks.
- * function mouseClicked() {
- * if (value === 0) {
- * value = 255;
- * } else {
- * value = 0;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Style the circle.
- * fill('orange');
- * stroke('royalblue');
- * strokeWeight(10);
- *
- * describe(
- * 'An orange circle with a thick, blue border drawn on a gray background. When the user presses and holds the mouse, the border becomes thin and pink. When the user releases the mouse, the border becomes thicker and changes color to blue.'
- * );
- * }
- *
- * function draw() {
- * background(220);
- *
- * // Draw the circle.
- * circle(50, 50, 20);
- * }
- *
- * // Set the stroke color and weight as soon as the user clicks.
- * function mousePressed() {
- * stroke('deeppink');
- * strokeWeight(3);
- * }
- *
- * // Set the stroke and fill colors as soon as the user releases
- * // the mouse.
- * function mouseReleased() {
- * stroke('royalblue');
- *
- * // This is never visible because fill() is called
- * // in mouseClicked() which runs immediately after
- * // mouseReleased();
- * fill('limegreen');
- * }
- *
- * // Set the fill color and stroke weight after
- * // mousePressed() and mouseReleased() are called.
- * function mouseClicked() {
- * fill('orange');
- * strokeWeight(10);
- * }
- *
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square changes color when the user double-clicks.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * // Toggle the square's color when the user double-clicks.
- * function doubleClicked() {
- * if (value === 0) {
- * value = 255;
- * } else {
- * value = 0;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black circle at its center. When the user double-clicks on the circle, it changes color to white.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the circle.
- * fill(value);
- *
- * // Draw the circle.
- * circle(50, 50, 80);
- * }
- *
- * // Reassign value to 255 when the user double-clicks on the circle.
- * function doubleClicked() {
- * if (dist(50, 50, mouseX, mouseY) < 40) {
- * value = 255;
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * let circleSize = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square. A white circle at its center grows up when the user scrolls the mouse wheel.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw the circle
- * circle(circleSize, 50, 50);
- * }
- *
- * // Increment circleSize when the user scrolls the mouse wheel.
- * function mouseWheel() {
- * circleSize += 1;
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * let direction = '';
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square. An arrow at its center points up when the user scrolls up. The arrow points down when the user scrolls down.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Draw an arrow that points where
- * // the mouse last scrolled.
- * text(direction, 50, 50);
- * }
- *
- * // Change direction when the user scrolls the mouse wheel.
- * function mouseWheel(event) {
- * if (event.delta > 0) {
- * direction = '▲';
- * } else {
- * direction = '▼';
- * }
- * // Uncomment to prevent any default behavior.
- * // return false;
- * }
- *
- *
- * let score = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with the text "Score: X" at its center. The score increases when the user moves the mouse upward. It decreases when the user moves the mouse downward.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Update the score.
- * score -= movedY;
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Display the score.
- * text(`Score: ${score}`, 50, 50);
- * }
- *
- * // Lock the pointer when the user double-clicks.
- * function doubleClicked() {
- * requestPointerLock();
- * }
- *
- *
- * let isLocked = false;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a word at its center. The word changes between "Unlocked" and "Locked" when the user double-clicks.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- *
- * // Tell the user whether the pointer is locked.
- * if (isLocked === true) {
- * text('Locked', 50, 50);
- * } else {
- * text('Unlocked', 50, 50);
- * }
- * }
- *
- * // Toggle the pointer lock when the user double-clicks.
- * function doubleClicked() {
- * if (isLocked === true) {
- * exitPointerLock();
- * isLocked = false;
- * } else {
- * requestPointerLock();
- * isLocked = true;
- * }
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square. The text ">>" appears when the user moves the mouse to the right. The text "<<" appears when the user moves the mouse to the left.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display >> when movedX is positive and
+ * // << when it's negative.
+ * if (movedX > 0) {
+ * text('>>', 50, 50);
+ * } else if (movedX < 0) {
+ * text('<<', 50, 50);
+ * }
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square. The text "▲" appears when the user moves the mouse upward. The text "▼" appears when the user moves the mouse downward.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display ▼ when movedY is positive and
+ * // ▲ when it's negative.
+ * if (movedY > 0) {
+ * text('▼', 50, 50);
+ * } else if (movedY < 0) {
+ * text('▲', 50, 50);
+ * }
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe("A vertical black line moves left and right following the mouse's x-position.");
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw a vertical line that follows the mouse's x-coordinate.
+ * line(mouseX, 0, mouseX, 100);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe("A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.");
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the mouse's coordinates.
+ * text(`x: ${int(mouseX)} y: ${int(mouseY)}`, 50, 50);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe("A vertical black line moves left and right following the mouse's x-position.");
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Adjust coordinates for WebGL mode.
+ * // The origin (0, 0) is at the center of the canvas.
+ * let mx = mouseX - 50;
+ *
+ * // Draw the line.
+ * line(mx, -50, mx, 50);
+ * }
+ *
+ *
+ * let font;
+ *
+ * async function setup() {
+ * // Load a font for WebGL mode.
+ * font = await loadFont('assets/inconsolata.otf');
+ *
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe(
+ * "A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse."
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ * textFont(font);
+ * fill(0);
+ *
+ * // Display the mouse's coordinates.
+ * text(`x: ${int(mouseX)} y: ${int(mouseY)}`, 0, 0);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe("A horizontal black line moves up and down following the mouse's y-position.");
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw a horizontal line that follows the mouse's y-coordinate.
+ * line(0, mouseY, 100, mouseY);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe("A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.");
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the mouse's coordinates.
+ * text(`x: ${int(mouseX)} y: ${int(mouseY)}`, 50, 50);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe("A horizontal black line moves up and down following the mouse's y-position.");
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Adjust coordinates for WebGL mode.
+ * // The origin (0, 0) is at the center of the canvas.
+ * let my = mouseY - 50;
+ *
+ * // Draw the line.
+ * line(-50, my, 50, my);
+ * }
+ *
+ *
+ * let font;
+ *
+ * async function setup() {
+ * // Load a font for WebGL mode.
+ * font = await loadFont('assets/inconsolata.otf');
+ *
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe(
+ * "A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse."
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ * textFont(font);
+ * fill(0);
+ *
+ * // Display the mouse's coordinates.
+ * text(`x: ${int(mouseX)} y: ${int(mouseY)}`, 0, 0);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Slow the frame rate.
+ * frameRate(10);
+ *
+ * describe('A line follows the mouse as it moves. The line grows longer with faster movements.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * line(pmouseX, pmouseY, mouseX, mouseY);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A line follows the mouse as it moves. The line grows longer with faster movements.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Adjust coordinates for WebGL mode.
+ * // The origin (0, 0) is at the center of the canvas.
+ * let pmx = pmouseX - 50;
+ * let pmy = pmouseY - 50;
+ * let mx = mouseX - 50;
+ * let my = mouseY - 50;
+ *
+ * // Draw the line.
+ * line(pmx, pmy, mx, my);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Slow the frame rate.
+ * frameRate(10);
+ *
+ * describe('A line follows the mouse as it moves. The line grows longer with faster movements.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * line(pmouseX, pmouseY, mouseX, mouseY);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100, WEBGL);
+ *
+ * describe('A line follows the mouse as it moves. The line grows longer with faster movements.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Adjust coordinates for WebGL mode.
+ * // The origin (0, 0) is at the center of the canvas.
+ * let pmx = pmouseX - 50;
+ * let pmy = pmouseY - 50;
+ * let mx = mouseX - 50;
+ * let my = mouseY - 50;
+ *
+ * // Draw the line.
+ * line(pmx, pmy, mx, my);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe("A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.");
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the mouse's coordinates within the browser window.
+ * text(`x: ${int(winMouseX)} y: ${int(winMouseY)}`, 50, 50);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe("A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.");
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the mouse's coordinates within the browser window.
+ * text(`x: ${int(winMouseX)} y: ${int(winMouseY)}`, 50, 50);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Slow the frame rate.
+ * frameRate(10);
+ *
+ * describe('A gray square. A white circle at its center grows larger when the mouse moves horizontally.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Calculate the circle's diameter.
+ * let d = winMouseX - pwinMouseX;
+ *
+ * // Draw the circle.
+ * circle(50, 50, d);
+ * }
+ *
+ *
+ * function setup() {
+ * // Create the canvas and set its position.
+ * let cnv = createCanvas(100, 100);
+ * cnv.position(20, 20);
+ *
+ * describe('A gray square with a number at its center. The number changes as the user moves the mouse vertically.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display pwinMouseX.
+ * text(pwinMouseX, 50, 50);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Slow the frame rate.
+ * frameRate(10);
+ *
+ * describe('A gray square. A white circle at its center grows larger when the mouse moves vertically.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Calculate the circle's diameter.
+ * let d = winMouseY - pwinMouseY;
+ *
+ * // Draw the circle.
+ * circle(50, 50, d);
+ * }
+ *
+ *
+ * function setup() {
+ * // Create the canvas and set its position.
+ * let cnv = createCanvas(100, 100);
+ * cnv.position(20, 20);
+ *
+ * describe('A gray square with a number at its center. The number changes as the user moves the mouse vertically.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display pwinMouseY.
+ * text(pwinMouseY, 50, 50);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(200, 200);
+ *
+ * describe(
+ * 'A gray square with black text at its center. The text changes from 0 to either "left" or "right" when the user clicks a mouse button.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER, CENTER);
+ * textSize(16);
+ *
+ * // Display the mouse button.
+ * text(`Left: ${mouseButton.left}`, width / 2, height / 2 - 20);
+ * text(`Right: ${mouseButton.right}`, width / 2, height / 2);
+ * text(`Center: ${mouseButton.center}`, width / 2, height / 2 + 20);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * "A gray square. Different shapes appear at its center depending on the mouse button that's clicked."
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * if (mouseIsPressed === true) {
+ * if (mouseButton.left) {
+ * circle(50, 50, 50);
+ * }
+ * if (mouseButton.right) {
+ * square(25, 25, 50);
+ * }
+ * if (mouseButton.center) {
+ * triangle(23, 75, 50, 20, 78, 75);
+ * }
+ * }
+ * }
+ *
+ *
+ * // On a touchscreen device, touch the canvas using one or more fingers
+ * // at the same time.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square. White circles appear where the user touches the square.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw a circle at each touch point.
+ * for (let touch of touches) {
+ * circle(touch.x, touch.y, 40);
+ * }
+ * }
+ *
+ *
+ * // On a touchscreen device, touch the canvas using one or more fingers
+ * // at the same time.
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square. Labels appear where the user touches the square, displaying the coordinates.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw a label above each touch point.
+ * for (let touch of touches) {
+ * text(`${touch.x}, ${touch.y}`, touch.x, touch.y - 40);
+ * }
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with the word "false" at its center. The word changes to "true" when the user presses a mouse button.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the mouseIsPressed variable.
+ * text(mouseIsPressed, 25, 50);
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a white square at its center. The inner square turns black when the user presses the mouse.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * if (mouseIsPressed === true) {
+ * fill(0);
+ * } else {
+ * fill(255);
+ * }
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a black square at its center. The inner square becomes lighter as the mouse moves.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * function mouseMoved() {
+ * // Update the grayscale value.
+ * value += 5;
+ *
+ * // Reset the grayscale value.
+ * if (value > 255) {
+ * value = 0;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a black square at its center. The inner square becomes lighter as the user drags the mouse.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * function mouseDragged() {
+ * // Update the grayscale value.
+ * value += 5;
+ *
+ * // Reset the grayscale value.
+ * if (value > 255) {
+ * value = 0;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a black square at its center. The inner square becomes lighter when the user presses a mouse button.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * function mousePressed() {
+ * // Update the grayscale value.
+ * value += 5;
+ *
+ * // Reset the grayscale value.
+ * if (value > 255) {
+ * value = 0;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Style the circle.
+ * fill('orange');
+ * stroke('royalblue');
+ * strokeWeight(10);
+ *
+ * describe(
+ * 'An orange circle with a thick, blue border drawn on a gray background. When the user presses and holds the mouse, the border becomes thin and pink. When the user releases the mouse, the border becomes thicker and changes color to blue.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(220);
+ *
+ * // Draw the circle.
+ * circle(50, 50, 20);
+ * }
+ *
+ * // Set the stroke color and weight as soon as the user clicks.
+ * function mousePressed() {
+ * stroke('deeppink');
+ * strokeWeight(3);
+ * }
+ *
+ * // Set the stroke and fill colors as soon as the user releases
+ * // the mouse.
+ * function mouseReleased() {
+ * stroke('royalblue');
+ *
+ * // This is never visible because fill() is called
+ * // in mouseClicked() which runs immediately after
+ * // mouseReleased();
+ * fill('limegreen');
+ * }
+ *
+ * // Set the fill color and stroke weight after
+ * // mousePressed() and mouseReleased() are called.
+ * function mouseClicked() {
+ * fill('orange');
+ * strokeWeight(10);
+ * }
+ *
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a black square at its center. The inner square becomes lighter when the user presses and releases a mouse button.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * function mouseReleased() {
+ * // Update the grayscale value.
+ * value += 5;
+ *
+ * // Reset the grayscale value.
+ * if (value > 255) {
+ * value = 0;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Style the circle.
+ * fill('orange');
+ * stroke('royalblue');
+ * strokeWeight(10);
+ *
+ * describe(
+ * 'An orange circle with a thick, blue border drawn on a gray background. When the user presses and holds the mouse, the border becomes thin and pink. When the user releases the mouse, the border becomes thicker and changes color to blue.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(220);
+ *
+ * // Draw the circle.
+ * circle(50, 50, 20);
+ * }
+ *
+ * // Set the stroke color and weight as soon as the user clicks.
+ * function mousePressed() {
+ * stroke('deeppink');
+ * strokeWeight(3);
+ * }
+ *
+ * // Set the stroke and fill colors as soon as the user releases
+ * // the mouse.
+ * function mouseReleased() {
+ * stroke('royalblue');
+ *
+ * // This is never visible because fill() is called
+ * // in mouseClicked() which runs immediately after
+ * // mouseReleased();
+ * fill('limegreen');
+ * }
+ *
+ * // Set the fill color and stroke weight after
+ * // mousePressed() and mouseReleased() are called.
+ * function mouseClicked() {
+ * fill('orange');
+ * strokeWeight(10);
+ * }
+ *
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a black square at its center. The inner square changes color when the user presses and releases a mouse button.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * // Toggle the square's color when the user clicks.
+ * function mouseClicked() {
+ * if (value === 0) {
+ * value = 255;
+ * } else {
+ * value = 0;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Style the circle.
+ * fill('orange');
+ * stroke('royalblue');
+ * strokeWeight(10);
+ *
+ * describe(
+ * 'An orange circle with a thick, blue border drawn on a gray background. When the user presses and holds the mouse, the border becomes thin and pink. When the user releases the mouse, the border becomes thicker and changes color to blue.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(220);
+ *
+ * // Draw the circle.
+ * circle(50, 50, 20);
+ * }
+ *
+ * // Set the stroke color and weight as soon as the user clicks.
+ * function mousePressed() {
+ * stroke('deeppink');
+ * strokeWeight(3);
+ * }
+ *
+ * // Set the stroke and fill colors as soon as the user releases
+ * // the mouse.
+ * function mouseReleased() {
+ * stroke('royalblue');
+ *
+ * // This is never visible because fill() is called
+ * // in mouseClicked() which runs immediately after
+ * // mouseReleased();
+ * fill('limegreen');
+ * }
+ *
+ * // Set the fill color and stroke weight after
+ * // mousePressed() and mouseReleased() are called.
+ * function mouseClicked() {
+ * fill('orange');
+ * strokeWeight(10);
+ * }
+ *
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a black square at its center. The inner square changes color when the user double-clicks.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the square.
+ * fill(value);
+ *
+ * // Draw the square.
+ * square(25, 25, 50);
+ * }
+ *
+ * // Toggle the square's color when the user double-clicks.
+ * function doubleClicked() {
+ * if (value === 0) {
+ * value = 255;
+ * } else {
+ * value = 0;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * let value = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a black circle at its center. When the user double-clicks on the circle, it changes color to white.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the circle.
+ * fill(value);
+ *
+ * // Draw the circle.
+ * circle(50, 50, 80);
+ * }
+ *
+ * // Reassign value to 255 when the user double-clicks on the circle.
+ * function doubleClicked() {
+ * if (dist(50, 50, mouseX, mouseY) < 40) {
+ * value = 255;
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * let circleSize = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square. A white circle at its center grows up when the user scrolls the mouse wheel.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Draw the circle
+ * circle(circleSize, 50, 50);
+ * }
+ *
+ * // Increment circleSize when the user scrolls the mouse wheel.
+ * function mouseWheel() {
+ * circleSize += 1;
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * let direction = '';
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square. An arrow at its center points up when the user scrolls up. The arrow points down when the user scrolls down.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Draw an arrow that points where
+ * // the mouse last scrolled.
+ * text(direction, 50, 50);
+ * }
+ *
+ * // Change direction when the user scrolls the mouse wheel.
+ * function mouseWheel(event) {
+ * if (event.delta > 0) {
+ * direction = '▲';
+ * } else {
+ * direction = '▼';
+ * }
+ * // Uncomment to prevent any default behavior.
+ * // return false;
+ * }
+ *
+ *
+ * let score = 0;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with the text "Score: X" at its center. The score increases when the user moves the mouse upward. It decreases when the user moves the mouse downward.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Update the score.
+ * score -= movedY;
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Display the score.
+ * text(`Score: ${score}`, 50, 50);
+ * }
+ *
+ * // Lock the pointer when the user double-clicks.
+ * function doubleClicked() {
+ * requestPointerLock();
+ * }
+ *
+ *
+ * let isLocked = false;
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe(
+ * 'A gray square with a word at its center. The word changes between "Unlocked" and "Locked" when the user double-clicks.'
+ * );
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the text.
+ * textAlign(CENTER);
+ * textSize(16);
+ *
+ * // Tell the user whether the pointer is locked.
+ * if (isLocked === true) {
+ * text('Locked', 50, 50);
+ * } else {
+ * text('Unlocked', 50, 50);
+ * }
+ * }
+ *
+ * // Toggle the pointer lock when the user double-clicks.
+ * function doubleClicked() {
+ * if (isLocked === true) {
+ * exitPointerLock();
+ * isLocked = false;
+ * } else {
+ * requestPointerLock();
+ * isLocked = true;
+ * }
+ * }
+ *
+ *
- * // On a touchscreen device, touch the canvas using one or more fingers
- * // at the same time.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square. White circles appear where the user touches the square.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw a circle at each touch point.
- * for (let touch of touches) {
- * circle(touch.x, touch.y, 40);
- * }
- * }
- *
- *
- * // On a touchscreen device, touch the canvas using one or more fingers
- * // at the same time.
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square. Labels appear where the user touches the square, displaying the coordinates.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Draw a label above each touch point.
- * for (let touch of touches) {
- * text(`${touch.x}, ${touch.y}`, touch.x, touch.y - 40);
- * }
- * }
- *
- *
- * // On a touchscreen device, touch the canvas using one or more fingers
- * // at the same time.
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square switches color between black and white each time the user touches the screen.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * // Toggle colors with each touch.
- * function touchStarted() {
- * if (value === 0) {
- * value = 255;
- * } else {
- * value = 0;
- * }
- * }
- *
- *
- * // On a touchscreen device, touch the canvas using one or more fingers
- * // at the same time.
- *
- * let bgColor = 50;
- * let fillColor = 255;
- * let borderWidth = 0.5;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with the number 0 at the top-center. The number tracks the number of places the user is touching the screen. Circles appear at each touch point and change style in response to events.'
- * );
- * }
- *
- * function draw() {
- * background(bgColor);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- * fill(0);
- * noStroke();
- *
- * // Display the number of touch points.
- * text(touches.length, 50, 20);
- *
- * // Style the touch points.
- * fill(fillColor);
- * stroke(0);
- * strokeWeight(borderWidth);
- *
- * // Display the touch points as circles.
- * for (let touch of touches) {
- * circle(touch.x, touch.y, 40);
- * }
- * }
- *
- * // Set the background color to a random grayscale value.
- * function touchStarted() {
- * bgColor = random(80, 255);
- * }
- *
- * // Set the fill color to a random grayscale value.
- * function touchEnded() {
- * fillColor = random(0, 255);
- * }
- *
- * // Set the stroke weight.
- * function touchMoved() {
- * // Increment the border width.
- * borderWidth += 0.1;
- *
- * // Reset the border width once it's too thick.
- * if (borderWidth > 20) {
- * borderWidth = 0.5;
- * }
- * }
- *
- *
- * // On a touchscreen device, touch the canvas using one or more fingers
- * // at the same time.
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square becomes lighter when the user touches the screen and moves.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * function touchMoved() {
- * // Update the grayscale value.
- * value += 5;
- *
- * // Reset the grayscale value.
- * if (value > 255) {
- * value = 0;
- * }
- * }
- *
- *
- * // On a touchscreen device, touch the canvas using one or more fingers
- * // at the same time.
- *
- * let bgColor = 50;
- * let fillColor = 255;
- * let borderWidth = 0.5;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with the number 0 at the top-center. The number tracks the number of places the user is touching the screen. Circles appear at each touch point and change style in response to events.'
- * );
- * }
- *
- * function draw() {
- * background(bgColor);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- * fill(0);
- * noStroke();
- *
- * // Display the number of touch points.
- * text(touches.length, 50, 20);
- *
- * // Style the touch points.
- * fill(fillColor);
- * stroke(0);
- * strokeWeight(borderWidth);
- *
- * // Display the touch points as circles.
- * for (let touch of touches) {
- * circle(touch.x, touch.y, 40);
- * }
- * }
- *
- * // Set the background color to a random grayscale value.
- * function touchStarted() {
- * bgColor = random(80, 255);
- * }
- *
- * // Set the fill color to a random grayscale value.
- * function touchEnded() {
- * fillColor = random(0, 255);
- * }
- *
- * // Set the stroke weight.
- * function touchMoved() {
- * // Increment the border width.
- * borderWidth += 0.1;
- *
- * // Reset the border width once it's too thick.
- * if (borderWidth > 20) {
- * borderWidth = 0.5;
- * }
- * }
- *
- *
- * // On a touchscreen device, touch the canvas using one or more fingers
- * // at the same time.
- *
- * let value = 0;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with a black square at its center. The inner square switches color between black and white each time the user stops touching the screen.'
- * );
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the square.
- * fill(value);
- *
- * // Draw the square.
- * square(25, 25, 50);
- * }
- *
- * // Toggle colors when a touch ends.
- * function touchEnded() {
- * if (value === 0) {
- * value = 255;
- * } else {
- * value = 0;
- * }
- * }
- *
- *
- * // On a touchscreen device, touch the canvas using one or more fingers
- * // at the same time.
- *
- * let bgColor = 50;
- * let fillColor = 255;
- * let borderWidth = 0.5;
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe(
- * 'A gray square with the number 0 at the top-center. The number tracks the number of places the user is touching the screen. Circles appear at each touch point and change style in response to events.'
- * );
- * }
- *
- * function draw() {
- * background(bgColor);
- *
- * // Style the text.
- * textAlign(CENTER);
- * textSize(16);
- * fill(0);
- * noStroke();
- *
- * // Display the number of touch points.
- * text(touches.length, 50, 20);
- *
- * // Style the touch points.
- * fill(fillColor);
- * stroke(0);
- * strokeWeight(borderWidth);
- *
- * // Display the touch points as circles.
- * for (let touch of touches) {
- * circle(touch.x, touch.y, 40);
- * }
- * }
- *
- * // Set the background color to a random grayscale value.
- * function touchStarted() {
- * bgColor = random(80, 255);
- * }
- *
- * // Set the fill color to a random grayscale value.
- * function touchEnded() {
- * fillColor = random(0, 255);
- * }
- *
- * // Set the stroke weight.
- * function touchMoved() {
- * // Increment the border width.
- * borderWidth += 0.1;
- *
- * // Reset the border width once it's too thick.
- * if (borderWidth > 20) {
- * borderWidth = 0.5;
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Image object.
- * let img = createImage(66, 66);
- *
- * // Load the image's pixels into memory.
- * img.loadPixels();
- *
- * // Set all the image's pixels to black.
- * for (let x = 0; x < img.width; x += 1) {
- * for (let y = 0; y < img.height; y += 1) {
- * img.set(x, y, 0);
- * }
- * }
- *
- * // Update the image's pixel values.
- * img.updatePixels();
- *
- * // Draw the image.
- * image(img, 17, 17);
- *
- * describe('A black square drawn in the middle of a gray square.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Image object.
- * let img = createImage(66, 66);
- *
- * // Load the image's pixels into memory.
- * img.loadPixels();
- *
- * // Create a color gradient.
- * for (let x = 0; x < img.width; x += 1) {
- * for (let y = 0; y < img.height; y += 1) {
- * // Calculate the transparency.
- * let a = map(x, 0, img.width, 0, 255);
- *
- * // Create a p5.Color object.
- * let c = color(0, a);
- *
- * // Set the pixel's color.
- * img.set(x, y, c);
- * }
- * }
- *
- * // Update the image's pixels.
- * img.updatePixels();
- *
- * // Display the image.
- * image(img, 17, 17);
- *
- * describe('A square with a horizontal color gradient that transitions from gray to black.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Image object.
- * let img = createImage(66, 66);
- *
- * // Load the pixels into memory.
- * img.loadPixels();
- * // Get the current pixel density.
- * let d = pixelDensity();
- *
- * // Calculate the pixel that is halfway through the image's pixel array.
- * let halfImage = 4 * (d * img.width) * (d * img.height / 2);
- *
- * // Set half of the image's pixels to black.
- * for (let i = 0; i < halfImage; i += 4) {
- * // Red.
- * img.pixels[i] = 0;
- * // Green.
- * img.pixels[i + 1] = 0;
- * // Blue.
- * img.pixels[i + 2] = 0;
- * // Alpha.
- * img.pixels[i + 3] = 255;
- * }
- *
- * // Update the image's pixels.
- * img.updatePixels();
- *
- * // Display the image.
- * image(img, 17, 17);
- *
- * describe('A black square drawn in the middle of a gray square.');
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Image object.
+ * let img = createImage(66, 66);
+ *
+ * // Load the image's pixels into memory.
+ * img.loadPixels();
+ *
+ * // Set all the image's pixels to black.
+ * for (let x = 0; x < img.width; x += 1) {
+ * for (let y = 0; y < img.height; y += 1) {
+ * img.set(x, y, 0);
+ * }
+ * }
+ *
+ * // Update the image's pixel values.
+ * img.updatePixels();
+ *
+ * // Draw the image.
+ * image(img, 17, 17);
+ *
+ * describe('A black square drawn in the middle of a gray square.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Image object.
+ * let img = createImage(66, 66);
+ *
+ * // Load the image's pixels into memory.
+ * img.loadPixels();
+ *
+ * // Create a color gradient.
+ * for (let x = 0; x < img.width; x += 1) {
+ * for (let y = 0; y < img.height; y += 1) {
+ * // Calculate the transparency.
+ * let a = map(x, 0, img.width, 0, 255);
+ *
+ * // Create a p5.Color object.
+ * let c = color(0, a);
+ *
+ * // Set the pixel's color.
+ * img.set(x, y, c);
+ * }
+ * }
+ *
+ * // Update the image's pixels.
+ * img.updatePixels();
+ *
+ * // Display the image.
+ * image(img, 17, 17);
+ *
+ * describe('A square with a horizontal color gradient that transitions from gray to black.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Image object.
+ * let img = createImage(66, 66);
+ *
+ * // Load the pixels into memory.
+ * img.loadPixels();
+ * // Get the current pixel density.
+ * let d = pixelDensity();
+ *
+ * // Calculate the pixel that is halfway through the image's pixel array.
+ * let halfImage = 4 * (d * img.width) * (d * img.height / 2);
+ *
+ * // Set half of the image's pixels to black.
+ * for (let i = 0; i < halfImage; i += 4) {
+ * // Red.
+ * img.pixels[i] = 0;
+ * // Green.
+ * img.pixels[i + 1] = 0;
+ * // Blue.
+ * img.pixels[i + 2] = 0;
+ * // Alpha.
+ * img.pixels[i + 3] = 255;
+ * }
+ *
+ * // Update the image's pixels.
+ * img.updatePixels();
+ *
+ * // Display the image.
+ * image(img, 17, 17);
+ *
+ * describe('A black square drawn in the middle of a gray square.');
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- * background(255);
- *
- * // Save the canvas to 'untitled.png'.
- * saveCanvas();
- *
- * describe('A white square.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(255);
- *
- * // Save the canvas to 'myCanvas.jpg'.
- * saveCanvas('myCanvas.jpg');
- *
- * describe('A white square.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(255);
- *
- * // Save the canvas to 'myCanvas.jpg'.
- * saveCanvas('myCanvas', 'jpg');
- *
- * describe('A white square.');
- * }
- *
- *
- * function setup() {
- * let cnv = createCanvas(100, 100);
- *
- * background(255);
- *
- * // Save the canvas to 'untitled.png'.
- * saveCanvas(cnv);
- *
- * describe('A white square.');
- * }
- *
- *
- * function setup() {
- * let cnv = createCanvas(100, 100);
- *
- * background(255);
- *
- * // Save the canvas to 'myCanvas.jpg'.
- * saveCanvas(cnv, 'myCanvas.jpg');
- *
- * describe('A white square.');
- * }
- *
- *
- * function setup() {
- * let cnv = createCanvas(100, 100);
- *
- * background(255);
- *
- * // Save the canvas to 'myCanvas.jpg'.
- * saveCanvas(cnv, 'myCanvas', 'jpg');
- *
- * describe('A white square.');
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ * background(255);
+ *
+ * // Save the canvas to 'untitled.png'.
+ * saveCanvas();
+ *
+ * describe('A white square.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(255);
+ *
+ * // Save the canvas to 'myCanvas.jpg'.
+ * saveCanvas('myCanvas.jpg');
+ *
+ * describe('A white square.');
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(255);
+ *
+ * // Save the canvas to 'myCanvas.jpg'.
+ * saveCanvas('myCanvas', 'jpg');
+ *
+ * describe('A white square.');
+ * }
+ *
+ *
+ * function setup() {
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(255);
+ *
+ * // Save the canvas to 'untitled.png'.
+ * saveCanvas(cnv);
+ *
+ * describe('A white square.');
+ * }
+ *
+ *
+ * function setup() {
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(255);
+ *
+ * // Save the canvas to 'myCanvas.jpg'.
+ * saveCanvas(cnv, 'myCanvas.jpg');
+ *
+ * describe('A white square.');
+ * }
+ *
+ *
+ * function setup() {
+ * let cnv = createCanvas(100, 100);
+ *
+ * background(255);
+ *
+ * // Save the canvas to 'myCanvas.jpg'.
+ * saveCanvas(cnv, 'myCanvas', 'jpg');
+ *
+ * describe('A white square.');
+ * }
+ *
+ *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A square repeatedly changes color from blue to pink.');
- * }
- *
- * function draw() {
- * let r = frameCount % 255;
- * let g = 50;
- * let b = 100;
- * background(r, g, b);
- * }
- *
- * // Save the frames when the user presses the 's' key.
- * function keyPressed() {
- * if (key === 's') {
- * saveFrames('frame', 'png', 1, 5);
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A square repeatedly changes color from blue to pink.');
- * }
- *
- * function draw() {
- * let r = frameCount % 255;
- * let g = 50;
- * let b = 100;
- * background(r, g, b);
- * }
- *
- * // Print 5 frames when the user presses the mouse.
- * function mousePressed() {
- * saveFrames('frame', 'png', 1, 5, printFrames);
- * }
- *
- * // Prints an array of objects containing raw image data, filenames, and extensions.
- * function printFrames(frames) {
- * for (let frame of frames) {
- * print(frame);
- * }
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A square repeatedly changes color from blue to pink.');
+ * }
+ *
+ * function draw() {
+ * let r = frameCount % 255;
+ * let g = 50;
+ * let b = 100;
+ * background(r, g, b);
+ * }
+ *
+ * // Save the frames when the user presses the 's' key.
+ * function keyPressed() {
+ * if (key === 's') {
+ * saveFrames('frame', 'png', 1, 5);
+ * }
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A square repeatedly changes color from blue to pink.');
+ * }
+ *
+ * function draw() {
+ * let r = frameCount % 255;
+ * let g = 50;
+ * let b = 100;
+ * background(r, g, b);
+ * }
+ *
+ * // Print 5 frames when the user presses the mouse.
+ * function mousePressed() {
+ * saveFrames('frame', 'png', 1, 5, printFrames);
+ * }
+ *
+ * // Prints an array of objects containing raw image data, filenames, and extensions.
+ * function printFrames(frames) {
+ * for (let frame of frames) {
+ * print(frame);
+ * }
+ * }
+ *
+ *
+ * let img;
+ *
+ * // Load the image and create a p5.Image object.
+ * async function setup() {
+ * img = await loadImage('assets/laDefense.jpg');
+ * createCanvas(100, 100);
+ *
+ * // Draw the image.
+ * image(img, 0, 0);
+ *
+ * describe('Image of the underside of a white umbrella and a gridded ceiling.');
+ * }
+ *
+ *
+ * async function setup() {
+ * // Call handleImage() once the image loads.
+ * await loadImage('assets/laDefense.jpg', handleImage);
+ *
+ * describe('Image of the underside of a white umbrella and a gridded ceiling.');
+ * }
+ *
+ * // Display the image.
+ * function handleImage(img) {
+ * image(img, 0, 0);
+ * }
+ *
+ *
+ * async function setup() {
+ * // Call handleImage() once the image loads or
+ * // call handleError() if an error occurs.
+ * await loadImage('assets/laDefense.jpg', handleImage, handleError);
+ * }
+ *
+ * // Display the image.
+ * function handleImage(img) {
+ * image(img, 0, 0);
+ *
+ * describe('Image of the underside of a white umbrella and a gridded ceiling.');
+ * }
+ *
+ * // Log the error.
+ * function handleError(event) {
+ * console.error('Oops!', event);
+ * }
+ *
+ *
- * let img;
- *
- * // Load the image and create a p5.Image object.
- * function preload() {
- * img = loadImage('assets/laDefense.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Draw the image.
- * image(img, 0, 0);
- *
- * describe('Image of the underside of a white umbrella and a gridded ceiling.');
- * }
- *
- *
- * function setup() {
- * // Call handleImage() once the image loads.
- * loadImage('assets/laDefense.jpg', handleImage);
- *
- * describe('Image of the underside of a white umbrella and a gridded ceiling.');
- * }
- *
- * // Display the image.
- * function handleImage(img) {
- * image(img, 0, 0);
- * }
- *
- *
- * function setup() {
- * // Call handleImage() once the image loads or
- * // call handleError() if an error occurs.
- * loadImage('assets/laDefense.jpg', handleImage, handleError);
- * }
- *
- * // Display the image.
- * function handleImage(img) {
- * image(img, 0, 0);
- *
- * describe('Image of the underside of a white umbrella and a gridded ceiling.');
- * }
- *
- * // Log the error.
- * function handleError(event) {
- * console.error('Oops!', event);
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A circle drawn in the middle of a gray square. The circle changes color from black to white, then repeats.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the circle.
- * let c = frameCount % 255;
- * fill(c);
- *
- * // Display the circle.
- * circle(50, 50, 25);
- * }
- *
- * // Save a 5-second gif when the user presses the 's' key.
- * function keyPressed() {
- * if (key === 's') {
- * saveGif('mySketch', 5);
- * }
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * describe('A circle drawn in the middle of a gray square. The circle changes color from black to white, then repeats.');
- * }
- *
- * function draw() {
- * background(200);
- *
- * // Style the circle.
- * let c = frameCount % 255;
- * fill(c);
- *
- * // Display the circle.
- * circle(50, 50, 25);
- * }
- *
- * // Save a 5-second gif when the user presses the 's' key.
- * // Wait 1 second after the key press before recording.
- * function keyPressed() {
- * if (key === 's') {
- * saveGif('mySketch', 5, { delay: 1 });
- * }
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A circle drawn in the middle of a gray square. The circle changes color from black to white, then repeats.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the circle.
+ * let c = frameCount % 255;
+ * fill(c);
+ *
+ * // Display the circle.
+ * circle(50, 50, 25);
+ * }
+ *
+ * // Save a 5-second gif when the user presses the 's' key.
+ * function keyPressed() {
+ * if (key === 's') {
+ * saveGif('mySketch', 5);
+ * }
+ * }
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * describe('A circle drawn in the middle of a gray square. The circle changes color from black to white, then repeats.');
+ * }
+ *
+ * function draw() {
+ * background(200);
+ *
+ * // Style the circle.
+ * let c = frameCount % 255;
+ * fill(c);
+ *
+ * // Display the circle.
+ * circle(50, 50, 25);
+ * }
+ *
+ * // Save a 5-second gif when the user presses the 's' key.
+ * // Wait 1 second after the key press before recording.
+ * function keyPressed() {
+ * if (key === 's') {
+ * saveGif('mySketch', 5, { delay: 1 });
+ * }
+ * }
+ *
+ *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/laDefense.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Draw the image.
- * image(img, 0, 0);
- *
- * describe('An image of the underside of a white umbrella with a gridded ceiling above.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/laDefense.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Draw the image.
- * image(img, 10, 10);
- *
- * describe('An image of the underside of a white umbrella with a gridded ceiling above. The image has dark gray borders on its left and top.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/laDefense.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Draw the image 50x50.
- * image(img, 0, 0, 50, 50);
- *
- * describe('An image of the underside of a white umbrella with a gridded ceiling above. The image is drawn in the top left corner of a dark gray square.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/laDefense.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Draw the center of the image.
- * image(img, 25, 25, 50, 50, 25, 25, 50, 50);
- *
- * describe('An image of a gridded ceiling drawn in the center of a dark gray square.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/moonwalk.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Draw the image and scale it to fit within the canvas.
- * image(img, 0, 0, width, height, 0, 0, img.width, img.height, CONTAIN);
- *
- * describe('An image of an astronaut on the moon. The top and bottom borders of the image are dark gray.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * // Image is 50 x 50 pixels.
- * img = loadImage('assets/laDefense50.png');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(50);
- *
- * // Draw the image and scale it to cover the canvas.
- * image(img, 0, 0, width, height, 0, 0, img.width, img.height, COVER);
- *
- * describe('A pixelated image of the underside of a white umbrella with a gridded ceiling above.');
- * }
- *
- *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/laDefense.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Draw the image.
+ * image(img, 10, 10);
+ *
+ * describe('An image of the underside of a white umbrella with a gridded ceiling above. The image has dark gray borders on its left and top.');
+ * }
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/laDefense.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Draw the image 50x50.
+ * image(img, 0, 0, 50, 50);
+ *
+ * describe('An image of the underside of a white umbrella with a gridded ceiling above. The image is drawn in the top left corner of a dark gray square.');
+ * }
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/laDefense.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Draw the center of the image.
+ * image(img, 25, 25, 50, 50, 25, 25, 50, 50);
+ *
+ * describe('An image of a gridded ceiling drawn in the center of a dark gray square.');
+ * }
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/moonwalk.jpg');
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Draw the image and scale it to fit within the canvas.
+ * image(img, 0, 0, width, height, 0, 0, img.width, img.height, CONTAIN);
+ *
+ * describe('An image of an astronaut on the moon. The top and bottom borders of the image are dark gray.');
+ * }
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/laDefense50.png');
+ *
+ * createCanvas(100, 100);
+ *
+ * background(50);
+ *
+ * // Draw the image and scale it to cover the canvas.
+ * image(img, 0, 0, width, height, 0, 0, img.width, img.height, COVER);
+ *
+ * describe('A pixelated image of the underside of a white umbrella with a gridded ceiling above.');
+ * }
+ *
+ *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/laDefense.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Left image.
- * image(img, 0, 0);
- *
- * // Right image.
- * // Tint with a CSS color string.
- * tint('red');
- * image(img, 50, 0);
- *
- * describe('Two images of an umbrella and a ceiling side-by-side. The image on the right has a red tint.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/laDefense.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Left image.
- * image(img, 0, 0);
- *
- * // Right image.
- * // Tint with RGB values.
- * tint(255, 0, 0);
- * image(img, 50, 0);
- *
- * describe('Two images of an umbrella and a ceiling side-by-side. The image on the right has a red tint.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/laDefense.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Left.
- * image(img, 0, 0);
- *
- * // Right.
- * // Tint with RGBA values.
- * tint(255, 0, 0, 100);
- * image(img, 50, 0);
- *
- * describe('Two images of an umbrella and a ceiling side-by-side. The image on the right has a transparent red tint.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/laDefense.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Left.
- * image(img, 0, 0);
- *
- * // Right.
- * // Tint with grayscale and alpha values.
- * tint(255, 180);
- * image(img, 50, 0);
- *
- * describe('Two images of an umbrella and a ceiling side-by-side. The image on the right is transparent.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/laDefense.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Left.
- * // Tint with a CSS color string.
- * tint('red');
- * image(img, 0, 0);
- *
- * // Right.
- * // Remove the tint.
- * noTint();
- * image(img, 50, 0);
- *
- * describe('Two images of an umbrella and a ceiling side-by-side. The image on the left has a red tint.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use CORNER mode.
- * imageMode(CORNER);
- *
- * // Display the image.
- * image(img, 10, 10, 50, 50);
- *
- * describe('A square image of a brick wall is drawn at the top left of a gray square.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use CORNERS mode.
- * imageMode(CORNERS);
- *
- * // Display the image.
- * image(img, 10, 10, 90, 40);
- *
- * describe('An image of a brick wall is drawn on a gray square. The image is squeezed into a small rectangular area.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Use CENTER mode.
- * imageMode(CENTER);
- *
- * // Display the image.
- * image(img, 50, 50, 80, 80);
- *
- * describe('A square image of a brick wall is drawn on a gray square.');
- * }
- *
- *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/laDefense.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Left image.
+ * image(img, 0, 0);
+ *
+ * // Right image.
+ * // Tint with a CSS color string.
+ * tint('red');
+ * image(img, 50, 0);
+ *
+ * describe('Two images of an umbrella and a ceiling side-by-side. The image on the right has a red tint.');
+ * }
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/laDefense.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Left image.
+ * image(img, 0, 0);
+ *
+ * // Right image.
+ * // Tint with RGB values.
+ * tint(255, 0, 0);
+ * image(img, 50, 0);
+ *
+ * describe('Two images of an umbrella and a ceiling side-by-side. The image on the right has a red tint.');
+ * }
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/laDefense.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Left.
+ * image(img, 0, 0);
+ *
+ * // Right.
+ * // Tint with RGBA values.
+ * tint(255, 0, 0, 100);
+ * image(img, 50, 0);
+ *
+ * describe('Two images of an umbrella and a ceiling side-by-side. The image on the right has a transparent red tint.');
+ * }
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/laDefense.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Left.
+ * image(img, 0, 0);
+ *
+ * // Right.
+ * // Tint with grayscale and alpha values.
+ * tint(255, 180);
+ * image(img, 50, 0);
+ *
+ * describe('Two images of an umbrella and a ceiling side-by-side. The image on the right is transparent.');
+ * }
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/laDefense.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Left.
+ * // Tint with a CSS color string.
+ * tint('red');
+ * image(img, 0, 0);
+ *
+ * // Right.
+ * // Remove the tint.
+ * noTint();
+ * image(img, 50, 0);
+ *
+ * describe('Two images of an umbrella and a ceiling side-by-side. The image on the left has a red tint.');
+ * }
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use CORNER mode.
+ * imageMode(CORNER);
+ *
+ * // Display the image.
+ * image(img, 10, 10, 50, 50);
+ *
+ * describe('A square image of a brick wall is drawn at the top left of a gray square.');
+ * }
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use CORNERS mode.
+ * imageMode(CORNERS);
+ *
+ * // Display the image.
+ * image(img, 10, 10, 90, 40);
+ *
+ * describe('An image of a brick wall is drawn on a gray square. The image is squeezed into a small rectangular area.');
+ * }
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Use CENTER mode.
+ * imageMode(CENTER);
+ *
+ * // Display the image.
+ * image(img, 50, 50, 80, 80);
+ *
+ * describe('A square image of a brick wall is drawn on a gray square.');
+ * }
+ *
+ *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * describe('An image of a brick wall.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Apply the GRAY filter.
- * img.filter(GRAY);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * describe('A grayscale image of a brick wall.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Image object.
- * let img = createImage(66, 66);
- *
- * // Load the image's pixels.
- * img.loadPixels();
- *
- * // Set the pixels to black.
- * for (let x = 0; x < img.width; x += 1) {
- * for (let y = 0; y < img.height; y += 1) {
- * img.set(x, y, 0);
- * }
- * }
- *
- * // Update the image.
- * img.updatePixels();
- *
- * // Display the image.
- * image(img, 17, 17);
- *
- * describe('A black square drawn in the middle of a gray square.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Calculate the center coordinates.
- * let x = img.width / 2;
- * let y = img.height / 2;
- *
- * // Draw a circle at the image's center.
- * circle(x, y, 20);
- *
- * describe('An image of a mountain landscape with a white circle drawn in the middle.');
- * }
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Calculate the center coordinates.
- * let x = img.width / 2;
- * let y = img.height / 2;
- *
- * // Draw a circle at the image's center.
- * circle(x, y, 20);
- *
- * describe('An image of a mountain landscape with a white circle drawn in the middle.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Image object.
- * let img = createImage(66, 66);
- *
- * // Load the image's pixels.
- * img.loadPixels();
- *
- * for (let i = 0; i < img.pixels.length; i += 4) {
- * // Red.
- * img.pixels[i] = 0;
- * // Green.
- * img.pixels[i + 1] = 0;
- * // Blue.
- * img.pixels[i + 2] = 0;
- * // Alpha.
- * img.pixels[i + 3] = 255;
- * }
- *
- * // Update the image.
- * img.updatePixels();
- *
- * // Display the image.
- * image(img, 17, 17);
- *
- * describe('A black square drawn in the middle of a gray square.');
- * }
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Image object.
- * let img = createImage(66, 66);
- *
- * // Load the image's pixels.
- * img.loadPixels();
- *
- * // Set the pixels to red.
- * for (let i = 0; i < img.pixels.length; i += 4) {
- * // Red.
- * img.pixels[i] = 255;
- * // Green.
- * img.pixels[i + 1] = 0;
- * // Blue.
- * img.pixels[i + 2] = 0;
- * // Alpha.
- * img.pixels[i + 3] = 255;
- * }
- *
- * // Update the image.
- * img.updatePixels();
- *
- * // Display the image.
- * image(img, 17, 17);
- *
- * describe('A red square drawn in the middle of a gray square.');
- * }
- *
- *
@@ -420,42 +144,51 @@ p5.Image = class {
*
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Image object.
- * let img = createImage(66, 66);
- *
- * // Load the image's pixels.
- * img.loadPixels();
- *
- * for (let i = 0; i < img.pixels.length; i += 4) {
- * // Red.
- * img.pixels[i] = 0;
- * // Green.
- * img.pixels[i + 1] = 0;
- * // Blue.
- * img.pixels[i + 2] = 0;
- * // Alpha.
- * img.pixels[i + 3] = 255;
- * }
- *
- * // Update the image.
- * img.updatePixels();
- *
- * // Display the image.
- * image(img, 17, 17);
- *
- * describe('A black square drawn in the middle of a gray square.');
- * }
- *
- *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Image object.
+ * let img = createImage(66, 66);
+ *
+ * // Load the image's pixels.
+ * img.loadPixels();
+ *
+ * for (let i = 0; i < img.pixels.length; i += 4) {
+ * // Red.
+ * img.pixels[i] = 0;
+ * // Green.
+ * img.pixels[i + 1] = 0;
+ * // Blue.
+ * img.pixels[i + 2] = 0;
+ * // Alpha.
+ * img.pixels[i + 3] = 255;
+ * }
+ *
+ * // Update the image.
+ * img.updatePixels();
+ *
+ * // Display the image.
+ * image(img, 17, 17);
+ *
+ * describe('A black square drawn in the middle of a gray square.');
+ * }
+ *
+ *
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* background(200);
@@ -623,12 +373,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Display the image.
@@ -653,12 +401,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Display the image.
@@ -676,22 +422,60 @@ p5.Image = class {
*
*/
/**
- * @method get
* @return {p5.Image} whole p5.Image
*/
/**
- * @method get
* @param {Number} x
* @param {Number} y
* @return {Number[]} color of the pixel at (x, y) in array format `[R, G, B, A]`.
*/
get(x, y, w, h) {
- p5._validateParameters('p5.Image.get', arguments);
- return p5.Renderer2D.prototype.get.apply(this, arguments);
+ // p5._validateParameters('p5.Image.get', arguments);
+ // return Renderer2D.prototype.get.apply(this, arguments);
+ const pixelsState = this._pixelsState;
+ const pd = this._pixelDensity;
+ const canvas = this.canvas;
+
+ if (typeof x === 'undefined' && typeof y === 'undefined') {
+ // get()
+ x = y = 0;
+ w = pixelsState.width;
+ h = pixelsState.height;
+ } else {
+ x *= pd;
+ y *= pd;
+
+ if (typeof w === 'undefined' && typeof h === 'undefined') {
+ // get(x,y)
+ if (x < 0 || y < 0 || x >= canvas.width || y >= canvas.height) {
+ return [0, 0, 0, 0];
+ }
+
+ return this._getPixel(x, y);
+ }
+ // get(x,y,w,h)
+ }
+
+ const region = new Image(w*pd, h*pd);
+ region.pixelDensity(pd);
+ region.canvas
+ .getContext('2d')
+ .drawImage(canvas, x, y, w * pd, h * pd, 0, 0, w*pd, h*pd);
+
+ return region;
}
- _getPixel(...args) {
- return p5.Renderer2D.prototype._getPixel.apply(this, args);
+ _getPixel(x, y) {
+ let imageData, index;
+ imageData = this.drawingContext.getImageData(x, y, 1, 1).data;
+ index = 0;
+ return [
+ imageData[index + 0],
+ imageData[index + 1],
+ imageData[index + 2],
+ imageData[index + 3]
+ ];
+ // return Renderer2D.prototype._getPixel.apply(this, args);
}
/**
@@ -709,7 +493,6 @@ p5.Image = class {
* img.updatePixels() must be called
* after using `img.set()` for changes to appear.
*
- * @method set
* @param {Number} x x-coordinate of the pixel.
* @param {Number} y y-coordinate of the pixel.
* @param {Number|Number[]|Object} a grayscale value | pixel array |
@@ -807,12 +590,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Create a p5.Image object.
@@ -830,7 +611,77 @@ p5.Image = class {
*
*/
set(x, y, imgOrCol) {
- p5.Renderer2D.prototype.set.call(this, x, y, imgOrCol);
+ // Renderer2D.prototype.set.call(this, x, y, imgOrCol);
+ // round down to get integer numbers
+ x = Math.floor(x);
+ y = Math.floor(y);
+ const pixelsState = this._pixelsState;
+ if (imgOrCol instanceof Image) {
+ this.drawingContext.save();
+ this.drawingContext.setTransform(1, 0, 0, 1, 0, 0);
+ this.drawingContext.scale(
+ this._pixelDensity,
+ this._pixelDensity
+ );
+ this.drawingContext.clearRect(x, y, imgOrCol.width, imgOrCol.height);
+ this.drawingContext.drawImage(imgOrCol.canvas, x, y);
+ this.drawingContext.restore();
+ } else {
+ let r = 0,
+ g = 0,
+ b = 0,
+ a = 0;
+ let idx =
+ 4 *
+ (y *
+ this._pixelDensity *
+ (this.width * this._pixelDensity) +
+ x * this._pixelDensity);
+ if (!pixelsState.imageData) {
+ pixelsState.loadPixels();
+ }
+ if (typeof imgOrCol === 'number') {
+ if (idx < pixelsState.pixels.length) {
+ r = imgOrCol;
+ g = imgOrCol;
+ b = imgOrCol;
+ a = 255;
+ //this.updatePixels.call(this);
+ }
+ } else if (Array.isArray(imgOrCol)) {
+ if (imgOrCol.length < 4) {
+ throw new Error('pixel array must be of the form [R, G, B, A]');
+ }
+ if (idx < pixelsState.pixels.length) {
+ r = imgOrCol[0];
+ g = imgOrCol[1];
+ b = imgOrCol[2];
+ a = imgOrCol[3];
+ //this.updatePixels.call(this);
+ }
+ } else if (imgOrCol instanceof p5.Color) {
+ if (idx < pixelsState.pixels.length) {
+ [r, g, b, a] = imgOrCol._getRGBA([255, 255, 255, 255]);
+ //this.updatePixels.call(this);
+ }
+ }
+ // loop over pixelDensity * pixelDensity
+ for (let i = 0; i < this._pixelDensity; i++) {
+ for (let j = 0; j < this._pixelDensity; j++) {
+ // loop over
+ idx =
+ 4 *
+ ((y * this._pixelDensity + j) *
+ this.width *
+ this._pixelDensity +
+ (x * this._pixelDensity + i));
+ pixelsState.pixels[idx] = r;
+ pixelsState.pixels[idx + 1] = g;
+ pixelsState.pixels[idx + 2] = b;
+ pixelsState.pixels[idx + 3] = a;
+ }
+ }
+ }
this.setModified(true);
}
@@ -841,7 +692,6 @@ p5.Image = class {
* `width` or `height`. For example, calling `img.resize(50, 0)` on an image
* that was 500 × 300 pixels will resize it to 50 × 30 pixels.
*
- * @method resize
* @param {Number} width resized image width.
* @param {Number} height resized image height.
*
@@ -850,12 +700,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Display the image.
@@ -876,12 +724,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Display the image.
@@ -902,12 +748,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Display the image.
@@ -1022,7 +866,6 @@ p5.Image = class {
* Calling `img.copy()` will scale pixels from the source region if it isn't
* the same size as the destination region.
*
- * @method copy
* @param {p5.Image|p5.Element} srcImage source image.
* @param {Integer} sx x-coordinate of the source's upper-left corner.
* @param {Integer} sy y-coordinate of the source's upper-left corner.
@@ -1038,12 +881,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Copy one region of the image to another.
@@ -1067,13 +908,10 @@ p5.Image = class {
* let mountains;
* let bricks;
*
- * // Load the images.
- * function preload() {
- * mountains = loadImage('assets/rockies.jpg');
- * bricks = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
+ * async function setup() {
+ * // Load the images.
+ * mountains = await loadImage('assets/rockies.jpg');
+ * bricks = await loadImage('assets/bricks.jpg');
* createCanvas(100, 100);
*
* // Calculate the center of the bricks image.
@@ -1092,7 +930,6 @@ p5.Image = class {
*
*/
/**
- * @method copy
* @param {Integer} sx
* @param {Integer} sy
* @param {Integer} sw
@@ -1103,7 +940,87 @@ p5.Image = class {
* @param {Integer} dh
*/
copy(...args) {
- p5.prototype.copy.apply(this, args);
+ // NOTE: Duplicate implementation here and pixels.js
+ let srcImage, sx, sy, sw, sh, dx, dy, dw, dh;
+ if (args.length === 9) {
+ srcImage = args[0];
+ sx = args[1];
+ sy = args[2];
+ sw = args[3];
+ sh = args[4];
+ dx = args[5];
+ dy = args[6];
+ dw = args[7];
+ dh = args[8];
+ } else if (args.length === 8) {
+ srcImage = this;
+ sx = args[0];
+ sy = args[1];
+ sw = args[2];
+ sh = args[3];
+ dx = args[4];
+ dy = args[5];
+ dw = args[6];
+ dh = args[7];
+ } else {
+ throw new Error('Signature not supported');
+ }
+
+ this._copyHelper(this, srcImage, sx, sy, sw, sh, dx, dy, dw, dh);
+ }
+
+ _copyHelper(
+ dstImage,
+ srcImage,
+ sx,
+ sy,
+ sw,
+ sh,
+ dx,
+ dy,
+ dw,
+ dh
+ ){
+ const s = srcImage.canvas.width / srcImage.width;
+ // adjust coord system for 3D when renderer
+ // ie top-left = -width/2, -height/2
+ let sxMod = 0;
+ let syMod = 0;
+ if (srcImage._renderer && srcImage._renderer.isP3D) {
+ sxMod = srcImage.width / 2;
+ syMod = srcImage.height / 2;
+ }
+ if (dstImage._renderer && dstImage._renderer.isP3D) {
+ dstImage.push();
+ dstImage.resetMatrix();
+ dstImage.noLights();
+ dstImage.blendMode(dstImage.BLEND);
+ dstImage.imageMode(dstImage.CORNER);
+ dstImage._renderer.image(
+ srcImage,
+ sx + sxMod,
+ sy + syMod,
+ sw,
+ sh,
+ dx,
+ dy,
+ dw,
+ dh
+ );
+ dstImage.pop();
+ } else {
+ dstImage.drawingContext.drawImage(
+ srcImage.canvas,
+ s * (sx + sxMod),
+ s * (sy + syMod),
+ s * sw,
+ s * sh,
+ dx,
+ dy,
+ dw,
+ dh
+ );
+ }
}
/**
@@ -1114,7 +1031,6 @@ p5.Image = class {
* and can't be removed once applied. If the mask has a different
* pixel density from this image, the mask will be scaled.
*
- * @method mask
* @param {p5.Image} srcImage source image.
*
* @example
@@ -1123,13 +1039,10 @@ p5.Image = class {
* let photo;
* let maskImage;
*
- * // Load the images.
- * function preload() {
- * photo = loadImage('assets/rockies.jpg');
- * maskImage = loadImage('assets/mask2.png');
- * }
- *
- * function setup() {
+ * async function setup() {
+ * // Load the images.
+ * photo = await loadImage('assets/rockies.jpg');
+ * maskImage = await loadImage('assets/mask2.png');
* createCanvas(100, 100);
*
* // Apply the mask.
@@ -1152,8 +1065,8 @@ p5.Image = class {
let imgScaleFactor = this._pixelDensity;
let maskScaleFactor = 1;
- if (p5Image instanceof p5.Renderer) {
- maskScaleFactor = p5Image._pInst._pixelDensity;
+ if (p5Image instanceof Renderer) {
+ maskScaleFactor = p5Image._pInst._renderer._pixelDensity;
}
const copyArgs = [
@@ -1232,8 +1145,7 @@ p5.Image = class {
* `DILATE`
* Increases the light areas. No parameter is used.
*
- * @method filter
- * @param {Constant} filterType either THRESHOLD, GRAY, OPAQUE, INVERT,
+ * @param {(THRESHOLD|GRAY|OPAQUE|INVERT|POSTERIZE|ERODE|DILATE|BLUR)} filterType either THRESHOLD, GRAY, OPAQUE, INVERT,
* POSTERIZE, ERODE, DILATE or BLUR.
* @param {Number} [filterParam] parameter unique to each filter.
*
@@ -1242,12 +1154,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Apply the INVERT filter.
@@ -1265,12 +1175,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Apply the GRAY filter.
@@ -1288,12 +1196,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Apply the THRESHOLD filter.
@@ -1311,12 +1217,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Apply the OPAQUE filter.
@@ -1334,12 +1238,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Apply the POSTERIZE filter.
@@ -1357,12 +1259,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Apply the BLUR filter.
@@ -1380,12 +1280,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Apply the DILATE filter.
@@ -1403,12 +1301,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Apply the ERODE filter.
@@ -1430,7 +1326,7 @@ p5.Image = class {
/**
* Copies a region of pixels from another image into this one.
*
- * The first parameter, `srcImage`, is the
+ * The first parameter, `srcImage`, is the
* p5.Image object to blend.
*
* The next four parameters, `sx`, `sy`, `sw`, and `sh` determine the region
@@ -1446,7 +1342,6 @@ p5.Image = class {
* `MULTIPLY`, `EXCLUSION`, `SCREEN`, `REPLACE`, `OVERLAY`, `HARD_LIGHT`,
* `SOFT_LIGHT`, `DODGE`, `BURN`, `ADD`, or `NORMAL`.
*
- * @method blend
* @param {p5.Image} srcImage source image
* @param {Integer} sx x-coordinate of the source's upper-left corner.
* @param {Integer} sy y-coordinate of the source's upper-left corner.
@@ -1456,7 +1351,7 @@ p5.Image = class {
* @param {Integer} dy y-coordinate of the destination's upper-left corner.
* @param {Integer} dw destination image width.
* @param {Integer} dh destination image height.
- * @param {Constant} blendMode the blend mode. either
+ * @param {(BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL)} blendMode the blend mode. either
* BLEND, DARKEST, LIGHTEST, DIFFERENCE,
* MULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,
* SOFT_LIGHT, DODGE, BURN, ADD or NORMAL.
@@ -1474,13 +1369,10 @@ p5.Image = class {
* let mountains;
* let bricks;
*
- * // Load the images.
- * function preload() {
- * mountains = loadImage('assets/rockies.jpg');
- * bricks = loadImage('assets/bricks_third.jpg');
- * }
- *
- * function setup() {
+ * async function setup() {
+ * // Load the images.
+ * mountains = await loadImage('assets/rockies.jpg');
+ * bricks = await loadImage('assets/bricks_third.jpg');
* createCanvas(100, 100);
*
* // Blend the bricks image into the mountains.
@@ -1502,13 +1394,11 @@ p5.Image = class {
* let mountains;
* let bricks;
*
- * // Load the images.
- * function preload() {
- * mountains = loadImage('assets/rockies.jpg');
- * bricks = loadImage('assets/bricks_third.jpg');
- * }
+ * async function setup() {
+ * // Load the images.
+ * mountains = await loadImage('assets/rockies.jpg');
+ * bricks = await loadImage('assets/bricks_third.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Blend the bricks image into the mountains.
@@ -1530,13 +1420,11 @@ p5.Image = class {
* let mountains;
* let bricks;
*
- * // Load the images.
- * function preload() {
- * mountains = loadImage('assets/rockies.jpg');
- * bricks = loadImage('assets/bricks_third.jpg');
- * }
+ * async function setup() {
+ * // Load the images.
+ * mountains = await loadImage('assets/rockies.jpg');
+ * bricks = await loadImage('assets/bricks_third.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Blend the bricks image into the mountains.
@@ -1554,7 +1442,6 @@ p5.Image = class {
*
*/
/**
- * @method blend
* @param {Integer} sx
* @param {Integer} sy
* @param {Integer} sw
@@ -1563,11 +1450,16 @@ p5.Image = class {
* @param {Integer} dy
* @param {Integer} dw
* @param {Integer} dh
- * @param {Constant} blendMode
+ * @param {(BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL)} blendMode
*/
blend(...args) {
- p5._validateParameters('p5.Image.blend', arguments);
- p5.prototype.blend.apply(this, args);
+ const currBlend = this.drawingContext.globalCompositeOperation;
+ const blendMode = args[args.length - 1];
+ const copyArgs = Array.prototype.slice.call(args, 0, args.length - 1);
+
+ this.drawingContext.globalCompositeOperation = blendMode;
+ this.copy(...copyArgs);
+ this.drawingContext.globalCompositeOperation = currBlend;
this.setModified(true);
}
@@ -1575,8 +1467,7 @@ p5.Image = class {
* helper method for web GL mode to indicate that an image has been
* changed or unchanged since last upload. gl texture upload will
* set this value to false after uploading the texture.
- * @method setModified
- * @param {boolean} val sets whether or not the image has been
+ * @param {Boolean} val sets whether or not the image has been
* modified.
* @private
*/
@@ -1588,7 +1479,6 @@ p5.Image = class {
* helper method for web GL mode to figure out if the image
* has been modified and might need to be re-uploaded to texture
* memory between frames.
- * @method isModified
* @private
* @return {boolean} a boolean indicating whether or not the
* image has been updated or modified since last texture upload.
@@ -1600,7 +1490,7 @@ p5.Image = class {
/**
* Saves the image to a file.
*
- * By default, `img.save()` saves the image as a PNG image called
+ * By default, `img.save()` saves the image as a PNG image called
* `untitled.png`.
*
* The first parameter, `filename`, is optional. It's a string that sets the
@@ -1619,7 +1509,6 @@ p5.Image = class {
* from a GIF file. See saveGif() to create new
* GIFs.
*
- * @method save
* @param {String} filename filename. Defaults to 'untitled'.
* @param {String} [extension] file extension, either 'png' or 'jpg'.
* Defaults to 'png'.
@@ -1629,12 +1518,10 @@ p5.Image = class {
*
* let img;
*
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Display the image.
@@ -1658,29 +1545,54 @@ p5.Image = class {
*/
save(filename, extension) {
if (this.gifProperties) {
- p5.prototype.encodeAndDownloadGif(this, filename);
+ encodeAndDownloadGif(this, filename);
} else {
- p5.prototype.saveCanvas(this.canvas, filename, extension);
+ let htmlCanvas = this.canvas;
+ extension =
+ extension ||
+ _checkFileExtension(filename, extension)[1] ||
+ 'png';
+
+ let mimeType;
+ switch (extension) {
+ default:
+ //case 'png':
+ mimeType = 'image/png';
+ break;
+ case 'webp':
+ mimeType = 'image/webp';
+ break;
+ case 'jpeg':
+ case 'jpg':
+ mimeType = 'image/jpeg';
+ break;
+ }
+
+ htmlCanvas.toBlob(blob => {
+ downloadFile(blob, filename, extension);
+ }, mimeType);
}
}
+ async toBlob() {
+ return new Promise(resolve => {
+ this.canvas.toBlob(resolve);
+ });
+ }
+
// GIF Section
/**
* Restarts an animated GIF at its first frame.
*
- * @method reset
- *
* @example
*
*
* let gif;
*
- * // Load the image.
- * function preload() {
- * gif = loadImage('assets/arnott-wallace-wink-loop-once.gif');
- * }
+ * async function setup() {
+ * // Load the image.
+ * gif = await loadImage('assets/arnott-wallace-wink-loop-once.gif');
*
- * function setup() {
* createCanvas(100, 100);
*
* describe('A cartoon face winks once and then freezes. Clicking resets the face and makes it wink again.');
@@ -1716,7 +1628,6 @@ p5.Image = class {
/**
* Gets the index of the current frame in an animated GIF.
*
- * @method getCurrentFrame
* @return {Number} index of the GIF's current frame.
*
* @example
@@ -1724,12 +1635,10 @@ p5.Image = class {
*
* let gif;
*
- * // Load the image.
- * function preload() {
- * gif = loadImage('assets/arnott-wallace-eye-loop-forever.gif');
- * }
+ * async function setup() {
+ * // Load the image.
+ * gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');
*
- * function setup() {
* createCanvas(100, 100);
*
* describe('A cartoon eye repeatedly looks around, then outwards. A number displayed in the bottom-left corner increases from 0 to 124, then repeats.');
@@ -1758,7 +1667,6 @@ p5.Image = class {
/**
* Sets the current frame in an animated GIF.
*
- * @method setFrame
* @param {Number} index index of the frame to display.
*
* @example
@@ -1767,12 +1675,10 @@ p5.Image = class {
* let gif;
* let frameSlider;
*
- * // Load the image.
- * function preload() {
- * gif = loadImage('assets/arnott-wallace-eye-loop-forever.gif');
- * }
+ * async function setup() {
+ * // Load the image.
+ * gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Get the index of the last frame.
@@ -1818,7 +1724,6 @@ p5.Image = class {
/**
* Returns the number of frames in an animated GIF.
*
- * @method numFrames
* @return {Number} number of frames in the GIF.
*
* @example
@@ -1826,12 +1731,10 @@ p5.Image = class {
*
* let gif;
*
- * // Load the image.
- * function preload() {
- * gif = loadImage('assets/arnott-wallace-eye-loop-forever.gif');
- * }
+ * async function setup() {
+ * // Load the image.
+ * gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');
*
- * function setup() {
* createCanvas(100, 100);
*
* describe('A cartoon eye looks around. The text "n / 125" is shown at the bottom of the canvas.');
@@ -1859,19 +1762,15 @@ p5.Image = class {
* Plays an animated GIF that was paused with
* img.pause().
*
- * @method play
- *
* @example
*
*
* let gif;
*
- * // Load the image.
- * function preload() {
- * gif = loadImage('assets/nancy-liang-wind-loop-forever.gif');
- * }
+ * async function setup() {
+ * // Load the image.
+ * gif = await loadImage('assets/nancy-liang-wind-loop-forever.gif');
*
- * function setup() {
* createCanvas(100, 100);
*
* describe('A drawing of a child with hair blowing in the wind. The animation freezes when clicked and resumes when released.');
@@ -1906,19 +1805,15 @@ p5.Image = class {
* The GIF can be resumed by calling
* img.play().
*
- * @method pause
- *
* @example
*
*
* let gif;
*
- * // Load the image.
- * function preload() {
- * gif = loadImage('assets/nancy-liang-wind-loop-forever.gif');
- * }
+ * async function setup() {
+ * // Load the image.
+ * gif = await loadImage('assets/nancy-liang-wind-loop-forever.gif');
*
- * function setup() {
* createCanvas(100, 100);
*
* describe('A drawing of a child with hair blowing in the wind. The animation freezes when clicked and resumes when released.');
@@ -1958,7 +1853,6 @@ p5.Image = class {
* at `index` will have its delay modified. All other frames will keep
* their default delay.
*
- * @method delay
* @param {Number} d delay in milliseconds between switching frames.
* @param {Number} [index] index of the frame that will have its delay modified.
*
@@ -1968,13 +1862,11 @@ p5.Image = class {
* let gifFast;
* let gifSlow;
*
- * // Load the images.
- * function preload() {
- * gifFast = loadImage('assets/arnott-wallace-eye-loop-forever.gif');
- * gifSlow = loadImage('assets/arnott-wallace-eye-loop-forever.gif');
- * }
+ * async function setup() {
+ * // Load the images.
+ * gifFast = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');
+ * gifSlow = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');
*
- * function setup() {
* createCanvas(100, 100);
*
* background(200);
@@ -2002,12 +1894,10 @@ p5.Image = class {
*
* let gif;
*
- * // Load the image.
- * function preload() {
- * gif = loadImage('assets/arnott-wallace-eye-loop-forever.gif');
- * }
+ * async function setup() {
+ * // Load the image.
+ * gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');
*
- * function setup() {
* createCanvas(100, 100);
*
* // Set the delay of frame 67.
@@ -2037,4 +1927,497 @@ p5.Image = class {
}
}
};
-export default p5.Image;
+
+function encodeAndDownloadGif(pImg, filename) {
+ const props = pImg.gifProperties;
+
+ //convert loopLimit back into Netscape Block formatting
+ let loopLimit = props.loopLimit;
+ if (loopLimit === 1) {
+ loopLimit = null;
+ } else if (loopLimit === null) {
+ loopLimit = 0;
+ }
+ const buffer = new Uint8Array(pImg.width * pImg.height * props.numFrames);
+
+ const allFramesPixelColors = [];
+
+ // Used to determine the occurrence of unique palettes and the frames
+ // which use them
+ const paletteFreqsAndFrames = {};
+
+ // Pass 1:
+ //loop over frames and get the frequency of each palette
+ for (let i = 0; i < props.numFrames; i++) {
+ const paletteSet = new Set();
+ const data = props.frames[i].image.data;
+ const dataLength = data.length;
+ // The color for each pixel in this frame ( for easier lookup later )
+ const pixelColors = new Uint32Array(pImg.width * pImg.height);
+ for (let j = 0, k = 0; j < dataLength; j += 4, k++) {
+ const r = data[j + 0];
+ const g = data[j + 1];
+ const b = data[j + 2];
+ const color = (r << 16) | (g << 8) | (b << 0);
+ paletteSet.add(color);
+
+ // What color does this pixel have in this frame ?
+ pixelColors[k] = color;
+ }
+
+ // A way to put use the entire palette as an object key
+ const paletteStr = [...paletteSet].sort().toString();
+ if (paletteFreqsAndFrames[paletteStr] === undefined) {
+ paletteFreqsAndFrames[paletteStr] = { freq: 1, frames: [i] };
+ } else {
+ paletteFreqsAndFrames[paletteStr].freq += 1;
+ paletteFreqsAndFrames[paletteStr].frames.push(i);
+ }
+
+ allFramesPixelColors.push(pixelColors);
+ }
+
+ let framesUsingGlobalPalette = [];
+
+ // Now to build the global palette
+ // Sort all the unique palettes in descending order of their occurrence
+ const palettesSortedByFreq = Object.keys(paletteFreqsAndFrames).sort(function(
+ a,
+ b
+ ) {
+ return paletteFreqsAndFrames[b].freq - paletteFreqsAndFrames[a].freq;
+ });
+
+ // The initial global palette is the one with the most occurrence
+ const globalPalette = palettesSortedByFreq[0]
+ .split(',')
+ .map(a => parseInt(a));
+
+ framesUsingGlobalPalette = framesUsingGlobalPalette.concat(
+ paletteFreqsAndFrames[globalPalette].frames
+ );
+
+ const globalPaletteSet = new Set(globalPalette);
+
+ // Build a more complete global palette
+ // Iterate over the remaining palettes in the order of
+ // their occurrence and see if the colors in this palette which are
+ // not in the global palette can be added there, while keeping the length
+ // of the global palette <= 256
+ for (let i = 1; i < palettesSortedByFreq.length; i++) {
+ const palette = palettesSortedByFreq[i].split(',').map(a => parseInt(a));
+
+ const difference = palette.filter(x => !globalPaletteSet.has(x));
+ if (globalPalette.length + difference.length <= 256) {
+ for (let j = 0; j < difference.length; j++) {
+ globalPalette.push(difference[j]);
+ globalPaletteSet.add(difference[j]);
+ }
+
+ // All frames using this palette now use the global palette
+ framesUsingGlobalPalette = framesUsingGlobalPalette.concat(
+ paletteFreqsAndFrames[palettesSortedByFreq[i]].frames
+ );
+ }
+ }
+
+ framesUsingGlobalPalette = new Set(framesUsingGlobalPalette);
+
+ // Build a lookup table of the index of each color in the global palette
+ // Maps a color to its index
+ const globalIndicesLookup = {};
+ for (let i = 0; i < globalPalette.length; i++) {
+ if (!globalIndicesLookup[globalPalette[i]]) {
+ globalIndicesLookup[globalPalette[i]] = i;
+ }
+ }
+
+ // force palette to be power of 2
+ let powof2 = 1;
+ while (powof2 < globalPalette.length) {
+ powof2 <<= 1;
+ }
+ globalPalette.length = powof2;
+
+ // global opts
+ const opts = {
+ loop: loopLimit,
+ palette: new Uint32Array(globalPalette)
+ };
+ const gifWriter = new omggif.GifWriter(buffer, pImg.width, pImg.height, opts);
+ let previousFrame = {};
+
+ // Pass 2
+ // Determine if the frame needs a local palette
+ // Also apply transparency optimization. This function will often blow up
+ // the size of a GIF if not for transparency. If a pixel in one frame has
+ // the same color in the previous frame, that pixel can be marked as
+ // transparent. We decide one particular color as transparent and make all
+ // transparent pixels take this color. This helps in later in compression.
+ for (let i = 0; i < props.numFrames; i++) {
+ const localPaletteRequired = !framesUsingGlobalPalette.has(i);
+ const palette = localPaletteRequired ? [] : globalPalette;
+ const pixelPaletteIndex = new Uint8Array(pImg.width * pImg.height);
+
+ // Lookup table mapping color to its indices
+ const colorIndicesLookup = {};
+
+ // All the colors that cannot be marked transparent in this frame
+ const cannotBeTransparent = new Set();
+
+ allFramesPixelColors[i].forEach((color, k) => {
+ if (localPaletteRequired) {
+ if (colorIndicesLookup[color] === undefined) {
+ colorIndicesLookup[color] = palette.length;
+ palette.push(color);
+ }
+ pixelPaletteIndex[k] = colorIndicesLookup[color];
+ } else {
+ pixelPaletteIndex[k] = globalIndicesLookup[color];
+ }
+
+ if (i > 0) {
+ // If even one pixel of this color has changed in this frame
+ // from the previous frame, we cannot mark it as transparent
+ if (allFramesPixelColors[i - 1][k] !== color) {
+ cannotBeTransparent.add(color);
+ }
+ }
+ });
+
+ const frameOpts = {};
+
+ // Transparency optimization
+ const canBeTransparent = palette.filter(a => !cannotBeTransparent.has(a));
+ if (canBeTransparent.length > 0) {
+ // Select a color to mark as transparent
+ const transparent = canBeTransparent[0];
+ const transparentIndex = localPaletteRequired
+ ? colorIndicesLookup[transparent]
+ : globalIndicesLookup[transparent];
+ if (i > 0) {
+ for (let k = 0; k < allFramesPixelColors[i].length; k++) {
+ // If this pixel in this frame has the same color in previous frame
+ if (allFramesPixelColors[i - 1][k] === allFramesPixelColors[i][k]) {
+ pixelPaletteIndex[k] = transparentIndex;
+ }
+ }
+ frameOpts.transparent = transparentIndex;
+ // If this frame has any transparency, do not dispose the previous frame
+ previousFrame.frameOpts.disposal = 1;
+ }
+ }
+ frameOpts.delay = props.frames[i].delay / 10; // Move timing back into GIF formatting
+ if (localPaletteRequired) {
+ // force palette to be power of 2
+ let powof2 = 1;
+ while (powof2 < palette.length) {
+ powof2 <<= 1;
+ }
+ palette.length = powof2;
+ frameOpts.palette = new Uint32Array(palette);
+ }
+ if (i > 0) {
+ // add the frame that came before the current one
+ gifWriter.addFrame(
+ 0,
+ 0,
+ pImg.width,
+ pImg.height,
+ previousFrame.pixelPaletteIndex,
+ previousFrame.frameOpts
+ );
+ }
+ // previous frame object should now have details of this frame
+ previousFrame = {
+ pixelPaletteIndex,
+ frameOpts
+ };
+ }
+
+ previousFrame.frameOpts.disposal = 1;
+ // add the last frame
+ gifWriter.addFrame(
+ 0,
+ 0,
+ pImg.width,
+ pImg.height,
+ previousFrame.pixelPaletteIndex,
+ previousFrame.frameOpts
+ );
+
+ const extension = 'gif';
+ const blob = new Blob([buffer.slice(0, gifWriter.end())], {
+ type: 'image/gif'
+ });
+ downloadFile(blob, filename, extension);
+};
+
+function image(p5, fn){
+ /**
+ * A class to describe an image.
+ *
+ * Images are rectangular grids of pixels that can be displayed and modified.
+ *
+ * Existing images can be loaded by calling
+ * loadImage(). Blank images can be created by
+ * calling createImage(). `p5.Image` objects
+ * have methods for common tasks such as applying filters and modifying
+ * pixel values.
+ *
+ * @example
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * describe('An image of a brick wall.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Apply the GRAY filter.
+ * img.filter(GRAY);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * describe('A grayscale image of a brick wall.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Image object.
+ * let img = createImage(66, 66);
+ *
+ * // Load the image's pixels.
+ * img.loadPixels();
+ *
+ * // Set the pixels to black.
+ * for (let x = 0; x < img.width; x += 1) {
+ * for (let y = 0; y < img.height; y += 1) {
+ * img.set(x, y, 0);
+ * }
+ * }
+ *
+ * // Update the image.
+ * img.updatePixels();
+ *
+ * // Display the image.
+ * image(img, 17, 17);
+ *
+ * describe('A black square drawn in the middle of a gray square.');
+ * }
+ *
+ *
+ *
+ * @class p5.Image
+ * @param {Number} width
+ * @param {Number} height
+ */
+ p5.Image = Image;
+
+ /**
+ * The image's width in pixels.
+ *
+ * @type {Number}
+ * @property {Number} width
+ * @for p5.Image
+ * @name width
+ * @readOnly
+ *
+ * @example
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Calculate the center coordinates.
+ * let x = img.width / 2;
+ * let y = img.height / 2;
+ *
+ * // Draw a circle at the image's center.
+ * circle(x, y, 20);
+ *
+ * describe('An image of a mountain landscape with a white circle drawn in the middle.');
+ * }
+ *
+ *
+ */
+
+ /**
+ * The image's height in pixels.
+ *
+ * @type {Number}
+ * @property height
+ * @for p5.Image
+ * @name height
+ * @readOnly
+ *
+ * @example
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Calculate the center coordinates.
+ * let x = img.width / 2;
+ * let y = img.height / 2;
+ *
+ * // Draw a circle at the image's center.
+ * circle(x, y, 20);
+ *
+ * describe('An image of a mountain landscape with a white circle drawn in the middle.');
+ * }
+ *
+ *
+ */
+
+ /**
+ * An array containing the color of each pixel in the image.
+ *
+ * Colors are stored as numbers representing red, green, blue, and alpha
+ * (RGBA) values. `img.pixels` is a one-dimensional array for performance
+ * reasons.
+ *
+ * Each pixel occupies four elements in the pixels array, one for each
+ * RGBA value. For example, the pixel at coordinates (0, 0) stores its
+ * RGBA values at `img.pixels[0]`, `img.pixels[1]`, `img.pixels[2]`,
+ * and `img.pixels[3]`, respectively. The next pixel at coordinates (1, 0)
+ * stores its RGBA values at `img.pixels[4]`, `img.pixels[5]`,
+ * `img.pixels[6]`, and `img.pixels[7]`. And so on. The `img.pixels` array
+ * for a 100×100 p5.Image object has
+ * 100 × 100 × 4 = 40,000 elements.
+ *
+ * Accessing the RGBA values for a pixel in the image requires a little
+ * math as shown in the examples below. The
+ * img.loadPixels()
+ * method must be called before accessing the `img.pixels` array. The
+ * img.updatePixels() method must be
+ * called after any changes are made.
+ *
+ * @property {Number[]} pixels
+ * @for p5.Image
+ * @name pixels
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Image object.
+ * let img = createImage(66, 66);
+ *
+ * // Load the image's pixels.
+ * img.loadPixels();
+ *
+ * for (let i = 0; i < img.pixels.length; i += 4) {
+ * // Red.
+ * img.pixels[i] = 0;
+ * // Green.
+ * img.pixels[i + 1] = 0;
+ * // Blue.
+ * img.pixels[i + 2] = 0;
+ * // Alpha.
+ * img.pixels[i + 3] = 255;
+ * }
+ *
+ * // Update the image.
+ * img.updatePixels();
+ *
+ * // Display the image.
+ * image(img, 17, 17);
+ *
+ * describe('A black square drawn in the middle of a gray square.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Image object.
+ * let img = createImage(66, 66);
+ *
+ * // Load the image's pixels.
+ * img.loadPixels();
+ *
+ * // Set the pixels to red.
+ * for (let i = 0; i < img.pixels.length; i += 4) {
+ * // Red.
+ * img.pixels[i] = 255;
+ * // Green.
+ * img.pixels[i + 1] = 0;
+ * // Blue.
+ * img.pixels[i + 2] = 0;
+ * // Alpha.
+ * img.pixels[i + 3] = 255;
+ * }
+ *
+ * // Update the image.
+ * img.updatePixels();
+ *
+ * // Display the image.
+ * image(img, 17, 17);
+ *
+ * describe('A red square drawn in the middle of a gray square.');
+ * }
+ *
+ *
+ */
+}
+
+export default image;
+export { Image };
+
+if(typeof p5 !== 'undefined'){
+ image(p5, p5.prototype);
+}
diff --git a/src/image/pixels.js b/src/image/pixels.js
index effda98199..ebea101273 100644
--- a/src/image/pixels.js
+++ b/src/image/pixels.js
@@ -5,1178 +5,1121 @@
* @requires core
*/
-import p5 from '../core/main';
import Filters from './filters';
-import '../color/p5.Color';
-/**
- * An array containing the color of each pixel on the canvas.
- *
- * Colors are stored as numbers representing red, green, blue, and alpha
- * (RGBA) values. `pixels` is a one-dimensional array for performance reasons.
- *
- * Each pixel occupies four elements in the `pixels` array, one for each RGBA
- * value. For example, the pixel at coordinates (0, 0) stores its RGBA values
- * at `pixels[0]`, `pixels[1]`, `pixels[2]`, and `pixels[3]`, respectively.
- * The next pixel at coordinates (1, 0) stores its RGBA values at `pixels[4]`,
- * `pixels[5]`, `pixels[6]`, and `pixels[7]`. And so on. The `pixels` array
- * for a 100×100 canvas has 100 × 100 × 4 = 40,000 elements.
- *
- * Some displays use several smaller pixels to set the color at a single
- * point. The pixelDensity() function returns
- * the pixel density of the canvas. High density displays often have a
- * pixelDensity() of 2. On such a display, the
- * `pixels` array for a 100×100 canvas has 200 × 200 × 4 =
- * 160,000 elements.
- *
- * Accessing the RGBA values for a point on the canvas requires a little math
- * as shown below. The loadPixels() function
- * must be called before accessing the `pixels` array. The
- * updatePixels() function must be called
- * after any changes are made.
- *
- * @property {Number[]} pixels
- *
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Load the pixels array.
- * loadPixels();
- *
- * // Set the dot's coordinates.
- * let x = 50;
- * let y = 50;
- *
- * // Get the pixel density.
- * let d = pixelDensity();
- *
- * // Set the pixel(s) at the center of the canvas black.
- * for (let i = 0; i < d; i += 1) {
- * for (let j = 0; j < d; j += 1) {
- * let index = 4 * ((y * d + j) * width * d + (x * d + i));
- * // Red.
- * pixels[index] = 0;
- * // Green.
- * pixels[index + 1] = 0;
- * // Blue.
- * pixels[index + 2] = 0;
- * // Alpha.
- * pixels[index + 3] = 255;
- * }
- * }
- *
- * // Update the canvas.
- * updatePixels();
- *
- * describe('A black dot in the middle of a gray rectangle.');
- * }
- *
- *
- *
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Load the pixels array.
- * loadPixels();
- *
- * // Get the pixel density.
- * let d = pixelDensity();
- *
- * // Calculate the halfway index in the pixels array.
- * let halfImage = 4 * (d * width) * (d * height / 2);
- *
- * // Make the top half of the canvas red.
- * for (let i = 0; i < halfImage; i += 4) {
- * // Red.
- * pixels[i] = 255;
- * // Green.
- * pixels[i + 1] = 0;
- * // Blue.
- * pixels[i + 2] = 0;
- * // Alpha.
- * pixels[i + 3] = 255;
- * }
- *
- * // Update the canvas.
- * updatePixels();
- *
- * describe('A red rectangle drawn above a gray rectangle.');
- * }
- *
- *
- *
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Create a p5.Color object.
- * let pink = color(255, 102, 204);
- *
- * // Load the pixels array.
- * loadPixels();
- *
- * // Get the pixel density.
- * let d = pixelDensity();
- *
- * // Calculate the halfway index in the pixels array.
- * let halfImage = 4 * (d * width) * (d * height / 2);
- *
- * // Make the top half of the canvas red.
- * for (let i = 0; i < halfImage; i += 4) {
- * pixels[i] = red(pink);
- * pixels[i + 1] = green(pink);
- * pixels[i + 2] = blue(pink);
- * pixels[i + 3] = alpha(pink);
- * }
- *
- * // Update the canvas.
- * updatePixels();
- *
- * describe('A pink rectangle drawn above a gray rectangle.');
- * }
- *
- *
- */
-p5.prototype.pixels = [];
+function pixels(p5, fn){
+ /**
+ * An array containing the color of each pixel on the canvas.
+ *
+ * Colors are stored as numbers representing red, green, blue, and alpha
+ * (RGBA) values. `pixels` is a one-dimensional array for performance reasons.
+ *
+ * Each pixel occupies four elements in the `pixels` array, one for each RGBA
+ * value. For example, the pixel at coordinates (0, 0) stores its RGBA values
+ * at `pixels[0]`, `pixels[1]`, `pixels[2]`, and `pixels[3]`, respectively.
+ * The next pixel at coordinates (1, 0) stores its RGBA values at `pixels[4]`,
+ * `pixels[5]`, `pixels[6]`, and `pixels[7]`. And so on. The `pixels` array
+ * for a 100×100 canvas has 100 × 100 × 4 = 40,000 elements.
+ *
+ * Some displays use several smaller pixels to set the color at a single
+ * point. The pixelDensity() function returns
+ * the pixel density of the canvas. High density displays often have a
+ * pixelDensity() of 2. On such a display, the
+ * `pixels` array for a 100×100 canvas has 200 × 200 × 4 =
+ * 160,000 elements.
+ *
+ * Accessing the RGBA values for a point on the canvas requires a little math
+ * as shown below. The loadPixels() function
+ * must be called before accessing the `pixels` array. The
+ * updatePixels() function must be called
+ * after any changes are made.
+ *
+ * @property {Number[]} pixels
+ *
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ * background(128);
+ *
+ * // Load the pixels array.
+ * loadPixels();
+ *
+ * // Set the dot's coordinates.
+ * let x = 50;
+ * let y = 50;
+ *
+ * // Get the pixel density.
+ * let d = pixelDensity();
+ *
+ * // Set the pixel(s) at the center of the canvas black.
+ * for (let i = 0; i < d; i += 1) {
+ * for (let j = 0; j < d; j += 1) {
+ * let index = 4 * ((y * d + j) * width * d + (x * d + i));
+ * // Red.
+ * pixels[index] = 0;
+ * // Green.
+ * pixels[index + 1] = 0;
+ * // Blue.
+ * pixels[index + 2] = 0;
+ * // Alpha.
+ * pixels[index + 3] = 255;
+ * }
+ * }
+ *
+ * // Update the canvas.
+ * updatePixels();
+ *
+ * describe('A black dot in the middle of a gray rectangle.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Load the pixels array.
+ * loadPixels();
+ *
+ * // Get the pixel density.
+ * let d = pixelDensity();
+ *
+ * // Calculate the halfway index in the pixels array.
+ * let halfImage = 4 * (d * width) * (d * height / 2);
+ *
+ * // Make the top half of the canvas red.
+ * for (let i = 0; i < halfImage; i += 4) {
+ * // Red.
+ * pixels[i] = 255;
+ * // Green.
+ * pixels[i + 1] = 0;
+ * // Blue.
+ * pixels[i + 2] = 0;
+ * // Alpha.
+ * pixels[i + 3] = 255;
+ * }
+ *
+ * // Update the canvas.
+ * updatePixels();
+ *
+ * describe('A red rectangle drawn above a gray rectangle.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * // Create a p5.Color object.
+ * let pink = color(255, 102, 204);
+ *
+ * // Load the pixels array.
+ * loadPixels();
+ *
+ * // Get the pixel density.
+ * let d = pixelDensity();
+ *
+ * // Calculate the halfway index in the pixels array.
+ * let halfImage = 4 * (d * width) * (d * height / 2);
+ *
+ * // Make the top half of the canvas red.
+ * for (let i = 0; i < halfImage; i += 4) {
+ * pixels[i] = red(pink);
+ * pixels[i + 1] = green(pink);
+ * pixels[i + 2] = blue(pink);
+ * pixels[i + 3] = alpha(pink);
+ * }
+ *
+ * // Update the canvas.
+ * updatePixels();
+ *
+ * describe('A pink rectangle drawn above a gray rectangle.');
+ * }
+ *
+ *
+ */
-/**
- * Copies a region of pixels from one image to another.
- *
- * The first parameter, `srcImage`, is the
- * p5.Image object to blend.
- *
- * The next four parameters, `sx`, `sy`, `sw`, and `sh` determine the region
- * to blend from the source image. `(sx, sy)` is the top-left corner of the
- * region. `sw` and `sh` are the regions width and height.
- *
- * The next four parameters, `dx`, `dy`, `dw`, and `dh` determine the region
- * of the canvas to blend into. `(dx, dy)` is the top-left corner of the
- * region. `dw` and `dh` are the regions width and height.
- *
- * The tenth parameter, `blendMode`, sets the effect used to blend the images'
- * colors. The options are `BLEND`, `DARKEST`, `LIGHTEST`, `DIFFERENCE`,
- * `MULTIPLY`, `EXCLUSION`, `SCREEN`, `REPLACE`, `OVERLAY`, `HARD_LIGHT`,
- * `SOFT_LIGHT`, `DODGE`, `BURN`, `ADD`, or `NORMAL`
- *
- * @method blend
- * @param {p5.Image} srcImage source image.
- * @param {Integer} sx x-coordinate of the source's upper-left corner.
- * @param {Integer} sy y-coordinate of the source's upper-left corner.
- * @param {Integer} sw source image width.
- * @param {Integer} sh source image height.
- * @param {Integer} dx x-coordinate of the destination's upper-left corner.
- * @param {Integer} dy y-coordinate of the destination's upper-left corner.
- * @param {Integer} dw destination image width.
- * @param {Integer} dh destination image height.
- * @param {Constant} blendMode the blend mode. either
- * BLEND, DARKEST, LIGHTEST, DIFFERENCE,
- * MULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,
- * SOFT_LIGHT, DODGE, BURN, ADD or NORMAL.
- *
- * @example
- *
- *
- * let img0;
- * let img1;
- *
- * // Load the images.
- * function preload() {
- * img0 = loadImage('assets/rockies.jpg');
- * img1 = loadImage('assets/bricks_third.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Use the mountains as the background.
- * background(img0);
- *
- * // Display the bricks.
- * image(img1, 0, 0);
- *
- * // Display the bricks faded into the landscape.
- * blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);
- *
- * describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears faded on the right of the image.');
- * }
- *
- *
- *
- *
- *
- * let img0;
- * let img1;
- *
- * // Load the images.
- * function preload() {
- * img0 = loadImage('assets/rockies.jpg');
- * img1 = loadImage('assets/bricks_third.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Use the mountains as the background.
- * background(img0);
- *
- * // Display the bricks.
- * image(img1, 0, 0);
- *
- * // Display the bricks partially transparent.
- * blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);
- *
- * describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears transparent on the right of the image.');
- * }
- *
- *
- *
- *
- *
- * let img0;
- * let img1;
- *
- * // Load the images.
- * function preload() {
- * img0 = loadImage('assets/rockies.jpg');
- * img1 = loadImage('assets/bricks_third.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Use the mountains as the background.
- * background(img0);
- *
- * // Display the bricks.
- * image(img1, 0, 0);
- *
- * // Display the bricks washed out into the landscape.
- * blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, ADD);
- *
- * describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears washed out on the right of the image.');
- * }
- *
- *
- */
-/**
- * @method blend
- * @param {Integer} sx
- * @param {Integer} sy
- * @param {Integer} sw
- * @param {Integer} sh
- * @param {Integer} dx
- * @param {Integer} dy
- * @param {Integer} dw
- * @param {Integer} dh
- * @param {Constant} blendMode
- */
-p5.prototype.blend = function(...args) {
- p5._validateParameters('blend', args);
- if (this._renderer) {
- this._renderer.blend(...args);
- } else {
- p5.Renderer2D.prototype.blend.apply(this, args);
- }
-};
+ /**
+ * Copies a region of pixels from one image to another.
+ *
+ * The first parameter, `srcImage`, is the
+ * p5.Image object to blend.
+ *
+ * The next four parameters, `sx`, `sy`, `sw`, and `sh` determine the region
+ * to blend from the source image. `(sx, sy)` is the top-left corner of the
+ * region. `sw` and `sh` are the regions width and height.
+ *
+ * The next four parameters, `dx`, `dy`, `dw`, and `dh` determine the region
+ * of the canvas to blend into. `(dx, dy)` is the top-left corner of the
+ * region. `dw` and `dh` are the regions width and height.
+ *
+ * The tenth parameter, `blendMode`, sets the effect used to blend the images'
+ * colors. The options are `BLEND`, `DARKEST`, `LIGHTEST`, `DIFFERENCE`,
+ * `MULTIPLY`, `EXCLUSION`, `SCREEN`, `REPLACE`, `OVERLAY`, `HARD_LIGHT`,
+ * `SOFT_LIGHT`, `DODGE`, `BURN`, `ADD`, or `NORMAL`
+ *
+ * @method blend
+ * @param {p5.Image} srcImage source image.
+ * @param {Integer} sx x-coordinate of the source's upper-left corner.
+ * @param {Integer} sy y-coordinate of the source's upper-left corner.
+ * @param {Integer} sw source image width.
+ * @param {Integer} sh source image height.
+ * @param {Integer} dx x-coordinate of the destination's upper-left corner.
+ * @param {Integer} dy y-coordinate of the destination's upper-left corner.
+ * @param {Integer} dw destination image width.
+ * @param {Integer} dh destination image height.
+ * @param {(BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL)} blendMode the blend mode. either
+ * BLEND, DARKEST, LIGHTEST, DIFFERENCE,
+ * MULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,
+ * SOFT_LIGHT, DODGE, BURN, ADD or NORMAL.
+ *
+ * @example
+ *
+ *
+ * let img0;
+ * let img1;
+ *
+ * async function setup() {
+ * // Load the images.
+ * img0 = await loadImage('assets/rockies.jpg');
+ * img1 = await loadImage('assets/bricks_third.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Use the mountains as the background.
+ * background(img0);
+ *
+ * // Display the bricks.
+ * image(img1, 0, 0);
+ *
+ * // Display the bricks faded into the landscape.
+ * blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);
+ *
+ * describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears faded on the right of the image.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img0;
+ * let img1;
+ *
+ * async function setup() {
+ * // Load the images.
+ * img0 = await loadImage('assets/rockies.jpg');
+ * img1 = await loadImage('assets/bricks_third.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Use the mountains as the background.
+ * background(img0);
+ *
+ * // Display the bricks.
+ * image(img1, 0, 0);
+ *
+ * // Display the bricks partially transparent.
+ * blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);
+ *
+ * describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears transparent on the right of the image.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img0;
+ * let img1;
+ *
+ * async function setup() {
+ * // Load the images.
+ * img0 = await loadImage('assets/rockies.jpg');
+ * img1 = await loadImage('assets/bricks_third.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Use the mountains as the background.
+ * background(img0);
+ *
+ * // Display the bricks.
+ * image(img1, 0, 0);
+ *
+ * // Display the bricks washed out into the landscape.
+ * blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, ADD);
+ *
+ * describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears washed out on the right of the image.');
+ * }
+ *
+ *
+ */
+ /**
+ * @method blend
+ * @param {Integer} sx
+ * @param {Integer} sy
+ * @param {Integer} sw
+ * @param {Integer} sh
+ * @param {Integer} dx
+ * @param {Integer} dy
+ * @param {Integer} dw
+ * @param {Integer} dh
+ * @param {(BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL)} blendMode
+ */
+ fn.blend = function(...args) {
+ // p5._validateParameters('blend', args);
+ if (this._renderer) {
+ this._renderer.blend(...args);
+ } else {
+ p5.Renderer2D.prototype.blend.apply(this, args);
+ }
+ };
-/**
- * Copies pixels from a source image to a region of the canvas.
- *
- * The first parameter, `srcImage`, is the
- * p5.Image object to blend. The source image can be
- * the canvas itself or a
- * p5.Image object. `copy()` will scale pixels from
- * the source region if it isn't the same size as the destination region.
- *
- * The next four parameters, `sx`, `sy`, `sw`, and `sh` determine the region
- * to copy from the source image. `(sx, sy)` is the top-left corner of the
- * region. `sw` and `sh` are the region's width and height.
- *
- * The next four parameters, `dx`, `dy`, `dw`, and `dh` determine the region
- * of the canvas to copy into. `(dx, dy)` is the top-left corner of the
- * region. `dw` and `dh` are the region's width and height.
- *
- * @method copy
- * @param {p5.Image|p5.Element} srcImage source image.
- * @param {Integer} sx x-coordinate of the source's upper-left corner.
- * @param {Integer} sy y-coordinate of the source's upper-left corner.
- * @param {Integer} sw source image width.
- * @param {Integer} sh source image height.
- * @param {Integer} dx x-coordinate of the destination's upper-left corner.
- * @param {Integer} dy y-coordinate of the destination's upper-left corner.
- * @param {Integer} dw destination image width.
- * @param {Integer} dh destination image height.
- *
- * @example
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Use the mountains as the background.
- * background(img);
- *
- * // Copy a region of pixels to another spot.
- * copy(img, 7, 22, 10, 10, 35, 25, 50, 50);
- *
- * // Outline the copied region.
- * stroke(255);
- * noFill();
- * square(7, 22, 10);
- *
- * describe('An image of a mountain landscape. A square region is outlined in white. A larger square contains a pixelated view of the outlined region.');
- * }
- *
- *
- */
-/**
- * @method copy
- * @param {Integer} sx
- * @param {Integer} sy
- * @param {Integer} sw
- * @param {Integer} sh
- * @param {Integer} dx
- * @param {Integer} dy
- * @param {Integer} dw
- * @param {Integer} dh
- */
-p5.prototype.copy = function(...args) {
- p5._validateParameters('copy', args);
+ /**
+ * Copies pixels from a source image to a region of the canvas.
+ *
+ * The first parameter, `srcImage`, is the
+ * p5.Image object to blend. The source image can be
+ * the canvas itself or a
+ * p5.Image object. `copy()` will scale pixels from
+ * the source region if it isn't the same size as the destination region.
+ *
+ * The next four parameters, `sx`, `sy`, `sw`, and `sh` determine the region
+ * to copy from the source image. `(sx, sy)` is the top-left corner of the
+ * region. `sw` and `sh` are the region's width and height.
+ *
+ * The next four parameters, `dx`, `dy`, `dw`, and `dh` determine the region
+ * of the canvas to copy into. `(dx, dy)` is the top-left corner of the
+ * region. `dw` and `dh` are the region's width and height.
+ *
+ * @method copy
+ * @param {p5.Image|p5.Element} srcImage source image.
+ * @param {Integer} sx x-coordinate of the source's upper-left corner.
+ * @param {Integer} sy y-coordinate of the source's upper-left corner.
+ * @param {Integer} sw source image width.
+ * @param {Integer} sh source image height.
+ * @param {Integer} dx x-coordinate of the destination's upper-left corner.
+ * @param {Integer} dy y-coordinate of the destination's upper-left corner.
+ * @param {Integer} dw destination image width.
+ * @param {Integer} dh destination image height.
+ *
+ * @example
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Use the mountains as the background.
+ * background(img);
+ *
+ * // Copy a region of pixels to another spot.
+ * copy(img, 7, 22, 10, 10, 35, 25, 50, 50);
+ *
+ * // Outline the copied region.
+ * stroke(255);
+ * noFill();
+ * square(7, 22, 10);
+ *
+ * describe('An image of a mountain landscape. A square region is outlined in white. A larger square contains a pixelated view of the outlined region.');
+ * }
+ *
+ *
+ */
+ /**
+ * @method copy
+ * @param {Integer} sx
+ * @param {Integer} sy
+ * @param {Integer} sw
+ * @param {Integer} sh
+ * @param {Integer} dx
+ * @param {Integer} dy
+ * @param {Integer} dw
+ * @param {Integer} dh
+ */
+ fn.copy = function(...args) {
+ let srcImage, sx, sy, sw, sh, dx, dy, dw, dh;
+ if (args.length === 9) {
+ srcImage = args[0];
+ sx = args[1];
+ sy = args[2];
+ sw = args[3];
+ sh = args[4];
+ dx = args[5];
+ dy = args[6];
+ dw = args[7];
+ dh = args[8];
+ } else if (args.length === 8) {
+ srcImage = this;
+ sx = args[0];
+ sy = args[1];
+ sw = args[2];
+ sh = args[3];
+ dx = args[4];
+ dy = args[5];
+ dw = args[6];
+ dh = args[7];
+ } else {
+ throw new Error('Signature not supported');
+ }
- let srcImage, sx, sy, sw, sh, dx, dy, dw, dh;
- if (args.length === 9) {
- srcImage = args[0];
- sx = args[1];
- sy = args[2];
- sw = args[3];
- sh = args[4];
- dx = args[5];
- dy = args[6];
- dw = args[7];
- dh = args[8];
- } else if (args.length === 8) {
- srcImage = this;
- sx = args[0];
- sy = args[1];
- sw = args[2];
- sh = args[3];
- dx = args[4];
- dy = args[5];
- dw = args[6];
- dh = args[7];
- } else {
- throw new Error('Signature not supported');
- }
+ fn._copyHelper(this, srcImage, sx, sy, sw, sh, dx, dy, dw, dh);
+ };
- p5.prototype._copyHelper(this, srcImage, sx, sy, sw, sh, dx, dy, dw, dh);
-};
+ fn._copyHelper = (
+ dstImage,
+ srcImage,
+ sx,
+ sy,
+ sw,
+ sh,
+ dx,
+ dy,
+ dw,
+ dh
+ ) => {
+ const s = srcImage.canvas.width / srcImage.width;
+ // adjust coord system for 3D when renderer
+ // ie top-left = -width/2, -height/2
+ let sxMod = 0;
+ let syMod = 0;
+ if (srcImage._renderer && srcImage._renderer.isP3D) {
+ sxMod = srcImage.width / 2;
+ syMod = srcImage.height / 2;
+ }
+ if (dstImage._renderer && dstImage._renderer.isP3D) {
+ dstImage.push();
+ dstImage.resetMatrix();
+ dstImage.noLights();
+ dstImage.blendMode(dstImage.BLEND);
+ dstImage.imageMode(dstImage.CORNER);
+ dstImage._renderer.image(
+ srcImage,
+ sx + sxMod,
+ sy + syMod,
+ sw,
+ sh,
+ dx,
+ dy,
+ dw,
+ dh
+ );
+ dstImage.pop();
+ } else {
+ dstImage.drawingContext.drawImage(
+ srcImage.canvas,
+ s * (sx + sxMod),
+ s * (sy + syMod),
+ s * sw,
+ s * sh,
+ dx,
+ dy,
+ dw,
+ dh
+ );
+ }
+ };
-p5.prototype._copyHelper = (
- dstImage,
- srcImage,
- sx,
- sy,
- sw,
- sh,
- dx,
- dy,
- dw,
- dh
-) => {
- const s = srcImage.canvas.width / srcImage.width;
- // adjust coord system for 3D when renderer
- // ie top-left = -width/2, -height/2
- let sxMod = 0;
- let syMod = 0;
- if (srcImage._renderer && srcImage._renderer.isP3D) {
- sxMod = srcImage.width / 2;
- syMod = srcImage.height / 2;
- }
- if (dstImage._renderer && dstImage._renderer.isP3D) {
- dstImage.push();
- dstImage.resetMatrix();
- dstImage.noLights();
- dstImage.blendMode(dstImage.BLEND);
- dstImage.imageMode(dstImage.CORNER);
- p5.RendererGL.prototype.image.call(
- dstImage._renderer,
- srcImage,
- sx + sxMod,
- sy + syMod,
- sw,
- sh,
- dx,
- dy,
- dw,
- dh
- );
- dstImage.pop();
- } else {
- dstImage.drawingContext.drawImage(
- srcImage.canvas,
- s * (sx + sxMod),
- s * (sy + syMod),
- s * sw,
- s * sh,
- dx,
- dy,
- dw,
- dh
- );
- }
-};
+ /**
+ * Applies an image filter to the canvas.
+ *
+ * The preset options are:
+ *
+ * `INVERT`
+ * Inverts the colors in the image. No parameter is used.
+ *
+ * `GRAY`
+ * Converts the image to grayscale. No parameter is used.
+ *
+ * `THRESHOLD`
+ * Converts the image to black and white. Pixels with a grayscale value
+ * above a given threshold are converted to white. The rest are converted to
+ * black. The threshold must be between 0.0 (black) and 1.0 (white). If no
+ * value is specified, 0.5 is used.
+ *
+ * `OPAQUE`
+ * Sets the alpha channel to entirely opaque. No parameter is used.
+ *
+ * `POSTERIZE`
+ * Limits the number of colors in the image. Each color channel is limited to
+ * the number of colors specified. Values between 2 and 255 are valid, but
+ * results are most noticeable with lower values. The default value is 4.
+ *
+ * `BLUR`
+ * Blurs the image. The level of blurring is specified by a blur radius. Larger
+ * values increase the blur. The default value is 4. A gaussian blur is used
+ * in `P2D` mode. A box blur is used in `WEBGL` mode.
+ *
+ * `ERODE`
+ * Reduces the light areas. No parameter is used.
+ *
+ * `DILATE`
+ * Increases the light areas. No parameter is used.
+ *
+ * `filter()` uses WebGL in the background by default because it's faster.
+ * This can be disabled in `P2D` mode by adding a `false` argument, as in
+ * `filter(BLUR, false)`. This may be useful to keep computation off the GPU
+ * or to work around a lack of WebGL support.
+ *
+ * In WebgL mode, `filter()` can also use custom shaders. See
+ * createFilterShader() for more
+ * information.
+ *
+ *
+ * @method filter
+ * @param {(THRESHOLD|GRAY|OPAQUE|INVERT|POSTERIZE|BLUR|ERODE|DILATE|BLUR)} filterType either THRESHOLD, GRAY, OPAQUE, INVERT,
+ * POSTERIZE, BLUR, ERODE, DILATE or BLUR.
+ * @param {Number} [filterParam] parameter unique to each filter.
+ * @param {Boolean} [useWebGL=true] flag to control whether to use fast
+ * WebGL filters (GPU) or original image
+ * filters (CPU); defaults to `true`.
+ *
+ * @example
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Apply the INVERT filter.
+ * filter(INVERT);
+ *
+ * describe('A blue brick wall.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Apply the GRAY filter.
+ * filter(GRAY);
+ *
+ * describe('A brick wall drawn in grayscale.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Apply the THRESHOLD filter.
+ * filter(THRESHOLD);
+ *
+ * describe('A brick wall drawn in black and white.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Apply the OPAQUE filter.
+ * filter(OPAQUE);
+ *
+ * describe('A red brick wall.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Apply the POSTERIZE filter.
+ * filter(POSTERIZE, 3);
+ *
+ * describe('An image of a red brick wall drawn with limited color palette.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Apply the BLUR filter.
+ * filter(BLUR, 3);
+ *
+ * describe('A blurry image of a red brick wall.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Apply the DILATE filter.
+ * filter(DILATE);
+ *
+ * describe('A red brick wall with bright lines between each brick.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Apply the ERODE filter.
+ * filter(ERODE);
+ *
+ * describe('A red brick wall with faint lines between each brick.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/bricks.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Apply the BLUR filter.
+ * // Don't use WebGL.
+ * filter(BLUR, 3, false);
+ *
+ * describe('A blurry image of a red brick wall.');
+ * }
+ *
+ *
+ */
-/**
- * Applies an image filter to the canvas.
- *
- * The preset options are:
- *
- * `INVERT`
- * Inverts the colors in the image. No parameter is used.
- *
- * `GRAY`
- * Converts the image to grayscale. No parameter is used.
- *
- * `THRESHOLD`
- * Converts the image to black and white. Pixels with a grayscale value
- * above a given threshold are converted to white. The rest are converted to
- * black. The threshold must be between 0.0 (black) and 1.0 (white). If no
- * value is specified, 0.5 is used.
- *
- * `OPAQUE`
- * Sets the alpha channel to entirely opaque. No parameter is used.
- *
- * `POSTERIZE`
- * Limits the number of colors in the image. Each color channel is limited to
- * the number of colors specified. Values between 2 and 255 are valid, but
- * results are most noticeable with lower values. The default value is 4.
- *
- * `BLUR`
- * Blurs the image. The level of blurring is specified by a blur radius. Larger
- * values increase the blur. The default value is 4. A gaussian blur is used
- * in `P2D` mode. A box blur is used in `WEBGL` mode.
- *
- * `ERODE`
- * Reduces the light areas. No parameter is used.
- *
- * `DILATE`
- * Increases the light areas. No parameter is used.
- *
- * `filter()` uses WebGL in the background by default because it's faster.
- * This can be disabled in `P2D` mode by adding a `false` argument, as in
- * `filter(BLUR, false)`. This may be useful to keep computation off the GPU
- * or to work around a lack of WebGL support.
- *
- * In WebgL mode, `filter()` can also use custom shaders. See
- * createFilterShader() for more
- * information.
- *
- *
- * @method filter
- * @param {Constant} filterType either THRESHOLD, GRAY, OPAQUE, INVERT,
- * POSTERIZE, BLUR, ERODE, DILATE or BLUR.
- * @param {Number} [filterParam] parameter unique to each filter.
- * @param {Boolean} [useWebGL] flag to control whether to use fast
- * WebGL filters (GPU) or original image
- * filters (CPU); defaults to `true`.
- *
- * @example
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Apply the INVERT filter.
- * filter(INVERT);
- *
- * describe('A blue brick wall.');
- * }
- *
- *
- *
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Apply the GRAY filter.
- * filter(GRAY);
- *
- * describe('A brick wall drawn in grayscale.');
- * }
- *
- *
- *
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Apply the THRESHOLD filter.
- * filter(THRESHOLD);
- *
- * describe('A brick wall drawn in black and white.');
- * }
- *
- *
- *
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Apply the OPAQUE filter.
- * filter(OPAQUE);
- *
- * describe('A red brick wall.');
- * }
- *
- *
- *
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Apply the POSTERIZE filter.
- * filter(POSTERIZE, 3);
- *
- * describe('An image of a red brick wall drawn with limited color palette.');
- * }
- *
- *
- *
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Apply the BLUR filter.
- * filter(BLUR, 3);
- *
- * describe('A blurry image of a red brick wall.');
- * }
- *
- *
- *
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Apply the DILATE filter.
- * filter(DILATE);
- *
- * describe('A red brick wall with bright lines between each brick.');
- * }
- *
- *
- *
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Apply the ERODE filter.
- * filter(ERODE);
- *
- * describe('A red brick wall with faint lines between each brick.');
- * }
- *
- *
- *
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/bricks.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Apply the BLUR filter.
- * // Don't use WebGL.
- * filter(BLUR, 3, false);
- *
- * describe('A blurry image of a red brick wall.');
- * }
- *
- *
- */
+ /**
+ * @method getFilterGraphicsLayer
+ * @private
+ * @returns {p5.Graphics}
+ */
+ fn.getFilterGraphicsLayer = function() {
+ return this._renderer.getFilterGraphicsLayer();
+ };
-/**
- * @method getFilterGraphicsLayer
- * @private
- * @returns {p5.Graphics}
- */
-p5.prototype.getFilterGraphicsLayer = function() {
- return this._renderer.getFilterGraphicsLayer();
-};
+ /**
+ * @method filter
+ * @param {(THRESHOLD|GRAY|OPAQUE|INVERT|POSTERIZE|BLUR|ERODE|DILATE|BLUR)} filterType
+ * @param {Number} [filterParam]
+ * @param {Boolean} [useWebGL=true]
+ */
+ /**
+ * @method filter
+ * @param {p5.Shader} shaderFilter shader that's been loaded, with the
+ * frag shader using a `tex0` uniform.
+ */
+ fn.filter = function(...args) {
+ // p5._validateParameters('filter', args);
-/**
- * @method filter
- * @param {Constant} filterType
- * @param {Boolean} [useWebGL]
- */
-/**
- * @method filter
- * @param {p5.Shader} shaderFilter shader that's been loaded, with the
- * frag shader using a `tex0` uniform.
- */
-p5.prototype.filter = function(...args) {
- p5._validateParameters('filter', args);
+ let { shader, operation, value, useWebGL } = parseFilterArgs(...args);
- let { shader, operation, value, useWebGL } = parseFilterArgs(...args);
+ // when passed a shader, use it directly
+ if (this._renderer.isP3D && shader) {
+ this._renderer.filter(shader);
+ return;
+ }
- // when passed a shader, use it directly
- if (this._renderer.isP3D && shader) {
- p5.RendererGL.prototype.filter.call(this._renderer, shader);
- return;
- }
+ // when opting out of webgl, use old pixels method
+ if (!useWebGL && !this._renderer.isP3D) {
+ if (this.canvas !== undefined) {
+ Filters.apply(this.canvas, Filters[operation], value);
+ } else {
+ Filters.apply(this.elt, Filters[operation], value);
+ }
+ return;
+ }
- // when opting out of webgl, use old pixels method
- if (!useWebGL && !this._renderer.isP3D) {
- if (this.canvas !== undefined) {
- Filters.apply(this.canvas, Filters[operation], value);
- } else {
- Filters.apply(this.elt, Filters[operation], value);
+ if(!useWebGL && this._renderer.isP3D) {
+ console.warn('filter() with useWebGL=false is not supported in WEBGL');
}
- return;
- }
- if(!useWebGL && this._renderer.isP3D) {
- console.warn('filter() with useWebGL=false is not supported in WEBGL');
- }
+ // when this is a webgl renderer, apply constant shader filter
+ if (this._renderer.isP3D) {
+ this._renderer.filter(operation, value);
+ }
- // when this is a webgl renderer, apply constant shader filter
- if (this._renderer.isP3D) {
- p5.RendererGL.prototype.filter.call(this._renderer, operation, value);
- }
+ // when this is P2D renderer, create/use hidden webgl renderer
+ else {
- // when this is P2D renderer, create/use hidden webgl renderer
- else {
- const filterGraphicsLayer = this.getFilterGraphicsLayer();
+ if (shader) {
+ this._renderer.filterRenderer.setOperation(operation, value, shader);
+ } else {
+ this._renderer.filterRenderer.setOperation(operation, value);
+ }
- // copy p2d canvas contents to secondary webgl renderer
- // dest
- filterGraphicsLayer.copy(
- // src
- this._renderer,
- // src coods
- 0, 0, this.width, this.height,
- // dest coords
- -this.width/2, -this.height/2, this.width, this.height
- );
- //clearing the main canvas
- this._renderer.clear();
+ this._renderer.filterRenderer.applyFilter();
+ }
+ };
- this._renderer.resetMatrix();
- // filter it with shaders
- filterGraphicsLayer.filter(...args);
+ function parseFilterArgs(...args) {
+ // args could be:
+ // - operation, value, [useWebGL]
+ // - operation, [useWebGL]
+ // - shader
- // copy secondary webgl renderer back to original p2d canvas
- this.copy(
- // src
- filterGraphicsLayer._renderer,
- // src coods
- 0, 0, this.width, this.height,
- // dest coords
- 0, 0, this.width, this.height
- );
- filterGraphicsLayer.clear(); // prevent feedback effects on p2d canvas
- }
-};
+ let result = {
+ shader: undefined,
+ operation: undefined,
+ value: undefined,
+ useWebGL: true
+ };
-function parseFilterArgs(...args) {
- // args could be:
- // - operation, value, [useWebGL]
- // - operation, [useWebGL]
- // - shader
+ if (args[0] instanceof p5.Shader) {
+ result.shader = args[0];
+ return result;
+ }
+ else {
+ result.operation = args[0];
+ }
- let result = {
- shader: undefined,
- operation: undefined,
- value: undefined,
- useWebGL: true
- };
+ if (args.length > 1 && typeof args[1] === 'number') {
+ result.value = args[1];
+ }
- if (args[0] instanceof p5.Shader) {
- result.shader = args[0];
+ if (args[args.length-1] === false) {
+ result.useWebGL = false;
+ }
return result;
}
- else {
- result.operation = args[0];
- }
-
- if (args.length > 1 && typeof args[1] === 'number') {
- result.value = args[1];
- }
- if (args[args.length-1] === false) {
- result.useWebGL = false;
- }
- return result;
-}
+ /**
+ * Gets a pixel or a region of pixels from the canvas.
+ *
+ * `get()` is easy to use but it's not as fast as
+ * pixels. Use pixels
+ * to read many pixel values.
+ *
+ * The version of `get()` with no parameters returns the entire canvas.
+ *
+ * The version of `get()` with two parameters interprets them as
+ * coordinates. It returns an array with the `[R, G, B, A]` values of the
+ * pixel at the given point.
+ *
+ * The version of `get()` with four parameters interprets them as coordinates
+ * and dimensions. It returns a subsection of the canvas as a
+ * p5.Image object. The first two parameters are the
+ * coordinates for the upper-left corner of the subsection. The last two
+ * parameters are the width and height of the subsection.
+ *
+ * Use p5.Image.get() to work directly with
+ * p5.Image objects.
+ *
+ * @method get
+ * @param {Number} x x-coordinate of the pixel.
+ * @param {Number} y y-coordinate of the pixel.
+ * @param {Number} w width of the subsection to be returned.
+ * @param {Number} h height of the subsection to be returned.
+ * @return {p5.Image} subsection as a p5.Image object.
+ * @example
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Get the entire canvas.
+ * let c = get();
+ *
+ * // Display half the canvas.
+ * image(c, 50, 0);
+ *
+ * describe('Two identical mountain landscapes shown side-by-side.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Get the color of a pixel.
+ * let c = get(50, 90);
+ *
+ * // Style the square with the pixel's color.
+ * fill(c);
+ * noStroke();
+ *
+ * // Display the square.
+ * square(25, 25, 50);
+ *
+ * describe('A mountain landscape with an olive green square in its center.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0);
+ *
+ * // Get a region of the image.
+ * let c = get(0, 0, 50, 50);
+ *
+ * // Display the region.
+ * image(c, 50, 50);
+ *
+ * describe('A mountain landscape drawn on top of another mountain landscape.');
+ * }
+ *
+ *
+ */
+ /**
+ * @method get
+ * @return {p5.Image} whole canvas as a p5.Image.
+ */
+ /**
+ * @method get
+ * @param {Number} x
+ * @param {Number} y
+ * @return {Number[]} color of the pixel at (x, y) in array format `[R, G, B, A]`.
+ */
+ fn.get = function(x, y, w, h) {
+ // p5._validateParameters('get', arguments);
+ return this._renderer.get(...arguments);
+ };
-/**
- * Gets a pixel or a region of pixels from the canvas.
- *
- * `get()` is easy to use but it's not as fast as
- * pixels. Use pixels
- * to read many pixel values.
- *
- * The version of `get()` with no parameters returns the entire canvas.
- *
- * The version of `get()` with two parameters interprets them as
- * coordinates. It returns an array with the `[R, G, B, A]` values of the
- * pixel at the given point.
- *
- * The version of `get()` with four parameters interprets them as coordinates
- * and dimensions. It returns a subsection of the canvas as a
- * p5.Image object. The first two parameters are the
- * coordinates for the upper-left corner of the subsection. The last two
- * parameters are the width and height of the subsection.
- *
- * Use p5.Image.get() to work directly with
- * p5.Image objects.
- *
- * @method get
- * @param {Number} x x-coordinate of the pixel.
- * @param {Number} y y-coordinate of the pixel.
- * @param {Number} w width of the subsection to be returned.
- * @param {Number} h height of the subsection to be returned.
- * @return {p5.Image} subsection as a p5.Image object.
- * @example
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Get the entire canvas.
- * let c = get();
- *
- * // Display half the canvas.
- * image(c, 50, 0);
- *
- * describe('Two identical mountain landscapes shown side-by-side.');
- * }
- *
- *
- *
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Get the color of a pixel.
- * let c = get(50, 90);
- *
- * // Style the square with the pixel's color.
- * fill(c);
- * noStroke();
- *
- * // Display the square.
- * square(25, 25, 50);
- *
- * describe('A mountain landscape with an olive green square in its center.');
- * }
- *
- *
- *
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0);
- *
- * // Get a region of the image.
- * let c = get(0, 0, 50, 50);
- *
- * // Display the region.
- * image(c, 50, 50);
- *
- * describe('A mountain landscape drawn on top of another mountain landscape.');
- * }
- *
- *
- */
-/**
- * @method get
- * @return {p5.Image} whole canvas as a p5.Image.
- */
-/**
- * @method get
- * @param {Number} x
- * @param {Number} y
- * @return {Number[]} color of the pixel at (x, y) in array format `[R, G, B, A]`.
- */
-p5.prototype.get = function(x, y, w, h) {
- p5._validateParameters('get', arguments);
- return this._renderer.get(...arguments);
-};
+ /**
+ * Loads the current value of each pixel on the canvas into the
+ * pixels array.
+ *
+ * `loadPixels()` must be called before reading from or writing to
+ * pixels.
+ *
+ * @method loadPixels
+ * @example
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0, 100, 100);
+ *
+ * // Get the pixel density.
+ * let d = pixelDensity();
+ *
+ * // Calculate the halfway index in the pixels array.
+ * let halfImage = 4 * (d * width) * (d * height / 2);
+ *
+ * // Load the pixels array.
+ * loadPixels();
+ *
+ * // Copy the top half of the canvas to the bottom.
+ * for (let i = 0; i < halfImage; i += 1) {
+ * pixels[i + halfImage] = pixels[i];
+ * }
+ *
+ * // Update the canvas.
+ * updatePixels();
+ *
+ * describe('Two identical images of mountain landscapes, one on top of the other.');
+ * }
+ *
+ *
+ */
+ fn.loadPixels = function(...args) {
+ // p5._validateParameters('loadPixels', args);
+ this._renderer.loadPixels();
+ };
-/**
- * Loads the current value of each pixel on the canvas into the
- * pixels array.
- *
- * `loadPixels()` must be called before reading from or writing to
- * pixels.
- *
- * @method loadPixels
- * @example
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0, 100, 100);
- *
- * // Get the pixel density.
- * let d = pixelDensity();
- *
- * // Calculate the halfway index in the pixels array.
- * let halfImage = 4 * (d * width) * (d * height / 2);
- *
- * // Load the pixels array.
- * loadPixels();
- *
- * // Copy the top half of the canvas to the bottom.
- * for (let i = 0; i < halfImage; i += 1) {
- * pixels[i + halfImage] = pixels[i];
- * }
- *
- * // Update the canvas.
- * updatePixels();
- *
- * describe('Two identical images of mountain landscapes, one on top of the other.');
- * }
- *
- *
- */
-p5.prototype.loadPixels = function(...args) {
- p5._validateParameters('loadPixels', args);
- this._renderer.loadPixels();
-};
+ /**
+ * Sets the color of a pixel or draws an image to the canvas.
+ *
+ * `set()` is easy to use but it's not as fast as
+ * pixels. Use pixels
+ * to set many pixel values.
+ *
+ * `set()` interprets the first two parameters as x- and y-coordinates. It
+ * interprets the last parameter as a grayscale value, a `[R, G, B, A]` pixel
+ * array, a p5.Color object, or a
+ * p5.Image object. If an image is passed, the first
+ * two parameters set the coordinates for the image's upper-left corner,
+ * regardless of the current imageMode().
+ *
+ * updatePixels() must be called after using
+ * `set()` for changes to appear.
+ *
+ * @method set
+ * @param {Number} x x-coordinate of the pixel.
+ * @param {Number} y y-coordinate of the pixel.
+ * @param {Number|Number[]|Object} c grayscale value | pixel array |
+ * p5.Color object | p5.Image to copy.
+ * @example
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Set four pixels to black.
+ * set(30, 20, 0);
+ * set(85, 20, 0);
+ * set(85, 75, 0);
+ * set(30, 75, 0);
+ *
+ * // Update the canvas.
+ * updatePixels();
+ *
+ * describe('Four black dots arranged in a square drawn on a gray background.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(200);
+ *
+ * // Create a p5.Color object.
+ * let black = color(0);
+ *
+ * // Set four pixels to black.
+ * set(30, 20, black);
+ * set(85, 20, black);
+ * set(85, 75, black);
+ * set(30, 75, black);
+ *
+ * // Update the canvas.
+ * updatePixels();
+ *
+ * describe('Four black dots arranged in a square drawn on a gray background.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * function setup() {
+ * createCanvas(100, 100);
+ *
+ * background(255);
+ *
+ * // Draw a horizontal color gradient.
+ * for (let x = 0; x < 100; x += 1) {
+ * for (let y = 0; y < 100; y += 1) {
+ * // Calculate the grayscale value.
+ * let c = map(x, 0, 100, 0, 255);
+ *
+ * // Set the pixel using the grayscale value.
+ * set(x, y, c);
+ * }
+ * }
+ *
+ * // Update the canvas.
+ * updatePixels();
+ *
+ * describe('A horiztonal color gradient from black to white.');
+ * }
+ *
+ *
+ *
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Use the image to set all pixels.
+ * set(0, 0, img);
+ *
+ * // Update the canvas.
+ * updatePixels();
+ *
+ * describe('An image of a mountain landscape.');
+ * }
+ *
+ *
+ */
+ fn.set = function(x, y, imgOrCol) {
+ this._renderer.set(x, y, imgOrCol);
+ };
-/**
- * Sets the color of a pixel or draws an image to the canvas.
- *
- * `set()` is easy to use but it's not as fast as
- * pixels. Use pixels
- * to set many pixel values.
- *
- * `set()` interprets the first two parameters as x- and y-coordinates. It
- * interprets the last parameter as a grayscale value, a `[R, G, B, A]` pixel
- * array, a p5.Color object, or a
- * p5.Image object. If an image is passed, the first
- * two parameters set the coordinates for the image's upper-left corner,
- * regardless of the current imageMode().
- *
- * updatePixels() must be called after using
- * `set()` for changes to appear.
- *
- * @method set
- * @param {Number} x x-coordinate of the pixel.
- * @param {Number} y y-coordinate of the pixel.
- * @param {Number|Number[]|Object} c grayscale value | pixel array |
- * p5.Color object | p5.Image to copy.
- * @example
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Set four pixels to black.
- * set(30, 20, 0);
- * set(85, 20, 0);
- * set(85, 75, 0);
- * set(30, 75, 0);
- *
- * // Update the canvas.
- * updatePixels();
- *
- * describe('Four black dots arranged in a square drawn on a gray background.');
- * }
- *
- *
- *
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object.
- * let black = color(0);
- *
- * // Set four pixels to black.
- * set(30, 20, black);
- * set(85, 20, black);
- * set(85, 75, black);
- * set(30, 75, black);
- *
- * // Update the canvas.
- * updatePixels();
- *
- * describe('Four black dots arranged in a square drawn on a gray background.');
- * }
- *
- *
- *
- *
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(255);
- *
- * // Draw a horizontal color gradient.
- * for (let x = 0; x < 100; x += 1) {
- * for (let y = 0; y < 100; y += 1) {
- * // Calculate the grayscale value.
- * let c = map(x, 0, 100, 0, 255);
- *
- * // Set the pixel using the grayscale value.
- * set(x, y, c);
- * }
- * }
- *
- * // Update the canvas.
- * updatePixels();
- *
- * describe('A horiztonal color gradient from black to white.');
- * }
- *
- *
- *
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Use the image to set all pixels.
- * set(0, 0, img);
- *
- * // Update the canvas.
- * updatePixels();
- *
- * describe('An image of a mountain landscape.');
- * }
- *
- *
- */
-p5.prototype.set = function(x, y, imgOrCol) {
- this._renderer.set(x, y, imgOrCol);
-};
+ /**
+ * Updates the canvas with the RGBA values in the
+ * pixels array.
+ *
+ * `updatePixels()` only needs to be called after changing values in the
+ * pixels array. Such changes can be made directly
+ * after calling loadPixels() or by calling
+ * set().
+ *
+ * @method updatePixels
+ * @param {Number} [x] x-coordinate of the upper-left corner of region
+ * to update.
+ * @param {Number} [y] y-coordinate of the upper-left corner of region
+ * to update.
+ * @param {Number} [w] width of region to update.
+ * @param {Number} [h] height of region to update.
+ * @example
+ *
+ *
+ * let img;
+ *
+ * async function setup() {
+ * // Load the image.
+ * img = await loadImage('assets/rockies.jpg');
+ *
+ * createCanvas(100, 100);
+ *
+ * // Display the image.
+ * image(img, 0, 0, 100, 100);
+ *
+ * // Get the pixel density.
+ * let d = pixelDensity();
+ *
+ * // Calculate the halfway index in the pixels array.
+ * let halfImage = 4 * (d * width) * (d * height / 2);
+ *
+ * // Load the pixels array.
+ * loadPixels();
+ *
+ * // Copy the top half of the canvas to the bottom.
+ * for (let i = 0; i < halfImage; i += 1) {
+ * pixels[i + halfImage] = pixels[i];
+ * }
+ *
+ * // Update the canvas.
+ * updatePixels();
+ *
+ * describe('Two identical images of mountain landscapes, one on top of the other.');
+ * }
+ *
+ *
+ */
+ fn.updatePixels = function(x, y, w, h) {
+ // p5._validateParameters('updatePixels', arguments);
+ // graceful fail - if loadPixels() or set() has not been called, pixel
+ // array will be empty, ignore call to updatePixels()
+ if (this.pixels.length === 0) {
+ return;
+ }
+ this._renderer.updatePixels(x, y, w, h);
+ };
+}
-/**
- * Updates the canvas with the RGBA values in the
- * pixels array.
- *
- * `updatePixels()` only needs to be called after changing values in the
- * pixels array. Such changes can be made directly
- * after calling loadPixels() or by calling
- * set().
- *
- * @method updatePixels
- * @param {Number} [x] x-coordinate of the upper-left corner of region
- * to update.
- * @param {Number} [y] y-coordinate of the upper-left corner of region
- * to update.
- * @param {Number} [w] width of region to update.
- * @param {Number} [h] height of region to update.
- * @example
- *
- *
- * let img;
- *
- * // Load the image.
- * function preload() {
- * img = loadImage('assets/rockies.jpg');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * // Display the image.
- * image(img, 0, 0, 100, 100);
- *
- * // Get the pixel density.
- * let d = pixelDensity();
- *
- * // Calculate the halfway index in the pixels array.
- * let halfImage = 4 * (d * width) * (d * height / 2);
- *
- * // Load the pixels array.
- * loadPixels();
- *
- * // Copy the top half of the canvas to the bottom.
- * for (let i = 0; i < halfImage; i += 1) {
- * pixels[i + halfImage] = pixels[i];
- * }
- *
- * // Update the canvas.
- * updatePixels();
- *
- * describe('Two identical images of mountain landscapes, one on top of the other.');
- * }
- *
- *
- */
-p5.prototype.updatePixels = function(x, y, w, h) {
- p5._validateParameters('updatePixels', arguments);
- // graceful fail - if loadPixels() or set() has not been called, pixel
- // array will be empty, ignore call to updatePixels()
- if (this.pixels.length === 0) {
- return;
- }
- this._renderer.updatePixels(x, y, w, h);
-};
+export default pixels;
-export default p5;
+if(typeof p5 !== 'undefined'){
+ pixels(p5, p5.prototype);
+}
diff --git a/src/io/csv.js b/src/io/csv.js
new file mode 100644
index 0000000000..1714ee2a7f
--- /dev/null
+++ b/src/io/csv.js
@@ -0,0 +1,211 @@
+/*
+The MIT License (MIT)
+
+Copyright (c) 2019 Evan Plaice
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+export function parse (csv, options, reviver = v => v) {
+ const ctx = Object.create(null);
+ ctx.options = options || {};
+ ctx.reviver = reviver;
+ ctx.value = '';
+ ctx.entry = [];
+ ctx.output = [];
+ ctx.col = 1;
+ ctx.row = 1;
+
+ ctx.options.delimiter = ctx.options.delimiter === undefined ? '"' : options.delimiter;
+ if(ctx.options.delimiter.length > 1 || ctx.options.delimiter.length === 0)
+ throw Error(`CSVError: delimiter must be one character [${ctx.options.separator}]`);
+
+ ctx.options.separator = ctx.options.separator === undefined ? ',' : options.separator;
+ if(ctx.options.separator.length > 1 || ctx.options.separator.length === 0)
+ throw Error(`CSVError: separator must be one character [${ctx.options.separator}]`);
+
+ const lexer = new RegExp(`${escapeRegExp(ctx.options.delimiter)}|${escapeRegExp(ctx.options.separator)}|\r\n|\n|\r|[^${escapeRegExp(ctx.options.delimiter)}${escapeRegExp(ctx.options.separator)}\r\n]+`, 'y');
+ const isNewline = /^(\r\n|\n|\r)$/;
+
+ let matches = [];
+ let match = '';
+ let state = 0;
+
+ while ((matches = lexer.exec(csv)) !== null) {
+ match = matches[0];
+
+ switch (state) {
+ case 0: // start of entry
+ switch (true) {
+ case match === ctx.options.delimiter:
+ state = 3;
+ break;
+ case match === ctx.options.separator:
+ state = 0;
+ valueEnd(ctx);
+ break;
+ case isNewline.test(match):
+ state = 0;
+ valueEnd(ctx);
+ entryEnd(ctx);
+ break;
+ default:
+ ctx.value += match;
+ state = 2;
+ break;
+ }
+ break;
+ case 2: // un-delimited input
+ switch (true) {
+ case match === ctx.options.separator:
+ state = 0;
+ valueEnd(ctx);
+ break;
+ case isNewline.test(match):
+ state = 0;
+ valueEnd(ctx);
+ entryEnd(ctx);
+ break;
+ default:
+ state = 4;
+ throw Error(`CSVError: Illegal state [row:${ctx.row}, col:${ctx.col}]`);
+ }
+ break;
+ case 3: // delimited input
+ switch (true) {
+ case match === ctx.options.delimiter:
+ state = 4;
+ break;
+ default:
+ state = 3;
+ ctx.value += match;
+ break;
+ }
+ break;
+ case 4: // escaped or closing delimiter
+ switch (true) {
+ case match === ctx.options.delimiter:
+ state = 3;
+ ctx.value += match;
+ break;
+ case match === ctx.options.separator:
+ state = 0;
+ valueEnd(ctx);
+ break;
+ case isNewline.test(match):
+ state = 0;
+ valueEnd(ctx);
+ entryEnd(ctx);
+ break;
+ default:
+ throw Error(`CSVError: Illegal state [row:${ctx.row}, col:${ctx.col}]`);
+ }
+ break;
+ }
+ }
+
+ // flush the last value
+ if (ctx.entry.length !== 0) {
+ valueEnd(ctx);
+ entryEnd(ctx);
+ }
+
+ return ctx.output;
+}
+
+export function stringify (array, options = {}, replacer = v => v) {
+ const ctx = Object.create(null);
+ ctx.options = options;
+ ctx.options.eof = ctx.options.eof !== undefined ? ctx.options.eof : true;
+ ctx.row = 1;
+ ctx.col = 1;
+ ctx.output = '';
+
+ ctx.options.delimiter = ctx.options.delimiter === undefined ? '"' : options.delimiter;
+ if(ctx.options.delimiter.length > 1 || ctx.options.delimiter.length === 0)
+ throw Error(`CSVError: delimiter must be one character [${ctx.options.separator}]`);
+
+ ctx.options.separator = ctx.options.separator === undefined ? ',' : options.separator;
+ if(ctx.options.separator.length > 1 || ctx.options.separator.length === 0)
+ throw Error(`CSVError: separator must be one character [${ctx.options.separator}]`);
+
+ const needsDelimiters = new RegExp(`${escapeRegExp(ctx.options.delimiter)}|${escapeRegExp(ctx.options.separator)}|\r\n|\n|\r`);
+
+ array.forEach((row, rIdx) => {
+ let entry = '';
+ ctx.col = 1;
+ row.forEach((col, cIdx) => {
+ if (typeof col === 'string') {
+ col = col.replace(new RegExp(ctx.options.delimiter, 'g'), `${ctx.options.delimiter}${ctx.options.delimiter}`);
+ col = needsDelimiters.test(col) ? `${ctx.options.delimiter}${col}${ctx.options.delimiter}` : col;
+ }
+ entry += replacer(col, ctx.row, ctx.col);
+ if (cIdx !== row.length - 1) {
+ entry += ctx.options.separator;
+ }
+ ctx.col++;
+ });
+ switch (true) {
+ case ctx.options.eof:
+ case !ctx.options.eof && rIdx !== array.length - 1:
+ ctx.output += `${entry}\n`;
+ break;
+ default:
+ ctx.output += `${entry}`;
+ break;
+ }
+ ctx.row++;
+ });
+
+ return ctx.output;
+}
+
+function valueEnd (ctx) {
+ const value = ctx.options.typed ? inferType(ctx.value) : ctx.value;
+ ctx.entry.push(ctx.reviver(value, ctx.row, ctx.col));
+ ctx.value = '';
+ ctx.col++;
+}
+
+function entryEnd (ctx) {
+ ctx.output.push(ctx.entry);
+ ctx.entry = [];
+ ctx.row++;
+ ctx.col = 1;
+}
+
+function inferType (value) {
+ const isNumber = /.\./;
+
+ switch (true) {
+ case value === 'true':
+ case value === 'false':
+ return value === 'true';
+ case isNumber.test(value):
+ return parseFloat(value);
+ case isFinite(value):
+ return parseInt(value);
+ default:
+ return value;
+ }
+}
+
+function escapeRegExp(str) {
+ return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
+}
diff --git a/src/io/files.js b/src/io/files.js
index 64c82d3171..a18d074a84 100644
--- a/src/io/files.js
+++ b/src/io/files.js
@@ -5,1633 +5,1282 @@
* @requires core
*/
-import p5 from '../core/main';
-import 'whatwg-fetch';
-import 'es6-promise/auto';
-import fetchJsonp from 'fetch-jsonp';
-import fileSaver from 'file-saver';
-import '../core/friendly_errors/validate_params';
-import '../core/friendly_errors/file_errors';
-import '../core/friendly_errors/fes_core';
+import { Renderer } from '../core/p5.Renderer';
+import { Graphics } from '../core/p5.Graphics';
+import { parse } from './csv';
+import { downloadFile, _checkFileExtension } from './utilities';
+
+class HTTPError extends Error {
+ status;
+ response;
+ ok;
+}
-/**
- * Loads a JSON file to create an `Object`.
- *
- * JavaScript Object Notation
- * (JSON)
- * is a standard format for sending data between applications. The format is
- * based on JavaScript objects which have keys and values. JSON files store
- * data in an object with strings as keys. Values can be strings, numbers,
- * Booleans, arrays, `null`, or other objects.
- *
- * The first parameter, `path`, is always a string with the path to the file.
- * Paths to local files should be relative, as in
- * `loadJSON('assets/data.json')`. URLs such as
- * `'https://example.com/data.json'` may be blocked due to browser security.
- *
- * The second parameter, `successCallback`, is optional. If a function is
- * passed, as in `loadJSON('assets/data.json', handleData)`, then the
- * `handleData()` function will be called once the data loads. The object
- * created from the JSON data will be passed to `handleData()` as its only argument.
- *
- * The third parameter, `failureCallback`, is also optional. If a function is
- * passed, as in `loadJSON('assets/data.json', handleData, handleFailure)`,
- * then the `handleFailure()` function will be called if an error occurs while
- * loading. The `Error` object will be passed to `handleFailure()` as its only
- * argument.
- *
- * Note: Data can take time to load. Calling `loadJSON()` within
- * preload() ensures data loads before it's used in
- * setup() or draw().
- *
- * @method loadJSON
- * @param {String} path path of the JSON file to be loaded.
- * @param {function} [successCallback] function to call once the data is loaded. Will be passed the object.
- * @param {function} [errorCallback] function to call if the data fails to load. Will be passed an `Error` event object.
- * @return {Object} object containing the loaded data.
- *
- * @example
- *
- *
- *
- * let myData;
- *
- * // Load the JSON and create an object.
- * function preload() {
- * myData = loadJSON('assets/data.json');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Style the circle.
- * fill(myData.color);
- * noStroke();
- *
- * // Draw the circle.
- * circle(myData.x, myData.y, myData.d);
- *
- * describe('A pink circle on a gray background.');
- * }
- *
- *
- *
- *
- *
- * let myData;
- *
- * // Load the JSON and create an object.
- * function preload() {
- * myData = loadJSON('assets/data.json');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Create a p5.Color object and make it transparent.
- * let c = color(myData.color);
- * c.setAlpha(80);
- *
- * // Style the circles.
- * fill(c);
- * noStroke();
- *
- * // Iterate over the myData.bubbles array.
- * for (let b of myData.bubbles) {
- * // Draw a circle for each bubble.
- * circle(b.x, b.y, b.d);
- * }
- *
- * describe('Several pink bubbles floating in a blue sky.');
- * }
- *
- *
- *
- *
- *
- * let myData;
- *
- * // Load the GeoJSON and create an object.
- * function preload() {
- * myData = loadJSON('https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson');
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Get data about the most recent earthquake.
- * let quake = myData.features[0].properties;
- *
- * // Draw a circle based on the earthquake's magnitude.
- * circle(50, 50, quake.mag * 10);
- *
- * // Style the text.
- * textAlign(LEFT, CENTER);
- * textFont('Courier New');
- * textSize(11);
- *
- * // Display the earthquake's location.
- * text(quake.place, 5, 80, 100);
- *
- * describe(`A white circle on a gray background. The text "${quake.place}" is written beneath the circle.`);
- * }
- *
- *
- *
- *
- *
- * let bigQuake;
- *
- * // Load the GeoJSON and preprocess it.
- * function preload() {
- * loadJSON(
- * 'https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson',
- * handleData
- * );
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Draw a circle based on the earthquake's magnitude.
- * circle(50, 50, bigQuake.mag * 10);
- *
- * // Style the text.
- * textAlign(LEFT, CENTER);
- * textFont('Courier New');
- * textSize(11);
- *
- * // Display the earthquake's location.
- * text(bigQuake.place, 5, 80, 100);
- *
- * describe(`A white circle on a gray background. The text "${bigQuake.place}" is written beneath the circle.`);
- * }
- *
- * // Find the biggest recent earthquake.
- * function handleData(data) {
- * let maxMag = 0;
- * // Iterate over the earthquakes array.
- * for (let quake of data.features) {
- * // Reassign bigQuake if a larger
- * // magnitude quake is found.
- * if (quake.properties.mag > maxMag) {
- * bigQuake = quake.properties;
- * }
- * }
- * }
- *
- *
- *
- *
- *
- * let bigQuake;
- *
- * // Load the GeoJSON and preprocess it.
- * function preload() {
- * loadJSON(
- * 'https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson',
- * handleData,
- * handleError
- * );
- * }
- *
- * function setup() {
- * createCanvas(100, 100);
- *
- * background(200);
- *
- * // Draw a circle based on the earthquake's magnitude.
- * circle(50, 50, bigQuake.mag * 10);
- *
- * // Style the text.
- * textAlign(LEFT, CENTER);
- * textFont('Courier New');
- * textSize(11);
- *
- * // Display the earthquake's location.
- * text(bigQuake.place, 5, 80, 100);
- *
- * describe(`A white circle on a gray background. The text "${bigQuake.place}" is written beneath the circle.`);
- * }
- *
- * // Find the biggest recent earthquake.
- * function handleData(data) {
- * let maxMag = 0;
- * // Iterate over the earthquakes array.
- * for (let quake of data.features) {
- * // Reassign bigQuake if a larger
- * // magnitude quake is found.
- * if (quake.properties.mag > maxMag) {
- * bigQuake = quake.properties;
- * }
- * }
- * }
- *
- * // Log any errors to the console.
- * function handleError(error) {
- * console.log('Oops!', error);
- * }
- *
- *
- */
-p5.prototype.loadJSON = function(...args) {
- p5._validateParameters('loadJSON', args);
- const path = args[0];
- let callback;
- let errorCallback;
- let options;
-
- const ret = {}; // object needed for preload
- let t = 'json';
-
- // check for explicit data type argument
- for (let i = 1; i < args.length; i++) {
- const arg = args[i];
- if (typeof arg === 'string') {
- if (arg === 'jsonp' || arg === 'json') {
- t = arg;
+export async function request(path, type){
+ try {
+ const res = await fetch(path);
+
+ if (res.ok) {
+ let data;
+ switch(type) {
+ case 'json':
+ data = await res.json();
+ break;
+ case 'text':
+ data = await res.text();
+ break;
+ case 'arrayBuffer':
+ data = await res.arrayBuffer();
+ break;
+ case 'blob':
+ data = await res.blob();
+ break;
+ case 'bytes':
+ // TODO: Chrome does not implement res.bytes() yet
+ if(res.bytes){
+ data = await res.bytes();
+ }else{
+ const d = await res.arrayBuffer();
+ data = new Uint8Array(d);
+ }
+ break;
+ default:
+ throw new Error('Unsupported response type');
}
- } else if (typeof arg === 'function') {
- if (!callback) {
- callback = arg;
+
+ return { data, headers: res.headers };
+
+ } else {
+ const err = new HTTPError(res.statusText);
+ err.status = res.status;
+ err.response = res;
+ err.ok = false;
+
+ throw err;
+ }
+
+ } catch(err) {
+ // Handle both fetch error and HTTP error
+ if (err instanceof TypeError) {
+ console.log('You may have encountered a CORS error');
+ } else if (err instanceof HTTPError) {
+ console.log('You have encountered a HTTP error');
+ } else if (err instanceof SyntaxError) {
+ console.log('There is an error parsing the response to requested data structure');
+ }
+
+ throw err;
+ }
+}
+
+function files(p5, fn){
+ /**
+ * Loads a JSON file to create an `Object`.
+ *
+ * JavaScript Object Notation
+ * (JSON)
+ * is a standard format for sending data between applications. The format is
+ * based on JavaScript objects which have keys and values. JSON files store
+ * data in an object with strings as keys. Values can be strings, numbers,
+ * Booleans, arrays, `null`, or other objects.
+ *
+ * The first parameter, `path`, is a string with the path to the file.
+ * Paths to local files should be relative, as in
+ * `loadJSON('assets/data.json')`. URLs such as
+ * `'https://example.com/data.json'` may be blocked due to browser security.
+ * The `path` parameter can also be defined as a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request)
+ * object for more advanced usage.
+ *
+ * The second parameter, `successCallback`, is optional. If a function is
+ * passed, as in `loadJSON('assets/data.json', handleData)`, then the
+ * `handleData()` function will be called once the data loads. The object
+ * created from the JSON data will be passed to `handleData()` as its only argument.
+ * The return value of the `handleData()` function will be used as the final return
+ * value of `loadJSON('assets/data.json', handleData)`.
+ *
+ * The third parameter, `failureCallback`, is also optional. If a function is
+ * passed, as in `loadJSON('assets/data.json', handleData, handleFailure)`,
+ * then the `handleFailure()` function will be called if an error occurs while
+ * loading. The `Error` object will be passed to `handleFailure()` as its only
+ * argument. The return value of the `handleFailure()` function will be used as the
+ * final return value of `loadJSON('assets/data.json', handleData, handleFailure)`.
+ *
+ * This function returns a `Promise` and should be used in an `async` setup with
+ * `await`. See the examples for the usage syntax.
+ *
+ * @method loadJSON
+ * @param {String|Request} path path of the JSON file to be loaded.
+ * @param {Function} [successCallback] function to call once the data is loaded. Will be passed the object.
+ * @param {Function} [errorCallback] function to call if the data fails to load. Will be passed an `Error` event object.
+ * @return {Promise