Files
osmWorkflow/.trellis/tasks/08-03-experiment-glb-compression/prd.md

2.0 KiB

Experiment GLB compression

Goal

Create and validate a repeatable GLB compression experiment for nantaizi-lake-innovation-valley, focused on reducing file size without making the current uncompressed GLB output the wrong baseline.

Current measurement:

  • nantaizi-lake-innovation-valley.glb: 20.50 MB
  • embedded images: 17.72 MB
  • non-image binary buffer: 2.45 MB
  • conclusion: texture compression / resize should be tested before geometry compression.

Requirements

  1. Add a standalone compression tool or script that consumes an existing GLB and writes a separate compressed GLB output.
  2. Do not replace the default <area>.glb in this first experiment.
  3. Prefer texture-first compression; geometry compression may be evaluated but should not be treated as the primary win.
  4. Keep the experiment repeatable from the command line.
  5. Validate only nantaizi-lake-innovation-valley.
  6. After visual review accepts the WebP result, integrate it as an explicit optional compress stage that does not run in all and does not replace the default GLB.
  7. Report:
    • source GLB size
    • compressed GLB size
    • image vs non-image size before compression
    • GLB extensions introduced
    • Cesium preview compatibility status or blocker

Acceptance Criteria

  • Compression command/script runs from this repo.
  • It produces a separate compressed GLB for nantaizi.
  • Source GLB is left intact.
  • scripts/glb-digest.js can inspect the compressed GLB or the blocker is documented if the digest needs extension support.
  • Visual/Cesium compatibility next step is clear.
  • Optional compress stage can generate compressed nantaizi artifacts from the existing Cesium outputs.
  • compress is not included in all and cannot be enabled from area stages.
  • No outputs/ files are committed.

Out Of Scope

  • Making compressed GLB replace the default pipeline artifact.
  • hanyang validation.
  • CDN/server gzip/brotli configuration.
  • Large frontend UI changes.