From 63bd42642ad0b0fb88045214e330721e9dc6737b Mon Sep 17 00:00:00 2001 From: Joe Pea Date: Wed, 27 Dec 2023 18:44:09 -0800 Subject: [PATCH] add a lava lamp demo! --- _sidebar.md | 13 +- _sidebar.src.md | 13 +- examples/lava-lamp/README.md | 3 + examples/lava-lamp/example.html | 368 ++++++++++++++++++++++++++++++++ importmap.js | 2 + 5 files changed, 387 insertions(+), 12 deletions(-) create mode 100644 examples/lava-lamp/README.md create mode 100644 examples/lava-lamp/example.html diff --git a/_sidebar.md b/_sidebar.md index 7083ee2..84791b6 100644 --- a/_sidebar.md +++ b/_sidebar.md @@ -21,12 +21,13 @@ - - [Hello world!](/examples/hello-world/ ':class=no-sublist') - - [🎄 Skateboard Configurator](/examples/skateboard-configurator/ ':class=no-sublist') - - [Picture Frame](/examples/picture-frame ':class=no-sublist') - - [NASA Astrobee Robot](/examples/nasa-astrobee-robot/ ':class=no-sublist') - - [Velodyne Lidar Scan](/examples/velodyne-lidar-scan/ ':class=no-sublist') - - [Shelby GT350 Points](/examples/shelby-gt350-points/ ':class=no-sublist') + - [🌍 Hello world!](/examples/hello-world/ ':class=no-sublist') + - [🛹 Skateboard Configurator](/examples/skateboard-configurator/ ':class=no-sublist') + - [🟠 Lava Lamp](/examples/lava-lamp/ ':class=no-sublist') + - [🖼️ Picture Frame](/examples/picture-frame ':class=no-sublist') + - [🤖 NASA Astrobee Robot](/examples/nasa-astrobee-robot/ ':class=no-sublist') + - [✨ Velodyne Lidar Scan](/examples/velodyne-lidar-scan/ ':class=no-sublist') + - [🏎️ Shelby GT350 Points](/examples/shelby-gt350-points/ ':class=no-sublist') - [Disco Helmet](/examples/disco-helmet/ ':class=no-sublist') - [Buttons with shadow](/examples/buttons-with-shadow.md ':class=no-sublist') - [Rounded rectangle](/examples/rounded-rectangle.md ':class=no-sublist') diff --git a/_sidebar.src.md b/_sidebar.src.md index 2537b5b..d6c70a3 100644 --- a/_sidebar.src.md +++ b/_sidebar.src.md @@ -21,12 +21,13 @@ - - [Hello world!](/examples/hello-world/ ':class=no-sublist') - - [🎄 Skateboard Configurator](/examples/skateboard-configurator/ ':class=no-sublist') - - [Picture Frame](/examples/picture-frame ':class=no-sublist') - - [NASA Astrobee Robot](/examples/nasa-astrobee-robot/ ':class=no-sublist') - - [Velodyne Lidar Scan](/examples/velodyne-lidar-scan/ ':class=no-sublist') - - [Shelby GT350 Points](/examples/shelby-gt350-points/ ':class=no-sublist') + - [🌍 Hello world!](/examples/hello-world/ ':class=no-sublist') + - [🛹 Skateboard Configurator](/examples/skateboard-configurator/ ':class=no-sublist') + - [🟠 Lava Lamp](/examples/lava-lamp/ ':class=no-sublist') + - [🖼️ Picture Frame](/examples/picture-frame ':class=no-sublist') + - [🤖 NASA Astrobee Robot](/examples/nasa-astrobee-robot/ ':class=no-sublist') + - [✨ Velodyne Lidar Scan](/examples/velodyne-lidar-scan/ ':class=no-sublist') + - [🏎️ Shelby GT350 Points](/examples/shelby-gt350-points/ ':class=no-sublist') - [Disco Helmet](/examples/disco-helmet/ ':class=no-sublist') - [Buttons with shadow](/examples/buttons-with-shadow.md ':class=no-sublist') - [Rounded rectangle](/examples/rounded-rectangle.md ':class=no-sublist') diff --git a/examples/lava-lamp/README.md b/examples/lava-lamp/README.md new file mode 100644 index 0000000..b378b1d --- /dev/null +++ b/examples/lava-lamp/README.md @@ -0,0 +1,3 @@ +# Lava Lamp + + diff --git a/examples/lava-lamp/example.html b/examples/lava-lamp/example.html new file mode 100644 index 0000000..fc80bf7 --- /dev/null +++ b/examples/lava-lamp/example.html @@ -0,0 +1,368 @@ + + + + +lava lamp + + + + +
+
+ three.js - marching cubes
+ based on greggman's blob, original code by Henrik Rydgård +
+ +
+ + + + + + + + + + + + +
+ + + + + diff --git a/importmap.js b/importmap.js index b521567..afe8f5a 100644 --- a/importmap.js +++ b/importmap.js @@ -24,6 +24,8 @@ 'solid-js/store': './modules/solid-js/store/dist/store.js', three: './modules/three/src/Three.js', 'three/': './modules/three/', + // For Three.js example modules so we don't have to change their imports. + 'three/addons/': './modules/three/examples/jsm/', // live-code '@lume/live-code': './modules/@lume/live-code/dist/index.js',