Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
a66b0cf9
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,发现更多精彩内容 >>
提交
a66b0cf9
编写于
1月 14, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
c4d09a26
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
169 addition
and
182 deletion
+169
-182
build/three.js
build/three.js
+26
-39
build/three.min.js
build/three.min.js
+143
-143
未找到文件。
build/three.js
浏览文件 @
a66b0cf9
...
...
@@ -2347,14 +2347,14 @@ THREE.Box2.prototype = {
containsPoint: function ( point ) {
if (
( this.min.x <= point.x ) && ( point.x <= this.max.x ) &&
( this.min.y <= point.y ) && ( point.y <= this.max.y )
) {
if (
point.x < this.min.x || point.x > this.max.x ||
point.y < this.min.y || point.y > this.max.y
) {
return
tru
e;
return
fals
e;
}
return
fals
e;
return
tru
e;
},
...
...
@@ -2387,10 +2387,8 @@ THREE.Box2.prototype = {
// using 6 splitting planes to rule out intersections.
if ( ( box.max.x < this.min.x ) ||
( box.min.x > this.max.x ) ||
( box.max.y < this.min.y ) ||
( box.min.y > this.max.y ) ) {
if ( box.max.x < this.min.x || box.min.x > this.max.x ||
box.max.y < this.min.y || box.min.y > this.max.y ) {
return false;
...
...
@@ -2615,15 +2613,15 @@ THREE.Box3.prototype = {
containsPoint: function ( point ) {
if (
( this.min.x <= point.x ) && ( point.x <= this.max.x ) &&
( this.min.y <= point.y ) && ( point.y <= this.max.y ) &&
( this.min.z <= point.z ) && ( point.z <= this.max.z )
) {
if (
point.x < this.min.x || point.x > this.max.x ||
point.y < this.min.y || point.y > this.max.y ||
point.z < this.min.z || point.z > this.max.z
) {
return
tru
e;
return
fals
e;
}
return
fals
e;
return
tru
e;
},
...
...
@@ -2658,9 +2656,9 @@ THREE.Box3.prototype = {
// using 6 splitting planes to rule out intersections.
if (
( box.max.x < this.min.x ) || ( box.min.x > this.max.x )
||
( box.max.y < this.min.y ) || ( box.min.y > this.max.y )
||
( box.max.z < this.min.z ) || ( box.min.z > this.max.z )
) {
if (
box.max.x < this.min.x || box.min.x > this.max.x
||
box.max.y < this.min.y || box.min.y > this.max.y
||
box.max.z < this.min.z || box.min.z > this.max.z
) {
return false;
...
...
@@ -6446,19 +6444,16 @@ THREE.Projector = function() {
_vertex = getNextVertexInPool();
_vertex.positionWorld.copy( vertices[ v ] );
_vertex.positionWorld.applyMatrix4( _modelMatrix );
_vertex.positionScreen.copy( _vertex.positionWorld );
_vertex.positionScreen.applyMatrix4( _viewProjectionMatrix );
_vertex.positionWorld.copy( vertices[ v ] ).applyMatrix4( _modelMatrix );
_vertex.positionScreen.copy( _vertex.positionWorld ).applyMatrix4( _viewProjectionMatrix );
_vertex.positionScreen.x /= _vertex.positionScreen.w;
_vertex.positionScreen.y /= _vertex.positionScreen.w;
_vertex.positionScreen.z /= _vertex.positionScreen.w;
_vertex.visible = ! ( _vertex.positionScreen.x < -1 || _vertex.positionScreen.x > 1 ||
_vertex.positionScreen.y < -1 || _vertex.positionScreen.y > 1 ||
_vertex.positionScreen.z < -1 || _vertex.positionScreen.z > 1 );
_vertex.positionScreen.y < -1 || _vertex.positionScreen.y > 1 ||
_vertex.positionScreen.z < -1 || _vertex.positionScreen.z > 1 );
}
...
...
@@ -6553,14 +6548,11 @@ THREE.Projector = function() {
}
_face.normalModel.applyMatrix3( _normalMatrix );
_face.normalModel.normalize();
_face.normalModel.applyMatrix3( _normalMatrix ).normalize();
_face.normalModelView.copy( _face.normalModel );
_face.normalModelView.applyMatrix3( _normalViewMatrix );
_face.normalModelView.copy( _face.normalModel ).applyMatrix3( _normalViewMatrix );
_face.centroidModel.copy( face.centroid );
_face.centroidModel.applyMatrix4( _modelMatrix );
_face.centroidModel.copy( face.centroid ).applyMatrix4( _modelMatrix );
faceVertexNormals = face.vertexNormals;
...
...
@@ -6575,12 +6567,10 @@ THREE.Projector = function() {
}
normalModel.applyMatrix3( _normalMatrix );
normalModel.normalize();
normalModel.applyMatrix3( _normalMatrix ).normalize();
var normalModelView = _face.vertexNormalsModelView[ n ];
normalModelView.copy( normalModel );
normalModelView.applyMatrix3( _normalViewMatrix );
normalModelView.copy( normalModel ).applyMatrix3( _normalViewMatrix );
}
...
...
@@ -6603,8 +6593,7 @@ THREE.Projector = function() {
_face.color = face.color;
_face.material = material;
_centroid.copy( _face.centroidModel )
_centroid.applyMatrix4( _viewProjectionMatrix );
_centroid.copy( _face.centroidModel ).applyMatrix4( _viewProjectionMatrix );
_face.z = _centroid.z;
...
...
@@ -6619,8 +6608,7 @@ THREE.Projector = function() {
vertices = object.geometry.vertices;
v1 = getNextVertexInPool();
v1.positionScreen.copy( vertices[ 0 ] );
v1.positionScreen.applyMatrix4( _modelViewProjectionMatrix );
v1.positionScreen.copy( vertices[ 0 ] ).applyMatrix4( _modelViewProjectionMatrix );
// Handle LineStrip and LinePieces
var step = object.type === THREE.LinePieces ? 2 : 1;
...
...
@@ -6628,8 +6616,7 @@ THREE.Projector = function() {
for ( v = 1, vl = vertices.length; v < vl; v ++ ) {
v1 = getNextVertexInPool();
v1.positionScreen.copy( vertices[ v ] );
v1.positionScreen.applyMatrix4( _modelViewProjectionMatrix );
v1.positionScreen.copy( vertices[ v ] ).applyMatrix4( _modelViewProjectionMatrix );
if ( ( v + 1 ) % step > 0 ) continue;
...
...
build/three.min.js
浏览文件 @
a66b0cf9
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录