Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
d634b1dc
T
three.js
项目概览
车家大少爷
/
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,发现更多精彩内容 >>
提交
d634b1dc
编写于
6月 29, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
8edd6bd0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
53 addition
and
3 deletion
+53
-3
build/three.js
build/three.js
+51
-1
build/three.min.js
build/three.min.js
+2
-2
未找到文件。
build/three.js
浏览文件 @
d634b1dc
...
...
@@ -2923,6 +2923,8 @@ THREE.Rotation.prototype = {
},
//
set: function ( x, y, z ) {
this.euler.x = x;
...
...
@@ -2931,6 +2933,50 @@ THREE.Rotation.prototype = {
this.quaternion.setFromEuler( this.euler );
return this;
},
setX: function ( x ) {
this.x = x;
return this;
},
setY: function ( y ) {
this.y = y;
return this;
},
setZ: function ( z ) {
this.z = z;
return this;
},
setFromRotationMatrix: function ( m, order ) {
this.euler.setFromRotationMatrix( m, order );
this.quaternion.setFromEuler( this.euler );
return this;
},
setFromQuaternion: function ( q, order ) {
this.euler.setFromQuaternion( q, order );
this.quaternion.copy( q );
return this;
},
copy: function ( rotation ) {
...
...
@@ -2938,13 +2984,17 @@ THREE.Rotation.prototype = {
this.euler.copy( rotation.euler );
this.quaternion.setFromEuler( this.euler );
return this;
},
fromArray: function( array ) {
fromArray: function
( array ) {
this.euler.fromArray( array );
this.quaternion.setFromEuler( this.euler );
return this;
},
toArray: function () {
...
...
build/three.min.js
浏览文件 @
d634b1dc
...
...
@@ -61,8 +61,8 @@ THREE.Euler.prototype={constructor:THREE.Euler,set:function(a,b,c,d){this.x=a;th
(a.x*a.w-a.y*a.z),g-d-e+f),this.y=Math.asin(c(2*(a.x*a.z+a.y*a.w))),this.z=Math.atan2(2*(a.z*a.w-a.x*a.y),g+d-e-f)):"YXZ"===b?(this.x=Math.asin(c(2*(a.x*a.w-a.y*a.z))),this.y=Math.atan2(2*(a.x*a.z+a.y*a.w),g-d-e+f),this.z=Math.atan2(2*(a.x*a.y+a.z*a.w),g-d+e-f)):"ZXY"===b?(this.x=Math.asin(c(2*(a.x*a.w+a.y*a.z))),this.y=Math.atan2(2*(a.y*a.w-a.z*a.x),g-d-e+f),this.z=Math.atan2(2*(a.z*a.w-a.x*a.y),g-d+e-f)):"ZYX"===b?(this.x=Math.atan2(2*(a.x*a.w+a.z*a.y),g-d-e+f),this.y=Math.asin(c(2*(a.y*a.w-a.x*
a.z))),this.z=Math.atan2(2*(a.x*a.y+a.z*a.w),g+d-e-f)):"YZX"===b?(this.x=Math.atan2(2*(a.x*a.w-a.z*a.y),g-d+e-f),this.y=Math.atan2(2*(a.y*a.w-a.x*a.z),g+d-e-f),this.z=Math.asin(c(2*(a.x*a.y+a.z*a.w)))):"XZY"===b?(this.x=Math.atan2(2*(a.x*a.w+a.y*a.z),g-d+e-f),this.y=Math.atan2(2*(a.x*a.z+a.y*a.w),g+d-e-f),this.z=Math.asin(c(2*(a.z*a.w-a.x*a.y)))):console.warn("WARNING: Euler.setFromQuaternion() given unsupported order: "+b);this.order=b;return this},reorder:function(){var a=new THREE.Quaternion;return function(b){a.setFromEuler(this);
this.setFromQuaternion(a,b)}}(),fromArray:function(a){this.x=a[0];this.y=a[1];this.z=a[2];this.order=a[3];return this},toArray:function(){return[this.x,this.y,this.z,this.order]},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.order===this.order},clone:function(){return new THREE.Euler(this.x,this.y,this.z,this.order)}};THREE.Rotation=function(a){this.euler=(new THREE.Euler).setFromQuaternion(a);this.quaternion=a};
THREE
.
Rotation
.
prototype
=
{
get
x
(){
return
this
.
euler
.
x
},
set
x
(
a
){
this
.
euler
.
x
=
a
;
this
.
quaternion
.
setFromEuler
(
this
.
euler
)},
get
y
(){
return
this
.
euler
.
y
},
set
y
(
a
){
this
.
euler
.
y
=
a
;
this
.
quaternion
.
setFromEuler
(
this
.
euler
)},
get
z
(){
return
this
.
euler
.
z
},
set
z
(
a
){
this
.
euler
.
z
=
a
;
this
.
quaternion
.
setFromEuler
(
this
.
euler
)},
set
:
function
(
a
,
b
,
c
){
this
.
euler
.
x
=
a
;
this
.
euler
.
y
=
b
;
this
.
euler
.
z
=
c
;
this
.
quaternion
.
setFromEuler
(
this
.
euler
)
},
copy
:
function
(
a
){
this
.
euler
.
copy
(
a
.
euler
);
this
.
quaternion
.
setFromEuler
(
this
.
euler
)
},
fromArray
:
function
(
a
){
this
.
euler
.
fromArray
(
a
);
this
.
quaternion
.
setFromEuler
(
this
.
euler
)
},
toArray
:
function
(){
return
this
.
euler
.
toArray
()}};
THREE
.
Line3
=
function
(
a
,
b
){
this
.
start
=
void
0
!==
a
?
a
:
new
THREE
.
Vector3
;
this
.
end
=
void
0
!==
b
?
b
:
new
THREE
.
Vector3
};
THREE.Rotation.prototype={get x(){return this.euler.x},set x(a){this.euler.x=a;this.quaternion.setFromEuler(this.euler)},get y(){return this.euler.y},set y(a){this.euler.y=a;this.quaternion.setFromEuler(this.euler)},get z(){return this.euler.z},set z(a){this.euler.z=a;this.quaternion.setFromEuler(this.euler)},set:function(a,b,c){this.euler.x=a;this.euler.y=b;this.euler.z=c;this.quaternion.setFromEuler(this.euler)
;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this
},
setZ:function(a){this.z=a;return this},setFromRotationMatrix:function(a,b){this.euler.setFromRotationMatrix(a,b);this.quaternion.setFromEuler(this.euler);return this},setFromQuaternion:function(a,b){this.euler.setFromQuaternion(a,b);this.quaternion.copy(a);return this},copy:function(a){this.euler.copy(a.euler);this.quaternion.setFromEuler(this.euler);return this},fromArray:function(a){this.euler.fromArray(a);this.quaternion.setFromEuler(this.euler);return this
},toArray:function(){return this.euler.toArray()}};THREE.Line3=function(a,b){this.start=void 0!==a?a:new THREE.Vector3;this.end=void 0!==b?b:new THREE.Vector3};
THREE.Line3.prototype={constructor:THREE.Line3,set:function(a,b){this.start.copy(a);this.end.copy(b);return this},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},center:function(a){return(a||new THREE.Vector3).addVectors(this.start,this.end).multiplyScalar(0.5)},delta:function(a){return(a||new THREE.Vector3).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,
b){var c=b||new THREE.Vector3;return this.delta(c).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(c,d){a.subVectors(c,this.start);b.subVectors(this.end,this.start);var e=b.dot(b),e=b.dot(a)/e;d&&(e=THREE.Math.clamp(e,0,1));return e}}(),closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);c=c||new THREE.Vector3;return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);
this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)},clone:function(){return(new THREE.Line3).copy(this)}};THREE.Box2=function(a,b){this.min=void 0!==a?a:new THREE.Vector2(Infinity,Infinity);this.max=void 0!==b?b:new THREE.Vector2(-Infinity,-Infinity)};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录