Browse Source

Add 'examples/canvastemplate'

master
Daniel 11 months ago
parent
commit
1553b6e85a
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      examples/canvastemplate

+ 12
- 0
examples/canvastemplate View File

@@ -0,0 +1,12 @@
window.onload = function() {
document.write("<canvas id='canvas' style='width: 100%; height: 100%;'></canvas>");
var canvas = document.getElementById("canvas");
var c = canvas.getContext("2d");
setInterval(function() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
c.fillRect(10, 10, 10, 10);
}, 1);
}

Loading…
Cancel
Save