From f2ff90d42c44747ad207e72c149cf48b5af26c24 Mon Sep 17 00:00:00 2001 From: Sam <34695753+SamEyeBam@users.noreply.github.com> Date: Sat, 26 Sep 2026 01:13:52 +1200 Subject: [PATCH] BallOfLife --- docs/README.md | 28 ++++ docs/css/styles.css | 2 +- docs/index.html | 7 +- docs/js/controls/ControlFactory.js | 11 +- docs/js/controls/SceneUI.js | 33 ++++ docs/js/index.js | 3 + docs/js/shapes/BallOfLife.js | 252 +++++++++++++++++++++++++++++ docs/serve.py | 41 +++++ 8 files changed, 368 insertions(+), 9 deletions(-) create mode 100644 docs/README.md create mode 100644 docs/js/shapes/BallOfLife.js create mode 100644 docs/serve.py diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..aee9904 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,28 @@ +Run the app from this directory: + +```sh +python3 serve.py --port 5501 +``` + +Open http://localhost:5501/wave-machine or +http://localhost:5501/minds-eye-is-full-of-flowers. +Preset names are case-insensitive; replace spaces with hyphens (URL-encoded +spaces also work). Loading a preset from the Presets menu updates the URL, +and browser Back/Forward loads the corresponding preset. + +Built-in presets work in any browser. Saved presets only work where they are +stored in localStorage, on the same browser and origin (including port). +Unknown names show a message and leave an empty scene. + +Use this server for direct links and refreshes. An alternative host must serve +`index.html` for preset paths; trailing slashes should redirect to the same path +without the slash so relative assets load correctly. + +For **ball of life**, enter cylinder height/radius, ball radius, and ground line +length in centimetres. Point spacing is also in centimetres (10 means one point +every 10 cm). A 1000 cm column at 10 cm spacing has 101 points including the +base and top. Ground lines continue from the base without duplicating its point. +If a length is not divisible by its spacing, the remaining end section is empty. +Ball spacing follows each longitude from pole to pole along the surface; both +poles are included, so the final gap may be shorter. Longitude lines remain a +total count. Zoom changes only the view, not the physical dimensions or counts. diff --git a/docs/css/styles.css b/docs/css/styles.css index ae31616..ef592ef 100644 --- a/docs/css/styles.css +++ b/docs/css/styles.css @@ -979,4 +979,4 @@ canvas { .shape-picker-modal { width: 100%; } -} \ No newline at end of file +} diff --git a/docs/index.html b/docs/index.html index e9fe447..7e64723 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@