Skip to content

Commit f63d660

Browse files
authored
Merge branch '2.0' into nb-strands-tut-both-simplifications
2 parents 39be2a0 + 98eca28 commit f63d660

File tree

12 files changed

+41
-35
lines changed

12 files changed

+41
-35
lines changed

docs/url_conventions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Instead write (or generate) links that follow the rules above.
3636

3737
## Case in URLs
3838

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:
4040

4141
* Prefer lower-case
4242
* Spaces should not be used in URLs.
@@ -51,7 +51,7 @@ URL casing is somewhat inconsistent across the website. Guidelines for new reso
5151

5252
### A case exception: reference pages
5353

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`.
5555

5656
#### Examples of reference page URLs
5757
* https://p5js.org/reference/p5.Vector/fromAngle/

src/components/Footer/index.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { getEntry } from "astro:content";
33
import { getCurrentLocale, getUiTranslator } from "@/src/i18n/utils";
44
import { Icon } from "../Icon";
55
import Banner from "@components/Banner/index.astro";
6+
import { p5Version } from "@/src/globals/p5-version";
67
78
const currentLocale = getCurrentLocale(Astro.url.pathname);
89
const t = await getUiTranslator(currentLocale);
@@ -32,7 +33,7 @@ const bannerEntry = await getEntry("banner", currentLocale);
3233
<li><a href="/contribute/">{t("Contribute")}</a></li>
3334
<li><a href="/community/">{t("Community")}</a></li>
3435
<li><a href="/about/">{t("About")}</a></li>
35-
<li><a href="https://editor.p5js.org">{t("Start Coding")}</a></li>
36+
<li><a href={`https://editor.p5js.org?version=${p5Version}`}>{t("Start Coding")}</a></li>
3637
<li><a href="/donate/">{t("Donate")}</a></li>
3738
</ul>
3839
</div>

src/components/Nav/MainNavLinks.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import styles from "./styles.module.scss";
22
import { Logo } from "../Logo";
33
import { Icon } from "../Icon";
4+
import { p5Version } from "@/src/globals/p5-version";
45

56
type MainNavLinksProps = {
67
links: {
@@ -81,7 +82,7 @@ export const MainNavLinks = ({
8182
</ul>
8283
<ul class="flex flex-col gap-[15px]">
8384
<li>
84-
<a className={styles.buttonlink} href="https://editor.p5js.org">
85+
<a className={styles.buttonlink} href={`https://editor.p5js.org?version=${p5Version}`}>
8586
<div class="mr-xxs">
8687
<Icon kind="code-brackets" />
8788
</div>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: p5.tree
2+
description: Render pipeline for p5.js v2 — pose and camera interpolation, space transforms, frustum visibility, HUD, post-processing pipe, picking, and declarative control panels.
3+
category: 3d
4+
sourceUrl: https://github.com/VisualComputing/p5.tree
5+
websiteUrl: https://nakednous.github.io/tags/p5.tree/
6+
npm: p5.tree
7+
npmFilePath: dist/p5.tree.min.js
8+
author:
9+
name: Jean Pierre Charalambos
10+
url: https://nakednous.github.io/
11+
license: AGPL-3.0
12+
featuredImage: ../images/p5.tree.png
13+
featuredImageAlt: A non-Euclidean geometry cube with faces showcasing teapot, bunny, and Buddha models.

src/content/libraries/en/p5.treegl.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.
File renamed without changes.

src/content/text-detail/en/download.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ import {
1111
p5LatestUrl,
1212
p5MajorVersion
1313
} from '@src/globals/globals'
14+
import { p5Version } from '@src/globals/p5-version'
1415

1516
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.
1617

1718
### Start Coding Online
1819
This link redirects you to the p5.js Editor online so you can begin using p5.js immediately.
1920

20-
<LinkButton variant='link' url='https://editor.p5js.org/'> p5.js Editor </LinkButton>
21+
<LinkButton variant='link' url={`https://editor.p5js.org?version=${p5Version}`}> p5.js Editor </LinkButton>
2122

2223
### Download the Complete Library
2324
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.

src/content/text-detail/zh-Hans/download.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ import {
99
libraryDownloadUrl,
1010
minifiedLibraryDownloadUrl
1111
} from '@src/globals/globals'
12+
import { p5Version } from '@src/globals/p5-version'
1213

1314
欢迎!本页面包含了开始使用 p5.js 的各种方式的链接。您可以在网络浏览器中打开 p5.js 编辑器,或者将库下载到您的计算机上。我们按照从初学者到进阶开发者的需求顺序来组织这些链接。
1415

1516
### 在线开始编程
1617
此链接将带您前往在线 p5.js 编辑器,您可以立即开始使用 p5.js。
1718

18-
<LinkButton variant='link' url='https://editor.p5js.org/'> p5.js 编辑器 </LinkButton>
19+
<LinkButton variant='link' url={`https://editor.p5js.org?version=${p5Version}`}> p5.js 编辑器 </LinkButton>
1920

2021
### 下载完整库
2122
这个下载包含了 p5.js 库文件、p5.sound 插件和一个示例项目。不包含编辑器。访问[入门指南](/tutorials/get-started)了解如何设置 p5.js 项目。

src/content/tutorials/en/animating-with-media-objects.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ Explore [this example](https://editor.p5js.org/joanneamarisa/sketches/PFmWqy0qB)
5757
### Things you’ll need<a id="things-youll-need"></a>
5858

5959
- A computer with access to the internet
60-
- An account on the  [p5.js Web Editor](https://editor.p5js.org/)
61-
- Four source image files to download for this tutorial: 
60+
- An account on the [p5.js Web Editor](https://editor.p5js.org/)
61+
- Four source image files to download for this tutorial:
6262
- [Flower 1 (PNG)](/assets/flower-1.png)
6363
- [Flower 2 (PNG)](/assets/flower-2.png)
6464
- [Flower 3 (PNG)](/assets/flower-3.png)
@@ -69,7 +69,7 @@ Explore [this example](https://editor.p5js.org/joanneamarisa/sketches/PFmWqy0qB)
6969
- conditional statements
7070
- creating custom functions with parameters
7171

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).
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).
7373

7474

7575
## 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
8585

8686
#### Image files
8787

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`.
8989

9090
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.
9191

@@ -192,7 +192,7 @@ function draw() {
192192

193193
### [`image()`](/reference/p5/image)
194194

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);`
196196

197197
Visit the p5.js Reference on [`image()`](/reference/p5/image) to see more ways you can specify how an image is drawn.
198198

@@ -345,7 +345,7 @@ function draw() {
345345

346346
- In the `draw()` function, start a new if-statement by typing `if (mouseIsPressed) {}`
347347
- 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`;
349349
- This decrements the `flowerY` value by 1 so the flowers will move farther up the canvas while the mouse is pressed.
350350
- Right underneath it, add another line of code: `flowerSize += 1;`
351351
- This increments the `flowerSize` variable by 1 so the flower images will grow in size while the mouse is pressed.

src/content/tutorials/en/layered-rendering-with-framebuffers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Final image with focal blur using color + depth
7979

8080
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.
8181

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.
8383

8484
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:
8585

0 commit comments

Comments
 (0)