Skip to content

Commit 2e31ee3

Browse files
committed
docs(examples): feature p5.strands translations and add 2026 attribution support
- Feature the 3 new p5.strands example pages and unfeature 3 older sketches - Fix GLSL title formatting ("Shader as a Texture (GLSL)") - Update collectivelyAttributedSince to 2026 for the new translations - Extend examples content schema to accept 2026 attribution year - Add 2026 attribution string in UI copy (en) Signed-off-by: MissTipo <dorine.a.tipo@gmail.com>
1 parent 83e9ec2 commit 2e31ee3

File tree

9 files changed

+13
-12
lines changed

9 files changed

+13
-12
lines changed

src/content/examples/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ export const examplesCollection = defineCollection({
4141
)
4242
.optional(),
4343
// Collective attribution message either does not specify a year,
44-
// or specifies 2024. To add a new possible value, update:
44+
// or specifies a year from 2024 onwards. To add a new possible value, update:
4545
// 1) content/examples/config.ts to include new permitted values;
4646
// 2) and content/ui/*.yaml strings for attribution to include the text
47-
collectivelyAttributedSince: z.literal(2024).optional(),
47+
collectivelyAttributedSince: z.union([z.literal(2024), z.literal(2026)]).optional(),
4848
})
4949
)
5050
.optional()

src/content/examples/en/02_Animation_And_Variables/02_Mobile_Device_Movement/description.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ featuredImage: "../../../images/featured/02_Animation_And_Variables-02_Mobile_De
33
featuredImageAlt: White circles on a black background, with varying degrees of transparency.
44
title: Mobile Device Movement
55
oneLineDescription: Animate based on device motion.
6-
featured: true
76

87
remix:
98
- description: Revised by
@@ -24,4 +23,4 @@ In this example, the
2423
<a href="https://p5js.org/reference/p5/accelerationY" target="_blank">accelerationY</a>,
2524
and <a href="https://p5js.org/reference/p5/accelerationZ" target="_blank">accelerationZ</a>
2625
values set the position and size of a circle.
27-
This only works for mobile devices.
26+
This only works for mobile devices.

src/content/examples/en/09_Angles_And_Motion/00_Sine_Cosine/description.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ featuredImage: "../../../images/featured/09_Angles_And_Motion-00_Sine_Cosine-thu
33
featuredImageAlt: A point on the unit circle, together with the corresponding sine and cosine values on their graphs.
44
title: Sine and Cosine
55
oneLineDescription: Animate circular, back and forth, and wave motion.
6-
featured: true
76

87
remix:
98
- description: Revised by
@@ -28,4 +27,4 @@ The animation shows uniform circular motion around the unit circle
2827
(circle with radius 1). Any angle measured from the the x-axis
2928
determines a point on the circle. The cosine and sine of the angle
3029
are defined to be the x and y coordinates, respectively, of that
31-
point.
30+
point.

src/content/examples/en/11_3D/07_Filter_Shader_p5strands/description.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ featuredImage: "../../../images/featured/11_3D-04_Filter_Shader-thumbnail.png"
33
featuredImageAlt: A screenshot of a video of a city crosswalk, with offset colors.
44
title: Filter Shader (p5.strands)
55
oneLineDescription: Manipulate imagery with a shader, written in p5.strands.
6+
featured: true
67

78
remix:
89
- description: Created by
@@ -21,7 +22,7 @@ remix:
2122
- label: 2026 p5.strands translation
2223
URL: https://github.com/processing/p5.js-website/tree/main/src/content/examples/en/11_3D/07_Filter_Shader_p5strands
2324

24-
- collectivelyAttributedSince: 2024
25+
- collectivelyAttributedSince: 2026
2526
---
2627

2728
This is a p5.strands version of the Filter Shader example. Filter shaders apply

src/content/examples/en/11_3D/08_Adjusting_Positions_With_A_Shader_p5strands/description.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ featuredImage: "../../../images/featured/11_3D-05_Adjusting_Positions_With_A_Sha
33
featuredImageAlt: A red-to-blue waving ribbon on a white background.
44
title: Adjusting Positions with a Shader (p5.strands)
55
oneLineDescription: Use a shader to adjust shape vertices, written in p5.strands.
6+
featured: true
67

78
remix:
89
- description: Created by
@@ -21,7 +22,7 @@ remix:
2122
- label: 2026 p5.strands translation
2223
URL: https://github.com/processing/p5.js-website/tree/main/src/content/examples/en/11_3D/08_Adjusting_Positions_With_A_Shader_p5strands
2324

24-
- collectivelyAttributedSince: 2024
25+
- collectivelyAttributedSince: 2026
2526
---
2627

2728
This is a p5.strands version of the Adjusting Positions with a Shader example.

src/content/examples/en/12_Advanced_Canvas_Rendering/02_Shader_As_A_Texture/description.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
featuredImage: "../../../images/featured/12_Advanced_Canvas_Rendering-02_Shader_As_A_Texture-thumbnail.png"
33
featuredImageAlt: Two spheres broken up into a square grid with a gradient in each grid.
4-
title: Shader as a Texture(GLSL)
4+
title: Shader as a Texture (GLSL)
55
oneLineDescription: Generate a texture for a 3D shape using a shader.
66

77
remix:

src/content/examples/en/12_Advanced_Canvas_Rendering/03_Shader_As_A_Texture_p5strands/description.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ featuredImage: "../../../images/featured/12_Advanced_Canvas_Rendering-02_Shader_
33
featuredImageAlt: Two spheres broken up into a square grid with a gradient in each grid.
44
title: Shader as a Texture (p5.strands)
55
oneLineDescription: Generate a texture for a 3D shape using a shader, written in p5.strands.
6+
featured: true
67

78
remix:
89
- description: Based on
@@ -29,7 +30,7 @@ remix:
2930
- label: 2026 p5.strands translation
3031
URL: https://github.com/processing/p5.js-website/tree/main/src/content/examples/en/12_Advanced_Canvas_Rendering/03_Shader_As_A_Texture_p5strands
3132

32-
- collectivelyAttributedSince: 2024
33+
- collectivelyAttributedSince: 2026
3334
---
3435

3536
This is a p5.strands version of the Shader as a Texture example.

src/content/examples/en/15_Math_And_Physics/03_Smoke_Particle_System/description.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ featuredImage: "../../../images/featured/15_Math_And_Physics-03_Smoke_Particle_S
33
featuredImageAlt: Rainbow colored smoke angled towards the right of the canvas, with a white arrow above the smoke pointing right.
44
title: Smoke Particles
55
oneLineDescription: Simulate smoke with a particle system.
6-
featured: true
76

87
remix:
98
- description: Based on
@@ -30,4 +29,4 @@ positions and velocities are performed with p5.Vector methods.
3029

3130
The particle system is implemented as a
3231
<a href="https://p5js.org/reference/p5/class">class</a>, which contains an array of
33-
objects (of class Particle).
32+
objects (of class Particle).

src/content/ui/en.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ attribution:
208208
and: and
209209
Edited and maintained by: Edited and maintained by
210210
From 2024 onwards, edited and maintained by: From 2024 onwards, edited and maintained by
211+
From 2026 onwards, edited and maintained by: From 2026 onwards, edited and maintained by
211212
You can find the code history of these examples here: You can find the code history of these examples here
212213
You can suggest improvements by: You can suggest improvements by
213214
contributing to the current website: contributing to the current website

0 commit comments

Comments
 (0)