GithubHelp home page GithubHelp logo

adellibovi / swiftui-pathanimations Goto Github PK

View Code? Open in Web Editor NEW
214.0 6.0 14.0 3.13 MB

Tools for SwiftUI that helps perform Path and Shape animations, such us morphing circle or shape transformations

License: MIT License

Swift 100.00%
swift swiftui swiftui-animations swiftui-example

swiftui-pathanimations's Introduction

SwiftUI+PathAnimations ๐Ÿ”ต

Introduction

This packages contains SimilarShape and InterpolatedShape, both can be used to achieve shapes animations with SwiftUI.

SwiftUI Morphing Circle Demo

How it works?

SimilarShape should be used when animating two or more similar paths. A path is similar to another one when having the same number and types of Path.Element. I.e.: two rects with different height, width and origin are considered similar, since the two paths are made by the same Path.Element but with different CGPoint.

InterpolatedShape should be used when animating two or more different paths. Internally, it will create a slighlty different path used for animation, by interpolating the original one.

Example

The attached example (Example/Example.xcodeproj) is using:

  • SimilarShape to perform the drag animation of the morphing circle ๐Ÿ”ต, since the Path create starting from the original circle and the one create with the dragging point are essentially the same
  • InterpolatedShape to perform the animated trasformation from a circle and a rounded rectangle, being very different paths.

Author

Feel free to reach me out at @adellibovi

License

This project is licensed under the MIT License - see the LICENSE file for details

swiftui-pathanimations's People

Contributors

adellibovi avatar regexident avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

swiftui-pathanimations's Issues

Cloud

a resolved file is required when automatic dependency resolution is disabled and should be placed at /Volumes/workspace/repository/Checkio-SwiftUI.xcworkspace/xcshareddata/swiftpm/Package.resolved. Running resolver because the following dependencies were added: 'swiftui-pathanimations' (https://github.com/adellibovi/SwiftUI-PathAnimations)fatalError

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.