Created
September 13, 2019 07:39
-
-
Save beshur/4df11408a39dce27e533a5ae9f800dc2 to your computer and use it in GitHub Desktop.
Multiple covers on canvas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// image width and height | |
var iw = 132; | |
var imageCounter = 0; | |
var x = 0; | |
var y = 0; | |
var ctx = document.getElemenyById('c').getContext('2d'); | |
ctx.fillStyle = "white"; | |
ctx.fillRect(0, 0, 800, 1100); | |
// drawing | |
function drawpics(images) { | |
for(var i = 0; i < 8; i++) { | |
// row | |
for (var y = 0; y < 5; y++) { | |
// columns | |
draw(images[imageCounter++], 10 + iw * y, 10 + iw * i) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment