Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
8fae05d3
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,发现更多精彩内容 >>
提交
8fae05d3
编写于
1月 23, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
f49a4f92
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
106 addition
and
137 deletion
+106
-137
build/three.js
build/three.js
+40
-70
build/three.min.js
build/three.min.js
+66
-67
未找到文件。
build/three.js
浏览文件 @
8fae05d3
...
...
@@ -1580,7 +1580,7 @@ THREE.extend( THREE.Vector3.prototype, {
},
applyEuler: function() {
applyEuler: function
() {
var q1 = new THREE.Quaternion();
...
...
@@ -1596,7 +1596,7 @@ THREE.extend( THREE.Vector3.prototype, {
}(),
applyAxisAngle: function() {
applyAxisAngle: function
() {
var q1 = new THREE.Quaternion();
...
...
@@ -1747,7 +1747,7 @@ THREE.extend( THREE.Vector3.prototype, {
},
negate: function() {
negate: function
() {
return this.multiplyScalar( - 1 );
...
...
@@ -3972,45 +3972,6 @@ THREE.extend( THREE.Matrix4.prototype, {
},
getColumnX: function() {
var v1 = new THREE.Vector3();
return function () {
var te = this.elements;
return v1.set( te[0], te[1], te[2] );
};
}(),
getColumnY: function() {
var v1 = new THREE.Vector3();
return function () {
var te = this.elements;
return v1.set( te[4], te[5], te[6] );
};
}(),
getColumnZ: function() {
var v1 = new THREE.Vector3();
return function() {
var te = this.elements;
return v1.set( te[8], te[9], te[10] );
};
}(),
getInverse: function ( m, throwOnInvertible ) {
// based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm
...
...
@@ -4925,29 +4886,37 @@ THREE.extend( THREE.Frustum.prototype, {
},
intersectsObject: function (
object
) {
intersectsObject: function () {
// this method is expanded inlined for performance reasons.
var matrix = object.matrixWorld;
var planes = this.planes;
var center = matrix.getPosition();
var negRadius = - object.geometry.boundingSphere.radius * matrix.getMaxScaleOnAxis();
var center = new THREE.Vector3();
for ( var i = 0; i < 6; i ++
) {
return function ( object
) {
var distance = planes[ i ].distanceToPoint( center );
// this method is expanded inlined for performance reasons.
if( distance < negRadius ) {
var matrix = object.matrixWorld;
var planes = this.planes;
var negRadius = - object.geometry.boundingSphere.radius * matrix.getMaxScaleOnAxis();
return false;
center.getPositionFromMatrix( matrix );
for ( var i = 0; i < 6; i ++ ) {
var distance = planes[ i ].distanceToPoint( center );
if ( distance < negRadius ) {
return false;
}
}
}
return true;
return true
;
}
;
},
}
()
,
intersectsSphere: function ( sphere ) {
...
...
@@ -4959,7 +4928,7 @@ THREE.extend( THREE.Frustum.prototype, {
var distance = planes[ i ].distanceToPoint( center );
if( distance < negRadius ) {
if
( distance < negRadius ) {
return false;
...
...
@@ -4977,7 +4946,7 @@ THREE.extend( THREE.Frustum.prototype, {
for ( var i = 0; i < 6; i ++ ) {
if( planes[ i ].distanceToPoint( point ) < 0 ) {
if
( planes[ i ].distanceToPoint( point ) < 0 ) {
return false;
...
...
@@ -4995,7 +4964,8 @@ THREE.extend( THREE.Frustum.prototype, {
}
} );/**
} );
/**
* @author bhouston / http://exocortex.com
*/
...
...
@@ -5876,7 +5846,7 @@ THREE.EventDispatcher = function () {
// Checking boundingSphere distance to ray
sphere.set(
object.matrixWorld.getPosition(),
object.geometry.boundingSphere.radius* object.matrixWorld.getMaxScaleOnAxis() );
object.geometry.boundingSphere.radius
* object.matrixWorld.getMaxScaleOnAxis() );
if ( ! raycaster.ray.isIntersectionSphere( sphere ) ) {
...
...
@@ -5902,7 +5872,7 @@ THREE.EventDispatcher = function () {
inverseMatrix.getInverse( object.matrixWorld );
localRay.copy( raycaster.ray ).transform( inverseMatrix );
for ( var f = 0, fl = geometry.faces.length; f < fl; f ++ ) {
var face = geometry.faces[ f ];
...
...
@@ -5910,14 +5880,14 @@ THREE.EventDispatcher = function () {
var material = isFaceMaterial === true ? objectMaterials[ face.materialIndex ] : object.material;
if ( material === undefined ) continue;
facePlane.setFromNormalAndCoplanarPoint( face.normal, vertices[face.a] );
var planeDistance = localRay.distanceToPlane( facePlane );
// bail if raycaster and plane are parallel
if ( Math.abs( planeDistance ) < precision ) continue;
// if negative distance, then plane is behind raycaster
if ( planeDistance < 0 ) continue;
...
...
@@ -5933,7 +5903,7 @@ THREE.EventDispatcher = function () {
// this can be done using the planeDistance from localRay because localRay wasn't normalized, but ray was
if ( planeDistance < raycaster.near || planeDistance > raycaster.far ) continue;
intersectPoint = localRay.at( planeDistance, intersectPoint ); // passing in intersectPoint avoids a copy
if ( face instanceof THREE.Face3 ) {
...
...
@@ -6517,7 +6487,7 @@ THREE.Projector = function () {
} else {
_vector3.
copy( object.matrixWorld.getPosition()
);
_vector3.
getPositionFromMatrix( object.matrixWorld
);
_vector3.applyProjection( _viewProjectionMatrix );
_object.z = _vector3.z;
...
...
@@ -6540,7 +6510,7 @@ THREE.Projector = function () {
} else {
_vector3.
copy( object.matrixWorld.getPosition()
);
_vector3.
getPositionFromMatrix( object.matrixWorld
);
_vector3.applyProjection( _viewProjectionMatrix );
_object.z = _vector3.z;
...
...
@@ -6559,7 +6529,7 @@ THREE.Projector = function () {
} else {
_vector3.
copy( object.matrixWorld.getPosition()
);
_vector3.
getPositionFromMatrix( object.matrixWorld
);
_vector3.applyProjection( _viewProjectionMatrix );
_object.z = _vector3.z;
...
...
@@ -13655,7 +13625,7 @@ THREE.CanvasRenderer = function ( parameters ) {
if ( light instanceof THREE.DirectionalLight ) {
var lightPosition =
light.matrixWorld.getPosition(
).normalize();
var lightPosition =
_vector3.getPositionFromMatrix( light.matrixWorld
).normalize();
var amount = normal.dot( lightPosition );
...
...
@@ -13667,7 +13637,7 @@ THREE.CanvasRenderer = function ( parameters ) {
} else if ( light instanceof THREE.PointLight ) {
var lightPosition =
light.matrixWorld.getPosition(
);
var lightPosition =
_vector3.getPositionFromMatrix( light.matrixWorld
);
var amount = normal.dot( _vector3.subVectors( lightPosition, position ).normalize() );
...
...
@@ -34891,7 +34861,7 @@ THREE.ShadowMapPlugin = function () {
shadowMatrix = light.shadowMatrix;
shadowCamera = light.shadowCamera;
shadowCamera.position.
copy( light.matrixWorld.getPosition()
);
shadowCamera.position.
getPositionFromMatrix( light.matrixWorld
);
shadowCamera.lookAt( light.target.matrixWorld.getPosition() );
shadowCamera.updateMatrixWorld();
...
...
build/three.min.js
浏览文件 @
8fae05d3
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录