You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/url_conventions.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ Instead write (or generate) links that follow the rules above.
36
36
37
37
## Case in URLs
38
38
39
-
URL casing is somewhat inconsistent across the website. Guidelines for new resources:
39
+
URL casing is somewhat inconsistent across the website. Guidelines for new resources:
40
40
41
41
* Prefer lower-case
42
42
* Spaces should not be used in URLs.
@@ -51,7 +51,7 @@ URL casing is somewhat inconsistent across the website. Guidelines for new reso
51
51
52
52
### A case exception: reference pages
53
53
54
-
In reference pages, the URLs follow the names of the functions, classes, and variables. So, they include some capitals and use "camel-case" e.g. `createCanvas`.
54
+
In reference pages, the URLs follow the names of the functions, classes, and variables. So, they include some capitals and use "camel-case" e.g. `createCanvas`.
description: Render pipeline for p5.js v2 — pose and camera interpolation, space transforms, frustum visibility, HUD, post-processing pipe, picking, and declarative control panels.
Welcome! This page contains the links to start using p5.js in the way that suits you best. Open the p5.js Editor in your web browser, or download the library to your own computer. We’ve tried to order the links to reflect what a beginner might want first, then what a more experienced programmer may be looking for.
16
17
17
18
### Start Coding Online
18
19
This link redirects you to the p5.js Editor online so you can begin using p5.js immediately.
This is a download containing the p5.js library file, the p5.sound addon, and an example project. It does not contain an editor. Visit [Get Started](/tutorials/get-started) to learn how to setup a p5.js project.
For more information on these concepts see these tutorials: [Get Started](/tutorials/get-started),[Variables and Change](/tutorials/variables-and-change), [Conditionals and Interactivity](/tutorials/conditionals-and-interactivity), and [Organizing Code with Functions](/tutorials/organizing-code-with-functions).
72
+
For more information on these concepts see these tutorials: [Get Started](/tutorials/get-started), [Variables and Change](/tutorials/variables-and-change), [Conditionals and Interactivity](/tutorials/conditionals-and-interactivity), and [Organizing Code with Functions](/tutorials/organizing-code-with-functions).
73
73
74
74
75
75
## Step 1 – Upload image files to the sketch folder
@@ -85,7 +85,7 @@ For more information on these concepts see these tutorials: [Get Started](/tutor
85
85
86
86
#### Image files
87
87
88
-
Image files store the grid of colored pixels that make up an image. There are a number of different image file types that p5.js can process.. The most common image types are JPEGs, PNGs, or GIFs. You can identify them by the extension found at the end of their filenames: `.jpg`, `.png`, `.gif`.
88
+
Image files store the grid of colored pixels that make up an image. There are a number of different image file types that p5.js can process. The most common image types are JPEGs, PNGs, or GIFs. You can identify them by the extension found at the end of their filenames: `.jpg`, `.png`, `.gif`.
89
89
90
90
JPEGs and PNGs are among the most common types of static images, which are images that do not move. JPEGs often refer to photographs, whereas PNGs often refer to graphics and designs, as they support images with transparent backgrounds. The term GIF is widely used for animated images. They contain a series of images that can be displayed as an animation.
91
91
@@ -192,7 +192,7 @@ function draw() {
192
192
193
193
### [`image()`](/reference/p5/image)
194
194
195
-
The `image()` function draws a `p5.Image` object on the canvas. At least three arguments are needed to call `image()`: the variable that was assigned the p5.Image object, the x-coordinate, and the y-coordinate: `image(img, x, y, width);`
195
+
The `image()` function draws a `p5.Image` object on the canvas. At least three arguments are needed to call `image()`: the variable that was assigned the p5.Image object, the x-coordinate, and the y-coordinate: `image(img, x, y, width);`
196
196
197
197
Visit the p5.js Reference on [`image()`](/reference/p5/image) to see more ways you can specify how an image is drawn.
198
198
@@ -345,7 +345,7 @@ function draw() {
345
345
346
346
- In the `draw()` function, start a new if-statement by typing `if (mouseIsPressed) {}`
347
347
- Any functions placed inside this if-statement’s body (between the curly braces) will only be performed while the mouse is pressed.
348
-
- Inside the curly brackets, add a line of code: `flowerY -= 1`;
348
+
- Inside the curly brackets, add a line of code: `flowerY -= 1`;
349
349
- This decrements the `flowerY` value by 1 so the flowers will move farther up the canvas while the mouse is pressed.
350
350
- Right underneath it, add another line of code: `flowerSize += 1;`
351
351
- This increments the `flowerSize` variable by 1 so the flower images will grow in size while the mouse is pressed.
Copy file name to clipboardExpand all lines: src/content/tutorials/en/layered-rendering-with-framebuffers.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ Final image with focal blur using color + depth
79
79
80
80
A `p5.Framebuffer` is a surface you can draw to, similar to the main canvas. Drawing to the main canvas is like drawing on a sheet of paper. When you call `begin()` on a `p5.Framebuffer`, it's like laying a fresh sheet of paper on top of the original, which will collect any new things that get drawn. Calling `end()` on a `p5.Framebuffer` will remove that sheet again so that subsequent drawing will go right to the main canvas again.
81
81
82
-
You can create a `p5.Framebuffer` with the `createFramebuffer()` function. You can optionally pass an object in as a parameter to specify a width and height.By default, `p5.Framebuffer`s are the same size as the main canvas. There are other options you can add to this object to control how color and depth information is stored, which we'll get into later. Check out [the `createFramebuffer()` documentation](/reference/p5/createFramebuffer/) for the full reference.
82
+
You can create a `p5.Framebuffer` with the `createFramebuffer()` function. You can optionally pass an object in as a parameter to specify a width and height.By default, `p5.Framebuffer`s are the same size as the main canvas. There are other options you can add to this object to control how color and depth information is stored, which we'll get into later. Check out [the `createFramebuffer()` documentation](/reference/p5/createFramebuffer/) for the full reference.
83
83
84
84
You may already be familiar with drawing to `p5.Graphics` objects. Here's a comparison of some code using `p5.Graphics` as a texture, and what the equivalent `p5.Framebuffer` code looks like:
0 commit comments