{"id":13465328,"url":"https://github.com/s2mr/Elephant","last_synced_at":"2025-03-25T16:31:37.232Z","repository":{"id":49881447,"uuid":"187564378","full_name":"s2mr/Elephant","owner":"s2mr","description":"Elegant SVG animation kit for swift","archived":false,"fork":false,"pushed_at":"2023-01-24T16:33:51.000Z","size":1221,"stargazers_count":139,"open_issues_count":2,"forks_count":27,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-28T13:34:26.834Z","etag":null,"topics":["animation","ios","svg","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s2mr.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":"2019-05-20T03:52:35.000Z","updated_at":"2024-09-06T09:47:06.000Z","dependencies_parsed_at":"2023-02-13T23:31:25.018Z","dependency_job_id":null,"html_url":"https://github.com/s2mr/Elephant","commit_stats":null,"previous_names":["kzumu/elephant"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2mr%2FElephant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2mr%2FElephant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2mr%2FElephant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s2mr%2FElephant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s2mr","download_url":"https://codeload.github.com/s2mr/Elephant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221850548,"owners_count":16891649,"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","ios","svg","swift"],"created_at":"2024-07-31T15:00:27.406Z","updated_at":"2024-10-29T17:30:45.407Z","avatar_url":"https://github.com/s2mr.png","language":"Swift","readme":"\u003ch1 align=\"center\"\u003eElephant\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\u003cstrong\u003eThis is SVG animation presentation kit for iOS.\u003c/strong\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://developer.apple.com/swift\"\u003e\u003cimg alt=\"Swift5\" src=\"https://img.shields.io/badge/language-Swift5-orange.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/s2mr/Elephant/releases/latest\"\u003e\u003cimg alt=\"Release\" src=\"https://img.shields.io/github/release/s2mr/Elephant.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://cocoapods.org/pods/Carbon\"\u003e\u003cimg alt=\"CocoaPods\" src=\"https://img.shields.io/cocoapods/v/Elephant.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\u003cimg alt=\"Carthage\" src=\"https://img.shields.io/badge/carthage-compatible-yellow.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fkzumu%2FElephant?ref=badge_shield\" alt=\"FOSSA Status\"\u003e\u003cimg src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fkzumu%2FElephant.svg?type=shield\"/\u003e\u003c/a\u003e\n\u003c/br\u003e\n\u003ca href=\"https://developer.apple.com/\"\u003e\u003cimg alt=\"Platform\" src=\"https://img.shields.io/badge/platform-iOS-green.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/s2mr/Elephant/blob/master/LICENSE\"\u003e\u003cimg alt=\"Lincense\" src=\"https://img.shields.io/badge/License-Apache%202.0-black.svg\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Example\nYou can run example app. Please open `Example-iOS/Elephant-iOS.xcworkspace`!\n\n\u003cimg src=\"https://github.com/s2mr/Elephant/raw/resources/Resources/demo.gif\" width=\"300\" align=\"center\"/\u003e\n\n## Usage\nYou can display the svg image with animation.\n\n**We are supportted two animation formats😎**\n\nThe format is below.\n- Animation in SVG\n- Animation in CSS\n\nUsage is difference by the format.\n\n### SVGView initialization\n\nThis is initialization SVGView for format 1 (Animation in SVG) usage.\n```swift\nSVGView(named: \"svg-filename\", animationOwner: .svg)\n```\n\nThis is initialization SVGView for format 2 (Animation in CSS) usage.\n```swift\nSVGView(named: \"svg-filename\", animationOwner: .css, style: .cssFile(name: \"css-filename\"))\n```\n\n### Show in your ViewController\n\nAnd, you initialized view, you have to do is only add view to parent view, and start animation like below.\n```swift\nclass ViewController: UIViewController {\n    let svgView = SVGView(named: \"image\", animationOwner: .svg)\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        view.addSubview(svgView)\n        svgView.translatesAutoresizingMaskIntoConstraints = false\n        NSLayoutConstraint.activate([\n            svgView.centerXAnchor.constraint(equalTo: view.centerXAnchor),\n            svgView.centerYAnchor.constraint(equalTo: view.centerYAnchor),\n            svgView.widthAnchor.constraint(equalToConstant: 400),\n            svgView.heightAnchor.constraint(equalToConstant: 400),\n        ])\n\n        svgView.startAnimation()\n\n        // svgView.stopAnimation()    // Stop animation.\n\n        // svgView.isAnimate { [weak self] (value, error) in\n        //     if let error = error {\n        //         print(error)\n        //     }\n        //     guard let value = value else { return } // value means whether animation is moving.\n        // }\n    }\n}\n\n```\n\n## Requirements\n- Xcode 10.2\n- Swift 5.0\n\n## Installation\n\n### [Swift package manager](https://github.com/apple/swift-package-manager)\n\nAdd the following to the dependencies of your Package.swift:\n\n``` swift\ndependencies: [\n    .package(url: \"https://github.com/s2mr/Elephant.git\", from: \"Elephant version\"),\n]\n```\n\n### [CocoaPods](https://cocoapods.org)\nAdd this to `Podfile`\n\n```ruby\npod 'Elephant'\n```\n\n```bash\n$ pod install\n```\n\n### [Carthage](https://github.com/Carthage/Carthage)\nAdd this to `Cartfile`\n\n```\ngithub \"s2mr/Elephant\"\n```\n\n```bash\n$ carthage update --platform ios\n```\n\n## Author\n\n[Kazumasa Shimomura](https://www.kazuringo.xyz)\n\n## License\n\nElephant is available under the Apache v2. See the LICENSE file for more info.\n\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%s2mr%2FElephant.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fs2mr%2FElephant?ref=badge_large)","funding_links":[],"categories":["Libs","Animation","Animation [🔝](#readme)"],"sub_categories":["Animation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs2mr%2FElephant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs2mr%2FElephant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs2mr%2FElephant/lists"}