Skip to content

Commit c2a9d3e

Browse files
committed
Add 2023 revision attributions
1 parent 8b3d87f commit c2a9d3e

File tree

16 files changed

+89
-14
lines changed

16 files changed

+89
-14
lines changed

src/content/examples/config.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,15 @@ export const examplesCollection = defineCollection({
4949
* When rendering (in ExampleLayout.astro), these keys are replaced
5050
* with their full details from `remixLookup`.
5151
*/
52-
export const remixLookup = {
52+
53+
type RemixEntry = {
54+
attributionURL: string;
55+
attributionLabel: string;
56+
remixURL: string;
57+
remixLabel: string;
58+
};
59+
60+
export const remixLookup: { [key: string]: RemixEntry } = {
5361
"revision-2023-calebfoss": {
5462
attributionURL: "https://github.com/calebfoss",
5563
attributionLabel: "Caleb calebfoss",
@@ -67,5 +75,5 @@ export const remixLookup = {
6775
attributionLabel: "Kasey Lichtlyter",
6876
remixURL: "https://github.com/processing/p5.js-example",
6977
remixLabel: "Revised in 2023",
70-
}
71-
};
78+
},
79+
};

src/content/examples/en/02_Animation_And_Variables/00_Drawing_Lines/description.mdx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ title: Drawing Lines
55
oneLineDescription: Draw with the mouse.
66

77
remix:
8-
- attributionURL: https://github.com/dkessner
9-
attributionLabel: Darren Kessner
10-
remixURL: https://github.com/processing/p5.js-example
11-
remixLabel: Revised in 2023
8+
- revision-2023-dkessner
129
---
1310

1411
Click and drag the mouse to draw a line.

src/content/examples/en/05_Transformation/01_Rotate/description.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ featuredImage: "../../../images/featured/05_Transformation-01_Rotate-thumbnail.p
33
featuredImageAlt: Line segments rotated around center of canvas.
44
title: Rotate
55
oneLineDescription: Rotate the coordinate system.
6+
7+
remix:
8+
- revision-2023-dkessner
69
---
710

811
The

src/content/examples/en/05_Transformation/02_Scale/description.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ featuredImage: "../../../images/featured/05_Transformation-02_Scale-thumbnail.pn
33
featuredImageAlt: Solid rectangles stacked on top of one another.
44
title: Scale
55
oneLineDescription: Modify the coordinate system scale.
6+
7+
8+
remix:
9+
- revision-2023-dkessner
610
---
711

812
The

src/content/examples/en/06_Calculating_Values/02_Random/description.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ featuredImage: "../../../images/featured/06_Calculating_Values-02_Random-thumbna
33
featuredImageAlt: A small purple circle on a black background.
44
title: Random
55
oneLineDescription: Get random numbers.
6+
7+
remix:
8+
- revision-2023-dkessner
69
---
710

811
This example demonstrates the use of the

src/content/examples/en/07_Repetition/05_Recursive_Tree/description.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ featuredImage: "../../../images/featured/07_Repetition-05_Recursive_Tree-thumbna
33
featuredImageAlt: A rainbow fractal tree on a black background.
44
title: Recursive Tree
55
oneLineDescription: Draw a tree using a function that calls itself.
6+
7+
8+
remix:
9+
- attributionURL: https://processing.org/examples/tree.html
10+
attributionLabel: Processing example by Dan Shiffman
11+
remixLabel: Based on
12+
- revision-2023-dkessner
13+
collectivelyAttributedSince: 2024
614
---
715

816
This is an example of rendering a simple tree-like structure via recursion.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ featuredImageAlt: A point on the unit circle, together with the corresponding si
44
title: Sine and Cosine
55
oneLineDescription: Animate circular, back and forth, and wave motion.
66
featured: true
7+
8+
remix:
9+
- revision-2023-dkessner
710
---
811

912
This example demonstrates the

src/content/examples/en/09_Angles_And_Motion/01_Aim/description.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ featuredImage: "../../../images/featured/09_Angles_And_Motion-01_Aim-thumbnail.p
33
featuredImageAlt: Two eyes on a black background.
44
title: Aim
55
oneLineDescription: Rotate toward a point.
6+
7+
remix:
8+
- revision-2023-dkessner
69
---
710

811
The

src/content/examples/en/09_Angles_And_Motion/02_Triangle_Strip/description.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ featuredImage: "../../../images/featured/09_Angles_And_Motion-02_Triangle_Strip-
33
featuredImageAlt: Rainbow ring made up of triangles whose vertices lie on two concentric circles.
44
title: Triangle Strip
55
oneLineDescription: Split a ring into triangles.
6+
7+
8+
collectivelyAttributedSince: 2024
9+
remix:
10+
- attributionURL: https://archive.p5js.org/examples/form-triangle-strip.html
11+
attributionLabel: Ira Greenberg
12+
- revision-2023-dkessner
613
---
714

815
This example demonstrates how to create a shape

src/content/examples/en/13_Classes_And_Objects/00_Snowflakes/description.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ featuredImage: "../../../images/featured/13_Classes_And_Objects-00_Snowflakes-th
33
featuredImageAlt: Snowflakes falling on a black background.
44
title: Snowflakes
55
oneLineDescription: Animate snowfall.
6+
7+
collectivelyAttributedSince: 2024
8+
remix:
9+
- attributionURL: https://archive.p5js.org/examples/simulate-snowflakes.html
10+
attributionLabel: Aatish Bhatia
11+
- revision-2023-dkessner
612
---
713

814
This example demonstrates the use of a particle system

src/content/examples/en/13_Classes_And_Objects/03_Flocking/description.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ featuredImage: "../../../images/featured/13_Classes_And_Objects-03_Flocking-thum
33
featuredImageAlt: A group of bird-like objects, represented by rainbow triangles, modeling flocking behavior.
44
title: Flocking
55
oneLineDescription: Simulate bird flocking behavior.
6+
7+
remix:
8+
- revision-2023-dkessner
69
---
710

811
Demonstration of flocking behavior.

src/content/examples/en/15_Math_And_Physics/00_Non_Orthogonal_Reflection/description.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ featuredImage: "../../../images/featured/15_Math_And_Physics-00_Non_Orthogonal_R
33
featuredImageAlt: A small green circle hovering over a yellow tilted plane at the bottom of the canvas.
44
title: Non-Orthogonal Reflection
55
oneLineDescription: Simulate a ball bouncing on a slanted surface.
6+
7+
remix:
8+
- attributionLabel: Processing example by Ira Greenberg
9+
attributionURL: https://processing.org/examples/reflection1.html
10+
remixLabel: Based on
11+
- attributionLabel: David Blitz
12+
remixLabel: Ported by
13+
- revision-2023-dkessner
14+
collectivelyAttributedSince: 2024
615
---
716

817
This example demonstrates a ball bouncing on a slanted

src/content/examples/en/15_Math_And_Physics/01_Soft_Body/description.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ featuredImage: "../../../images/featured/15_Math_And_Physics-01_Soft_Body-thumbn
33
featuredImageAlt: A yellow pentagon on a black background.
44
title: Soft Body
55
oneLineDescription: Simulate the physics of a soft body accelerating toward the mouse.
6+
7+
collectivelyAttributedSince: 2024
8+
remix:
9+
- attributionURL: https://archive.p5js.org/examples/simulate-soft-body.html
10+
attributionLabel: Ira Greenberg
11+
- revision-2023-dkessner
612
---
713

814
Physics simulation of a soft body experiencing

src/content/examples/en/15_Math_And_Physics/02_Forces/description.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@ featuredImage: "../../../images/featured/15_Math_And_Physics-02_Forces-thumbnail
33
featuredImageAlt: 9 multicolored circles at varying heights on a grey background.
44
title: Forces
55
oneLineDescription: Simulate forces on multiple bodies as they move through liquid.
6+
7+
remix:
8+
- attributionURL: http://natureofcode.com
9+
attributionLabel: Dan Shiffman's "Nature of Code"
10+
remixLabel: Inspired by
11+
- revision-2023-dkessner
612
---
713

814
Demonstration of multiple forces acting on bodies.
915
Bodies experience gravity continuously. Bodies experience fluid
1016
resistance when in "water".
11-
(<a href="http://natureofcode.com">natureofcode.com</a>)
1217

1318
The force calculations are performed using the
1419
<a href="https://p5js.org/reference/p5/p5.Vector">p5.Vector</a>

src/content/examples/en/15_Math_And_Physics/05_Mandelbrot/description.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ featuredImage: "../../../images/featured/15_Math_And_Physics-05_Mandelbrot-thumb
33
featuredImageAlt: Colorful rendering of the Mandelbrot set.
44
title: Mandelbrot Set
55
oneLineDescription: Visualize a mathematical set that produces fractal structures.
6+
7+
remix:
8+
- attributionURL: https://processing.org/examples/mandelbrot.html
9+
attributionLabel: Dan Shiffman's example for Processing
10+
- revision-2023-dkessner
611
---
712

8-
Colorful rendering of the Mandelbrot set
9-
based on Daniel Shiffman's
10-
<a href="https://processing.org/examples/mandelbrot.html">Mandelbrot Example</a> for Processing.
13+
Colorful rendering of the Mandelbrot set.

src/layouts/ExampleLayout.astro

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,19 @@ const { Content } = await example.render();
7878
{resolvedRemix?.map((item, i) => (
7979
<>
8080
{i > 0 && " "}
81-
{item.remixLabel && item.remixURL ? (
81+
{item.remixLabel ? (
8282
<>
83-
<a href={item.remixURL}>{item.remixLabel}</a>
83+
{item.remixURL ? (
84+
<>
85+
<a href={item.remixURL}>{item.remixLabel}</a> by
86+
</>
87+
) : (
88+
item.remixLabel
89+
)}
90+
8491
{item.attributionLabel && (
8592
<>
86-
{" "}by{" "}
93+
{" "}
8794
{item.attributionURL ? (
8895
<a href={item.attributionURL}>{item.attributionLabel}</a>
8996
) : (

0 commit comments

Comments
 (0)