提交 a5057396 编写于 作者: M Mr.doob

Updated builds.

上级 e44ea72c
......@@ -4,7 +4,7 @@
* @author bhouston / http://exocortex.com
*/
var THREE = { REVISION: '66' };
var THREE = { REVISION: '67dev' };
self.console = self.console || {
......@@ -24642,7 +24642,7 @@ THREE.WebGLRenderer = function ( parameters ) {
maxHemiLights: maxLightCount.hemi,
maxShadows: maxShadows,
shadowMapEnabled: this.shadowMapEnabled && object.receiveShadow,
shadowMapEnabled: this.shadowMapEnabled && object.receiveShadow && maxShadows > 0,
shadowMapType: this.shadowMapType,
shadowMapDebug: this.shadowMapDebug,
shadowMapCascade: this.shadowMapCascade,
......@@ -26912,7 +26912,7 @@ THREE.WebGLRenderer = function ( parameters ) {
var light = lights[ l ];
if ( light.onlyShadow ) continue;
if ( light.onlyShadow || light.visible === false ) continue;
if ( light instanceof THREE.DirectionalLight ) dirLights ++;
if ( light instanceof THREE.PointLight ) pointLights ++;
......
// three.js - http://github.com/mrdoob/three.js
'use strict';var THREE={REVISION:"66"};self.console=self.console||{info:function(){},log:function(){},debug:function(){},warn:function(){},error:function(){}};
'use strict';var THREE={REVISION:"67dev"};self.console=self.console||{info:function(){},log:function(){},debug:function(){},warn:function(){},error:function(){}};
(function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!self.requestAnimationFrame;++c)self.requestAnimationFrame=self[b[c]+"RequestAnimationFrame"],self.cancelAnimationFrame=self[b[c]+"CancelAnimationFrame"]||self[b[c]+"CancelRequestAnimationFrame"];void 0===self.requestAnimationFrame&&void 0!==self.setTimeout&&(self.requestAnimationFrame=function(b){var c=Date.now(),f=Math.max(0,16-(c-a)),g=self.setTimeout(function(){b(c+f)},f);a=c+f;return g});void 0===self.cancelAnimationFrame&&void 0!==
self.clearTimeout&&(self.cancelAnimationFrame=function(a){self.clearTimeout(a)})})();THREE.CullFaceNone=0;THREE.CullFaceBack=1;THREE.CullFaceFront=2;THREE.CullFaceFrontBack=3;THREE.FrontFaceDirectionCW=0;THREE.FrontFaceDirectionCCW=1;THREE.BasicShadowMap=0;THREE.PCFShadowMap=1;THREE.PCFSoftShadowMap=2;THREE.FrontSide=0;THREE.BackSide=1;THREE.DoubleSide=2;THREE.NoShading=0;THREE.FlatShading=1;THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NoBlending=0;
THREE.NormalBlending=1;THREE.AdditiveBlending=2;THREE.SubtractiveBlending=3;THREE.MultiplyBlending=4;THREE.CustomBlending=5;THREE.AddEquation=100;THREE.SubtractEquation=101;THREE.ReverseSubtractEquation=102;THREE.ZeroFactor=200;THREE.OneFactor=201;THREE.SrcColorFactor=202;THREE.OneMinusSrcColorFactor=203;THREE.SrcAlphaFactor=204;THREE.OneMinusSrcAlphaFactor=205;THREE.DstAlphaFactor=206;THREE.OneMinusDstAlphaFactor=207;THREE.DstColorFactor=208;THREE.OneMinusDstColorFactor=209;
......@@ -501,10 +501,10 @@ ub[$][1],ia=W.value[tb],W.array[X]=ia.x,W.array[X+1]=ia.y,X+=2;else if(3===W.siz
Bb[X+1]=sb.y,Bb[X+2]=sb.z;if(wc)for(rb=0;rb<uc;rb++)xb=mc[rb],X=3*rb,Cb[X]=xb.r,Cb[X+1]=xb.g,Cb[X+2]=xb.b;if(vb)for(hb=0,Hb=vb.length;hb<Hb;hb++)if(W=vb[hb],W.needsUpdate&&(void 0===W.boundTo||"vertices"===W.boundTo))if(ib=W.value.length,X=0,1===W.size)for($=0;$<ib;$++)W.array[$]=W.value[$];else if(2===W.size)for($=0;$<ib;$++)ia=W.value[$],W.array[X]=ia.x,W.array[X+1]=ia.y,X+=2;else if(3===W.size)if("c"===W.type)for($=0;$<ib;$++)ia=W.value[$],W.array[X]=ia.r,W.array[X+1]=ia.g,W.array[X+2]=ia.b,X+=
3;else for($=0;$<ib;$++)ia=W.value[$],W.array[X]=ia.x,W.array[X+1]=ia.y,W.array[X+2]=ia.z,X+=3;else if(4===W.size)for($=0;$<ib;$++)ia=W.value[$],W.array[X]=ia.x,W.array[X+1]=ia.y,W.array[X+2]=ia.z,W.array[X+3]=ia.w,X+=4}if(vc||Nb.sortParticles)m.bindBuffer(m.ARRAY_BUFFER,qb.__webglVertexBuffer),m.bufferData(m.ARRAY_BUFFER,Bb,kc);if(wc||Nb.sortParticles)m.bindBuffer(m.ARRAY_BUFFER,qb.__webglColorBuffer),m.bufferData(m.ARRAY_BUFFER,Cb,kc);if(vb)for(hb=0,Hb=vb.length;hb<Hb;hb++)if(W=vb[hb],W.needsUpdate||
Nb.sortParticles)m.bindBuffer(m.ARRAY_BUFFER,W.buffer),m.bufferData(m.ARRAY_BUFFER,W.array,kc)}l.verticesNeedUpdate=!1;l.colorsNeedUpdate=!1;s.attributes&&w(s)}}};this.initMaterial=function(a,b,c,d){var e,f,g,h;a.addEventListener("dispose",Rb);var k,l,p,n,r;a instanceof THREE.MeshDepthMaterial?r="depth":a instanceof THREE.MeshNormalMaterial?r="normal":a instanceof THREE.MeshBasicMaterial?r="basic":a instanceof THREE.MeshLambertMaterial?r="lambert":a instanceof THREE.MeshPhongMaterial?r="phong":a instanceof
THREE.LineBasicMaterial?r="basic":a instanceof THREE.LineDashedMaterial?r="dashed":a instanceof THREE.ParticleSystemMaterial&&(r="particle_basic");if(r){var q=THREE.ShaderLib[r];a.uniforms=THREE.UniformsUtils.clone(q.uniforms);a.vertexShader=q.vertexShader;a.fragmentShader=q.fragmentShader}var s=e=0,t=0,u=q=0;for(f=b.length;u<f;u++)g=b[u],g.onlyShadow||(g instanceof THREE.DirectionalLight&&e++,g instanceof THREE.PointLight&&s++,g instanceof THREE.SpotLight&&t++,g instanceof THREE.HemisphereLight&&
THREE.LineBasicMaterial?r="basic":a instanceof THREE.LineDashedMaterial?r="dashed":a instanceof THREE.ParticleSystemMaterial&&(r="particle_basic");if(r){var q=THREE.ShaderLib[r];a.uniforms=THREE.UniformsUtils.clone(q.uniforms);a.vertexShader=q.vertexShader;a.fragmentShader=q.fragmentShader}var s=e=0,t=0,u=q=0;for(f=b.length;u<f;u++)g=b[u],g.onlyShadow||!1===g.visible||(g instanceof THREE.DirectionalLight&&e++,g instanceof THREE.PointLight&&s++,g instanceof THREE.SpotLight&&t++,g instanceof THREE.HemisphereLight&&
q++);f=s;g=t;h=q;t=q=0;for(s=b.length;t<s;t++)u=b[t],u.castShadow&&(u instanceof THREE.SpotLight&&q++,u instanceof THREE.DirectionalLight&&!u.shadowCascade&&q++);n=q;Eb&&d&&d.useVertexTexture?p=1024:(b=m.getParameter(m.MAX_VERTEX_UNIFORM_VECTORS),b=Math.floor((b-20)/4),void 0!==d&&d instanceof THREE.SkinnedMesh&&(b=Math.min(d.bones.length,b),b<d.bones.length&&console.warn("WebGLRenderer: too many bones - "+d.bones.length+", this GPU supports just "+b+" (try OpenGL instead of ANGLE)")),p=b);a:{t=a.fragmentShader;
s=a.vertexShader;q=a.uniforms;b=a.attributes;u=a.defines;c={map:!!a.map,envMap:!!a.envMap,lightMap:!!a.lightMap,bumpMap:!!a.bumpMap,normalMap:!!a.normalMap,specularMap:!!a.specularMap,vertexColors:a.vertexColors,fog:c,useFog:a.fog,fogExp:c instanceof THREE.FogExp2,sizeAttenuation:a.sizeAttenuation,skinning:a.skinning,maxBones:p,useVertexTexture:Eb&&d&&d.useVertexTexture,morphTargets:a.morphTargets,morphNormals:a.morphNormals,maxMorphTargets:this.maxMorphTargets,maxMorphNormals:this.maxMorphNormals,
maxDirLights:e,maxPointLights:f,maxSpotLights:g,maxHemiLights:h,maxShadows:n,shadowMapEnabled:this.shadowMapEnabled&&d.receiveShadow,shadowMapType:this.shadowMapType,shadowMapDebug:this.shadowMapDebug,shadowMapCascade:this.shadowMapCascade,alphaTest:a.alphaTest,metal:a.metal,wrapAround:a.wrapAround,doubleSided:a.side===THREE.DoubleSide,flipSided:a.side===THREE.BackSide};d=a.index0AttributeName;var v,w,x;e=[];r?e.push(r):(e.push(t),e.push(s));for(w in u)e.push(w),e.push(u[w]);for(v in c)e.push(v),
maxDirLights:e,maxPointLights:f,maxSpotLights:g,maxHemiLights:h,maxShadows:n,shadowMapEnabled:this.shadowMapEnabled&&d.receiveShadow&&0<n,shadowMapType:this.shadowMapType,shadowMapDebug:this.shadowMapDebug,shadowMapCascade:this.shadowMapCascade,alphaTest:a.alphaTest,metal:a.metal,wrapAround:a.wrapAround,doubleSided:a.side===THREE.DoubleSide,flipSided:a.side===THREE.BackSide};d=a.index0AttributeName;var v,w,x;e=[];r?e.push(r):(e.push(t),e.push(s));for(w in u)e.push(w),e.push(u[w]);for(v in c)e.push(v),
e.push(c[v]);r=e.join();v=0;for(w=ga.length;v<w;v++)if(e=ga[v],e.code===r){e.usedTimes++;l=e.program;break a}v="SHADOWMAP_TYPE_BASIC";c.shadowMapType===THREE.PCFShadowMap?v="SHADOWMAP_TYPE_PCF":c.shadowMapType===THREE.PCFSoftShadowMap&&(v="SHADOWMAP_TYPE_PCF_SOFT");w=[];for(x in u)e=u[x],!1!==e&&(e="#define "+x+" "+e,w.push(e));e=w.join("\n");x=m.createProgram();w=["precision "+Y+" float;","precision "+Y+" int;",e,Db?"#define VERTEX_TEXTURES":"",O.gammaInput?"#define GAMMA_INPUT":"",O.gammaOutput?
"#define GAMMA_OUTPUT":"","#define MAX_DIR_LIGHTS "+c.maxDirLights,"#define MAX_POINT_LIGHTS "+c.maxPointLights,"#define MAX_SPOT_LIGHTS "+c.maxSpotLights,"#define MAX_HEMI_LIGHTS "+c.maxHemiLights,"#define MAX_SHADOWS "+c.maxShadows,"#define MAX_BONES "+c.maxBones,c.map?"#define USE_MAP":"",c.envMap?"#define USE_ENVMAP":"",c.lightMap?"#define USE_LIGHTMAP":"",c.bumpMap?"#define USE_BUMPMAP":"",c.normalMap?"#define USE_NORMALMAP":"",c.specularMap?"#define USE_SPECULARMAP":"",c.vertexColors?"#define USE_COLOR":
"",c.skinning?"#define USE_SKINNING":"",c.useVertexTexture?"#define BONE_TEXTURE":"",c.morphTargets?"#define USE_MORPHTARGETS":"",c.morphNormals?"#define USE_MORPHNORMALS":"",c.wrapAround?"#define WRAP_AROUND":"",c.doubleSided?"#define DOUBLE_SIDED":"",c.flipSided?"#define FLIP_SIDED":"",c.shadowMapEnabled?"#define USE_SHADOWMAP":"",c.shadowMapEnabled?"#define "+v:"",c.shadowMapDebug?"#define SHADOWMAP_DEBUG":"",c.shadowMapCascade?"#define SHADOWMAP_CASCADE":"",c.sizeAttenuation?"#define USE_SIZEATTENUATION":
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册