Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
965481e8
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,发现更多精彩内容 >>
提交
965481e8
编写于
7月 23, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
e9fea44c
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
3 addition
and
1 deletion
+3
-1
build/three.js
build/three.js
+2
-0
build/three.min.js
build/three.min.js
+1
-1
未找到文件。
build/three.js
浏览文件 @
965481e8
...
...
@@ -9179,6 +9179,8 @@ THREE.BufferGeometry = function () {
this.id = THREE.GeometryIdCount ++;
this.uuid = THREE.Math.generateUUID();
this.name = '';
// attributes
this.attributes = {};
...
...
build/three.min.js
浏览文件 @
965481e8
...
...
@@ -188,7 +188,7 @@ c;b++){f=this.faces[b];for(d=0;d<f.vertexNormals.length;d++)J.copy(f.vertexNorma
new
THREE
.
Box3
);
this
.
boundingBox
.
setFromPoints
(
this
.
vertices
)},
computeBoundingSphere
:
function
(){
null
===
this
.
boundingSphere
&&
(
this
.
boundingSphere
=
new
THREE
.
Sphere
);
this
.
boundingSphere
.
setFromPoints
(
this
.
vertices
)},
mergeVertices
:
function
(){
var
a
=
{},
b
=
[],
c
=
[],
d
,
e
=
Math
.
pow
(
10
,
4
),
f
,
h
,
g
,
i
,
k
;
this
.
__tmpVertices
=
void
0
;
f
=
0
;
for
(
h
=
this
.
vertices
.
length
;
f
<
h
;
f
++
)
d
=
this
.
vertices
[
f
],
d
=
Math
.
round
(
d
.
x
*
e
)
+
"
_
"
+
Math
.
round
(
d
.
y
*
e
)
+
"
_
"
+
Math
.
round
(
d
.
z
*
e
),
void
0
===
a
[
d
]?(
a
[
d
]
=
f
,
b
.
push
(
this
.
vertices
[
f
]),
c
[
f
]
=
b
.
length
-
1
):
c
[
f
]
=
c
[
a
[
d
]];
e
=
[];
f
=
0
;
for
(
h
=
this
.
faces
.
length
;
f
<
h
;
f
++
)
if
(
a
=
this
.
faces
[
f
],
a
instanceof
THREE
.
Face3
){
a
.
a
=
c
[
a
.
a
];
a
.
b
=
c
[
a
.
b
];
a
.
c
=
c
[
a
.
c
];
g
=
[
a
.
a
,
a
.
b
,
a
.
c
];
d
=-
1
;
for
(
i
=
0
;
3
>
i
;
i
++
)
if
(
g
[
i
]
==
g
[(
i
+
1
)
%
3
]){
e
.
push
(
f
);
break
}}
else
if
(
a
instanceof
THREE
.
Face4
){
a
.
a
=
c
[
a
.
a
];
a
.
b
=
c
[
a
.
b
];
a
.
c
=
c
[
a
.
c
];
a
.
d
=
c
[
a
.
d
];
g
=
[
a
.
a
,
a
.
b
,
a
.
c
,
a
.
d
];
d
=-
1
;
for
(
i
=
0
;
4
>
i
;
i
++
)
g
[
i
]
==
g
[(
i
+
1
)
%
4
]
&&
(
0
<=
d
&&
e
.
push
(
f
),
d
=
i
);
if
(
0
<=
d
){
g
.
splice
(
d
,
1
);
var
l
=
new
THREE
.
Face3
(
g
[
0
],
g
[
1
],
g
[
2
],
a
.
normal
,
a
.
color
,
a
.
materialIndex
);
g
=
0
;
for
(
i
=
this
.
faceVertexUvs
.
length
;
g
<
i
;
g
++
)(
k
=
this
.
faceVertexUvs
[
g
][
f
])
&&
k
.
splice
(
d
,
1
);
a
.
vertexNormals
&&
0
<
a
.
vertexNormals
.
length
&&
(
l
.
vertexNormals
=
a
.
vertexNormals
,
l
.
vertexNormals
.
splice
(
d
,
1
));
a
.
vertexColors
&&
0
<
a
.
vertexColors
.
length
&&
(
l
.
vertexColors
=
a
.
vertexColors
,
l
.
vertexColors
.
splice
(
d
,
1
));
this
.
faces
[
f
]
=
l
}}
for
(
f
=
e
.
length
-
1
;
0
<=
f
;
f
--
){
this
.
faces
.
splice
(
f
,
1
);
g
=
0
;
for
(
i
=
this
.
faceVertexUvs
.
length
;
g
<
i
;
g
++
)
this
.
faceVertexUvs
[
g
].
splice
(
f
,
1
)}
c
=
this
.
vertices
.
length
-
b
.
length
;
this
.
vertices
=
b
;
return
c
},
clone
:
function
(){
for
(
var
a
=
new
THREE
.
Geometry
,
b
=
this
.
vertices
,
c
=
0
,
d
=
b
.
length
;
c
<
d
;
c
++
)
a
.
vertices
.
push
(
b
[
c
].
clone
());
b
=
this
.
faces
;
c
=
0
;
for
(
d
=
b
.
length
;
c
<
d
;
c
++
)
a
.
faces
.
push
(
b
[
c
].
clone
());
b
=
this
.
faceVertexUvs
[
0
];
c
=
0
;
for
(
d
=
b
.
length
;
c
<
d
;
c
++
){
for
(
var
e
=
b
[
c
],
f
=
[],
h
=
0
,
g
=
e
.
length
;
h
<
g
;
h
++
)
f
.
push
(
new
THREE
.
Vector2
(
e
[
h
].
x
,
e
[
h
].
y
));
a
.
faceVertexUvs
[
0
].
push
(
f
)}
return
a
},
dispose
:
function
(){
this
.
dispatchEvent
({
type
:
"
dispose
"
})}};
THREE
.
EventDispatcher
.
prototype
.
apply
(
THREE
.
Geometry
.
prototype
);
THREE
.
GeometryIdCount
=
0
;
THREE
.
BufferGeometry
=
function
(){
this
.
id
=
THREE
.
GeometryIdCount
++
;
this
.
uuid
=
THREE
.
Math
.
generateUUID
();
this
.
attributes
=
{};
this
.
dynamic
=!
0
;
this
.
offsets
=
[];
this
.
boundingSphere
=
this
.
boundingBox
=
null
;
this
.
hasTangents
=!
1
;
this
.
morphTargets
=
[]};
c
=
0
,
d
=
b
.
length
;
c
<
d
;
c
++
)
a
.
vertices
.
push
(
b
[
c
].
clone
());
b
=
this
.
faces
;
c
=
0
;
for
(
d
=
b
.
length
;
c
<
d
;
c
++
)
a
.
faces
.
push
(
b
[
c
].
clone
());
b
=
this
.
faceVertexUvs
[
0
];
c
=
0
;
for
(
d
=
b
.
length
;
c
<
d
;
c
++
){
for
(
var
e
=
b
[
c
],
f
=
[],
h
=
0
,
g
=
e
.
length
;
h
<
g
;
h
++
)
f
.
push
(
new
THREE
.
Vector2
(
e
[
h
].
x
,
e
[
h
].
y
));
a
.
faceVertexUvs
[
0
].
push
(
f
)}
return
a
},
dispose
:
function
(){
this
.
dispatchEvent
({
type
:
"
dispose
"
})}};
THREE
.
EventDispatcher
.
prototype
.
apply
(
THREE
.
Geometry
.
prototype
);
THREE
.
GeometryIdCount
=
0
;
THREE
.
BufferGeometry
=
function
(){
this
.
id
=
THREE
.
GeometryIdCount
++
;
this
.
uuid
=
THREE
.
Math
.
generateUUID
();
this
.
name
=
""
;
this
.
attributes
=
{};
this
.
dynamic
=!
0
;
this
.
offsets
=
[];
this
.
boundingSphere
=
this
.
boundingBox
=
null
;
this
.
hasTangents
=!
1
;
this
.
morphTargets
=
[]};
THREE
.
BufferGeometry
.
prototype
=
{
constructor
:
THREE
.
BufferGeometry
,
applyMatrix
:
function
(
a
){
var
b
,
c
;
this
.
attributes
.
position
&&
(
b
=
this
.
attributes
.
position
.
array
);
this
.
attributes
.
normal
&&
(
c
=
this
.
attributes
.
normal
.
array
);
void
0
!==
b
&&
(
a
.
multiplyVector3Array
(
b
),
this
.
verticesNeedUpdate
=!
0
);
void
0
!==
c
&&
((
new
THREE
.
Matrix3
).
getNormalMatrix
(
a
).
multiplyVector3Array
(
c
),
this
.
normalizeNormals
(),
this
.
normalsNeedUpdate
=!
0
)},
computeBoundingBox
:
function
(){
null
===
this
.
boundingBox
&&
(
this
.
boundingBox
=
new
THREE
.
Box3
);
var
a
=
this
.
attributes
.
position
.
array
;
if
(
a
){
var
b
=
this
.
boundingBox
,
c
,
d
,
e
;
3
<=
a
.
length
&&
(
b
.
min
.
x
=
b
.
max
.
x
=
a
[
0
],
b
.
min
.
y
=
b
.
max
.
y
=
a
[
1
],
b
.
min
.
z
=
b
.
max
.
z
=
a
[
2
]);
for
(
var
f
=
3
,
h
=
a
.
length
;
f
<
h
;
f
+=
3
)
c
=
a
[
f
],
d
=
a
[
f
+
1
],
e
=
a
[
f
+
2
],
c
<
b
.
min
.
x
?
b
.
min
.
x
=
c
:
c
>
b
.
max
.
x
&&
(
b
.
max
.
x
=
c
),
d
<
b
.
min
.
y
?
b
.
min
.
y
=
d
:
d
>
b
.
max
.
y
&&
(
b
.
max
.
y
=
d
),
e
<
b
.
min
.
z
?
b
.
min
.
z
=
e
:
e
>
b
.
max
.
z
&&
(
b
.
max
.
z
=
e
)}
if
(
void
0
===
a
||
0
===
a
.
length
)
this
.
boundingBox
.
min
.
set
(
0
,
0
,
0
),
this
.
boundingBox
.
max
.
set
(
0
,
0
,
0
)},
computeBoundingSphere
:
function
(){
null
===
this
.
boundingSphere
&&
(
this
.
boundingSphere
=
new
THREE
.
Sphere
);
var
a
=
this
.
attributes
.
position
.
array
;
if
(
a
){
for
(
var
b
,
c
=
0
,
d
,
e
,
f
=
0
,
h
=
a
.
length
;
f
<
h
;
f
+=
3
)
b
=
a
[
f
],
d
=
a
[
f
+
1
],
e
=
a
[
f
+
2
],
b
=
b
*
b
+
d
*
d
+
e
*
e
,
b
>
c
&&
(
c
=
b
);
this
.
boundingSphere
.
radius
=
Math
.
sqrt
(
c
)}},
computeVertexNormals
:
function
(){
if
(
this
.
attributes
.
position
){
var
a
,
b
,
c
,
d
;
a
=
this
.
attributes
.
position
.
array
.
length
;
if
(
void
0
===
this
.
attributes
.
normal
)
this
.
attributes
.
normal
=
{
itemSize
:
3
,
array
:
new
Float32Array
(
a
)};
else
{
a
=
0
;
for
(
b
=
this
.
attributes
.
normal
.
array
.
length
;
a
<
b
;
a
++
)
this
.
attributes
.
normal
.
array
[
a
]
=
0
}
var
e
=
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录