/
var
/
www
/
barefootlaw.org
/
wp-content
/
themes
/
archub
/
assets
/
js
/
Upload File
HOME
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"k6p3":[function(require,module,exports) { module.exports="#ifdef GL_ES\n precision mediump float;\n#define GLSLIFY 1\n#endif\n\nuniform vec4 resolution;\nuniform vec2 mouse;\nuniform vec2 threshold;\nuniform float time;\nuniform float pixelRatio;\nuniform sampler2D image0;\nuniform sampler2D image1;\n\nvec2 mirrored(vec2 v) {\n vec2 m = mod(v,2.);\n return mix(m,2.0 - m, step(1.0 ,m));\n}\n\nvoid main() {\n // uvs and textures\n vec2 uv = pixelRatio*gl_FragCoord.xy / resolution.xy ;\n vec2 vUv = (uv - vec2(0.5))*resolution.zw + vec2(0.5);\n vUv.y = 1. - vUv.y;\n vec4 tex1 = texture2D(image1,mirrored(vUv));\n vec2 fake3d = vec2(vUv.x + (tex1.r - 0.5)*mouse.x/threshold.x, vUv.y + (tex1.r - 0.5)*mouse.y/threshold.y);\n gl_FragColor = texture2D(image0,mirrored(fake3d));\n}"; },{}],"hNHB":[function(require,module,exports) { module.exports="#define GLSLIFY 1\nattribute vec2 a_position;\n\nvoid main() {\n gl_Position = vec4( a_position, 0, 1 );\n}"; },{}],"yZzk":[function(require,module,exports) { var define; var t;function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t){function e(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1}function a(t){return new Promise(function(e,a){!function n(i){setTimeout(function(){t&&t.data?e():i>=20?a():n(++i)},50)}(0)})}function n(){v=m?(t.screen.orientation.angle||0)*l:(t.orientation||0)*l}function i(t){for(var e in h.orientation.data=t,h.orientation.callbacks)h.orientation.callbacks[e].call(this)}function o(t){for(var e in h.motion.data=t,h.motion.callbacks)h.motion.callbacks[e].call(this)}if(void 0===t.FULLTILT||null===t.FULLTILT){var r=Math.PI,s=r/2,c=2*r,l=r/180,u=180/r,h={orientation:{active:!1,callbacks:[],data:void 0},motion:{active:!1,callbacks:[],data:void 0}},m=!(!t.screen||!t.screen.orientation||void 0===t.screen.orientation.angle||null===t.screen.orientation.angle),v=(m?t.screen.orientation.angle:t.orientation||0)*l,d=s,p=r,y=c/3,A=-s,f={version:"0.5.3",getDeviceOrientation:function(t){return new Promise(function(e,n){var i=new f.DeviceOrientation(t);i.start(),new a(h.orientation).then(function(){i._alphaAvailable=h.orientation.data.alpha&&null!==h.orientation.data.alpha,i._betaAvailable=h.orientation.data.beta&&null!==h.orientation.data.beta,i._gammaAvailable=h.orientation.data.gamma&&null!==h.orientation.data.gamma,e(i)}).catch(function(){i.stop(),n("DeviceOrientation is not supported")})})},getDeviceMotion:function(t){return new Promise(function(e,n){var i=new f.DeviceMotion(t);i.start(),new a(h.motion).then(function(){i._accelerationXAvailable=h.motion.data.acceleration&&h.motion.data.acceleration.x,i._accelerationYAvailable=h.motion.data.acceleration&&h.motion.data.acceleration.y,i._accelerationZAvailable=h.motion.data.acceleration&&h.motion.data.acceleration.z,i._accelerationIncludingGravityXAvailable=h.motion.data.accelerationIncludingGravity&&h.motion.data.accelerationIncludingGravity.x,i._accelerationIncludingGravityYAvailable=h.motion.data.accelerationIncludingGravity&&h.motion.data.accelerationIncludingGravity.y,i._accelerationIncludingGravityZAvailable=h.motion.data.accelerationIncludingGravity&&h.motion.data.accelerationIncludingGravity.z,i._rotationRateAlphaAvailable=h.motion.data.rotationRate&&h.motion.data.rotationRate.alpha,i._rotationRateBetaAvailable=h.motion.data.rotationRate&&h.motion.data.rotationRate.beta,i._rotationRateGammaAvailable=h.motion.data.rotationRate&&h.motion.data.rotationRate.gamma,e(i)}).catch(function(){i.stop(),n("DeviceMotion is not supported")})})},Quaternion:function(t,a,n,i){var o;this.set=function(t,e,a,n){this.x=t||0,this.y=e||0,this.z=a||0,this.w=n||1},this.copy=function(t){this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w},this.setFromEuler=function(){var t,e,a,n,i,o,r,s,c,u,h,m;return function(v){return a=((v=v||{}).alpha||0)*l,t=(v.beta||0)*l,e=(v.gamma||0)*l,o=a/2,n=t/2,i=e/2,r=Math.cos(n),s=Math.cos(i),c=Math.cos(o),u=Math.sin(n),h=Math.sin(i),m=Math.sin(o),this.set(u*s*c-r*h*m,r*h*c+u*s*m,r*s*m+u*h*c,r*s*c-u*h*m),this.normalize(),this}}(),this.setFromRotationMatrix=function(){var t;return function(a){return t=a.elements,this.set(.5*Math.sqrt(1+t[0]-t[4]-t[8])*e(t[7]-t[5]),.5*Math.sqrt(1-t[0]+t[4]-t[8])*e(t[2]-t[6]),.5*Math.sqrt(1-t[0]-t[4]+t[8])*e(t[3]-t[1]),.5*Math.sqrt(1+t[0]+t[4]+t[8])),this}}(),this.multiply=function(t){return o=f.Quaternion.prototype.multiplyQuaternions(this,t),this.copy(o),this},this.rotateX=function(t){return o=f.Quaternion.prototype.rotateByAxisAngle(this,[1,0,0],t),this.copy(o),this},this.rotateY=function(t){return o=f.Quaternion.prototype.rotateByAxisAngle(this,[0,1,0],t),this.copy(o),this},this.rotateZ=function(t){return o=f.Quaternion.prototype.rotateByAxisAngle(this,[0,0,1],t),this.copy(o),this},this.normalize=function(){return f.Quaternion.prototype.normalize(this)},this.set(t,a,n,i)}};f.Quaternion.prototype={constructor:f.Quaternion,multiplyQuaternions:function(){var t=new f.Quaternion;return function(e,a){var n=e.x,i=e.y,o=e.z,r=e.w,s=a.x,c=a.y,l=a.z,u=a.w;return t.set(n*u+r*s+i*l-o*c,i*u+r*c+o*s-n*l,o*u+r*l+n*c-i*s,r*u-n*s-i*c-o*l),t}}(),normalize:function(t){var e=Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w);return 0===e?(t.x=0,t.y=0,t.z=0,t.w=1):(e=1/e,t.x*=e,t.y*=e,t.z*=e,t.w*=e),t},rotateByAxisAngle:function(){var t,e,a=new f.Quaternion,n=new f.Quaternion;return function(i,o,r){return t=(r||0)/2,e=Math.sin(t),n.set((o[0]||0)*e,(o[1]||0)*e,(o[2]||0)*e,Math.cos(t)),a=f.Quaternion.prototype.multiplyQuaternions(i,n),f.Quaternion.prototype.normalize(a)}}()},f.RotationMatrix=function(t,e,a,n,i,o,r,s,c){var u;this.elements=new Float32Array(9),this.identity=function(){return this.set(1,0,0,0,1,0,0,0,1),this},this.set=function(t,e,a,n,i,o,r,s,c){this.elements[0]=t||1,this.elements[1]=e||0,this.elements[2]=a||0,this.elements[3]=n||0,this.elements[4]=i||1,this.elements[5]=o||0,this.elements[6]=r||0,this.elements[7]=s||0,this.elements[8]=c||1},this.copy=function(t){this.elements[0]=t.elements[0],this.elements[1]=t.elements[1],this.elements[2]=t.elements[2],this.elements[3]=t.elements[3],this.elements[4]=t.elements[4],this.elements[5]=t.elements[5],this.elements[6]=t.elements[6],this.elements[7]=t.elements[7],this.elements[8]=t.elements[8]},this.setFromEuler=function(){var t,e,a,n,i,o,r,s,c;return function(u){return a=((u=u||{}).alpha||0)*l,t=(u.beta||0)*l,e=(u.gamma||0)*l,n=Math.cos(t),i=Math.cos(e),o=Math.cos(a),r=Math.sin(t),s=Math.sin(e),c=Math.sin(a),this.set(o*i-c*r*s,-n*c,i*c*r+o*s,i*c+o*r*s,o*n,c*s-o*i*r,-n*s,r,n*i),this.normalize(),this}}(),this.setFromQuaternion=function(){var t,e,a,n;return function(i){return t=i.w*i.w,e=i.x*i.x,a=i.y*i.y,n=i.z*i.z,this.set(t+e-a-n,2*(i.x*i.y-i.w*i.z),2*(i.x*i.z+i.w*i.y),2*(i.x*i.y+i.w*i.z),t-e+a-n,2*(i.y*i.z-i.w*i.x),2*(i.x*i.z-i.w*i.y),2*(i.y*i.z+i.w*i.x),t-e-a+n),this}}(),this.multiply=function(t){return u=f.RotationMatrix.prototype.multiplyMatrices(this,t),this.copy(u),this},this.rotateX=function(t){return u=f.RotationMatrix.prototype.rotateByAxisAngle(this,[1,0,0],t),this.copy(u),this},this.rotateY=function(t){return u=f.RotationMatrix.prototype.rotateByAxisAngle(this,[0,1,0],t),this.copy(u),this},this.rotateZ=function(t){return u=f.RotationMatrix.prototype.rotateByAxisAngle(this,[0,0,1],t),this.copy(u),this},this.normalize=function(){return f.RotationMatrix.prototype.normalize(this)},this.set(t,e,a,n,i,o,r,s,c)},f.RotationMatrix.prototype={constructor:f.RotationMatrix,multiplyMatrices:function(){var t,e,a=new f.RotationMatrix;return function(n,i){return t=n.elements,e=i.elements,a.set(t[0]*e[0]+t[1]*e[3]+t[2]*e[6],t[0]*e[1]+t[1]*e[4]+t[2]*e[7],t[0]*e[2]+t[1]*e[5]+t[2]*e[8],t[3]*e[0]+t[4]*e[3]+t[5]*e[6],t[3]*e[1]+t[4]*e[4]+t[5]*e[7],t[3]*e[2]+t[4]*e[5]+t[5]*e[8],t[6]*e[0]+t[7]*e[3]+t[8]*e[6],t[6]*e[1]+t[7]*e[4]+t[8]*e[7],t[6]*e[2]+t[7]*e[5]+t[8]*e[8]),a}}(),normalize:function(t){var e=t.elements,a=e[0]*e[4]*e[8]-e[0]*e[5]*e[7]-e[1]*e[3]*e[8]+e[1]*e[5]*e[6]+e[2]*e[3]*e[7]-e[2]*e[4]*e[6];return e[0]/=a,e[1]/=a,e[2]/=a,e[3]/=a,e[4]/=a,e[5]/=a,e[6]/=a,e[7]/=a,e[8]/=a,t.elements=e,t},rotateByAxisAngle:function(){var t,e,a=new f.RotationMatrix,n=new f.RotationMatrix,i=!1;return function(o,r,s){return n.identity(),i=!1,t=Math.sin(s),e=Math.cos(s),1===r[0]&&0===r[1]&&0===r[2]?(i=!0,n.elements[4]=e,n.elements[5]=-t,n.elements[7]=t,n.elements[8]=e):1===r[1]&&0===r[0]&&0===r[2]?(i=!0,n.elements[0]=e,n.elements[2]=t,n.elements[6]=-t,n.elements[8]=e):1===r[2]&&0===r[0]&&0===r[1]&&(i=!0,n.elements[0]=e,n.elements[1]=-t,n.elements[3]=t,n.elements[4]=e),i?(a=f.RotationMatrix.prototype.multiplyMatrices(o,n),a=f.RotationMatrix.prototype.normalize(a)):a=o,a}}()},f.Euler=function(t,e,a){this.set=function(t,e,a){this.alpha=t||0,this.beta=e||0,this.gamma=a||0},this.copy=function(t){this.alpha=t.alpha,this.beta=t.beta,this.gamma=t.gamma},this.setFromRotationMatrix=function(){var t,e,a,n;return function(i){(t=i.elements)[8]>0?(e=Math.atan2(-t[1],t[4]),a=Math.asin(t[7]),n=Math.atan2(-t[6],t[8])):t[8]<0?(e=Math.atan2(t[1],-t[4]),a=-Math.asin(t[7]),a+=a>=0?-r:r,n=Math.atan2(t[6],-t[8])):t[6]>0?(e=Math.atan2(-t[1],t[4]),a=Math.asin(t[7]),n=-s):t[6]<0?(e=Math.atan2(t[1],-t[4]),a=-Math.asin(t[7]),a+=a>=0?-r:r,n=-s):(e=Math.atan2(t[3],t[0]),a=t[7]>0?s:-s,n=0),0>e&&(e+=c),e*=u,a*=u,n*=u,this.set(e,a,n)}}(),this.setFromQuaternion=function(){var t,e,a;return function(n){var i=n.w*n.w,o=n.x*n.x,l=n.y*n.y,h=n.z*n.z,m=i+o+l+h,v=n.w*n.x+n.y*n.z;if(v>.499999*m)t=2*Math.atan2(n.y,n.w),e=s,a=0;else if((1e-6-.5)*m>v)t=-2*Math.atan2(n.y,n.w),e=-s,a=0;else{var d=i-o+l-h,p=2*(n.w*n.z-n.x*n.y),y=i-o-l+h,A=2*(n.w*n.y-n.x*n.z);y>0?(t=Math.atan2(p,d),e=Math.asin(2*v/m),a=Math.atan2(A,y)):(t=Math.atan2(-p,-d),e=-Math.asin(2*v/m),e+=0>e?r:-r,a=Math.atan2(-A,-y))}0>t&&(t+=c),t*=u,e*=u,a*=u,this.set(t,e,a)}}(),this.rotateX=function(t){return f.Euler.prototype.rotateByAxisAngle(this,[1,0,0],t),this},this.rotateY=function(t){return f.Euler.prototype.rotateByAxisAngle(this,[0,1,0],t),this},this.rotateZ=function(t){return f.Euler.prototype.rotateByAxisAngle(this,[0,0,1],t),this},this.set(t,e,a)},f.Euler.prototype={constructor:f.Euler,rotateByAxisAngle:function(){var t=new f.RotationMatrix;return function(e,a,n){return t.setFromEuler(e),t=f.RotationMatrix.prototype.rotateByAxisAngle(t,a,n),e.setFromRotationMatrix(t),e}}()},f.DeviceOrientation=function(e){this.options=e||{};var a=0,n=0;if(this.alphaOffsetScreen=0,this.alphaOffsetDevice=void 0,"game"===this.options.type){var i=function(e){return null!==e.alpha&&(this.alphaOffsetDevice=new f.Euler(e.alpha,0,0),this.alphaOffsetDevice.rotateZ(-v),++n>=10)?void t.removeEventListener("deviceorientation",i,!1):void(++a>=200&&t.removeEventListener("deviceorientation",i,!1))}.bind(this);t.addEventListener("deviceorientation",i,!1)}else if("world"===this.options.type){var o=function(e){return!0!==e.absolute&&void 0!==e.webkitCompassAccuracy&&null!==e.webkitCompassAccuracy&&+e.webkitCompassAccuracy>=0&&+e.webkitCompassAccuracy<50&&(this.alphaOffsetDevice=new f.Euler(e.webkitCompassHeading,0,0),this.alphaOffsetDevice.rotateZ(v),this.alphaOffsetScreen=v,++n>=10)?void t.removeEventListener("deviceorientation",o,!1):void(++a>=200&&t.removeEventListener("deviceorientation",o,!1))}.bind(this);t.addEventListener("deviceorientation",o,!1)}},f.DeviceOrientation.prototype={constructor:f.DeviceOrientation,start:function(e){e&&"[object Function]"==Object.prototype.toString.call(e)&&h.orientation.callbacks.push(e),m?t.screen.orientation.addEventListener("change",n,!1):t.addEventListener("orientationchange",n,!1),h.orientation.active||(t.addEventListener("deviceorientation",i,!1),h.orientation.active=!0)},stop:function(){h.orientation.active&&(t.removeEventListener("deviceorientation",i,!1),h.orientation.active=!1)},listen:function(t){this.start(t)},getFixedFrameQuaternion:function(){var t=new f.Euler,e=new f.RotationMatrix,a=new f.Quaternion;return function(){var n=h.orientation.data||{alpha:0,beta:0,gamma:0},i=n.alpha;return this.alphaOffsetDevice&&(e.setFromEuler(this.alphaOffsetDevice),e.rotateZ(-this.alphaOffsetScreen),t.setFromRotationMatrix(e),t.alpha<0&&(t.alpha+=360),t.alpha%=360,i-=t.alpha),t.set(i,n.beta,n.gamma),a.setFromEuler(t),a}}(),getScreenAdjustedQuaternion:function(){var t;return function(){return(t=this.getFixedFrameQuaternion()).rotateZ(-v),t}}(),getFixedFrameMatrix:function(){var t=new f.Euler,e=new f.RotationMatrix;return function(){var a=h.orientation.data||{alpha:0,beta:0,gamma:0},n=a.alpha;return this.alphaOffsetDevice&&(e.setFromEuler(this.alphaOffsetDevice),e.rotateZ(-this.alphaOffsetScreen),t.setFromRotationMatrix(e),t.alpha<0&&(t.alpha+=360),t.alpha%=360,n-=t.alpha),t.set(n,a.beta,a.gamma),e.setFromEuler(t),e}}(),getScreenAdjustedMatrix:function(){var t;return function(){return(t=this.getFixedFrameMatrix()).rotateZ(-v),t}}(),getFixedFrameEuler:function(){var t,e=new f.Euler;return function(){return t=this.getFixedFrameMatrix(),e.setFromRotationMatrix(t),e}}(),getScreenAdjustedEuler:function(){var t,e=new f.Euler;return function(){return t=this.getScreenAdjustedMatrix(),e.setFromRotationMatrix(t),e}}(),isAbsolute:function(){return!(!h.orientation.data||!0!==h.orientation.data.absolute)},getLastRawEventData:function(){return h.orientation.data||{}},_alphaAvailable:!1,_betaAvailable:!1,_gammaAvailable:!1,isAvailable:function(t){switch(t){case this.ALPHA:return this._alphaAvailable;case this.BETA:return this._betaAvailable;case this.GAMMA:return this._gammaAvailable}},ALPHA:"alpha",BETA:"beta",GAMMA:"gamma"},f.DeviceMotion=function(t){this.options=t||{}},f.DeviceMotion.prototype={constructor:f.DeviceMotion,start:function(e){e&&"[object Function]"==Object.prototype.toString.call(e)&&h.motion.callbacks.push(e),m?t.screen.orientation.addEventListener("change",n,!1):t.addEventListener("orientationchange",n,!1),h.motion.active||(t.addEventListener("devicemotion",o,!1),h.motion.active=!0)},stop:function(){h.motion.active&&(t.removeEventListener("devicemotion",o,!1),h.motion.active=!1)},listen:function(t){this.start(t)},getScreenAdjustedAcceleration:function(){var t=h.motion.data&&h.motion.data.acceleration?h.motion.data.acceleration:{x:0,y:0,z:0},e={};switch(v){case d:e.x=-t.y,e.y=t.x;break;case p:e.x=-t.x,e.y=-t.y;break;case y:case A:e.x=t.y,e.y=-t.x;break;default:e.x=t.x,e.y=t.y}return e.z=t.z,e},getScreenAdjustedAccelerationIncludingGravity:function(){var t=h.motion.data&&h.motion.data.accelerationIncludingGravity?h.motion.data.accelerationIncludingGravity:{x:0,y:0,z:0},e={};switch(v){case d:e.x=-t.y,e.y=t.x;break;case p:e.x=-t.x,e.y=-t.y;break;case y:case A:e.x=t.y,e.y=-t.x;break;default:e.x=t.x,e.y=t.y}return e.z=t.z,e},getScreenAdjustedRotationRate:function(){var t=h.motion.data&&h.motion.data.rotationRate?h.motion.data.rotationRate:{alpha:0,beta:0,gamma:0},e={};switch(v){case d:e.beta=-t.gamma,e.gamma=t.beta;break;case p:e.beta=-t.beta,e.gamma=-t.gamma;break;case y:case A:e.beta=t.gamma,e.gamma=-t.beta;break;default:e.beta=t.beta,e.gamma=t.gamma}return e.alpha=t.alpha,e},getLastRawEventData:function(){return h.motion.data||{}},_accelerationXAvailable:!1,_accelerationYAvailable:!1,_accelerationZAvailable:!1,_accelerationIncludingGravityXAvailable:!1,_accelerationIncludingGravityYAvailable:!1,_accelerationIncludingGravityZAvailable:!1,_rotationRateAlphaAvailable:!1,_rotationRateBetaAvailable:!1,_rotationRateGammaAvailable:!1,isAvailable:function(t){switch(t){case this.ACCELERATION_X:return this._accelerationXAvailable;case this.ACCELERATION_Y:return this._accelerationYAvailable;case this.ACCELERATION_Z:return this._accelerationZAvailable;case this.ACCELERATION_INCLUDING_GRAVITY_X:return this._accelerationIncludingGravityXAvailable;case this.ACCELERATION_INCLUDING_GRAVITY_Y:return this._accelerationIncludingGravityYAvailable;case this.ACCELERATION_INCLUDING_GRAVITY_Z:return this._accelerationIncludingGravityZAvailable;case this.ROTATION_RATE_ALPHA:return this._rotationRateAlphaAvailable;case this.ROTATION_RATE_BETA:return this._rotationRateBetaAvailable;case this.ROTATION_RATE_GAMMA:return this._rotationRateGammaAvailable}},ACCELERATION_X:"accelerationX",ACCELERATION_Y:"accelerationY",ACCELERATION_Z:"accelerationZ",ACCELERATION_INCLUDING_GRAVITY_X:"accelerationIncludingGravityX",ACCELERATION_INCLUDING_GRAVITY_Y:"accelerationIncludingGravityY",ACCELERATION_INCLUDING_GRAVITY_Z:"accelerationIncludingGravityZ",ROTATION_RATE_ALPHA:"rotationRateAlpha",ROTATION_RATE_BETA:"rotationRateBeta",ROTATION_RATE_GAMMA:"rotationRateGamma"},t.FULLTILT=f}}(window),function(a,n){var i={GyroNorm:function(){function t(t){return Math.round(t*Math.pow(10,g))/Math.pow(10,g)}function e(){var e={};e=x?d.getScreenAdjustedEuler():d.getFixedFrameEuler();var a=p.getScreenAdjustedAcceleration(),i=p.getScreenAdjustedAccelerationIncludingGravity(),o=p.getScreenAdjustedRotationRate(),r=0;f===n?r=0>(r=e.alpha-u)?360-Math.abs(r):r:r=e.alpha;var s={do:{alpha:t(r),beta:t(e.beta),gamma:t(e.gamma),absolute:d.isAbsolute()},dm:{x:t(a.x),y:t(a.y),z:t(a.z),gx:t(i.x),gy:t(i.y),gz:t(i.z),alpha:t(o.alpha),beta:t(o.beta),gamma:t(o.gamma)}};return A&&(s.dm.gx*=h,s.dm.gy*=h,s.dm.gz*=h),s}function a(t){b&&("string"==typeof t&&(t={message:t,code:0}),b(t))}var n="game",i="world",o="deviceorientation",r="acceleration",s="accelerationinludinggravity",c="rotationrate",l=null,u=0,h=0,m=!1,v=!1,d=null,p=null,y=50,A=!0,f=n,g=2,b=null,x=!1,M=function(t){};return M.GAME=n,M.WORLD=i,M.DEVICE_ORIENTATION=o,M.ACCELERATION=r,M.ACCELERATION_INCLUDING_GRAVITY=s,M.ROTATION_RATE=c,M.prototype.init=function(t){t&&t.frequency&&(y=t.frequency),t&&t.gravityNormalized&&(A=t.gravityNormalized),t&&t.orientationBase&&(f=t.orientationBase),t&&"number"==typeof t.decimalCount&&t.decimalCount>=0&&(g=parseInt(t.decimalCount)),t&&t.logger&&(b=t.logger),t&&t.screenAdjusted&&(x=t.screenAdjusted);var e=new FULLTILT.getDeviceOrientation({type:f}).then(function(t){d=t}),a=(new FULLTILT.getDeviceMotion).then(function(t){h=(p=t).getScreenAdjustedAccelerationIncludingGravity().z>0?-1:1});return Promise.all([e,a]).then(function(){v=!0})},M.prototype.end=function(){try{v=!1,this.stop(),p.stop(),d.stop()}catch(t){a(t)}},M.prototype.start=function(t){return v?(l=setInterval(function(){t(e())},y),void(m=!0)):void a({message:'GyroNorm is not initialized yet. First call the "init()" function.',code:1})},M.prototype.stop=function(){l&&(clearInterval(l),m=!1)},M.prototype.normalizeGravity=function(t){A=!!t},M.prototype.setHeadDirection=function(){return!x&&f!==i&&(u=d.getFixedFrameEuler().alpha,!0)},M.prototype.startLogging=function(t){t&&(b=t)},M.prototype.stopLogging=function(){b=null},M.prototype.isAvailable=function(t){var e=d.getScreenAdjustedEuler(),a=p.getScreenAdjustedAcceleration(),n=p.getScreenAdjustedAccelerationIncludingGravity(),i=p.getScreenAdjustedRotationRate();switch(t){case o:return e.alpha&&null!==e.alpha&&e.beta&&null!==e.beta&&e.gamma&&null!==e.gamma;case r:return a&&a.x&&a.y&&a.z;case s:return n&&n.x&&n.y&&n.z;case c:return i&&i.alpha&&i.beta&&i.gamma;default:return{deviceOrientationAvailable:e.alpha&&null!==e.alpha&&e.beta&&null!==e.beta&&e.gamma&&null!==e.gamma,accelerationAvailable:a&&a.x&&a.y&&a.z,accelerationIncludingGravityAvailable:n&&n.x&&n.y&&n.z,rotationRateAvailable:i&&i.alpha&&i.beta&&i.gamma}}},M.prototype.isRunning=function(){return m},M}()};"function"==typeof t&&t.amd?t(function(){return i}):"object"==("undefined"==typeof module?"undefined":e(module))&&module.exports?module.exports=i:a.GyroNorm=i.GyroNorm}(this); },{}],"Vw9u":[function(require,module,exports) { "use strict";var t=r(require("./shaders/fragment.glsl")),e=r(require("./shaders/vertex.glsl")),i=r(require("./lib/gyronorm"));function r(t){return t&&t.__esModule?t:{default:t}}function s(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,r)}return i}function h(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?s(Object(i),!0).forEach(function(e){n(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,i){return e&&o(t.prototype,e),i&&o(t,i),t}!function(r){var s="liquidFake3d",n={imageOriginal:"",imageDepth:"",vth:35,hth:35},o=new i.default.GyroNorm,l=function(){function i(t,e){a(this,i),this.element=t,this.options=r.extend({},n,e),this._defaults=n,this._name=s,this.canvas=document.createElement("canvas"),this.element.appendChild(this.canvas),this.gl=this.canvas.getContext("webgl"),this.ratio=window.devicePixelRatio,this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.mouseX=0,this.mouseY=0,this.mouseTargetX=0,this.mouseTargetY=0,this.imageURLs=[this.options.imageOriginal,this.options.imageDepth],this.textures=[],this.startTime=(new Date).getTime(),this.createScene(),this.addTexture(),this.mouseMove(),this.gyro()}return u(i,[{key:"addShader",value:function(t,e){var i=this.gl.createShader(e);if(this.gl.shaderSource(i,t),this.gl.compileShader(i),!this.gl.getShaderParameter(i,this.gl.COMPILE_STATUS))throw new Error("Shader compile error: "+this.gl.getShaderInfoLog(i));this.gl.attachShader(this.program,i)}},{key:"resizeHandler",value:function(){var t,e;this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.canvas.width=this.width*this.ratio,this.canvas.height=this.height*this.ratio,this.canvas.style.width=this.width+"px",this.canvas.style.height=this.height+"px",this.height/this.width<this.imageAspect?(t=1,e=this.height/this.width/this.imageAspect):(t=this.width/this.height*this.imageAspect,e=1),this.uResolution.set(this.width,this.height,t,e),this.uRatio.set(1/this.ratio),this.uThreshold.set(this.options.hth,this.options.vth),this.gl.viewport(0,0,this.width*this.ratio,this.height*this.ratio)}},{key:"resize",value:function(){this.resizeHandler(),window.addEventListener("resize",this.resizeHandler.bind(this))}},{key:"createScene",value:function(){this.program=this.gl.createProgram(),this.addShader(e.default,this.gl.VERTEX_SHADER),this.addShader(t.default,this.gl.FRAGMENT_SHADER),this.gl.linkProgram(this.program),this.gl.useProgram(this.program),this.uResolution=new d("resolution","4f",this.program,this.gl),this.uMouse=new d("mouse","2f",this.program,this.gl),this.uTime=new d("time","1f",this.program,this.gl),this.uRatio=new d("pixelRatio","1f",this.program,this.gl),this.uThreshold=new d("threshold","2f",this.program,this.gl),this.billboard=new c(this.gl),this.positionLocation=this.gl.getAttribLocation(this.program,"a_position"),this.gl.enableVertexAttribArray(this.positionLocation),this.gl.vertexAttribPointer(this.positionLocation,2,this.gl.FLOAT,!1,0,0)}},{key:"addTexture",value:function(){!function(t,e){for(var i=[],r=t.length,s=function(){0===--r&&e(i)},h=0;h<r;++h){var n=g(t[h],s);i.push(n)}}(this.imageURLs,this.start.bind(this))}},{key:"start",value:function(t){var e=this.gl;this.imageAspect=t[0].naturalHeight/t[0].naturalWidth;for(var i=0;i<t.length;i++){var r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t[i]),this.textures.push(r)}var s=this.gl.getUniformLocation(this.program,"image0"),h=this.gl.getUniformLocation(this.program,"image1");this.gl.uniform1i(s,0),this.gl.uniform1i(h,1),this.gl.activeTexture(this.gl.TEXTURE0),this.gl.bindTexture(this.gl.TEXTURE_2D,this.textures[0]),this.gl.activeTexture(this.gl.TEXTURE1),this.gl.bindTexture(this.gl.TEXTURE_2D,this.textures[1]),this.resize(),this.render()}},{key:"gyro",value:function(){var t=this;this.maxTilt=15,o.init({gravityNormalized:!0}).then(function(){o.start(function(e){var i=e.do.gamma,r=e.do.beta;t.mouseTargetY=m(r,-t.maxTilt,t.maxTilt)/t.maxTilt,t.mouseTargetX=-m(i,-t.maxTilt,t.maxTilt)/t.maxTilt})}).catch(function(t){console.log("not supported")})}},{key:"mouseMove",value:function(){var t=this;document.addEventListener("mousemove",function(e){var i=t.windowWidth/2,r=t.windowHeight/2;t.mouseTargetX=(i-e.clientX)/i,t.mouseTargetY=(r-e.clientY)/r})}},{key:"render",value:function(){var t=((new Date).getTime()-this.startTime)/1e3;this.uTime.set(t),this.mouseX+=.05*(this.mouseTargetX-this.mouseX),this.mouseY+=.05*(this.mouseTargetY-this.mouseY),this.uMouse.set(this.mouseX,this.mouseY),this.billboard.render(this.gl),requestAnimationFrame(this.render.bind(this))}}]),i}();function g(t,e){var i=new Image;return i.src=t,i.onload=e,i}function d(t,e,i,r){this.name=t,this.suffix=e,this.gl=r,this.program=i,this.location=r.getUniformLocation(i,t)}function c(t){var e=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,e),t.bufferData(t.ARRAY_BUFFER,c.verts,t.STATIC_DRAW)}function m(t,e,i){return t==t&&(void 0!==i&&(t=t<=i?t:i),void 0!==e&&(t=t>=e?t:e)),t}d.prototype.set=function(){for(var t="uniform"+this.suffix,e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];var s=[this.location].concat(i);this.gl[t].apply(this.gl,s)},c.verts=new Float32Array([-1,-1,1,-1,-1,1,1,1]),c.prototype.render=function(t){t.drawArrays(t.TRIANGLE_STRIP,0,4)},r.fn[s]=function(t){return this.each(function(){var e=h(h({},r(this).data("fake3d-options")),t);r.data(this,"plugin_"+s)||r.data(this,"plugin_"+s,new l(this,e))})}}(jQuery),jQuery(document).ready(function(t){window.innerWidth<769||t("[data-lqd-fake3d]").liquidFake3d()}); },{"./shaders/fragment.glsl":"k6p3","./shaders/vertex.glsl":"hNHB","./lib/gyronorm":"yZzk"}]},{},["Vw9u"], null)