Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
8e7f533d
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,体验更适合开发者的 AI 搜索 >>
提交
8e7f533d
编写于
5月 13, 2017
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
89df8c67
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
353 addition
and
352 deletion
+353
-352
build/three.js
build/three.js
+34
-33
build/three.min.js
build/three.min.js
+285
-286
build/three.module.js
build/three.module.js
+34
-33
未找到文件。
build/three.js
浏览文件 @
8e7f533d
...
...
@@ -9194,12 +9194,13 @@
// render depth map
var faceCount
, isPointLight
;
var faceCount;
for ( var i = 0, il = _lightShadows.length; i < il; i ++ ) {
var light = _lightShadows[ i ];
var shadow = light.shadow;
var isPointLight = light && light.isPointLight;
if ( shadow === undefined ) {
...
...
@@ -9208,25 +9209,12 @@
}
if ( shadow.isSpotLightShadow ) {
shadow.update( light );
}
var shadowCamera = shadow.camera;
var shadowMatrix = shadow.matrix;
_lightPositionWorld.setFromMatrixPosition( light.matrixWorld );
shadowCamera.position.copy( _lightPositionWorld );
_shadowMapSize.copy( shadow.mapSize );
_shadowMapSize.min( _maxShadowMapSize );
if ( light && light.isPointLight ) {
faceCount = 6;
isPointLight = true;
if ( isPointLight ) {
var vpWidth = _shadowMapSize.x;
var vpHeight = _shadowMapSize.y;
...
...
@@ -9260,6 +9248,34 @@
_shadowMapSize.x *= 4.0;
_shadowMapSize.y *= 2.0;
}
if ( shadow.map === null ) {
var pars = { minFilter: NearestFilter, magFilter: NearestFilter, format: RGBAFormat };
shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
shadow.map.texture.name = light.name + ".shadowMap";
shadowCamera.updateProjectionMatrix();
}
if ( shadow.isSpotLightShadow ) {
shadow.update( light );
}
var shadowMap = shadow.map;
var shadowMatrix = shadow.matrix;
_lightPositionWorld.setFromMatrixPosition( light.matrixWorld );
shadowCamera.position.copy( _lightPositionWorld );
if ( isPointLight ) {
faceCount = 6;
// for point lights we set the shadow matrix to be a translation-only matrix
// equal to inverse of the light's position
...
...
@@ -9269,7 +9285,6 @@
} else {
faceCount = 1;
isPointLight = false;
_lookTarget.setFromMatrixPosition( light.target.matrixWorld );
shadowCamera.lookAt( _lookTarget );
...
...
@@ -9290,19 +9305,6 @@
}
if ( shadow.map === null ) {
var pars = { minFilter: NearestFilter, magFilter: NearestFilter, format: RGBAFormat };
shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
shadow.map.texture.name = light.name + ".shadowMap";
shadowCamera.updateProjectionMatrix();
}
var shadowMap = shadow.map;
_renderer.setRenderTarget( shadowMap );
_renderer.clear();
...
...
@@ -10533,10 +10535,6 @@
this.renderOrder = 0;
this.userData = {};
this.onBeforeRender = function () {};
this.onAfterRender = function () {};
}
Object3D.DefaultUp = new Vector3( 0, 1, 0 );
...
...
@@ -10546,6 +10544,9 @@
isObject3D: true,
onBeforeRender: function () {},
onAfterRender: function () {},
applyMatrix: function ( matrix ) {
this.matrix.multiplyMatrices( matrix, this.matrix );
...
...
build/three.min.js
浏览文件 @
8e7f533d
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
build/three.module.js
浏览文件 @
8e7f533d
...
...
@@ -9188,12 +9188,13 @@ function WebGLShadowMap( _renderer, _lights, _objects, capabilities ) {
// render depth map
var faceCount
, isPointLight
;
var faceCount;
for ( var i = 0, il = _lightShadows.length; i < il; i ++ ) {
var light = _lightShadows[ i ];
var shadow = light.shadow;
var isPointLight = light && light.isPointLight;
if ( shadow === undefined ) {
...
...
@@ -9202,25 +9203,12 @@ function WebGLShadowMap( _renderer, _lights, _objects, capabilities ) {
}
if ( shadow.isSpotLightShadow ) {
shadow.update( light );
}
var shadowCamera = shadow.camera;
var shadowMatrix = shadow.matrix;
_lightPositionWorld.setFromMatrixPosition( light.matrixWorld );
shadowCamera.position.copy( _lightPositionWorld );
_shadowMapSize.copy( shadow.mapSize );
_shadowMapSize.min( _maxShadowMapSize );
if ( light && light.isPointLight ) {
faceCount = 6;
isPointLight = true;
if ( isPointLight ) {
var vpWidth = _shadowMapSize.x;
var vpHeight = _shadowMapSize.y;
...
...
@@ -9254,6 +9242,34 @@ function WebGLShadowMap( _renderer, _lights, _objects, capabilities ) {
_shadowMapSize.x *= 4.0;
_shadowMapSize.y *= 2.0;
}
if ( shadow.map === null ) {
var pars = { minFilter: NearestFilter, magFilter: NearestFilter, format: RGBAFormat };
shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
shadow.map.texture.name = light.name + ".shadowMap";
shadowCamera.updateProjectionMatrix();
}
if ( shadow.isSpotLightShadow ) {
shadow.update( light );
}
var shadowMap = shadow.map;
var shadowMatrix = shadow.matrix;
_lightPositionWorld.setFromMatrixPosition( light.matrixWorld );
shadowCamera.position.copy( _lightPositionWorld );
if ( isPointLight ) {
faceCount = 6;
// for point lights we set the shadow matrix to be a translation-only matrix
// equal to inverse of the light's position
...
...
@@ -9263,7 +9279,6 @@ function WebGLShadowMap( _renderer, _lights, _objects, capabilities ) {
} else {
faceCount = 1;
isPointLight = false;
_lookTarget.setFromMatrixPosition( light.target.matrixWorld );
shadowCamera.lookAt( _lookTarget );
...
...
@@ -9284,19 +9299,6 @@ function WebGLShadowMap( _renderer, _lights, _objects, capabilities ) {
}
if ( shadow.map === null ) {
var pars = { minFilter: NearestFilter, magFilter: NearestFilter, format: RGBAFormat };
shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
shadow.map.texture.name = light.name + ".shadowMap";
shadowCamera.updateProjectionMatrix();
}
var shadowMap = shadow.map;
_renderer.setRenderTarget( shadowMap );
_renderer.clear();
...
...
@@ -10527,10 +10529,6 @@ function Object3D() {
this.renderOrder = 0;
this.userData = {};
this.onBeforeRender = function () {};
this.onAfterRender = function () {};
}
Object3D.DefaultUp = new Vector3( 0, 1, 0 );
...
...
@@ -10540,6 +10538,9 @@ Object.assign( Object3D.prototype, EventDispatcher.prototype, {
isObject3D: true,
onBeforeRender: function () {},
onAfterRender: function () {},
applyMatrix: function ( matrix ) {
this.matrix.multiplyMatrices( matrix, this.matrix );
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录