Commit Graph

5 Commits

Author SHA1 Message Date
Christian Semmler
f796ea4299
Clean up actor editor branch: DRY, dead code, CSS
- Extract buildNodeToPartGroupMap() in ActorRenderer to deduplicate
  map-building logic in loadAnimationForActor and playClickAnimation
- Refactor updateMissionScore() to use getMissionScoreOffset() instead
  of duplicating offset calculation
- Remove unused ActorPartLabels export from actorConstants
- Make fetchBitmap module-private (only used by fetchBitmapAsURL)
- Merge duplicate .globe-btn CSS blocks in LightPositionEditor
2026-02-13 16:37:15 -08:00
Christian Semmler
38ffd73236 Fetch assets from SI files via HTTP Range requests
Replace static animation, texture, and globe bitmap files with a
manifest-driven approach that extracts them directly from the game's
SI files at runtime using HTTP Range requests.

A new generate-manifest script scans SI files by MxCh objectId to
locate each asset's byte offset(s), verifies integrity via MD5, and
writes an asset-ranges.json manifest. The app consumes this manifest
to fetch assets on demand, including support for files split across
MxCh interleave boundaries.

Also removes unused constants (ActorLODIndex, animation keyframe
flag constants).
2026-02-08 16:09:13 -08:00
Christian Semmler
a85e2ab952
Organize public assets (#22)
* Organize public assets into subdirectories

Group 80+ flat files into images/, textures/, pdf/, and audio/ subdirectories
for easier navigation. Update all references across 14 source files.

* Add apple-touch-icon
2026-02-08 00:01:45 +01:00
Christian Semmler
c85eeef56a
Feature/vehicle part editor (#14)
Some checks are pending
Build / build (push) Waiting to run
* Add vehicle part color editor to save editor

- Add Vehicles tab with 3D preview of customizable vehicle parts
- Support all 43 colorable parts across 4 vehicles (dune buggy, helicopter, jetski, race car)
- Implement shared LOD resolution for proper rendering of all parts
- Extract reusable NavButton and ResetButton components
- Remove debug console.log statements from ScoreCube

* Reserve space for reset button in vehicle editor to prevent layout shift

* Add tooltip to vehicle editor explaining click-to-cycle interaction

* Add scroll-into-view behavior for name slots on mobile

When name slots overflow on narrow screens, focusing a partially visible
slot now smoothly scrolls it into view. Scrollbar is hidden for cleaner UI.

* Extract EditorTooltip component for consistent tooltip positioning

Refactored tooltip markup into reusable EditorTooltip component used by
both ScoreCube and VehicleEditor. Tooltip now consistently appears in
top right corner of the editor section.

* Add transparency support to vehicle part rendering

Apply mesh alpha values from WDB to Three.js materials. In the original
game, alpha=0 means opaque while alpha>0 enables transparency. Disable
depthWrite for transparent meshes to prevent z-fighting.

* Use MeshLambertMaterial for original game-like rendering

Switch from MeshStandardMaterial (PBR) to MeshLambertMaterial for flat,
vibrant colors matching the original game. Simplify lighting setup for
solid colors without visible shadows.

* Fix WDB texture parsing for parts vs models

Parts and models have different texture info formats - models include a
skipTextures field that parts don't have. Add isModel parameter to
parseTextureInfo to handle this difference correctly. Also remove silent
catch blocks and overly defensive checks.
2026-02-02 02:08:12 +01:00
Christian Semmler
36a6e0fde9
Feature/island sky color editor (#13)
* Add Island tab with sky color editor

- Add parseVariables() to SaveGameParser to extract variable names, values, and offsets
- Add updateVariable() to SaveGameSerializer for modifying variable values
- Add colorUtils.js with LEGO Island's custom HSV-to-RGB algorithm
- Add SkyColorEditor component with H/S/V sliders and color preview
- Add Island tab to SaveEditorPage with Sky Color section
- Include reset to default button when values differ from default (56/54/68)

* Remove tooltip

* Add light position editor to Island tab

Allows users to select one of 6 sun positions using visual globe
image selectors. Includes converted globe images (BMP to WebP).
2026-02-01 23:42:40 +01:00