{"id":22018735,"url":"https://github.com/rhcad/shapeanimation-swift","last_synced_at":"2025-10-28T12:08:07.782Z","repository":{"id":26203290,"uuid":"29649502","full_name":"rhcad/ShapeAnimation-Swift","owner":"rhcad","description":"Vector animation framework in Swift for iOS and OSX.","archived":false,"fork":false,"pushed_at":"2015-07-16T02:04:44.000Z","size":7262,"stargazers_count":414,"open_issues_count":1,"forks_count":38,"subscribers_count":23,"default_branch":"develop","last_synced_at":"2025-04-02T12:09:31.667Z","etag":null,"topics":["animation-framework"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhcad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-22T03:19:11.000Z","updated_at":"2025-02-18T13:19:07.000Z","dependencies_parsed_at":"2022-08-19T18:01:16.583Z","dependency_job_id":null,"html_url":"https://github.com/rhcad/ShapeAnimation-Swift","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhcad%2FShapeAnimation-Swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhcad%2FShapeAnimation-Swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhcad%2FShapeAnimation-Swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhcad%2FShapeAnimation-Swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhcad","download_url":"https://codeload.github.com/rhcad/ShapeAnimation-Swift/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054196,"owners_count":21039952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation-framework"],"created_at":"2024-11-30T05:13:56.534Z","updated_at":"2025-10-28T12:08:02.710Z","avatar_url":"https://github.com/rhcad.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShapeAnimation-Swift\n\nVector animation framework in Swift based on [SwiftGraphics][SwiftGraphics] for iOS 9 and OSX.\nWith ShapeAnimation you can easily create various animations with a nice Swift based syntax.\n\n[![Travis][travis_img]][travis]\n\n[travis]: https://travis-ci.org/rhcad/ShapeAnimation-Swift\n[travis_img]: https://travis-ci.org/rhcad/ShapeAnimation-Swift.svg?branch=master\n\nSVG animation development with [SVGKit][SVGKit] happens on the [SVG][svg_branch] branch.\n[ShapeAnimation-ObjC][SAObjC] is an alternative vector animation framework in Objective-C.\n\nAlso note this project has moved to Swift 2.0 which requires Xcode 7.0 and Mac OS X 10.10.\n\n[SwiftGraphics]: https://github.com/schwa/SwiftGraphics\n[SVGKit]: https://github.com/SVGKit/SVGKit\n[svg_branch]: https://github.com/rhcad/ShapeAnimation-Swift/tree/SVG\n[SAObjC]: https://github.com/rhcad/ShapeAnimation-ObjC\n\n## What's included\n\n* ShapeView class which contains vector shape layers.\n  * Helper functions to add image, text, circle, regular polygon, lines and other shapes.\n  * Support gradient fill with animation.\n  * Enumerate, hit-test or find layers.\n\n* Animation extension functions of CALayer.\n  * opacityAnimation, flashAnimation, backColorAnimation\n  * scaleAnimation, tapAnimation, transformAnimation\n  * rotate360Degrees, rotationAnimation\n  * shakeAnimation, moveAnimation, moveOnPathAnimation\n  * slideToRight, slideAnimation, flipHorizontally, flipVertically\n  * Layer dragging: constrainCenterToSuperview, bringOnScreen\n\n* Animation extension functions of CAShapeLayer.\n  * strokeStartAnimation, strokeEndAnimation, lineWidthAnimation\n  * strokeColorAnimation, fillColorAnimation, dashPhaseAnimation\n  * switchPathAnimation\n\n* Group animation and cascaded animation.\n  * animationGroup for the same layer\n  * applyAnimations for multiple layers\n  * Use the block-based function in apply() to play cascaded animations.\n  * Pause, resume or stop animations.\n\n* Animations with customized properties\n  * Use AnimationLayer class to draw customized animations.\n  * Animation with sliders example: [EllipseViewController.swift](ShapeAnimation_UITest/EllipseViewController.swift)\n\n![Stroke Lines](Documentation/strokelines.gif)\n![Move on Path](Documentation/moveonpath.gif)\n![Radar Circles](Documentation/radar.gif)\n\n![Rotate Polygons](Documentation/rotate_polygons.gif)\n![Jumping Ball](Documentation/jumpball.gif)\n\n![Animation with Sliders](Documentation/ellipse_slider.gif)\n![Drag Layers](Documentation/drag.gif)\n\n## Usage\n\nPlease see the examples in [MasterViewController.swift][MasterVC].\n\n[MasterVC]: ShapeAnimation_UITest/MasterViewController.swift\n\n``` Swift\nlet layer1 = self.addLinesLayer(view, points:[(10.0,20.0),(150.0,40.0),(120.0,320.0)])\nlayer1.strokeEndAnimation().apply() {\n    layer1.shakeAnimation().apply()\n}\n\nlet la2 = self.addLinesLayer(view, points:points2, color: UIColor.blueColor())\nlla2.scaleAnimation(from:1, to:1.1, repeatCount:3).apply(duration:0.3)\n\nlet la3 = self.addLinesLayer(view, points:points3, color: UIColor.greenColor())\nla3.flashAnimation(repeatCount:6).apply()\n\nlet la4 = self.addLinesLayer(view, points:[(10.0,20.0), (150.0,40.0), (120.0,120.0)])\nlet a1 = la4.moveOnPathAnimation(path).setDuration(1.6)\nlet a2 = la4.rotate360Degrees().setRepeatCount(2)\nanimationGroup([a1, a2]).autoreverses().apply()\n```\n\n## Help Wanted\n\nAll of this code is very much a _*work in progress*_. I'm adding and changing functionality as needed.\n\nYour help wanted. Please fork this project and submit pull requests or [issues][issues].\n[issues]: https://github.com/rhcad/ShapeAnimation-Swift/issues\n\nContributions are always welcome in the following areas:\n\n* Header doc comments explaining what the functions do\n* Useful animation template or application examples\n* Fix issues about animation, Swift usage rules or translations\n\n## License\n\nShapeAnimation-Swift is released under a BSD License. See LICENSE file for details.\n\n## FAQ\n\n* Could not build Objective-C module 'ShapeAnimation':\n  - Quit Xcode and delete the sub folders in ~/Library/Developer/Xcode/DerivedData/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhcad%2Fshapeanimation-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhcad%2Fshapeanimation-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhcad%2Fshapeanimation-swift/lists"}