mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
ee1b6a837f
Every empty-state scene of the TREK mascot now plays a pre-rendered 3D clip instead of the SVG: a seamless loop per scene and theme plus a one-shot animation on click that cross-fades in and out. The clips are plain H.264 MP4 with stacked alpha (colour on top, the mask below) that a small WebGL shader joins into a transparent image, so the same file plays in every browser including iOS, decoded in hardware. The videos stay 2 px stand-ins and are drawn onto a canvas, which keeps browser video controls off the mascot. Each clip is cropped to the area its scene uses and placed back inside the 88:96 box, so every scene keeps the same scale. MDancingTrek picks the clip when one exists for the scene and face and falls back to the SVG under reduced motion, without WebGL, when autoplay is refused, in tests, or with localStorage trek-mascot-3d set to 0.