industrial_black_purple_gold
HTML
<script src="https://unpkg.com/vue-perfectlooper"></script>
<link rel="stylesheet" href="https://admiralpotato.github.io/vue-perfectlooper/demo.css">
<script src="https://unpkg.com/vue@2"></script>
<div id="app" class="container">
<div v-for="item in animationList">
<h2>{{item.id}}</h2>
<vue-perfectlooper v-bind="item"></vue-perfectlooper>
</div>
</div>
JavaScript
Vue.component('vue-perfectlooper', VuePerfectlooper);
const base = 'http://root.nuclearpixel.com/animation_frames/industrial_black_purple_gold/';
const animationNameList =
`00-comp_a 24
01-comp_a 24`.split('\n').reverse();
const animationList = animationNameList.map(function(animationName){
const split = animationName.split(' ');
const path = split[0];
const frames = split.length > 1 ? parseInt(split[1], 10) : 48;
return {
"id": animationName,
"poster": base + path + "/0001.png",
"src": base + path,
"frames": frames,
"suffix": ".png",
framerate: 24
}
});
new Vue({
el: '#app',
data: {
animationList: animationList
}
});