# star-shatter GLBs

Raw shatter-animation exports for the center-window star (see
[`web-gl-scene/src/scene/star-glb.ts`](../../web-gl-scene/src/scene/star-glb.ts)).

## Always run new exports through Draco compression

Each export in here has the same shape: ~56 shard meshes sharing one material, one baked
shatter animation, no textures. Straight out of the DCC tool, none of that is compressed —
positions/normals are raw float32 and every vertex is stored in full, so file size scales
directly with how dense the export's geometry is. `Broken-Jagged-60f_B238_2026-08-24.glb`
is the extreme case: 2.5MB because it came out ~5x higher-poly than the Aug-20 version,
for shatter shards that read as glass either way.

Running the export through **Draco** (`gltf-transform`) fixes this at the source instead of
by hand-decimating in the DCC tool:

- quantizes positions/normals (float32 → compressed, entropy-coded streams)
- optionally simplifies the mesh within a visually-negligible error tolerance
- keeps every node, mesh, and animation channel intact — shards stay independently
  animatable, nothing gets merged or dropped

On this asset it took the 2.5MB jagged-60 export down to **323KB (−87%)** with no visible
difference in the shatter.

**Do this for every new GLB before it lands in `web-gl-scene/public/`:**

```bash
./optimize-glb.sh input.glb output.glb
```

The site's `GLTFLoader` already has `DRACOLoader` wired up (self-hosted decoder at
`web-gl-scene/public/draco/`, not a third-party CDN), so any Draco-compressed GLB dropped
into `public/` just works — no other code changes needed.

## Folder layout

- `clean/`, `jagged/` — earlier per-fragment-count exports (30/60/90/120), uncompressed.
- `Broken-Jagged-60f_B238_2026-08-24.glb` — latest raw export, uncompressed. Kept here as
  the source-of-truth for re-running the script with different settings; the compressed
  build that actually ships lives at
  [`web-gl-scene/public/Broken-Jagged-60f_B238_2026-09-01_draco-cc.glb`](../../web-gl-scene/public/Broken-Jagged-60f_B238_2026-09-01_draco-cc.glb).
