Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
f1592016
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,发现更多精彩内容 >>
提交
f1592016
编写于
7月 07, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
0f6b0e6f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
6 deletion
+5
-6
build/three.js
build/three.js
+2
-3
build/three.min.js
build/three.min.js
+3
-3
未找到文件。
build/three.js
浏览文件 @
f1592016
...
...
@@ -10943,7 +10943,6 @@ THREE.MaterialLoader.prototype = {
material = new THREE.MeshBasicMaterial( {
color: json.color,
vertexColors: json.vertexColors,
opacity: json.opacity,
transparent: json.transparent,
wireframe: json.wireframe
...
...
@@ -10959,7 +10958,6 @@ THREE.MaterialLoader.prototype = {
color: json.color,
ambient: json.ambient,
emissive: json.emissive,
vertexColors: json.vertexColors,
opacity: json.opacity,
transparent: json.transparent,
wireframe: json.wireframe
...
...
@@ -10977,7 +10975,6 @@ THREE.MaterialLoader.prototype = {
emissive: json.emissive,
specular: json.specular,
shininess: json.shininess,
vertexColors: json.vertexColors,
opacity: json.opacity,
transparent: json.transparent,
wireframe: json.wireframe
...
...
@@ -11012,6 +11009,8 @@ THREE.MaterialLoader.prototype = {
}
if ( json.vertexColors !== undefined ) material.vertexColors = json.vertexColors;
return material;
}
...
...
build/three.min.js
浏览文件 @
f1592016
...
...
@@ -218,9 +218,9 @@ new THREE.Face4,n.a=z[g++],n.b=z[g++],n.c=z[g++],n.d=z[g++],j=4):(n=new THREE.Fa
3
*
z
[
g
++
],
f
=
new
THREE
.
Vector3
,
f
.
x
=
G
[
l
++
],
f
.
y
=
G
[
l
++
],
f
.
z
=
G
[
l
],
n
.
vertexNormals
.
push
(
f
);
t
&&
(
m
=
z
[
g
++
],
m
=
new
THREE
.
Color
(
C
[
m
]),
n
.
color
=
m
);
if
(
q
)
for
(
e
=
0
;
e
<
j
;
e
++
)
m
=
z
[
g
++
],
m
=
new
THREE
.
Color
(
C
[
m
]),
n
.
vertexColors
.
push
(
m
);
c
.
faces
.
push
(
n
)}
if
(
a
.
skinWeights
){
g
=
0
;
for
(
i
=
a
.
skinWeights
.
length
;
g
<
i
;
g
+=
2
)
z
=
a
.
skinWeights
[
g
],
G
=
a
.
skinWeights
[
g
+
1
],
c
.
skinWeights
.
push
(
new
THREE
.
Vector4
(
z
,
G
,
0
,
0
))}
if
(
a
.
skinIndices
){
g
=
0
;
for
(
i
=
a
.
skinIndices
.
length
;
g
<
i
;
g
+=
2
)
z
=
a
.
skinIndices
[
g
],
G
=
a
.
skinIndices
[
g
+
1
],
c
.
skinIndices
.
push
(
new
THREE
.
Vector4
(
z
,
G
,
0
,
0
))}
c
.
bones
=
a
.
bones
;
c
.
animation
=
a
.
animation
;
if
(
void
0
!==
a
.
morphTargets
){
g
=
0
;
for
(
i
=
a
.
morphTargets
.
length
;
g
<
i
;
g
++
){
c
.
morphTargets
[
g
]
=
{};
c
.
morphTargets
[
g
].
name
=
a
.
morphTargets
[
g
].
name
;
c
.
morphTargets
[
g
].
vertices
=
[];
C
=
c
.
morphTargets
[
g
].
vertices
;
H
=
a
.
morphTargets
[
g
].
vertices
;
z
=
0
;
for
(
G
=
H
.
length
;
z
<
G
;
z
+=
3
)
q
=
new
THREE
.
Vector3
,
q
.
x
=
H
[
z
]
*
d
,
q
.
y
=
H
[
z
+
1
]
*
d
,
q
.
z
=
H
[
z
+
2
]
*
d
,
C
.
push
(
q
)}}
if
(
void
0
!==
a
.
morphColors
){
g
=
0
;
for
(
i
=
a
.
morphColors
.
length
;
g
<
i
;
g
++
){
c
.
morphColors
[
g
]
=
{};
c
.
morphColors
[
g
].
name
=
a
.
morphColors
[
g
].
name
;
c
.
morphColors
[
g
].
colors
=
[];
G
=
c
.
morphColors
[
g
].
colors
;
C
=
a
.
morphColors
[
g
].
colors
;
d
=
0
;
for
(
z
=
C
.
length
;
d
<
z
;
d
+=
3
)
H
=
new
THREE
.
Color
(
16755200
),
H
.
setRGB
(
C
[
d
],
C
[
d
+
1
],
C
[
d
+
2
]),
G
.
push
(
H
)}}
c
.
computeCentroids
();
c
.
computeFaceNormals
();
if
(
void
0
===
a
.
materials
)
return
{
geometry
:
c
};
d
=
this
.
initMaterials
(
a
.
materials
,
b
);
this
.
needsTangents
(
d
)
&&
c
.
computeTangents
();
return
{
geometry
:
c
,
materials
:
d
}};
THREE
.
LoadingManager
=
function
(
a
,
b
,
c
){
var
d
=
this
,
e
=
0
,
f
=
0
;
this
.
onLoad
=
a
;
this
.
onProgress
=
b
;
this
.
onError
=
c
;
this
.
itemStart
=
function
(){
f
++
};
this
.
itemEnd
=
function
(
a
){
e
++
;
if
(
void
0
!==
d
.
onProgress
)
d
.
onProgress
(
a
,
e
,
f
);
if
(
e
===
f
&&
void
0
!==
d
.
onLoad
)
d
.
onLoad
()}};
THREE
.
DefaultLoadingManager
=
new
THREE
.
LoadingManager
;
THREE
.
GeometryLoader
=
function
(
a
){
this
.
manager
=
void
0
!==
a
?
a
:
THREE
.
DefaultLoadingManager
};
THREE
.
GeometryLoader
.
prototype
=
{
constructor
:
THREE
.
GeometryLoader
,
load
:
function
(
a
,
b
){
var
c
=
this
,
d
=
new
THREE
.
XHRLoader
;
d
.
setCrossOrigin
(
this
.
crossOrigin
);
d
.
load
(
a
,
function
(
a
){
b
(
c
.
parse
(
JSON
.
parse
(
a
)))})},
setCrossOrigin
:
function
(
a
){
this
.
crossOrigin
=
a
},
parse
:
function
(){}};
THREE
.
MaterialLoader
=
function
(
a
){
this
.
manager
=
void
0
!==
a
?
a
:
THREE
.
DefaultLoadingManager
};
THREE
.
MaterialLoader
.
prototype
=
{
constructor
:
THREE
.
MaterialLoader
,
load
:
function
(
a
,
b
){
var
c
=
this
,
d
=
new
THREE
.
XHRLoader
;
d
.
setCrossOrigin
(
this
.
crossOrigin
);
d
.
load
(
a
,
function
(
a
){
b
(
c
.
parse
(
JSON
.
parse
(
a
)))})},
setCrossOrigin
:
function
(
a
){
this
.
crossOrigin
=
a
},
parse
:
function
(
a
){
var
b
;
switch
(
a
.
type
){
case
"
MeshBasicMaterial
"
:
b
=
new
THREE
.
MeshBasicMaterial
({
color
:
a
.
color
,
vertexColors
:
a
.
vertexColors
,
opacity
:
a
.
opacity
,
transparent
:
a
.
transparent
,
wireframe
:
a
.
wireframe
});
break
;
case
"
MeshLambertMaterial
"
:
b
=
new
THREE
.
MeshLambertMaterial
({
color
:
a
.
color
,
ambient
:
a
.
ambient
,
emissive
:
a
.
emissive
,
vertexColors
:
a
.
vertexColors
,
opacity
:
a
.
opacity
,
transparent
:
a
.
transparent
,
wireframe
:
a
.
wireframe
});
break
;
case
"
MeshPhongMaterial
"
:
b
=
new
THREE
.
MeshPhongMaterial
({
color
:
a
.
color
,
ambient
:
a
.
ambient
,
emissive
:
a
.
emissive
,
specular
:
a
.
specular
,
shininess
:
a
.
shininess
,
vertexColors
:
a
.
vertexColors
,
opacity
:
a
.
opacity
,
transparent
:
a
.
transparent
,
wireframe
:
a
.
wireframe
});
break
;
case
"
MeshNormalMaterial
"
:
b
=
new
THREE
.
MeshNormalMaterial
({
opacity
:
a
.
opacity
,
transparent
:
a
.
transparent
,
wireframe
:
a
.
wireframe
});
break
;
case
"
MeshDepthMaterial
"
:
b
=
new
THREE
.
MeshDepthMaterial
({
opacity
:
a
.
opacity
,
transparent
:
a
.
transparent
,
wireframe
:
a
.
wireframe
})}
return
b
}};
THREE
.
ObjectLoader
=
function
(
a
){
this
.
manager
=
void
0
!==
a
?
a
:
THREE
.
DefaultLoadingManager
};
THREE
.
MaterialLoader
.
prototype
=
{
constructor
:
THREE
.
MaterialLoader
,
load
:
function
(
a
,
b
){
var
c
=
this
,
d
=
new
THREE
.
XHRLoader
;
d
.
setCrossOrigin
(
this
.
crossOrigin
);
d
.
load
(
a
,
function
(
a
){
b
(
c
.
parse
(
JSON
.
parse
(
a
)))})},
setCrossOrigin
:
function
(
a
){
this
.
crossOrigin
=
a
},
parse
:
function
(
a
){
var
b
;
switch
(
a
.
type
){
case
"
MeshBasicMaterial
"
:
b
=
new
THREE
.
MeshBasicMaterial
({
color
:
a
.
color
,
opacity
:
a
.
opacity
,
transparent
:
a
.
transparent
,
wireframe
:
a
.
wireframe
});
break
;
case
"
MeshLambertMaterial
"
:
b
=
new
THREE
.
MeshLambertMaterial
({
color
:
a
.
color
,
ambient
:
a
.
ambient
,
emissive
:
a
.
emissive
,
opacity
:
a
.
opacity
,
transparent
:
a
.
transparent
,
wireframe
:
a
.
wireframe
});
break
;
case
"
MeshPhongMaterial
"
:
b
=
new
THREE
.
MeshPhongMaterial
({
color
:
a
.
color
,
ambient
:
a
.
ambient
,
emissive
:
a
.
emissive
,
specular
:
a
.
specular
,
shininess
:
a
.
shininess
,
opacity
:
a
.
opacity
,
transparent
:
a
.
transparent
,
wireframe
:
a
.
wireframe
});
break
;
case
"
MeshNormalMaterial
"
:
b
=
new
THREE
.
MeshNormalMaterial
({
opacity
:
a
.
opacity
,
transparent
:
a
.
transparent
,
wireframe
:
a
.
wireframe
});
break
;
case
"
MeshDepthMaterial
"
:
b
=
new
THREE
.
MeshDepthMaterial
({
opacity
:
a
.
opacity
,
transparent
:
a
.
transparent
,
wireframe
:
a
.
wireframe
})}
void
0
!==
a
.
vertexColors
&&
(
b
.
vertexColors
=
a
.
vertexColors
);
return
b
}};
THREE
.
ObjectLoader
=
function
(
a
){
this
.
manager
=
void
0
!==
a
?
a
:
THREE
.
DefaultLoadingManager
};
THREE
.
ObjectLoader
.
prototype
=
{
constructor
:
THREE
.
ObjectLoader
,
load
:
function
(
a
,
b
){
var
c
=
this
,
d
=
new
THREE
.
XHRLoader
(
c
.
manager
);
d
.
setCrossOrigin
(
this
.
crossOrigin
);
d
.
load
(
a
,
function
(
a
){
b
(
c
.
parse
(
JSON
.
parse
(
a
)))})},
setCrossOrigin
:
function
(
a
){
this
.
crossOrigin
=
a
},
parse
:
function
(
a
){
var
b
=
this
.
parseGeometries
(
a
.
geometries
),
c
=
this
.
parseMaterials
(
a
.
materials
);
return
this
.
parseObject
(
a
.
object
,
b
,
c
)},
parseGeometries
:
function
(
a
){
var
b
=
{};
if
(
void
0
!==
a
)
for
(
var
c
=
new
THREE
.
JSONLoader
,
d
=
0
,
e
=
a
.
length
;
d
<
e
;
d
++
){
var
f
,
h
=
a
[
d
];
switch
(
h
.
type
){
case
"
PlaneGeometry
"
:
f
=
new
THREE
.
PlaneGeometry
(
h
.
width
,
h
.
height
,
h
.
widthSegments
,
h
.
heightSegments
);
break
;
case
"
CubeGeometry
"
:
f
=
new
THREE
.
CubeGeometry
(
h
.
width
,
h
.
height
,
h
.
depth
,
h
.
widthSegments
,
h
.
heightSegments
,
h
.
depthSegments
);
break
;
case
"
CylinderGeometry
"
:
f
=
new
THREE
.
CylinderGeometry
(
h
.
radiusTop
,
h
.
radiusBottom
,
h
.
height
,
h
.
radiusSegments
,
h
.
heightSegments
,
h
.
openEnded
);
break
;
case
"
SphereGeometry
"
:
f
=
new
THREE
.
SphereGeometry
(
h
.
radius
,
h
.
widthSegments
,
h
.
heightSegments
,
h
.
phiStart
,
h
.
phiLength
,
h
.
thetaStart
,
h
.
thetaLength
);
break
;
case
"
IcosahedronGeometry
"
:
f
=
new
THREE
.
IcosahedronGeometry
(
h
.
radius
,
h
.
detail
);
break
;
case
"
TorusGeometry
"
:
f
=
new
THREE
.
TorusGeometry
(
h
.
radius
,
h
.
tube
,
h
.
radialSegments
,
h
.
tubularSegments
,
h
.
arc
);
break
;
case
"
TorusKnotGeometry
"
:
f
=
new
THREE
.
TorusKnotGeometry
(
h
.
radius
,
h
.
tube
,
h
.
radialSegments
,
h
.
tubularSegments
,
h
.
p
,
h
.
q
,
h
.
heightScale
);
break
;
case
"
Geometry
"
:
f
=
c
.
parse
(
h
.
data
).
geometry
}
void
0
!==
h
.
id
&&
(
f
.
id
=
h
.
id
);
void
0
!==
h
.
name
&&
(
f
.
name
=
h
.
name
);
b
[
h
.
id
]
=
f
}
return
b
},
parseMaterials
:
function
(
a
){
var
b
=
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录