概説 HTML5のcanvas内に1枚の画像を表示するのは簡単です。 複数の画像を表示するのも結構簡単なのですが、これを任意の順序で表示しようとするとちょっと工夫が必要でした。 まずは1枚の画像を表示してみます。 <body> <canvas id="canvas" width="600" height="400"></canvas> <script> (function() { var canvas = document.getElementById('canvas'); var context = canvas.getContext('2d'); var image = new Image(); image.src = '1.png'; image.addEventListener('load', function() { context.drawImage(image, 0, 0,