Skip to content

Commit 283b1fc

Browse files
Update p5.js to v1.11.9
1 parent 9f542ae commit 283b1fc

24 files changed

+112
-16
lines changed

public/reference/data.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"project": {
33
"name": "p5",
44
"description": "[![npm version](https://badge.fury.io/js/p5.svg)](https://www.npmjs.com/package/p5)",
5-
"version": "1.11.8",
5+
"version": "1.11.9",
66
"url": "https://github.com/processing/p5.js#readme"
77
},
88
"files": {
@@ -11233,7 +11233,7 @@
1123311233
"type": "p5.File"
1123411234
},
1123511235
"example": [
11236-
"\n<div>\n<code>\n// Use the file input to select an image to\n// load and display.\nlet input;\nlet img;\n\nfunction setup() {\n createCanvas(100, 100);\n\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</code>\n</div>\n\n<div>\n<code>\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 for (let i = 0; i < images.length; i += 1) {\n // Calculate the y-coordinate.\n let y = i * 20;\n\n // Draw the image.\n image(img, 0, y, 100, 100);\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</code>\n</div>"
11236+
"\n<div>\n<code>\n// Use the file input to select an image to\n// load and display.\nlet input;\nlet img;\n\nfunction setup() {\n createCanvas(100, 100);\n\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</code>\n</div>\n\n<div>\n<code>\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 for (let i = 0; i < images.length; i += 1) {\n // Calculate the y-coordinate.\n let y = i * 20;\n\n // Draw the image.\n image(images[i], 0, y, 100, 100);\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</code>\n</div>"
1123711237
],
1123811238
"class": "p5",
1123911239
"module": "DOM",
@@ -13468,7 +13468,7 @@
1346813468
{
1346913469
"file": "src/image/loading_displaying.js",
1347013470
"line": 888,
13471-
"description": "<p>Draws an image to the canvas.</p>\n<p>The first parameter, <code>img</code>, is the source image to be drawn. <code>img</code> can be\nany of the following objects:</p>\n<ul>\n<li><a href=\"#/p5.Image\">p5.Image</a></li>\n<li><a href=\"#/p5.Element\">p5.Element</a></li>\n<li><a href=\"#/p5.Texture\">p5.Texture</a></li>\n<li><a href=\"#/p5.Framebuffer\">p5.Framebuffer</a></li>\n<li><a href=\"#/p5.FramebufferTexture\">p5.FramebufferTexture</a></li>\n</ul>\n<p>The second and third parameters, <code>dx</code> and <code>dy</code>, set the coordinates of the\ndestination image's top left corner. See\n<a href=\"#/p5/imageMode\">imageMode()</a> for other ways to position images.</p>\n<p>Here's a diagram that explains how optional parameters work in <code>image()</code>:</p>\n<p><img src=\"assets/drawImage.png\"></img></p>\n<p>The fourth and fifth parameters, <code>dw</code> and <code>dh</code>, are optional. They set the\nthe width and height to draw the destination image. By default, <code>image()</code>\ndraws the full source image at its original size.</p>\n<p>The sixth and seventh parameters, <code>sx</code> and <code>sy</code>, are also optional.\nThese coordinates define the top left corner of a subsection to draw from\nthe source image.</p>\n<p>The eighth and ninth parameters, <code>sw</code> and <code>sh</code>, are also optional.\nThey define the width and height of a subsection to draw from the source\nimage. By default, <code>image()</code> draws the full subsection that begins at\n<code>(sx, sy)</code> and extends to the edges of the source image.</p>\n<p>The ninth parameter, <code>fit</code>, is also optional. It enables a subsection of\nthe source image to be drawn without affecting its aspect ratio. If\n<code>CONTAIN</code> is passed, the full subsection will appear within the destination\nrectangle. If <code>COVER</code> is passed, the subsection will completely cover the\ndestination rectangle. This may have the effect of zooming into the\nsubsection.</p>\n<p>The tenth and eleventh paremeters, <code>xAlign</code> and <code>yAlign</code>, are also\noptional. They determine how to align the fitted subsection. <code>xAlign</code> can\nbe set to either <code>LEFT</code>, <code>RIGHT</code>, or <code>CENTER</code>. <code>yAlign</code> can be set to\neither <code>TOP</code>, <code>BOTTOM</code>, or <code>CENTER</code>. By default, both <code>xAlign</code> and <code>yAlign</code>\nare set to <code>CENTER</code>.</p>\n",
13471+
"description": "<p>Draws an image to the canvas.</p>\n<p>The first parameter, <code>img</code>, is the source image to be drawn. <code>img</code> can be\nany of the following objects:</p>\n<ul>\n<li><a href=\"#/p5.Image\">p5.Image</a></li>\n<li><a href=\"#/p5.Element\">p5.Element</a></li>\n<li><a href=\"#/p5.Texture\">p5.Texture</a></li>\n<li><a href=\"#/p5.Framebuffer\">p5.Framebuffer</a></li>\n<li><a href=\"#/p5.FramebufferTexture\">p5.FramebufferTexture</a></li>\n</ul>\n<p>The second and third parameters, <code>dx</code> and <code>dy</code>, set the coordinates of the\ndestination image's top left corner. See\n<a href=\"#/p5/imageMode\">imageMode()</a> for other ways to position images.</p>\n<p>Here's a diagram that explains how optional parameters work in <code>image()</code>:</p>\n<p><img src=\"assets/drawImage.png\"></img></p>\n<p>The fourth and fifth parameters, <code>dw</code> and <code>dh</code>, are optional. They set the\nthe width and height to draw the destination image. By default, <code>image()</code>\ndraws the full source image at its original size.</p>\n<p>The sixth and seventh parameters, <code>sx</code> and <code>sy</code>, are also optional.\nThese coordinates define the top left corner of a subsection to draw from\nthe source image.</p>\n<p>The eighth and ninth parameters, <code>sw</code> and <code>sh</code>, are also optional.\nThey define the width and height of a subsection to draw from the source\nimage. By default, <code>image()</code> draws the full subsection that begins at\n<code>(sx, sy)</code> and extends to the edges of the source image.</p>\n<p>The ninth parameter, <code>fit</code>, is also optional. It enables a subsection of\nthe source image to be drawn without affecting its aspect ratio. If\n<code>CONTAIN</code> is passed, the full subsection will appear within the destination\nrectangle. If <code>COVER</code> is passed, the subsection will completely cover the\ndestination rectangle. This may have the effect of zooming into the\nsubsection.</p>\n<p>The tenth and eleventh parameters, <code>xAlign</code> and <code>yAlign</code>, are also\noptional. They determine how to align the fitted subsection. <code>xAlign</code> can\nbe set to either <code>LEFT</code>, <code>RIGHT</code>, or <code>CENTER</code>. <code>yAlign</code> can be set to\neither <code>TOP</code>, <code>BOTTOM</code>, or <code>CENTER</code>. By default, both <code>xAlign</code> and <code>yAlign</code>\nare set to <code>CENTER</code>.</p>\n",
1347213472
"itemtype": "method",
1347313473
"name": "image",
1347413474
"example": [
@@ -19728,7 +19728,7 @@
1972819728
"type": "Number"
1972919729
},
1973019730
"example": [
19731-
"\n<div>\n<code>\nfunction setup() {\n createCanvas(100, 100);\n\n background(200);\n\n // Caclulate the angle conversion.\n let deg = 45;\n let rad = radians(deg);\n\n // Display the angle conversion.\n text(`${deg}˚ = ${round(rad, 3)} rad`, 10, 50);\n\n describe('The text \"45˚ = 0.785 rad\".');\n}\n</code>\n</div>"
19731+
"\n<div>\n<code>\nfunction setup() {\n createCanvas(100, 100);\n\n background(200);\n\n // Calculate the angle conversion.\n let deg = 45;\n let rad = radians(deg);\n\n // Display the angle conversion.\n text(`${deg}˚ = ${round(rad, 3)} rad`, 10, 50);\n\n describe('The text \"45˚ = 0.785 rad\".');\n}\n</code>\n</div>"
1973219732
],
1973319733
"class": "p5",
1973419734
"module": "Math",

public/search-indices/en.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/search-indices/es.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/search-indices/hi.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/search-indices/ko.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/search-indices/zh-Hans.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/content/contributor-docs/en/documentation_style_guide.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |
1010

1111
Hello! Welcome to the guidelines for writing p5.js documentation. This document is a remix of the following resources:
1212

13-
* Ruby on Rails [API Documentation Guidlines](https://guides.rubyonrails.org/api_documentation_guidelines.html) (CC BY-SA 4.0)
13+
* Ruby on Rails [API Documentation Guidelines](https://guides.rubyonrails.org/api_documentation_guidelines.html) (CC BY-SA 4.0)
1414
* WordPress documentation guidelines for [accessibility](https://make.wordpress.org/docs/style-guide/general-guidelines/accessibility/) and [inclusivity](https://make.wordpress.org/docs/style-guide/general-guidelines/inclusivity/) (CC0)
1515
* Airbnb [JavaScript Style Guide](https://airbnb.io/javascript/) (MIT)
1616

src/content/contributor-docs/en/steward_guidelines.mdx

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ description: |
88

99

1010

11-
Whether you have just joined us as a steward, are a seasoned maintainer of p5.js, or are somewhere in between, this guide contains information as well as tips and tricks that will help you effectively contribute to p5.js. Most of what is written here are guidelines unless otherwise stated, which means you can adapt the practices shown here to suit your workflow.
11+
Whether you are new to p5.js contribution, are already active on the p5.js GitHub repositories, or are somewhere in between, you'll find what you need in this guide to p5.js stewardship. If you are not sure what to expect from stewards, or if you are considering how to volunteer or get started as a steward, read on!
1212

1313
## Table of Contents
1414

15+
* [Stewardship](#stewardship)
16+
* [Community Care](#community-care)
17+
* [Areas](#areas)
18+
* [Becoming a Steward](#becoming-a-steward)
19+
* [Getting Started with Stewardship](#getting-started-with-stewardship)
1520
* [Issues](#issues)
1621
* [Bug report](#bug-report)
1722
* [Feature request](#feature-request)
@@ -33,6 +38,64 @@ Whether you have just joined us as a steward, are a seasoned maintainer of p5.js
3338

3439
***
3540

41+
## Stewardship
42+
43+
### Community Care
44+
45+
An open source ethos includes [accessibility, education, collaboration, transparency, and agency](https://www.opensourceethos.net/). To live and practice these values while we write code together needs a lot of community care. These are the community care practices that are part of our definition of stewardship:
46+
47+
1. Welcoming new contributors to GitHub through **friendly comments** and helpful **code reviews**
48+
2. Helping to **facilitate feature discussions** and resolve technical disagreements. For example, this means making connections to other past discussion, or offering input from prior relevant experience. Suggesting features or working on them is contribution, rather than stewardship.
49+
3. Participating in releases of the p5.js software through **supporting** bug fixing and feature completion. For example, this means guiding other contributors and reviewing their PRs. Fixing bugs is contribution, rather than stewardship.
50+
51+
The rest of these guidelines provide some tips and tricks that will help you effectively contribute to p5.js, and to helpfully guide others' contributions. Most of what is written here are guidelines unless otherwise stated, which means you can adapt the practices shown here to suit your workflow.
52+
53+
Everyone is invited to help steward the community when they can! We are happy to see contributors welcome new contributors, review others' code, and provide API design feedback. There are also some concrete roles:
54+
55+
1. Contributors are able to make Issues, PRs, Comments, and Code Reviews.
56+
2. Maintainers are also able to merge PRs and admin other parts of the codebase.
57+
58+
Stewards can also be contributors: they can make Issues and PRs as contributors, while they also take on responsibility, when they are stewarding a particular area, to comment on issues and do code reviews, especially when tagged by other contributors to help with discussion and review.
59+
60+
As a contributor, you can check the current stewards in the p5.js repository's README file and tag relevant stewards - but please be mindful of our contributor guidelines, which emphasize patience and mindfulness that most of the technical work on an open-source project is volunteer.
61+
62+
As a steward, we hope that you regularly chime in on code reviews on Issues or PRs that you did not make, if they are in your area and if you are able to provide helpful guidance!
63+
64+
### Areas
65+
66+
There are different areas of work that stewards can be responsible for. These areas match the GitHub Labels in most cases, with a couple of exceptions. Below is the list of areas.
67+
68+
* **Accessibility**: This area specifically refers to digital and web accessibility, including, for example, screen reader support via API like `describe(..)` as well as accessibility support on the reference website
69+
* **Core**: Refers to core p5.js API, including rendering and environment
70+
* **DevOps**: Refers to build process, unit testing, and other aspects of the development experience
71+
* **Documentation**: Includes both reference in the core codebase that is exposed on the website, the contributor docs, and other website content
72+
* i18n (Internationalization / **Translation**): Includes reviewing translations, particularly for `es`, `hi`, `ko`, `zh`
73+
* **Graphics**: Contains subareas of WebGL and [p5.strands](https://beta.p5js.org/tutorials/intro-to-p5-strands/)
74+
* **Color**: Includes Color, ColorMode, accessibility improvements around color usage
75+
* **Typography**: Refers to all topics on handling text and font
76+
* **Math**: Includes both external Math API and internal performance improvements
77+
* **Shapes**: Includes working with custom shapes in both 1.11.x and 2.x versions of p5.js
78+
* **Maintainers**: This group can merge PRs
79+
* **p5.sound.js**: The [new p5.sound.js](https://github.com/processing/p5.sound.js) add-on library
80+
* **p5.js-website**: Non-content aspects of the [reference website](https://p5js.org/) - for example, its structure, automations, technical improvements and so on.
81+
82+
These focus areas may change over time depending on the needs of the project - so if you are going through the process of applying to be a steward, you are welcome to proposals new areas!
83+
84+
### Becoming a Steward
85+
86+
There are two ways to become a steward:
87+
88+
1. *Nomination* by maintainers or other stewards, such as in conversation over Discord, Discourse, or GitHub.
89+
2. *Application* by creating a PR to update `stewards.yml` with your GitHub @ and proposed areas. Please keep in mind each area should have 1-3 stewards. We are always looking for **translation stewards**! Once you make your application PR, other maintainers or stewards may ask for additional supporting material, like making a PR related to the areas you're interested in, or participating in some related discussion.
90+
91+
To remain a steward, you must contribute as a steward to at least 1 of the 2 most recent minor releases (e.g., 2.1.0 or 1.11.0 - when the middle number changes). These are not as frequent as patches (e.g., 2.0.3 to 2.0.4 - when the rightmost number changes), and in practice this means that stewards are expected to be active every 4-6 months or so, supporting other contributors through discussion or code review - not necessarily writing code. To step down from stewardship, you can make a PR to remove yourself from `stewards.yml`. You are always welcome to take a pause and reapply in the future!
92+
93+
### Getting Started with Stewardship
94+
95+
1. Keep this guideline handy as a reference - how to help with new issues, bugs, and features. For example, the "Feature request" section includes tips on how to use the the p5.js [access statement](../access/) as a steward.
96+
2. When helping to answer technical questions or review, try to apply the Processing Foundation [guideline on answering questions](https://discourse.processing.org/t/guidelines-answering-questions/2145/) - these can be especially helpful for giving constructive technical feedback.
97+
3. Join the [p5.js Discord](https://discord.com/invite/SHQ8dH25r9/) - in the `#contribute-to-p5` you're welcome to ask any questions you have about this process - or suggest how it can be improved!
98+
3699
## Issues
37100

38101
We encourage most source code contributions to start with an issue, and as such, issues are the place where most of the discussions will take place. The steps to take when reviewing an issue will depend on what kind of issue it is. The repo uses [GitHub issue templates](https://github.com/processing/p5.js/blob/main/.github/ISSUE_TEMPLATE/) in order to better organize different kinds of issues and encourage issue authors to provide all relevant information about their problems. The first step in reviewing the issue will often be looking through the filled-out template and determining if you need additional information (e.g., because some fields weren't filled in or the incorrect template was used).
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name: Andrew McWhae
2+
url: https://linktr.ee/andrewmcwhae
3+
category: contributor

src/content/people/en/atmaja-p-.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name: Atmaja P.
2+
url: https://github.com/atmajaa
3+
category: contributor

0 commit comments

Comments
 (0)