isle.pizza/scripts
Christian Semmler 3116ac1c7f
Some checks failed
Build / build (push) Has been cancelled
Buildings editor (#26)
* Building editor

Add a Buildings tab to the Save Game Editor that lets users browse
all 16 buildings, preview them in 3D, and customize their properties
(sound, move, mood, variant) by clicking, matching the original game
behavior per character.

- Parse 16 buildings + nextVariant from save files instead of skipping
- Add serializer methods to patch building fields in-place
- Create BuildingRenderer (extends AnimatedRenderer) for 3D preview
  with click animations from SNDANIM.SI
- Create BuildingEditor component with per-character click behavior
  (Pepper: variants, Mama: sounds, Papa: moves, Laura: moods)
- Extract 18 building animations and 2 building sounds into asset bundle
- Fix centerAndScaleModel to account for scale in position offset

* Add Building Editor to February 2026 changelog

* DRY up renderer hierarchy: extract shared logic into base classes

Move duplicated animation tree utilities (findAnimatedNode,
evaluateNodeChain, findNodePath, evaluateLocalTransform),
click animation (queueClickAnimation, playQueuedAnimation,
buildRotationTracks), and raycast hit testing (getClickedMesh)
from PlantRenderer and BuildingRenderer into AnimatedRenderer.

Add loadTextures() and createMeshMaterial() helpers to BaseRenderer,
replacing identical texture-loading loops and material-creation code
across all four renderers.

PlantRenderer: 279 → 73 lines (-74%)
BuildingRenderer: 245 → 57 lines (-77%)
2026-02-14 19:35:52 +01:00
..
generate-save-editor-assets.js Buildings editor (#26) 2026-02-14 19:35:52 +01:00
prepare.js Use Node.js built-in parseArgs for CLI argument parsing (#17) 2026-02-03 01:37:08 +01:00
workbox-inject.js Migrate frontend to Svelte 5 2026-01-11 19:10:16 -07:00