diff --git a/build/GlslCanvas.min.js b/build/GlslCanvas.min.js new file mode 100644 index 0000000..e3903b5 --- /dev/null +++ b/build/GlslCanvas.min.js @@ -0,0 +1 @@ +!function e(t,r,i){function n(o,s){if(!r[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var g=r[o]={exports:{}};t[o][0].call(g.exports,function(e){var r=t[o][1][e];return n(r?r:e)},g,g.exports,e,t,r,i)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o1||i>1;var n=o.createShader(this.gl,t,this.gl.VERTEX_SHADER),a=o.createShader(this.gl,e,this.gl.FRAGMENT_SHADER);a?this.isValid=!0:(a=o.createShader(this.gl,"void main(){\n gl_FragColor = vec4(1.0);\n}",this.gl.FRAGMENT_SHADER),this.isValid=!1);var s=o.createProgram(this.gl,[n,a]);this.gl.useProgram(s),this.gl.detachShader(s,n),this.gl.detachShader(s,a),this.gl.deleteShader(n),this.gl.deleteShader(a),this.program=s}},{key:"render",value:function(e){var t=e.forceRender,r=e.mouse;if(t||this.animated&&a.isCanvasVisible(this.canvas)){var i=Date.now(),n=(i-this.timeLoad)/1e3,o=this.gl.getUniformLocation(this.program,"u_time");this.gl.uniform1f(o,n);var s=this.canvas.getBoundingClientRect();if(r.x>=s.left&&r.x<=s.right&&r.y>=s.top&&r.y<=s.bottom){var u=this.gl.getUniformLocation(this.program,"u_mouse");this.gl.uniform2f(u,r.x-s.left,this.canvas.height-(r.y-s.top))}var l=this.gl.getUniformLocation(this.program,"u_resolution");this.gl.uniform2f(l,this.canvas.width,this.canvas.height);for(var g=0;g
'+e+"
"},g='This page requires a browser that supports WebGL.
Click here to upgrade your browser.',h='It doesn\'t appear your computer can support WebGL.
Click here for more information.'},{}],3:[function(e,t,r){"use strict";function i(e){return e.getBoundingClientRect().top+e.height>0&&e.getBoundingClientRect().top<(window.innerHeight||document.documentElement.clientHeight)}function n(e){return 0==(e&e-1)}function a(e){--e;for(var t=1;32>t;t<<=1)e|=e>>t;return e+1}function o(e,t){var r,i=new XMLHttpRequest;return i.onreadystatechange=function(){4===i.readyState&&200===i.status&&(r=i.responseText)},i.open(t?t:"GET",e,!1),i.overrideMimeType("text/plain"),i.send(),r}function s(e,t){for(var r=""+e;r.length