Index of every page on this site: llms.txt
All skills
notedit avatar

/spring-animation

@9a2d593
by leeoxiangnotedit/happy-skills341 stars
40
Run it yourself

Remotion spring physics for motion graphics video production. Bouncy entrances, elastic trails, orchestrated sequences, physics presets, and organic motion patterns that interpolate() alone cannot achieve.

Use this Skill: https://skilld.dev/gh/notedit/happy-skills/spring-animation

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

rulesspring-presets.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Built-in Presets

Import from spring-presets.ts:

import { SPRING } from './spring-presets';

spring({ frame, fps, config: SPRING.bouncy });

Preset Definitions

export const SPRING = {
  smooth:   { damping: 200 },
  snappy:   { damping: 20, stiffness: 200 },
  bouncy:   { damping: 8 },
  heavy:    { damping: 15, stiffness: 80, mass: 2 },
  wobbly:   { damping: 4, stiffness: 80 },
  stiff:    { damping: 15, stiffness: 300 },
  gentle:   { damping: 20, stiffness: 40, mass: 1.5 },
  molasses: { damping: 25, stiffness: 30, mass: 3 },
  pop:      { damping: 6, stiffness: 150 },
  rubber:   { damping: 3, stiffness: 100, mass: 0.5 },
} as const;

Approximate Duration (at 30fps)

Use measureSpring() for exact values. These are approximations:

Preset ~Frames ~Seconds
smooth 23 0.77s
snappy 18 0.60s
bouncy 55 1.83s
heavy 65 2.17s
wobbly 85 2.83s
stiff 12 0.40s
gentle 50 1.67s
molasses 80 2.67s
pop 60 2.00s
rubber 100 3.33s

Custom Presets for Specific Styles

Brand-Specific Presets

// Tech startup -- fast, precise, minimal bounce
const TECH = {
  primary: { damping: 25, stiffness: 180 },
  secondary: { damping: 35, stiffness: 120 },
  background: { damping: 200, stiffness: 50 },
};

// Luxury brand -- slow, weighty, no bounce
const LUXURY = {
  primary: { damping: 40, stiffness: 40, mass: 2 },
  secondary: { damping: 50, stiffness: 30, mass: 1.5 },
  background: { damping: 200, stiffness: 20, mass: 3 },
};

// Kids/playful -- bouncy, energetic
const PLAYFUL = {
  primary: { damping: 5, stiffness: 120 },
  secondary: { damping: 8, stiffness: 100 },
  background: { damping: 15, stiffness: 60 },
};

// Editorial/news -- crisp, professional
const EDITORIAL = {
  primary: { damping: 30, stiffness: 200 },
  secondary: { damping: 40, stiffness: 150 },
  background: { damping: 200, stiffness: 80 },
};

Animation-Role Presets

// Per-role configs (use within any brand style)
const ROLES = {
  // First element to appear -- sets the energy
  hero: { damping: 8, stiffness: 100 },
  // Supporting text -- slightly calmer
  support: { damping: 15, stiffness: 120 },
  // Background/ambient -- never bounces
  ambient: { damping: 200, stiffness: 40 },
  // Exit animation -- fast, clean
  exit: { damping: 20, stiffness: 200 },
  // Attention grabber -- strong overshoot
  attention: { damping: 4, stiffness: 150 },
};

Creating Custom Configs

From Feel Description

"I want it to feel..." Start With Then Adjust
Snappy but with a tiny bounce { damping: 18, stiffness: 200 } Lower damping for more bounce
Heavy and dramatic { damping: 15, stiffness: 60, mass: 2.5 } Increase mass for more weight
Elastic like a rubber band { damping: 3, stiffness: 100, mass: 0.5 } Lower mass for faster oscillation
Smooth like butter { damping: 200, stiffness: 80 } Increase damping to remove all bounce
Quick pop { damping: 8, stiffness: 200 } Higher stiffness for faster arrival

Iteration Process

  1. Start with the closest preset
  2. Adjust ONE parameter at a time
  3. Use Remotion Studio preview to check feel
  4. Use measureSpring() to verify duration fits your scene
// Test in Remotion Studio:
const testSpring = spring({
  frame,
  fps,
  config: { damping: 12, stiffness: 120, mass: 1.2 },
});
// Watch the preview, adjust until it feels right

Clamped vs Unclamped

By default, springs can overshoot (value > 1.0). Use overshootClamping for properties that should never exceed target:

// Unclamped (default) -- good for scale, translateY
const scale = spring({ frame, fps, config: SPRING.bouncy });
// Can be 1.15 at peak overshoot

// Clamped -- good for opacity, progress bars
const opacity = spring({
  frame, fps,
  config: { ...SPRING.bouncy, overshootClamping: true },
});
// Never exceeds 1.0

Rule of thumb:

  • Clamp: opacity, clip-path progress, color interpolation input
  • Don't clamp: scale, translateX/Y, rotation, width/height

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2mo5 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides a comprehensive library of React components, utility hooks, and physics presets for implementing spring-based animations in Remotion video projects. No security issues or malicious patterns were detected.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer9mo

    5/5 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 9a2d593. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 9 months ago
Other metadata
metadata
{
  "tags": "spring, remotion, motion-graphics, animation, video, physics, bounce, elastic, trail, stagger"
}

README badge

README badge for notedit/happy-skills/spring-animation