Continuous Loops

dylantarre/animation-principles/skills/05-by-animation-type/continuous-loops

作者 dylantarre83597134ba8f无许可证99 个星标收录于 2026年10月8日更新于 2026年10月8日仓库9个月前更新

Use when creating ongoing animations - loading spinners, pulsing indicators, ambient motion, background effects, or any animation that repeats indefinitely.

仅含说明Design & Creative
AI 生成的概览

指导创建无缝、无限循环的界面动画,如加载旋转器、脉冲指示和氛围动效。

功能
将迪士尼十二项动画原则应用于持续循环,涵盖挤压与拉伸、预备动作、舞台调度、弧线、节奏和吸引力。它为旋转器、脉冲、骨架屏微光、打字圆点、呼吸和漂浮效果提供时长、缓动和循环次数建议。还给出 CSS 关键帧示例以及性能规则,例如只对 transform 和 opacity 做动画、暂停屏幕外的循环并遵循减少动态效果偏好。
适用场景
适用于构建加载旋转器、脉冲指示器、氛围背景动效或任何无限重复的动画。适合需要让循环看起来自然流畅而非机械的前端工作。
运行要求
该技能不附带脚本或资源,仅为说明文档。应用它需要支持 CSS 动画的前端环境,文中还提到 Intersection Observer 与 prefers-reduced-motion。

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 TypeDurationEasingIterations
Spinner600-800mslinear (rotation)infinite
Pulse1500-2000msease-in-outinfinite
Skeleton Shimmer1500msease-in-outinfinite
Typing Dots1400msease-in-outinfinite
Breathing3000-4000msease-in-outinfinite
Floating3000-5000msease-in-outinfinite

Implementation Patterns

css
/* 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.

来源与署名

来源:dylantarre/animation-principles位于skills/05-by-animation-type/continuous-loops提交8359713

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架