Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
83626ee5
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,发现更多精彩内容 >>
提交
83626ee5
编写于
10月 19, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
28d3af55
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
9 deletion
+16
-9
build/three.js
build/three.js
+11
-5
build/three.min.js
build/three.min.js
+5
-4
未找到文件。
build/three.js
浏览文件 @
83626ee5
...
...
@@ -32878,17 +32878,23 @@ THREE.WireframeHelper = function ( object, hex ) {
var vertices = object.geometry.attributes.position.array;
var indices = object.geometry.attributes.index.array;
var
offsets = object.geometry.offset
s;
var
drawcalls = object.geometry.drawcall
s;
var numEdges = 0;
if ( drawcalls.length === 0 ) {
drawcalls = [ { count : indices.length, index : 0, start : 0 } ];
}
// allocate maximal size
var edges = new Uint32Array( 2 * indices.length );
for ( var o = 0, ol =
offset
s.length; o < ol; ++ o ) {
for ( var o = 0, ol =
drawcall
s.length; o < ol; ++ o ) {
var start =
offset
s[ o ].start;
var count =
offset
s[ o ].count;
var index =
offset
s[ o ].index;
var start =
drawcall
s[ o ].start;
var count =
drawcall
s[ o ].count;
var index =
drawcall
s[ o ].index;
for ( var i = start, il = start + count; i < il; i += 3 ) {
...
...
build/three.min.js
浏览文件 @
83626ee5
...
...
@@ -770,10 +770,11 @@ THREE.VertexTangentsHelper=function(a,b,c,d){this.object=a;this.size=void 0!==b?
THREE
.
VertexTangentsHelper
.
prototype
.
update
=
function
(
a
){
var
b
=
new
THREE
.
Vector3
;
return
function
(
a
){
a
=
[
"
a
"
,
"
b
"
,
"
c
"
,
"
d
"
];
this
.
object
.
updateMatrixWorld
(
!
0
);
for
(
var
d
=
this
.
geometry
.
vertices
,
e
=
this
.
object
.
geometry
.
vertices
,
g
=
this
.
object
.
geometry
.
faces
,
f
=
this
.
object
.
matrixWorld
,
h
=
0
,
k
=
0
,
n
=
g
.
length
;
k
<
n
;
k
++
)
for
(
var
p
=
g
[
k
],
q
=
0
,
m
=
p
.
vertexTangents
.
length
;
q
<
m
;
q
++
){
var
r
=
p
.
vertexTangents
[
q
];
d
[
h
].
copy
(
e
[
p
[
a
[
q
]]]).
applyMatrix4
(
f
);
b
.
copy
(
r
).
transformDirection
(
f
).
multiplyScalar
(
this
.
size
);
b
.
add
(
d
[
h
]);
h
+=
1
;
d
[
h
].
copy
(
b
);
h
+=
1
}
this
.
geometry
.
verticesNeedUpdate
=!
0
;
return
this
}}();
THREE
.
WireframeHelper
=
function
(
a
,
b
){
var
c
=
void
0
!==
b
?
b
:
16777215
,
d
=
[
0
,
0
],
e
=
{},
g
=
function
(
a
,
b
){
return
a
-
b
},
f
=
[
"
a
"
,
"
b
"
,
"
c
"
],
h
=
new
THREE
.
BufferGeometry
;
if
(
a
.
geometry
instanceof
THREE
.
Geometry
){
for
(
var
k
=
a
.
geometry
.
vertices
,
n
=
a
.
geometry
.
faces
,
p
=
0
,
q
=
new
Uint32Array
(
6
*
n
.
length
),
m
=
0
,
r
=
n
.
length
;
m
<
r
;
m
++
)
for
(
var
t
=
n
[
m
],
s
=
0
;
3
>
s
;
s
++
){
d
[
0
]
=
t
[
f
[
s
]];
d
[
1
]
=
t
[
f
[(
s
+
1
)
%
3
]];
d
.
sort
(
g
);
var
u
=
d
.
toString
();
void
0
===
e
[
u
]
&&
(
q
[
2
*
p
]
=
d
[
0
],
q
[
2
*
p
+
1
]
=
d
[
1
],
e
[
u
]
=!
0
,
p
++
)}
d
=
new
Float32Array
(
6
*
p
);
m
=
0
;
for
(
r
=
p
;
m
<
r
;
m
++
)
for
(
s
=
0
;
2
>
s
;
s
++
)
p
=
k
[
q
[
2
*
m
+
s
]],
f
=
6
*
m
+
3
*
s
,
d
[
f
+
0
]
=
p
.
x
,
d
[
f
+
1
]
=
p
.
y
,
d
[
f
+
2
]
=
p
.
z
;
h
.
addAttribute
(
"
position
"
,
new
THREE
.
BufferAttribute
(
d
,
3
))}
else
if
(
a
.
geometry
instanceof
THREE
.
BufferGeometry
){
if
(
void
0
!==
a
.
geometry
.
attributes
.
index
){
for
(
var
k
=
a
.
geometry
.
attributes
.
position
.
array
,
r
=
a
.
geometry
.
attributes
.
index
.
array
,
n
=
a
.
geometry
.
offsets
,
p
=
0
,
q
=
new
Uint32Array
(
2
*
r
.
length
),
t
=
0
,
w
=
n
.
length
;
t
<
w
;
++
t
)
for
(
var
s
=
n
[
t
].
start
,
u
=
n
[
t
].
count
,
f
=
n
[
t
].
index
,
m
=
s
,
y
=
s
+
u
;
m
<
y
;
m
+=
3
)
for
(
s
=
0
;
3
>
s
;
s
++
)
d
[
0
]
=
f
+
r
[
m
+
s
],
d
[
1
]
=
f
+
r
[
m
+
(
s
+
1
)
%
3
],
d
.
sort
(
g
),
u
=
d
.
toString
(),
void
0
===
e
[
u
]
&&
(
q
[
2
*
p
]
=
d
[
0
],
q
[
2
*
p
+
1
]
=
d
[
1
],
e
[
u
]
=!
0
,
p
++
);
d
=
new
Float32Array
(
6
*
p
);
m
=
0
;
for
(
r
=
p
;
m
<
r
;
m
++
)
for
(
s
=
0
;
2
>
s
;
s
++
)
f
=
6
*
m
+
3
*
s
,
p
=
3
*
q
[
2
*
m
+
s
],
d
[
f
+
0
]
=
k
[
p
],
d
[
f
+
1
]
=
k
[
p
+
1
],
d
[
f
+
2
]
=
k
[
p
+
2
]}
else
for
(
k
=
a
.
geometry
.
attributes
.
position
.
array
,
p
=
k
.
length
/
3
,
q
=
p
/
3
,
d
=
new
Float32Array
(
6
*
p
),
m
=
0
,
r
=
q
;
m
<
r
;
m
++
)
for
(
s
=
0
;
3
>
s
;
s
++
)
f
=
18
*
m
+
6
*
s
,
q
=
9
*
m
+
3
*
s
,
d
[
f
+
0
]
=
k
[
q
],
d
[
f
+
1
]
=
k
[
q
+
1
],
d
[
f
+
2
]
=
k
[
q
+
2
],
p
=
9
*
m
+
(
s
+
1
)
%
3
*
3
,
d
[
f
+
3
]
=
k
[
p
],
d
[
f
+
4
]
=
k
[
p
+
1
],
d
[
f
+
5
]
=
k
[
p
+
2
];
h
.
addAttribute
(
"
position
"
,
new
THREE
.
BufferAttribute
(
d
,
3
))}
THREE
.
Line
.
call
(
this
,
h
,
new
THREE
.
LineBasicMaterial
({
color
:
c
}),
THREE
.
LinePieces
);
this
.
matrix
=
a
.
matrixWorld
;
this
.
matrixAutoUpdate
=!
1
};
THREE
.
WireframeHelper
.
prototype
=
Object
.
create
(
THREE
.
Line
.
prototype
);
THREE
.
ImmediateRenderObject
=
function
(){
THREE
.
Object3D
.
call
(
this
);
this
.
render
=
function
(
a
){}};
THREE
.
ImmediateRenderObject
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
LensFlare
=
function
(
a
,
b
,
c
,
d
,
e
){
THREE
.
Object3D
.
call
(
this
);
this
.
lensFlares
=
[];
this
.
positionScreen
=
new
THREE
.
Vector3
;
this
.
customUpdateCallback
=
void
0
;
void
0
!==
a
&&
this
.
add
(
a
,
b
,
c
,
d
,
e
)};
THREE
.
LensFlare
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
LensFlare
.
prototype
.
add
=
function
(
a
,
b
,
c
,
d
,
e
,
g
){
void
0
===
b
&&
(
b
=-
1
);
void
0
===
c
&&
(
c
=
0
);
void
0
===
g
&&
(
g
=
1
);
void
0
===
e
&&
(
e
=
new
THREE
.
Color
(
16777215
));
void
0
===
d
&&
(
d
=
THREE
.
NormalBlending
);
c
=
Math
.
min
(
c
,
Math
.
max
(
0
,
c
));
this
.
lensFlares
.
push
({
texture
:
a
,
size
:
b
,
distance
:
c
,
x
:
0
,
y
:
0
,
z
:
0
,
scale
:
1
,
rotation
:
1
,
opacity
:
g
,
color
:
e
,
blending
:
d
})};
k
[
q
[
2
*
m
+
s
]],
f
=
6
*
m
+
3
*
s
,
d
[
f
+
0
]
=
p
.
x
,
d
[
f
+
1
]
=
p
.
y
,
d
[
f
+
2
]
=
p
.
z
;
h
.
addAttribute
(
"
position
"
,
new
THREE
.
BufferAttribute
(
d
,
3
))}
else
if
(
a
.
geometry
instanceof
THREE
.
BufferGeometry
){
if
(
void
0
!==
a
.
geometry
.
attributes
.
index
){
k
=
a
.
geometry
.
attributes
.
position
.
array
;
r
=
a
.
geometry
.
attributes
.
index
.
array
;
n
=
a
.
geometry
.
drawcalls
;
p
=
0
;
0
===
n
.
length
&&
(
n
=
[{
count
:
r
.
length
,
index
:
0
,
start
:
0
}]);
for
(
var
q
=
new
Uint32Array
(
2
*
r
.
length
),
t
=
0
,
w
=
n
.
length
;
t
<
w
;
++
t
)
for
(
var
s
=
n
[
t
].
start
,
u
=
n
[
t
].
count
,
f
=
n
[
t
].
index
,
m
=
s
,
y
=
s
+
u
;
m
<
y
;
m
+=
3
)
for
(
s
=
0
;
3
>
s
;
s
++
)
d
[
0
]
=
f
+
r
[
m
+
s
],
d
[
1
]
=
f
+
r
[
m
+
(
s
+
1
)
%
3
],
d
.
sort
(
g
),
u
=
d
.
toString
(),
void
0
===
e
[
u
]
&&
(
q
[
2
*
p
]
=
d
[
0
],
q
[
2
*
p
+
1
]
=
d
[
1
],
e
[
u
]
=!
0
,
p
++
);
d
=
new
Float32Array
(
6
*
p
);
m
=
0
;
for
(
r
=
p
;
m
<
r
;
m
++
)
for
(
s
=
0
;
2
>
s
;
s
++
)
f
=
6
*
m
+
3
*
s
,
p
=
3
*
q
[
2
*
m
+
s
],
d
[
f
+
0
]
=
k
[
p
],
d
[
f
+
1
]
=
k
[
p
+
1
],
d
[
f
+
2
]
=
k
[
p
+
2
]}
else
for
(
k
=
a
.
geometry
.
attributes
.
position
.
array
,
p
=
k
.
length
/
3
,
q
=
p
/
3
,
d
=
new
Float32Array
(
6
*
p
),
m
=
0
,
r
=
q
;
m
<
r
;
m
++
)
for
(
s
=
0
;
3
>
s
;
s
++
)
f
=
18
*
m
+
6
*
s
,
q
=
9
*
m
+
3
*
s
,
d
[
f
+
0
]
=
k
[
q
],
d
[
f
+
1
]
=
k
[
q
+
1
],
d
[
f
+
2
]
=
k
[
q
+
2
],
p
=
9
*
m
+
(
s
+
1
)
%
3
*
3
,
d
[
f
+
3
]
=
k
[
p
],
d
[
f
+
4
]
=
k
[
p
+
1
],
d
[
f
+
5
]
=
k
[
p
+
2
];
h
.
addAttribute
(
"
position
"
,
new
THREE
.
BufferAttribute
(
d
,
3
))}
THREE
.
Line
.
call
(
this
,
h
,
new
THREE
.
LineBasicMaterial
({
color
:
c
}),
THREE
.
LinePieces
);
this
.
matrix
=
a
.
matrixWorld
;
this
.
matrixAutoUpdate
=!
1
};
THREE
.
WireframeHelper
.
prototype
=
Object
.
create
(
THREE
.
Line
.
prototype
);
THREE
.
ImmediateRenderObject
=
function
(){
THREE
.
Object3D
.
call
(
this
);
this
.
render
=
function
(
a
){}};
THREE
.
ImmediateRenderObject
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
LensFlare
=
function
(
a
,
b
,
c
,
d
,
e
){
THREE
.
Object3D
.
call
(
this
);
this
.
lensFlares
=
[];
this
.
positionScreen
=
new
THREE
.
Vector3
;
this
.
customUpdateCallback
=
void
0
;
void
0
!==
a
&&
this
.
add
(
a
,
b
,
c
,
d
,
e
)};
THREE
.
LensFlare
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
LensFlare
.
prototype
.
add
=
function
(
a
,
b
,
c
,
d
,
e
,
g
){
void
0
===
b
&&
(
b
=-
1
);
void
0
===
c
&&
(
c
=
0
);
void
0
===
g
&&
(
g
=
1
);
void
0
===
e
&&
(
e
=
new
THREE
.
Color
(
16777215
));
void
0
===
d
&&
(
d
=
THREE
.
NormalBlending
);
c
=
Math
.
min
(
c
,
Math
.
max
(
0
,
c
));
this
.
lensFlares
.
push
({
texture
:
a
,
size
:
b
,
distance
:
c
,
x
:
0
,
y
:
0
,
z
:
0
,
scale
:
1
,
rotation
:
1
,
opacity
:
g
,
color
:
e
,
blending
:
d
})};
THREE
.
LensFlare
.
prototype
.
updateLensFlares
=
function
(){
var
a
,
b
=
this
.
lensFlares
.
length
,
c
,
d
=
2
*-
this
.
positionScreen
.
x
,
e
=
2
*-
this
.
positionScreen
.
y
;
for
(
a
=
0
;
a
<
b
;
a
++
)
c
=
this
.
lensFlares
[
a
],
c
.
x
=
this
.
positionScreen
.
x
+
d
*
c
.
distance
,
c
.
y
=
this
.
positionScreen
.
y
+
e
*
c
.
distance
,
c
.
wantedRotation
=
c
.
x
*
Math
.
PI
*
.
25
,
c
.
rotation
+=
.
25
*
(
c
.
wantedRotation
-
c
.
rotation
)};
THREE
.
MorphBlendMesh
=
function
(
a
,
b
){
THREE
.
Mesh
.
call
(
this
,
a
,
b
);
this
.
animationsMap
=
{};
this
.
animationsList
=
[];
var
c
=
this
.
geometry
.
morphTargets
.
length
;
this
.
createAnimation
(
"
__default
"
,
0
,
c
-
1
,
c
/
1
);
this
.
setAnimationWeight
(
"
__default
"
,
1
)};
THREE
.
MorphBlendMesh
.
prototype
=
Object
.
create
(
THREE
.
Mesh
.
prototype
);
THREE
.
MorphBlendMesh
.
prototype
.
createAnimation
=
function
(
a
,
b
,
c
,
d
){
b
=
{
startFrame
:
b
,
endFrame
:
c
,
length
:
c
-
b
+
1
,
fps
:
d
,
duration
:(
c
-
b
)
/
d
,
lastFrame
:
0
,
currentFrame
:
0
,
active
:
!
1
,
time
:
0
,
direction
:
1
,
weight
:
1
,
directionBackwards
:
!
1
,
mirroredLoop
:
!
1
};
this
.
animationsMap
[
a
]
=
b
;
this
.
animationsList
.
push
(
b
)};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录