Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
c32f89a1
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,发现更多精彩内容 >>
提交
c32f89a1
编写于
7月 09, 2011
作者:
A
alteredq
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
f1e4f59a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
5 addition
and
5 deletion
+5
-5
build/Three.js
build/Three.js
+1
-1
build/custom/ThreeCanvas.js
build/custom/ThreeCanvas.js
+1
-1
build/custom/ThreeDOM.js
build/custom/ThreeDOM.js
+1
-1
build/custom/ThreeSVG.js
build/custom/ThreeSVG.js
+1
-1
build/custom/ThreeWebGL.js
build/custom/ThreeWebGL.js
+1
-1
未找到文件。
build/Three.js
浏览文件 @
c32f89a1
...
...
@@ -6,7 +6,7 @@ THREE.Vector2.prototype={set:function(b,c){this.x=b;this.y=c;return this},copy:f
(
this
.
x
/=
b
,
this
.
y
/=
b
):
this
.
set
(
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
b
){
return
this
.
x
*
b
.
x
+
this
.
y
*
b
.
y
},
lengthSq
:
function
(){
return
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
lengthSq
())},
normalize
:
function
(){
return
this
.
divideScalar
(
this
.
length
())},
distanceTo
:
function
(
b
){
return
Math
.
sqrt
(
this
.
distanceToSquared
(
b
))},
distanceToSquared
:
function
(
b
){
var
c
=
this
.
x
-
b
.
x
,
b
=
this
.
y
-
b
.
y
;
return
c
*
c
+
b
*
b
},
setLength
:
function
(
b
){
return
this
.
normalize
().
multiplyScalar
(
b
)},
unit
:
function
(){
return
this
.
normalize
()},
equals
:
function
(
b
){
return
b
.
x
==
this
.
x
&&
b
.
y
==
this
.
y
}};
THREE
.
Vector3
=
function
(
b
,
c
,
e
){
this
.
set
(
b
||
0
,
c
||
0
,
e
||
0
)};
THREE
.
Vector3
.
prototype
=
{
set
:
function
(
b
,
c
,
e
){
this
.
x
=
b
;
this
.
y
=
c
;
this
.
z
=
e
;
return
this
},
copy
:
function
(
b
){
this
.
x
=
b
.
x
;
this
.
y
=
b
.
y
;
this
.
z
=
b
.
z
;
return
this
},
clone
:
function
(){
return
new
THREE
.
Vector3
(
this
.
x
,
this
.
y
,
this
.
z
)},
add
:
function
(
b
,
c
){
this
.
x
=
b
.
x
+
c
.
x
;
this
.
y
=
b
.
y
+
c
.
y
;
this
.
z
=
b
.
z
+
c
.
z
;
return
this
},
addSelf
:
function
(
b
){
this
.
x
+=
b
.
x
;
this
.
y
+=
b
.
y
;
this
.
z
+=
b
.
z
;
return
this
},
addScalar
:
function
(
b
){
this
.
x
+=
b
;
this
.
y
+=
b
;
this
.
z
+=
b
;
return
this
},
sub
:
function
(
b
,
c
){
this
.
x
=
b
.
x
-
c
.
x
;
this
.
y
=
b
.
y
-
c
.
y
;
this
.
z
=
b
.
z
-
c
.
z
;
return
this
},
subSelf
:
function
(
b
){
this
.
x
-=
b
.
x
;
this
.
y
-=
b
.
y
;
this
.
z
-=
b
.
z
;
return
this
},
multiply
:
function
(
b
,
c
){
this
.
x
=
b
.
x
*
c
.
x
;
this
.
y
=
b
.
y
*
c
.
y
;
this
.
z
=
b
.
z
*
c
.
z
;
return
this
},
multiplySelf
:
function
(
b
){
this
.
x
*=
b
.
x
;
this
.
y
*=
b
.
y
;
this
.
z
*=
b
.
y
;
return
this
},
multiplyScalar
:
function
(
b
){
this
.
x
*=
b
;
this
.
y
*=
b
;
this
.
z
*=
b
;
return
this
},
divideSelf
:
function
(
b
){
return
this
.
divide
(
this
,
b
)},
divideScalar
:
function
(
b
){
b
?(
this
.
x
/=
b
,
this
.
y
/=
b
,
this
.
z
/=
b
):
this
.
set
(
0
,
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
b
){
return
this
.
x
*
b
.
x
+
this
.
y
*
b
.
y
+
this
.
z
*
b
.
x
;
this
.
y
-=
b
.
y
;
this
.
z
-=
b
.
z
;
return
this
},
multiply
:
function
(
b
,
c
){
this
.
x
=
b
.
x
*
c
.
x
;
this
.
y
=
b
.
y
*
c
.
y
;
this
.
z
=
b
.
z
*
c
.
z
;
return
this
},
multiplySelf
:
function
(
b
){
this
.
x
*=
b
.
x
;
this
.
y
*=
b
.
y
;
this
.
z
*=
b
.
z
;
return
this
},
multiplyScalar
:
function
(
b
){
this
.
x
*=
b
;
this
.
y
*=
b
;
this
.
z
*=
b
;
return
this
},
divideSelf
:
function
(
b
){
return
this
.
divide
(
this
,
b
)},
divideScalar
:
function
(
b
){
b
?(
this
.
x
/=
b
,
this
.
y
/=
b
,
this
.
z
/=
b
):
this
.
set
(
0
,
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
b
){
return
this
.
x
*
b
.
x
+
this
.
y
*
b
.
y
+
this
.
z
*
b
.
z
},
lengthSq
:
function
(){
return
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
+
this
.
z
*
this
.
z
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
lengthSq
())},
lengthManhattan
:
function
(){
return
this
.
x
+
this
.
y
+
this
.
z
},
normalize
:
function
(){
return
this
.
divideScalar
(
this
.
length
())},
setLength
:
function
(
b
){
return
this
.
normalize
().
multiplyScalar
(
b
)},
cross
:
function
(
b
,
c
){
this
.
x
=
b
.
y
*
c
.
z
-
b
.
z
*
c
.
y
;
this
.
y
=
b
.
z
*
c
.
x
-
b
.
x
*
c
.
z
;
this
.
z
=
b
.
x
*
c
.
y
-
b
.
y
*
c
.
x
;
return
this
},
crossSelf
:
function
(
b
){
return
this
.
set
(
this
.
y
*
b
.
z
-
this
.
z
*
b
.
y
,
this
.
z
*
b
.
x
-
this
.
x
*
b
.
z
,
this
.
x
*
b
.
y
-
this
.
y
*
b
.
x
)},
distanceTo
:
function
(
b
){
return
Math
.
sqrt
(
this
.
distanceToSquared
(
b
))},
distanceToSquared
:
function
(
b
){
return
(
new
THREE
.
Vector3
).
sub
(
this
,
b
).
lengthSq
()},
setPositionFromMatrix
:
function
(
b
){
this
.
x
=
b
.
n14
;
this
.
y
=
b
.
n24
;
this
.
z
=
b
.
n34
},
setRotationFromMatrix
:
function
(
b
){
var
c
=
Math
.
cos
(
this
.
y
);
this
.
y
=
Math
.
asin
(
b
.
n13
);
Math
.
abs
(
c
)
>
1.0
E
-
5
?(
this
.
x
=
Math
.
atan2
(
-
b
.
n23
/
c
,
b
.
n33
/
c
),
this
.
z
=
Math
.
atan2
(
-
b
.
n12
/
c
,
b
.
n11
/
c
)):(
this
.
x
=
0
,
this
.
z
=
Math
.
atan2
(
b
.
n21
,
b
.
n22
))},
isZero
:
function
(){
return
this
.
lengthSq
()
<
1.0
E
-
4
}};
THREE
.
Vector4
=
function
(
b
,
c
,
e
,
f
){
this
.
set
(
b
||
0
,
c
||
0
,
e
||
0
,
f
||
1
)};
...
...
build/custom/ThreeCanvas.js
浏览文件 @
c32f89a1
...
...
@@ -6,7 +6,7 @@ THREE.Vector2.prototype={set:function(a,b){this.x=a;this.y=b;return this},copy:f
(
this
.
x
/=
a
,
this
.
y
/=
a
):
this
.
set
(
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
a
){
return
this
.
x
*
a
.
x
+
this
.
y
*
a
.
y
},
lengthSq
:
function
(){
return
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
lengthSq
())},
normalize
:
function
(){
return
this
.
divideScalar
(
this
.
length
())},
distanceTo
:
function
(
a
){
return
Math
.
sqrt
(
this
.
distanceToSquared
(
a
))},
distanceToSquared
:
function
(
a
){
var
b
=
this
.
x
-
a
.
x
,
a
=
this
.
y
-
a
.
y
;
return
b
*
b
+
a
*
a
},
setLength
:
function
(
a
){
return
this
.
normalize
().
multiplyScalar
(
a
)},
unit
:
function
(){
return
this
.
normalize
()},
equals
:
function
(
a
){
return
a
.
x
==
this
.
x
&&
a
.
y
==
this
.
y
}};
THREE
.
Vector3
=
function
(
a
,
b
,
c
){
this
.
set
(
a
||
0
,
b
||
0
,
c
||
0
)};
THREE
.
Vector3
.
prototype
=
{
set
:
function
(
a
,
b
,
c
){
this
.
x
=
a
;
this
.
y
=
b
;
this
.
z
=
c
;
return
this
},
copy
:
function
(
a
){
this
.
x
=
a
.
x
;
this
.
y
=
a
.
y
;
this
.
z
=
a
.
z
;
return
this
},
clone
:
function
(){
return
new
THREE
.
Vector3
(
this
.
x
,
this
.
y
,
this
.
z
)},
add
:
function
(
a
,
b
){
this
.
x
=
a
.
x
+
b
.
x
;
this
.
y
=
a
.
y
+
b
.
y
;
this
.
z
=
a
.
z
+
b
.
z
;
return
this
},
addSelf
:
function
(
a
){
this
.
x
+=
a
.
x
;
this
.
y
+=
a
.
y
;
this
.
z
+=
a
.
z
;
return
this
},
addScalar
:
function
(
a
){
this
.
x
+=
a
;
this
.
y
+=
a
;
this
.
z
+=
a
;
return
this
},
sub
:
function
(
a
,
b
){
this
.
x
=
a
.
x
-
b
.
x
;
this
.
y
=
a
.
y
-
b
.
y
;
this
.
z
=
a
.
z
-
b
.
z
;
return
this
},
subSelf
:
function
(
a
){
this
.
x
-=
a
.
x
;
this
.
y
-=
a
.
y
;
this
.
z
-=
a
.
z
;
return
this
},
multiply
:
function
(
a
,
b
){
this
.
x
=
a
.
x
*
b
.
x
;
this
.
y
=
a
.
y
*
b
.
y
;
this
.
z
=
a
.
z
*
b
.
z
;
return
this
},
multiplySelf
:
function
(
a
){
this
.
x
*=
a
.
x
;
this
.
y
*=
a
.
y
;
this
.
z
*=
a
.
y
;
return
this
},
multiplyScalar
:
function
(
a
){
this
.
x
*=
a
;
this
.
y
*=
a
;
this
.
z
*=
a
;
return
this
},
divideSelf
:
function
(
a
){
return
this
.
divide
(
this
,
a
)},
divideScalar
:
function
(
a
){
a
?(
this
.
x
/=
a
,
this
.
y
/=
a
,
this
.
z
/=
a
):
this
.
set
(
0
,
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
a
){
return
this
.
x
*
a
.
x
+
this
.
y
*
a
.
y
+
this
.
z
*
a
.
x
;
this
.
y
-=
a
.
y
;
this
.
z
-=
a
.
z
;
return
this
},
multiply
:
function
(
a
,
b
){
this
.
x
=
a
.
x
*
b
.
x
;
this
.
y
=
a
.
y
*
b
.
y
;
this
.
z
=
a
.
z
*
b
.
z
;
return
this
},
multiplySelf
:
function
(
a
){
this
.
x
*=
a
.
x
;
this
.
y
*=
a
.
y
;
this
.
z
*=
a
.
z
;
return
this
},
multiplyScalar
:
function
(
a
){
this
.
x
*=
a
;
this
.
y
*=
a
;
this
.
z
*=
a
;
return
this
},
divideSelf
:
function
(
a
){
return
this
.
divide
(
this
,
a
)},
divideScalar
:
function
(
a
){
a
?(
this
.
x
/=
a
,
this
.
y
/=
a
,
this
.
z
/=
a
):
this
.
set
(
0
,
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
a
){
return
this
.
x
*
a
.
x
+
this
.
y
*
a
.
y
+
this
.
z
*
a
.
z
},
lengthSq
:
function
(){
return
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
+
this
.
z
*
this
.
z
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
lengthSq
())},
lengthManhattan
:
function
(){
return
this
.
x
+
this
.
y
+
this
.
z
},
normalize
:
function
(){
return
this
.
divideScalar
(
this
.
length
())},
setLength
:
function
(
a
){
return
this
.
normalize
().
multiplyScalar
(
a
)},
cross
:
function
(
a
,
b
){
this
.
x
=
a
.
y
*
b
.
z
-
a
.
z
*
b
.
y
;
this
.
y
=
a
.
z
*
b
.
x
-
a
.
x
*
b
.
z
;
this
.
z
=
a
.
x
*
b
.
y
-
a
.
y
*
b
.
x
;
return
this
},
crossSelf
:
function
(
a
){
return
this
.
set
(
this
.
y
*
a
.
z
-
this
.
z
*
a
.
y
,
this
.
z
*
a
.
x
-
this
.
x
*
a
.
z
,
this
.
x
*
a
.
y
-
this
.
y
*
a
.
x
)},
distanceTo
:
function
(
a
){
return
Math
.
sqrt
(
this
.
distanceToSquared
(
a
))},
distanceToSquared
:
function
(
a
){
return
(
new
THREE
.
Vector3
).
sub
(
this
,
a
).
lengthSq
()},
setPositionFromMatrix
:
function
(
a
){
this
.
x
=
a
.
n14
;
this
.
y
=
a
.
n24
;
this
.
z
=
a
.
n34
},
setRotationFromMatrix
:
function
(
a
){
var
b
=
Math
.
cos
(
this
.
y
);
this
.
y
=
Math
.
asin
(
a
.
n13
);
Math
.
abs
(
b
)
>
1.0
E
-
5
?(
this
.
x
=
Math
.
atan2
(
-
a
.
n23
/
b
,
a
.
n33
/
b
),
this
.
z
=
Math
.
atan2
(
-
a
.
n12
/
b
,
a
.
n11
/
b
)):(
this
.
x
=
0
,
this
.
z
=
Math
.
atan2
(
a
.
n21
,
a
.
n22
))},
isZero
:
function
(){
return
this
.
lengthSq
()
<
1.0
E
-
4
}};
THREE
.
Vector4
=
function
(
a
,
b
,
c
,
d
){
this
.
set
(
a
||
0
,
b
||
0
,
c
||
0
,
d
||
1
)};
...
...
build/custom/ThreeDOM.js
浏览文件 @
c32f89a1
...
...
@@ -6,7 +6,7 @@ THREE.Vector2.prototype={set:function(a,b){this.x=a;this.y=b;return this},copy:f
(
this
.
x
/=
a
,
this
.
y
/=
a
):
this
.
set
(
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
a
){
return
this
.
x
*
a
.
x
+
this
.
y
*
a
.
y
},
lengthSq
:
function
(){
return
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
lengthSq
())},
normalize
:
function
(){
return
this
.
divideScalar
(
this
.
length
())},
distanceTo
:
function
(
a
){
return
Math
.
sqrt
(
this
.
distanceToSquared
(
a
))},
distanceToSquared
:
function
(
a
){
var
b
=
this
.
x
-
a
.
x
,
a
=
this
.
y
-
a
.
y
;
return
b
*
b
+
a
*
a
},
setLength
:
function
(
a
){
return
this
.
normalize
().
multiplyScalar
(
a
)},
unit
:
function
(){
return
this
.
normalize
()},
equals
:
function
(
a
){
return
a
.
x
==
this
.
x
&&
a
.
y
==
this
.
y
}};
THREE
.
Vector3
=
function
(
a
,
b
,
c
){
this
.
set
(
a
||
0
,
b
||
0
,
c
||
0
)};
THREE
.
Vector3
.
prototype
=
{
set
:
function
(
a
,
b
,
c
){
this
.
x
=
a
;
this
.
y
=
b
;
this
.
z
=
c
;
return
this
},
copy
:
function
(
a
){
this
.
x
=
a
.
x
;
this
.
y
=
a
.
y
;
this
.
z
=
a
.
z
;
return
this
},
clone
:
function
(){
return
new
THREE
.
Vector3
(
this
.
x
,
this
.
y
,
this
.
z
)},
add
:
function
(
a
,
b
){
this
.
x
=
a
.
x
+
b
.
x
;
this
.
y
=
a
.
y
+
b
.
y
;
this
.
z
=
a
.
z
+
b
.
z
;
return
this
},
addSelf
:
function
(
a
){
this
.
x
+=
a
.
x
;
this
.
y
+=
a
.
y
;
this
.
z
+=
a
.
z
;
return
this
},
addScalar
:
function
(
a
){
this
.
x
+=
a
;
this
.
y
+=
a
;
this
.
z
+=
a
;
return
this
},
sub
:
function
(
a
,
b
){
this
.
x
=
a
.
x
-
b
.
x
;
this
.
y
=
a
.
y
-
b
.
y
;
this
.
z
=
a
.
z
-
b
.
z
;
return
this
},
subSelf
:
function
(
a
){
this
.
x
-=
a
.
x
;
this
.
y
-=
a
.
y
;
this
.
z
-=
a
.
z
;
return
this
},
multiply
:
function
(
a
,
b
){
this
.
x
=
a
.
x
*
b
.
x
;
this
.
y
=
a
.
y
*
b
.
y
;
this
.
z
=
a
.
z
*
b
.
z
;
return
this
},
multiplySelf
:
function
(
a
){
this
.
x
*=
a
.
x
;
this
.
y
*=
a
.
y
;
this
.
z
*=
a
.
y
;
return
this
},
multiplyScalar
:
function
(
a
){
this
.
x
*=
a
;
this
.
y
*=
a
;
this
.
z
*=
a
;
return
this
},
divideSelf
:
function
(
a
){
return
this
.
divide
(
this
,
a
)},
divideScalar
:
function
(
a
){
a
?(
this
.
x
/=
a
,
this
.
y
/=
a
,
this
.
z
/=
a
):
this
.
set
(
0
,
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
a
){
return
this
.
x
*
a
.
x
+
this
.
y
*
a
.
y
+
this
.
z
*
a
.
x
;
this
.
y
-=
a
.
y
;
this
.
z
-=
a
.
z
;
return
this
},
multiply
:
function
(
a
,
b
){
this
.
x
=
a
.
x
*
b
.
x
;
this
.
y
=
a
.
y
*
b
.
y
;
this
.
z
=
a
.
z
*
b
.
z
;
return
this
},
multiplySelf
:
function
(
a
){
this
.
x
*=
a
.
x
;
this
.
y
*=
a
.
y
;
this
.
z
*=
a
.
z
;
return
this
},
multiplyScalar
:
function
(
a
){
this
.
x
*=
a
;
this
.
y
*=
a
;
this
.
z
*=
a
;
return
this
},
divideSelf
:
function
(
a
){
return
this
.
divide
(
this
,
a
)},
divideScalar
:
function
(
a
){
a
?(
this
.
x
/=
a
,
this
.
y
/=
a
,
this
.
z
/=
a
):
this
.
set
(
0
,
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
a
){
return
this
.
x
*
a
.
x
+
this
.
y
*
a
.
y
+
this
.
z
*
a
.
z
},
lengthSq
:
function
(){
return
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
+
this
.
z
*
this
.
z
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
lengthSq
())},
lengthManhattan
:
function
(){
return
this
.
x
+
this
.
y
+
this
.
z
},
normalize
:
function
(){
return
this
.
divideScalar
(
this
.
length
())},
setLength
:
function
(
a
){
return
this
.
normalize
().
multiplyScalar
(
a
)},
cross
:
function
(
a
,
b
){
this
.
x
=
a
.
y
*
b
.
z
-
a
.
z
*
b
.
y
;
this
.
y
=
a
.
z
*
b
.
x
-
a
.
x
*
b
.
z
;
this
.
z
=
a
.
x
*
b
.
y
-
a
.
y
*
b
.
x
;
return
this
},
crossSelf
:
function
(
a
){
return
this
.
set
(
this
.
y
*
a
.
z
-
this
.
z
*
a
.
y
,
this
.
z
*
a
.
x
-
this
.
x
*
a
.
z
,
this
.
x
*
a
.
y
-
this
.
y
*
a
.
x
)},
distanceTo
:
function
(
a
){
return
Math
.
sqrt
(
this
.
distanceToSquared
(
a
))},
distanceToSquared
:
function
(
a
){
return
(
new
THREE
.
Vector3
).
sub
(
this
,
a
).
lengthSq
()},
setPositionFromMatrix
:
function
(
a
){
this
.
x
=
a
.
n14
;
this
.
y
=
a
.
n24
;
this
.
z
=
a
.
n34
},
setRotationFromMatrix
:
function
(
a
){
var
b
=
Math
.
cos
(
this
.
y
);
this
.
y
=
Math
.
asin
(
a
.
n13
);
Math
.
abs
(
b
)
>
1.0
E
-
5
?(
this
.
x
=
Math
.
atan2
(
-
a
.
n23
/
b
,
a
.
n33
/
b
),
this
.
z
=
Math
.
atan2
(
-
a
.
n12
/
b
,
a
.
n11
/
b
)):(
this
.
x
=
0
,
this
.
z
=
Math
.
atan2
(
a
.
n21
,
a
.
n22
))},
isZero
:
function
(){
return
this
.
lengthSq
()
<
1.0
E
-
4
}};
THREE
.
Vector4
=
function
(
a
,
b
,
c
,
d
){
this
.
set
(
a
||
0
,
b
||
0
,
c
||
0
,
d
||
1
)};
...
...
build/custom/ThreeSVG.js
浏览文件 @
c32f89a1
...
...
@@ -6,7 +6,7 @@ THREE.Vector2.prototype={set:function(a,b){this.x=a;this.y=b;return this},copy:f
(
this
.
x
/=
a
,
this
.
y
/=
a
):
this
.
set
(
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
a
){
return
this
.
x
*
a
.
x
+
this
.
y
*
a
.
y
},
lengthSq
:
function
(){
return
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
lengthSq
())},
normalize
:
function
(){
return
this
.
divideScalar
(
this
.
length
())},
distanceTo
:
function
(
a
){
return
Math
.
sqrt
(
this
.
distanceToSquared
(
a
))},
distanceToSquared
:
function
(
a
){
var
b
=
this
.
x
-
a
.
x
,
a
=
this
.
y
-
a
.
y
;
return
b
*
b
+
a
*
a
},
setLength
:
function
(
a
){
return
this
.
normalize
().
multiplyScalar
(
a
)},
unit
:
function
(){
return
this
.
normalize
()},
equals
:
function
(
a
){
return
a
.
x
==
this
.
x
&&
a
.
y
==
this
.
y
}};
THREE
.
Vector3
=
function
(
a
,
b
,
c
){
this
.
set
(
a
||
0
,
b
||
0
,
c
||
0
)};
THREE
.
Vector3
.
prototype
=
{
set
:
function
(
a
,
b
,
c
){
this
.
x
=
a
;
this
.
y
=
b
;
this
.
z
=
c
;
return
this
},
copy
:
function
(
a
){
this
.
x
=
a
.
x
;
this
.
y
=
a
.
y
;
this
.
z
=
a
.
z
;
return
this
},
clone
:
function
(){
return
new
THREE
.
Vector3
(
this
.
x
,
this
.
y
,
this
.
z
)},
add
:
function
(
a
,
b
){
this
.
x
=
a
.
x
+
b
.
x
;
this
.
y
=
a
.
y
+
b
.
y
;
this
.
z
=
a
.
z
+
b
.
z
;
return
this
},
addSelf
:
function
(
a
){
this
.
x
+=
a
.
x
;
this
.
y
+=
a
.
y
;
this
.
z
+=
a
.
z
;
return
this
},
addScalar
:
function
(
a
){
this
.
x
+=
a
;
this
.
y
+=
a
;
this
.
z
+=
a
;
return
this
},
sub
:
function
(
a
,
b
){
this
.
x
=
a
.
x
-
b
.
x
;
this
.
y
=
a
.
y
-
b
.
y
;
this
.
z
=
a
.
z
-
b
.
z
;
return
this
},
subSelf
:
function
(
a
){
this
.
x
-=
a
.
x
;
this
.
y
-=
a
.
y
;
this
.
z
-=
a
.
z
;
return
this
},
multiply
:
function
(
a
,
b
){
this
.
x
=
a
.
x
*
b
.
x
;
this
.
y
=
a
.
y
*
b
.
y
;
this
.
z
=
a
.
z
*
b
.
z
;
return
this
},
multiplySelf
:
function
(
a
){
this
.
x
*=
a
.
x
;
this
.
y
*=
a
.
y
;
this
.
z
*=
a
.
y
;
return
this
},
multiplyScalar
:
function
(
a
){
this
.
x
*=
a
;
this
.
y
*=
a
;
this
.
z
*=
a
;
return
this
},
divideSelf
:
function
(
a
){
return
this
.
divide
(
this
,
a
)},
divideScalar
:
function
(
a
){
a
?(
this
.
x
/=
a
,
this
.
y
/=
a
,
this
.
z
/=
a
):
this
.
set
(
0
,
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
a
){
return
this
.
x
*
a
.
x
+
this
.
y
*
a
.
y
+
this
.
z
*
a
.
x
;
this
.
y
-=
a
.
y
;
this
.
z
-=
a
.
z
;
return
this
},
multiply
:
function
(
a
,
b
){
this
.
x
=
a
.
x
*
b
.
x
;
this
.
y
=
a
.
y
*
b
.
y
;
this
.
z
=
a
.
z
*
b
.
z
;
return
this
},
multiplySelf
:
function
(
a
){
this
.
x
*=
a
.
x
;
this
.
y
*=
a
.
y
;
this
.
z
*=
a
.
z
;
return
this
},
multiplyScalar
:
function
(
a
){
this
.
x
*=
a
;
this
.
y
*=
a
;
this
.
z
*=
a
;
return
this
},
divideSelf
:
function
(
a
){
return
this
.
divide
(
this
,
a
)},
divideScalar
:
function
(
a
){
a
?(
this
.
x
/=
a
,
this
.
y
/=
a
,
this
.
z
/=
a
):
this
.
set
(
0
,
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
a
){
return
this
.
x
*
a
.
x
+
this
.
y
*
a
.
y
+
this
.
z
*
a
.
z
},
lengthSq
:
function
(){
return
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
+
this
.
z
*
this
.
z
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
lengthSq
())},
lengthManhattan
:
function
(){
return
this
.
x
+
this
.
y
+
this
.
z
},
normalize
:
function
(){
return
this
.
divideScalar
(
this
.
length
())},
setLength
:
function
(
a
){
return
this
.
normalize
().
multiplyScalar
(
a
)},
cross
:
function
(
a
,
b
){
this
.
x
=
a
.
y
*
b
.
z
-
a
.
z
*
b
.
y
;
this
.
y
=
a
.
z
*
b
.
x
-
a
.
x
*
b
.
z
;
this
.
z
=
a
.
x
*
b
.
y
-
a
.
y
*
b
.
x
;
return
this
},
crossSelf
:
function
(
a
){
return
this
.
set
(
this
.
y
*
a
.
z
-
this
.
z
*
a
.
y
,
this
.
z
*
a
.
x
-
this
.
x
*
a
.
z
,
this
.
x
*
a
.
y
-
this
.
y
*
a
.
x
)},
distanceTo
:
function
(
a
){
return
Math
.
sqrt
(
this
.
distanceToSquared
(
a
))},
distanceToSquared
:
function
(
a
){
return
(
new
THREE
.
Vector3
).
sub
(
this
,
a
).
lengthSq
()},
setPositionFromMatrix
:
function
(
a
){
this
.
x
=
a
.
n14
;
this
.
y
=
a
.
n24
;
this
.
z
=
a
.
n34
},
setRotationFromMatrix
:
function
(
a
){
var
b
=
Math
.
cos
(
this
.
y
);
this
.
y
=
Math
.
asin
(
a
.
n13
);
Math
.
abs
(
b
)
>
1.0
E
-
5
?(
this
.
x
=
Math
.
atan2
(
-
a
.
n23
/
b
,
a
.
n33
/
b
),
this
.
z
=
Math
.
atan2
(
-
a
.
n12
/
b
,
a
.
n11
/
b
)):(
this
.
x
=
0
,
this
.
z
=
Math
.
atan2
(
a
.
n21
,
a
.
n22
))},
isZero
:
function
(){
return
this
.
lengthSq
()
<
1.0
E
-
4
}};
THREE
.
Vector4
=
function
(
a
,
b
,
c
,
d
){
this
.
set
(
a
||
0
,
b
||
0
,
c
||
0
,
d
||
1
)};
...
...
build/custom/ThreeWebGL.js
浏览文件 @
c32f89a1
...
...
@@ -6,7 +6,7 @@ THREE.Vector2.prototype={set:function(b,d){this.x=b;this.y=d;return this},copy:f
(
this
.
x
/=
b
,
this
.
y
/=
b
):
this
.
set
(
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
b
){
return
this
.
x
*
b
.
x
+
this
.
y
*
b
.
y
},
lengthSq
:
function
(){
return
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
lengthSq
())},
normalize
:
function
(){
return
this
.
divideScalar
(
this
.
length
())},
distanceTo
:
function
(
b
){
return
Math
.
sqrt
(
this
.
distanceToSquared
(
b
))},
distanceToSquared
:
function
(
b
){
var
d
=
this
.
x
-
b
.
x
,
b
=
this
.
y
-
b
.
y
;
return
d
*
d
+
b
*
b
},
setLength
:
function
(
b
){
return
this
.
normalize
().
multiplyScalar
(
b
)},
unit
:
function
(){
return
this
.
normalize
()},
equals
:
function
(
b
){
return
b
.
x
==
this
.
x
&&
b
.
y
==
this
.
y
}};
THREE
.
Vector3
=
function
(
b
,
d
,
e
){
this
.
set
(
b
||
0
,
d
||
0
,
e
||
0
)};
THREE
.
Vector3
.
prototype
=
{
set
:
function
(
b
,
d
,
e
){
this
.
x
=
b
;
this
.
y
=
d
;
this
.
z
=
e
;
return
this
},
copy
:
function
(
b
){
this
.
x
=
b
.
x
;
this
.
y
=
b
.
y
;
this
.
z
=
b
.
z
;
return
this
},
clone
:
function
(){
return
new
THREE
.
Vector3
(
this
.
x
,
this
.
y
,
this
.
z
)},
add
:
function
(
b
,
d
){
this
.
x
=
b
.
x
+
d
.
x
;
this
.
y
=
b
.
y
+
d
.
y
;
this
.
z
=
b
.
z
+
d
.
z
;
return
this
},
addSelf
:
function
(
b
){
this
.
x
+=
b
.
x
;
this
.
y
+=
b
.
y
;
this
.
z
+=
b
.
z
;
return
this
},
addScalar
:
function
(
b
){
this
.
x
+=
b
;
this
.
y
+=
b
;
this
.
z
+=
b
;
return
this
},
sub
:
function
(
b
,
d
){
this
.
x
=
b
.
x
-
d
.
x
;
this
.
y
=
b
.
y
-
d
.
y
;
this
.
z
=
b
.
z
-
d
.
z
;
return
this
},
subSelf
:
function
(
b
){
this
.
x
-=
b
.
x
;
this
.
y
-=
b
.
y
;
this
.
z
-=
b
.
z
;
return
this
},
multiply
:
function
(
b
,
d
){
this
.
x
=
b
.
x
*
d
.
x
;
this
.
y
=
b
.
y
*
d
.
y
;
this
.
z
=
b
.
z
*
d
.
z
;
return
this
},
multiplySelf
:
function
(
b
){
this
.
x
*=
b
.
x
;
this
.
y
*=
b
.
y
;
this
.
z
*=
b
.
y
;
return
this
},
multiplyScalar
:
function
(
b
){
this
.
x
*=
b
;
this
.
y
*=
b
;
this
.
z
*=
b
;
return
this
},
divideSelf
:
function
(
b
){
return
this
.
divide
(
this
,
b
)},
divideScalar
:
function
(
b
){
b
?(
this
.
x
/=
b
,
this
.
y
/=
b
,
this
.
z
/=
b
):
this
.
set
(
0
,
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
b
){
return
this
.
x
*
b
.
x
+
this
.
y
*
b
.
y
+
this
.
z
*
b
.
x
;
this
.
y
-=
b
.
y
;
this
.
z
-=
b
.
z
;
return
this
},
multiply
:
function
(
b
,
d
){
this
.
x
=
b
.
x
*
d
.
x
;
this
.
y
=
b
.
y
*
d
.
y
;
this
.
z
=
b
.
z
*
d
.
z
;
return
this
},
multiplySelf
:
function
(
b
){
this
.
x
*=
b
.
x
;
this
.
y
*=
b
.
y
;
this
.
z
*=
b
.
z
;
return
this
},
multiplyScalar
:
function
(
b
){
this
.
x
*=
b
;
this
.
y
*=
b
;
this
.
z
*=
b
;
return
this
},
divideSelf
:
function
(
b
){
return
this
.
divide
(
this
,
b
)},
divideScalar
:
function
(
b
){
b
?(
this
.
x
/=
b
,
this
.
y
/=
b
,
this
.
z
/=
b
):
this
.
set
(
0
,
0
,
0
);
return
this
},
negate
:
function
(){
return
this
.
multiplyScalar
(
-
1
)},
dot
:
function
(
b
){
return
this
.
x
*
b
.
x
+
this
.
y
*
b
.
y
+
this
.
z
*
b
.
z
},
lengthSq
:
function
(){
return
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
+
this
.
z
*
this
.
z
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
lengthSq
())},
lengthManhattan
:
function
(){
return
this
.
x
+
this
.
y
+
this
.
z
},
normalize
:
function
(){
return
this
.
divideScalar
(
this
.
length
())},
setLength
:
function
(
b
){
return
this
.
normalize
().
multiplyScalar
(
b
)},
cross
:
function
(
b
,
d
){
this
.
x
=
b
.
y
*
d
.
z
-
b
.
z
*
d
.
y
;
this
.
y
=
b
.
z
*
d
.
x
-
b
.
x
*
d
.
z
;
this
.
z
=
b
.
x
*
d
.
y
-
b
.
y
*
d
.
x
;
return
this
},
crossSelf
:
function
(
b
){
return
this
.
set
(
this
.
y
*
b
.
z
-
this
.
z
*
b
.
y
,
this
.
z
*
b
.
x
-
this
.
x
*
b
.
z
,
this
.
x
*
b
.
y
-
this
.
y
*
b
.
x
)},
distanceTo
:
function
(
b
){
return
Math
.
sqrt
(
this
.
distanceToSquared
(
b
))},
distanceToSquared
:
function
(
b
){
return
(
new
THREE
.
Vector3
).
sub
(
this
,
b
).
lengthSq
()},
setPositionFromMatrix
:
function
(
b
){
this
.
x
=
b
.
n14
;
this
.
y
=
b
.
n24
;
this
.
z
=
b
.
n34
},
setRotationFromMatrix
:
function
(
b
){
var
d
=
Math
.
cos
(
this
.
y
);
this
.
y
=
Math
.
asin
(
b
.
n13
);
Math
.
abs
(
d
)
>
1.0
E
-
5
?(
this
.
x
=
Math
.
atan2
(
-
b
.
n23
/
d
,
b
.
n33
/
d
),
this
.
z
=
Math
.
atan2
(
-
b
.
n12
/
d
,
b
.
n11
/
d
)):(
this
.
x
=
0
,
this
.
z
=
Math
.
atan2
(
b
.
n21
,
b
.
n22
))},
isZero
:
function
(){
return
this
.
lengthSq
()
<
1.0
E
-
4
}};
THREE
.
Vector4
=
function
(
b
,
d
,
e
,
f
){
this
.
set
(
b
||
0
,
d
||
0
,
e
||
0
,
f
||
1
)};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录