Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lottiefiles/tgskit
Toolkit for dealing with Telegram Stickers and Bodymovin/Lottie animations.
https://github.com/lottiefiles/tgskit
bodymovin lottie stickers telegram tgs
Last synced: about 2 months ago
JSON representation
Toolkit for dealing with Telegram Stickers and Bodymovin/Lottie animations.
- Host: GitHub
- URL: https://github.com/lottiefiles/tgskit
- Owner: LottieFiles
- Created: 2019-07-09T01:01:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-19T05:59:03.000Z (about 2 years ago)
- Last Synced: 2024-04-28T03:44:40.131Z (8 months ago)
- Topics: bodymovin, lottie, stickers, telegram, tgs
- Language: TypeScript
- Size: 110 KB
- Stars: 59
- Watchers: 3
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Telegram Sticker Kit by LottieFiles
Toolkit for dealing with Telegram Stickers and Bodymovin/Lottie animations
## Installation
#### In HTML, import from CDN or from the local Installation:
##### Lottie Player:
- Import from CDN.
```html```
- Import from local node_modules directory.
```html```
#### In Javascript or TypeScript:
1. Install package using npm or yarn.
```shell
npm install --save @lottiefiles/tgskit
```2. Import package in your code.
```javascript
import { TGSKit } from '@lottiefiles/tgskit';
```## Usage
```js
const anim = new TGSKit();anim.load('http://localhost:1234/bodymovin.json')
.then(() => {
const errors = anim.validate();if (errors.length === 0) {
anim.download('sticker');
} else {
console.log('Given JSON does not meet requirements for a TGS:');
console.log(errors);
}
})
.catch(err => {
console.log('There was an error loading the src resource', err);
});
```## Docs
TGSKit class documentation is available in the /docs/ directory.