Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
258aa74f
T
three.js
项目概览
Ablesons
/
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,发现更多精彩内容 >>
提交
258aa74f
编写于
10月 17, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
3460f251
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
193 addition
and
186 deletion
+193
-186
build/three.js
build/three.js
+58
-52
build/three.min.js
build/three.min.js
+135
-134
未找到文件。
build/three.js
浏览文件 @
258aa74f
...
...
@@ -4,7 +4,7 @@
* @author mrdoob / http://mrdoob.com/
*/
var THREE = { REVISION: '7
3
' };
var THREE = { REVISION: '7
4dev
' };
//
...
...
@@ -7267,48 +7267,6 @@ THREE.Triangle.prototype = {
};
// File:src/core/Channels.js
/**
* @author mrdoob / http://mrdoob.com/
*/
THREE.Channels = function () {
this.mask = 1;
};
THREE.Channels.prototype = {
constructor: THREE.Channels,
set: function ( channel ) {
this.mask = 1 << channel;
},
enable: function ( channel ) {
this.mask |= 1 << channel;
},
toggle: function ( channel ) {
this.mask ^= 1 << channel;
},
disable: function ( channel ) {
this.mask &= ~ ( 1 << channel );
}
};
// File:src/core/Clock.js
/**
...
...
@@ -7491,6 +7449,54 @@ THREE.EventDispatcher.prototype = {
};
// File:src/core/Layers.js
/**
* @author mrdoob / http://mrdoob.com/
*/
THREE.Layers = function () {
this.mask = 1;
};
THREE.Layers.prototype = {
constructor: THREE.Layers,
set: function ( channel ) {
this.mask = 1 << channel;
},
enable: function ( channel ) {
this.mask |= 1 << channel;
},
toggle: function ( channel ) {
this.mask ^= 1 << channel;
},
disable: function ( channel ) {
this.mask &= ~ ( 1 << channel );
},
test: function ( layers ) {
return ( this.mask & layers.mask ) !== 0;
}
};
// File:src/core/Raycaster.js
/**
...
...
@@ -7649,7 +7655,6 @@ THREE.Object3D = function () {
this.type = 'Object3D';
this.parent = null;
this.channels = new THREE.Channels();
this.children = [];
this.up = THREE.Object3D.DefaultUp.clone();
...
...
@@ -7707,6 +7712,7 @@ THREE.Object3D = function () {
this.matrixAutoUpdate = THREE.Object3D.DefaultMatrixAutoUpdate;
this.matrixWorldNeedsUpdate = false;
this.layers = new THREE.Layers();
this.visible = true;
this.castShadow = false;
...
...
@@ -22366,7 +22372,7 @@ THREE.WebGLRenderer = function ( parameters ) {
//
shadowMap.render( scene );
shadowMap.render( scene
, camera
);
//
...
...
@@ -22487,7 +22493,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( object.visible === false ) return;
if (
( object.channels.mask & camera.channels.mask ) !== 0
) {
if (
object.layers.test( camera.layers )
) {
if ( object instanceof THREE.Light ) {
...
...
@@ -26657,7 +26663,7 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
this.type = THREE.PCFShadowMap;
this.cullFace = THREE.CullFaceFront;
this.render = function ( scene ) {
this.render = function ( scene
, camera
) {
var faceCount, isPointLight;
...
...
@@ -26809,7 +26815,7 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
_renderList.length = 0;
projectObject( scene, shadowCamera );
projectObject( scene,
camera,
shadowCamera );
// render shadow map
// render regular objects
...
...
@@ -26928,11 +26934,11 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
}
function projectObject( object, camera ) {
function projectObject( object, camera
, shadowCamera
) {
if ( object.visible === false ) return;
if ( object
instanceof THREE.Mesh || object instanceof THREE.Line || object instanceof THREE.Points
) {
if ( object
.layers.test( camera.layers ) && ( object instanceof THREE.Mesh || object instanceof THREE.Line || object instanceof THREE.Points )
) {
if ( object.castShadow && ( object.frustumCulled === false || _frustum.intersectsObject( object ) === true ) ) {
...
...
@@ -26940,7 +26946,7 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
if ( material.visible === true ) {
object.modelViewMatrix.multiplyMatrices(
c
amera.matrixWorldInverse, object.matrixWorld );
object.modelViewMatrix.multiplyMatrices(
shadowC
amera.matrixWorldInverse, object.matrixWorld );
_renderList.push( object );
}
...
...
@@ -26953,7 +26959,7 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
for ( var i = 0, l = children.length; i < l; i ++ ) {
projectObject( children[ i ], camera );
projectObject( children[ i ], camera
, shadowCamera
);
}
...
...
build/three.min.js
浏览文件 @
258aa74f
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录