Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
5138b8ad
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,发现更多精彩内容 >>
提交
5138b8ad
编写于
8月 21, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
d306becf
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
12 deletion
+13
-12
build/three.js
build/three.js
+10
-9
build/three.min.js
build/three.min.js
+3
-3
未找到文件。
build/three.js
浏览文件 @
5138b8ad
...
...
@@ -20744,9 +20744,9 @@ THREE.WebGLRenderer = function ( parameters ) {
return a.object.renderOrder - b.object.renderOrder;
} else if ( a.
object.material.id !== b.object
.material.id ) {
} else if ( a.
material.id !== b
.material.id ) {
return a.
object.material.id - b.object
.material.id;
return a.
material.id - b
.material.id;
} else if ( a.z !== b.z ) {
...
...
@@ -20945,6 +20945,13 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( material.visible === true ) {
if ( _this.sortObjects === true ) {
_vector3.setFromMatrixPosition( object.matrixWorld );
_vector3.applyProjection( _projScreenMatrix );
}
if ( material instanceof THREE.MeshFaceMaterial ) {
var materials = material.materials;
...
...
@@ -20961,16 +20968,10 @@ THREE.WebGLRenderer = function ( parameters ) {
}
if ( _this.sortObjects === true ) {
_vector3.setFromMatrixPosition( object.matrixWorld );
_vector3.applyProjection( _projScreenMatrix );
}
var renderItem = {
id: object.id,
object: object,
material: object.material,
z: _vector3.z
};
...
...
build/three.min.js
浏览文件 @
5138b8ad
...
...
@@ -490,9 +490,9 @@ THREE.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:["uniform sa
THREE
.
ShaderChunk
.
logdepthbuf_fragment
,
"
\t
#ifdef USE_LOGDEPTHBUF_EXT
\n\t\t
gl_FragData[ 0 ] = pack_depth( gl_FragDepthEXT );
\n\t
#else
\n\t\t
gl_FragData[ 0 ] = pack_depth( gl_FragCoord.z );
\n\t
#endif
\n
}
"
].
join
(
"
\n
"
)}};
THREE
.
WebGLRenderer
=
function
(
a
){
function
b
(
a
,
b
,
c
,
d
){
!
0
===
R
&&
(
a
*=
d
,
b
*=
d
,
c
*=
d
);
t
.
clearColor
(
a
,
b
,
c
,
d
)}
function
c
(){
L
.
init
();
t
.
viewport
(
Fa
,
Ga
,
Aa
,
va
);
b
(
$
.
r
,
$
.
g
,
$
.
b
,
ea
)}
function
d
(){
Xa
=
mb
=
null
;
Ha
=
""
;
Ya
=-
1
;
fb
=!
0
;
L
.
reset
()}
function
e
(
a
){
a
.
preventDefault
();
d
();
c
();
Z
.
clear
()}
function
g
(
a
){
a
=
a
.
target
;
a
.
removeEventListener
(
"
dispose
"
,
g
);
a
:{
var
b
=
Z
.
get
(
a
);
if
(
a
.
image
&&
b
.
__image__webglTextureCube
)
t
.
deleteTexture
(
b
.
__image__webglTextureCube
);
else
{
if
(
void
0
===
b
.
__webglInit
)
break
a
;
t
.
deleteTexture
(
b
.
__webglTexture
)}
Z
.
delete
(
a
)}
Ba
.
textures
--
}
function
f
(
a
){
a
=
a
.
target
;
a
.
removeEventListener
(
"
dispose
"
,
f
);
var
b
=
Z
.
get
(
a
);
if
(
a
&&
void
0
!==
b
.
__webglTexture
){
t
.
deleteTexture
(
b
.
__webglTexture
);
if
(
a
instanceof
THREE
.
WebGLRenderTargetCube
)
for
(
var
c
=
0
;
6
>
c
;
c
++
)
t
.
deleteFramebuffer
(
b
.
__webglFramebuffer
[
c
]),
t
.
deleteRenderbuffer
(
b
.
__webglRenderbuffer
[
c
]);
else
t
.
deleteFramebuffer
(
b
.
__webglFramebuffer
),
t
.
deleteRenderbuffer
(
b
.
__webglRenderbuffer
);
Z
.
delete
(
a
)}
Ba
.
textures
--
}
function
h
(
a
){
a
=
a
.
target
;
a
.
removeEventListener
(
"
dispose
"
,
h
);
k
(
a
);
Z
.
delete
(
a
)}
function
k
(
a
){
var
b
=
Z
.
get
(
a
).
program
.
program
;
if
(
void
0
!==
b
){
a
.
program
=
void
0
;
a
=
0
;
for
(
var
c
=
ta
.
length
;
a
!==
c
;
++
a
){
var
d
=
ta
[
a
];
if
(
d
.
program
===
b
){
0
===--
d
.
usedTimes
&&
(
c
-=
1
,
ta
[
a
]
=
ta
[
c
],
ta
.
pop
(),
t
.
deleteProgram
(
b
),
Ba
.
programs
=
c
);
break
}}}}
function
m
(
a
,
b
){
return
b
[
0
]
-
a
[
0
]}
function
n
(
a
,
b
){
return
a
.
object
.
renderOrder
!==
b
.
object
.
renderOrder
?
a
.
object
.
renderOrder
-
b
.
object
.
renderOrder
:
a
.
object
.
material
.
id
!==
b
.
object
.
material
.
id
?
a
.
object
.
material
.
id
-
b
.
object
.
material
.
id
:
a
.
z
!==
b
.
z
?
a
.
z
-
b
.
z
:
a
.
id
-
b
.
id
}
function
p
(
a
,
b
){
return
a
.
object
.
renderOrder
!==
b
.
object
.
renderOrder
?
a
.
object
.
renderOrder
-
b
.
object
.
renderOrder
:
a
.
z
!==
b
.
z
?
b
.
z
-
a
.
z
:
a
.
id
-
b
.
id
}
function
l
(
a
){
if
(
!
1
!==
a
.
visible
){
if
(
a
instanceof
THREE
.
Light
)
aa
.
push
(
a
);
else
if
(
a
instanceof
THREE
.
Sprite
)
Ra
.
push
(
a
);
else
if
(
a
instanceof
THREE
.
LensFlare
)
Ia
.
push
(
a
);
else
if
(
a
instanceof
THREE
.
ImmediateRenderObject
){
var
b
=
a
.
material
;
b
.
transparent
?
za
.
push
(
a
):
la
.
push
(
a
)}
else
if
(
a
instanceof
THREE
.
Mesh
||
a
instanceof
THREE
.
Line
||
a
instanceof
THREE
.
PointCloud
)
if
(
a
instanceof
THREE
.
SkinnedMesh
&&
a
.
skeleton
.
update
(),
!
1
===
a
.
frustumCulled
||!
0
===
Za
.
intersectsObject
(
a
))
if
(
b
=
a
.
material
,
!
0
===
b
.
visible
){
if
(
b
instanceof
THREE
.
MeshFaceMaterial
)
for
(
var
c
=
b
.
materials
,
d
=
0
,
e
=
c
.
length
;
d
<
e
;
d
++
)
c
[
d
].
program
=
Z
.
get
(
c
[
d
]).
program
;
else
b
.
program
=
Z
.
get
(
b
).
program
;
!
0
===
ja
.
sortObjects
&&
(
ka
.
setFromMatrixPosition
(
a
.
matrixWorld
),
ka
.
applyProjection
(
Ja
));
d
=
{
id
:
a
.
id
,
object
:
a
,
z
:
ka
.
z
};
b
.
transparent
?
sa
.
push
(
d
):
oa
.
push
(
d
)}
a
=
a
.
children
;
d
=
0
;
for
(
e
=
a
.
length
;
d
<
e
;
d
++
)
l
(
a
[
d
])}}
function
q
(
a
,
b
,
c
,
d
,
e
){
for
(
var
f
=
e
,
g
=
0
,
h
=
a
.
length
;
g
<
h
;
g
++
){
var
k
=
a
[
g
].
object
,
Z
.
get
(
a
).
program
.
program
;
if
(
void
0
!==
b
){
a
.
program
=
void
0
;
a
=
0
;
for
(
var
c
=
ta
.
length
;
a
!==
c
;
++
a
){
var
d
=
ta
[
a
];
if
(
d
.
program
===
b
){
0
===--
d
.
usedTimes
&&
(
c
-=
1
,
ta
[
a
]
=
ta
[
c
],
ta
.
pop
(),
t
.
deleteProgram
(
b
),
Ba
.
programs
=
c
);
break
}}}}
function
m
(
a
,
b
){
return
b
[
0
]
-
a
[
0
]}
function
n
(
a
,
b
){
return
a
.
object
.
renderOrder
!==
b
.
object
.
renderOrder
?
a
.
object
.
renderOrder
-
b
.
object
.
renderOrder
:
a
.
material
.
id
!==
b
.
material
.
id
?
a
.
material
.
id
-
b
.
material
.
id
:
a
.
z
!==
b
.
z
?
a
.
z
-
b
.
z
:
a
.
id
-
b
.
id
}
function
p
(
a
,
b
){
return
a
.
object
.
renderOrder
!==
b
.
object
.
renderOrder
?
a
.
object
.
renderOrder
-
b
.
object
.
renderOrder
:
a
.
z
!==
b
.
z
?
b
.
z
-
a
.
z
:
a
.
id
-
b
.
id
}
function
l
(
a
){
if
(
!
1
!==
a
.
visible
){
if
(
a
instanceof
THREE
.
Light
)
aa
.
push
(
a
);
else
if
(
a
instanceof
THREE
.
Sprite
)
Ra
.
push
(
a
);
else
if
(
a
instanceof
THREE
.
LensFlare
)
Ia
.
push
(
a
);
else
if
(
a
instanceof
THREE
.
ImmediateRenderObject
){
var
b
=
a
.
material
;
b
.
transparent
?
za
.
push
(
a
):
la
.
push
(
a
)}
else
if
(
a
instanceof
THREE
.
Mesh
||
a
instanceof
THREE
.
Line
||
a
instanceof
THREE
.
PointCloud
)
if
(
a
instanceof
THREE
.
SkinnedMesh
&&
a
.
skeleton
.
update
(),
!
1
===
a
.
frustumCulled
||
!
0
===
Za
.
intersectsObject
(
a
))
if
(
b
=
a
.
material
,
!
0
===
b
.
visible
){
!
0
===
ja
.
sortObjects
&&
(
ka
.
setFromMatrixPosition
(
a
.
matrixWorld
),
ka
.
applyProjection
(
Ja
));
if
(
b
instanceof
THREE
.
MeshFaceMaterial
)
for
(
var
c
=
b
.
materials
,
d
=
0
,
e
=
c
.
length
;
d
<
e
;
d
++
)
c
[
d
].
program
=
Z
.
get
(
c
[
d
]).
program
;
else
b
.
program
=
Z
.
get
(
b
).
program
;
d
=
{
id
:
a
.
id
,
object
:
a
,
material
:
a
.
material
,
z
:
ka
.
z
};
b
.
transparent
?
sa
.
push
(
d
):
oa
.
push
(
d
)}
a
=
a
.
children
;
d
=
0
;
for
(
e
=
a
.
length
;
d
<
e
;
d
++
)
l
(
a
[
d
])}}
function
q
(
a
,
b
,
c
,
d
,
e
){
for
(
var
f
=
e
,
g
=
0
,
h
=
a
.
length
;
g
<
h
;
g
++
){
var
k
=
a
[
g
].
object
,
l
=
wa
.
update
(
k
);
k
.
modelViewMatrix
.
multiplyMatrices
(
b
.
matrixWorldInverse
,
k
.
matrixWorld
);
k
.
normalMatrix
.
getNormalMatrix
(
k
.
modelViewMatrix
);
void
0
===
e
&&
(
f
=
k
.
material
);
if
(
f
instanceof
THREE
.
MeshFaceMaterial
)
for
(
var
m
=
l
.
groups
,
n
=
f
.
materials
,
p
=
0
,
q
=
m
.
length
;
p
<
q
;
p
++
){
var
s
=
m
[
p
],
t
=
n
[
s
.
materialIndex
];
void
0
!==
t
&&
ja
.
renderBufferDirect
(
b
,
c
,
d
,
l
,
t
,
k
,
s
)}
else
ja
.
renderBufferDirect
(
b
,
c
,
d
,
l
,
f
,
k
)}}
function
s
(
a
,
b
,
c
,
d
,
e
){
for
(
var
f
=
e
,
g
=
0
,
h
=
a
.
length
;
g
<
h
;
g
++
){
var
k
=
a
[
g
];
k
.
modelViewMatrix
.
multiplyMatrices
(
b
.
matrixWorldInverse
,
k
.
matrixWorld
);
k
.
normalMatrix
.
getNormalMatrix
(
k
.
modelViewMatrix
);
void
0
===
e
&&
(
f
=
k
.
material
);
r
(
f
);
var
l
=
u
(
b
,
c
,
d
,
f
,
k
);
Ha
=
""
;
k
.
render
(
function
(
a
){
ja
.
renderBufferImmediate
(
a
,
l
,
f
)})}}
function
r
(
a
){
a
.
side
!==
THREE
.
DoubleSide
?
L
.
enable
(
t
.
CULL_FACE
):
L
.
disable
(
t
.
CULL_FACE
);
L
.
setFlipSided
(
a
.
side
===
THREE
.
BackSide
);
!
0
===
a
.
transparent
?
L
.
setBlending
(
a
.
blending
,
a
.
blendEquation
,
a
.
blendSrc
,
a
.
blendDst
,
a
.
blendEquationAlpha
,
a
.
blendSrcAlpha
,
a
.
blendDstAlpha
):
L
.
setBlending
(
THREE
.
NoBlending
);
L
.
setDepthFunc
(
a
.
depthFunc
);
L
.
setDepthTest
(
a
.
depthTest
);
L
.
setDepthWrite
(
a
.
depthWrite
);
L
.
setColorWrite
(
a
.
colorWrite
);
L
.
setPolygonOffset
(
a
.
polygonOffset
,
a
.
polygonOffsetFactor
,
a
.
polygonOffsetUnits
)}
function
u
(
a
,
b
,
c
,
d
,
e
){
var
f
,
l
,
m
,
n
;
gb
=
0
;
var
p
=
Z
.
get
(
d
);
if
(
d
.
needsUpdate
||!
p
.
program
){
a
:{
for
(
var
q
=
Z
.
get
(
d
),
s
=
ac
[
d
.
type
],
r
=
0
,
u
=
0
,
y
=
0
,
z
=
0
,
B
=
0
,
E
=
b
.
length
;
B
<
E
;
B
++
){
var
D
=
b
[
B
];
D
.
onlyShadow
||!
1
===
D
.
visible
||
(
D
instanceof
THREE
.
DirectionalLight
&&
r
++
,
D
instanceof
THREE
.
PointLight
&&
u
++
,
D
instanceof
THREE
.
SpotLight
&&
y
++
,
D
instanceof
THREE
.
HemisphereLight
&&
z
++
)}
f
=
r
;
l
=
u
;
m
=
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录