Generating images in HTML5 canvas
问题 I am experimenting with canvas and I am having some trouble. Please see this codepen: http://codepen.io/JonnyBoggon/pen/YGgKqQ I would like to generate two (or more potentially) floating images - which collide - like the circles in my codepen. So, exactly as it is now, but with images rather than circles. function makeAmpersands(num) { var x, y, vx, vy, r, m, ke, colliding, src; for (var i = 0; i < num; i++) { x = Math.random() * canvas.width; y = Math.random() * canvas.height; vx = Math