Skip to content

Commit

Permalink
add mobile touch
Browse files Browse the repository at this point in the history
  • Loading branch information
Surbhit Srivastava committed Apr 13, 2024
1 parent d017d01 commit a4d1fec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,10 @@ window.addEventListener('resize', function(){
canvas.width = window.innerWidth
canvas.height = window.innerHeight
v.resize(canvas.width, canvas.height)
})

window.addEventListener('ontouchmove', function(){
canvas.width = window.innerWidth
canvas.height = window.innerHeight
v.resize(canvas.width, canvas.height)
})

0 comments on commit a4d1fec

Please sign in to comment.