Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
b0658ec4
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,发现更多精彩内容 >>
提交
b0658ec4
编写于
2月 22, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
e18617ac
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
5 deletion
+7
-5
build/three.js
build/three.js
+3
-1
build/three.min.js
build/three.min.js
+4
-4
未找到文件。
build/three.js
浏览文件 @
b0658ec4
...
...
@@ -13956,7 +13956,6 @@ THREE.CanvasRenderer = function ( parameters ) {
setLineCap( material.linecap );
setLineJoin( material.linejoin );
setStrokeStyle( material.color.getStyle() );
setDashAndGap( null, null );
_context.stroke();
_elemBox.expandByScalar( material.linewidth * 2 );
...
...
@@ -13970,8 +13969,11 @@ THREE.CanvasRenderer = function ( parameters ) {
setDashAndGap( material.dashSize, material.gapSize );
_context.stroke();
_elemBox.expandByScalar( material.linewidth * 2 );
setDashAndGap( null, null );
}
}
...
...
build/three.min.js
浏览文件 @
b0658ec4
...
...
@@ -284,10 +284,10 @@ t.transform(n,La,c,d,a,g),t.fill(),t.restore())}}function G(a,b,c,d,e,f,g,j,h,i,
this
.
sortElements
);
n
=
m
.
elements
;
s
=
m
.
lights
;
rb
.
setRGB
(
0
,
0
,
0
);
wc
.
setRGB
(
0
,
0
,
0
);
Ra
.
setRGB
(
0
,
0
,
0
);
for
(
var
J
=
0
,
W
=
s
.
length
;
J
<
W
;
J
++
){
var
Q
=
s
[
J
],
X
=
Q
.
color
;
Q
instanceof
THREE
.
AmbientLight
?
rb
.
add
(
X
):
Q
instanceof
THREE
.
DirectionalLight
?
wc
.
add
(
X
):
Q
instanceof
THREE
.
PointLight
&&
Ra
.
add
(
X
)}
J
=
0
;
for
(
W
=
n
.
length
;
J
<
W
;
J
++
){
var
H
=
n
[
J
],
Q
=
H
.
material
;
if
(
!
(
void
0
===
Q
||!
1
===
Q
.
visible
)){
Ba
.
makeEmpty
();
if
(
H
instanceof
THREE
.
RenderableParticle
){
K
=
H
;
K
.
x
*=
v
;
K
.
y
*=
z
;
var
X
=
K
,
Ta
=
H
;
b
(
Q
.
opacity
);
c
(
Q
.
blending
);
var
La
=
void
0
,
Bb
=
void
0
,
hb
=
void
0
,
Cb
=
void
0
,
ld
=
H
=
void
0
,
md
=
void
0
;
Q
instanceof
THREE
.
ParticleBasicMaterial
?
null
===
Q
.
map
?(
hb
=
Ta
.
object
.
scale
.
x
,
Cb
=
Ta
.
object
.
scale
.
y
,
hb
*=
Ta
.
scale
.
x
*
v
,
Cb
*=
Ta
.
scale
.
y
*
z
,
Ba
.
min
.
set
(
X
.
x
-
hb
,
X
.
y
-
Cb
),
Ba
.
max
.
set
(
X
.
x
+
hb
,
X
.
y
+
Cb
),
!
1
!==
qb
.
isIntersectionBox
(
Ba
)
&&
(
h
(
Q
.
color
.
getStyle
()),
t
.
save
(),
t
.
translate
(
X
.
x
,
X
.
y
),
t
.
rotate
(
-
Ta
.
rotation
),
t
.
scale
(
hb
,
Cb
),
t
.
fillRect
(
-
1
,
-
1
,
2
,
2
),
t
.
restore
())):(
H
=
Q
.
map
.
image
,
ld
=
H
.
width
>>
1
,
md
=
H
.
height
>>
1
,
hb
=
Ta
.
scale
.
x
*
v
,
Cb
=
Ta
.
scale
.
y
*
z
,
La
=
hb
*
ld
,
Bb
=
Cb
*
md
,
Ba
.
min
.
set
(
X
.
x
-
La
,
X
.
y
-
Bb
),
Ba
.
max
.
set
(
X
.
x
+
La
,
X
.
y
+
Bb
),
!
1
!==
qb
.
isIntersectionBox
(
Ba
)
&&
(
t
.
save
(),
t
.
translate
(
X
.
x
,
X
.
y
),
t
.
rotate
(
-
Ta
.
rotation
),
t
.
scale
(
hb
,
-
Cb
),
t
.
translate
(
-
ld
,
-
md
),
t
.
drawImage
(
H
,
0
,
0
),
t
.
restore
())):
Q
instanceof
THREE
.
ParticleCanvasMaterial
&&
(
La
=
Ta
.
scale
.
x
*
v
,
Bb
=
Ta
.
scale
.
y
*
z
,
Ba
.
min
.
set
(
X
.
x
-
La
,
X
.
y
-
Bb
),
Ba
.
max
.
set
(
X
.
x
+
La
,
X
.
y
+
Bb
),
!
1
!==
qb
.
isIntersectionBox
(
Ba
)
&&
(
g
(
Q
.
color
.
getStyle
()),
h
(
Q
.
color
.
getStyle
()),
t
.
save
(),
t
.
translate
(
X
.
x
,
X
.
y
),
t
.
rotate
(
-
Ta
.
rotation
),
t
.
scale
(
La
,
Bb
),
Q
.
program
(
t
),
t
.
restore
()))}
else
if
(
H
instanceof
THREE
.
RenderableLine
)
K
=
H
.
v1
,
L
=
H
.
v2
,
K
.
positionScreen
.
x
*=
v
,
K
.
positionScreen
.
y
*=
z
,
L
.
positionScreen
.
x
*=
v
,
L
.
positionScreen
.
y
*=
z
,
Ba
.
setFromPoints
([
K
.
positionScreen
,
L
.
positionScreen
]),
!
0
===
qb
.
isIntersectionBox
(
Ba
)
&&
(
X
=
K
,
Ta
=
L
,
b
(
Q
.
opacity
),
c
(
Q
.
blending
),
t
.
beginPath
(),
t
.
moveTo
(
X
.
positionScreen
.
x
,
X
.
positionScreen
.
y
),
t
.
lineTo
(
Ta
.
positionScreen
.
x
,
Ta
.
positionScreen
.
y
),
Q
instanceof
THREE
.
LineBasicMaterial
?(
d
(
Q
.
linewidth
),
e
(
Q
.
linecap
),
f
(
Q
.
linejoin
),
g
(
Q
.
color
.
getStyle
()),
i
(
null
,
null
),
t
.
stroke
(),
Ba
.
expandByScalar
(
2
*
Q
.
linewidth
)):
Q
instanceof
THREE
.
LineDashedMaterial
&&
(
d
(
Q
.
linewidth
),
e
(
Q
.
linecap
),
f
(
Q
.
linejoin
),
g
(
Q
.
color
.
getStyle
()),
i
(
Q
.
dashSize
,
Q
.
gapSize
),
t
.
stroke
(),
Ba
.
expandByScalar
(
2
*
Q
.
linewidth
)));
else
if
(
H
instanceof
THREE
.
RenderableFace3
){
K
=
H
.
v1
;
L
=
H
.
v2
;
U
=
H
.
v3
;
if
(
-
1
>
K
.
positionScreen
.
z
||
1
<
K
.
positionScreen
.
z
)
continue
;
if
(
-
1
>
L
.
positionScreen
.
z
||
1
<
L
.
positionScreen
.
z
)
continue
;
if
(
-
1
>
U
.
positionScreen
.
z
||
1
<
U
.
positionScreen
.
z
)
continue
;
K
.
positionScreen
.
x
*=
v
;
K
.
positionScreen
.
y
*=
z
;
L
.
positionScreen
.
x
*=
v
;
L
.
positionScreen
.
y
*=
z
;
U
.
positionScreen
.
x
*=
v
;
U
.
positionScreen
.
y
*=
z
;
!
0
===
Q
.
overdraw
&&
(
I
(
K
.
positionScreen
,
L
.
positionScreen
),
I
(
L
.
positionScreen
,
U
.
positionScreen
),
I
(
U
.
positionScreen
,
K
.
positionScreen
));
Ba
.
setFromPoints
([
K
.
positionScreen
,
L
.
positionScreen
,
U
.
positionScreen
]);
x
(
K
,
L
,
U
,
0
,
1
,
2
,
H
,
Q
)}
else
if
(
H
instanceof
THREE
.
RenderableFace4
){
K
=
H
.
v1
;
L
=
H
.
v2
;
U
=
H
.
v3
;
da
=
H
.
v4
;
if
(
-
1
>
K
.
positionScreen
.
z
||
1
<
K
.
positionScreen
.
z
)
continue
;
if
(
-
1
>
L
.
positionScreen
.
z
||
1
<
L
.
positionScreen
.
z
)
continue
;
if
(
-
1
>
U
.
positionScreen
.
z
||
1
<
U
.
positionScreen
.
z
)
continue
;
if
(
-
1
>
da
.
positionScreen
.
z
||
1
<
da
.
positionScreen
.
z
)
continue
;
K
.
positionScreen
.
x
*=
v
;
K
.
positionScreen
.
y
*=
z
;
L
.
positionScreen
.
x
*=
v
;
L
.
positionScreen
.
y
*=
z
;
U
.
positionScreen
.
x
*=
v
;
U
.
positionScreen
.
y
*=
z
;
da
.
positionScreen
.
x
*=
v
;
da
.
positionScreen
.
y
*=
z
;
Fa
.
positionScreen
.
copy
(
L
.
positionScreen
);
Pa
.
positionScreen
.
copy
(
da
.
positionScreen
);
!
0
===
Q
.
overdraw
&&
(
I
(
K
.
positionScreen
,
L
.
positionScreen
),
I
(
L
.
positionScreen
,
da
.
positionScreen
),
I
(
da
.
positionScreen
,
K
.
positionScreen
),
I
(
U
.
positionScreen
,
Fa
.
positionScreen
),
I
(
U
.
positionScreen
,
Pa
.
positionScreen
));
Ba
.
setFromPoints
([
K
.
positionScreen
,
H
.
v1
,
L
=
H
.
v2
,
K
.
positionScreen
.
x
*=
v
,
K
.
positionScreen
.
y
*=
z
,
L
.
positionScreen
.
x
*=
v
,
L
.
positionScreen
.
y
*=
z
,
Ba
.
setFromPoints
([
K
.
positionScreen
,
L
.
positionScreen
]),
!
0
===
qb
.
isIntersectionBox
(
Ba
)
&&
(
X
=
K
,
Ta
=
L
,
b
(
Q
.
opacity
),
c
(
Q
.
blending
),
t
.
beginPath
(),
t
.
moveTo
(
X
.
positionScreen
.
x
,
X
.
positionScreen
.
y
),
t
.
lineTo
(
Ta
.
positionScreen
.
x
,
Ta
.
positionScreen
.
y
),
Q
instanceof
THREE
.
LineBasicMaterial
?(
d
(
Q
.
linewidth
),
e
(
Q
.
linecap
),
f
(
Q
.
linejoin
),
g
(
Q
.
color
.
getStyle
()),
t
.
stroke
(),
Ba
.
expandByScalar
(
2
*
Q
.
linewidth
)):
Q
instanceof
THREE
.
LineDashedMaterial
&&
(
d
(
Q
.
linewidth
),
e
(
Q
.
linecap
),
f
(
Q
.
linejoin
),
g
(
Q
.
color
.
getStyle
()),
i
(
Q
.
dashSize
,
Q
.
gapSize
),
t
.
stroke
(),
Ba
.
expandByScalar
(
2
*
Q
.
linewidth
),
i
(
null
,
null
)));
else
if
(
H
instanceof
THREE
.
RenderableFace3
){
K
=
H
.
v1
;
L
=
H
.
v2
;
U
=
H
.
v3
;
if
(
-
1
>
K
.
positionScreen
.
z
||
1
<
K
.
positionScreen
.
z
)
continue
;
if
(
-
1
>
L
.
positionScreen
.
z
||
1
<
L
.
positionScreen
.
z
)
continue
;
if
(
-
1
>
U
.
positionScreen
.
z
||
1
<
U
.
positionScreen
.
z
)
continue
;
K
.
positionScreen
.
x
*=
v
;
K
.
positionScreen
.
y
*=
z
;
L
.
positionScreen
.
x
*=
v
;
L
.
positionScreen
.
y
*=
z
;
U
.
positionScreen
.
x
*=
v
;
U
.
positionScreen
.
y
*=
z
;
!
0
===
Q
.
overdraw
&&
(
I
(
K
.
positionScreen
,
L
.
positionScreen
),
I
(
L
.
positionScreen
,
U
.
positionScreen
),
I
(
U
.
positionScreen
,
K
.
positionScreen
));
Ba
.
setFromPoints
([
K
.
positionScreen
,
L
.
positionScreen
,
U
.
positionScreen
]);
x
(
K
,
L
,
U
,
0
,
1
,
2
,
H
,
Q
)}
else
if
(
H
instanceof
THREE
.
RenderableFace4
){
K
=
H
.
v1
;
L
=
H
.
v2
;
U
=
H
.
v3
;
da
=
H
.
v4
;
if
(
-
1
>
K
.
positionScreen
.
z
||
1
<
K
.
positionScreen
.
z
)
continue
;
if
(
-
1
>
L
.
positionScreen
.
z
||
1
<
L
.
positionScreen
.
z
)
continue
;
if
(
-
1
>
U
.
positionScreen
.
z
||
1
<
U
.
positionScreen
.
z
)
continue
;
if
(
-
1
>
da
.
positionScreen
.
z
||
1
<
da
.
positionScreen
.
z
)
continue
;
K
.
positionScreen
.
x
*=
v
;
K
.
positionScreen
.
y
*=
z
;
L
.
positionScreen
.
x
*=
v
;
L
.
positionScreen
.
y
*=
z
;
U
.
positionScreen
.
x
*=
v
;
U
.
positionScreen
.
y
*=
z
;
da
.
positionScreen
.
x
*=
v
;
da
.
positionScreen
.
y
*=
z
;
Fa
.
positionScreen
.
copy
(
L
.
positionScreen
);
Pa
.
positionScreen
.
copy
(
da
.
positionScreen
);
!
0
===
Q
.
overdraw
&&
(
I
(
K
.
positionScreen
,
L
.
positionScreen
),
I
(
L
.
positionScreen
,
da
.
positionScreen
),
I
(
da
.
positionScreen
,
K
.
positionScreen
),
I
(
U
.
positionScreen
,
Fa
.
positionScreen
),
I
(
U
.
positionScreen
,
Pa
.
positionScreen
));
Ba
.
setFromPoints
([
K
.
positionScreen
,
L
.
positionScreen
,
U
.
positionScreen
,
da
.
positionScreen
]);
X
=
K
;
Ta
=
L
;
La
=
U
;
Bb
=
da
;
hb
=
Fa
;
Cb
=
Pa
;
l
.
info
.
render
.
vertices
+=
4
;
l
.
info
.
render
.
faces
++
;
b
(
Q
.
opacity
);
c
(
Q
.
blending
);
void
0
!==
Q
.
map
&&
null
!==
Q
.
map
||
void
0
!==
Q
.
envMap
&&
null
!==
Q
.
envMap
?(
x
(
X
,
Ta
,
Bb
,
0
,
1
,
3
,
H
,
Q
),
x
(
hb
,
La
,
Cb
,
1
,
2
,
3
,
H
,
Q
)):(
M
=
X
.
positionScreen
.
x
,
ea
=
X
.
positionScreen
.
y
,
wa
=
Ta
.
positionScreen
.
x
,
ia
=
Ta
.
positionScreen
.
y
,
sa
=
La
.
positionScreen
.
x
,
N
=
La
.
positionScreen
.
y
,
Na
=
Bb
.
positionScreen
.
x
,
pb
=
Bb
.
positionScreen
.
y
,
ab
=
hb
.
positionScreen
.
x
,
Oa
=
hb
.
positionScreen
.
y
,
Ea
=
Cb
.
positionScreen
.
x
,
ma
=
Cb
.
positionScreen
.
y
,
Q
instanceof
THREE
.
MeshLambertMaterial
||
Q
instanceof
THREE
.
MeshPhongMaterial
?(
Z
.
copy
(
Q
.
color
),
qa
.
copy
(
Q
.
emissive
),
Q
.
vertexColors
===
THREE
.
FaceColors
&&
Z
.
multiply
(
H
.
color
),
!
1
===
Q
.
wireframe
&&
Q
.
shading
==
THREE
.
SmoothShading
&&
4
==
H
.
vertexNormalsLength
?(
pa
.
copy
(
rb
),
Y
.
copy
(
rb
),
ba
.
copy
(
rb
),
ja
.
copy
(
rb
),
q
(
H
.
v1
.
positionWorld
,
H
.
vertexNormalsModel
[
0
],
pa
),
q
(
H
.
v2
.
positionWorld
,
H
.
vertexNormalsModel
[
1
],
Y
),
q
(
H
.
v4
.
positionWorld
,
H
.
vertexNormalsModel
[
3
],
ba
),
q
(
H
.
v3
.
positionWorld
,
H
.
vertexNormalsModel
[
2
],
ja
),
pa
.
multiply
(
Z
).
add
(
qa
),
Y
.
multiply
(
Z
).
add
(
qa
),
ba
.
multiply
(
Z
).
add
(
qa
),
ja
.
multiply
(
Z
).
add
(
qa
),
Wa
=
E
(
pa
,
Y
,
ba
,
ja
),
y
(
M
,
ea
,
wa
,
ia
,
Na
,
pb
),
G
(
M
,
ea
,
wa
,
ia
,
Na
,
pb
,
0
,
0
,
1
,
0
,
0
,
1
,
Wa
),
y
(
ab
,
Oa
,
sa
,
N
,
Ea
,
ma
),
G
(
ab
,
Oa
,
sa
,
N
,
Ea
,
ma
,
1
,
0
,
1
,
1
,
0
,
1
,
Wa
)):(
ga
.
copy
(
rb
),
q
(
H
.
centroidModel
,
H
.
normalModel
,
ga
),
ga
.
multiply
(
Z
).
add
(
qa
),
C
(
M
,
ea
,
wa
,
ia
,
sa
,
N
,
Na
,
pb
),
!
0
===
Q
.
wireframe
?
B
(
ga
,
Q
.
wireframeLinewidth
,
Q
.
wireframeLinecap
,
Q
.
wireframeLinejoin
):
A
(
ga
))):
Q
instanceof
THREE
.
MeshBasicMaterial
?(
ga
.
copy
(
Q
.
color
),
Q
.
vertexColors
===
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录