|
@@ -322,19 +322,19 @@ d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=t
|
|
|
return this.Points}}})}function ki(a,b){return a.distance-b.distance}function Kg(a,b,c,d){a.layers.test(b.layers)&&a.raycast(b,c);if(!0===d){a=a.children;d=0;for(var e=a.length;d<e;d++)Kg(a[d],b,c,!0)}}function li(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function mi(a,b,c){this.radius=void 0!==a?a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function Lg(a,b){this.min=void 0!==a?a:new t(Infinity,Infinity);this.max=void 0!==b?b:
|
|
|
new t(-Infinity,-Infinity)}function Mg(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function oe(a){F.call(this);this.material=a;this.render=function(){}}function gd(a,b){F.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new C;b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),
|
|
|
1)}a.setAttribute("position",new y(b,3));b=new ca({fog:!1,toneMapped:!1});this.cone=new la(a,b);this.add(this.cone);this.update()}function ni(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,ni(a.children[c]));return b}function oc(a){for(var b=ni(a),c=new C,d=[],e=[],f=new A(0,0,1),g=new A(0,1,0),h=0;h<b.length;h++){var l=b[h];l.parent&&l.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,g.g,g.b))}c.setAttribute("position",new y(d,3));
|
|
|
-c.setAttribute("color",new y(e,3));d=new ca({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});la.call(this,c,d);this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1}function hd(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new dc(b,4,2);b=new Na({wireframe:!0,fog:!1,toneMapped:!1});ja.call(this,a,b);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function id(a,b,c){F.call(this);this.light=a;this.light.updateMatrixWorld();
|
|
|
-this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new $b(b);a.rotateY(.5*Math.PI);this.material=new Na({wireframe:!0,fog:!1,toneMapped:!1});void 0===this.color&&(this.material.vertexColors=!0);b=a.getAttribute("position");b=new Float32Array(3*b.count);a.setAttribute("color",new M(b,3));this.add(new ja(a,this.material));this.update()}function tf(a,b,c,d){a=a||10;b=b||10;c=new A(void 0!==c?c:4473924);d=new A(void 0!==d?d:8947848);var e=b/2,f=a/b,g=a/2;a=[];for(var h=[],l=0,m=0,k=-g;l<=
|
|
|
-b;l++,k+=f){a.push(-g,0,k,g,0,k);a.push(k,0,-g,k,0,g);var p=l===e?c:d;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3}b=new C;b.setAttribute("position",new y(a,3));b.setAttribute("color",new y(h,3));c=new ca({vertexColors:!0,toneMapped:!1});la.call(this,b,c)}function uf(a,b,c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new A(void 0!==e?e:4473924);f=new A(void 0!==f?f:8947848);var g=[],h=[],l;for(l=0;l<=b;l++){var m=l/b*2*Math.PI;var k=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,
|
|
|
-0,0);g.push(k,0,m);var p=l&1?e:f;h.push(p.r,p.g,p.b);h.push(p.r,p.g,p.b)}for(l=0;l<=c;l++){p=l&1?e:f;var n=a-a/c*l;for(b=0;b<d;b++)m=b/d*2*Math.PI,k=Math.sin(m)*n,m=Math.cos(m)*n,g.push(k,0,m),h.push(p.r,p.g,p.b),m=(b+1)/d*2*Math.PI,k=Math.sin(m)*n,m=Math.cos(m)*n,g.push(k,0,m),h.push(p.r,p.g,p.b)}a=new C;a.setAttribute("position",new y(g,3));a.setAttribute("color",new y(h,3));g=new ca({vertexColors:!0,toneMapped:!1});la.call(this,a,g)}function jd(a,b,c){F.call(this);this.light=a;this.light.updateMatrixWorld();
|
|
|
-this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;void 0===b&&(b=1);a=new C;a.setAttribute("position",new y([-b,b,0,b,b,0,b,-b,0,-b,-b,0,-b,b,0],3));b=new ca({fog:!1,toneMapped:!1});this.lightPlane=new Ja(a,b);this.add(this.lightPlane);a=new C;a.setAttribute("position",new y([0,0,0,0,0,1],3));this.targetLine=new Ja(a,b);this.add(this.targetLine);this.update()}function pe(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,b.b);void 0===h[a]&&(h[a]=[]);h[a].push(f.length/
|
|
|
-3-1)}var d=new C,e=new ca({color:16777215,vertexColors:!0,toneMapped:!1}),f=[],g=[],h={},l=new A(16755200),m=new A(16711680),k=new A(43775),p=new A(16777215),n=new A(3355443);b("n1","n2",l);b("n2","n4",l);b("n4","n3",l);b("n3","n1",l);b("f1","f2",l);b("f2","f4",l);b("f4","f3",l);b("f3","f1",l);b("n1","f1",l);b("n2","f2",l);b("n3","f3",l);b("n4","f4",l);b("p","n1",m);b("p","n2",m);b("p","n3",m);b("p","n4",m);b("u1","u2",k);b("u2","u3",k);b("u3","u1",k);b("c","t",p);b("p","c",n);b("cn1","cn2",n);b("cn3",
|
|
|
-"cn4",n);b("cf1","cf2",n);b("cf3","cf4",n);d.setAttribute("position",new y(f,3));d.setAttribute("color",new y(g,3));la.call(this,d,e);this.camera=a;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=h;this.update()}function ka(a,b,c,d,e,f,g){vf.set(e,f,g).unproject(d);a=b[a];if(void 0!==a)for(c=c.getAttribute("position"),b=0,d=a.length;b<d;b++)c.setXYZ(a[b],vf.x,vf.y,vf.z)}function vb(a,b){this.object=a;void 0===
|
|
|
-b&&(b=16776960);a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new Float32Array(24),d=new C;d.setIndex(new M(a,1));d.setAttribute("position",new M(c,3));la.call(this,d,new ca({color:b,toneMapped:!1}));this.matrixAutoUpdate=!1;this.update()}function qe(a,b){this.type="Box3Helper";this.box=a;b=b||16776960;a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new C;c.setIndex(new M(a,1));c.setAttribute("position",new y([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,
|
|
|
--1,-1,1,-1,-1,-1,-1,1,-1,-1],3));la.call(this,c,new ca({color:b,toneMapped:!1}));this.geometry.computeBoundingSphere()}function re(a,b,c){this.type="PlaneHelper";this.plane=a;this.size=void 0===b?1:b;a=void 0!==c?c:16776960;b=new C;b.setAttribute("position",new y([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3));b.computeBoundingSphere();Ja.call(this,b,new ca({color:a,toneMapped:!1}));b=new C;b.setAttribute("position",new y([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();
|
|
|
-this.add(new ja(b,new Na({color:a,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}function wb(a,b,c,d,e,f){F.call(this);void 0===a&&(a=new n(0,0,1));void 0===b&&(b=new n(0,0,0));void 0===c&&(c=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*c);void 0===f&&(f=.2*e);void 0===wf&&(wf=new C,wf.setAttribute("position",new y([0,0,0,0,1,0],3)),Ng=new sb(0,.5,1,5,1),Ng.translate(0,-.5,0));this.position.copy(b);this.line=new Ja(wf,new ca({color:d,toneMapped:!1}));this.line.matrixAutoUpdate=!1;this.add(this.line);
|
|
|
-this.cone=new ja(Ng,new Na({color:d,toneMapped:!1}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c,e,f)}function se(a){a=a||1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new C;a.setAttribute("position",new y(b,3));a.setAttribute("color",new y([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new ca({vertexColors:!0,toneMapped:!1});la.call(this,a,b)}function Og(a){this._renderer=a;this._pingPongRenderTarget=null;a=new Float32Array(20);var b=new n(0,1,0);a=new tb({defines:{n:20},
|
|
|
-uniforms:{envMap:{value:null},samples:{value:1},weights:{value:a},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:b},inputEncoding:{value:jb[3E3]},outputEncoding:{value:jb[3E3]}},vertexShader:Pg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n"+Qg()+
|
|
|
-"\n\n#define ENVMAP_TYPE_CUBE_UV\n#include <cube_uv_reflection_fragment>\n\nvec3 getSample(float theta, vec3 axis) {\n\tfloat cosTheta = cos(theta);\n\t// Rodrigues' axis-angle rotation\n\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\treturn bilinearCubeUV(envMap, sampleDirection, mipInt);\n}\n\nvoid main() {\n\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\tif (all(equal(axis, vec3(0.0))))\n\t\taxis = vec3(vOutputDirection.z, 0.0, - vOutputDirection.x);\n\taxis = normalize(axis);\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb += weights[0] * getSample(0.0, axis);\n\tfor (int i = 1; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfloat theta = dTheta * float(i);\n\t\tgl_FragColor.rgb += weights[i] * getSample(-1.0 * theta, axis);\n\t\tgl_FragColor.rgb += weights[i] * getSample(theta, axis);\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
|
+c.setAttribute("color",new y(e,3));d=new ca({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});la.call(this,c,d);this.type="SkeletonHelper";this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1}function hd(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new dc(b,4,2);b=new Na({wireframe:!0,fog:!1,toneMapped:!1});ja.call(this,a,b);this.type="PointLightHelper";this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function id(a,
|
|
|
+b,c){F.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new $b(b);a.rotateY(.5*Math.PI);this.material=new Na({wireframe:!0,fog:!1,toneMapped:!1});void 0===this.color&&(this.material.vertexColors=!0);b=a.getAttribute("position");b=new Float32Array(3*b.count);a.setAttribute("color",new M(b,3));this.add(new ja(a,this.material));this.update()}function tf(a,b,c,d){a=a||10;b=b||10;c=new A(void 0!==c?c:4473924);d=new A(void 0!==d?d:
|
|
|
+8947848);var e=b/2,f=a/b,g=a/2;a=[];for(var h=[],l=0,m=0,k=-g;l<=b;l++,k+=f){a.push(-g,0,k,g,0,k);a.push(k,0,-g,k,0,g);var p=l===e?c:d;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3;p.toArray(h,m);m+=3}b=new C;b.setAttribute("position",new y(a,3));b.setAttribute("color",new y(h,3));c=new ca({vertexColors:!0,toneMapped:!1});la.call(this,b,c);this.type="GridHelper"}function uf(a,b,c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new A(void 0!==e?e:4473924);f=new A(void 0!==f?f:8947848);var g=
|
|
|
+[],h=[],l;for(l=0;l<=b;l++){var m=l/b*2*Math.PI;var k=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,0,0);g.push(k,0,m);var p=l&1?e:f;h.push(p.r,p.g,p.b);h.push(p.r,p.g,p.b)}for(l=0;l<=c;l++){p=l&1?e:f;var n=a-a/c*l;for(b=0;b<d;b++)m=b/d*2*Math.PI,k=Math.sin(m)*n,m=Math.cos(m)*n,g.push(k,0,m),h.push(p.r,p.g,p.b),m=(b+1)/d*2*Math.PI,k=Math.sin(m)*n,m=Math.cos(m)*n,g.push(k,0,m),h.push(p.r,p.g,p.b)}a=new C;a.setAttribute("position",new y(g,3));a.setAttribute("color",new y(h,3));g=new ca({vertexColors:!0,toneMapped:!1});
|
|
|
+la.call(this,a,g);this.type="PolarGridHelper"}function jd(a,b,c){F.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;void 0===b&&(b=1);a=new C;a.setAttribute("position",new y([-b,b,0,b,b,0,b,-b,0,-b,-b,0,-b,b,0],3));b=new ca({fog:!1,toneMapped:!1});this.lightPlane=new Ja(a,b);this.add(this.lightPlane);a=new C;a.setAttribute("position",new y([0,0,0,0,0,1],3));this.targetLine=new Ja(a,b);this.add(this.targetLine);this.update()}function pe(a){function b(a,
|
|
|
+b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,b.b);void 0===h[a]&&(h[a]=[]);h[a].push(f.length/3-1)}var d=new C,e=new ca({color:16777215,vertexColors:!0,toneMapped:!1}),f=[],g=[],h={},l=new A(16755200),m=new A(16711680),k=new A(43775),p=new A(16777215),n=new A(3355443);b("n1","n2",l);b("n2","n4",l);b("n4","n3",l);b("n3","n1",l);b("f1","f2",l);b("f2","f4",l);b("f4","f3",l);b("f3","f1",l);b("n1","f1",l);b("n2","f2",l);b("n3","f3",l);b("n4","f4",l);b("p","n1",m);b("p","n2",m);b("p",
|
|
|
+"n3",m);b("p","n4",m);b("u1","u2",k);b("u2","u3",k);b("u3","u1",k);b("c","t",p);b("p","c",n);b("cn1","cn2",n);b("cn3","cn4",n);b("cf1","cf2",n);b("cf3","cf4",n);d.setAttribute("position",new y(f,3));d.setAttribute("color",new y(g,3));la.call(this,d,e);this.type="CameraHelper";this.camera=a;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=h;this.update()}function ka(a,b,c,d,e,f,g){vf.set(e,f,g).unproject(d);a=
|
|
|
+b[a];if(void 0!==a)for(c=c.getAttribute("position"),b=0,d=a.length;b<d;b++)c.setXYZ(a[b],vf.x,vf.y,vf.z)}function vb(a,b){this.object=a;void 0===b&&(b=16776960);a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new Float32Array(24),d=new C;d.setIndex(new M(a,1));d.setAttribute("position",new M(c,3));la.call(this,d,new ca({color:b,toneMapped:!1}));this.type="BoxHelper";this.matrixAutoUpdate=!1;this.update()}function qe(a,b){this.type="Box3Helper";this.box=a;b=b||16776960;a=
|
|
|
+new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new C;c.setIndex(new M(a,1));c.setAttribute("position",new y([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3));la.call(this,c,new ca({color:b,toneMapped:!1}));this.type="Box3Helper";this.geometry.computeBoundingSphere()}function re(a,b,c){this.plane=a;this.size=void 0===b?1:b;a=void 0!==c?c:16776960;b=new C;b.setAttribute("position",new y([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3));
|
|
|
+b.computeBoundingSphere();Ja.call(this,b,new ca({color:a,toneMapped:!1}));this.type="PlaneHelper";b=new C;b.setAttribute("position",new y([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();this.add(new ja(b,new Na({color:a,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}function wb(a,b,c,d,e,f){F.call(this);this.type="ArrowHelper";void 0===a&&(a=new n(0,0,1));void 0===b&&(b=new n(0,0,0));void 0===c&&(c=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*c);void 0===f&&(f=
|
|
|
+.2*e);void 0===wf&&(wf=new C,wf.setAttribute("position",new y([0,0,0,0,1,0],3)),Ng=new sb(0,.5,1,5,1),Ng.translate(0,-.5,0));this.position.copy(b);this.line=new Ja(wf,new ca({color:d,toneMapped:!1}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new ja(Ng,new Na({color:d,toneMapped:!1}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c,e,f)}function se(a){a=a||1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new C;a.setAttribute("position",new y(b,
|
|
|
+3));a.setAttribute("color",new y([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new ca({vertexColors:!0,toneMapped:!1});la.call(this,a,b);this.type="AxesHelper"}function Og(a){this._renderer=a;this._pingPongRenderTarget=null;a=new Float32Array(20);var b=new n(0,1,0);a=new tb({defines:{n:20},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:a},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:b},inputEncoding:{value:jb[3E3]},outputEncoding:{value:jb[3E3]}},vertexShader:Pg(),
|
|
|
+fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n"+Qg()+"\n\n#define ENVMAP_TYPE_CUBE_UV\n#include <cube_uv_reflection_fragment>\n\nvec3 getSample(float theta, vec3 axis) {\n\tfloat cosTheta = cos(theta);\n\t// Rodrigues' axis-angle rotation\n\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\treturn bilinearCubeUV(envMap, sampleDirection, mipInt);\n}\n\nvoid main() {\n\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\tif (all(equal(axis, vec3(0.0))))\n\t\taxis = vec3(vOutputDirection.z, 0.0, - vOutputDirection.x);\n\taxis = normalize(axis);\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb += weights[0] * getSample(0.0, axis);\n\tfor (int i = 1; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfloat theta = dTheta * float(i);\n\t\tgl_FragColor.rgb += weights[i] * getSample(-1.0 * theta, axis);\n\t\tgl_FragColor.rgb += weights[i] * getSample(theta, axis);\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
|
blending:0,depthTest:!1,depthWrite:!1});a.type="SphericalGaussianBlur";this._blurMaterial=a;this._cubemapShader=this._equirectShader=null;this._compileMaterial(this._blurMaterial)}function oi(a){a=new ya(3*kb,3*kb,a);a.texture.mapping=306;a.texture.name="PMREM.cubeUv";a.scissorTest=!0;return a}function Rg(a,b,c,d,e){a.viewport.set(b,c,d,e);a.scissor.set(b,c,d,e)}function pi(){var a=new t(1,1);a=new tb({uniforms:{envMap:{value:null},texelSize:{value:a},inputEncoding:{value:jb[3E3]},outputEncoding:{value:jb[3E3]}},
|
|
|
vertexShader:Pg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n"+Qg()+"\n\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tvec3 outputDirection = normalize(vOutputDirection);\n\tvec2 uv;\n\tuv.y = asin(clamp(outputDirection.y, -1.0, 1.0)) * RECIPROCAL_PI + 0.5;\n\tuv.x = atan(outputDirection.z, outputDirection.x) * RECIPROCAL_PI2 + 0.5;\n\tvec2 f = fract(uv / texelSize - 0.5);\n\tuv -= f * texelSize;\n\tvec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x += texelSize.x;\n\tvec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.y += texelSize.y;\n\tvec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x -= texelSize.x;\n\tvec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tvec3 tm = mix(tl, tr, f.x);\n\tvec3 bm = mix(bl, br, f.x);\n\tgl_FragColor.rgb = mix(tm, bm, f.y);\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
|
blending:0,depthTest:!1,depthWrite:!1});a.type="EquirectangularToCubeUV";return a}function qi(){var a=new tb({uniforms:{envMap:{value:null},inputEncoding:{value:jb[3E3]},outputEncoding:{value:jb[3E3]}},vertexShader:Pg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform samplerCube envMap;\n\n"+Qg()+"\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb = envMapTexelToLinear(textureCube(envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ))).rgb;\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|