mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-12-01 14:21:52 +00:00
2 lines
644 KiB
JavaScript
2 lines
644 KiB
JavaScript
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.CV=t.CV||{})}(this,function(t){"use strict";function e(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function r(t,e,r,n){this._x=t||0,this._y=e||0,this._z=r||0,this._w=void 0!==n?n:1}function n(t,e,r){this.x=t||0,this.y=e||0,this.z=r||0}function i(t){if(void 0!==t){var e;for(e in t)Bs.set(e,t[e])}}function a(t,e){return Bs.has(t)?Bs.get(t):e}function o(t,e){return t.split(".").shift()+"."+e}function s(){}function c(t,e,r){return void 0===e&&void 0===r?this.set(t):this.setRGB(t,e,r)}function l(){}function h(t,e){this.x=t||0,this.y=e||0}function u(t,e,r,n,i,a,o,s,c,l){Object.defineProperty(this,"id",{value:Wl++}),this.uuid=Ko.generateUUID(),this.name="",this.image=void 0!==t?t:u.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:u.DEFAULT_MAPPING,this.wrapS=void 0!==r?r:Zc,this.wrapT=void 0!==n?n:Zc,this.magFilter=void 0!==i?i:tl,this.minFilter=void 0!==a?a:rl,this.anisotropy=void 0!==c?c:1,this.format=void 0!==o?o:vl,this.type=void 0!==s?s:nl,this.offset=new h(0,0),this.repeat=new h(1,1),this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==l?l:Ul,this.version=0,this.onUpdate=null}function d(t,e,r,n,i,a,o,s,c,l,h,d){u.call(this,null,a,o,s,c,l,n,i,h,d),this.image={data:t,width:e,height:r},this.magFilter=void 0!==c?c:Qc,this.minFilter=void 0!==l?l:Qc,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function p(t){for(var e=t.length,r=new Uint8Array(3*e),n=0;n<e;){var i=t[e-++n],a=3*n;r[a]=i[0],r[a+1]=i[1],r[a+2]=i[2]}var o=new d(r,e,1,gl,nl);return o.needsUpdate=!0,o}function f(t){for(var e,r=[],n=0,i=t.length;n<i;n++)e=t[n],r[n]=new c(e[0]/255,e[1]/255,e[2]/255);return r}function m(t,e,r){var n=Xl[t],i=n[r];if(void 0===i){var a=ks[r];void 0===a&&console.error("unknown colour scale requested "+r),i=e(a),n[r]=i}return i}function g(t){return m("texture",p,t)}function v(t){return m("colors",f,t)}function y(t,e,r,n){this.x=t||0,this.y=e||0,this.z=r||0,this.w=void 0!==n?n:1}function x(t,e,r){this.uuid=Ko.generateUUID(),this.width=t,this.height=e,this.scissor=new y(0,0,t,e),this.scissorTest=!1,this.viewport=new y(0,0,t,e),void 0===(r=r||{}).minFilter&&(r.minFilter=tl),this.texture=new u(void 0,void 0,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),this.depthBuffer=void 0===r.depthBuffer||r.depthBuffer,this.stencilBuffer=void 0===r.stencilBuffer||r.stencilBuffer,this.depthTexture=void 0!==r.depthTexture?r.depthTexture:null}function b(t,e,r,n,i,a,o,s,c,l){t=void 0!==t?t:[],e=void 0!==e?e:Gc,u.call(this,t,e,r,n,i,a,o,s,c,l),this.flipY=!1}function w(){this.seq=[],this.map={}}function _(t,e,r){var n=t[0];if(n<=0||n>0)return t;var i=e*r,a=Jl[i];if(void 0===a&&(a=new Float32Array(i),Jl[i]=a),0!==e){n.toArray(a,0);for(var o=1,s=0;o!==e;++o)s+=r,t[o].toArray(a,s)}return a}function M(t,e){var r=Ql[e];void 0===r&&(r=new Int32Array(e),Ql[e]=r);for(var n=0;n!==e;++n)r[n]=t.allocTextureUnit();return r}function E(t,e){t.uniform1f(this.addr,e)}function S(t,e){t.uniform1i(this.addr,e)}function T(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function A(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function L(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function C(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function R(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):($l.set(e.elements),t.uniformMatrix3fv(this.addr,!1,$l))}function P(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Kl.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Kl))}function I(t,e,r){var n=r.allocTextureUnit();t.uniform1i(this.addr,n),r.setTexture2D(e||ql,n)}function O(t,e,r){var n=r.allocTextureUnit();t.uniform1i(this.addr,n),r.setTextureCube
|