| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE HTML> | |
| 2 <html> | |
| 3 <head> | |
| 4 <meta charset="utf-8"> | |
| 5 <script type="text/javascript"> | |
| 6 | |
| 7 window.onload = function() { | |
| 8 setup("1"); | |
| 9 setup("2"); | |
| 10 } | |
| 11 | |
| 12 function setup(id) { | |
| 13 var c = document.getElementById(id); | |
| 14 var gl = c.getContext("experimental-webgl"); | |
| 15 gl.clearColor(1,0,0,1); | |
| 16 gl.clear(gl.COLOR_BUFFER_BIT); | |
| 17 setTimeout(function() { | |
| 18 gl.enable(gl.SCISSOR_TEST); | |
| 19 gl.scissor(0,0,50,50); | |
| 20 gl.clearColor(0,1,0,1); | |
| 21 gl.clear(gl.COLOR_BUFFER_BIT); | |
| 22 }, 500); | |
| 23 } | |
| 24 </script> | |
| 25 </head> | |
| 26 <body> | |
| 27 <canvas id="1"></canvas> | |
| 28 <div style="height:4000px;">content that is tall like several articles</div> | |
| 29 <canvas id="2"></canvas> | |
| 30 </body> | |
| 31 </html> | |
| 32 | |
| OLD | NEW |