# Visual Techniques Reference 13 proven techniques from production HyperFrames videos. Use these in your storyboard and compositions to create visually rich, professional output. Each technique includes a minimal code pattern you can adapt. These are NOT advanced — they're standard motion design patterns that every composition should use at least 2-3 of. ## Contents - SVG path drawing - Canvas 2D procedural art - CSS 3D transforms - Per-word kinetic typography - Lottie animation - Video compositing - Character-by-character typing - Variable font axis animation - GSAP MotionPathPlugin - Velocity-matched transitions - Audio-reactive animation - Clip-path reveal masks - WebGL fragment shader art - When to use what > **Capturing live HTML/CSS as a GPU texture** (3D rotation + bloom, magnetic warp, shatter, liquid surface, portal, plus GLSL post-processing) is a separate, heavier capability — see `adapters/html-in-canvas-patterns.md`. Use it for 1–3 hero beats per video, not every beat. > > **Easing vocabulary** — the full ease-family palette (character + mood mapping) lives in `adapters/gsap-easing-and-stagger.md`. Every composition should use at least 3 different easings. > > **Named text-animation effects** (24 IDs like `typewriter`, `kinetic-center-build`, `soft-blur-in`) come from the external `animate-text` skill — see `adapters/animate-text.md` for the vocabulary and how to load it. --- ## 1. SVG Path Drawing A path draws itself in real-time, like someone tracing with a pen. Use for revealing diagrams, arrows, connector lines, or brand marks. ```html ``` Use `path.getTotalLength()` to calculate the dasharray value dynamically. --- ## 2. Canvas 2D Procedural Art Animated noise, particle fields, data visualizations — anything that evolves frame-by-frame. Drive it with a GSAP proxy. ```html ``` The `hash()` function is deterministic — same frame renders identically every time. --- ## 3. CSS 3D Transforms Perspective rotations create depth. Use for product showcases, card flips, architectural reveals. ```html
Product
Details
``` Always set `perspective` on the parent, `transform-style: preserve-3d` on the animated element. --- ## 4. Per-Word Kinetic Typography Words appear one-by-one, synced to transcript.json timestamps. The core technique for narration-driven videos. ```html
Anything a browser can render
``` The slide distance DECAYS per word (80→12px) — mimics a camera settling. --- ## 5. Lottie Animation Vector animations that play inside a composition. Use for logos, character animations, icons. ```html
``` `autoplay: false` + `loop: false` + `window.__hfLottie.push()` are mandatory — HyperFrames seeks each registered player to composition time, so anything left on `autoplay`/`loop` runs in wall-clock and renders non-deterministically. The adapter seeks absolute time (no modulo loop, no playback-rate scaling): bake repeating cycles or non-default speed into the Lottie asset or an explicit timeline, then verify the render. Full contract + `.lottie`/dotLottie variant: `adapters/lottie.md`. --- ## 6. Video Compositing Embed real video footage inside compositions. Videos must be `muted` with `playsinline`. ```html
``` The HyperFrames runtime handles video seeking and playback. --- ## 7. Character-by-Character Typing Terminal typing effect using `tl.call()` to update text content character by character. ```html
``` Use `ease: "steps(1)"` for cursor blink — creates discrete on/off. --- ## 8. Variable Font Axis Animation Animate font-variation-settings to reshape glyphs in real-time. Works with variable fonts that have axes like optical size (opsz), weight (wght), softness (SOFT). ```html ``` The glyph subtly reshapes as axes animate — optical size adjusts detail, weight changes thickness. --- ## 9. GSAP MotionPathPlugin Animate an element along an arbitrary SVG path. Use for sliders following curves, particles along trajectories, guided reveals. ```html
``` --- ## 10. Velocity-Matched Transitions Exit one beat and enter the next with matched velocities — creates perceived continuous motion. ```javascript // EXIT (in outgoing composition): accelerating with blur tl.to( ".content", { y: -150, filter: "blur(30px)", opacity: 0, duration: 0.33, ease: "power2.in", // accelerates }, beatDuration - 0.33, ); // ENTRY (in incoming composition): decelerating from blur gsap.set(".content", { y: 150, filter: "blur(30px)" }); tl.to( ".content", { y: 0, filter: "blur(0px)", duration: 1.0, ease: "power2.out", // decelerates }, 0, ); ``` The fastest point of both curves meets at the cut — the viewer perceives smooth camera motion. Match ease families: `.in` for exits, `.out` for entries. --- ## 11. Audio-Reactive Animation Drive any GSAP-tweenable property from the playing audio. Bass pulses a logo on kick drums. Treble glows a CTA on cymbals. Amplitude breathes a background during quiet phrases. The result: motion that feels locked to the track in a way pre-authored tweens never can. **When to use:** Any video with music or dramatic narration — brand reels, product launches, hype edits. Skip for calm/tutorial pacing. **How it works:** Pre-extract audio frequency bands into a JSON file, then sample per-frame via `tl.call()`: ```js // audio-data.json: { fps: 30, totalFrames: 900, frames: [{ bands: [0.82, 0.45, 0.31, ...] }, ...] } for (var f = 0; f < AUDIO_DATA.totalFrames; f++) { tl.call( (function (frame) { return function () { var bass = frame.bands[0]; // 0–1 var treble = frame.bands[13]; gsap.set(".logo", { scale: 1 + bass * 0.04 }); // 3–4% pulse on bass gsap.set(".cta", { filter: `drop-shadow(0 0 ${treble * 24}px #00C3FF)` }); }; })(AUDIO_DATA.frames[f]), [], f / AUDIO_DATA.fps, ); } ``` Per-frame sampling is required — a single tween will not react. Use the extract script: ```bash python3 skills/hyperframes-creative/scripts/extract-audio-data.py narration.wav --fps 30 --bands 16 -o audio-data.json ``` Keep text/logo intensity subtle (≤5% scale, ≤30% glow) — audio-reactive motion on tiny elements reads as jitter. Bigger backgrounds can push to 10–30%. **Never do:** equalizer bars, spectrum analyzers, waveform displays, strobing, rainbow color cycling. The audio provides _timing and intensity_; the visual vocabulary still comes from the brand. See `skills/hyperframes-creative/references/audio-reactive.md` for the full API and anti-patterns. --- ## 12. Clip-Path Reveal Masks A fixed window that content slides through — text or images enter from one side and are clipped by an invisible boundary. Different from SVG path drawing: the mask is static, the content moves. ```html
Your headline text here
``` Variations: `clip-path: circle(0% at 50% 50%)` → `circle(100%)` for iris reveals. `clip-path: polygon(...)` for custom shapes. --- ## 13. WebGL Fragment Shader Art Full GPU generative backgrounds — domain-warped FBM noise, cosine palette coloring, iridescent organic patterns. Far richer than Canvas 2D. ```html ``` Always include a Canvas 2D gradient fallback for environments without WebGL. --- ## When to Use What | Video energy | Techniques to combine | | ------------------------------ | --------------------------------------------------------------- | | High impact (launches, promos) | Per-word typography + velocity transitions + counter animations | | Cinematic (tours, stories) | SVG path drawing + video compositing + 3D transforms | | Technical (dev tools, APIs) | Character typing + Canvas 2D procedural + MotionPath | | Premium (luxury, enterprise) | Variable font animation + Lottie + slow velocity transitions | | Data-driven (stats, metrics) | Canvas 2D procedural + counter animations + SVG path drawing |