Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
2c86fbbc
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,发现更多精彩内容 >>
提交
2c86fbbc
编写于
8月 06, 2012
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dumb material.clone() for the rest of the materials.
上级
aadb1d78
变更
12
展开全部
隐藏空白更改
内联
并排
Showing
12 changed file
with
231 addition
and
48 deletion
+231
-48
build/Three.js
build/Three.js
+24
-13
build/custom/ThreeCanvas.js
build/custom/ThreeCanvas.js
+19
-10
build/custom/ThreeWebGL.js
build/custom/ThreeWebGL.js
+23
-12
src/materials/LineBasicMaterial.js
src/materials/LineBasicMaterial.js
+15
-1
src/materials/Material.js
src/materials/Material.js
+5
-3
src/materials/MeshDepthMaterial.js
src/materials/MeshDepthMaterial.js
+8
-3
src/materials/MeshLambertMaterial.js
src/materials/MeshLambertMaterial.js
+36
-1
src/materials/MeshNormalMaterial.js
src/materials/MeshNormalMaterial.js
+10
-1
src/materials/MeshPhongMaterial.js
src/materials/MeshPhongMaterial.js
+41
-1
src/materials/ParticleBasicMaterial.js
src/materials/ParticleBasicMaterial.js
+16
-1
src/materials/ParticleCanvasMaterial.js
src/materials/ParticleCanvasMaterial.js
+8
-1
src/materials/ShaderMaterial.js
src/materials/ShaderMaterial.js
+26
-1
未找到文件。
build/Three.js
浏览文件 @
2c86fbbc
此差异已折叠。
点击以展开。
build/custom/ThreeCanvas.js
浏览文件 @
2c86fbbc
...
...
@@ -132,8 +132,8 @@ a.mapLight&&b&&e(k,"lightMap",a.mapLight,a.mapLightRepeat,a.mapLightOffset,a.map
k
.
map
;
h
.
enableDiffuse
.
value
=
true
}
if
(
k
.
specularMap
){
h
.
tSpecular
.
texture
=
k
.
specularMap
;
h
.
enableSpecular
.
value
=
true
}
if
(
k
.
lightMap
){
h
.
tAO
.
texture
=
k
.
lightMap
;
h
.
enableAO
.
value
=
true
}
h
.
uDiffuseColor
.
value
.
setHex
(
k
.
color
);
h
.
uSpecularColor
.
value
.
setHex
(
k
.
specular
);
h
.
uAmbientColor
.
value
.
setHex
(
k
.
ambient
);
h
.
uShininess
.
value
=
k
.
shininess
;
if
(
k
.
opacity
!==
void
0
)
h
.
uOpacity
.
value
=
k
.
opacity
;
k
=
new
THREE
.
ShaderMaterial
({
fragmentShader
:
m
.
fragmentShader
,
vertexShader
:
m
.
vertexShader
,
uniforms
:
h
,
lights
:
true
,
fog
:
true
})}
else
k
=
new
THREE
[
m
](
k
);
if
(
a
.
DbgName
!==
void
0
)
k
.
name
=
a
.
DbgName
;
return
k
}};
THREE
.
BinaryLoader
=
function
(
a
){
THREE
.
Loader
.
call
(
this
,
a
)};
THREE
.
BinaryLoader
.
prototype
=
Object
.
create
(
THREE
.
Loader
.
prototype
);
THREE
.
BinaryLoader
.
prototype
.
load
=
function
(
a
,
b
,
c
,
d
){
var
c
=
c
?
c
:
this
.
extractUrlBase
(
a
),
d
=
d
?
d
:
this
.
extractUrlBase
(
a
),
f
=
this
.
showProgress
?
THREE
.
Loader
.
prototype
.
updateProgress
:
null
;
this
.
onLoadStart
();
this
.
loadAjaxJSON
(
this
,
a
,
b
,
c
,
d
,
f
)};
THREE
.
BinaryLoader
.
prototype
.
loadAjaxJSON
=
function
(
a
,
b
,
c
,
d
,
f
,
e
){
var
g
=
new
XMLHttpRequest
;
g
.
onreadystatechange
=
function
(){
if
(
g
.
readyState
==
4
)
if
(
g
.
status
==
200
||
g
.
status
==
0
){
var
j
=
JSON
.
parse
(
g
.
responseText
);
a
.
loadAjaxBuffers
(
j
,
c
,
f
,
d
,
e
)}
else
console
.
error
(
"
THREE.BinaryLoader: Couldn't load [
"
+
b
+
"
] [
"
+
g
.
status
+
"
]
"
)};
g
.
open
(
"
GET
"
,
b
,
true
);
g
.
overrideMimeType
&&
g
.
overrideMimeType
(
"
text/plain; charset=x-user-defined
"
);
g
.
setRequestHeader
(
"
Content-Type
"
,
"
text/plain
"
);
g
.
send
(
null
)};
THREE
.
BinaryLoader
.
prototype
.
loadAjaxBuffers
=
function
(
a
,
b
,
c
,
d
,
f
){
var
e
=
new
XMLHttpRequest
,
g
=
c
+
"
/
"
+
a
.
buffers
,
j
=
0
;
e
.
onreadystatechange
=
function
(){
if
(
e
.
readyState
==
4
)
e
.
status
==
200
||
e
.
status
==
0
?
THREE
.
BinaryLoader
.
prototype
.
createBinModel
(
e
.
response
,
b
,
d
,
a
.
materials
):
console
.
error
(
"
THREE.BinaryLoader: Couldn't load [
"
+
g
+
"
] [
"
+
e
.
status
+
"
]
"
);
else
if
(
e
.
readyState
==
3
){
if
(
f
){
j
==
0
&&
(
j
=
e
.
getResponseHeader
(
"
Content-Length
"
));
f
({
total
:
j
,
loaded
:
e
.
responseText
.
length
})}}
else
e
.
readyState
==
2
&&
(
j
=
e
.
getResponseHeader
(
"
Content-Length
"
))};
e
.
open
(
"
GET
"
,
g
,
true
);
e
.
responseType
=
"
arraybuffer
"
;
e
.
send
(
null
)};
THREE
.
BinaryLoader
.
prototype
.
loadAjaxBuffers
=
function
(
a
,
b
,
c
,
d
,
f
){
var
e
=
new
XMLHttpRequest
,
g
=
c
+
"
/
"
+
a
.
buffers
,
j
=
0
;
e
.
onreadystatechange
=
function
(){
if
(
e
.
readyState
==
4
)
if
(
e
.
status
==
200
||
e
.
status
==
0
){
var
c
=
e
.
response
;
if
(
c
===
void
0
)
c
=
(
new
Uint8Array
(
e
.
responseBody
)).
buffer
;
THREE
.
BinaryLoader
.
prototype
.
createBinModel
(
c
,
b
,
d
,
a
.
materials
)}
else
console
.
error
(
"
THREE.BinaryLoader: Couldn't load [
"
+
g
+
"
] [
"
+
e
.
status
+
"
]
"
);
else
if
(
e
.
readyState
==
3
){
if
(
f
){
j
==
0
&&
(
j
=
e
.
getResponseHeader
(
"
Content-Length
"
));
f
({
total
:
j
,
loaded
:
e
.
responseText
.
length
})}}
else
e
.
readyState
==
2
&&
(
j
=
e
.
getResponseHeader
(
"
Content-Length
"
))};
e
.
open
(
"
GET
"
,
g
,
true
);
e
.
responseType
=
"
arraybuffer
"
;
e
.
send
(
null
)};
THREE
.
BinaryLoader
.
prototype
.
createBinModel
=
function
(
a
,
b
,
c
,
d
){
var
f
=
function
(
b
){
var
c
,
f
,
m
,
k
,
h
,
n
,
i
,
o
,
q
,
l
,
p
,
r
,
u
,
v
,
B
;
function
x
(
a
){
return
a
%
4
?
4
-
a
%
4
:
0
}
function
A
(
a
,
b
){
return
(
new
Uint8Array
(
a
,
b
,
1
))[
0
]}
function
y
(
a
,
b
){
return
(
new
Uint32Array
(
a
,
b
,
1
))[
0
]}
function
E
(
b
,
c
){
var
d
,
e
,
g
,
f
,
h
,
j
,
k
,
m
,
l
=
new
Uint32Array
(
a
,
c
,
3
*
b
);
for
(
d
=
0
;
d
<
b
;
d
++
){
e
=
l
[
d
*
3
];
g
=
l
[
d
*
3
+
1
];
f
=
l
[
d
*
3
+
2
];
h
=
I
[
e
*
2
];
e
=
I
[
e
*
2
+
1
];
j
=
I
[
g
*
2
];
k
=
I
[
g
*
2
+
1
];
g
=
I
[
f
*
2
];
m
=
I
[
f
*
2
+
1
];
f
=
N
.
faceVertexUvs
[
0
];
var
i
=
[];
i
.
push
(
new
THREE
.
UV
(
h
,
e
));
i
.
push
(
new
THREE
.
UV
(
j
,
k
));
i
.
push
(
new
THREE
.
UV
(
g
,
m
));
f
.
push
(
i
)}}
function
s
(
b
,
c
){
var
d
,
e
,
g
,
f
,
h
,
j
,
k
,
m
,
l
,
i
,
n
=
new
Uint32Array
(
a
,
c
,
4
*
b
);
for
(
d
=
0
;
d
<
b
;
d
++
){
e
=
n
[
d
*
4
];
g
=
n
[
d
*
4
+
1
];
f
=
n
[
d
*
4
+
2
];
h
=
n
[
d
*
4
+
3
];
j
=
I
[
e
*
2
];
e
=
I
[
e
*
2
+
1
];
k
=
I
[
g
*
2
];
l
=
I
[
g
*
2
+
1
];
m
=
I
[
f
*
2
];
i
=
I
[
f
*
2
+
1
];
f
=
I
[
h
*
2
];
g
=
I
[
h
*
2
+
1
];
h
=
N
.
faceVertexUvs
[
0
];
var
o
=
[];
o
.
push
(
new
THREE
.
UV
(
j
,
e
));
o
.
push
(
new
THREE
.
UV
(
k
,
l
));
o
.
push
(
new
THREE
.
UV
(
m
,
i
));
o
.
push
(
new
THREE
.
UV
(
f
,
g
));
h
.
push
(
o
)}}
function
w
(
b
,
c
,
d
){
for
(
var
e
,
g
,
f
,
h
,
c
=
new
Uint32Array
(
a
,
c
,
3
*
b
),
j
=
new
Uint16Array
(
a
,
d
,
b
),
d
=
0
;
d
<
b
;
d
++
){
e
=
c
[
d
*
3
];
g
=
c
[
d
*
3
+
1
];
f
=
c
[
d
*
3
+
2
];
h
=
j
[
d
];
N
.
faces
.
push
(
new
THREE
.
Face3
(
e
,
g
,
f
,
null
,
null
,
h
))}}
function
C
(
b
,
c
,
d
){
for
(
var
e
,
g
,
f
,
h
,
j
,
c
=
new
Uint32Array
(
a
,
c
,
4
*
b
),
k
=
new
Uint16Array
(
a
,
d
,
b
),
d
=
0
;
d
<
b
;
d
++
){
e
=
c
[
d
*
4
];
g
=
c
[
d
*
4
+
1
];
f
=
c
[
d
*
4
+
2
];
h
=
c
[
d
*
4
+
3
];
j
=
k
[
d
];
N
.
faces
.
push
(
new
THREE
.
Face4
(
e
,
g
,
f
,
h
,
null
,
null
,
j
))}}
function
K
(
b
,
c
,
d
,
e
){
for
(
var
g
,
f
,
h
,
j
,
k
,
m
,
l
,
c
=
new
Uint32Array
(
a
,
c
,
3
*
b
),
d
=
new
Uint32Array
(
a
,
d
,
3
*
b
),
i
=
new
Uint16Array
(
a
,
e
,
b
),
e
=
0
;
e
<
b
;
e
++
){
g
=
c
[
e
*
3
];
f
=
c
[
e
*
3
+
1
];
h
=
c
[
e
*
3
+
2
];
k
=
d
[
e
*
3
];
m
=
d
[
e
*
3
+
1
];
l
=
d
[
e
*
3
+
2
];
j
=
i
[
e
];
var
n
=
G
[
m
*
3
],
o
=
G
[
m
*
3
+
1
];
m
=
G
[
m
*
3
+
2
];
var
p
=
G
[
l
*
3
],
...
...
@@ -183,17 +183,26 @@ u.parameters.map;a.enableDiffuse.value=true}if(u.parameters.lightMap){a.tAO.text
uniforms
:
a
,
lights
:
true
,
fog
:
true
})}
else
K
=
new
THREE
[
u
.
type
](
u
.
parameters
);
z
.
materials
[
n
]
=
K
}
f
(
z
.
scene
,
t
.
objects
);
m
.
callbackSync
(
z
);
j
()};
THREE
.
TextureLoader
=
function
(){
THREE
.
EventTarget
.
call
(
this
);
this
.
crossOrigin
=
null
};
THREE
.
TextureLoader
.
prototype
=
{
constructor
:
THREE
.
TextureLoader
,
load
:
function
(
a
){
var
b
=
this
,
c
=
new
Image
;
c
.
addEventListener
(
"
load
"
,
function
(){
var
a
=
new
THREE
.
Texture
(
c
);
a
.
needsUpdate
=
true
;
b
.
dispatchEvent
({
type
:
"
load
"
,
content
:
a
})},
false
);
c
.
addEventListener
(
"
error
"
,
function
(){
b
.
dispatchEvent
({
type
:
"
error
"
,
message
:
"
Couldn't load URL [
"
+
a
+
"
]
"
})},
false
);
if
(
b
.
crossOrigin
)
c
.
crossOrigin
=
b
.
crossOrigin
;
c
.
src
=
a
}};
THREE
.
Material
=
function
(){
this
.
id
=
THREE
.
MaterialCount
++
;
this
.
name
=
""
;
this
.
side
=
THREE
.
FrontSide
;
this
.
opacity
=
1
;
this
.
transparent
=
false
;
this
.
blending
=
THREE
.
NormalBlending
;
this
.
blendSrc
=
THREE
.
SrcAlphaFactor
;
this
.
blendDst
=
THREE
.
OneMinusSrcAlphaFactor
;
this
.
blendEquation
=
THREE
.
AddEquation
;
this
.
depthWrite
=
this
.
depthTest
=
true
;
this
.
polygonOffset
=
false
;
this
.
alphaTest
=
this
.
polygonOffsetUnits
=
this
.
polygonOffsetFactor
=
0
;
this
.
overdraw
=
false
;
this
.
needsUpdate
=
this
.
visible
=
true
};
THREE
.
Material
.
prototype
.
setValues
=
function
(
a
){
if
(
a
!==
void
0
)
for
(
var
b
in
a
)
if
(
!
(
b
===
"
id
"
||
b
===
"
setValues
"
||
b
===
"
clone
"
)){
var
c
=
a
[
b
];
this
[
b
]
!==
void
0
&&
(
this
[
b
]
instanceof
THREE
.
Color
?
c
instanceof
THREE
.
Color
?
this
[
b
].
copy
(
c
):
this
[
b
].
setHex
(
c
):
this
[
b
]
instanceof
THREE
.
Vector3
?
this
[
b
].
copy
(
c
):
this
[
b
]
=
c
)}};
THREE
.
Material
.
prototype
.
clone
=
function
(){
return
new
THREE
.
Material
(
this
)};
THREE
.
MaterialCount
=
0
;
THREE
.
LineBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
linewidth
=
1
;
this
.
linejoin
=
this
.
linecap
=
"
round
"
;
this
.
vertexColors
=
false
;
this
.
fog
=
true
;
this
.
setValues
(
a
)};
THREE
.
LineBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
LineBasicMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
LineBasicMaterial
(
this
)};
THREE
.
Material
.
prototype
.
setValues
=
function
(
a
){
if
(
a
!==
void
0
)
for
(
var
b
in
a
)
this
[
b
]
!==
void
0
&&
(
this
[
b
]
=
a
[
b
])};
THREE
.
Material
.
prototype
.
clone
=
function
(
a
){
a
===
void
0
&&
(
a
=
new
THREE
.
material
);
a
.
name
=
this
.
name
;
a
.
side
=
this
.
side
;
a
.
opacity
=
this
.
opacity
;
a
.
transparent
=
this
.
transparent
;
a
.
blending
=
this
.
blending
;
a
.
blendSrc
=
this
.
blendSrc
;
a
.
blendDst
=
this
.
blendDst
;
a
.
blendEquation
=
this
.
blendEquation
;
a
.
depthTest
=
this
.
depthTest
;
a
.
depthWrite
=
this
.
depthWrite
;
a
.
polygonOffset
=
this
.
polygonOffset
;
a
.
polygonOffsetFactor
=
this
.
polygonOffsetFactor
;
a
.
polygonOffsetUnits
=
this
.
polygonOffsetUnits
;
a
.
alphaTest
=
this
.
alphaTest
;
a
.
overdraw
=
this
.
overdraw
;
a
.
visible
=
this
.
visible
;
return
a
};
THREE
.
MaterialCount
=
0
;
THREE
.
LineBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
linewidth
=
1
;
this
.
linejoin
=
this
.
linecap
=
"
round
"
;
this
.
vertexColors
=
false
;
this
.
fog
=
true
;
this
.
setValues
(
a
)};
THREE
.
LineBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
LineBasicMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
LineBasicMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
color
.
copy
(
this
.
color
);
a
.
linewidth
=
this
.
linewidth
;
a
.
linecap
=
this
.
linecap
;
a
.
linejoin
=
this
.
linejoin
;
a
.
vertexColors
=
this
.
vertexColors
;
a
.
fog
=
this
.
fog
;
return
a
};
THREE
.
MeshBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
envMap
=
this
.
lightMap
=
this
.
map
=
null
;
this
.
combine
=
THREE
.
MultiplyOperation
;
this
.
reflectivity
=
1
;
this
.
refractionRatio
=
0.98
;
this
.
fog
=
true
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinejoin
=
this
.
wireframeLinecap
=
"
round
"
;
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
MeshBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshBasicMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshBasicMaterial
(
this
)};
THREE
.
MeshBasicMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
MeshBasicMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
color
.
copy
(
this
.
color
);
a
.
map
=
this
.
map
;
a
.
lightMap
=
this
.
lightMap
;
a
.
envMap
=
this
.
envMap
;
a
.
combine
=
this
.
combine
;
a
.
reflectivity
=
this
.
reflectivity
;
a
.
refractionRatio
=
this
.
refractionRatio
;
a
.
fog
=
this
.
fog
;
a
.
shading
=
this
.
shading
;
a
.
wireframe
=
this
.
wireframe
;
a
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
a
.
wireframeLinecap
=
this
.
wireframeLinecap
;
a
.
wireframeLinejoin
=
this
.
wireframeLinejoin
;
a
.
vertexColors
=
this
.
vertexColors
;
a
.
skinning
=
this
.
skinning
;
a
.
morphTargets
=
this
.
morphTargets
;
return
a
};
THREE
.
MeshLambertMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
ambient
=
new
THREE
.
Color
(
16777215
);
this
.
emissive
=
new
THREE
.
Color
(
0
);
this
.
wrapAround
=
false
;
this
.
wrapRGB
=
new
THREE
.
Vector3
(
1
,
1
,
1
);
this
.
envMap
=
this
.
lightMap
=
this
.
map
=
null
;
this
.
combine
=
THREE
.
MultiplyOperation
;
this
.
reflectivity
=
1
;
this
.
refractionRatio
=
0.98
;
this
.
fog
=
true
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinejoin
=
this
.
wireframeLinecap
=
"
round
"
;
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphNormals
=
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
MeshLambertMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshLambertMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshLambertMaterial
(
this
)};
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphNormals
=
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
MeshLambertMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshLambertMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
MeshLambertMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
color
.
copy
(
this
.
color
);
a
.
ambient
.
copy
(
this
.
ambient
);
a
.
emissive
.
copy
(
this
.
emissive
);
a
.
wrapAround
=
this
.
wrapAround
;
a
.
wrapRGB
.
copy
(
this
.
wrapRGB
);
a
.
map
=
this
.
map
;
a
.
lightMap
=
this
.
lightMap
;
a
.
envMap
=
this
.
envMap
;
a
.
combine
=
this
.
combine
;
a
.
reflectivity
=
this
.
reflectivity
;
a
.
refractionRatio
=
this
.
refractionRatio
;
a
.
fog
=
this
.
fog
;
a
.
shading
=
this
.
shading
;
a
.
wireframe
=
this
.
wireframe
;
a
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
a
.
wireframeLinecap
=
this
.
wireframeLinecap
;
a
.
wireframeLinejoin
=
this
.
wireframeLinejoin
;
a
.
vertexColors
=
this
.
vertexColors
;
a
.
skinning
=
this
.
skinning
;
a
.
morphTargets
=
this
.
morphTargets
;
a
.
morphNormals
=
this
.
morphNormals
;
return
a
};
THREE
.
MeshPhongMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
ambient
=
new
THREE
.
Color
(
16777215
);
this
.
emissive
=
new
THREE
.
Color
(
0
);
this
.
specular
=
new
THREE
.
Color
(
1118481
);
this
.
shininess
=
30
;
this
.
wrapAround
=
this
.
perPixel
=
this
.
metal
=
false
;
this
.
wrapRGB
=
new
THREE
.
Vector3
(
1
,
1
,
1
);
this
.
envMap
=
this
.
lightMap
=
this
.
map
=
null
;
this
.
combine
=
THREE
.
MultiplyOperation
;
this
.
reflectivity
=
1
;
this
.
refractionRatio
=
0.98
;
this
.
fog
=
true
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinejoin
=
this
.
wireframeLinecap
=
"
round
"
;
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphNormals
=
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
MeshPhongMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshPhongMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshPhongMaterial
(
this
)};
THREE
.
MeshDepthMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
setValues
(
a
)};
THREE
.
MeshDepthMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshDepthMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshDepthMaterial
(
this
)};
THREE
.
MeshNormalMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
,
a
);
this
.
shading
=
THREE
.
FlatShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
setValues
(
a
)};
THREE
.
MeshNormalMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshNormalMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshNormalMaterial
(
this
)};
THREE
.
MeshFaceMaterial
=
function
(){};
THREE
.
MeshFaceMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshFaceMaterial
};
THREE
.
ParticleBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
map
=
null
;
this
.
size
=
1
;
this
.
sizeAttenuation
=
true
;
this
.
vertexColors
=
false
;
this
.
fog
=
true
;
this
.
setValues
(
a
)};
THREE
.
ParticleBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
ParticleBasicMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
ParticleBasicMaterial
(
this
)};
THREE
.
ParticleCanvasMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
program
=
function
(){};
this
.
setValues
(
a
)};
THREE
.
ParticleCanvasMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
ParticleCanvasMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
ParticleCanvasMaterial
(
this
)};
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinejoin
=
this
.
wireframeLinecap
=
"
round
"
;
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphNormals
=
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
MeshPhongMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshPhongMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
MeshPhongMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
color
.
copy
(
this
.
color
);
a
.
ambient
.
copy
(
this
.
ambient
);
a
.
emissive
.
copy
(
this
.
emissive
);
a
.
specular
.
copy
(
this
.
specular
);
a
.
shininess
=
this
.
shininess
;
a
.
metal
=
this
.
metal
;
a
.
perPixel
=
this
.
perPixel
;
a
.
wrapAround
=
this
.
wrapAround
;
a
.
wrapRGB
.
copy
(
this
.
wrapRGB
);
a
.
map
=
this
.
map
;
a
.
lightMap
=
this
.
lightMap
;
a
.
envMap
=
this
.
envMap
;
a
.
combine
=
this
.
combine
;
a
.
reflectivity
=
this
.
reflectivity
;
a
.
refractionRatio
=
this
.
refractionRatio
;
a
.
fog
=
this
.
fog
;
a
.
shading
=
this
.
shading
;
a
.
wireframe
=
this
.
wireframe
;
a
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
a
.
wireframeLinecap
=
this
.
wireframeLinecap
;
a
.
wireframeLinejoin
=
this
.
wireframeLinejoin
;
a
.
vertexColors
=
this
.
vertexColors
;
a
.
skinning
=
this
.
skinning
;
a
.
morphTargets
=
this
.
morphTargets
;
a
.
morphNormals
=
this
.
morphNormals
;
return
a
};
THREE
.
MeshDepthMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
setValues
(
a
)};
THREE
.
MeshDepthMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshDepthMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
LineBasicMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
wireframe
=
this
.
wireframe
;
a
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
return
a
};
THREE
.
MeshNormalMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
,
a
);
this
.
shading
=
THREE
.
FlatShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
setValues
(
a
)};
THREE
.
MeshNormalMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshNormalMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
MeshNormalMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
shading
=
this
.
shading
;
a
.
wireframe
=
this
.
wireframe
;
a
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
return
a
};
THREE
.
MeshFaceMaterial
=
function
(){};
THREE
.
MeshFaceMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshFaceMaterial
};
THREE
.
ParticleBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
map
=
null
;
this
.
size
=
1
;
this
.
sizeAttenuation
=
true
;
this
.
vertexColors
=
false
;
this
.
fog
=
true
;
this
.
setValues
(
a
)};
THREE
.
ParticleBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
ParticleBasicMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
ParticleBasicMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
color
.
copy
(
this
.
color
);
a
.
map
=
this
.
map
;
a
.
size
=
this
.
size
;
a
.
sizeAttenuation
=
this
.
sizeAttenuation
;
a
.
vertexColors
=
this
.
vertexColors
;
a
.
fog
=
this
.
fog
;
return
a
};
THREE
.
ParticleCanvasMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
program
=
function
(){};
this
.
setValues
(
a
)};
THREE
.
ParticleCanvasMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
ParticleCanvasMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
ParticleCanvasMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
color
.
copy
(
this
.
color
);
a
.
program
=
this
.
program
;
return
a
};
THREE
.
Texture
=
function
(
a
,
b
,
c
,
d
,
f
,
e
,
g
,
j
,
m
){
this
.
id
=
THREE
.
TextureCount
++
;
this
.
image
=
a
;
this
.
mapping
=
b
!==
void
0
?
b
:
new
THREE
.
UVMapping
;
this
.
wrapS
=
c
!==
void
0
?
c
:
THREE
.
ClampToEdgeWrapping
;
this
.
wrapT
=
d
!==
void
0
?
d
:
THREE
.
ClampToEdgeWrapping
;
this
.
magFilter
=
f
!==
void
0
?
f
:
THREE
.
LinearFilter
;
this
.
minFilter
=
e
!==
void
0
?
e
:
THREE
.
LinearMipMapLinearFilter
;
this
.
anisotropy
=
m
!==
void
0
?
m
:
1
;
this
.
format
=
g
!==
void
0
?
g
:
THREE
.
RGBAFormat
;
this
.
type
=
j
!==
void
0
?
j
:
THREE
.
UnsignedByteType
;
this
.
offset
=
new
THREE
.
Vector2
(
0
,
0
);
this
.
repeat
=
new
THREE
.
Vector2
(
1
,
1
);
this
.
generateMipmaps
=
true
;
this
.
premultiplyAlpha
=
false
;
this
.
flipY
=
true
;
this
.
needsUpdate
=
false
;
this
.
onUpdate
=
null
};
THREE
.
Texture
.
prototype
=
{
constructor
:
THREE
.
Texture
,
clone
:
function
(){
var
a
=
new
THREE
.
Texture
(
this
.
image
,
this
.
mapping
,
this
.
wrapS
,
this
.
wrapT
,
this
.
magFilter
,
this
.
minFilter
,
this
.
format
,
this
.
type
,
this
.
anisotropy
);
a
.
offset
.
copy
(
this
.
offset
);
a
.
repeat
.
copy
(
this
.
repeat
);
a
.
generateMipmaps
=
this
.
generateMipmaps
;
a
.
premultiplyAlpha
=
this
.
premultiplyAlpha
;
a
.
flipY
=
this
.
flipY
;
return
a
}};
THREE
.
TextureCount
=
0
;
THREE
.
DataTexture
=
function
(
a
,
b
,
c
,
d
,
f
,
e
,
g
,
j
,
m
,
k
){
THREE
.
Texture
.
call
(
this
,
null
,
e
,
g
,
j
,
m
,
k
,
d
,
f
);
this
.
image
=
{
data
:
a
,
width
:
b
,
height
:
c
}};
THREE
.
DataTexture
.
prototype
=
Object
.
create
(
THREE
.
Texture
.
prototype
);
THREE
.
DataTexture
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
DataTexture
(
this
.
image
.
data
,
this
.
image
.
width
,
this
.
image
.
height
,
this
.
format
,
this
.
type
,
this
.
mapping
,
this
.
wrapS
,
this
.
wrapT
,
this
.
magFilter
,
this
.
minFilter
);
a
.
offset
.
copy
(
this
.
offset
);
a
.
repeat
.
copy
(
this
.
repeat
);
return
a
};
...
...
build/custom/ThreeWebGL.js
浏览文件 @
2c86fbbc
...
...
@@ -138,8 +138,8 @@ a.mapLight&&b&&f(k,"lightMap",a.mapLight,a.mapLightRepeat,a.mapLightOffset,a.map
k
.
map
;
i
.
enableDiffuse
.
value
=
true
}
if
(
k
.
specularMap
){
i
.
tSpecular
.
texture
=
k
.
specularMap
;
i
.
enableSpecular
.
value
=
true
}
if
(
k
.
lightMap
){
i
.
tAO
.
texture
=
k
.
lightMap
;
i
.
enableAO
.
value
=
true
}
i
.
uDiffuseColor
.
value
.
setHex
(
k
.
color
);
i
.
uSpecularColor
.
value
.
setHex
(
k
.
specular
);
i
.
uAmbientColor
.
value
.
setHex
(
k
.
ambient
);
i
.
uShininess
.
value
=
k
.
shininess
;
if
(
k
.
opacity
!==
void
0
)
i
.
uOpacity
.
value
=
k
.
opacity
;
k
=
new
THREE
.
ShaderMaterial
({
fragmentShader
:
l
.
fragmentShader
,
vertexShader
:
l
.
vertexShader
,
uniforms
:
i
,
lights
:
true
,
fog
:
true
})}
else
k
=
new
THREE
[
l
](
k
);
if
(
a
.
DbgName
!==
void
0
)
k
.
name
=
a
.
DbgName
;
return
k
}};
THREE
.
BinaryLoader
=
function
(
a
){
THREE
.
Loader
.
call
(
this
,
a
)};
THREE
.
BinaryLoader
.
prototype
=
Object
.
create
(
THREE
.
Loader
.
prototype
);
THREE
.
BinaryLoader
.
prototype
.
load
=
function
(
a
,
b
,
c
,
d
){
var
c
=
c
?
c
:
this
.
extractUrlBase
(
a
),
d
=
d
?
d
:
this
.
extractUrlBase
(
a
),
e
=
this
.
showProgress
?
THREE
.
Loader
.
prototype
.
updateProgress
:
null
;
this
.
onLoadStart
();
this
.
loadAjaxJSON
(
this
,
a
,
b
,
c
,
d
,
e
)};
THREE
.
BinaryLoader
.
prototype
.
loadAjaxJSON
=
function
(
a
,
b
,
c
,
d
,
e
,
f
){
var
h
=
new
XMLHttpRequest
;
h
.
onreadystatechange
=
function
(){
if
(
h
.
readyState
==
4
)
if
(
h
.
status
==
200
||
h
.
status
==
0
){
var
j
=
JSON
.
parse
(
h
.
responseText
);
a
.
loadAjaxBuffers
(
j
,
c
,
e
,
d
,
f
)}
else
console
.
error
(
"
THREE.BinaryLoader: Couldn't load [
"
+
b
+
"
] [
"
+
h
.
status
+
"
]
"
)};
h
.
open
(
"
GET
"
,
b
,
true
);
h
.
overrideMimeType
&&
h
.
overrideMimeType
(
"
text/plain; charset=x-user-defined
"
);
h
.
setRequestHeader
(
"
Content-Type
"
,
"
text/plain
"
);
h
.
send
(
null
)};
THREE
.
BinaryLoader
.
prototype
.
loadAjaxBuffers
=
function
(
a
,
b
,
c
,
d
,
e
){
var
f
=
new
XMLHttpRequest
,
h
=
c
+
"
/
"
+
a
.
buffers
,
j
=
0
;
f
.
onreadystatechange
=
function
(){
if
(
f
.
readyState
==
4
)
f
.
status
==
200
||
f
.
status
==
0
?
THREE
.
BinaryLoader
.
prototype
.
createBinModel
(
f
.
response
,
b
,
d
,
a
.
materials
):
console
.
error
(
"
THREE.BinaryLoader: Couldn't load [
"
+
h
+
"
] [
"
+
f
.
status
+
"
]
"
);
else
if
(
f
.
readyState
==
3
){
if
(
e
){
j
==
0
&&
(
j
=
f
.
getResponseHeader
(
"
Content-Length
"
));
e
({
total
:
j
,
loaded
:
f
.
responseText
.
length
})}}
else
f
.
readyState
==
2
&&
(
j
=
f
.
getResponseHeader
(
"
Content-Length
"
))};
f
.
open
(
"
GET
"
,
h
,
true
);
f
.
responseType
=
"
arraybuffer
"
;
f
.
send
(
null
)};
THREE
.
BinaryLoader
.
prototype
.
loadAjaxBuffers
=
function
(
a
,
b
,
c
,
d
,
e
){
var
f
=
new
XMLHttpRequest
,
h
=
c
+
"
/
"
+
a
.
buffers
,
j
=
0
;
f
.
onreadystatechange
=
function
(){
if
(
f
.
readyState
==
4
)
if
(
f
.
status
==
200
||
f
.
status
==
0
){
var
c
=
f
.
response
;
if
(
c
===
void
0
)
c
=
(
new
Uint8Array
(
f
.
responseBody
)).
buffer
;
THREE
.
BinaryLoader
.
prototype
.
createBinModel
(
c
,
b
,
d
,
a
.
materials
)}
else
console
.
error
(
"
THREE.BinaryLoader: Couldn't load [
"
+
h
+
"
] [
"
+
f
.
status
+
"
]
"
);
else
if
(
f
.
readyState
==
3
){
if
(
e
){
j
==
0
&&
(
j
=
f
.
getResponseHeader
(
"
Content-Length
"
));
e
({
total
:
j
,
loaded
:
f
.
responseText
.
length
})}}
else
f
.
readyState
==
2
&&
(
j
=
f
.
getResponseHeader
(
"
Content-Length
"
))};
f
.
open
(
"
GET
"
,
h
,
true
);
f
.
responseType
=
"
arraybuffer
"
;
f
.
send
(
null
)};
THREE
.
BinaryLoader
.
prototype
.
createBinModel
=
function
(
a
,
b
,
c
,
d
){
var
e
=
function
(
b
){
var
c
,
e
,
l
,
k
,
i
,
m
,
n
,
o
,
u
,
q
,
r
,
p
,
x
,
w
,
H
;
function
v
(
a
){
return
a
%
4
?
4
-
a
%
4
:
0
}
function
E
(
a
,
b
){
return
(
new
Uint8Array
(
a
,
b
,
1
))[
0
]}
function
A
(
a
,
b
){
return
(
new
Uint32Array
(
a
,
b
,
1
))[
0
]}
function
G
(
b
,
c
){
var
d
,
f
,
e
,
h
,
j
,
i
,
k
,
m
,
l
=
new
Uint32Array
(
a
,
c
,
3
*
b
);
for
(
d
=
0
;
d
<
b
;
d
++
){
f
=
l
[
d
*
3
];
e
=
l
[
d
*
3
+
1
];
h
=
l
[
d
*
3
+
2
];
j
=
Q
[
f
*
2
];
f
=
Q
[
f
*
2
+
1
];
i
=
Q
[
e
*
2
];
k
=
Q
[
e
*
2
+
1
];
e
=
Q
[
h
*
2
];
m
=
Q
[
h
*
2
+
1
];
h
=
S
.
faceVertexUvs
[
0
];
var
n
=
[];
n
.
push
(
new
THREE
.
UV
(
j
,
f
));
n
.
push
(
new
THREE
.
UV
(
i
,
k
));
n
.
push
(
new
THREE
.
UV
(
e
,
m
));
h
.
push
(
n
)}}
function
C
(
b
,
c
){
var
d
,
f
,
e
,
h
,
j
,
i
,
k
,
m
,
l
,
n
,
q
=
new
Uint32Array
(
a
,
c
,
4
*
b
);
for
(
d
=
0
;
d
<
b
;
d
++
){
f
=
q
[
d
*
4
];
e
=
q
[
d
*
4
+
1
];
h
=
q
[
d
*
4
+
2
];
j
=
q
[
d
*
4
+
3
];
i
=
Q
[
f
*
2
];
f
=
Q
[
f
*
2
+
1
];
k
=
Q
[
e
*
2
];
l
=
Q
[
e
*
2
+
1
];
m
=
Q
[
h
*
2
];
n
=
Q
[
h
*
2
+
1
];
h
=
Q
[
j
*
2
];
e
=
Q
[
j
*
2
+
1
];
j
=
S
.
faceVertexUvs
[
0
];
var
o
=
[];
o
.
push
(
new
THREE
.
UV
(
i
,
f
));
o
.
push
(
new
THREE
.
UV
(
k
,
l
));
o
.
push
(
new
THREE
.
UV
(
m
,
n
));
o
.
push
(
new
THREE
.
UV
(
h
,
e
));
j
.
push
(
o
)}}
function
P
(
b
,
c
,
d
){
for
(
var
f
,
e
,
h
,
j
,
c
=
new
Uint32Array
(
a
,
c
,
3
*
b
),
i
=
new
Uint16Array
(
a
,
d
,
b
),
d
=
0
;
d
<
b
;
d
++
){
f
=
c
[
d
*
3
];
e
=
c
[
d
*
3
+
1
];
h
=
c
[
d
*
3
+
2
];
j
=
i
[
d
];
S
.
faces
.
push
(
new
THREE
.
Face3
(
f
,
e
,
h
,
null
,
null
,
j
))}}
function
I
(
b
,
c
,
d
){
for
(
var
f
,
e
,
h
,
j
,
i
,
c
=
new
Uint32Array
(
a
,
c
,
4
*
b
),
k
=
new
Uint16Array
(
a
,
d
,
b
),
d
=
0
;
d
<
b
;
d
++
){
f
=
c
[
d
*
4
];
e
=
c
[
d
*
4
+
1
];
h
=
c
[
d
*
4
+
2
];
j
=
c
[
d
*
4
+
3
];
i
=
k
[
d
];
S
.
faces
.
push
(
new
THREE
.
Face4
(
f
,
e
,
h
,
j
,
null
,
null
,
i
))}}
function
U
(
b
,
c
,
d
,
f
){
for
(
var
e
,
h
,
j
,
i
,
k
,
m
,
l
,
c
=
new
Uint32Array
(
a
,
c
,
3
*
b
),
d
=
new
Uint32Array
(
a
,
d
,
3
*
b
),
n
=
new
Uint16Array
(
a
,
f
,
b
),
f
=
0
;
f
<
b
;
f
++
){
e
=
c
[
f
*
3
];
h
=
c
[
f
*
3
+
1
];
j
=
c
[
f
*
3
+
2
];
k
=
d
[
f
*
3
];
m
=
d
[
f
*
3
+
1
];
l
=
d
[
f
*
3
+
2
];
i
=
n
[
f
];
var
o
=
O
[
m
*
3
],
q
=
O
[
m
*
3
+
1
];
m
=
O
[
m
*
3
+
2
];
var
r
=
O
[
l
*
3
],
...
...
@@ -189,19 +189,30 @@ if(x.parameters.map){a.tDiffuse.texture=x.parameters.map;a.enableDiffuse.value=t
vertexShader
:
r
.
vertexShader
,
uniforms
:
a
,
lights
:
true
,
fog
:
true
})}
else
U
=
new
THREE
[
x
.
type
](
x
.
parameters
);
N
.
materials
[
m
]
=
U
}
e
(
N
.
scene
,
z
.
objects
);
l
.
callbackSync
(
N
);
j
()};
THREE
.
TextureLoader
=
function
(){
THREE
.
EventTarget
.
call
(
this
);
this
.
crossOrigin
=
null
};
THREE
.
TextureLoader
.
prototype
=
{
constructor
:
THREE
.
TextureLoader
,
load
:
function
(
a
){
var
b
=
this
,
c
=
new
Image
;
c
.
addEventListener
(
"
load
"
,
function
(){
var
a
=
new
THREE
.
Texture
(
c
);
a
.
needsUpdate
=
true
;
b
.
dispatchEvent
({
type
:
"
load
"
,
content
:
a
})},
false
);
c
.
addEventListener
(
"
error
"
,
function
(){
b
.
dispatchEvent
({
type
:
"
error
"
,
message
:
"
Couldn't load URL [
"
+
a
+
"
]
"
})},
false
);
if
(
b
.
crossOrigin
)
c
.
crossOrigin
=
b
.
crossOrigin
;
c
.
src
=
a
}};
THREE
.
Material
=
function
(){
this
.
id
=
THREE
.
MaterialCount
++
;
this
.
name
=
""
;
this
.
side
=
THREE
.
FrontSide
;
this
.
opacity
=
1
;
this
.
transparent
=
false
;
this
.
blending
=
THREE
.
NormalBlending
;
this
.
blendSrc
=
THREE
.
SrcAlphaFactor
;
this
.
blendDst
=
THREE
.
OneMinusSrcAlphaFactor
;
this
.
blendEquation
=
THREE
.
AddEquation
;
this
.
depthWrite
=
this
.
depthTest
=
true
;
this
.
polygonOffset
=
false
;
this
.
alphaTest
=
this
.
polygonOffsetUnits
=
this
.
polygonOffsetFactor
=
0
;
this
.
overdraw
=
false
;
this
.
needsUpdate
=
this
.
visible
=
true
};
THREE
.
Material
.
prototype
.
setValues
=
function
(
a
){
if
(
a
!==
void
0
)
for
(
var
b
in
a
)
if
(
!
(
b
===
"
id
"
||
b
===
"
setValues
"
||
b
===
"
clone
"
)){
var
c
=
a
[
b
];
this
[
b
]
!==
void
0
&&
(
this
[
b
]
instanceof
THREE
.
Color
?
c
instanceof
THREE
.
Color
?
this
[
b
].
copy
(
c
):
this
[
b
].
setHex
(
c
):
this
[
b
]
instanceof
THREE
.
Vector3
?
this
[
b
].
copy
(
c
):
this
[
b
]
=
c
)}};
THREE
.
Material
.
prototype
.
clone
=
function
(){
return
new
THREE
.
Material
(
this
)};
THREE
.
MaterialCount
=
0
;
THREE
.
LineBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
linewidth
=
1
;
this
.
linejoin
=
this
.
linecap
=
"
round
"
;
this
.
vertexColors
=
false
;
this
.
fog
=
true
;
this
.
setValues
(
a
)};
THREE
.
LineBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
LineBasicMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
LineBasicMaterial
(
this
)};
THREE
.
Material
.
prototype
.
setValues
=
function
(
a
){
if
(
a
!==
void
0
)
for
(
var
b
in
a
)
this
[
b
]
!==
void
0
&&
(
this
[
b
]
=
a
[
b
])};
THREE
.
Material
.
prototype
.
clone
=
function
(
a
){
a
===
void
0
&&
(
a
=
new
THREE
.
material
);
a
.
name
=
this
.
name
;
a
.
side
=
this
.
side
;
a
.
opacity
=
this
.
opacity
;
a
.
transparent
=
this
.
transparent
;
a
.
blending
=
this
.
blending
;
a
.
blendSrc
=
this
.
blendSrc
;
a
.
blendDst
=
this
.
blendDst
;
a
.
blendEquation
=
this
.
blendEquation
;
a
.
depthTest
=
this
.
depthTest
;
a
.
depthWrite
=
this
.
depthWrite
;
a
.
polygonOffset
=
this
.
polygonOffset
;
a
.
polygonOffsetFactor
=
this
.
polygonOffsetFactor
;
a
.
polygonOffsetUnits
=
this
.
polygonOffsetUnits
;
a
.
alphaTest
=
this
.
alphaTest
;
a
.
overdraw
=
this
.
overdraw
;
a
.
visible
=
this
.
visible
;
return
a
};
THREE
.
MaterialCount
=
0
;
THREE
.
LineBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
linewidth
=
1
;
this
.
linejoin
=
this
.
linecap
=
"
round
"
;
this
.
vertexColors
=
false
;
this
.
fog
=
true
;
this
.
setValues
(
a
)};
THREE
.
LineBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
LineBasicMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
LineBasicMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
color
.
copy
(
this
.
color
);
a
.
linewidth
=
this
.
linewidth
;
a
.
linecap
=
this
.
linecap
;
a
.
linejoin
=
this
.
linejoin
;
a
.
vertexColors
=
this
.
vertexColors
;
a
.
fog
=
this
.
fog
;
return
a
};
THREE
.
MeshBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
envMap
=
this
.
lightMap
=
this
.
map
=
null
;
this
.
combine
=
THREE
.
MultiplyOperation
;
this
.
reflectivity
=
1
;
this
.
refractionRatio
=
0.98
;
this
.
fog
=
true
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinejoin
=
this
.
wireframeLinecap
=
"
round
"
;
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
MeshBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshBasicMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshBasicMaterial
(
this
)};
THREE
.
MeshBasicMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
MeshBasicMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
color
.
copy
(
this
.
color
);
a
.
map
=
this
.
map
;
a
.
lightMap
=
this
.
lightMap
;
a
.
envMap
=
this
.
envMap
;
a
.
combine
=
this
.
combine
;
a
.
reflectivity
=
this
.
reflectivity
;
a
.
refractionRatio
=
this
.
refractionRatio
;
a
.
fog
=
this
.
fog
;
a
.
shading
=
this
.
shading
;
a
.
wireframe
=
this
.
wireframe
;
a
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
a
.
wireframeLinecap
=
this
.
wireframeLinecap
;
a
.
wireframeLinejoin
=
this
.
wireframeLinejoin
;
a
.
vertexColors
=
this
.
vertexColors
;
a
.
skinning
=
this
.
skinning
;
a
.
morphTargets
=
this
.
morphTargets
;
return
a
};
THREE
.
MeshLambertMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
ambient
=
new
THREE
.
Color
(
16777215
);
this
.
emissive
=
new
THREE
.
Color
(
0
);
this
.
wrapAround
=
false
;
this
.
wrapRGB
=
new
THREE
.
Vector3
(
1
,
1
,
1
);
this
.
envMap
=
this
.
lightMap
=
this
.
map
=
null
;
this
.
combine
=
THREE
.
MultiplyOperation
;
this
.
reflectivity
=
1
;
this
.
refractionRatio
=
0.98
;
this
.
fog
=
true
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinejoin
=
this
.
wireframeLinecap
=
"
round
"
;
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphNormals
=
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
MeshLambertMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshLambertMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshLambertMaterial
(
this
)};
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphNormals
=
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
MeshLambertMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshLambertMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
MeshLambertMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
color
.
copy
(
this
.
color
);
a
.
ambient
.
copy
(
this
.
ambient
);
a
.
emissive
.
copy
(
this
.
emissive
);
a
.
wrapAround
=
this
.
wrapAround
;
a
.
wrapRGB
.
copy
(
this
.
wrapRGB
);
a
.
map
=
this
.
map
;
a
.
lightMap
=
this
.
lightMap
;
a
.
envMap
=
this
.
envMap
;
a
.
combine
=
this
.
combine
;
a
.
reflectivity
=
this
.
reflectivity
;
a
.
refractionRatio
=
this
.
refractionRatio
;
a
.
fog
=
this
.
fog
;
a
.
shading
=
this
.
shading
;
a
.
wireframe
=
this
.
wireframe
;
a
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
a
.
wireframeLinecap
=
this
.
wireframeLinecap
;
a
.
wireframeLinejoin
=
this
.
wireframeLinejoin
;
a
.
vertexColors
=
this
.
vertexColors
;
a
.
skinning
=
this
.
skinning
;
a
.
morphTargets
=
this
.
morphTargets
;
a
.
morphNormals
=
this
.
morphNormals
;
return
a
};
THREE
.
MeshPhongMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
ambient
=
new
THREE
.
Color
(
16777215
);
this
.
emissive
=
new
THREE
.
Color
(
0
);
this
.
specular
=
new
THREE
.
Color
(
1118481
);
this
.
shininess
=
30
;
this
.
wrapAround
=
this
.
perPixel
=
this
.
metal
=
false
;
this
.
wrapRGB
=
new
THREE
.
Vector3
(
1
,
1
,
1
);
this
.
envMap
=
this
.
lightMap
=
this
.
map
=
null
;
this
.
combine
=
THREE
.
MultiplyOperation
;
this
.
reflectivity
=
1
;
this
.
refractionRatio
=
0.98
;
this
.
fog
=
true
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinejoin
=
this
.
wireframeLinecap
=
"
round
"
;
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphNormals
=
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
MeshPhongMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshPhongMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshPhongMaterial
(
this
)};
THREE
.
MeshDepthMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
setValues
(
a
)};
THREE
.
MeshDepthMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshDepthMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshDepthMaterial
(
this
)};
THREE
.
MeshNormalMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
,
a
);
this
.
shading
=
THREE
.
FlatShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
setValues
(
a
)};
THREE
.
MeshNormalMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshNormalMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshNormalMaterial
(
this
)};
THREE
.
MeshFaceMaterial
=
function
(){};
THREE
.
MeshFaceMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshFaceMaterial
};
THREE
.
ParticleBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
map
=
null
;
this
.
size
=
1
;
this
.
sizeAttenuation
=
true
;
this
.
vertexColors
=
false
;
this
.
fog
=
true
;
this
.
setValues
(
a
)};
THREE
.
ParticleBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
ParticleBasicMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
ParticleBasicMaterial
(
this
)};
THREE
.
ShaderMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
vertexShader
=
this
.
fragmentShader
=
"
void main() {}
"
;
this
.
uniforms
=
{};
this
.
attributes
=
null
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
lights
=
this
.
fog
=
false
;
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphNormals
=
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
ShaderMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
ShaderMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
ShaderMaterial
(
this
)};
THREE
.
Texture
=
function
(
a
,
b
,
c
,
d
,
e
,
f
,
h
,
j
,
l
){
this
.
id
=
THREE
.
TextureCount
++
;
this
.
image
=
a
;
this
.
mapping
=
b
!==
void
0
?
b
:
new
THREE
.
UVMapping
;
this
.
wrapS
=
c
!==
void
0
?
c
:
THREE
.
ClampToEdgeWrapping
;
this
.
wrapT
=
d
!==
void
0
?
d
:
THREE
.
ClampToEdgeWrapping
;
this
.
magFilter
=
e
!==
void
0
?
e
:
THREE
.
LinearFilter
;
this
.
minFilter
=
f
!==
void
0
?
f
:
THREE
.
LinearMipMapLinearFilter
;
this
.
anisotropy
=
l
!==
void
0
?
l
:
1
;
this
.
format
=
h
!==
void
0
?
h
:
THREE
.
RGBAFormat
;
this
.
type
=
j
!==
void
0
?
j
:
THREE
.
UnsignedByteType
;
this
.
offset
=
new
THREE
.
Vector2
(
0
,
0
);
this
.
repeat
=
new
THREE
.
Vector2
(
1
,
1
);
this
.
generateMipmaps
=
true
;
this
.
premultiplyAlpha
=
false
;
this
.
flipY
=
true
;
this
.
needsUpdate
=
false
;
this
.
onUpdate
=
null
};
THREE
.
Texture
.
prototype
=
{
constructor
:
THREE
.
Texture
,
clone
:
function
(){
var
a
=
new
THREE
.
Texture
(
this
.
image
,
this
.
mapping
,
this
.
wrapS
,
this
.
wrapT
,
this
.
magFilter
,
this
.
minFilter
,
this
.
format
,
this
.
type
,
this
.
anisotropy
);
a
.
offset
.
copy
(
this
.
offset
);
a
.
repeat
.
copy
(
this
.
repeat
);
a
.
generateMipmaps
=
this
.
generateMipmaps
;
a
.
premultiplyAlpha
=
this
.
premultiplyAlpha
;
a
.
flipY
=
this
.
flipY
;
return
a
}};
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinejoin
=
this
.
wireframeLinecap
=
"
round
"
;
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphNormals
=
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
MeshPhongMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshPhongMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
MeshPhongMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
color
.
copy
(
this
.
color
);
a
.
ambient
.
copy
(
this
.
ambient
);
a
.
emissive
.
copy
(
this
.
emissive
);
a
.
specular
.
copy
(
this
.
specular
);
a
.
shininess
=
this
.
shininess
;
a
.
metal
=
this
.
metal
;
a
.
perPixel
=
this
.
perPixel
;
a
.
wrapAround
=
this
.
wrapAround
;
a
.
wrapRGB
.
copy
(
this
.
wrapRGB
);
a
.
map
=
this
.
map
;
a
.
lightMap
=
this
.
lightMap
;
a
.
envMap
=
this
.
envMap
;
a
.
combine
=
this
.
combine
;
a
.
reflectivity
=
this
.
reflectivity
;
a
.
refractionRatio
=
this
.
refractionRatio
;
a
.
fog
=
this
.
fog
;
a
.
shading
=
this
.
shading
;
a
.
wireframe
=
this
.
wireframe
;
a
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
a
.
wireframeLinecap
=
this
.
wireframeLinecap
;
a
.
wireframeLinejoin
=
this
.
wireframeLinejoin
;
a
.
vertexColors
=
this
.
vertexColors
;
a
.
skinning
=
this
.
skinning
;
a
.
morphTargets
=
this
.
morphTargets
;
a
.
morphNormals
=
this
.
morphNormals
;
return
a
};
THREE
.
MeshDepthMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
setValues
(
a
)};
THREE
.
MeshDepthMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshDepthMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
LineBasicMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
wireframe
=
this
.
wireframe
;
a
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
return
a
};
THREE
.
MeshNormalMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
,
a
);
this
.
shading
=
THREE
.
FlatShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
setValues
(
a
)};
THREE
.
MeshNormalMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
MeshNormalMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
MeshNormalMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
shading
=
this
.
shading
;
a
.
wireframe
=
this
.
wireframe
;
a
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
return
a
};
THREE
.
MeshFaceMaterial
=
function
(){};
THREE
.
MeshFaceMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
MeshFaceMaterial
};
THREE
.
ParticleBasicMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
color
=
new
THREE
.
Color
(
16777215
);
this
.
map
=
null
;
this
.
size
=
1
;
this
.
sizeAttenuation
=
true
;
this
.
vertexColors
=
false
;
this
.
fog
=
true
;
this
.
setValues
(
a
)};
THREE
.
ParticleBasicMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
ParticleBasicMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
ParticleBasicMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
color
.
copy
(
this
.
color
);
a
.
map
=
this
.
map
;
a
.
size
=
this
.
size
;
a
.
sizeAttenuation
=
this
.
sizeAttenuation
;
a
.
vertexColors
=
this
.
vertexColors
;
a
.
fog
=
this
.
fog
;
return
a
};
THREE
.
ShaderMaterial
=
function
(
a
){
THREE
.
Material
.
call
(
this
);
this
.
vertexShader
=
this
.
fragmentShader
=
"
void main() {}
"
;
this
.
uniforms
=
{};
this
.
attributes
=
null
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
lights
=
this
.
fog
=
false
;
this
.
vertexColors
=
THREE
.
NoColors
;
this
.
morphNormals
=
this
.
morphTargets
=
this
.
skinning
=
false
;
this
.
setValues
(
a
)};
THREE
.
ShaderMaterial
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
ShaderMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
ShaderMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
fragmentShader
=
this
.
fragmentShader
;
a
.
vertexShader
=
this
.
vertexShader
;
a
.
uniforms
=
this
.
uniforms
;
a
.
attributes
=
this
.
attributes
;
a
.
shading
=
this
.
shading
;
a
.
wireframe
=
this
.
wireframe
;
a
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
a
.
fog
=
this
.
fog
;
a
.
lights
=
this
.
lights
;
a
.
vertexColors
=
this
.
vertexColors
;
a
.
skinning
=
this
.
skinning
;
a
.
morphTargets
=
this
.
morphTargets
;
a
.
morphNormals
=
this
.
morphNormals
;
return
a
};
THREE
.
Texture
=
function
(
a
,
b
,
c
,
d
,
e
,
f
,
h
,
j
,
l
){
this
.
id
=
THREE
.
TextureCount
++
;
this
.
image
=
a
;
this
.
mapping
=
b
!==
void
0
?
b
:
new
THREE
.
UVMapping
;
this
.
wrapS
=
c
!==
void
0
?
c
:
THREE
.
ClampToEdgeWrapping
;
this
.
wrapT
=
d
!==
void
0
?
d
:
THREE
.
ClampToEdgeWrapping
;
this
.
magFilter
=
e
!==
void
0
?
e
:
THREE
.
LinearFilter
;
this
.
minFilter
=
f
!==
void
0
?
f
:
THREE
.
LinearMipMapLinearFilter
;
this
.
anisotropy
=
l
!==
void
0
?
l
:
1
;
this
.
format
=
h
!==
void
0
?
h
:
THREE
.
RGBAFormat
;
this
.
type
=
j
!==
void
0
?
j
:
THREE
.
UnsignedByteType
;
this
.
offset
=
new
THREE
.
Vector2
(
0
,
0
);
this
.
repeat
=
new
THREE
.
Vector2
(
1
,
1
);
this
.
generateMipmaps
=
true
;
this
.
premultiplyAlpha
=
false
;
this
.
flipY
=
true
;
this
.
needsUpdate
=
false
;
this
.
onUpdate
=
null
};
THREE
.
Texture
.
prototype
=
{
constructor
:
THREE
.
Texture
,
clone
:
function
(){
var
a
=
new
THREE
.
Texture
(
this
.
image
,
this
.
mapping
,
this
.
wrapS
,
this
.
wrapT
,
this
.
magFilter
,
this
.
minFilter
,
this
.
format
,
this
.
type
,
this
.
anisotropy
);
a
.
offset
.
copy
(
this
.
offset
);
a
.
repeat
.
copy
(
this
.
repeat
);
a
.
generateMipmaps
=
this
.
generateMipmaps
;
a
.
premultiplyAlpha
=
this
.
premultiplyAlpha
;
a
.
flipY
=
this
.
flipY
;
return
a
}};
THREE
.
TextureCount
=
0
;
THREE
.
DataTexture
=
function
(
a
,
b
,
c
,
d
,
e
,
f
,
h
,
j
,
l
,
k
){
THREE
.
Texture
.
call
(
this
,
null
,
f
,
h
,
j
,
l
,
k
,
d
,
e
);
this
.
image
=
{
data
:
a
,
width
:
b
,
height
:
c
}};
THREE
.
DataTexture
.
prototype
=
Object
.
create
(
THREE
.
Texture
.
prototype
);
THREE
.
DataTexture
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
DataTexture
(
this
.
image
.
data
,
this
.
image
.
width
,
this
.
image
.
height
,
this
.
format
,
this
.
type
,
this
.
mapping
,
this
.
wrapS
,
this
.
wrapT
,
this
.
magFilter
,
this
.
minFilter
);
a
.
offset
.
copy
(
this
.
offset
);
a
.
repeat
.
copy
(
this
.
repeat
);
return
a
};
THREE
.
Particle
=
function
(
a
){
THREE
.
Object3D
.
call
(
this
);
this
.
material
=
a
};
THREE
.
Particle
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
ParticleSystem
=
function
(
a
,
b
){
THREE
.
Object3D
.
call
(
this
);
this
.
geometry
=
a
;
this
.
material
=
b
!==
void
0
?
b
:
new
THREE
.
ParticleBasicMaterial
({
color
:
Math
.
random
()
*
16777215
});
this
.
sortParticles
=
false
;
if
(
this
.
geometry
){
this
.
geometry
.
boundingSphere
||
this
.
geometry
.
computeBoundingSphere
();
this
.
boundRadius
=
a
.
boundingSphere
.
radius
}
this
.
frustumCulled
=
false
};
THREE
.
ParticleSystem
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
Line
=
function
(
a
,
b
,
c
){
THREE
.
Object3D
.
call
(
this
);
this
.
geometry
=
a
;
this
.
material
=
b
!==
void
0
?
b
:
new
THREE
.
LineBasicMaterial
({
color
:
Math
.
random
()
*
16777215
});
this
.
type
=
c
!==
void
0
?
c
:
THREE
.
LineStrip
;
this
.
geometry
&&
(
this
.
geometry
.
boundingSphere
||
this
.
geometry
.
computeBoundingSphere
())};
THREE
.
LineStrip
=
0
;
THREE
.
LinePieces
=
1
;
THREE
.
Line
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
...
...
src/materials/LineBasicMaterial.js
浏览文件 @
2c86fbbc
...
...
@@ -41,6 +41,20 @@ THREE.LineBasicMaterial.prototype = Object.create( THREE.Material.prototype );
THREE
.
LineBasicMaterial
.
prototype
.
clone
=
function
()
{
return
new
THREE
.
LineBasicMaterial
(
this
);
var
material
=
new
THREE
.
LineBasicMaterial
();
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
material
);
material
.
color
.
copy
(
this
.
color
);
material
.
linewidth
=
this
.
linewidth
;
material
.
linecap
=
this
.
linecap
;
material
.
linejoin
=
this
.
linejoin
;
material
.
vertexColors
=
this
.
vertexColors
;
material
.
fog
=
this
.
fog
;
return
material
;
};
src/materials/Material.js
浏览文件 @
2c86fbbc
...
...
@@ -43,11 +43,9 @@ THREE.Material.prototype.setValues = function ( values ) {
for
(
var
key
in
values
)
{
var
value
=
values
[
key
];
if
(
this
[
key
]
!==
undefined
)
{
this
[
key
]
=
value
;
this
[
key
]
=
value
s
[
key
]
;
}
...
...
@@ -57,6 +55,8 @@ THREE.Material.prototype.setValues = function ( values ) {
THREE
.
Material
.
prototype
.
clone
=
function
(
material
)
{
if
(
material
===
undefined
)
material
=
new
THREE
.
material
()
material
.
name
=
this
.
name
;
material
.
side
=
this
.
side
;
...
...
@@ -83,6 +83,8 @@ THREE.Material.prototype.clone = function ( material ) {
material
.
visible
=
this
.
visible
;
return
material
;
};
THREE
.
MaterialCount
=
0
;
src/materials/MeshDepthMaterial.js
浏览文件 @
2c86fbbc
...
...
@@ -17,8 +17,6 @@ THREE.MeshDepthMaterial = function ( parameters ) {
THREE
.
Material
.
call
(
this
);
this
.
shading
=
THREE
.
SmoothShading
;
// doesn't really apply here, normals are not used
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
...
...
@@ -30,6 +28,13 @@ THREE.MeshDepthMaterial.prototype = Object.create( THREE.Material.prototype );
THREE
.
MeshDepthMaterial
.
prototype
.
clone
=
function
()
{
return
new
THREE
.
MeshDepthMaterial
(
this
);
var
material
=
new
THREE
.
LineBasicMaterial
();
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
material
);
material
.
wireframe
=
this
.
wireframe
;
material
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
return
material
;
};
src/materials/MeshLambertMaterial.js
浏览文件 @
2c86fbbc
...
...
@@ -77,6 +77,41 @@ THREE.MeshLambertMaterial.prototype = Object.create( THREE.Material.prototype );
THREE
.
MeshLambertMaterial
.
prototype
.
clone
=
function
()
{
return
new
THREE
.
MeshLambertMaterial
(
this
);
var
material
=
new
THREE
.
MeshLambertMaterial
();
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
material
);
material
.
color
.
copy
(
this
.
color
);
material
.
ambient
.
copy
(
this
.
ambient
);
material
.
emissive
.
copy
(
this
.
emissive
);
material
.
wrapAround
=
this
.
wrapAround
;
material
.
wrapRGB
.
copy
(
this
.
wrapRGB
);
material
.
map
=
this
.
map
;
material
.
lightMap
=
this
.
lightMap
;
material
.
envMap
=
this
.
envMap
;
material
.
combine
=
this
.
combine
;
material
.
reflectivity
=
this
.
reflectivity
;
material
.
refractionRatio
=
this
.
refractionRatio
;
material
.
fog
=
this
.
fog
;
material
.
shading
=
this
.
shading
;
material
.
wireframe
=
this
.
wireframe
;
material
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
material
.
wireframeLinecap
=
this
.
wireframeLinecap
;
material
.
wireframeLinejoin
=
this
.
wireframeLinejoin
;
material
.
vertexColors
=
this
.
vertexColors
;
material
.
skinning
=
this
.
skinning
;
material
.
morphTargets
=
this
.
morphTargets
;
material
.
morphNormals
=
this
.
morphNormals
;
return
material
;
};
src/materials/MeshNormalMaterial.js
浏览文件 @
2c86fbbc
...
...
@@ -30,6 +30,15 @@ THREE.MeshNormalMaterial.prototype = Object.create( THREE.Material.prototype );
THREE
.
MeshNormalMaterial
.
prototype
.
clone
=
function
()
{
return
new
THREE
.
MeshNormalMaterial
(
this
);
var
material
=
new
THREE
.
MeshNormalMaterial
();
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
material
);
material
.
shading
=
this
.
shading
;
material
.
wireframe
=
this
.
wireframe
;
material
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
return
material
;
};
src/materials/MeshPhongMaterial.js
浏览文件 @
2c86fbbc
...
...
@@ -84,6 +84,46 @@ THREE.MeshPhongMaterial.prototype = Object.create( THREE.Material.prototype );
THREE
.
MeshPhongMaterial
.
prototype
.
clone
=
function
()
{
return
new
THREE
.
MeshPhongMaterial
(
this
);
var
material
=
new
THREE
.
MeshPhongMaterial
();
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
material
);
material
.
color
.
copy
(
this
.
color
);
material
.
ambient
.
copy
(
this
.
ambient
);
material
.
emissive
.
copy
(
this
.
emissive
);
material
.
specular
.
copy
(
this
.
specular
);
material
.
shininess
=
this
.
shininess
;
material
.
metal
=
this
.
metal
;
material
.
perPixel
=
this
.
perPixel
;
material
.
wrapAround
=
this
.
wrapAround
;
material
.
wrapRGB
.
copy
(
this
.
wrapRGB
);
material
.
map
=
this
.
map
;
material
.
lightMap
=
this
.
lightMap
;
material
.
envMap
=
this
.
envMap
;
material
.
combine
=
this
.
combine
;
material
.
reflectivity
=
this
.
reflectivity
;
material
.
refractionRatio
=
this
.
refractionRatio
;
material
.
fog
=
this
.
fog
;
material
.
shading
=
this
.
shading
;
material
.
wireframe
=
this
.
wireframe
;
material
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
material
.
wireframeLinecap
=
this
.
wireframeLinecap
;
material
.
wireframeLinejoin
=
this
.
wireframeLinejoin
;
material
.
vertexColors
=
this
.
vertexColors
;
material
.
skinning
=
this
.
skinning
;
material
.
morphTargets
=
this
.
morphTargets
;
material
.
morphNormals
=
this
.
morphNormals
;
return
material
;
};
src/materials/ParticleBasicMaterial.js
浏览文件 @
2c86fbbc
...
...
@@ -41,6 +41,21 @@ THREE.ParticleBasicMaterial.prototype = Object.create( THREE.Material.prototype
THREE
.
ParticleBasicMaterial
.
prototype
.
clone
=
function
()
{
return
new
THREE
.
ParticleBasicMaterial
(
this
);
var
material
=
new
THREE
.
ParticleBasicMaterial
();
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
material
);
material
.
color
.
copy
(
this
.
color
);
material
.
map
=
this
.
map
;
material
.
size
=
this
.
size
;
material
.
sizeAttenuation
=
this
.
sizeAttenuation
;
material
.
vertexColors
=
this
.
vertexColors
;
material
.
fog
=
this
.
fog
;
return
material
;
};
src/materials/ParticleCanvasMaterial.js
浏览文件 @
2c86fbbc
...
...
@@ -24,6 +24,13 @@ THREE.ParticleCanvasMaterial.prototype = Object.create( THREE.Material.prototype
THREE
.
ParticleCanvasMaterial
.
prototype
.
clone
=
function
()
{
return
new
THREE
.
ParticleCanvasMaterial
(
this
);
var
material
=
new
THREE
.
ParticleCanvasMaterial
();
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
material
);
material
.
color
.
copy
(
this
.
color
);
material
.
program
=
this
.
program
;
return
material
;
};
src/materials/ShaderMaterial.js
浏览文件 @
2c86fbbc
...
...
@@ -59,6 +59,31 @@ THREE.ShaderMaterial.prototype = Object.create( THREE.Material.prototype );
THREE
.
ShaderMaterial
.
prototype
.
clone
=
function
()
{
return
new
THREE
.
ShaderMaterial
(
this
);
var
material
=
new
THREE
.
ShaderMaterial
();
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
material
);
material
.
fragmentShader
=
this
.
fragmentShader
;
material
.
vertexShader
=
this
.
vertexShader
;
material
.
uniforms
=
this
.
uniforms
;
material
.
attributes
=
this
.
attributes
;
material
.
shading
=
this
.
shading
;
material
.
wireframe
=
this
.
wireframe
;
material
.
wireframeLinewidth
=
this
.
wireframeLinewidth
;
material
.
fog
=
this
.
fog
;
material
.
lights
=
this
.
lights
;
material
.
vertexColors
=
this
.
vertexColors
;
material
.
skinning
=
this
.
skinning
;
material
.
morphTargets
=
this
.
morphTargets
;
material
.
morphNormals
=
this
.
morphNormals
;
return
material
;
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录