November 2017
Beginner to intermediate
398 pages
8h 42m
English
To add some life to the game world, we will create a few clouds that will slide in the sky. Their position and animation duration will be random and they will go from the left to the right of the window.
const cloudAnimationDurations = { min: 10000, // 10 sec max: 50000, // 50 sec }
Vue.component('cloud', { template: `<div class="cloud" :class="'cloud-' + type" > <img :src="'svg/cloud' + type + '.svg'" /> </div>`, props: ['type'], })
Read now
Unlock full access