diff --git a/README.md b/README.md index 34ccfd1..61a3fbd 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,8 @@ Release metadata and the original showcase live in `src/data/site.ts`: [All features](https://animathio.com/examples#all-features) uses editable source projects from [the main repository](https://github.com/AniMathIO/AniMathIO/tree/main/examples/feature-gallery). -Render the complete gallery with its release CLI and enabled Code Snippets -bundle, then copy the outputs into this checkout: +Render the complete gallery with its release CLI and all community bundles +listed in the source gallery README enabled, then copy the outputs into this checkout: ```bash cp /path/to/feature-gallery/manifest.json src/data/feature-gallery.json @@ -41,4 +41,3 @@ cp /path/to/feature-gallery/img/*.webp public/img/gallery/ ``` Each card loads its video on play. Keep the gallery media under 40 MB. -Upcoming community plugins are listed in `src/components/FeatureGallery.tsx`. diff --git a/public/img/gallery/molecule-caffeine.webp b/public/img/gallery/molecule-caffeine.webp new file mode 100644 index 0000000..a57f826 Binary files /dev/null and b/public/img/gallery/molecule-caffeine.webp differ diff --git a/public/img/gallery/molecule-esterification.webp b/public/img/gallery/molecule-esterification.webp new file mode 100644 index 0000000..5d9f69e Binary files /dev/null and b/public/img/gallery/molecule-esterification.webp differ diff --git a/public/img/gallery/network-arp.webp b/public/img/gallery/network-arp.webp new file mode 100644 index 0000000..925b01e Binary files /dev/null and b/public/img/gallery/network-arp.webp differ diff --git a/public/img/gallery/network-dns.webp b/public/img/gallery/network-dns.webp new file mode 100644 index 0000000..e304924 Binary files /dev/null and b/public/img/gallery/network-dns.webp differ diff --git a/public/img/gallery/optics-lens.webp b/public/img/gallery/optics-lens.webp new file mode 100644 index 0000000..cdf44de Binary files /dev/null and b/public/img/gallery/optics-lens.webp differ diff --git a/public/img/gallery/optics-tir.webp b/public/img/gallery/optics-tir.webp new file mode 100644 index 0000000..80e50dc Binary files /dev/null and b/public/img/gallery/optics-tir.webp differ diff --git a/public/img/gallery/physics-dominoes.webp b/public/img/gallery/physics-dominoes.webp new file mode 100644 index 0000000..89a55f1 Binary files /dev/null and b/public/img/gallery/physics-dominoes.webp differ diff --git a/public/img/gallery/physics-projectile.webp b/public/img/gallery/physics-projectile.webp new file mode 100644 index 0000000..3eb2d64 Binary files /dev/null and b/public/img/gallery/physics-projectile.webp differ diff --git a/public/videos/gallery/molecule-caffeine.mp4 b/public/videos/gallery/molecule-caffeine.mp4 new file mode 100644 index 0000000..3e659a4 Binary files /dev/null and b/public/videos/gallery/molecule-caffeine.mp4 differ diff --git a/public/videos/gallery/molecule-caffeine.webm b/public/videos/gallery/molecule-caffeine.webm new file mode 100644 index 0000000..6dc0d95 Binary files /dev/null and b/public/videos/gallery/molecule-caffeine.webm differ diff --git a/public/videos/gallery/molecule-esterification.mp4 b/public/videos/gallery/molecule-esterification.mp4 new file mode 100644 index 0000000..0d21301 Binary files /dev/null and b/public/videos/gallery/molecule-esterification.mp4 differ diff --git a/public/videos/gallery/molecule-esterification.webm b/public/videos/gallery/molecule-esterification.webm new file mode 100644 index 0000000..fe9f5e9 Binary files /dev/null and b/public/videos/gallery/molecule-esterification.webm differ diff --git a/public/videos/gallery/network-arp.mp4 b/public/videos/gallery/network-arp.mp4 new file mode 100644 index 0000000..7eafd72 Binary files /dev/null and b/public/videos/gallery/network-arp.mp4 differ diff --git a/public/videos/gallery/network-arp.webm b/public/videos/gallery/network-arp.webm new file mode 100644 index 0000000..2401735 Binary files /dev/null and b/public/videos/gallery/network-arp.webm differ diff --git a/public/videos/gallery/network-dns.mp4 b/public/videos/gallery/network-dns.mp4 new file mode 100644 index 0000000..932591a Binary files /dev/null and b/public/videos/gallery/network-dns.mp4 differ diff --git a/public/videos/gallery/network-dns.webm b/public/videos/gallery/network-dns.webm new file mode 100644 index 0000000..525ebff Binary files /dev/null and b/public/videos/gallery/network-dns.webm differ diff --git a/public/videos/gallery/optics-lens.mp4 b/public/videos/gallery/optics-lens.mp4 new file mode 100644 index 0000000..51c4b36 Binary files /dev/null and b/public/videos/gallery/optics-lens.mp4 differ diff --git a/public/videos/gallery/optics-lens.webm b/public/videos/gallery/optics-lens.webm new file mode 100644 index 0000000..3952228 Binary files /dev/null and b/public/videos/gallery/optics-lens.webm differ diff --git a/public/videos/gallery/optics-tir.mp4 b/public/videos/gallery/optics-tir.mp4 new file mode 100644 index 0000000..f305ad1 Binary files /dev/null and b/public/videos/gallery/optics-tir.mp4 differ diff --git a/public/videos/gallery/optics-tir.webm b/public/videos/gallery/optics-tir.webm new file mode 100644 index 0000000..59897b1 Binary files /dev/null and b/public/videos/gallery/optics-tir.webm differ diff --git a/public/videos/gallery/physics-dominoes.mp4 b/public/videos/gallery/physics-dominoes.mp4 new file mode 100644 index 0000000..147dd4d Binary files /dev/null and b/public/videos/gallery/physics-dominoes.mp4 differ diff --git a/public/videos/gallery/physics-dominoes.webm b/public/videos/gallery/physics-dominoes.webm new file mode 100644 index 0000000..cc4e2e9 Binary files /dev/null and b/public/videos/gallery/physics-dominoes.webm differ diff --git a/public/videos/gallery/physics-projectile.mp4 b/public/videos/gallery/physics-projectile.mp4 new file mode 100644 index 0000000..b5abff7 Binary files /dev/null and b/public/videos/gallery/physics-projectile.mp4 differ diff --git a/public/videos/gallery/physics-projectile.webm b/public/videos/gallery/physics-projectile.webm new file mode 100644 index 0000000..e0c2dd8 Binary files /dev/null and b/public/videos/gallery/physics-projectile.webm differ diff --git a/src/components/FeatureGallery.tsx b/src/components/FeatureGallery.tsx index 8ba5d7f..9836a42 100644 --- a/src/components/FeatureGallery.tsx +++ b/src/components/FeatureGallery.tsx @@ -1,5 +1,5 @@ import { useEffect, useRef, useState } from 'react' -import { ArrowUpRight, Play, Puzzle } from 'lucide-react' +import { ArrowUpRight, Play } from 'lucide-react' import clips from '../data/feature-gallery.json' const filters = [ @@ -16,13 +16,6 @@ const filters = [ type Filter = typeof filters[number][0] type Clip = typeof clips[number] -const upcoming = [ - { title: 'Molecule', summary: 'Molecular structures and chemical reactions.' }, - { title: 'Physics', summary: 'Collisions, projectiles and domino simulations.' }, - { title: 'Network', summary: 'Network topology and animated packet paths.' }, - { title: 'Optics', summary: 'Light rays, reflection and refraction.' }, -] - const ClipPlayer = ({ clip }: { clip: Clip }) => { const [playing, setPlaying] = useState(false) const poster = clip.poster.replace('img/', '/img/gallery/') @@ -66,22 +59,33 @@ const ClipPlayer = ({ clip }: { clip: Clip }) => { ) } -const GalleryCard = ({ clip }: { clip: Clip }) => ( -
- -
-

{clip.title}

-

{clip.summary}

- - {clip.plugin} -
-
-) +const GalleryCard = ({ clip }: { clip: Clip }) => { + const pluginName = clip.plugin_name ?? clip.plugin + + return ( +
+ +
+

{clip.title}

+

{clip.summary}

+
+ + {pluginName} + {clip.release && ( + + Release + )} +
+
+
+ ) +} export const FeatureGallery = () => { const section = useRef(null) @@ -127,23 +131,6 @@ export const FeatureGallery = () => {
{visible.map((clip) => )}
- - {(filter === 'all' || filter === 'community') && ( -
-

Upcoming community plugins

-
- {upcoming.map(({ title, summary }) => ( -
-

-

-

{summary}

-

Demo pending release

-
- ))} -
-
- )} ) } diff --git a/src/data/feature-gallery.json b/src/data/feature-gallery.json index 9d21719..368d656 100644 --- a/src/data/feature-gallery.json +++ b/src/data/feature-gallery.json @@ -701,6 +701,134 @@ "webm": "videos/code-snippets-morph.webm", "poster": "img/code-snippets-morph.webp" }, + { + "slug": "molecule-caffeine", + "title": "Caffeine draws itself", + "kinds": [ + "community" + ], + "plugin": "io.github.animathio.molecule", + "docs": "https://github.com/AniMathIO/plugins/blob/io.github.animathio.molecule%400.1.0/community/molecule/README.md", + "summary": "Watch Molecule Studio draw caffeine’s fused rings and atom labels bond by bond.", + "plugin_name": "Molecule Studio", + "release": "https://github.com/AniMathIO/plugins/releases/tag/io.github.animathio.molecule%400.1.0", + "seconds": 5.0, + "mp4": "videos/molecule-caffeine.mp4", + "webm": "videos/molecule-caffeine.webm", + "poster": "img/molecule-caffeine.webp" + }, + { + "slug": "molecule-esterification", + "title": "Esterification", + "kinds": [ + "community" + ], + "plugin": "io.github.animathio.molecule", + "docs": "https://github.com/AniMathIO/plugins/blob/io.github.animathio.molecule%400.1.0/community/molecule/README.md", + "summary": "Molecule Studio draws acetic acid and ethanol, then reveals ethyl acetate and water.", + "plugin_name": "Molecule Studio", + "release": "https://github.com/AniMathIO/plugins/releases/tag/io.github.animathio.molecule%400.1.0", + "seconds": 5.0, + "mp4": "videos/molecule-esterification.mp4", + "webm": "videos/molecule-esterification.webm", + "poster": "img/molecule-esterification.webp" + }, + { + "slug": "optics-lens", + "title": "Converging lens", + "kinds": [ + "community" + ], + "plugin": "io.github.animathio.optics", + "docs": "https://github.com/AniMathIO/plugins/blob/io.github.animathio.optics%400.1.0/community/optics/README.md", + "summary": "Follow three rays through a converging lens to an inverted real image in Ray Optics.", + "plugin_name": "Ray Optics", + "release": "https://github.com/AniMathIO/plugins/releases/tag/io.github.animathio.optics%400.1.0", + "seconds": 5.0, + "mp4": "videos/optics-lens.mp4", + "webm": "videos/optics-lens.webm", + "poster": "img/optics-lens.webp" + }, + { + "slug": "optics-tir", + "title": "Total internal reflection", + "kinds": [ + "community" + ], + "plugin": "io.github.animathio.optics", + "docs": "https://github.com/AniMathIO/plugins/blob/io.github.animathio.optics%400.1.0/community/optics/README.md", + "summary": "Ray Optics sweeps the incidence angle through the critical angle until only the reflected ray remains.", + "plugin_name": "Ray Optics", + "release": "https://github.com/AniMathIO/plugins/releases/tag/io.github.animathio.optics%400.1.0", + "seconds": 5.0, + "mp4": "videos/optics-tir.mp4", + "webm": "videos/optics-tir.webm", + "poster": "img/optics-tir.webp" + }, + { + "slug": "network-arp", + "title": "ARP request and reply", + "kinds": [ + "community" + ], + "plugin": "io.github.animathio.network", + "docs": "https://github.com/AniMathIO/plugins/blob/io.github.animathio.network%401.0.0/community/network/README.md", + "summary": "Net Lab floods an ARP request across a switch, then uses the learned address to ping a peer.", + "plugin_name": "Net Lab", + "release": "https://github.com/AniMathIO/plugins/releases/tag/io.github.animathio.network%401.0.0", + "seconds": 6.0, + "mp4": "videos/network-arp.mp4", + "webm": "videos/network-arp.webm", + "poster": "img/network-arp.webp" + }, + { + "slug": "network-dns", + "title": "Recursive DNS lookup", + "kinds": [ + "community" + ], + "plugin": "io.github.animathio.network", + "docs": "https://github.com/AniMathIO/plugins/blob/io.github.animathio.network%401.0.0/community/network/README.md", + "summary": "Net Lab follows a query for example.test from the client to its resolver and the authoritative server.", + "plugin_name": "Net Lab", + "release": "https://github.com/AniMathIO/plugins/releases/tag/io.github.animathio.network%401.0.0", + "seconds": 6.0, + "mp4": "videos/network-dns.mp4", + "webm": "videos/network-dns.webm", + "poster": "img/network-dns.webp" + }, + { + "slug": "physics-projectile", + "title": "Projectile trajectories", + "kinds": [ + "community" + ], + "plugin": "io.github.animathio.physics", + "docs": "https://github.com/AniMathIO/plugins/blob/io.github.animathio.physics%400.1.0/community/physics/README.md", + "summary": "Compare launch angles and follow the velocity arrow along the highlighted trajectory.", + "plugin_name": "Physics Play", + "release": "https://github.com/AniMathIO/plugins/releases/tag/io.github.animathio.physics%400.1.0", + "seconds": 5.0, + "mp4": "videos/physics-projectile.mp4", + "webm": "videos/physics-projectile.webm", + "poster": "img/physics-projectile.webp" + }, + { + "slug": "physics-dominoes", + "title": "Domino chain reaction", + "kinds": [ + "community" + ], + "plugin": "io.github.animathio.physics", + "docs": "https://github.com/AniMathIO/plugins/blob/io.github.animathio.physics%400.1.0/community/physics/README.md", + "summary": "A rolling ball tips the first domino, and each contact carries the motion down the row.", + "plugin_name": "Physics Play", + "release": "https://github.com/AniMathIO/plugins/releases/tag/io.github.animathio.physics%400.1.0", + "seconds": 5.0, + "mp4": "videos/physics-dominoes.mp4", + "webm": "videos/physics-dominoes.webm", + "poster": "img/physics-dominoes.webp" + }, { "slug": "webm-export", "title": "WebM export",