Using the canvas Javascript element, is it possible to copy a 2-dimensional array of RGB values ββonto the canvas?
<html> <body> <canvas id="canvas" height="200" width="200"></canvas> <script type = "text/javascript"> //copy the following array to the canvas: var arr1 = [ [[255, 255, 255],[200, 200, 0],[200, 200, 200]], [[200, 0, 0],[200, 200, 0],[200, 200, 0]], [[200, 200, 0],[200, 0, 0],[200, 200, 0]] ] <script> </body> </html>
javascript canvas
Anderson green
source share