vue-ticker

0.1.1 • Public • Published

vue-ticker

Ticker plugin for Vue.js

Example

https://112ka.github.io/example/vue-ticker/

Install

<script src="/path/to/vue.js"></script>
<script src="/path/to/vue-ticker.umd.min.js"></script>

or

yarn add vue-ticker
or
npm install vue-ticker
import Vue from 'vue'
import VueTicker from 'vue-ticker'

Vue.use(VueTicker)

Usage

 
<script>
 
export default {
  mounted() {
    //set fps (default:30)
    this.$ticker.fps = 60
 
    //add to ticker
    this.$ticker.add(this.tickFunction)
 
    //remove from ticker
    this.$ticker.remove(this.tickFunction)
 
  },
 
  methods: {
    tickFunction() {
      this.count += 1;
    },
  }
}

Licensing

MIT

Readme

Keywords

Package Sidebar

Install

npm i vue-ticker

Weekly Downloads

4

Version

0.1.1

License

MIT

Unpacked Size

27.6 kB

Total Files

14

Last publish

Collaborators

  • 112ka