continuous-loops

GitHub

指导创建无限循环动画(如加载旋转、脉冲、背景效果),应用迪士尼12原则确保无缝与性能,提供CSS实现模式及时间建议。

skills/05-by-animation-type/continuous-loops/SKILL.md dylantarre/animation-principles

Trigger Scenarios

创建加载旋转器 制作脉冲指示器 生成背景环境动画

Install

npx skills add dylantarre/animation-principles --skill continuous-loops -g -y
More Options

Non-standard path

npx skills add https://github.com/dylantarre/animation-principles/tree/main/skills/05-by-animation-type/continuous-loops -g -y

Use without installing

npx skills use dylantarre/animation-principles@continuous-loops

指定 Agent (Claude Code)

npx skills add dylantarre/animation-principles --skill continuous-loops -a claude-code -g -y

安装 repo 全部 skill

npx skills add dylantarre/animation-principles --all -g -y

预览 repo 内 skill

npx skills add dylantarre/animation-principles --list

SKILL.md

Frontmatter
{
    "name": "continuous-loops",
    "description": "Use when creating ongoing animations - loading spinners, pulsing indicators, ambient motion, background effects, or any animation that repeats indefinitely."
}

Continuous Loop Animations

Apply Disney's 12 principles to animations that never stop.

Principle Application

Squash & Stretch: Subtle scale oscillation (0.98-1.02) creates organic breathing. Avoid rigid mechanical loops.

Anticipation: Build anticipation into the loop cycle. Brief pause at extremes before reversing.

Staging: Loops should support, not dominate. Keep amplitude subtle for background elements.

Straight Ahead vs Pose-to-Pose: Design keyframe poses that loop seamlessly. End frame must flow into start frame.

Follow Through & Overlapping: Multi-part loops have elements at different phases. Three dots pulse with 120° phase offset.

Slow In/Slow Out: Use ease-in-out for smooth oscillations. Linear motion looks mechanical.

Arcs: Circular motion follows true arcs. Spinners rotate, pendulums swing, orbits circle.

Secondary Action: Primary rotation + secondary wobble. Spinner spins while slightly bouncing.

Timing:

  • Fast loops: 500-800ms (spinners, urgent indicators)
  • Medium loops: 1000-2000ms (pulsing, breathing)
  • Slow loops: 2000-4000ms (ambient, background)

Exaggeration: Minimal for loops - they're already attention-grabbing through repetition.

Solid Drawing: Loops must be seamless. Any jump between end and start destroys the illusion.

Appeal: Loops should be hypnotic, not annoying. Test at 30 seconds - still pleasant?

Timing Recommendations

Loop Type Duration Easing Iterations
Spinner 600-800ms linear (rotation) infinite
Pulse 1500-2000ms ease-in-out infinite
Skeleton Shimmer 1500ms ease-in-out infinite
Typing Dots 1400ms ease-in-out infinite
Breathing 3000-4000ms ease-in-out infinite
Floating 3000-5000ms ease-in-out infinite

Implementation Patterns

/* Smooth spinner */
.spinner {
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Organic pulse */
.pulse {
  animation: pulse 2000ms ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

/* Staggered dots */
.dot {
  animation: bounce 1400ms ease-in-out infinite;
}
.dot:nth-child(2) { animation-delay: 160ms; }
.dot:nth-child(3) { animation-delay: 320ms; }

Performance Rules

  1. Use transform and opacity only - no layout properties
  2. Add will-change: transform for loops over 1 second
  3. Pause off-screen loops with Intersection Observer
  4. Respect prefers-reduced-motion - reduce or stop loops

Seamless Loop Formula

For breathing/pulsing: 0%, 100% keyframes must be identical. Use alternate direction for simpler ping-pong effects.

Version History

  • 8359713 Current 2026-12-03 14:20

Same Skill Collection

skills/01-by-domain/3d-spatial/SKILL.md
skills/01-by-domain/accessible-motion/SKILL.md
skills/01-by-domain/brand-marketing/SKILL.md
skills/01-by-domain/data-visualization/SKILL.md
skills/01-by-domain/game-development/SKILL.md
skills/01-by-domain/micro-interactions/SKILL.md
skills/01-by-domain/mobile-touch/SKILL.md
skills/01-by-domain/page-transitions/SKILL.md
skills/01-by-domain/presentations/SKILL.md
skills/01-by-domain/universal-fallback/SKILL.md
skills/01-by-domain/video-motion-graphics/SKILL.md
skills/01-by-domain/web-motion-design/SKILL.md
skills/02-by-thinking-style/anticipation-payoff/SKILL.md
skills/02-by-thinking-style/attention-direction/SKILL.md
skills/02-by-thinking-style/character-appeal/SKILL.md
skills/02-by-thinking-style/emotional-narrative/SKILL.md
skills/02-by-thinking-style/exaggerated-clarity/SKILL.md
skills/02-by-thinking-style/naturalistic-motion/SKILL.md
skills/02-by-thinking-style/physics-intuition/SKILL.md
skills/02-by-thinking-style/problem-diagnosis/SKILL.md
skills/02-by-thinking-style/rhythm-pacing/SKILL.md
skills/02-by-thinking-style/spatial-thinking/SKILL.md
skills/02-by-thinking-style/timing-mastery/SKILL.md
skills/02-by-thinking-style/universal-mindset/SKILL.md
skills/03-by-role-persona/accessibility-advocate/SKILL.md
skills/03-by-role-persona/animator-traditional/SKILL.md
skills/03-by-role-persona/brand-strategist/SKILL.md
skills/03-by-role-persona/creative-director/SKILL.md
skills/03-by-role-persona/educator-teacher/SKILL.md
skills/03-by-role-persona/filmmaker/SKILL.md
skills/03-by-role-persona/frontend-developer/SKILL.md
skills/03-by-role-persona/game-designer/SKILL.md
skills/03-by-role-persona/motion-designer/SKILL.md
skills/03-by-role-persona/product-manager/SKILL.md
skills/03-by-role-persona/universal-practitioner/SKILL.md
skills/03-by-role-persona/ux-researcher/SKILL.md
skills/04-by-skill-level/absolute-beginner/SKILL.md
skills/04-by-skill-level/advanced/SKILL.md
skills/04-by-skill-level/deep-dive/SKILL.md
skills/04-by-skill-level/expert/SKILL.md
skills/04-by-skill-level/intermediate/SKILL.md
skills/04-by-skill-level/master/SKILL.md
skills/04-by-skill-level/novice/SKILL.md
skills/04-by-skill-level/quick-start/SKILL.md
skills/04-by-skill-level/refresher/SKILL.md
skills/04-by-skill-level/teaching-others/SKILL.md
skills/04-by-skill-level/troubleshooting/SKILL.md
skills/04-by-skill-level/universal-reference/SKILL.md
skills/05-by-animation-type/attention-grabbers/SKILL.md

Metadata

Files
0
Version
8359713
Hash
5bfcdc02
Indexed
2026-12-03 14:20

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-12-03 22:02
浙ICP备14020137号-1