Skip to content

gooseworks-ai/goose-skills / skills/video/render-offer-ad

render-offer-ad

Verified

Render a punchy ~12s vertical (9:16) music-only direct-response OFFER ad as a 4-beat kinetic-typography film — HEADLINE slam → real PRODUCT drop → CLAIM/proof → CTA pill — from one config of copy slots, a real product photo, a brand palette, fonts, bpm, and beat split. DETERMINISTIC + FREE (a bundled Remotion project; springs + interpolate, no AI-gen for visuals). Backgrounds are engine gradient divs off the palette, props are inline SVG, the ONLY composited bitmap is the REAL product photo (objectFit:contain, never stretched), and ALL headline/claim/CTA/URL/wordmark text is typeset in the engine — never AI-rendered (the format's credibility guard). A driver binds the config to Remotion input props, renders the 9:16 master, and derives a 1:1 center-crop with ffmpeg. Two gating checks run before render (claim verbs must match the product's physical format; the claim beat needs an edge-entry mechanism prop). Use for the motion-graphics-offer-ad format.

project/src/lib/anim.ts

View on GitHub
import { interpolate, spring, Easing } from "remotion";

// ---- Motion kit -----------------------------------------------------------
// The reusable spring/interpolate primitives that give this format its
// signature kinetic-typography feel. Ported 1:1 from the worked run — do NOT
// rewrite these; the whole format's rhythm depends on them. Colors/copy are
// injected via props (see props.ts), NOT hardcoded here.

// ---- Beat grid ------------------------------------------------------------
// The big slams land ON the scene-start downbeats so type hits with the kick.
// FPS is fixed at 30; BEAT_FRAMES is derived from bpm at runtime (props.ts).
export const FPS = 30;

export function beatFrames(bpm: number): number {
  // frames per beat @ `bpm`, 30fps.  (60 / bpm) * 30
  return (60 / bpm) * FPS;
}

// ---- Slam-in with motion blur ---------------------------------------------
// Signature kinetic entrance: word punches in oversized with a vertical
// motion-blur smear, overshoots, then settles sharp on the beat.
export interface SlamOpts {
  damping?: number;
  stiffness?: number;
  mass?: number;
  fromScale?: number;
  blurFrames?: number;
  blurAmount?: number;
  fromY?: number;
}

export function slamIn(local: number, fps: number, opts: SlamOpts = {}) {
  const {
    damping = 11,
    stiffness = 220,
    mass = 0.7,
    fromScale = 1.7,
    blurFrames = 6,
    blurAmount = 22,
    fromY = 0,
  } = opts;
  const s = spring({ frame: local, fps, config: { damping, stiffness, mass } });
  const scale = fromScale + (1 - fromScale) * s;
  const opacity = interpolate(local, [0, 3], [0, 1], {
    extrapolateLeft: "clamp",
    extrapolateRight: "clamp",
  });
  const blur = interpolate(local, [0, blurFrames], [blurAmount, 0], {
    extrapolateLeft: "clamp",
    extrapolateRight: "clamp",
    easing: Easing.out(Easing.quad),
  });
  const y = interpolate(local, [0, 8], [fromY, 0], {
    extrapolateLeft: "clamp",
    extrapolateRight: "clamp",
    easing: Easing.bezier(0.16, 1, 0.3, 1),
  });
  return {
    transform: `translateY(${y}px) scale(${scale})`,
    opacity,
    filter: blur > 0.3 ? `blur(${blur}px)` : undefined,
  } as React.CSSProperties;
}

// Drop-in from above with settle bounce (the product bottle, drop-style words).
export function dropIn(
  local: number,
  fps: number,
  fromY: number,
  opts: { damping?: number; stiffness?: number; mass?: number; blur?: number } = {}
) {
  const { damping = 13, stiffness = 170, mass = 0.9, blur = 18 } = opts;
  const s = spring({ frame: local, fps, config: { damping, stiffness, mass } });
  const y = fromY * (1 - s);
  const opacity = interpolate(local, [0, 4], [0, 1], {
    extrapolateLeft: "clamp",
    extrapolateRight: "clamp",
  });
  const mb = interpolate(local, [0, 7], [blur, 0], {
    extrapolateLeft: "clamp",
    extrapolateRight: "clamp",
    easing: Easing.out(Easing.quad),
  });
  return { y, opacity, blur: mb };
}

// Gentle continuous bob (idle float for a settled hero element).
export function bob(local: number, amp = 10, periodFrames = 70) {
  return Math.sin((local / periodFrames) * Math.PI * 2) * amp;
}

// Fly-in from a screen edge with overshoot (mechanism prop, columns, chips).
export function flyIn(local: number, fps: number, fromX: number, fromYExtra = 0) {
  const s = spring({ frame: local, fps, config: { damping: 16, stiffness: 200, mass: 0.7 } });
  const x = fromX * (1 - s);
  const y = fromYExtra * (1 - s);
  const opacity = interpolate(local, [0, 5], [0, 1], {
    extrapolateLeft: "clamp",
    extrapolateRight: "clamp",
  });
  return { x, y, opacity };
}

// Sticker-pop: scale-bounce from tiny with overshoot, for chips/pills.
export function popIn(
  local: number,
  fps: number,
  opts: { damping?: number; stiffness?: number; mass?: number; rotate?: number } = {}
) {
  const { damping = 9, stiffness = 240, mass = 0.6, rotate = 0 } = opts;
  const s = spring({ frame: local, fps, config: { damping, stiffness, mass } });
  const scale = interpolate(s, [0, 1], [0, 1]);
  const opacity = interpolate(local, [0, 3], [0, 1], {
    extrapolateLeft: "clamp",
    extrapolateRight: "clamp",
  });
  const rot = rotate * (1 - s);
  return { scale, opacity, rot };
}

// Horizontal wipe progress 0->1 over `len` frames (strike-through reveal).
export function wipe(local: number, startAt: number, len: number) {
  return interpolate(local, [startAt, startAt + len], [0, 1], {
    extrapolateLeft: "clamp",
    extrapolateRight: "clamp",
    easing: Easing.bezier(0.16, 1, 0.3, 1),
  });
}

// Quick exit smear: scales up + blurs out right before a hard cut.
export function exitSmear(local: number, outAt: number, len = 5) {
  const t = interpolate(local, [outAt - len, outAt], [0, 1], {
    extrapolateLeft: "clamp",
    extrapolateRight: "clamp",
    easing: Easing.in(Easing.quad),
  });
  return { opacity: 1 - t, blur: t * 16, scaleAdd: t * 0.25 };
}

export const SNAP = Easing.bezier(0.16, 1, 0.3, 1);
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall