{"_id":"@akylas/nativescript-lottie","_rev":"3-1e5e65538e29509b11dacbefb9d99dfb","name":"@akylas/nativescript-lottie","dist-tags":{"latest":"4.1.0"},"versions":{"4.1.0":{"name":"@akylas/nativescript-lottie","version":"4.1.0","description":"NativeScript plugin to expose AirBnB Lottie library","main":"lottie","sideEffects":false,"typings":"index.d.ts","nativescript":{"platforms":{"android":"6.0.0","ios":"6.0.1"}},"repository":{"type":"git","url":"git+https://github.com/farfromrefug/nativescript-lottie.git"},"keywords":["NativeScript","@akylas/nativescript-lottie","Lottie","Android","Animation","iOS","TypeScript","bradmartin"],"author":{"name":"Brad Martin","email":"bradwaynemartin@gmail.com"},"contributors":[{"name":"Nathan Walker","email":"walkerrunpdx@gmail.com"},{"name":"JB","url":"https://github.com/rhanb"},{"name":"Dirk Rudolph","url":"https://github.com/Buuhuu"},{"name":"Hamdi Wanis","url":"https://github.com/hamdiwanis"},{"name":"itstheceo","url":"https://github.com/itstheceo"}],"license":"MIT","bugs":{"url":"https://github.com/farfromrefug/nativescript-lottie/issues"},"homepage":"https://github.com/farfromrefug/nativescript-lottie","gitHead":"d85bf3d0a0e6d470b8bb3d6a7b1daa4a10e3d293","_id":"@akylas/nativescript-lottie@4.1.0","_nodeVersion":"12.11.0","_npmVersion":"lerna/3.22.1/node@v12.11.0+x64 (darwin)","dist":{"integrity":"sha512-IXMKyXSPT7xO0TaL1HLb/96MmoiIOHq2GmeVzBJdFT21U7pSsI5NdVzyMY5q/0XlrgoHYk3y5yGZnHgX7sZIKQ==","shasum":"09e72c5ea7705d0bfe39d9b44a7544b0a246595f","tarball":"https://registry.npmjs.org/@akylas/nativescript-lottie/-/nativescript-lottie-4.1.0.tgz","fileCount":11,"unpackedSize":34340,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVkmwCRA9TVsSAnZWagAA028P/AhJ3+Erykq52xsJkX+4\nCmZzPvQEGdt4Qf+0UCpc3Rmg/WvMN2VDR1+9vhZmyX+MXKWcLUWxc06cp6ft\n41NntULvODy76z2+5vhNjOhxPC60UTpD2rFM0cjcZIGeTXuz1P75Pn1MMod2\nUs5FAXLu/QgZ1dQ0FnzSUlIB9S2XO0PjQqk7vO837xqGtTrp8SZxwDh4TXyf\nHoDMVd9P7E63KpOpPC+SaBarwk+8CG0qbLmhd0eWmO8OCA/4r36hl9f9VNRG\nfl0+Y/oY5PBfxVxf+9tvYc1SL1AFg1agnF+Ugk6OsdPXxdtOe1WFoYhS0Nlw\nz06Ol9X9YTcVV8nNilKvSjvbFCwNMLgbM4ZxT0WpQpe7OI3TJgY7NEJyiPyb\nijaukez59HelpdISsSCYJ8wZJHEpnTm5KM264vbxWOnJw82vmGsz9jZJAmDA\nHGfEqochITh2SLs1xRC1R5l0Za0erU34kpjQ8l9CILVOHBBGD1th9OzbX4DJ\ngnlxw4p4ViyLpRtqEWifDlm5GgvL7jHPVRYEyE21/fCi5SH5l/9bwg94QuBu\nOzhQeBWxw9BAwh2Lp9/xb+0o9zXNBPesfD5IT/RYJOl09AiAWLUN6ADkBbSN\nZ48Ie5Ww7VIP7iz426LkPQm8c6eiL8/zKWaELBVJD+yL0JgKXOTVZsfi4x1x\nt8Ek\r\n=YVdg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7B13PmwPTlgNmeIpD8eB7xcUGih2lu6i2fVn3pv/XXAIgVsFj5BGbFwjMvE+/qJ8UU54O7LqEOb/d02Qje668RV0="}]},"maintainers":[{"name":"farfromrefuge","email":"martin.guillon@akylas.fr"}],"_npmUser":{"name":"farfromrefuge","email":"martin.guillon@akylas.fr"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nativescript-lottie_4.1.0_1599490479894_0.15808301555927717"},"_hasShrinkwrap":false,"deprecated":"package moved to @nativescript-community/ui-lottie"}},"time":{"created":"2020-09-07T14:54:39.606Z","4.1.0":"2020-09-07T14:54:40.009Z","modified":"2022-04-04T12:31:51.912Z"},"maintainers":[{"name":"farfromrefuge","email":"martin.guillon@akylas.fr"}],"description":"NativeScript plugin to expose AirBnB Lottie library","homepage":"https://github.com/farfromrefug/nativescript-lottie","keywords":["NativeScript","@akylas/nativescript-lottie","Lottie","Android","Animation","iOS","TypeScript","bradmartin"],"repository":{"type":"git","url":"git+https://github.com/farfromrefug/nativescript-lottie.git"},"contributors":[{"name":"Nathan Walker","email":"walkerrunpdx@gmail.com"},{"name":"JB","url":"https://github.com/rhanb"},{"name":"Dirk Rudolph","url":"https://github.com/Buuhuu"},{"name":"Hamdi Wanis","url":"https://github.com/hamdiwanis"},{"name":"itstheceo","url":"https://github.com/itstheceo"}],"author":{"name":"Brad Martin","email":"bradwaynemartin@gmail.com"},"bugs":{"url":"https://github.com/farfromrefug/nativescript-lottie/issues"},"license":"MIT","readme":"<a align=\"center\" href=\"https://www.npmjs.com/package/nativescript-lottie\">\n    <h2 align=\"center\">NativeScript-Lottie</h2>\n</a>\n<h4 align=\"center\">NativeScript plugin to expose Airbnb Lottie for awesome animations.</h4>\n\n<p align=\"center\">\n <a href=\"https://www.npmjs.com/package/nativescript-lottie\">\n        <img src=\"https://img.shields.io/npm/v/nativescript-lottie.svg\" alt=\"npm\">\n    </a>\n    <a href=\"https://www.npmjs.com/package/nativescript-lottie\">\n        <img src=\"https://img.shields.io/npm/dt/nativescript-lottie.svg?label=npm%20downloads\" alt=\"npm\">\n    </a>\n     <a href=\"https://github.com/farfromrefug/nativescript-lottie/actions\">\n        <img src=\"https://github.com/farfromrefug/nativescript-lottie/workflows/Build%20CI/badge.svg\" alt=\"Action Build\">\n    </a>\n    <a href=\"https://github.com/farfromrefug/nativescript-lottie/stargazers\">\n        <img src=\"https://img.shields.io/github/stars/farfromrefug/nativescript-lottie.svg\" alt=\"stars\">\n    </a>\n    <a href=\"https://paypal.me/bradwayne88\">\n        <img src=\"https://img.shields.io/badge/Donate-PayPal-green.svg\" alt=\"donate\">\n    </a>\n</p>\n\n## Changelog\n\nAll notable changes to this project will be documented in the [changelog](CHANGELOG.md).\n\n## Demo Screen\n\n_The .gif does not do the fluid animations justice_\n\n![LottieView](screens/lottieDemo.gif)\n\n## Installation\n\nTo install execute:\n\n```\ntns plugin add nativescript-lottie\n```\n\n## Usage\n\n### NativeScript (Core)\n\n#### XML\n\n```xml\n<Page\n    xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n    xmlns:Lottie=\"nativescript-lottie\" navigatingTo=\"navigatingTo\" class=\"page\">\n    <StackLayout>\n        <Lottie:LottieView src=\"PinJump.json\" height=\"130\" loop=\"true\" autoPlay=\"true\" loaded=\"yourLoadedEvent\" />\n    </StackLayout>\n</Page>\n```\n\n#### TS\n\n```typescript\nimport { LottieView } from \"nativescript-lottie\";\n\npublic yourLoadedEvent(args) {\n    this._myLottie = args.object as LottieView; /// this is the instance of the LottieAnimationView\n}\n```\n\n---\n\n### NativeScript Angular\n\n#### XML\n\n```xml\n<StackLayout>\n    <LottieView width=\"100\" height=\"150\" [src]=\"src\" [loop]=\"loop\" [autoPlay]=\"autoPlay\" (loaded)=\"lottieViewLoaded($event)\">     </LottieView>\n</StackLayout>\n```\n\n#### Component\n\n```typescript\nimport { Component } from '@angular/core';\nimport { registerElement } from 'nativescript-angular';\nimport { LottieView } from 'nativescript-lottie';\n\nregisterElement('LottieView', () => LottieView);\n\n@Component({\n  templateUrl: 'home.component.html',\n  moduleId: module.id\n})\nexport class HomeComponent {\n  public loop: boolean = true;\n  public src: string;\n  public autoPlay: boolean = true;\n  public animations: Array<string>;\n\n  private _lottieView: LottieView;\n\n  constructor() {\n    this.animations = [\n      'Mobilo/A.json',\n      'Mobilo/D.json',\n      'Mobilo/N.json',\n      'Mobilo/S.json'\n    ];\n    this.src = this.animations[0];\n  }\n\n  lottieViewLoaded(event) {\n    this._lottieView = <LottieView>event.object;\n  }\n}\n```\n\n---\n\n## NativeScript Vue\n\n### Bootstrap (probably in app.js)\n\n```typescript\nVue.registerElement(\n  'LottieView',\n  () => require('nativescript-lottie').LottieView\n);\n```\n\n### Component\n\n```xml\n<template>\n    <Page class=\"page\">\n        <StackLayout>\n            <LottieView height=\"130\" src=\"PinJump.json\" :loop=\"true\" :autoPlay=\"true\" @loaded=\"lottieViewLoaded\"></LottieView>\n        </StackLayout>\n    </page\n</template>\n\n<script>\n    export default {\n        methods: {\n            lottieViewLoaded(args) {\n                this._lottieView = args.object;\n            },\n        },\n        data() {\n            return {\n                _lottieView: null,\n            }\n        }\n    };\n</script>\n```\n\n---\n\n## Assets\n\n:fire: You can find animations in the `sample-effects` folder.\n\n### Android\n\nPlace your animation files in the NS app's `app/App_Resources/Android/src/main/assets` folder.\n\nNote: In a nativescript-vue project the above folder may not exist. Place the files in `platforms/android/app/src/main/assets`.\n\n### iOS\n\nPlace your animations files in your `app/App_Resources/iOS/` folder.\n\n## Properties (bindable)\n\n| Property   | Type      | Default | Description                                   |\n| ---------- | --------- | ------- | --------------------------------------------- |\n| `autoPlay` | `boolean` | `false` | Start LottieView animation on load if `true`. |\n| `loop`     | `boolean` | `false` | Loop continuously animation if `true`.        |\n| `src`      | `string`  | `null`  | Animation path to `.json` file.               |\n\n## Properties\n\n| Property          | Type                | Default | Description                                                                                                                                               |\n| ----------------- | ------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `completionBlock` | `(boolean) => void` | `null`  | Completion block to be executed upon completion of the animation. The animation is considered complete when it finishes playing and is no longer looping. |\n| `duration`        | `number`            | `null`  | Get the duration of the animation.                                                                                                                        |\n| `progress`        | `number`            | `0`     | Get/set the progress of the animation.                                                                                                                    |\n| `speed`           | `number`            | `1`     | Get/set the speed of the animation.                                                                                                                       |\n\n## Methods\n\n| Method                                | Return    | Parameters                 | Description                                                                                                             |\n| ------------------------------------- | --------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| `cancelAnimation`                     | `void`    | None                       | Pauses the animation for the LottieView instance.                                                                       |\n| `isAnimating`                         | `boolean` | None                       | Returns true if the LottieView is animating, else false.                                                                |\n| `playAnimation`                       | `void`    | None                       | Plays the animation for the LottieView instance.                                                                        |\n| `playAnimationFromProgressToProgress` | `void`    | startProgress, endProgress | Plays the animation for the LottieView instance from the specified start and end progress values (between 0 and 1).     |\n| `setColorValueDelegateForKeyPath`     | `void`    | value, keyPath             | Sets the provided color value on each property that matches the specified keyPath in the LottieView instance.           |\n| `setOpacityValueDelegateForKeyPath`   | `void`    | value, keyPath             | Sets the provided opacity value (0 - 1) on each property that matches the specified keyPath in the LottieView instance. |\n\n## Contributors\n\n| [<img alt=\"Brad Martin\" src=\"https://avatars0.githubusercontent.com/u/6006148?s=400&v=4\" width=\"117\">](https://github.com/bradmartin) | [<img alt=\"Nathan Walker\" src=\"https://avatars0.githubusercontent.com/u/457187?s=400&v=4\" width=\"117\">](https://github.com/NathanWalker/) | [<img alt=\"Jean-Baptiste Aniel\" src=\"https://avatars3.githubusercontent.com/u/9477179?s=460&v=4\" width=\"117\">](https://github.com/rhanb) | [<img alt=\"HamdiWanis\" src=\"https://avatars3.githubusercontent.com/u/11708544?s=460&v=4\" width=\"117\">](https://github.com/hamdiwanis) |\n| :-----------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------: |\n|                                              [bradmartin](https://github.com/bradmartin)                                              |                                              [NathanWalker](https://github.com/NathanWalker)                                              |                                                    [rhanb](https://github.com/rhanb)                                                     |                                              [HamdiWanis](https://github.com/hamdiwanis)                                              |\n\n| [<img alt=\"itstheceo\" src=\"https://avatars2.githubusercontent.com/u/5218201?s=460&v=4\" width=\"117\">](https://github.com/itstheceo) | [<img alt=\"itstheceo\" src=\"https://avatars2.githubusercontent.com/u/32623552?s=460&v=4\" width=\"117\">](https://github.com/mudlabs) |\n| :--------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------: |\n|                                             [itstheceo](https://github.com/itstheceo)                                              |                                               [mudlabs](https://github.com/mudlabs)                                               |\n","readmeFilename":"README.md"}