📫Anime and Hammer
continue evening dress
Anime
change position smoothly
anim({
name:"player1",//obj name
position:{//write down the destination
x:5,y:5
},
time:1000,//automatically set to 1000(ms) if you do not enter time
type:"linear"//automatically set to "linear" if you do not enter time
})
anime.js must be installed
Install anime.js
require("https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js")
Hammer
records your swiping movements
starthammercanvas()
hammercanvas = function(location,time){
console.log(
location,//is the direction in which it drags possible outputs: RIGHT,LEFT,UP,DOWN
time//the time it is held down
)
}
hammer.js must be installed
Install hammer.js
require("https://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.min.js")
Last updated