mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
506b82ef0b
New package that encapsulates WebGL shader transitions for HyperFrames
compositions. Replaces ~200 lines of per-composition boilerplate with a
single HyperShader.init() call.
The library handles:
- WebGL context, quad buffer, shader compilation (13 shaders)
- html2canvas integration for DOM-to-texture capture
- DOM-during-holds rendering model (canvas hidden between transitions)
- Async scene capture with content-hidden incoming scenes
- Accent color theming (accentColor derives dark/mid/bright variants)
- Graceful degradation when WebGL unavailable
API:
var tl = HyperShader.init({
bgColor: "#0a0a1a",
accentColor: "#6366f1",
scenes: ["scene1", "scene2", "scene3"],
transitions: [
{ time: 7.2, shader: "cross-warp-morph", duration: 0.7 },
{ time: 15.2, shader: "domain-warp", duration: 0.7 },
]
});
Updates shader-setup.md to document the library-based approach.
Updates transitions.md with shader-compatible CSS rules and animation
rules for multi-scene compositions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>