Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
a056e70e
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,发现更多精彩内容 >>
提交
a056e70e
编写于
3月 10, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
6db71a67
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
4 addition
and
3 deletion
+4
-3
build/three.js
build/three.js
+2
-1
build/three.min.js
build/three.min.js
+2
-2
未找到文件。
build/three.js
浏览文件 @
a056e70e
...
...
@@ -12680,8 +12680,9 @@ THREE.ObjectLoader.prototype = {
switch ( data.type ) {
case 'PlaneGeometry':
case 'PlaneBufferGeometry':
geometry = new THREE
.PlaneGeometry
(
geometry = new THREE
[ data.type ]
(
data.width,
data.height,
data.widthSegments,
...
...
build/three.min.js
浏览文件 @
a056e70e
...
...
@@ -280,8 +280,8 @@ THREE.MaterialLoader.prototype={constructor:THREE.MaterialLoader,load:function(a
void
0
!==
a
.
uniforms
&&
(
b
.
uniforms
=
a
.
uniforms
);
void
0
!==
a
.
vertexShader
&&
(
b
.
vertexShader
=
a
.
vertexShader
);
void
0
!==
a
.
fragmentShader
&&
(
b
.
fragmentShader
=
a
.
fragmentShader
);
void
0
!==
a
.
vertexColors
&&
(
b
.
vertexColors
=
a
.
vertexColors
);
void
0
!==
a
.
shading
&&
(
b
.
shading
=
a
.
shading
);
void
0
!==
a
.
blending
&&
(
b
.
blending
=
a
.
blending
);
void
0
!==
a
.
side
&&
(
b
.
side
=
a
.
side
);
void
0
!==
a
.
opacity
&&
(
b
.
opacity
=
a
.
opacity
);
void
0
!==
a
.
transparent
&&
(
b
.
transparent
=
a
.
transparent
);
void
0
!==
a
.
wireframe
&&
(
b
.
wireframe
=
a
.
wireframe
);
void
0
!==
a
.
size
&&
(
b
.
size
=
a
.
size
);
void
0
!==
a
.
sizeAttenuation
&&
(
b
.
sizeAttenuation
=
a
.
sizeAttenuation
);
if
(
void
0
!==
a
.
materials
)
for
(
var
c
=
0
,
d
=
a
.
materials
.
length
;
c
<
d
;
c
++
)
b
.
materials
.
push
(
this
.
parse
(
a
.
materials
[
c
]));
return
b
}};
THREE
.
ObjectLoader
=
function
(
a
){
this
.
manager
=
void
0
!==
a
?
a
:
THREE
.
DefaultLoadingManager
;
this
.
texturePath
=
""
};
THREE
.
ObjectLoader
.
prototype
=
{
constructor
:
THREE
.
ObjectLoader
,
load
:
function
(
a
,
b
,
c
,
d
){
""
===
this
.
texturePath
&&
(
this
.
texturePath
=
a
.
substring
(
0
,
a
.
lastIndexOf
(
"
/
"
)
+
1
));
var
e
=
this
,
f
=
new
THREE
.
XHRLoader
(
e
.
manager
);
f
.
setCrossOrigin
(
this
.
crossOrigin
);
f
.
load
(
a
,
function
(
a
){
e
.
parse
(
JSON
.
parse
(
a
),
b
)},
c
,
d
)},
setTexturePath
:
function
(
a
){
this
.
texturePath
=
a
},
setCrossOrigin
:
function
(
a
){
this
.
crossOrigin
=
a
},
parse
:
function
(
a
,
b
){
var
c
=
this
.
parseGeometries
(
a
.
geometries
),
d
=
this
.
parseImages
(
a
.
images
,
function
(){
void
0
!==
b
&&
b
(
e
)}),
d
=
this
.
parseTextures
(
a
.
textures
,
d
),
d
=
this
.
parseMaterials
(
a
.
materials
,
d
),
e
=
this
.
parseObject
(
a
.
object
,
c
,
d
);
void
0
!==
a
.
images
&&
0
!==
a
.
images
.
length
||
void
0
===
b
||
b
(
e
);
return
e
},
parseGeometries
:
function
(
a
){
var
b
=
{};
if
(
void
0
!==
a
)
for
(
var
c
=
new
THREE
.
JSONLoader
,
d
=
new
THREE
.
BufferGeometryLoader
,
e
=
0
,
f
=
a
.
length
;
e
<
f
;
e
++
){
var
g
,
h
=
a
[
e
];
switch
(
h
.
type
){
case
"
PlaneGeometry
"
:
g
=
new
THREE
.
PlaneGeometry
(
h
.
width
,
h
.
height
,
h
.
widthSegments
,
h
.
heightSegments
);
break
;
case
"
BoxGeometry
"
:
case
"
CubeGeometry
"
:
g
=
new
THREE
.
BoxGeometry
(
h
.
width
,
h
.
height
,
h
.
depth
,
h
.
widthSegments
,
h
.
heightSegments
,
h
.
depthSegments
);
break
;
case
"
CircleGeometry
"
:
g
=
new
THREE
.
CircleGeometry
(
h
.
radius
,
h
.
segments
);
break
;
case
"
CylinderGeometry
"
:
g
=
new
THREE
.
CylinderGeometry
(
h
.
radiusTop
,
h
.
radiusBottom
,
h
.
height
,
h
.
radialSegments
,
h
.
heightSegments
,
h
.
openEnded
);
break
;
case
"
SphereGeometry
"
:
g
=
new
THREE
.
SphereGeometry
(
h
.
radius
,
h
.
widthSegments
,
h
.
heightSegments
,
h
.
phiStart
,
h
.
phiLength
,
h
.
thetaStart
,
h
.
thetaLength
);
break
;
case
"
IcosahedronGeometry
"
:
g
=
new
THREE
.
IcosahedronGeometry
(
h
.
radius
,
d
=
this
.
parseTextures
(
a
.
textures
,
d
),
d
=
this
.
parseMaterials
(
a
.
materials
,
d
),
e
=
this
.
parseObject
(
a
.
object
,
c
,
d
);
void
0
!==
a
.
images
&&
0
!==
a
.
images
.
length
||
void
0
===
b
||
b
(
e
);
return
e
},
parseGeometries
:
function
(
a
){
var
b
=
{};
if
(
void
0
!==
a
)
for
(
var
c
=
new
THREE
.
JSONLoader
,
d
=
new
THREE
.
BufferGeometryLoader
,
e
=
0
,
f
=
a
.
length
;
e
<
f
;
e
++
){
var
g
,
h
=
a
[
e
];
switch
(
h
.
type
){
case
"
PlaneGeometry
"
:
case
"
PlaneBufferGeometry
"
:
g
=
new
THREE
[
h
.
type
](
h
.
width
,
h
.
height
,
h
.
widthSegments
,
h
.
heightSegments
);
break
;
case
"
BoxGeometry
"
:
case
"
CubeGeometry
"
:
g
=
new
THREE
.
BoxGeometry
(
h
.
width
,
h
.
height
,
h
.
depth
,
h
.
widthSegments
,
h
.
heightSegments
,
h
.
depthSegments
);
break
;
case
"
CircleGeometry
"
:
g
=
new
THREE
.
CircleGeometry
(
h
.
radius
,
h
.
segments
);
break
;
case
"
CylinderGeometry
"
:
g
=
new
THREE
.
CylinderGeometry
(
h
.
radiusTop
,
h
.
radiusBottom
,
h
.
height
,
h
.
radialSegments
,
h
.
heightSegments
,
h
.
openEnded
);
break
;
case
"
SphereGeometry
"
:
g
=
new
THREE
.
SphereGeometry
(
h
.
radius
,
h
.
widthSegments
,
h
.
heightSegments
,
h
.
phiStart
,
h
.
phiLength
,
h
.
thetaStart
,
h
.
thetaLength
);
break
;
case
"
IcosahedronGeometry
"
:
g
=
new
THREE
.
IcosahedronGeometry
(
h
.
radius
,
h
.
detail
);
break
;
case
"
TorusGeometry
"
:
g
=
new
THREE
.
TorusGeometry
(
h
.
radius
,
h
.
tube
,
h
.
radialSegments
,
h
.
tubularSegments
,
h
.
arc
);
break
;
case
"
TorusKnotGeometry
"
:
g
=
new
THREE
.
TorusKnotGeometry
(
h
.
radius
,
h
.
tube
,
h
.
radialSegments
,
h
.
tubularSegments
,
h
.
p
,
h
.
q
,
h
.
heightScale
);
break
;
case
"
BufferGeometry
"
:
g
=
d
.
parse
(
h
.
data
);
break
;
case
"
Geometry
"
:
g
=
c
.
parse
(
h
.
data
).
geometry
}
g
.
uuid
=
h
.
uuid
;
void
0
!==
h
.
name
&&
(
g
.
name
=
h
.
name
);
b
[
h
.
uuid
]
=
g
}
return
b
},
parseMaterials
:
function
(
a
,
b
){
var
c
=
{};
if
(
void
0
!==
a
)
for
(
var
d
=
function
(
a
){
void
0
===
b
[
a
]
&&
THREE
.
warn
(
"
THREE.ObjectLoader: Undefined texture
"
,
a
);
return
b
[
a
]},
e
=
new
THREE
.
MaterialLoader
,
f
=
0
,
g
=
a
.
length
;
f
<
g
;
f
++
){
var
h
=
a
[
f
],
k
=
e
.
parse
(
h
);
k
.
uuid
=
h
.
uuid
;
void
0
!==
h
.
name
&&
(
k
.
name
=
h
.
name
);
void
0
!==
h
.
map
&&
(
k
.
map
=
d
(
h
.
map
));
void
0
!==
h
.
bumpMap
&&
(
k
.
bumpMap
=
d
(
h
.
bumpMap
),
h
.
bumpScale
&&
(
k
.
bumpScale
=
new
THREE
.
Vector2
(
h
.
bumpScale
,
h
.
bumpScale
)));
void
0
!==
h
.
alphaMap
&&
(
k
.
alphaMap
=
d
(
h
.
alphaMap
));
void
0
!==
h
.
envMap
&&
(
k
.
envMap
=
d
(
h
.
envMap
));
void
0
!==
h
.
normalMap
&&
(
k
.
normalMap
=
d
(
h
.
normalMap
),
h
.
normalScale
&&
(
k
.
normalScale
=
new
THREE
.
Vector2
(
h
.
normalScale
,
h
.
normalScale
)));
void
0
!==
h
.
lightMap
&&
(
k
.
lightMap
=
d
(
h
.
lightMap
));
void
0
!==
h
.
specularMap
&&
(
k
.
specularMap
=
d
(
h
.
specularMap
));
c
[
h
.
uuid
]
=
k
}
return
c
},
parseImages
:
function
(
a
,
b
){
var
c
=
this
,
d
=
{};
if
(
void
0
!==
a
&&
0
<
a
.
length
){
var
e
=
new
THREE
.
LoadingManager
(
b
),
f
=
new
THREE
.
ImageLoader
(
e
);
f
.
setCrossOrigin
(
this
.
crossOrigin
);
for
(
var
e
=
function
(
a
){
c
.
manager
.
itemStart
(
a
);
return
f
.
load
(
a
,
function
(){
c
.
manager
.
itemEnd
(
a
)})},
g
=
0
,
h
=
a
.
length
;
g
<
h
;
g
++
){
var
k
=
a
[
g
],
l
=
/^
(\/\/)
|
([
a-z
]
+:
(\/\/)?)
/i
.
test
(
k
.
url
)?
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录