All Projects → yapstudios → Yapanimator

yapstudios / Yapanimator

Licence: bsd-2-clause
Your fast and friendly physics-based animation system.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Yapanimator

Macos Setup
A curated macOS setup | v2
Stars: ✭ 60 (-96.89%)
Mutual labels:  mac, macosx
Macos Downloader
Command line tool for downloading macOS installers and beta updates
Stars: ✭ 162 (-91.6%)
Mutual labels:  mac, macosx
Menubarosxapp
Generic Mac OS X menu bar app (agent) template
Stars: ✭ 63 (-96.73%)
Mutual labels:  mac, macosx
Open Source Mac Os Apps
🚀 Awesome list of open source applications for macOS. https://t.me/s/opensourcemacosapps
Stars: ✭ 28,908 (+1399.38%)
Mutual labels:  mac, macosx
Awesome Mac
 Now we have become very big, Different from the original idea. Collect premium software in various categories.
Stars: ✭ 46,674 (+2320.85%)
Mutual labels:  mac, macosx
Skybar Deeplink
Mac app that add to the menu bar deep link tool so you can easily open your deep links in your installed simulator.
Stars: ✭ 50 (-97.41%)
Mutual labels:  mac, macosx
Rhea
A Mac status bar app for quickly sharing files and links.
Stars: ✭ 73 (-96.21%)
Mutual labels:  mac, macosx
Tools Osx
A small collection of command line tools for Mac OS X, incl.: clipcat, dict, eject, launch, ql, swuser, trash & with.
Stars: ✭ 576 (-70.12%)
Mutual labels:  mac, macosx
Carol Xamarin
A minimal and beautiful lyrics app for macOS built with Xamarin and C#
Stars: ✭ 97 (-94.97%)
Mutual labels:  mac, macosx
Wechatdemo
macOS WeChat 仿微信MAC端 QQ NSCollectionView,NSSplitView,ect..
Stars: ✭ 87 (-95.49%)
Mutual labels:  mac, macosx
Animateplus
A+ animation module for the modern web
Stars: ✭ 5,839 (+202.85%)
Mutual labels:  design, motion
Evilosx
An evil RAT (Remote Administration Tool) for macOS / OS X.
Stars: ✭ 1,826 (-5.29%)
Mutual labels:  mac, macosx
Nord Iterm2
An arctic, north-bluish clean and elegant iTerm2 color scheme.
Stars: ✭ 651 (-66.23%)
Mutual labels:  mac, macosx
Syncthing Macos
Frugal and native macOS Syncthing application bundle
Stars: ✭ 1,096 (-43.15%)
Mutual labels:  mac, macosx
Osx Iso
 Create a bootable ISO of OS X / macOS, from the installation app file
Stars: ✭ 616 (-68.05%)
Mutual labels:  mac, macosx
Subethaedit
General purpose plain text editor for macOS. Widely known for its live collaboration feature.
Stars: ✭ 1,183 (-38.64%)
Mutual labels:  mac, macosx
Youtube Music
YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)
Stars: ✭ 376 (-80.5%)
Mutual labels:  mac, macosx
Webdavmailrucloud
WebDAV cloud.mail.ru ...& Yandex.Disk | WebDAV Облако Mail.Ru Сетевой Диск
Stars: ✭ 386 (-79.98%)
Mutual labels:  mac, macosx
Night Shift On Unsupported Macs
Enable Night Shift on older Unsupported Macs
Stars: ✭ 86 (-95.54%)
Mutual labels:  mac, macosx
Macos Patcher
Command line tool for running macOS on unsupported Macs
Stars: ✭ 114 (-94.09%)
Mutual labels:  mac, macosx

YapAnimatorLogo

YapAnimator is your fast and friendly physics-based animation system. YapAnimator was built with ease-of-use in mind, keeping you sane and your designer very, very happy. All animations are interruptable, include completion blocks, and allow you to apply forces to them (e.g. adding the velocity from a gesture in a transition). We've included Animatable protocol conformance for some commonly animated types (CG types), but it's really easy to add conformance to any other type. You can animate anything that you can represent and compose with an array of Doubles — view properties, music volume, morphing between bezier paths, colors, smoothing brush strokes, the list goes on… use your imagination!

Build Status CocoaPods Compatible Platform

Why use YapAnimator?

Because it's insanely easy to use and makes beautiful animations, that's why. There are other physics-based animation systems out there (e.g. UIKit's spring animations, Facebook's Pop), but they still require writing too much code, bookkeeping, and hand-holding for our taste. YapAnimator represents a distilled n-th iteration of code that we've been using in our own apps for years. We find it invaluable in our day-to-day and think that you will too.

Built-in Extensions

YapAnimator comes with a handy extension bolted on to CALayer and UIView/NSView, providing one-liner animations under the animatedLayer and animated properties, respectively.

CircleAnimationExample

func handle(gesture: UIPanGestureRecognizer) {

	if gesture.state == .began {
		squircle.animated.cornerRadius.animate(to: squircle.bounds.width / 2.0)
		squircle.animated.rotationZ.animate(to: .pi)
	else if gesture.state == .changed {
		squircle.animated.position.instant(to: gesture.location(in: nil))
	} else if gesture.state == .ended {
		squircle.animated.position.animate(to: self.view.center)
		squircle.animated.cornerRadius.animate(to: 0)
		squircle.animated.rotationZ.animate(to: 0)
	}
}

Custom Animators

Creating a custom animator is straightforward:

  • initialValue This sets the initial value of the animator and informs it what type it will be animating.
  • willBegin Called just before motion starts. Return the actual value of the property that you'll be animating. This allows the animator to sync up with that value in case it was changed outside of the scope of the animator. (optional)
  • eachFrame Called each frame of the animation — this is typically where you'd apply the animator's current.value to the property that you're animating. You can also use it to check values to trigger other actions / animations.
frameAnimator = YapAnimator(initialValue: square.frame, willBegin: { [unowned self] in
	return self.square.frame
}, eachFrame: { [unowned self] (animator) in
	self.square.frame = animator.current.value
})

SquareFrameExample

frameAnimator.bounciness = 1.5

frameAnimator.animate(to: square.frame.insetBy(dx: -50, dy: -50), completion: { animator, wasInterrupted in
	if !wasInterrupted {
		// animate back to the original value
		animator.animate(to: animator.current.value.insetBy(dx: 50, dy: 50))
	}
})

Questions?

Feel free to ask your question in an issue. We will respond there, and amend this read me/start a wiki if the answer seems like it would benefit others.

Credits

YapAnimator is owned and maintained by Yap Studios.

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].