1.0.3 ⢠Published 1 year ago
@reslear/dotlottie-player-core v1.0.3
dotLottie-player-core
Only fetching and parse functions.

š¹ Live Playground
Features
- š High performance (using
fflate) - āļø Fetch API based
- š¦ CJS and ESM support
- šŖ fylly typed with TypeScript
- šļøāāļø Lightweight with ~13kb size
Install
pnpm add @reslear/dotlottie-player-coreUsage
fetchLottie
fetch method for get animation and parse to lottie json.
import { fetchLottie } from '@reslear/dotlottie-player-core'
const lottieJson = await fetchLottie('/my-animation.lottie')
// {"v":"5.6.8","fr":24,"ip":0,"op":144,"w":2161,"h"...}Arguments:
url- path to.lottie,.jsonanimation file
also support base64 data URI
fetchLottie('data:application/json;base64,<base64>')fetchOptions- Fetch API options
fetchLottie(url, {
mode: 'no-cors',
})Inspired
License
MIT by @reslear