Skip to content

Releases: poetmountain/MotionMachine

3.1.1

19 Jan 03:18
Compare
Choose a tag to compare
  • Performance improvements for motion value updates.

Execution times for value updates have been significantly reduced for all value types. Some examples (tests run on Release configuration):

Value type Speed increase
Double 17%
UIColor 74%
CGPoint 62%
CGRect 65%
SIMD64 188%

For instance, all 64 values of a SIMD64<Double> object in a Motion operation can now be updated on the target object in 52 microseconds (0.0000522 seconds), all properties of a CGRect can be updated in 6 microseconds, and a single Double value of an object property can now be updated in 1.2 microseconds.

  • Fixed CIColorAssistant not respecting the existing colorspace of the original object during animations.
  • Added performance tests.
  • ValueAssistant's updateProperty(property:, newValue:) method was changed to update(properties:, targetObject:) to support updating multiple properties at once.

3.1.0

13 Jan 20:19
Compare
Choose a tag to compare
  • Added support for watchOS!
  • Updates to support Linux and other non-Apple Swift platforms. Replaced code specific to Apple platforms with core Swift classes. MotionMachine should now build on Linux, though it has not been tested on that platform. Please let me know if you test it!
    • Note: Because of a current lack of support for Apple's Foundation types on non-Apple platforms, there are a limited number of features available on Linux. You can of course add your own custom motion classes or value assistants as needed. What is available should at least allow you to animate object values using PropertyData with all of the normal MotionMachine features like grouping, sequencing, additive animations, and all of the standard easing equations.
      Available motion classes on Linux:
      Motion, PhysicsMotion, MotionGroup, MotionSequence
      Available value assistants on Linux:
      NumericAssistant, SIMDAssistant
  • Improved timing accuracy of PhysicsMotion and PathPhysicsMotion, as well as TimerTempo.
  • Added SwiftUI examples project to showcase using MotionMachine features with SwiftUI Views.

Note: MotionMachine 3.0 included several breaking changes. If you have not done so, please also see the 3.0.0 release notes for breaking changes and new features, as well as the 3.0 Migration Guide for more details and a fuller list of changes.

3.0.0

08 Jan 02:50
Compare
Choose a tag to compare

MotionMachine 3.0 is a sizable overhaul of core functionality, replacing its use of NSObject-based Key-Value Coding to read and write property values with modern Swift KeyPaths, as well as adding macOS support and support for some new Apple platform types. The move to Swift KeyPaths, made possible through recent improvements to Swift generics, provides more type safety and compile-time type checking, eliminates unsafe code, and now allows for the use of Optional properties and structs.

Though most of the API is relatively the same, there are several breaking changes and functional differences to be aware of. Please see the Migration Guide for more details and a fuller list of changes.

Major updates:

  • 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). 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 current SIMD types as MotionState states. Added tests for this class.
  • Added a new value assistant CGColorAssistant to support using CGColor as a MotionState 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 either BinaryFloatingPoint or BinaryInteger, as well as NSNumber. Added tests for this class.
  • Fixed velocityDecayLimit not being settable on PhysicsMotion.
  • 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.

2.2.1

06 Dec 07:36
Compare
Choose a tag to compare
  • Added support for visionOS
  • Fixed some access permission issues
  • Added convenience inits for PathMotion and PathPhysicsMotion to remove the need to pass in a PathState manually
  • Added setupPerformanceMode convenience method to PathMotion and PathPhysicsMotion classes (which call PathState's method internally)

2.2.0

05 Dec 00:25
Compare
Choose a tag to compare

After a long spell of mostly maintenance releases, I'm very excited to present some big, new functionality to MotionMachine that I've been thinking about implementing for a long time. Animating objects along a CGPath! This opens up a lot of new possibilities for both animating views on-screen, as well as interpolating generic values in more complex ways. And as with all other MotionMachine classes, these new Path classes act in the ways you'd expect -- reverse them, repeat them, nest them in MotionGroup and MotionSequence, whatever you'd like!

  • Added PathMotion class to allow a CGPoint to be animated along the length of a CGPath! PathMotion conforms to the Moveable 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 the startPosition and endPosition parameters you can even specify a portion of the path to animate along.
  • Added PathPhysicsMotion class to allow a CGPoint to be animated along the length of a CGPath using the same physics system that PhysicsMotion uses! Like PathMotion, it conforms to the Moveable 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 powers PhysicsMotion and PathPhysicsMotion. Collision points can be specified using the starting and ending points of a motion, and a restitution value to control how much velocity is lost during a collision can be set using the new PhysicsConfiguration object. This collision support gives PhysicsMotion and the new PathPhysicsMotion some interesting uses -- I'd love to hear what you come up with!

Please see the updated user guide, documentation, and examples for more information about the new Path classes and physics collision support!

2.1.0

13 Nov 08:14
Compare
Choose a tag to compare
  • Support for Swift 6.0 and strict concurrency mode
  • Removed many legacy forced unwrappings of Optionals
  • Changed PhysicsMotion's DispatchSourceTimer to a regular Timer to solve concurrency crash

2.0.2

07 Mar 02:56
Compare
Choose a tag to compare

• Update protocol conformance to AnyObject

2.0.1

19 Apr 23:26
Compare
Choose a tag to compare
  • Fixed some retain cycles that were holding on to target objects
  • Updated examples project

2.0.0

10 Jun 03:51
Compare
Choose a tag to compare
  • 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)

1.3.2

22 Mar 07:13
Compare
Choose a tag to compare
  • 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