How to make an image appears and disappears in random positions in canvas? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How to make an image appears and disappears in random positions in canvas?

JavaScript

5th Dec 2016, 3:23 AM
Mahmoud Abbas
Mahmoud Abbas - avatar
2 Respostas
+ 3
[image].x = Math.random() * [canvas].width - [image].width; [image].x = Math.random() * [canvas].width - [image].width; is this what you mean?
15th Dec 2016, 5:18 PM
Sjoerd Flameling
Sjoerd Flameling - avatar
0
I'll try it and tell you
16th Dec 2016, 12:45 AM
Mahmoud Abbas
Mahmoud Abbas - avatar