Add spiralProngs to Phyllotaxis and update config

Introduces a new 'spiralProngs' property to the Phyllotaxis class and its configuration, allowing control over spiral prong count. Also expands the 'width' range for NewWave in the config. Updates the drawSpiral method to use spiralProngs for angle calculation.
This commit is contained in:
Sam
2025-09-01 18:42:23 +12:00
parent 700f984314
commit 1fe4d3763e
2 changed files with 15 additions and 9 deletions

View File

@@ -50,6 +50,7 @@ async function fetchConfig(className) {
{ type: "range", min: 0, max: 3141, defaultValue: 0, property: "start" },
{ type: "range", min: 1, max: 10000, defaultValue: 300, property: "nMax" },
{ type: "range", min: 0, max: 2, defaultValue: 0, property: "wave" },
{ type: "range", min: 1, max: 12, defaultValue: 2, property: "spiralProngs" },
{ type: "color", defaultValue: "#2D81FC", property: "colour1" },
{ type: "color", defaultValue: "#FC0362", property: "colour2" },
],
@@ -98,7 +99,7 @@ async function fetchConfig(className) {
{ type: "range", min: 8000, max: 2000000, defaultValue: 2000000, property: "milestone" },
],
NewWave: [
{ type: "range", min: 300, max: 600, defaultValue: 342, property: "width" },
{ type: "range", min: 300, max: 1600, defaultValue: 342, property: "width" },
{ type: "range", min: 2, max: 40, defaultValue: 4, property: "sides" },
{ type: "range", min: 1, max: 100, defaultValue: 1, property: "step" },
{ type: "range", min: 1, max: 10, defaultValue: 4, property: "lineWidth" },