Repository navigation
2.2.0
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
PathMotionclass to allow aCGPointto be animated along the length of aCGPath!PathMotionconforms to theMoveableprotocol 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 thestartPositionandendPositionparameters you can even specify a portion of the path to animate along. - Added
PathPhysicsMotionclass to allow aCGPointto be animated along the length of aCGPathusing the same physics system thatPhysicsMotionuses! LikePathMotion, it conforms to theMoveableprotocol 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 powersPhysicsMotionandPathPhysicsMotion. Collision points can be specified using the starting and ending points of a motion, and arestitutionvalue to control how much velocity is lost during a collision can be set using the newPhysicsConfigurationobject. This collision support givesPhysicsMotionand the newPathPhysicsMotionsome 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!