All Projects → roberthein → Ease

roberthein / Ease

Licence: mit
It's magic.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Ease

EventEmitter
Simple EventEmitter with multiple listeners
Stars: ✭ 19 (-98.43%)
Mutual labels:  events, observer, observable, event
spa-bus
🔥Tools for multilevel components to pass values in any SPA
Stars: ✭ 15 (-98.76%)
Mutual labels:  events, event
state inspector
State change & method call logger. A debugging tool for instance variables and method calls.
Stars: ✭ 24 (-98.02%)
Mutual labels:  observer, observable
React Reactive Form
Angular like reactive forms in React.
Stars: ✭ 259 (-78.65%)
Mutual labels:  observable, observer
observable ish
Observable state and events for browser and Flutter.
Stars: ✭ 26 (-97.86%)
Mutual labels:  events, observable
event
The implementation of the pattern observer
Stars: ✭ 45 (-96.29%)
Mutual labels:  events, event
Bekit
bekit框架致力于解决在应用开发中的公共性痛点,已有“事件总线”、“流程引擎”、“服务引擎”。其中“流程引擎”可作为分布式事务解决方案saga模式的一种实现,并且它很轻量不需要服务端、不需要配置,就可直接使用。
Stars: ✭ 71 (-94.15%)
Mutual labels:  event, spring
UT GameEventSystem
A flexible event system in Unreal Engine 4
Stars: ✭ 33 (-97.28%)
Mutual labels:  system, event
Observable
The easiest way to observe values in Swift.
Stars: ✭ 346 (-71.48%)
Mutual labels:  observable, observer
All Things Cqrs
Comprehensive guide to a couple of possible ways of synchronizing two states with Spring tools. Synchronization is shown by separating command and queries in a simple CQRS application.
Stars: ✭ 474 (-60.92%)
Mutual labels:  events, spring
Resize Observer
Polyfills the ResizeObserver API.
Stars: ✭ 540 (-55.48%)
Mutual labels:  event, observer
mutation-observer
A library for idiomatic use of MutationObserver with Angular
Stars: ✭ 32 (-97.36%)
Mutual labels:  observer, observable
go-observer
Go package for simplifying channel-based broadcasting of events from multiple publishers to multiple observers
Stars: ✭ 66 (-94.56%)
Mutual labels:  events, observer
react-mobx-router5
React components for routing solution using router5 and mobx
Stars: ✭ 58 (-95.22%)
Mutual labels:  observer, observable
PoShLog
🔩 PoShLog is PowerShell cross-platform logging module. It allows you to log structured event data into console, file and much more places easily. It's built upon great C# logging library Serilog - https://serilog.net/
Stars: ✭ 108 (-91.1%)
Mutual labels:  events, event
axios-for-observable
A RxJS wrapper for axios, same api as axios absolutely
Stars: ✭ 13 (-98.93%)
Mutual labels:  observable, observables
Observable
minimalist event system for Python
Stars: ✭ 66 (-94.56%)
Mutual labels:  events, observer
dead-simple
💀💡 Dead simple PubSub and EventEmitter in JavaScript
Stars: ✭ 21 (-98.27%)
Mutual labels:  events, event
game-map-editor
game-map-editor
Stars: ✭ 17 (-98.6%)
Mutual labels:  events, animations
Event
The Hoa\Event library
Stars: ✭ 319 (-73.7%)
Mutual labels:  event, observer

Ease

Ease is an event driven animation system that combines the observer pattern with custom spring animations as observers. It's magic.

Features

  • [X] Animate any value type
  • [X] Set multiple animations for a single value
  • [X] Animation trajectories update when you update the targetValue
  • [X] Add natural spring behavior to any value change
  • [X] Optimized for Swift 5
  • [X] Compatible with iOS 9 and up

Supported value types

  • CGFloat
  • CGPoint
  • CGSize
  • CGVector
  • Int
  • Float
  • Double
  • SCNVector3

Easily extendible with more (custom) types.

Examples

How

Create your Ease object with an initial value

var ease: Ease<CGPoint> = Ease(view.center, minimumStep: 0.001)

Add your custom spring-animation(s)

ease.addSpring(tension: 300, damping: 15, mass: 1) { position in
    view.center = position
}

Set the target value of your Ease object and adjust your target as often as you want

ease.targetValue = gestureRecognizer.location(in: view)

Memory management

For a single spring-animation you can store the returned EaseDisposable to a variable

disposable = ease.addSpring(tension...

For multiple spring-animations you can add the disposable to a EaseDisposal variable

ease.addSpring(tension...) { }.add(to: &disposal)

And always weakify self when referencing self inside your spring-animation

ease.addSpring(tension...) { [weak self] position in

Installation

Ease is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Ease'

Suggestions or feedback?

Feel free to create a pull request, open an issue or find me on Twitter.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].