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

56 lines
2.0 KiB
Markdown

# 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
- [x] Compression command/script runs from this repo.
- [x] It produces a separate compressed GLB for nantaizi.
- [x] Source GLB is left intact.
- [x] `scripts/glb-digest.js` can inspect the compressed GLB or the blocker is
documented if the digest needs extension support.
- [x] Visual/Cesium compatibility next step is clear.
- [x] Optional `compress` stage can generate compressed nantaizi artifacts from
the existing Cesium outputs.
- [x] `compress` is not included in `all` and cannot be enabled from area
`stages`.
- [x] 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.