npm.io
0.0.1 • Published 5 years ago

blendic-svg-player

Licence
MIT
Version
0.0.1
Deps
0
Size
190 kB
Vulns
0
Weekly
0
Stars
2

Main License: MIT

blendic-svg-player

This is the component to play the animations exported by Blendic SVG.

The detail of Blendic SVG is here: https://github.com/miyanokomiya/blendic-svg

demo

https://miyanokomiya.github.io/blendic-svg-player/

usage

install
yarn add blendic-svg-player
mount
<div id="target_id" />
import { Player } from 'blendic-svg-player'

const bakedData = { /* json data exported by Blendic SVG */ }

const player = new Player('target_id', {
  bakedData: bakedData,
  width: '100%',
  height: '100%',
})

player.play()
// player.reverse()
// player.pause()
// player.stop()
// player.dispose()

commnad

# install dependencies
$ yarn install

# start dev & demo server
$ yarn demo

# lint
$ yarn lint[:fix]

# test
$ yarn test [--watch]

# build
$ yarn build

publish

Update version in package.json, commit with a comment Release x.x.x and merge into the main branch.