New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@twoavy/sprite-animation

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twoavy/sprite-animation

Vue component for sprite-based animations

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
2
Created
Source

sprite-animation

A Vue component for sprite-based animations

Installation

yarn add @twoavy/sprite-animation 
import SpriteAnimation from '@twoavy/sprite-animation'

Usage

<sprite-animation ref="anim" :width="500" :height="500" :frames="30"
                  :duration="5" :sprite="require('@/assets/sprite.png')" />

Props

NameTypeDefaultNote
widthstringrequiredframe width
heightstringrequiredframe height
framesnumberrequirednumber of frames
durationnumberrequiredduration of the animation in secs
spritestringrequiredpath to the sprite image
loopbooleantrueloop the animation (plays once otherwise)
autoplaybooleantrueautomatically start playing

Methods

play()

// start animation if autoplay is set to false
this.$refs.anim.play()

Events

  • @start - animation started
  • @loop - called on each animation iteration (if loop is set to true)
  • @end - animation ended
  • @cancel - animation was cancelled

FAQs

Package last updated on 15 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts