Skip to content

Commit ed325fc

Browse files
feat: add open graph and meta tags and lint code
1 parent 6a743ec commit ed325fc

File tree

5 files changed

+32
-27
lines changed

5 files changed

+32
-27
lines changed

2d/immigration/immigration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ export class ImmigrationAutomaton extends ConwayAutomaton {
88
constructor(...args: ConstructorParameters<typeof ConwayAutomaton>) {
99
const [canvasEl, width, height, resolution, _, paletteColors] = args
1010
super(canvasEl, width, height, resolution, 3, paletteColors)
11-
this.aliveColors = this.colors.slice(1) // Last 2 colors for alive states
11+
this.aliveColors = this.colors.slice(1) // Last 2 colors for alive states
1212
this.aliveColorIds = this.aliveColors.map((color) => color.id)
13-
this.colorOff = this.colors[0] // First color for dead state
13+
this.colorOff = this.colors[0] // First color for dead state
1414
}
1515

1616
private getMostFrequentAliveColor = (

2d/quadlife/quadlife.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export class QuadLifeAutomaton extends ConwayAutomaton {
99
const [canvasEl, width, height, resolution, _, paletteColors] = args
1010
// Use parent class's color handling, just force 5 colors
1111
super(canvasEl, width, height, resolution, 5, paletteColors)
12-
this.aliveColors = this.colors.slice(1) // Last 4 colors for alive states
12+
this.aliveColors = this.colors.slice(1) // Last 4 colors for alive states
1313
this.aliveColorIds = this.aliveColors.map((color) => color.id)
14-
this.colorOff = this.colors[0] // First color for dead state
14+
this.colorOff = this.colors[0] // First color for dead state
1515
}
1616

1717
private getQuadLifeColor = (

index.html

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,26 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<title>adrien carpentier | cyclic cellular automaton</title>
6-
<meta name="Description" content="cyclic cellular automaton" />
5+
<title>adrien carpentier | generative art visualizations</title>
6+
<meta name="Description" content="Interactive visualization of cyclic cellular automata in 1D, 2D, and 3D, along with other cellular automata like Conway's Game of Life" />
7+
8+
<!-- OpenGraph tags -->
79
<meta property="og:locale" content="en_US" />
8-
<meta property="og:site_name" content="cyclic cellular automaton" />
9-
<meta
10-
property="og:url"
11-
content="https://adriencarpentier.com/cyclic cellular automaton"
12-
/>
10+
<meta property="og:site_name" content="Cellular Automata" />
11+
<meta property="og:url" content="https://automata.adriencarpentier.com" />
1312
<meta property="og:type" content="website" />
14-
<meta
15-
property="og:title"
16-
content="adrien carpentier | cyclic cellular automaton"
17-
/>
18-
<meta property="og:description" content="cyclic cellular automaton" />
19-
<meta property="og:image" content="favicons/android-chrome-512x512.png" />
13+
<meta property="og:title" content="adrien carpentier | Generative Art Visualizations" />
14+
<meta property="og:description" content="Interactive visualization of cyclic cellular automata in 1D, 2D, and 3D, along with other cellular automata like Conway's Game of Life" />
15+
<meta property="og:image" content="opengraph.png" />
16+
<meta property="og:image:width" content="1200" />
17+
<meta property="og:image:height" content="630" />
18+
19+
<!-- Twitter Card tags -->
20+
<meta name="twitter:card" content="summary_large_image" />
21+
<meta name="twitter:title" content="adrien carpentier | Generative Art Visualizations" />
22+
<meta name="twitter:description" content="Interactive visualization of cyclic cellular automata in 1D, 2D, and 3D, along with other cellular automata like Conway's Game of Life" />
23+
<meta name="twitter:image" content="opengraph.png" />
24+
2025
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2126
<link rel="shortcut icon" type="image/x-icon" href="favicons/favicon.ico" />
2227
<link href="style.css" type="text/css" rel="stylesheet" />

main.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -431,21 +431,21 @@ const createAutomaton = async (
431431
return new ConwayAutomaton(canvasEl, width, height, resolution)
432432
case "immigration":
433433
return new ImmigrationAutomaton(
434-
canvasEl,
435-
width,
436-
height,
434+
canvasEl,
435+
width,
436+
height,
437437
resolution,
438-
undefined, // colorsCount (will be forced to 3)
439-
paletteColors // Pass palette colors
438+
undefined, // colorsCount (will be forced to 3)
439+
paletteColors, // Pass palette colors
440440
)
441441
case "quadlife":
442442
return new QuadLifeAutomaton(
443-
canvasEl,
444-
width,
445-
height,
443+
canvasEl,
444+
width,
445+
height,
446446
resolution,
447-
undefined, // colorsCount (will be forced to 5)
448-
paletteColors // Pass palette colors
447+
undefined, // colorsCount (will be forced to 5)
448+
paletteColors, // Pass palette colors
449449
)
450450
case "langton":
451451
return new LangtonAutomaton(canvasEl, width, height, resolution)

public/opengraph.png

588 KB
Loading

0 commit comments

Comments
 (0)