Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
5f663538
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,发现更多精彩内容 >>
提交
5f663538
编写于
2月 05, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
fd7302fd
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
321 addition
and
310 deletion
+321
-310
build/three.js
build/three.js
+30
-20
build/three.min.js
build/three.min.js
+290
-289
editor/index.html
editor/index.html
+1
-1
未找到文件。
build/three.js
浏览文件 @
5f663538
...
@@ -4026,6 +4026,8 @@ THREE.extend( THREE.Matrix4.prototype, {
...
@@ -4026,6 +4026,8 @@ THREE.extend( THREE.Matrix4.prototype, {
return function () {
return function () {
console.warn( 'DEPRECATED: Matrix4\'s .getPosition() has been removed. Use Vector3.getPositionFromMatrix( matrix ) instead.' );
var te = this.elements;
var te = this.elements;
return v1.set( te[12], te[13], te[14] );
return v1.set( te[12], te[13], te[14] );
...
@@ -5890,6 +5892,7 @@ THREE.EventDispatcher = function () {
...
@@ -5890,6 +5892,7 @@ THREE.EventDispatcher = function () {
var localRay = new THREE.Ray();
var localRay = new THREE.Ray();
var facePlane = new THREE.Plane();
var facePlane = new THREE.Plane();
var intersectPoint = new THREE.Vector3();
var intersectPoint = new THREE.Vector3();
var matrixPosition = new THREE.Vector3();
var inverseMatrix = new THREE.Matrix4();
var inverseMatrix = new THREE.Matrix4();
...
@@ -5903,7 +5906,8 @@ THREE.EventDispatcher = function () {
...
@@ -5903,7 +5906,8 @@ THREE.EventDispatcher = function () {
if ( object instanceof THREE.Particle ) {
if ( object instanceof THREE.Particle ) {
var distance = raycaster.ray.distanceToPoint( object.matrixWorld.getPosition() );
matrixPosition.getPositionFromMatrix( object.matrixWorld );
var distance = raycaster.ray.distanceToPoint( matrixPosition );
if ( distance > object.scale.x ) {
if ( distance > object.scale.x ) {
...
@@ -5923,8 +5927,9 @@ THREE.EventDispatcher = function () {
...
@@ -5923,8 +5927,9 @@ THREE.EventDispatcher = function () {
} else if ( object instanceof THREE.Mesh ) {
} else if ( object instanceof THREE.Mesh ) {
// Checking boundingSphere distance to ray
// Checking boundingSphere distance to ray
matrixPosition.getPositionFromMatrix( object.matrixWorld );
sphere.set(
sphere.set(
object.matrixWorld.getPosition()
,
matrixPosition
,
object.geometry.boundingSphere.radius * object.matrixWorld.getMaxScaleOnAxis() );
object.geometry.boundingSphere.radius * object.matrixWorld.getMaxScaleOnAxis() );
if ( ! raycaster.ray.isIntersectionSphere( sphere ) ) {
if ( ! raycaster.ray.isIntersectionSphere( sphere ) ) {
...
@@ -21970,7 +21975,7 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -21970,7 +21975,7 @@ THREE.WebGLRenderer = function ( parameters ) {
} else {
} else {
_vector3.
copy( object.matrixWorld.getPosition()
);
_vector3.
getPositionFromMatrix( object.matrixWorld
);
_vector3.applyProjection( _projScreenMatrix );
_vector3.applyProjection( _projScreenMatrix );
webglObject.z = _vector3.z;
webglObject.z = _vector3.z;
...
@@ -23180,8 +23185,8 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -23180,8 +23185,8 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( p_uniforms.cameraPosition !== null ) {
if ( p_uniforms.cameraPosition !== null ) {
var position = camera.matrixWorld.getPosition(
);
_vector3.getPositionFromMatrix( camera.matrixWorld
);
_gl.uniform3f( p_uniforms.cameraPosition,
position.x, position.y, position
.z );
_gl.uniform3f( p_uniforms.cameraPosition,
_vector3.x, _vector3.y, _vector3
.z );
}
}
...
@@ -23782,8 +23787,9 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -23782,8 +23787,9 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( ! light.visible ) continue;
if ( ! light.visible ) continue;
_direction.copy( light.matrixWorld.getPosition() );
_direction.getPositionFromMatrix( light.matrixWorld );
_direction.sub( light.target.matrixWorld.getPosition() );
_vector3.getPositionFromMatrix( light.target.matrixWorld );
_direction.sub( _vector3 );
_direction.normalize();
_direction.normalize();
// skip lights with undefined direction
// skip lights with undefined direction
...
@@ -23827,11 +23833,11 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -23827,11 +23833,11 @@ THREE.WebGLRenderer = function ( parameters ) {
}
}
position = light.matrixWorld.getPosition(
);
_vector3.getPositionFromMatrix( light.matrixWorld
);
pointPositions[ pointOffset ] =
position
.x;
pointPositions[ pointOffset ] =
_vector3
.x;
pointPositions[ pointOffset + 1 ] =
position
.y;
pointPositions[ pointOffset + 1 ] =
_vector3
.y;
pointPositions[ pointOffset + 2 ] =
position
.z;
pointPositions[ pointOffset + 2 ] =
_vector3
.z;
pointDistances[ pointLength ] = distance;
pointDistances[ pointLength ] = distance;
...
@@ -23855,16 +23861,17 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -23855,16 +23861,17 @@ THREE.WebGLRenderer = function ( parameters ) {
}
}
position = light.matrixWorld.getPosition(
);
_vector3.getPositionFromMatrix( light.matrixWorld
);
spotPositions[ spotOffset ] =
position
.x;
spotPositions[ spotOffset ] =
_vector3
.x;
spotPositions[ spotOffset + 1 ] =
position
.y;
spotPositions[ spotOffset + 1 ] =
_vector3
.y;
spotPositions[ spotOffset + 2 ] =
position
.z;
spotPositions[ spotOffset + 2 ] =
_vector3
.z;
spotDistances[ spotLength ] = distance;
spotDistances[ spotLength ] = distance;
_direction.copy( position );
_direction.copy( _vector3 );
_direction.sub( light.target.matrixWorld.getPosition() );
_vector3.getPositionFromMatrix( light.target.matrixWorld );
_direction.sub( _vector3 );
_direction.normalize();
_direction.normalize();
spotDirections[ spotOffset ] = _direction.x;
spotDirections[ spotOffset ] = _direction.x;
...
@@ -23882,7 +23889,7 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -23882,7 +23889,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( ! light.visible ) continue;
if ( ! light.visible ) continue;
_direction.
copy( light.matrixWorld.getPosition()
);
_direction.
getPositionFromMatrix( light.matrixWorld
);
_direction.normalize();
_direction.normalize();
// skip lights with undefined direction
// skip lights with undefined direction
...
@@ -34769,7 +34776,9 @@ THREE.ShadowMapPlugin = function () {
...
@@ -34769,7 +34776,9 @@ THREE.ShadowMapPlugin = function () {
_projScreenMatrix = new THREE.Matrix4(),
_projScreenMatrix = new THREE.Matrix4(),
_min = new THREE.Vector3(),
_min = new THREE.Vector3(),
_max = new THREE.Vector3();
_max = new THREE.Vector3(),
_matrixPosition = new THREE.Vector3();
this.init = function ( renderer ) {
this.init = function ( renderer ) {
...
@@ -34954,7 +34963,8 @@ THREE.ShadowMapPlugin = function () {
...
@@ -34954,7 +34963,8 @@ THREE.ShadowMapPlugin = function () {
shadowCamera = light.shadowCamera;
shadowCamera = light.shadowCamera;
shadowCamera.position.getPositionFromMatrix( light.matrixWorld );
shadowCamera.position.getPositionFromMatrix( light.matrixWorld );
shadowCamera.lookAt( light.target.matrixWorld.getPosition() );
_matrixPosition.getPositionFromMatrix( light.target.matrixWorld );
shadowCamera.lookAt( _matrixPosition );
shadowCamera.updateMatrixWorld();
shadowCamera.updateMatrixWorld();
shadowCamera.matrixWorldInverse.getInverse( shadowCamera.matrixWorld );
shadowCamera.matrixWorldInverse.getInverse( shadowCamera.matrixWorld );
...
...
build/three.min.js
浏览文件 @
5f663538
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
editor/index.html
浏览文件 @
5f663538
...
@@ -309,7 +309,7 @@
...
@@ -309,7 +309,7 @@
worker
.
onmessage
=
function
(
event
)
{
worker
.
onmessage
=
function
(
event
)
{
event
.
data
.
metadata
=
{
'
format
'
:
2
};
event
.
data
.
metadata
=
{
format
:
2
};
handleJSON
(
event
.
data
);
handleJSON
(
event
.
data
);
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录