π 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
springsarray in spring config for complex, layered animations - View transitions like
blindnow 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