|
@@ -95,7 +95,7 @@ c).name;a[d]=e.getAttribLocation(u,d)}A=a}return A};this.destroy=function(){d.re
|
|
|
b=a.texture.encoding);else var b=3E3;return b}var f=[],g=c.isWebGL2,h=c.logarithmicDepthBuffer,l=c.floatVertexTextures,n=c.maxVertexUniforms,q=c.vertexTextures,p=c.precision,k={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",
|
|
|
PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},r="precision isWebGL2 supportsVertexTextures outputEncoding instancing map mapEncoding matcap matcapEncoding envMap envMapMode envMapEncoding envMapCubeUV lightMap lightMapEncoding aoMap emissiveMap emissiveMapEncoding bumpMap normalMap objectSpaceNormalMap tangentSpaceNormalMap clearcoatMap clearcoatRoughnessMap clearcoatNormalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap combine vertexColors vertexTangents vertexUvs uvsVertexOnly fog useFog fogExp2 flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights numRectAreaLights numDirLightShadows numPointLightShadows numSpotLightShadows shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes numClipIntersection depthPacking dithering sheen transmissionMap".split(" ");
|
|
|
return{getParameters:function(d,f,v,r,m,ya,W){var t=r.fog;r=d.isMeshStandardMaterial?r.environment:null;r=d.envMap||r;var u=k[d.type];if(W.isSkinnedMesh){var z=W.skeleton.bones;if(l)z=1024;else{var x=Math.min(Math.floor((n-20)/4),z.length);x<z.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+z.length+" bones. This GPU supports "+x+"."),z=0):z=x}}else z=0;null!==d.precision&&(p=c.getMaxPrecision(d.precision),p!==d.precision&&console.warn("THREE.WebGLProgram.getParameters:",d.precision,"not supported, using",
|
|
|
-p,"instead."));if(u){var E=Va[u];x=E.vertexShader;E=E.fragmentShader}else x=d.vertexShader,E=d.fragmentShader;var A=a.getRenderTarget();return{isWebGL2:g,shaderID:u,shaderName:d.name||d.type,vertexShader:x,fragmentShader:E,defines:d.defines,isRawShaderMaterial:d.isRawShaderMaterial,isShaderMaterial:d.isShaderMaterial,precision:p,instancing:!0===W.isInstancedMesh,supportsVertexTextures:q,outputEncoding:null!==A?e(A.texture):a.outputEncoding,map:!!d.map,mapEncoding:e(d.map),matcap:!!d.matcap,matcapEncoding:e(d.matcap),
|
|
|
+p,"instead."));if(u){var E=Va[u];x=E.vertexShader;E=E.fragmentShader}else x=d.vertexShader,E=d.fragmentShader;var A=a.getRenderTarget();return{isWebGL2:g,shaderID:u,shaderName:d.type,vertexShader:x,fragmentShader:E,defines:d.defines,isRawShaderMaterial:d.isRawShaderMaterial,isShaderMaterial:d.isShaderMaterial,precision:p,instancing:!0===W.isInstancedMesh,supportsVertexTextures:q,outputEncoding:null!==A?e(A.texture):a.outputEncoding,map:!!d.map,mapEncoding:e(d.map),matcap:!!d.matcap,matcapEncoding:e(d.matcap),
|
|
|
envMap:!!r,envMapMode:r&&r.mapping,envMapEncoding:e(r),envMapCubeUV:!!r&&(306===r.mapping||307===r.mapping),lightMap:!!d.lightMap,lightMapEncoding:e(d.lightMap),aoMap:!!d.aoMap,emissiveMap:!!d.emissiveMap,emissiveMapEncoding:e(d.emissiveMap),bumpMap:!!d.bumpMap,normalMap:!!d.normalMap,objectSpaceNormalMap:1===d.normalMapType,tangentSpaceNormalMap:0===d.normalMapType,clearcoatMap:!!d.clearcoatMap,clearcoatRoughnessMap:!!d.clearcoatRoughnessMap,clearcoatNormalMap:!!d.clearcoatNormalMap,displacementMap:!!d.displacementMap,
|
|
|
roughnessMap:!!d.roughnessMap,metalnessMap:!!d.metalnessMap,specularMap:!!d.specularMap,alphaMap:!!d.alphaMap,gradientMap:!!d.gradientMap,sheen:!!d.sheen,transmissionMap:!!d.transmissionMap,combine:d.combine,vertexTangents:d.normalMap&&d.vertexTangents,vertexColors:d.vertexColors,vertexUvs:!!d.map||!!d.bumpMap||!!d.normalMap||!!d.specularMap||!!d.alphaMap||!!d.emissiveMap||!!d.roughnessMap||!!d.metalnessMap||!!d.clearcoatMap||!!d.clearcoatRoughnessMap||!!d.clearcoatNormalMap||!!d.displacementMap||
|
|
|
!!d.transmissionMap,uvsVertexOnly:!(d.map||d.bumpMap||d.normalMap||d.specularMap||d.alphaMap||d.emissiveMap||d.roughnessMap||d.metalnessMap||d.clearcoatNormalMap||d.transmissionMap)&&!!d.displacementMap,fog:!!t,useFog:d.fog,fogExp2:t&&t.isFogExp2,flatShading:d.flatShading,sizeAttenuation:d.sizeAttenuation,logarithmicDepthBuffer:h,skinning:d.skinning&&0<z,maxBones:z,useVertexTexture:l,morphTargets:d.morphTargets,morphNormals:d.morphNormals,maxMorphTargets:a.maxMorphTargets,maxMorphNormals:a.maxMorphNormals,
|
|
@@ -400,9 +400,9 @@ conjugate:function(){this._x*=-1;this._y*=-1;this._z*=-1;this._onChangeCallback(
|
|
|
this._onChangeCallback();return this},multiply:function(a,b){return void 0!==b?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(a,b)):this.multiplyQuaternions(this,a)},premultiply:function(a){return this.multiplyQuaternions(a,this)},multiplyQuaternions:function(a,b){var c=a._x,d=a._y,e=a._z;a=a._w;var f=b._x,g=b._y,h=b._z;b=b._w;this._x=c*b+a*f+d*h-e*g;this._y=d*b+a*g+e*f-c*h;this._z=e*b+a*h+c*g-d*f;this._w=
|
|
|
a*b-c*f-d*g-e*h;this._onChangeCallback();return this},slerp:function(a,b){if(0===b)return this;if(1===b)return this.copy(a);var c=this._x,d=this._y,e=this._z,f=this._w,g=f*a._w+c*a._x+d*a._y+e*a._z;0>g?(this._w=-a._w,this._x=-a._x,this._y=-a._y,this._z=-a._z,g=-g):this.copy(a);if(1<=g)return this._w=f,this._x=c,this._y=d,this._z=e,this;a=1-g*g;if(a<=Number.EPSILON)return g=1-b,this._w=g*f+b*this._w,this._x=g*c+b*this._x,this._y=g*d+b*this._y,this._z=g*e+b*this._z,this.normalize(),this._onChangeCallback(),
|
|
|
this;a=Math.sqrt(a);var h=Math.atan2(a,g);g=Math.sin((1-b)*h)/a;b=Math.sin(b*h)/a;this._w=f*g+this._w*b;this._x=c*g+this._x*b;this._y=d*g+this._y*b;this._z=e*g+this._z*b;this._onChangeCallback();return this},equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,b){void 0===b&&(b=0);this._x=a[b];this._y=a[b+1];this._z=a[b+2];this._w=a[b+3];this._onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;
|
|
|
-a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._w;return a},fromBufferAttribute:function(a,b){this._x=a.getX(b);this._y=a.getY(b);this._z=a.getZ(b);this._w=a.getW(b);return this},_onChange:function(a){this._onChangeCallback=a;return this},_onChangeCallback:function(){}});var Vg=new m,ti=new S;Object.assign(m.prototype,{isVector3:!0,set:function(a,b,c){this.x=a;this.y=b;this.z=c;return this},setScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=
|
|
|
-a;return this},setZ:function(a){this.z=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this},
|
|
|
-add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),
|
|
|
+a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._w;return a},fromBufferAttribute:function(a,b){this._x=a.getX(b);this._y=a.getY(b);this._z=a.getZ(b);this._w=a.getW(b);return this},_onChange:function(a){this._onChangeCallback=a;return this},_onChangeCallback:function(){}});var Vg=new m,ti=new S;Object.assign(m.prototype,{isVector3:!0,set:function(a,b,c){void 0===c&&(c=this.z);this.x=a;this.y=b;this.z=c;return this},setScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},
|
|
|
+setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(a){this.x=a.x;this.y=a.y;
|
|
|
+this.z=a.z;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),
|
|
|
this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this},multiply:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(a,b);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=
|
|
|
a;return this},multiplyVectors:function(a,b){this.x=a.x*b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this},applyEuler:function(a){a&&a.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");return this.applyQuaternion(ti.setFromEuler(a))},applyAxisAngle:function(a,b){return this.applyQuaternion(ti.setFromAxisAngle(a,b))},applyMatrix3:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[3]*c+a[6]*d;this.y=a[1]*b+a[4]*c+a[7]*
|
|
|
d;this.z=a[2]*b+a[5]*c+a[8]*d;return this},applyNormalMatrix:function(a){return this.applyMatrix3(a).normalize()},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;var e=1/(a[3]*b+a[7]*c+a[11]*d+a[15]);this.x=(a[0]*b+a[4]*c+a[8]*d+a[12])*e;this.y=(a[1]*b+a[5]*c+a[9]*d+a[13])*e;this.z=(a[2]*b+a[6]*c+a[10]*d+a[14])*e;return this},applyQuaternion:function(a){var b=this.x,c=this.y,d=this.z,e=a.x,f=a.y,g=a.z;a=a.w;var h=a*b+f*d-g*c,l=a*c+g*b-e*d,n=a*d+e*c-f*b;b=-e*b-f*c-g*d;this.x=h*
|