UNPKG

vue-animejs

Version:

A simple Vue plugin for binding Anime.js

21 lines (17 loc) 371 B
'use strict'; var anime = require('animejs'); if (anime.default) { anime = anime.default; } function install(Vue) { Vue.directive('anime', { bind: function bind(targets, binding) { var opts = Object.assign({}, binding.value, { targets: targets }); anime(opts); } }); Vue.prototype.$anime = anime; } module.exports = { install: install };