Browse Source

Updated builds.

Mr.doob 4 years ago
parent
commit
d5c38a4b74
3 changed files with 6 additions and 6 deletions
  1. 2 2
      build/three.js
  2. 2 2
      build/three.min.js
  3. 2 2
      build/three.module.js

+ 2 - 2
build/three.js

@@ -18239,7 +18239,7 @@
 	// Unroll Loops
 
 	var deprecatedUnrollLoopPattern = /#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;
-	var unrollLoopPattern = /#pragma unroll_loop_start[\s]+?for\s*\(\s*int i \= (\d+)\; i < (\d+)\; i\s*\+\+\s*\)\s*{([\s\S]+?)(?=\})\}[\s]+?#pragma unroll_loop_end/g;
+	var unrollLoopPattern = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;
 
 	function unrollLoops( string ) {
 
@@ -18263,7 +18263,7 @@
 		for ( var i = parseInt( start ); i < parseInt( end ); i ++ ) {
 
 			string += snippet
-				.replace( /\[ i \]/g, '[ ' + i + ' ]' )
+				.replace( /\[\s*i\s*\]/g, '[ ' + i + ' ]' )
 				.replace( /UNROLLED_LOOP_INDEX/g, i );
 
 		}

+ 2 - 2
build/three.min.js

@@ -72,7 +72,7 @@ h.map[e.id]=e;break}else p=g.map[n],void 0===p&&(p=new Hi(n),n=g,g=p,n.seq.push(
 case 3003:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",c),["Linear","( value )"]}}function Ki(c,a,b){var d=c.getShaderParameter(a,35713),e=c.getShaderInfoLog(a).trim();if(d&&""===e)return"";c=c.getShaderSource(a).split("\n");for(a=0;a<c.length;a++)c[a]=a+1+": "+c[a];c=c.join("\n");return"THREE.WebGLShader: gl.getShaderInfoLog() "+b+"\n"+e+c}function Ke(c,a){a=Ji(a);return"vec4 "+c+"( vec4 value ) { return "+a[0]+"ToLinear"+a[1]+"; }"}function il(c,
 a){a=Ji(a);return"vec4 "+c+"( vec4 value ) { return LinearTo"+a[0]+a[1]+"; }"}function jl(c,a){switch(a){case 1:a="Linear";break;case 2:a="Reinhard";break;case 3:a="OptimizedCineon";break;case 4:a="ACESFilmic";break;case 5:a="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",a),a="Linear"}return"vec3 "+c+"( vec3 color ) { return "+a+"ToneMapping( color ); }"}function kl(c){var a=[],b;for(b in c){var d=c[b];!1!==d&&a.push("#define "+b+" "+d)}return a.join("\n")}function Le(c){return""!==
 c}function Li(c,a){return c.replace(/NUM_DIR_LIGHTS/g,a.numDirLights).replace(/NUM_SPOT_LIGHTS/g,a.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,a.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,a.numPointLights).replace(/NUM_HEMI_LIGHTS/g,a.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,a.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,a.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,a.numPointLightShadows)}function Mi(c,a){return c.replace(/NUM_CLIPPING_PLANES/g,a.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,
-a.numClippingPlanes-a.numClipIntersection)}function mh(c,a){c=Ba[a];if(void 0===c)throw Error("Can not resolve #include <"+a+">");return c.replace(nh,mh)}function Ni(c,a,b,d){console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead.");return oh(c,a,b,d)}function oh(c,a,b,d){c="";for(a=parseInt(a);a<parseInt(b);a++)c+=d.replace(/\[ i \]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return c}function Oi(c){var a="precision "+
+a.numClippingPlanes-a.numClipIntersection)}function mh(c,a){c=Ba[a];if(void 0===c)throw Error("Can not resolve #include <"+a+">");return c.replace(nh,mh)}function Ni(c,a,b,d){console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead.");return oh(c,a,b,d)}function oh(c,a,b,d){c="";for(a=parseInt(a);a<parseInt(b);a++)c+=d.replace(/\[\s*i\s*\]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return c}function Oi(c){var a="precision "+
 c.precision+" float;\nprecision "+c.precision+" int;";"highp"===c.precision?a+="\n#define HIGH_PRECISION":"mediump"===c.precision?a+="\n#define MEDIUM_PRECISION":"lowp"===c.precision&&(a+="\n#define LOW_PRECISION");return a}function ll(c){var a="SHADOWMAP_TYPE_BASIC";1===c.shadowMapType?a="SHADOWMAP_TYPE_PCF":2===c.shadowMapType?a="SHADOWMAP_TYPE_PCF_SOFT":3===c.shadowMapType&&(a="SHADOWMAP_TYPE_VSM");return a}function ml(c){var a="ENVMAP_TYPE_CUBE";if(c.envMap)switch(c.envMapMode){case 301:case 302:a=
 "ENVMAP_TYPE_CUBE";break;case 306:case 307:a="ENVMAP_TYPE_CUBE_UV"}return a}function nl(c){var a="ENVMAP_MODE_REFLECTION";if(c.envMap)switch(c.envMapMode){case 302:case 307:a="ENVMAP_MODE_REFRACTION"}return a}function ol(c){var a="ENVMAP_BLENDING_NONE";if(c.envMap)switch(c.combine){case 0:a="ENVMAP_BLENDING_MULTIPLY";break;case 1:a="ENVMAP_BLENDING_MIX";break;case 2:a="ENVMAP_BLENDING_ADD"}return a}function pl(c,a,b,d){var e=c.getContext(),f=b.defines,g=b.vertexShader,h=b.fragmentShader,k=ll(b),l=
 ml(b),m=nl(b),n=ol(b),p=0<c.gammaFactor?c.gammaFactor:1,t=b.isWebGL2?"":[b.extensionDerivatives||b.envMapCubeUV||b.bumpMap||b.tangentSpaceNormalMap||b.clearcoatNormalMap||b.flatShading||"physical"===b.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(b.extensionFragDepth||b.logarithmicDepthBuffer)&&b.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",b.extensionDrawBuffers&&b.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(b.extensionShaderTextureLOD||
@@ -695,7 +695,7 @@ vertexShader:Ba.equirect_vert,fragmentShader:Ba.equirect_frag},distanceRGBA:{uni
 clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new L(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new S(0)},transmission:{value:0},transmissionMap:{value:null}}]),vertexShader:Ba.meshphysical_vert,fragmentShader:Ba.meshphysical_frag};kc.prototype=Object.create(Oa.prototype);kc.prototype.constructor=kc;kc.prototype.isCubeTexture=!0;Object.defineProperty(kc.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Id.prototype=
 Object.create(Oa.prototype);Id.prototype.constructor=Id;Id.prototype.isDataTexture2DArray=!0;Jd.prototype=Object.create(Oa.prototype);Jd.prototype.constructor=Jd;Jd.prototype.isDataTexture3D=!0;var Ei=new Oa,Kk=new Id,Mk=new Jd,Fi=new kc,yi=[],Ai=[],Di=new Float32Array(16),Ci=new Float32Array(9),Bi=new Float32Array(4);Gi.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Eb(b,a)};Hi.prototype.setValue=function(a,
 b,d){for(var e=this.seq,f=0,g=e.length;f!==g;++f){var h=e[f];h.setValue(a,b[h.id],d)}};var lh=/([\w\d_]+)(\])?(\[|\.)?/g;Dc.prototype.setValue=function(a,b,d,e){b=this.map[b];void 0!==b&&b.setValue(a,d,e)};Dc.prototype.setOptional=function(a,b,d){b=b[d];void 0!==b&&this.setValue(a,d,b)};Dc.upload=function(a,b,d,e){for(var f=0,g=b.length;f!==g;++f){var h=b[f],k=d[h.id];!1!==k.needsUpdate&&h.setValue(a,k.value,e)}};Dc.seqWithValue=function(a,b){for(var d=[],e=0,f=a.length;e!==f;++e){var g=a[e];g.id in
-b&&d.push(g)}return d};var ql=0,nh=/^[ \t]*#include +<([\w\d./]+)>/gm,Qi=/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Pi=/#pragma unroll_loop_start[\s]+?for\s*\(\s*int i = (\d+); i < (\d+); i\s*\+\+\s*\)\s*{([\s\S]+?)(?=\})\}[\s]+?#pragma unroll_loop_end/g,Al=0;Ec.prototype=Object.create(ra.prototype);Ec.prototype.constructor=Ec;Ec.prototype.isMeshDepthMaterial=!0;Ec.prototype.copy=function(a){ra.prototype.copy.call(this,a);this.depthPacking=a.depthPacking;
+b&&d.push(g)}return d};var ql=0,nh=/^[ \t]*#include +<([\w\d./]+)>/gm,Qi=/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Pi=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g,Al=0;Ec.prototype=Object.create(ra.prototype);Ec.prototype.constructor=Ec;Ec.prototype.isMeshDepthMaterial=!0;Ec.prototype.copy=function(a){ra.prototype.copy.call(this,a);this.depthPacking=a.depthPacking;
 this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};Fc.prototype=Object.create(ra.prototype);Fc.prototype.constructor=Fc;Fc.prototype.isMeshDistanceMaterial=!0;Fc.prototype.copy=function(a){ra.prototype.copy.call(this,a);this.referencePosition.copy(a.referencePosition);
 this.nearDistance=a.nearDistance;this.farDistance=a.farDistance;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;return this};Tf.prototype=Object.assign(Object.create(eb.prototype),{constructor:Tf,isArrayCamera:!0});Gc.prototype=Object.assign(Object.create(ha.prototype),{constructor:Gc,isGroup:!0});Object.assign(Me.prototype,{constructor:Me,
 getHandSpace:function(){if(null===this._hand&&(this._hand=new Gc,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints=[],this._hand.inputState={pinching:!1},window.XRHand))for(var a=0;a<=window.XRHand.LITTLE_PHALANX_TIP;a++){var b=new Gc;b.matrixAutoUpdate=!1;b.visible=!1;this._hand.joints.push(b);this._hand.add(b)}return this._hand},getTargetRaySpace:function(){null===this._targetRay&&(this._targetRay=new Gc,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1);return this._targetRay},

+ 2 - 2
build/three.module.js

@@ -18296,7 +18296,7 @@ function includeReplacer( match, include ) {
 // Unroll Loops
 
 const deprecatedUnrollLoopPattern = /#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;
-const unrollLoopPattern = /#pragma unroll_loop_start[\s]+?for\s*\(\s*int i \= (\d+)\; i < (\d+)\; i\s*\+\+\s*\)\s*{([\s\S]+?)(?=\})\}[\s]+?#pragma unroll_loop_end/g;
+const unrollLoopPattern = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;
 
 function unrollLoops( string ) {
 
@@ -18320,7 +18320,7 @@ function loopReplacer( match, start, end, snippet ) {
 	for ( let i = parseInt( start ); i < parseInt( end ); i ++ ) {
 
 		string += snippet
-			.replace( /\[ i \]/g, '[ ' + i + ' ]' )
+			.replace( /\[\s*i\s*\]/g, '[ ' + i + ' ]' )
 			.replace( /UNROLLED_LOOP_INDEX/g, i );
 
 	}