- Performance improvements for motion value updates.
- Fixed
CIColorAssistant
not respecting the existing colorspace of the original object during animations. - Added performance tests.
- Added support for watchOS!
- Updates to support Linux and other non-Apple Swift platforms. Replaced code specific to Apple platforms with core Swift classes.
- Improved timing accuracy of
PhysicsMotion
andPathPhysicsMotion
, as well asTimerTempo
. - Added SwiftUI examples
- MotionMachine's use of
NSObject
Key-Value Coding paths (i.e. "frame.origin.x") to read and write property values has been replaced with modern Swift KeyPaths (i.e.\UIView.frame.origin.x
). This significant change provides more type safety and compile-time type checking, eliminates unsafe code, and now allows for the use of Optional properties and structs. Please see the Motion Classes guide for implementation examples. Tests and examples project have also been updated to reflect these changes. - Added support for macOS! MotionMachine may now be used in AppKit projects in macOS 14.0 or higher.
- Added a new value assistant
SIMDAssistant
to support using all currentSIMD
types asMotionState
states. Added tests for this class. - Added a new value assistant
CGColorAssistant
to support usingCGColor
as aMotionState
state. Added tests for this class. - Added a new value assistant
NumericAssistant
which is now the default assistant for top-level properties on the target object which are numeric values. This supports all of the many numeric types that conform to eitherBinaryFloatingPoint
orBinaryInteger
, as well asNSNumber
. Added tests for this class. - Fixed
velocityDecayLimit
not being settable onPhysicsMotion
. - Improved internal platform availability checks. Theoretically this may allow MotionMachine to now run on non-Apple platforms on which Swift is available, though this has not been tested.
- With this update the minimum supported versions of iOS and tvOS have been increased to 16.0 in order to support KeyPaths in a generic way. If you need to support earlier versions of iOS or tvOS, please continue to use MotionMachine release
2.2.1
. - Support for Swift 5.10 has been dropped due to the adoption of a Swift 6 feature (parameter pack iteration). If you require an older version of Swift, please use MotionMachine release
2.2.1
or older.
- Added support for visionOS
- Fixed some access permission issues
- Added convenience inits for
PathMotion
andPathPhysicsMotion
to remove the need to pass in aPathState
manually - Added
setupPerformanceMode
convenience method toPathMotion
andPathPhysicsMotion
classes (which callPathState
's method internally)
- Added
PathMotion
class to allow aCGPoint
to be animated along the length of aCGPath
!PathMotion
conforms to theMoveable
protocol and interacts with the MotionMachine ecosystem as you'd expect from the other motion classes, and you can use all of the normal easing equations. Using thestartPosition
andendPosition
parameters you can even specify a portion of the path to animate along. - Added
PathPhysicsMotion
class to allow aCGPoint
to be animated along the length of aCGPath
using the same physics system thatPhysicsMotion
uses! LikePathMotion
, it conforms to theMoveable
protocol and interacts with the MotionMachine ecosystem as you'd expect from the other motion classes. - Added simple collision handling to
PhysicsSystem
, the physics engine that powersPhysicsMotion
andPathPhysicsMotion
. Collision points can be specified using the starting and ending points of a motion, and arestitution
value to control how much velocity is lost during a collision can be set using the newPhysicsConfiguration
object. - Added tests, documentation, and examples for
PathMotion
andPathPhysicsMotion
.
- Support for Swift 6.0 and strict concurrency mode
- Removed many legacy forced unwrappings of Optionals
- Changed PhysicsMotion's DispatchSourceTimer to regular Timer to solve concurrency crash
- Fixed some retain cycles that were holding on to target objects
- Updated examples project
- Support for Swift 5.0
- Updated syntax in MotionOptions for newer Swift naming conventions
- Updated Swift package file to newest version, requires Xcode 11 to import
- Bumped version to 2.0.0 due to breaking change in MotionOptions (Swift Package Manager requires packages use semantic versioning)
- Support for Swift 4.2
- fixed bugs which prevented some CGStructs from being updated when using
Motion
’s statesForProperties convenience initializer - added targetsNestedStruct static method to
CGStructAssistant
, which determines whether a specified keyPath targets a struct of a CGRect - added and improved tests
- improved readability and streamlined some code
- renamed Classes directory to Sources
- miscellaneous package changes
- Refactored the "finalState" convenience initializer for the Motion class to now take an Array of
PropertyStates
objects. This allows you to provide both starting and ending representational value objects for easy animation properties creation. Most of theValueAssistant
objects had significant updates to support this. - A new "buildPropertyData(fromObject: AnyObject, propertyStates: [PropertyStates])" public method has been added to the
Motion
class, which creates and returns an array ofPropertyData
objects. This method is used in conjunction with the above convenience initializer, but can be called ad hoc to generatePropertyData
objects from a set of state objects you pass in. - Bugfix:
ValueAssistant
s now won't exclude properties from being created when the ending value is the same as the object's original value, but the specified starting value is different. - Minor updates for Swift 4 compatibility. The Examples and Tests projects now target Swift 4.
- Updated tests, and additional test coverage for
ValueAssistant
classes.
Support for Swift 4.0.
Fixes for compiler warnings and deprecations.
Support for Swift 3.0.
Initial release