Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
70b9770b
T
three.js
项目概览
车家大少爷
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
70b9770b
编写于
3月 28, 2016
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
0f57208c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
3 addition
and
1 deletion
+3
-1
build/three.js
build/three.js
+2
-0
build/three.min.js
build/three.min.js
+1
-1
未找到文件。
build/three.js
浏览文件 @
70b9770b
...
...
@@ -30215,6 +30215,8 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
shadow.map = new THREE.WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
shadowCamera.updateProjectionMatrix();
}
if ( shadow instanceof THREE.SpotLightShadow ) {
...
...
build/three.min.js
浏览文件 @
70b9770b
...
...
@@ -721,7 +721,7 @@ THREE.WebGLShadowMap=function(a,b,c){function d(a,b,c,d){var e=a.geometry,f=null
new THREE.Vector3(-1,0,0),new THREE.Vector3(0,0,1),new THREE.Vector3(0,0,-1),new THREE.Vector3(0,1,0),new THREE.Vector3(0,-1,0)],s=[new THREE.Vector3(0,1,0),new THREE.Vector3(0,1,0),new THREE.Vector3(0,1,0),new THREE.Vector3(0,1,0),new THREE.Vector3(0,0,1),new THREE.Vector3(0,0,-1)],w=[new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4,new THREE.Vector4];b=THREE.ShaderLib.depthRGBA;for(var C=THREE.UniformsUtils.clone(b.uniforms),x=THREE.ShaderLib.distanceRGBA,
B=THREE.UniformsUtils.clone(x.uniforms),A=0;4!==A;++A){var z=0!==(A&1),y=0!==(A&2),F=new THREE.ShaderMaterial({uniforms:C,vertexShader:b.vertexShader,fragmentShader:b.fragmentShader,morphTargets:z,skinning:y});u[A]=F;z=new THREE.ShaderMaterial({defines:{USE_SHADOWMAP:""},uniforms:B,vertexShader:x.vertexShader,fragmentShader:x.fragmentShader,morphTargets:z,skinning:y});v[A]=z}var E=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=THREE.PCFShadowMap;this.cullFace=THREE.CullFaceFront;
this.render=function(b,u){if(!1!==E.enabled&&(!1!==E.autoUpdate||!1!==E.needsUpdate)&&0!==l.length){g.clearColor(1,1,1,1);g.disable(f.BLEND);g.enable(f.CULL_FACE);f.frontFace(f.CCW);f.cullFace(E.cullFace===THREE.CullFaceFront?f.FRONT:f.BACK);g.setDepthTest(!0);g.setScissorTest(!1);for(var v,x,C=0,y=l.length;C<y;C++){var A=l[C],z=A.shadow,B=z.camera;n.copy(z.mapSize);if(A instanceof THREE.PointLight){v=6;x=!0;var F=n.x,L=n.y;w[0].set(2*F,L,F,L);w[1].set(0,L,F,L);w[2].set(3*F,L,F,L);w[3].set(F,L,F,
L);w[4].set(3*F,0,F,L);w[5].set(F,0,F,L);n.x*=4;n.y*=2}else v=1,x=!1;null===z.map&&(z.map=new THREE.WebGLRenderTarget(n.x,n.y,{minFilter:THREE.NearestFilter,magFilter:THREE.NearestFilter,format:THREE.RGBAFormat}));z instanceof THREE.SpotLightShadow&&z.update(A);F=z.map;z=z.matrix;m.setFromMatrixPosition(A.matrixWorld);B.position.copy(m);a.setRenderTarget(F);a.clear();for(F=0;F<v;F++){x?(p.copy(B.position),p.add(t[F]),B.up.copy(s[F]),B.lookAt(p),g.viewport(w[F])):(p.setFromMatrixPosition(A.target.matrixWorld),
L);w[4].set(3*F,0,F,L);w[5].set(F,0,F,L);n.x*=4;n.y*=2}else v=1,x=!1;null===z.map&&(z.map=new THREE.WebGLRenderTarget(n.x,n.y,{minFilter:THREE.NearestFilter,magFilter:THREE.NearestFilter,format:THREE.RGBAFormat})
,B.updateProjectionMatrix()
);z instanceof THREE.SpotLightShadow&&z.update(A);F=z.map;z=z.matrix;m.setFromMatrixPosition(A.matrixWorld);B.position.copy(m);a.setRenderTarget(F);a.clear();for(F=0;F<v;F++){x?(p.copy(B.position),p.add(t[F]),B.up.copy(s[F]),B.lookAt(p),g.viewport(w[F])):(p.setFromMatrixPosition(A.target.matrixWorld),
B.lookAt(p));B.updateMatrixWorld();B.matrixWorldInverse.getInverse(B.matrixWorld);z.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);z.multiply(B.projectionMatrix);z.multiply(B.matrixWorldInverse);k.multiplyMatrices(B.projectionMatrix,B.matrixWorldInverse);h.setFromMatrix(k);q.length=0;e(b,u,B);for(var L=0,D=q.length;L<D;L++){var W=q[L],T=c.update(W),Z=W.material;if(Z instanceof THREE.MultiMaterial)for(var $=T.groups,Z=Z.materials,ea=0,na=$.length;ea<na;ea++){var Y=$[ea],ca=Z[Y.materialIndex];!0===ca.visible&&
(ca=d(W,ca,x,m),a.renderBufferDirect(B,null,T,ca,W,Y))}else ca=d(W,Z,x,m),a.renderBufferDirect(B,null,T,ca,W,null)}}}v=a.getClearColor();x=a.getClearAlpha();a.setClearColor(v,x);g.enable(f.BLEND);E.cullFace===THREE.CullFaceFront&&f.cullFace(f.BACK);E.needsUpdate=!1}}};
THREE.WebGLState=function(a,b,c){var d=this,e=new THREE.Vector4,f=new Uint8Array(16),g=new Uint8Array(16),h=new Uint8Array(16),k={},l=null,n=null,p=null,m=null,q=null,u=null,v=null,t=null,s=!1,w=null,C=null,x=null,B=null,A=null,z=null,y=null,F=null,E=null,H=null,K=null,G=null,P=null,I=null,M=null,N=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS),O=void 0,R={},Q=new THREE.Vector4,L=null,D=null,W=new THREE.Vector4,T=new THREE.Vector4,Z=a.createTexture();a.bindTexture(a.TEXTURE_2D,Z);a.texParameteri(a.TEXTURE_2D,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录