PKJt! ! index.html Fake Canvas on GPU - js do it PKJ/?##index.jsvar canvas = document.createElement("canvas"); canvas.width = window.innerWidth; canvas.height = window.innerHeight; document.body.appendChild(canvas); var gl = canvas.getContext("webgl2") || canvas.getContext("experimental-webgl2"); gl.enable(gl.DEPTH_TEST); gl.depthFunc(gl.LEQUAL); gl.clearColor(1,1,1,1); var compileShader = function(prog, src, type){ var sh = gl.createShader(type); gl.shaderSource(sh, src.replace(/^\n/, "")); gl.compileShader(sh); if (!gl.getShaderParameter(sh, gl.COMPILE_STATUS)) { alert(gl.getShaderInfoLog(sh)); } gl.attachShader(prog, sh); gl.deleteShader(sh); }; var p1 = gl.createProgram(); compileShader(p1, document.getElementById("vs").text, gl.VERTEX_SHADER); compileShader(p1, document.getElementById("fs").text, gl.FRAGMENT_SHADER); gl.linkProgram(p1); gl.useProgram(p1); gl.uniform1f(gl.getUniformLocation(p1, "aspect"), canvas.width / canvas.height); var render = function(time){ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); gl.useProgram(p1); gl.uniform1f(gl.getUniformLocation(p1, "time"),time); gl.drawArrays(gl.TRIANGLES, 0, 10000); }; var zero = Date.now(); (function () { render( (Date.now() - zero) * 0.001); requestAnimationFrame(arguments.callee); })(); PKJ!b== style.cssbody { margin: 0; padding: 0; overflow: hidden; } PKJt! ! index.htmlPKJ/?##I index.jsPKJ!b== style.cssPK