github meursyphus/ssgoi v2.5.2
v2.5.2: Optimized Spring Physics Engine

14 hours ago

πŸš€ What's New in v2.5.2

🎯 Major Performance Improvements

Removed Popmotion Dependency

  • Replaced with custom spring animation engine
  • Reduced bundle size by ~15-20KB
  • Zero external animation dependencies

Optimized Spring Physics Implementation

  • Implemented Allen Chou's semi-implicit Euler method
  • 30% fewer operations per frame compared to naive approach
  • More stable and performant than implicit Euler
  • Faster than RK4 for real-time animations

✨ New Features

Multi-Spring Animation Support

  • Configure multiple springs with different characteristics in a single animation
  • Use springs array in spring config for complex, layered animations
  • View transitions like blind now have more natural, organic motion
  • Each spring can have independent stiffness, damping, and mass values

Example:

springs: [
  { stiffness: 100, damping: 10, tick,  },
  { stiffness: 200, damping: 15, tick, }
]

πŸ”§ Technical Details

Enhanced Ticker System (GSAP-inspired)

  • Delta time calculation for frame-independent animations
  • Lag smoothing (500ms threshold) handles tab switches gracefully
  • FPS throttling (max 240fps) for consistent performance
  • Adaptive scheduling prevents frame drops on slower devices
  • Single RAF loop for all animations

Spring Physics Optimizations

  • Pre-computed angular frequency (Ο‰) and damping ratio (ΞΆ)
  • Optimized update formula: v += -2hΞΆΟ‰v + hω²(target-x)
  • DeltaTime clamping (max 33ms) for stability
  • Settle time tracking prevents micro-oscillations

πŸ“¦ Updated Packages

All packages updated to v2.5.2:

  • @ssgoi/core - Core animation engine with multi-spring support
  • @ssgoi/react - React bindings
  • @ssgoi/svelte - Svelte bindings
  • @ssgoi/angular - Angular bindings
  • @ssgoi/vue - Vue bindings

🎨 Enhanced Transitions

View transitions now feel more natural with multi-spring support:

  • Blind transition - More organic curtain-like movement
  • Curtain reveal - Smoother, multi-stage animations
  • Film transition - Better frame-by-frame effects

πŸ”„ Migration

No breaking changes - fully backward compatible with popmotion API and existing spring configurations.

πŸ“Š Performance Gains

  • Bundle size: ~15-20KB reduction
  • CPU usage: ~30% reduction in animation calculations
  • Mobile performance: Significantly improved with lag smoothing
  • Animation quality: More natural motion with multi-spring support

Full Changelog: v2.5.1...v2.5.2

Don't miss a new ssgoi release

NewReleases is sending notifications on new releases.