Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
ee6e6e7b
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,发现更多精彩内容 >>
提交
ee6e6e7b
编写于
5月 14, 2017
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
c20a0ea5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
425 addition
and
585 deletion
+425
-585
build/three.js
build/three.js
+42
-121
build/three.min.js
build/three.min.js
+341
-343
build/three.module.js
build/three.module.js
+42
-121
未找到文件。
build/three.js
浏览文件 @
ee6e6e7b
...
...
@@ -756,17 +756,11 @@
clampScalar: function () {
var min, max;
var min = new Vector2();
var max = new Vector2();
return function clampScalar( minVal, maxVal ) {
if ( min === undefined ) {
min = new Vector2();
max = new Vector2();
}
min.set( minVal, minVal );
max.set( maxVal, maxVal );
...
...
@@ -2325,7 +2319,8 @@
// assumes direction vectors vFrom and vTo are normalized
var v1, r;
var v1 = new Vector3();
var r;
var EPS = 0.000001;
...
...
@@ -2811,7 +2806,7 @@
applyEuler: function () {
var quaternion;
var quaternion
= new Quaternion()
;
return function applyEuler( euler ) {
...
...
@@ -2821,8 +2816,6 @@
}
if ( quaternion === undefined ) quaternion = new Quaternion();
return this.applyQuaternion( quaternion.setFromEuler( euler ) );
};
...
...
@@ -2831,12 +2824,10 @@
applyAxisAngle: function () {
var quaternion;
var quaternion
= new Quaternion()
;
return function applyAxisAngle( axis, angle ) {
if ( quaternion === undefined ) quaternion = new Quaternion();
return this.applyQuaternion( quaternion.setFromAxisAngle( axis, angle ) );
};
...
...
@@ -2894,12 +2885,10 @@
project: function () {
var matrix;
var matrix
= new Matrix4()
;
return function project( camera ) {
if ( matrix === undefined ) matrix = new Matrix4();
matrix.multiplyMatrices( camera.projectionMatrix, matrix.getInverse( camera.matrixWorld ) );
return this.applyMatrix4( matrix );
...
...
@@ -2909,12 +2898,10 @@
unproject: function () {
var matrix;
var matrix
= new Matrix4()
;
return function unproject( camera ) {
if ( matrix === undefined ) matrix = new Matrix4();
matrix.multiplyMatrices( camera.matrixWorld, matrix.getInverse( camera.projectionMatrix ) );
return this.applyMatrix4( matrix );
...
...
@@ -2988,17 +2975,11 @@
clampScalar: function () {
var min, max;
var min = new Vector3();
var max = new Vector3();
return function clampScalar( minVal, maxVal ) {
if ( min === undefined ) {
min = new Vector3();
max = new Vector3();
}
min.set( minVal, minVal, minVal );
max.set( maxVal, maxVal, maxVal );
...
...
@@ -3162,12 +3143,10 @@
projectOnPlane: function () {
var v1;
var v1
= new Vector3()
;
return function projectOnPlane( planeNormal ) {
if ( v1 === undefined ) v1 = new Vector3();
v1.copy( this ).projectOnVector( planeNormal );
return this.sub( v1 );
...
...
@@ -3181,12 +3160,10 @@
// reflect incident vector off plane orthogonal to normal
// normal is assumed to have unit length
var v1;
var v1
= new Vector3()
;
return function reflect( normal ) {
if ( v1 === undefined ) v1 = new Vector3();
return this.sub( v1.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) );
};
...
...
@@ -3442,12 +3419,10 @@
extractRotation: function () {
var v1;
var v1
= new Vector3()
;
return function extractRotation( m ) {
if ( v1 === undefined ) v1 = new Vector3();
var te = this.elements;
var me = m.elements;
...
...
@@ -3640,18 +3615,12 @@
lookAt: function () {
var x, y, z;
var x = new Vector3();
var y = new Vector3();
var z = new Vector3();
return function lookAt( eye, target, up ) {
if ( x === undefined ) {
x = new Vector3();
y = new Vector3();
z = new Vector3();
}
var te = this.elements;
z.subVectors( eye, target );
...
...
@@ -3763,12 +3732,10 @@
applyToBufferAttribute: function () {
var v1;
var v1
= new Vector3()
;
return function applyToBufferAttribute( attribute ) {
if ( v1 === undefined ) v1 = new Vector3();
for ( var i = 0, l = attribute.count; i < l; i ++ ) {
v1.x = attribute.getX( i );
...
...
@@ -4085,17 +4052,11 @@
decompose: function () {
var vector, matrix;
var vector = new Vector3();
var matrix = new Matrix4();
return function decompose( position, quaternion, scale ) {
if ( vector === undefined ) {
vector = new Vector3();
matrix = new Matrix4();
}
var te = this.elements;
var sx = vector.set( te[ 0 ], te[ 1 ], te[ 2 ] ).length();
...
...
@@ -7979,12 +7940,10 @@
intersectsSphere: ( function () {
var closestPoint;
var closestPoint
= new Vector3()
;
return function intersectsSphere( sphere ) {
if ( closestPoint === undefined ) closestPoint = new Vector3();
// Find the point on the AABB closest to the sphere center.
this.clampPoint( sphere.center, closestPoint );
...
...
@@ -8179,12 +8138,10 @@
setFromPoints: function () {
var box;
var box
= new Box3()
;
return function setFromPoints( points, optionalCenter ) {
if ( box === undefined ) box = new Box3(); // see #10547
var center = this.center;
if ( optionalCenter !== undefined ) {
...
...
@@ -8421,12 +8378,10 @@
applyToBufferAttribute: function () {
var v1;
var v1
= new Vector3()
;
return function applyToBufferAttribute( attribute ) {
if ( v1 === undefined ) v1 = new Vector3();
for ( var i = 0, l = attribute.count; i < l; i ++ ) {
v1.x = attribute.getX( i );
...
...
@@ -10311,12 +10266,10 @@
setFromQuaternion: function () {
var matrix;
var matrix
= new Matrix4()
;
return function setFromQuaternion( q, order, update ) {
if ( matrix === undefined ) matrix = new Matrix4();
matrix.makeRotationFromQuaternion( q );
return this.setFromRotationMatrix( matrix, order, update );
...
...
@@ -11510,19 +11463,13 @@
closestPointToPoint: function () {
var plane, edgeList, projectedPoint, closestPoint;
var plane = new Plane();
var edgeList = [ new Line3(), new Line3(), new Line3() ];
var projectedPoint = new Vector3();
var closestPoint = new Vector3();
return function closestPointToPoint( point, optionalTarget ) {
if ( plane === undefined ) {
plane = new Plane();
edgeList = [ new Line3(), new Line3(), new Line3() ];
projectedPoint = new Vector3();
closestPoint = new Vector3();
}
var result = optionalTarget || new Vector3();
var minDistance = Infinity;
...
...
@@ -12553,12 +12500,10 @@
// rotate geometry around world x-axis
var m1;
var m1
= new Matrix4()
;
return function rotateX( angle ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeRotationX( angle );
this.applyMatrix( m1 );
...
...
@@ -12573,12 +12518,10 @@
// rotate geometry around world y-axis
var m1;
var m1
= new Matrix4()
;
return function rotateY( angle ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeRotationY( angle );
this.applyMatrix( m1 );
...
...
@@ -12593,12 +12536,10 @@
// rotate geometry around world z-axis
var m1;
var m1
= new Matrix4()
;
return function rotateZ( angle ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeRotationZ( angle );
this.applyMatrix( m1 );
...
...
@@ -12613,12 +12554,10 @@
// translate geometry
var m1;
var m1
= new Matrix4()
;
return function translate( x, y, z ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeTranslation( x, y, z );
this.applyMatrix( m1 );
...
...
@@ -12633,12 +12572,10 @@
// scale geometry
var m1;
var m1
= new Matrix4()
;
return function scale( x, y, z ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeScale( x, y, z );
this.applyMatrix( m1 );
...
...
@@ -12651,12 +12588,10 @@
lookAt: function () {
var obj;
var obj
= new Object3D()
;
return function lookAt( vector ) {
if ( obj === undefined ) obj = new Object3D();
obj.lookAt( vector );
obj.updateMatrix();
...
...
@@ -14051,12 +13986,10 @@
// rotate geometry around world x-axis
var m1;
var m1
= new Matrix4()
;
return function rotateX( angle ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeRotationX( angle );
this.applyMatrix( m1 );
...
...
@@ -14071,12 +14004,10 @@
// rotate geometry around world y-axis
var m1;
var m1
= new Matrix4()
;
return function rotateY( angle ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeRotationY( angle );
this.applyMatrix( m1 );
...
...
@@ -14091,12 +14022,10 @@
// rotate geometry around world z-axis
var m1;
var m1
= new Matrix4()
;
return function rotateZ( angle ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeRotationZ( angle );
this.applyMatrix( m1 );
...
...
@@ -14111,12 +14040,10 @@
// translate geometry
var m1;
var m1
= new Matrix4()
;
return function translate( x, y, z ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeTranslation( x, y, z );
this.applyMatrix( m1 );
...
...
@@ -14131,12 +14058,10 @@
// scale geometry
var m1;
var m1
= new Matrix4()
;
return function scale( x, y, z ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeScale( x, y, z );
this.applyMatrix( m1 );
...
...
@@ -14149,12 +14074,10 @@
lookAt: function () {
var obj;
var obj
= new Object3D()
;
return function lookAt( vector ) {
if ( obj === undefined ) obj = new Object3D();
obj.lookAt( vector );
obj.updateMatrix();
...
...
@@ -32603,14 +32526,12 @@
CustomBlending: CustomBlending
};
var color, textureLoader, materialLoader;
var color = new Color();
var textureLoader = new TextureLoader();
var materialLoader = new MaterialLoader();
return function createMaterial( m, texturePath, crossOrigin ) {
if ( color === undefined ) color = new Color();
if ( textureLoader === undefined ) textureLoader = new TextureLoader();
if ( materialLoader === undefined ) materialLoader = new MaterialLoader();
// convert from old material format
var textures = {};
...
...
build/three.min.js
浏览文件 @
ee6e6e7b
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
build/three.module.js
浏览文件 @
ee6e6e7b
...
...
@@ -750,17 +750,11 @@ Object.assign( Vector2.prototype, {
clampScalar: function () {
var min, max;
var min = new Vector2();
var max = new Vector2();
return function clampScalar( minVal, maxVal ) {
if ( min === undefined ) {
min = new Vector2();
max = new Vector2();
}
min.set( minVal, minVal );
max.set( maxVal, maxVal );
...
...
@@ -2319,7 +2313,8 @@ Object.assign( Quaternion.prototype, {
// assumes direction vectors vFrom and vTo are normalized
var v1, r;
var v1 = new Vector3();
var r;
var EPS = 0.000001;
...
...
@@ -2805,7 +2800,7 @@ Object.assign( Vector3.prototype, {
applyEuler: function () {
var quaternion;
var quaternion
= new Quaternion()
;
return function applyEuler( euler ) {
...
...
@@ -2815,8 +2810,6 @@ Object.assign( Vector3.prototype, {
}
if ( quaternion === undefined ) quaternion = new Quaternion();
return this.applyQuaternion( quaternion.setFromEuler( euler ) );
};
...
...
@@ -2825,12 +2818,10 @@ Object.assign( Vector3.prototype, {
applyAxisAngle: function () {
var quaternion;
var quaternion
= new Quaternion()
;
return function applyAxisAngle( axis, angle ) {
if ( quaternion === undefined ) quaternion = new Quaternion();
return this.applyQuaternion( quaternion.setFromAxisAngle( axis, angle ) );
};
...
...
@@ -2888,12 +2879,10 @@ Object.assign( Vector3.prototype, {
project: function () {
var matrix;
var matrix
= new Matrix4()
;
return function project( camera ) {
if ( matrix === undefined ) matrix = new Matrix4();
matrix.multiplyMatrices( camera.projectionMatrix, matrix.getInverse( camera.matrixWorld ) );
return this.applyMatrix4( matrix );
...
...
@@ -2903,12 +2892,10 @@ Object.assign( Vector3.prototype, {
unproject: function () {
var matrix;
var matrix
= new Matrix4()
;
return function unproject( camera ) {
if ( matrix === undefined ) matrix = new Matrix4();
matrix.multiplyMatrices( camera.matrixWorld, matrix.getInverse( camera.projectionMatrix ) );
return this.applyMatrix4( matrix );
...
...
@@ -2982,17 +2969,11 @@ Object.assign( Vector3.prototype, {
clampScalar: function () {
var min, max;
var min = new Vector3();
var max = new Vector3();
return function clampScalar( minVal, maxVal ) {
if ( min === undefined ) {
min = new Vector3();
max = new Vector3();
}
min.set( minVal, minVal, minVal );
max.set( maxVal, maxVal, maxVal );
...
...
@@ -3156,12 +3137,10 @@ Object.assign( Vector3.prototype, {
projectOnPlane: function () {
var v1;
var v1
= new Vector3()
;
return function projectOnPlane( planeNormal ) {
if ( v1 === undefined ) v1 = new Vector3();
v1.copy( this ).projectOnVector( planeNormal );
return this.sub( v1 );
...
...
@@ -3175,12 +3154,10 @@ Object.assign( Vector3.prototype, {
// reflect incident vector off plane orthogonal to normal
// normal is assumed to have unit length
var v1;
var v1
= new Vector3()
;
return function reflect( normal ) {
if ( v1 === undefined ) v1 = new Vector3();
return this.sub( v1.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) );
};
...
...
@@ -3436,12 +3413,10 @@ Object.assign( Matrix4.prototype, {
extractRotation: function () {
var v1;
var v1
= new Vector3()
;
return function extractRotation( m ) {
if ( v1 === undefined ) v1 = new Vector3();
var te = this.elements;
var me = m.elements;
...
...
@@ -3634,18 +3609,12 @@ Object.assign( Matrix4.prototype, {
lookAt: function () {
var x, y, z;
var x = new Vector3();
var y = new Vector3();
var z = new Vector3();
return function lookAt( eye, target, up ) {
if ( x === undefined ) {
x = new Vector3();
y = new Vector3();
z = new Vector3();
}
var te = this.elements;
z.subVectors( eye, target );
...
...
@@ -3757,12 +3726,10 @@ Object.assign( Matrix4.prototype, {
applyToBufferAttribute: function () {
var v1;
var v1
= new Vector3()
;
return function applyToBufferAttribute( attribute ) {
if ( v1 === undefined ) v1 = new Vector3();
for ( var i = 0, l = attribute.count; i < l; i ++ ) {
v1.x = attribute.getX( i );
...
...
@@ -4079,17 +4046,11 @@ Object.assign( Matrix4.prototype, {
decompose: function () {
var vector, matrix;
var vector = new Vector3();
var matrix = new Matrix4();
return function decompose( position, quaternion, scale ) {
if ( vector === undefined ) {
vector = new Vector3();
matrix = new Matrix4();
}
var te = this.elements;
var sx = vector.set( te[ 0 ], te[ 1 ], te[ 2 ] ).length();
...
...
@@ -7973,12 +7934,10 @@ Object.assign( Box3.prototype, {
intersectsSphere: ( function () {
var closestPoint;
var closestPoint
= new Vector3()
;
return function intersectsSphere( sphere ) {
if ( closestPoint === undefined ) closestPoint = new Vector3();
// Find the point on the AABB closest to the sphere center.
this.clampPoint( sphere.center, closestPoint );
...
...
@@ -8173,12 +8132,10 @@ Object.assign( Sphere.prototype, {
setFromPoints: function () {
var box;
var box
= new Box3()
;
return function setFromPoints( points, optionalCenter ) {
if ( box === undefined ) box = new Box3(); // see #10547
var center = this.center;
if ( optionalCenter !== undefined ) {
...
...
@@ -8415,12 +8372,10 @@ Object.assign( Matrix3.prototype, {
applyToBufferAttribute: function () {
var v1;
var v1
= new Vector3()
;
return function applyToBufferAttribute( attribute ) {
if ( v1 === undefined ) v1 = new Vector3();
for ( var i = 0, l = attribute.count; i < l; i ++ ) {
v1.x = attribute.getX( i );
...
...
@@ -10305,12 +10260,10 @@ Object.assign( Euler.prototype, {
setFromQuaternion: function () {
var matrix;
var matrix
= new Matrix4()
;
return function setFromQuaternion( q, order, update ) {
if ( matrix === undefined ) matrix = new Matrix4();
matrix.makeRotationFromQuaternion( q );
return this.setFromRotationMatrix( matrix, order, update );
...
...
@@ -11504,19 +11457,13 @@ Object.assign( Triangle.prototype, {
closestPointToPoint: function () {
var plane, edgeList, projectedPoint, closestPoint;
var plane = new Plane();
var edgeList = [ new Line3(), new Line3(), new Line3() ];
var projectedPoint = new Vector3();
var closestPoint = new Vector3();
return function closestPointToPoint( point, optionalTarget ) {
if ( plane === undefined ) {
plane = new Plane();
edgeList = [ new Line3(), new Line3(), new Line3() ];
projectedPoint = new Vector3();
closestPoint = new Vector3();
}
var result = optionalTarget || new Vector3();
var minDistance = Infinity;
...
...
@@ -12547,12 +12494,10 @@ Object.assign( Geometry.prototype, EventDispatcher.prototype, {
// rotate geometry around world x-axis
var m1;
var m1
= new Matrix4()
;
return function rotateX( angle ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeRotationX( angle );
this.applyMatrix( m1 );
...
...
@@ -12567,12 +12512,10 @@ Object.assign( Geometry.prototype, EventDispatcher.prototype, {
// rotate geometry around world y-axis
var m1;
var m1
= new Matrix4()
;
return function rotateY( angle ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeRotationY( angle );
this.applyMatrix( m1 );
...
...
@@ -12587,12 +12530,10 @@ Object.assign( Geometry.prototype, EventDispatcher.prototype, {
// rotate geometry around world z-axis
var m1;
var m1
= new Matrix4()
;
return function rotateZ( angle ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeRotationZ( angle );
this.applyMatrix( m1 );
...
...
@@ -12607,12 +12548,10 @@ Object.assign( Geometry.prototype, EventDispatcher.prototype, {
// translate geometry
var m1;
var m1
= new Matrix4()
;
return function translate( x, y, z ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeTranslation( x, y, z );
this.applyMatrix( m1 );
...
...
@@ -12627,12 +12566,10 @@ Object.assign( Geometry.prototype, EventDispatcher.prototype, {
// scale geometry
var m1;
var m1
= new Matrix4()
;
return function scale( x, y, z ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeScale( x, y, z );
this.applyMatrix( m1 );
...
...
@@ -12645,12 +12582,10 @@ Object.assign( Geometry.prototype, EventDispatcher.prototype, {
lookAt: function () {
var obj;
var obj
= new Object3D()
;
return function lookAt( vector ) {
if ( obj === undefined ) obj = new Object3D();
obj.lookAt( vector );
obj.updateMatrix();
...
...
@@ -14045,12 +13980,10 @@ Object.assign( BufferGeometry.prototype, EventDispatcher.prototype, {
// rotate geometry around world x-axis
var m1;
var m1
= new Matrix4()
;
return function rotateX( angle ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeRotationX( angle );
this.applyMatrix( m1 );
...
...
@@ -14065,12 +13998,10 @@ Object.assign( BufferGeometry.prototype, EventDispatcher.prototype, {
// rotate geometry around world y-axis
var m1;
var m1
= new Matrix4()
;
return function rotateY( angle ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeRotationY( angle );
this.applyMatrix( m1 );
...
...
@@ -14085,12 +14016,10 @@ Object.assign( BufferGeometry.prototype, EventDispatcher.prototype, {
// rotate geometry around world z-axis
var m1;
var m1
= new Matrix4()
;
return function rotateZ( angle ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeRotationZ( angle );
this.applyMatrix( m1 );
...
...
@@ -14105,12 +14034,10 @@ Object.assign( BufferGeometry.prototype, EventDispatcher.prototype, {
// translate geometry
var m1;
var m1
= new Matrix4()
;
return function translate( x, y, z ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeTranslation( x, y, z );
this.applyMatrix( m1 );
...
...
@@ -14125,12 +14052,10 @@ Object.assign( BufferGeometry.prototype, EventDispatcher.prototype, {
// scale geometry
var m1;
var m1
= new Matrix4()
;
return function scale( x, y, z ) {
if ( m1 === undefined ) m1 = new Matrix4();
m1.makeScale( x, y, z );
this.applyMatrix( m1 );
...
...
@@ -14143,12 +14068,10 @@ Object.assign( BufferGeometry.prototype, EventDispatcher.prototype, {
lookAt: function () {
var obj;
var obj
= new Object3D()
;
return function lookAt( vector ) {
if ( obj === undefined ) obj = new Object3D();
obj.lookAt( vector );
obj.updateMatrix();
...
...
@@ -32597,14 +32520,12 @@ Object.assign( Loader.prototype, {
CustomBlending: CustomBlending
};
var color, textureLoader, materialLoader;
var color = new Color();
var textureLoader = new TextureLoader();
var materialLoader = new MaterialLoader();
return function createMaterial( m, texturePath, crossOrigin ) {
if ( color === undefined ) color = new Color();
if ( textureLoader === undefined ) textureLoader = new TextureLoader();
if ( materialLoader === undefined ) materialLoader = new MaterialLoader();
// convert from old material format
var textures = {};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录