Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
24298068
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,发现更多精彩内容 >>
提交
24298068
编写于
7月 03, 2011
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
6f900482
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
446 addition
and
454 deletion
+446
-454
build/Three.js
build/Three.js
+287
-291
build/custom/ThreeCanvas.js
build/custom/ThreeCanvas.js
+1
-1
build/custom/ThreeDOM.js
build/custom/ThreeDOM.js
+1
-1
build/custom/ThreeExtras.js
build/custom/ThreeExtras.js
+152
-156
build/custom/ThreeSVG.js
build/custom/ThreeSVG.js
+1
-1
build/custom/ThreeWebGL.js
build/custom/ThreeWebGL.js
+4
-4
未找到文件。
build/Three.js
浏览文件 @
24298068
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
build/custom/ThreeCanvas.js
浏览文件 @
24298068
...
...
@@ -53,7 +53,7 @@ THREE.Quaternion.prototype={set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;thi
d
;
this
.
z
=
a
.
z
*
d
;
this
.
w
=
Math
.
cos
(
c
);
return
this
},
calculateW
:
function
(){
this
.
w
=-
Math
.
sqrt
(
Math
.
abs
(
1
-
this
.
x
*
this
.
x
-
this
.
y
*
this
.
y
-
this
.
z
*
this
.
z
));
return
this
},
inverse
:
function
(){
this
.
x
*=-
1
;
this
.
y
*=-
1
;
this
.
z
*=-
1
;
return
this
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
+
this
.
z
*
this
.
z
+
this
.
w
*
this
.
w
)},
normalize
:
function
(){
var
a
=
Math
.
sqrt
(
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
+
this
.
z
*
this
.
z
+
this
.
w
*
this
.
w
);
a
==
0
?
this
.
w
=
this
.
z
=
this
.
y
=
this
.
x
=
0
:(
a
=
1
/
a
,
this
.
x
*=
a
,
this
.
y
*=
a
,
this
.
z
*=
a
,
this
.
w
*=
a
);
return
this
},
multiplySelf
:
function
(
a
){
var
b
=
this
.
x
,
c
=
this
.
y
,
d
=
this
.
z
,
e
=
this
.
w
,
g
=
a
.
x
,
f
=
a
.
y
,
h
=
a
.
z
,
a
=
a
.
w
;
this
.
x
=
b
*
a
+
e
*
g
+
c
*
h
-
d
*
f
;
this
.
y
=
c
*
a
+
e
*
f
+
d
*
g
-
b
*
h
;
this
.
z
=
d
*
a
+
e
*
h
+
b
*
f
-
c
*
g
;
this
.
w
=
e
*
a
-
b
*
g
-
c
*
f
-
d
*
h
;
return
this
},
multiply
:
function
(
a
,
b
){
this
.
x
=
a
.
x
*
b
.
w
+
a
.
y
*
b
.
z
-
a
.
z
*
b
.
y
+
a
.
w
*
b
.
x
;
this
.
y
=-
a
.
x
*
b
.
z
+
a
.
y
*
b
.
w
+
a
.
z
*
b
.
x
+
a
.
w
*
b
.
y
;
this
.
z
=
a
.
x
*
b
.
y
-
a
.
y
*
b
.
x
+
a
.
z
*
b
.
w
+
a
.
w
*
b
.
z
;
this
.
w
=-
a
.
x
*
b
.
x
-
a
.
y
*
b
.
y
-
a
.
z
*
b
.
z
+
a
.
w
*
b
.
w
;
return
this
},
multiplyVector3
:
function
(
a
,
b
){
b
||
(
b
=
a
);
var
c
=
a
.
x
,
d
=
a
.
y
,
e
=
a
.
z
,
g
=
this
.
x
,
f
=
this
.
y
,
h
=
this
.
z
,
i
=
this
.
w
,
l
=
i
*
c
+
f
*
e
-
h
*
d
,
m
=
i
*
d
+
h
*
c
-
g
*
e
,
j
=
i
*
e
+
g
*
d
-
f
*
c
,
c
=-
g
*
c
-
f
*
d
-
h
*
e
;
b
.
x
=
l
*
i
+
c
*-
g
+
m
*-
h
-
j
*-
f
;
b
.
y
=
m
*
i
+
c
*-
f
+
j
*-
g
-
l
*-
h
;
b
.
z
=
j
*
i
+
c
*-
h
+
l
*-
f
-
m
*-
g
;
return
b
}};
THREE
.
Quaternion
.
slerp
=
function
(
a
,
b
,
c
,
d
){
var
e
=
a
.
w
*
b
.
w
+
a
.
x
*
b
.
x
+
a
.
y
*
b
.
y
+
a
.
z
*
b
.
z
;
if
(
Math
.
abs
(
e
)
>=
1
)
return
c
.
w
=
a
.
w
,
c
.
x
=
a
.
x
,
c
.
y
=
a
.
y
,
c
.
z
=
a
.
z
,
c
;
var
g
=
Math
.
acos
(
e
),
f
=
Math
.
sqrt
(
1
-
e
*
e
);
if
(
Math
.
abs
(
f
)
<
0.001
0
)
return
c
.
w
=
0.5
*
(
a
.
w
+
b
.
w
),
c
.
x
=
0.5
*
(
a
.
x
+
b
.
x
),
c
.
y
=
0.5
*
(
a
.
y
+
b
.
y
),
c
.
z
=
0.5
*
(
a
.
z
+
b
.
z
),
c
;
e
=
Math
.
sin
((
1
-
d
)
*
g
)
/
f
;
d
=
Math
.
sin
(
d
*
g
)
/
f
;
c
.
w
=
a
.
w
*
e
+
b
.
w
*
d
;
c
.
x
=
a
.
x
*
e
+
b
.
x
*
d
;
c
.
y
=
a
.
y
*
e
+
b
.
y
*
d
;
c
.
z
=
a
.
z
*
e
+
b
.
z
*
d
;
return
c
};
THREE
.
Vertex
=
function
(
a
){
this
.
position
=
a
||
new
THREE
.
Vector3
};
THREE
.
Quaternion
.
slerp
=
function
(
a
,
b
,
c
,
d
){
var
e
=
a
.
w
*
b
.
w
+
a
.
x
*
b
.
x
+
a
.
y
*
b
.
y
+
a
.
z
*
b
.
z
;
if
(
Math
.
abs
(
e
)
>=
1
)
return
c
.
w
=
a
.
w
,
c
.
x
=
a
.
x
,
c
.
y
=
a
.
y
,
c
.
z
=
a
.
z
,
c
;
var
g
=
Math
.
acos
(
e
),
f
=
Math
.
sqrt
(
1
-
e
*
e
);
if
(
Math
.
abs
(
f
)
<
0.001
)
return
c
.
w
=
0.5
*
(
a
.
w
+
b
.
w
),
c
.
x
=
0.5
*
(
a
.
x
+
b
.
x
),
c
.
y
=
0.5
*
(
a
.
y
+
b
.
y
),
c
.
z
=
0.5
*
(
a
.
z
+
b
.
z
),
c
;
e
=
Math
.
sin
((
1
-
d
)
*
g
)
/
f
;
d
=
Math
.
sin
(
d
*
g
)
/
f
;
c
.
w
=
a
.
w
*
e
+
b
.
w
*
d
;
c
.
x
=
a
.
x
*
e
+
b
.
x
*
d
;
c
.
y
=
a
.
y
*
e
+
b
.
y
*
d
;
c
.
z
=
a
.
z
*
e
+
b
.
z
*
d
;
return
c
};
THREE
.
Vertex
=
function
(
a
){
this
.
position
=
a
||
new
THREE
.
Vector3
};
THREE
.
Face3
=
function
(
a
,
b
,
c
,
d
,
e
,
g
){
this
.
a
=
a
;
this
.
b
=
b
;
this
.
c
=
c
;
this
.
normal
=
d
instanceof
THREE
.
Vector3
?
d
:
new
THREE
.
Vector3
;
this
.
vertexNormals
=
d
instanceof
Array
?
d
:[];
this
.
color
=
e
instanceof
THREE
.
Color
?
e
:
new
THREE
.
Color
;
this
.
vertexColors
=
e
instanceof
Array
?
e
:[];
this
.
vertexTangents
=
[];
this
.
materials
=
g
instanceof
Array
?
g
:[
g
];
this
.
centroid
=
new
THREE
.
Vector3
};
THREE
.
Face4
=
function
(
a
,
b
,
c
,
d
,
e
,
g
,
f
){
this
.
a
=
a
;
this
.
b
=
b
;
this
.
c
=
c
;
this
.
d
=
d
;
this
.
normal
=
e
instanceof
THREE
.
Vector3
?
e
:
new
THREE
.
Vector3
;
this
.
vertexNormals
=
e
instanceof
Array
?
e
:[];
this
.
color
=
g
instanceof
THREE
.
Color
?
g
:
new
THREE
.
Color
;
this
.
vertexColors
=
g
instanceof
Array
?
g
:[];
this
.
vertexTangents
=
[];
this
.
materials
=
f
instanceof
Array
?
f
:[
f
];
this
.
centroid
=
new
THREE
.
Vector3
};
THREE
.
UV
=
function
(
a
,
b
){
this
.
set
(
a
||
0
,
b
||
0
)};
THREE
.
UV
.
prototype
=
{
set
:
function
(
a
,
b
){
this
.
u
=
a
;
this
.
v
=
b
;
return
this
},
copy
:
function
(
a
){
this
.
set
(
a
.
u
,
a
.
v
);
return
this
}};
THREE
.
Geometry
=
function
(){
this
.
id
=
"
Geometry
"
+
THREE
.
GeometryIdCounter
++
;
this
.
vertices
=
[];
this
.
colors
=
[];
this
.
faces
=
[];
this
.
edges
=
[];
this
.
faceUvs
=
[[]];
this
.
faceVertexUvs
=
[[]];
this
.
morphTargets
=
[];
this
.
morphColors
=
[];
this
.
skinWeights
=
[];
this
.
skinIndices
=
[];
this
.
boundingSphere
=
this
.
boundingBox
=
null
;
this
.
hasTangents
=!
1
};
...
...
build/custom/ThreeDOM.js
浏览文件 @
24298068
...
...
@@ -53,7 +53,7 @@ THREE.Quaternion.prototype={set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;thi
d
;
this
.
z
=
a
.
z
*
d
;
this
.
w
=
Math
.
cos
(
c
);
return
this
},
calculateW
:
function
(){
this
.
w
=-
Math
.
sqrt
(
Math
.
abs
(
1
-
this
.
x
*
this
.
x
-
this
.
y
*
this
.
y
-
this
.
z
*
this
.
z
));
return
this
},
inverse
:
function
(){
this
.
x
*=-
1
;
this
.
y
*=-
1
;
this
.
z
*=-
1
;
return
this
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
+
this
.
z
*
this
.
z
+
this
.
w
*
this
.
w
)},
normalize
:
function
(){
var
a
=
Math
.
sqrt
(
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
+
this
.
z
*
this
.
z
+
this
.
w
*
this
.
w
);
a
==
0
?
this
.
w
=
this
.
z
=
this
.
y
=
this
.
x
=
0
:(
a
=
1
/
a
,
this
.
x
*=
a
,
this
.
y
*=
a
,
this
.
z
*=
a
,
this
.
w
*=
a
);
return
this
},
multiplySelf
:
function
(
a
){
var
b
=
this
.
x
,
c
=
this
.
y
,
d
=
this
.
z
,
e
=
this
.
w
,
g
=
a
.
x
,
f
=
a
.
y
,
h
=
a
.
z
,
a
=
a
.
w
;
this
.
x
=
b
*
a
+
e
*
g
+
c
*
h
-
d
*
f
;
this
.
y
=
c
*
a
+
e
*
f
+
d
*
g
-
b
*
h
;
this
.
z
=
d
*
a
+
e
*
h
+
b
*
f
-
c
*
g
;
this
.
w
=
e
*
a
-
b
*
g
-
c
*
f
-
d
*
h
;
return
this
},
multiply
:
function
(
a
,
b
){
this
.
x
=
a
.
x
*
b
.
w
+
a
.
y
*
b
.
z
-
a
.
z
*
b
.
y
+
a
.
w
*
b
.
x
;
this
.
y
=-
a
.
x
*
b
.
z
+
a
.
y
*
b
.
w
+
a
.
z
*
b
.
x
+
a
.
w
*
b
.
y
;
this
.
z
=
a
.
x
*
b
.
y
-
a
.
y
*
b
.
x
+
a
.
z
*
b
.
w
+
a
.
w
*
b
.
z
;
this
.
w
=-
a
.
x
*
b
.
x
-
a
.
y
*
b
.
y
-
a
.
z
*
b
.
z
+
a
.
w
*
b
.
w
;
return
this
},
multiplyVector3
:
function
(
a
,
b
){
b
||
(
b
=
a
);
var
c
=
a
.
x
,
d
=
a
.
y
,
e
=
a
.
z
,
g
=
this
.
x
,
f
=
this
.
y
,
h
=
this
.
z
,
j
=
this
.
w
,
i
=
j
*
c
+
f
*
e
-
h
*
d
,
k
=
j
*
d
+
h
*
c
-
g
*
e
,
l
=
j
*
e
+
g
*
d
-
f
*
c
,
c
=-
g
*
c
-
f
*
d
-
h
*
e
;
b
.
x
=
i
*
j
+
c
*-
g
+
k
*-
h
-
l
*-
f
;
b
.
y
=
k
*
j
+
c
*-
f
+
l
*-
g
-
i
*-
h
;
b
.
z
=
l
*
j
+
c
*-
h
+
i
*-
f
-
k
*-
g
;
return
b
}};
THREE
.
Quaternion
.
slerp
=
function
(
a
,
b
,
c
,
d
){
var
e
=
a
.
w
*
b
.
w
+
a
.
x
*
b
.
x
+
a
.
y
*
b
.
y
+
a
.
z
*
b
.
z
;
if
(
Math
.
abs
(
e
)
>=
1
)
return
c
.
w
=
a
.
w
,
c
.
x
=
a
.
x
,
c
.
y
=
a
.
y
,
c
.
z
=
a
.
z
,
c
;
var
g
=
Math
.
acos
(
e
),
f
=
Math
.
sqrt
(
1
-
e
*
e
);
if
(
Math
.
abs
(
f
)
<
0.001
0
)
return
c
.
w
=
0.5
*
(
a
.
w
+
b
.
w
),
c
.
x
=
0.5
*
(
a
.
x
+
b
.
x
),
c
.
y
=
0.5
*
(
a
.
y
+
b
.
y
),
c
.
z
=
0.5
*
(
a
.
z
+
b
.
z
),
c
;
e
=
Math
.
sin
((
1
-
d
)
*
g
)
/
f
;
d
=
Math
.
sin
(
d
*
g
)
/
f
;
c
.
w
=
a
.
w
*
e
+
b
.
w
*
d
;
c
.
x
=
a
.
x
*
e
+
b
.
x
*
d
;
c
.
y
=
a
.
y
*
e
+
b
.
y
*
d
;
c
.
z
=
a
.
z
*
e
+
b
.
z
*
d
;
return
c
};
THREE
.
Vertex
=
function
(
a
){
this
.
position
=
a
||
new
THREE
.
Vector3
};
THREE
.
Quaternion
.
slerp
=
function
(
a
,
b
,
c
,
d
){
var
e
=
a
.
w
*
b
.
w
+
a
.
x
*
b
.
x
+
a
.
y
*
b
.
y
+
a
.
z
*
b
.
z
;
if
(
Math
.
abs
(
e
)
>=
1
)
return
c
.
w
=
a
.
w
,
c
.
x
=
a
.
x
,
c
.
y
=
a
.
y
,
c
.
z
=
a
.
z
,
c
;
var
g
=
Math
.
acos
(
e
),
f
=
Math
.
sqrt
(
1
-
e
*
e
);
if
(
Math
.
abs
(
f
)
<
0.001
)
return
c
.
w
=
0.5
*
(
a
.
w
+
b
.
w
),
c
.
x
=
0.5
*
(
a
.
x
+
b
.
x
),
c
.
y
=
0.5
*
(
a
.
y
+
b
.
y
),
c
.
z
=
0.5
*
(
a
.
z
+
b
.
z
),
c
;
e
=
Math
.
sin
((
1
-
d
)
*
g
)
/
f
;
d
=
Math
.
sin
(
d
*
g
)
/
f
;
c
.
w
=
a
.
w
*
e
+
b
.
w
*
d
;
c
.
x
=
a
.
x
*
e
+
b
.
x
*
d
;
c
.
y
=
a
.
y
*
e
+
b
.
y
*
d
;
c
.
z
=
a
.
z
*
e
+
b
.
z
*
d
;
return
c
};
THREE
.
Vertex
=
function
(
a
){
this
.
position
=
a
||
new
THREE
.
Vector3
};
THREE
.
Face3
=
function
(
a
,
b
,
c
,
d
,
e
,
g
){
this
.
a
=
a
;
this
.
b
=
b
;
this
.
c
=
c
;
this
.
normal
=
d
instanceof
THREE
.
Vector3
?
d
:
new
THREE
.
Vector3
;
this
.
vertexNormals
=
d
instanceof
Array
?
d
:[];
this
.
color
=
e
instanceof
THREE
.
Color
?
e
:
new
THREE
.
Color
;
this
.
vertexColors
=
e
instanceof
Array
?
e
:[];
this
.
vertexTangents
=
[];
this
.
materials
=
g
instanceof
Array
?
g
:[
g
];
this
.
centroid
=
new
THREE
.
Vector3
};
THREE
.
Face4
=
function
(
a
,
b
,
c
,
d
,
e
,
g
,
f
){
this
.
a
=
a
;
this
.
b
=
b
;
this
.
c
=
c
;
this
.
d
=
d
;
this
.
normal
=
e
instanceof
THREE
.
Vector3
?
e
:
new
THREE
.
Vector3
;
this
.
vertexNormals
=
e
instanceof
Array
?
e
:[];
this
.
color
=
g
instanceof
THREE
.
Color
?
g
:
new
THREE
.
Color
;
this
.
vertexColors
=
g
instanceof
Array
?
g
:[];
this
.
vertexTangents
=
[];
this
.
materials
=
f
instanceof
Array
?
f
:[
f
];
this
.
centroid
=
new
THREE
.
Vector3
};
THREE
.
UV
=
function
(
a
,
b
){
this
.
set
(
a
||
0
,
b
||
0
)};
THREE
.
UV
.
prototype
=
{
set
:
function
(
a
,
b
){
this
.
u
=
a
;
this
.
v
=
b
;
return
this
},
copy
:
function
(
a
){
this
.
set
(
a
.
u
,
a
.
v
);
return
this
}};
THREE
.
Camera
=
function
(
a
,
b
,
c
,
d
,
e
){
THREE
.
Object3D
.
call
(
this
);
this
.
fov
=
a
||
50
;
this
.
aspect
=
b
||
1
;
this
.
near
=
c
||
0.1
;
this
.
far
=
d
||
2
E3
;
this
.
target
=
e
||
new
THREE
.
Object3D
;
this
.
useTarget
=!
0
;
this
.
matrixWorldInverse
=
new
THREE
.
Matrix4
;
this
.
projectionMatrix
=
null
;
this
.
updateProjectionMatrix
()};
THREE
.
Camera
.
prototype
=
new
THREE
.
Object3D
;
THREE
.
Camera
.
prototype
.
constructor
=
THREE
.
Camera
;
...
...
build/custom/ThreeExtras.js
浏览文件 @
24298068
此差异已折叠。
点击以展开。
build/custom/ThreeSVG.js
浏览文件 @
24298068
...
...
@@ -53,7 +53,7 @@ THREE.Quaternion.prototype={set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;thi
d
;
this
.
z
=
a
.
z
*
d
;
this
.
w
=
Math
.
cos
(
c
);
return
this
},
calculateW
:
function
(){
this
.
w
=-
Math
.
sqrt
(
Math
.
abs
(
1
-
this
.
x
*
this
.
x
-
this
.
y
*
this
.
y
-
this
.
z
*
this
.
z
));
return
this
},
inverse
:
function
(){
this
.
x
*=-
1
;
this
.
y
*=-
1
;
this
.
z
*=-
1
;
return
this
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
+
this
.
z
*
this
.
z
+
this
.
w
*
this
.
w
)},
normalize
:
function
(){
var
a
=
Math
.
sqrt
(
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
+
this
.
z
*
this
.
z
+
this
.
w
*
this
.
w
);
a
==
0
?
this
.
w
=
this
.
z
=
this
.
y
=
this
.
x
=
0
:(
a
=
1
/
a
,
this
.
x
*=
a
,
this
.
y
*=
a
,
this
.
z
*=
a
,
this
.
w
*=
a
);
return
this
},
multiplySelf
:
function
(
a
){
var
b
=
this
.
x
,
c
=
this
.
y
,
d
=
this
.
z
,
e
=
this
.
w
,
g
=
a
.
x
,
f
=
a
.
y
,
h
=
a
.
z
,
a
=
a
.
w
;
this
.
x
=
b
*
a
+
e
*
g
+
c
*
h
-
d
*
f
;
this
.
y
=
c
*
a
+
e
*
f
+
d
*
g
-
b
*
h
;
this
.
z
=
d
*
a
+
e
*
h
+
b
*
f
-
c
*
g
;
this
.
w
=
e
*
a
-
b
*
g
-
c
*
f
-
d
*
h
;
return
this
},
multiply
:
function
(
a
,
b
){
this
.
x
=
a
.
x
*
b
.
w
+
a
.
y
*
b
.
z
-
a
.
z
*
b
.
y
+
a
.
w
*
b
.
x
;
this
.
y
=-
a
.
x
*
b
.
z
+
a
.
y
*
b
.
w
+
a
.
z
*
b
.
x
+
a
.
w
*
b
.
y
;
this
.
z
=
a
.
x
*
b
.
y
-
a
.
y
*
b
.
x
+
a
.
z
*
b
.
w
+
a
.
w
*
b
.
z
;
this
.
w
=-
a
.
x
*
b
.
x
-
a
.
y
*
b
.
y
-
a
.
z
*
b
.
z
+
a
.
w
*
b
.
w
;
return
this
},
multiplyVector3
:
function
(
a
,
b
){
b
||
(
b
=
a
);
var
c
=
a
.
x
,
d
=
a
.
y
,
e
=
a
.
z
,
g
=
this
.
x
,
f
=
this
.
y
,
h
=
this
.
z
,
k
=
this
.
w
,
l
=
k
*
c
+
f
*
e
-
h
*
d
,
i
=
k
*
d
+
h
*
c
-
g
*
e
,
j
=
k
*
e
+
g
*
d
-
f
*
c
,
c
=-
g
*
c
-
f
*
d
-
h
*
e
;
b
.
x
=
l
*
k
+
c
*-
g
+
i
*-
h
-
j
*-
f
;
b
.
y
=
i
*
k
+
c
*-
f
+
j
*-
g
-
l
*-
h
;
b
.
z
=
j
*
k
+
c
*-
h
+
l
*-
f
-
i
*-
g
;
return
b
}};
THREE
.
Quaternion
.
slerp
=
function
(
a
,
b
,
c
,
d
){
var
e
=
a
.
w
*
b
.
w
+
a
.
x
*
b
.
x
+
a
.
y
*
b
.
y
+
a
.
z
*
b
.
z
;
if
(
Math
.
abs
(
e
)
>=
1
)
return
c
.
w
=
a
.
w
,
c
.
x
=
a
.
x
,
c
.
y
=
a
.
y
,
c
.
z
=
a
.
z
,
c
;
var
g
=
Math
.
acos
(
e
),
f
=
Math
.
sqrt
(
1
-
e
*
e
);
if
(
Math
.
abs
(
f
)
<
0.001
0
)
return
c
.
w
=
0.5
*
(
a
.
w
+
b
.
w
),
c
.
x
=
0.5
*
(
a
.
x
+
b
.
x
),
c
.
y
=
0.5
*
(
a
.
y
+
b
.
y
),
c
.
z
=
0.5
*
(
a
.
z
+
b
.
z
),
c
;
e
=
Math
.
sin
((
1
-
d
)
*
g
)
/
f
;
d
=
Math
.
sin
(
d
*
g
)
/
f
;
c
.
w
=
a
.
w
*
e
+
b
.
w
*
d
;
c
.
x
=
a
.
x
*
e
+
b
.
x
*
d
;
c
.
y
=
a
.
y
*
e
+
b
.
y
*
d
;
c
.
z
=
a
.
z
*
e
+
b
.
z
*
d
;
return
c
};
THREE
.
Vertex
=
function
(
a
){
this
.
position
=
a
||
new
THREE
.
Vector3
};
THREE
.
Quaternion
.
slerp
=
function
(
a
,
b
,
c
,
d
){
var
e
=
a
.
w
*
b
.
w
+
a
.
x
*
b
.
x
+
a
.
y
*
b
.
y
+
a
.
z
*
b
.
z
;
if
(
Math
.
abs
(
e
)
>=
1
)
return
c
.
w
=
a
.
w
,
c
.
x
=
a
.
x
,
c
.
y
=
a
.
y
,
c
.
z
=
a
.
z
,
c
;
var
g
=
Math
.
acos
(
e
),
f
=
Math
.
sqrt
(
1
-
e
*
e
);
if
(
Math
.
abs
(
f
)
<
0.001
)
return
c
.
w
=
0.5
*
(
a
.
w
+
b
.
w
),
c
.
x
=
0.5
*
(
a
.
x
+
b
.
x
),
c
.
y
=
0.5
*
(
a
.
y
+
b
.
y
),
c
.
z
=
0.5
*
(
a
.
z
+
b
.
z
),
c
;
e
=
Math
.
sin
((
1
-
d
)
*
g
)
/
f
;
d
=
Math
.
sin
(
d
*
g
)
/
f
;
c
.
w
=
a
.
w
*
e
+
b
.
w
*
d
;
c
.
x
=
a
.
x
*
e
+
b
.
x
*
d
;
c
.
y
=
a
.
y
*
e
+
b
.
y
*
d
;
c
.
z
=
a
.
z
*
e
+
b
.
z
*
d
;
return
c
};
THREE
.
Vertex
=
function
(
a
){
this
.
position
=
a
||
new
THREE
.
Vector3
};
THREE
.
Face3
=
function
(
a
,
b
,
c
,
d
,
e
,
g
){
this
.
a
=
a
;
this
.
b
=
b
;
this
.
c
=
c
;
this
.
normal
=
d
instanceof
THREE
.
Vector3
?
d
:
new
THREE
.
Vector3
;
this
.
vertexNormals
=
d
instanceof
Array
?
d
:[];
this
.
color
=
e
instanceof
THREE
.
Color
?
e
:
new
THREE
.
Color
;
this
.
vertexColors
=
e
instanceof
Array
?
e
:[];
this
.
vertexTangents
=
[];
this
.
materials
=
g
instanceof
Array
?
g
:[
g
];
this
.
centroid
=
new
THREE
.
Vector3
};
THREE
.
Face4
=
function
(
a
,
b
,
c
,
d
,
e
,
g
,
f
){
this
.
a
=
a
;
this
.
b
=
b
;
this
.
c
=
c
;
this
.
d
=
d
;
this
.
normal
=
e
instanceof
THREE
.
Vector3
?
e
:
new
THREE
.
Vector3
;
this
.
vertexNormals
=
e
instanceof
Array
?
e
:[];
this
.
color
=
g
instanceof
THREE
.
Color
?
g
:
new
THREE
.
Color
;
this
.
vertexColors
=
g
instanceof
Array
?
g
:[];
this
.
vertexTangents
=
[];
this
.
materials
=
f
instanceof
Array
?
f
:[
f
];
this
.
centroid
=
new
THREE
.
Vector3
};
THREE
.
UV
=
function
(
a
,
b
){
this
.
set
(
a
||
0
,
b
||
0
)};
THREE
.
UV
.
prototype
=
{
set
:
function
(
a
,
b
){
this
.
u
=
a
;
this
.
v
=
b
;
return
this
},
copy
:
function
(
a
){
this
.
set
(
a
.
u
,
a
.
v
);
return
this
}};
THREE
.
Geometry
=
function
(){
this
.
id
=
"
Geometry
"
+
THREE
.
GeometryIdCounter
++
;
this
.
vertices
=
[];
this
.
colors
=
[];
this
.
faces
=
[];
this
.
edges
=
[];
this
.
faceUvs
=
[[]];
this
.
faceVertexUvs
=
[[]];
this
.
morphTargets
=
[];
this
.
morphColors
=
[];
this
.
skinWeights
=
[];
this
.
skinIndices
=
[];
this
.
boundingSphere
=
this
.
boundingBox
=
null
;
this
.
hasTangents
=!
1
};
...
...
build/custom/ThreeWebGL.js
浏览文件 @
24298068
...
...
@@ -53,7 +53,7 @@ THREE.Quaternion.prototype={set:function(b,e,d,f){this.x=b;this.y=e;this.z=d;thi
f
;
this
.
z
=
b
.
z
*
f
;
this
.
w
=
Math
.
cos
(
d
);
return
this
},
calculateW
:
function
(){
this
.
w
=-
Math
.
sqrt
(
Math
.
abs
(
1
-
this
.
x
*
this
.
x
-
this
.
y
*
this
.
y
-
this
.
z
*
this
.
z
));
return
this
},
inverse
:
function
(){
this
.
x
*=-
1
;
this
.
y
*=-
1
;
this
.
z
*=-
1
;
return
this
},
length
:
function
(){
return
Math
.
sqrt
(
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
+
this
.
z
*
this
.
z
+
this
.
w
*
this
.
w
)},
normalize
:
function
(){
var
b
=
Math
.
sqrt
(
this
.
x
*
this
.
x
+
this
.
y
*
this
.
y
+
this
.
z
*
this
.
z
+
this
.
w
*
this
.
w
);
b
==
0
?
this
.
w
=
this
.
z
=
this
.
y
=
this
.
x
=
0
:(
b
=
1
/
b
,
this
.
x
*=
b
,
this
.
y
*=
b
,
this
.
z
*=
b
,
this
.
w
*=
b
);
return
this
},
multiplySelf
:
function
(
b
){
var
e
=
this
.
x
,
d
=
this
.
y
,
f
=
this
.
z
,
h
=
this
.
w
,
i
=
b
.
x
,
g
=
b
.
y
,
j
=
b
.
z
,
b
=
b
.
w
;
this
.
x
=
e
*
b
+
h
*
i
+
d
*
j
-
f
*
g
;
this
.
y
=
d
*
b
+
h
*
g
+
f
*
i
-
e
*
j
;
this
.
z
=
f
*
b
+
h
*
j
+
e
*
g
-
d
*
i
;
this
.
w
=
h
*
b
-
e
*
i
-
d
*
g
-
f
*
j
;
return
this
},
multiply
:
function
(
b
,
e
){
this
.
x
=
b
.
x
*
e
.
w
+
b
.
y
*
e
.
z
-
b
.
z
*
e
.
y
+
b
.
w
*
e
.
x
;
this
.
y
=-
b
.
x
*
e
.
z
+
b
.
y
*
e
.
w
+
b
.
z
*
e
.
x
+
b
.
w
*
e
.
y
;
this
.
z
=
b
.
x
*
e
.
y
-
b
.
y
*
e
.
x
+
b
.
z
*
e
.
w
+
b
.
w
*
e
.
z
;
this
.
w
=-
b
.
x
*
e
.
x
-
b
.
y
*
e
.
y
-
b
.
z
*
e
.
z
+
b
.
w
*
e
.
w
;
return
this
},
multiplyVector3
:
function
(
b
,
e
){
e
||
(
e
=
b
);
var
d
=
b
.
x
,
f
=
b
.
y
,
h
=
b
.
z
,
i
=
this
.
x
,
g
=
this
.
y
,
j
=
this
.
z
,
k
=
this
.
w
,
o
=
k
*
d
+
g
*
h
-
j
*
f
,
q
=
k
*
f
+
j
*
d
-
i
*
h
,
n
=
k
*
h
+
i
*
f
-
g
*
d
,
d
=-
i
*
d
-
g
*
f
-
j
*
h
;
e
.
x
=
o
*
k
+
d
*-
i
+
q
*-
j
-
n
*-
g
;
e
.
y
=
q
*
k
+
d
*-
g
+
n
*-
i
-
o
*-
j
;
e
.
z
=
n
*
k
+
d
*-
j
+
o
*-
g
-
q
*-
i
;
return
e
}};
THREE
.
Quaternion
.
slerp
=
function
(
b
,
e
,
d
,
f
){
var
h
=
b
.
w
*
e
.
w
+
b
.
x
*
e
.
x
+
b
.
y
*
e
.
y
+
b
.
z
*
e
.
z
;
if
(
Math
.
abs
(
h
)
>=
1
)
return
d
.
w
=
b
.
w
,
d
.
x
=
b
.
x
,
d
.
y
=
b
.
y
,
d
.
z
=
b
.
z
,
d
;
var
i
=
Math
.
acos
(
h
),
g
=
Math
.
sqrt
(
1
-
h
*
h
);
if
(
Math
.
abs
(
g
)
<
0.001
0
)
return
d
.
w
=
0.5
*
(
b
.
w
+
e
.
w
),
d
.
x
=
0.5
*
(
b
.
x
+
e
.
x
),
d
.
y
=
0.5
*
(
b
.
y
+
e
.
y
),
d
.
z
=
0.5
*
(
b
.
z
+
e
.
z
),
d
;
h
=
Math
.
sin
((
1
-
f
)
*
i
)
/
g
;
f
=
Math
.
sin
(
f
*
i
)
/
g
;
d
.
w
=
b
.
w
*
h
+
e
.
w
*
f
;
d
.
x
=
b
.
x
*
h
+
e
.
x
*
f
;
d
.
y
=
b
.
y
*
h
+
e
.
y
*
f
;
d
.
z
=
b
.
z
*
h
+
e
.
z
*
f
;
return
d
};
THREE
.
Vertex
=
function
(
b
){
this
.
position
=
b
||
new
THREE
.
Vector3
};
THREE
.
Quaternion
.
slerp
=
function
(
b
,
e
,
d
,
f
){
var
h
=
b
.
w
*
e
.
w
+
b
.
x
*
e
.
x
+
b
.
y
*
e
.
y
+
b
.
z
*
e
.
z
;
if
(
Math
.
abs
(
h
)
>=
1
)
return
d
.
w
=
b
.
w
,
d
.
x
=
b
.
x
,
d
.
y
=
b
.
y
,
d
.
z
=
b
.
z
,
d
;
var
i
=
Math
.
acos
(
h
),
g
=
Math
.
sqrt
(
1
-
h
*
h
);
if
(
Math
.
abs
(
g
)
<
0.001
)
return
d
.
w
=
0.5
*
(
b
.
w
+
e
.
w
),
d
.
x
=
0.5
*
(
b
.
x
+
e
.
x
),
d
.
y
=
0.5
*
(
b
.
y
+
e
.
y
),
d
.
z
=
0.5
*
(
b
.
z
+
e
.
z
),
d
;
h
=
Math
.
sin
((
1
-
f
)
*
i
)
/
g
;
f
=
Math
.
sin
(
f
*
i
)
/
g
;
d
.
w
=
b
.
w
*
h
+
e
.
w
*
f
;
d
.
x
=
b
.
x
*
h
+
e
.
x
*
f
;
d
.
y
=
b
.
y
*
h
+
e
.
y
*
f
;
d
.
z
=
b
.
z
*
h
+
e
.
z
*
f
;
return
d
};
THREE
.
Vertex
=
function
(
b
){
this
.
position
=
b
||
new
THREE
.
Vector3
};
THREE
.
Face3
=
function
(
b
,
e
,
d
,
f
,
h
,
i
){
this
.
a
=
b
;
this
.
b
=
e
;
this
.
c
=
d
;
this
.
normal
=
f
instanceof
THREE
.
Vector3
?
f
:
new
THREE
.
Vector3
;
this
.
vertexNormals
=
f
instanceof
Array
?
f
:[];
this
.
color
=
h
instanceof
THREE
.
Color
?
h
:
new
THREE
.
Color
;
this
.
vertexColors
=
h
instanceof
Array
?
h
:[];
this
.
vertexTangents
=
[];
this
.
materials
=
i
instanceof
Array
?
i
:[
i
];
this
.
centroid
=
new
THREE
.
Vector3
};
THREE
.
Face4
=
function
(
b
,
e
,
d
,
f
,
h
,
i
,
g
){
this
.
a
=
b
;
this
.
b
=
e
;
this
.
c
=
d
;
this
.
d
=
f
;
this
.
normal
=
h
instanceof
THREE
.
Vector3
?
h
:
new
THREE
.
Vector3
;
this
.
vertexNormals
=
h
instanceof
Array
?
h
:[];
this
.
color
=
i
instanceof
THREE
.
Color
?
i
:
new
THREE
.
Color
;
this
.
vertexColors
=
i
instanceof
Array
?
i
:[];
this
.
vertexTangents
=
[];
this
.
materials
=
g
instanceof
Array
?
g
:[
g
];
this
.
centroid
=
new
THREE
.
Vector3
};
THREE
.
UV
=
function
(
b
,
e
){
this
.
set
(
b
||
0
,
e
||
0
)};
THREE
.
UV
.
prototype
=
{
set
:
function
(
b
,
e
){
this
.
u
=
b
;
this
.
v
=
e
;
return
this
},
copy
:
function
(
b
){
this
.
set
(
b
.
u
,
b
.
v
);
return
this
}};
THREE
.
Geometry
=
function
(){
this
.
id
=
"
Geometry
"
+
THREE
.
GeometryIdCounter
++
;
this
.
vertices
=
[];
this
.
colors
=
[];
this
.
faces
=
[];
this
.
edges
=
[];
this
.
faceUvs
=
[[]];
this
.
faceVertexUvs
=
[[]];
this
.
morphTargets
=
[];
this
.
morphColors
=
[];
this
.
skinWeights
=
[];
this
.
skinIndices
=
[];
this
.
boundingSphere
=
this
.
boundingBox
=
null
;
this
.
hasTangents
=!
1
};
...
...
@@ -220,9 +220,9 @@ h.uvScale.y),c.uniform2f(g.uvOffset,h.uvOffset.x,h.uvOffset.y),c.uniform2f(g.ali
k
=
new
THREE
.
Vector3
,
o
=
qa
/
va
,
p
=
va
*
0.5
,
n
=
qa
*
0.5
,
q
=
16
/
qa
,
t
=
[
q
*
o
,
q
],
u
=
[
1
,
1
,
0
],
r
=
[
1
,
1
],
z
=
v
.
uniforms
;
d
=
v
.
attributes
;
c
.
useProgram
(
v
.
program
);
la
=
v
.
program
;
F
=-
1
;
Ia
||
(
c
.
enableVertexAttribArray
(
v
.
attributes
.
vertex
),
c
.
enableVertexAttribArray
(
v
.
attributes
.
uv
),
Ia
=!
0
);
c
.
uniform1i
(
z
.
occlusionMap
,
0
);
c
.
uniform1i
(
z
.
map
,
1
);
c
.
bindBuffer
(
c
.
ARRAY_BUFFER
,
v
.
vertexBuffer
);
c
.
vertexAttribPointer
(
d
.
vertex
,
2
,
c
.
FLOAT
,
!
1
,
16
,
0
);
c
.
vertexAttribPointer
(
d
.
uv
,
2
,
c
.
FLOAT
,
!
1
,
16
,
8
);
c
.
bindBuffer
(
c
.
ELEMENT_ARRAY_BUFFER
,
v
.
elementBuffer
);
c
.
disable
(
c
.
CULL_FACE
);
c
.
depthMask
(
!
1
);
c
.
activeTexture
(
c
.
TEXTURE0
);
c
.
bindTexture
(
c
.
TEXTURE_2D
,
v
.
occlusionTexture
);
c
.
activeTexture
(
c
.
TEXTURE1
);
for
(
f
=
0
;
f
<
h
;
f
++
)
if
(
d
=
b
.
__webglLensFlares
[
f
].
object
,
k
.
set
(
d
.
matrixWorld
.
n14
,
d
.
matrixWorld
.
n24
,
d
.
matrixWorld
.
n34
),
e
.
matrixWorldInverse
.
multiplyVector3
(
k
),
e
.
projectionMatrix
.
multiplyVector3
(
k
),
u
[
0
]
=
k
.
x
,
u
[
1
]
=
k
.
y
,
u
[
2
]
=
k
.
z
,
r
[
0
]
=
u
[
0
]
*
p
+
p
,
r
[
1
]
=
u
[
1
]
*
n
+
n
,
v
.
hasVertexTexture
||
r
[
0
]
>
0
&&
r
[
0
]
<
va
&&
r
[
1
]
>
0
&&
r
[
1
]
<
qa
){
c
.
bindTexture
(
c
.
TEXTURE_2D
,
v
.
tempTexture
);
c
.
copyTexImage2D
(
c
.
TEXTURE_2D
,
0
,
c
.
RGB
,
r
[
0
]
-
8
,
r
[
1
]
-
8
,
16
,
16
,
0
);
c
.
uniform1i
(
z
.
renderType
,
0
);
c
.
uniform2fv
(
z
.
scale
,
t
);
c
.
uniform3fv
(
z
.
screenPosition
,
u
);
c
.
disable
(
c
.
BLEND
);
c
.
enable
(
c
.
DEPTH_TEST
);
c
.
drawElements
(
c
.
TRIANGLES
,
6
,
c
.
UNSIGNED_SHORT
,
0
);
c
.
bindTexture
(
c
.
TEXTURE_2D
,
v
.
occlusionTexture
);
c
.
copyTexImage2D
(
c
.
TEXTURE_2D
,
0
,
c
.
RGBA
,
r
[
0
]
-
8
,
r
[
1
]
-
8
,
16
,
16
,
0
);
c
.
uniform1i
(
z
.
renderType
,
1
);
c
.
disable
(
c
.
DEPTH_TEST
);
c
.
bindTexture
(
c
.
TEXTURE_2D
,
v
.
tempTexture
);
c
.
drawElements
(
c
.
TRIANGLES
,
6
,
c
.
UNSIGNED_SHORT
,
0
);
d
.
positionScreen
.
x
=
u
[
0
];
d
.
positionScreen
.
y
=
u
[
1
];
d
.
positionScreen
.
z
=
u
[
2
];
d
.
customUpdateCallback
?
d
.
customUpdateCallback
(
d
):
d
.
updateLensFlares
();
c
.
uniform1i
(
z
.
renderType
,
2
);
c
.
enable
(
c
.
BLEND
);
g
=
0
;
for
(
i
=
d
.
lensFlares
.
length
;
g
<
i
;
g
++
)
if
(
j
=
d
.
lensFlares
[
g
],
j
.
opacity
>
0.001
0
&&
j
.
scale
>
0.0010
)
u
[
0
]
=
j
.
x
,
u
[
1
]
=
j
.
y
,
u
[
2
]
=
j
.
z
,
q
=
j
.
size
*
j
.
scale
/
qa
,
t
[
0
]
=
q
*
o
,
t
[
1
]
=
q
,
c
.
uniform3fv
(
z
.
screenPosition
,
u
),
c
.
uniform2fv
(
z
.
scale
,
t
),
c
.
uniform1f
(
z
.
rotation
,
j
.
rotation
),
c
.
uniform1f
(
z
.
opacity
,
j
.
opacity
),
y
(
j
.
blending
),
P
(
j
.
texture
,
1
),
c
.
drawElements
(
c
.
TRIANGLES
,
6
,
c
.
UNSIGNED_SHORT
,
0
)}
c
.
enable
(
c
.
CULL_FACE
);
c
.
enable
(
c
.
DEPTH_TEST
);
c
.
depthMask
(
ma
)}
function
C
(
b
,
c
){
b
.
_modelViewMatrix
.
multiplyToArray
(
c
.
matrixWorldInverse
,
b
.
matrixWorld
,
b
.
_modelViewMatrixArray
);
THREE
.
Matrix4
.
makeInvert3x3
(
b
.
_modelViewMatrix
).
transposeIntoArray
(
b
.
_normalMatrixArray
)}
function
N
(
b
){
var
d
,
f
,
h
,
g
;
if
(
b
instanceof
THREE
.
Mesh
){
f
=
b
.
geometry
;
for
(
d
in
f
.
geometryGroups
){
h
=
f
.
geometryGroups
[
d
];
a
:{
for
(
var
i
=
g
=
void
0
,
j
=
void
0
,
k
=
void
0
,
o
=
void
0
,
o
=
h
.
__materials
,
i
=
0
,
j
=
o
.
length
;
i
<
j
;
i
++
)
if
(
k
=
o
[
i
],
k
.
attributes
)
for
(
g
in
k
.
attributes
)
if
(
k
.
attributes
[
g
].
needsUpdate
){
g
=
!
0
;
break
a
}
g
=!
1
}
if
(
f
.
__dirtyVertices
||
f
.
__dirtyMorphTargets
||
f
.
__dirtyElements
||
f
.
__dirtyUvs
||
f
.
__dirtyNormals
||
f
.
__dirtyColors
||
f
.
__dirtyTangents
||
g
)
if
(
g
=
h
,
i
=
b
,
j
=
c
.
DYNAMIC_DRAW
,
g
.
__inittedArrays
){
var
n
=
o
=
k
=
void
0
,
p
=
void
0
,
q
=
n
=
void
0
,
t
=
void
0
,
u
=
void
0
,
r
=
void
0
,
y
=
void
0
,
v
=
void
0
,
z
=
void
0
,
C
=
void
0
,
D
=
void
0
,
x
=
void
0
,
J
=
void
0
,
I
=
void
0
,
E
=
void
0
,
s
=
p
=
r
=
p
=
u
=
t
=
void
0
,
A
=
void
0
,
m
=
A
=
s
=
t
=
void
0
,
F
=
void
0
,
H
=
m
=
A
=
s
=
n
=
n
=
q
=
r
=
p
=
m
=
A
=
s
=
F
=
m
=
A
=
s
=
F
=
m
=
A
=
s
=
void
0
,
B
=
0
,
G
=
0
,
P
=
0
,
T
=
0
,
L
=
0
,
K
=
0
,
U
=
0
,
M
=
0
,
ca
=
0
,
w
=
0
,
da
=
0
,
A
=
s
=
0
,
fa
=
g
.
__vertexArray
,
u
[
2
];
d
.
customUpdateCallback
?
d
.
customUpdateCallback
(
d
):
d
.
updateLensFlares
();
c
.
uniform1i
(
z
.
renderType
,
2
);
c
.
enable
(
c
.
BLEND
);
g
=
0
;
for
(
i
=
d
.
lensFlares
.
length
;
g
<
i
;
g
++
)
if
(
j
=
d
.
lensFlares
[
g
],
j
.
opacity
>
0.001
&&
j
.
scale
>
0.001
)
u
[
0
]
=
j
.
x
,
u
[
1
]
=
j
.
y
,
u
[
2
]
=
j
.
z
,
q
=
j
.
size
*
j
.
scale
/
qa
,
t
[
0
]
=
q
*
o
,
t
[
1
]
=
q
,
c
.
uniform3fv
(
z
.
screenPosition
,
u
),
c
.
uniform2fv
(
z
.
scale
,
t
),
c
.
uniform1f
(
z
.
rotation
,
j
.
rotation
),
c
.
uniform1f
(
z
.
opacity
,
j
.
opacity
),
y
(
j
.
blending
),
P
(
j
.
texture
,
1
),
c
.
drawElements
(
c
.
TRIANGLES
,
6
,
c
.
UNSIGNED_SHORT
,
0
)}
c
.
enable
(
c
.
CULL_FACE
);
c
.
enable
(
c
.
DEPTH_TEST
);
c
.
depthMask
(
ma
)}
function
C
(
b
,
c
){
b
.
_modelViewMatrix
.
multiplyToArray
(
c
.
matrixWorldInverse
,
b
.
matrixWorld
,
b
.
_modelViewMatrixArray
);
THREE
.
Matrix4
.
makeInvert3x3
(
b
.
_modelViewMatrix
).
transposeIntoArray
(
b
.
_normalMatrixArray
)}
function
N
(
b
){
var
d
,
f
,
h
,
g
;
if
(
b
instanceof
THREE
.
Mesh
){
f
=
b
.
geometry
;
for
(
d
in
f
.
geometryGroups
){
h
=
f
.
geometryGroups
[
d
];
a
:{
for
(
var
i
=
g
=
void
0
,
j
=
void
0
,
k
=
void
0
,
o
=
void
0
,
o
=
h
.
__materials
,
i
=
0
,
j
=
o
.
length
;
i
<
j
;
i
++
)
if
(
k
=
o
[
i
],
k
.
attributes
)
for
(
g
in
k
.
attributes
)
if
(
k
.
attributes
[
g
].
needsUpdate
){
g
=!
0
;
break
a
}
g
=!
1
}
if
(
f
.
__dirtyVertices
||
f
.
__dirtyMorphTargets
||
f
.
__dirtyElements
||
f
.
__dirtyUvs
||
f
.
__dirtyNormals
||
f
.
__dirtyColors
||
f
.
__dirtyTangents
||
g
)
if
(
g
=
h
,
i
=
b
,
j
=
c
.
DYNAMIC_DRAW
,
g
.
__inittedArrays
){
var
n
=
o
=
k
=
void
0
,
p
=
void
0
,
q
=
n
=
void
0
,
t
=
void
0
,
u
=
void
0
,
r
=
void
0
,
y
=
void
0
,
v
=
void
0
,
z
=
void
0
,
C
=
void
0
,
D
=
void
0
,
x
=
void
0
,
J
=
void
0
,
I
=
void
0
,
E
=
void
0
,
s
=
p
=
r
=
p
=
u
=
t
=
void
0
,
A
=
void
0
,
m
=
A
=
s
=
t
=
void
0
,
F
=
void
0
,
H
=
m
=
A
=
s
=
n
=
n
=
q
=
r
=
p
=
m
=
A
=
s
=
F
=
m
=
A
=
s
=
F
=
m
=
A
=
s
=
void
0
,
B
=
0
,
G
=
0
,
P
=
0
,
T
=
0
,
L
=
0
,
K
=
0
,
U
=
0
,
M
=
0
,
ca
=
0
,
w
=
0
,
da
=
0
,
A
=
s
=
0
,
fa
=
g
.
__vertexArray
,
$
=
g
.
__uvArray
,
aa
=
g
.
__uv2Array
,
Q
=
g
.
__normalArray
,
V
=
g
.
__tangentArray
,
ga
=
g
.
__colorArray
,
W
=
g
.
__skinVertexAArray
,
X
=
g
.
__skinVertexBArray
,
Y
=
g
.
__skinIndexArray
,
Z
=
g
.
__skinWeightArray
,
ea
=
g
.
__morphTargetsArrays
,
S
=
g
.
__webglCustomAttributes
,
m
=
void
0
,
N
=
g
.
__faceArray
,
R
=
g
.
__lineArray
,
la
=
g
.
__needsSmoothNormals
,
v
=
g
.
__vertexColorType
,
y
=
g
.
__uvType
,
z
=
g
.
__normalType
,
ja
=
i
.
geometry
,
ma
=
ja
.
__dirtyVertices
,
na
=
ja
.
__dirtyElements
,
ha
=
ja
.
__dirtyUvs
,
pa
=
ja
.
__dirtyNormals
,
qa
=
ja
.
__dirtyTangents
,
ra
=
ja
.
__dirtyColors
,
sa
=
ja
.
__dirtyMorphTargets
,
ia
=
ja
.
vertices
,
ua
=
g
.
faces
,
xa
=
ja
.
faces
,
va
=
ja
.
faceVertexUvs
[
0
],
ya
=
ja
.
faceVertexUvs
[
1
],
oa
=
ja
.
skinVerticesA
,
ta
=
ja
.
skinVerticesB
,
wa
=
ja
.
skinIndices
,
Ba
=
ja
.
skinWeights
,
Ca
=
i
instanceof
THREE
.
ShadowVolume
?
ja
.
edgeFaces
:
void
0
,
Aa
=
ja
.
morphTargets
;
if
(
S
)
for
(
H
in
S
)
S
[
H
].
offset
=
0
,
S
[
H
].
offsetSrc
=
0
;
k
=
0
;
for
(
o
=
ua
.
length
;
k
<
o
;
k
++
)
if
(
n
=
ua
[
k
],
p
=
xa
[
n
],
va
&&
(
C
=
va
[
n
]),
ya
&&
(
D
=
ya
[
n
]),
n
=
p
.
vertexNormals
,
q
=
p
.
normal
,
t
=
p
.
vertexColors
,
u
=
p
.
color
,
r
=
p
.
vertexTangents
,
p
instanceof
THREE
.
Face3
){
if
(
ma
)
x
=
ia
[
p
.
a
].
position
,
J
=
ia
[
p
.
b
].
position
,
I
=
ia
[
p
.
c
].
position
,
fa
[
G
]
=
x
.
x
,
fa
[
G
+
1
]
=
x
.
y
,
fa
[
G
+
2
]
=
x
.
z
,
fa
[
G
+
3
]
=
J
.
x
,
fa
[
G
+
4
]
=
J
.
y
,
fa
[
G
+
5
]
=
J
.
z
,
fa
[
G
+
6
]
=
I
.
x
,
fa
[
G
+
7
]
=
I
.
y
,
fa
[
G
+
8
]
=
I
.
z
,
G
+=
9
;
if
(
S
)
for
(
H
in
S
)
if
(
m
=
S
[
H
],
m
.
__original
.
needsUpdate
)
s
=
m
.
offset
,
A
=
m
.
offsetSrc
,
m
.
size
===
1
?(
m
.
boundTo
===
void
0
||
m
.
boundTo
===
"
vertices
"
?(
m
.
array
[
s
+
0
]
=
m
.
value
[
p
.
a
],
m
.
array
[
s
+
1
]
=
m
.
value
[
p
.
b
],
m
.
array
[
s
+
2
]
=
m
.
value
[
p
.
c
]):
m
.
boundTo
===
"
faces
"
?(
m
.
array
[
s
+
0
]
=
m
.
value
[
A
],
m
.
array
[
s
+
1
]
=
m
.
value
[
A
],
m
.
array
[
s
+
2
]
=
m
.
value
[
A
],
m
.
offsetSrc
++
):
m
.
boundTo
===
"
faceVertices
"
&&
(
m
.
array
[
s
+
0
]
=
m
.
value
[
A
+
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录