Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
f24745dd
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,发现更多精彩内容 >>
提交
f24745dd
编写于
1月 19, 2012
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Trying WebGLRenderer alpha false by default.
上级
99ecfea4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
3 addition
and
3 deletion
+3
-3
build/Three.js
build/Three.js
+1
-1
build/custom/ThreeWebGL.js
build/custom/ThreeWebGL.js
+1
-1
src/renderers/WebGLRenderer.js
src/renderers/WebGLRenderer.js
+1
-1
未找到文件。
build/Three.js
浏览文件 @
f24745dd
...
@@ -259,7 +259,7 @@ j.texParameteri(a,j.TEXTURE_MIN_FILTER,B(b.minFilter))):(j.texParameteri(a,j.TEX
...
@@ -259,7 +259,7 @@ j.texParameteri(a,j.TEXTURE_MIN_FILTER,B(b.minFilter))):(j.texParameteri(a,j.TEX
a
)):
b
.
depthBuffer
&&
b
.
stencilBuffer
?(
j
.
renderbufferStorage
(
j
.
RENDERBUFFER
,
j
.
DEPTH_STENCIL
,
b
.
width
,
b
.
height
),
j
.
framebufferRenderbuffer
(
j
.
FRAMEBUFFER
,
j
.
DEPTH_STENCIL_ATTACHMENT
,
j
.
RENDERBUFFER
,
a
)):
j
.
renderbufferStorage
(
j
.
RENDERBUFFER
,
j
.
RGBA4
,
b
.
width
,
b
.
height
)}
function
v
(
a
){
switch
(
a
){
case
THREE
.
NearestFilter
:
case
THREE
.
NearestMipMapNearestFilter
:
case
THREE
.
NearestMipMapLinearFilter
:
return
j
.
NEAREST
;
default
:
return
j
.
LINEAR
}}
function
B
(
a
){
switch
(
a
){
case
THREE
.
RepeatWrapping
:
return
j
.
REPEAT
;
case
THREE
.
ClampToEdgeWrapping
:
return
j
.
CLAMP_TO_EDGE
;
a
)):
b
.
depthBuffer
&&
b
.
stencilBuffer
?(
j
.
renderbufferStorage
(
j
.
RENDERBUFFER
,
j
.
DEPTH_STENCIL
,
b
.
width
,
b
.
height
),
j
.
framebufferRenderbuffer
(
j
.
FRAMEBUFFER
,
j
.
DEPTH_STENCIL_ATTACHMENT
,
j
.
RENDERBUFFER
,
a
)):
j
.
renderbufferStorage
(
j
.
RENDERBUFFER
,
j
.
RGBA4
,
b
.
width
,
b
.
height
)}
function
v
(
a
){
switch
(
a
){
case
THREE
.
NearestFilter
:
case
THREE
.
NearestMipMapNearestFilter
:
case
THREE
.
NearestMipMapLinearFilter
:
return
j
.
NEAREST
;
default
:
return
j
.
LINEAR
}}
function
B
(
a
){
switch
(
a
){
case
THREE
.
RepeatWrapping
:
return
j
.
REPEAT
;
case
THREE
.
ClampToEdgeWrapping
:
return
j
.
CLAMP_TO_EDGE
;
case
THREE
.
MirroredRepeatWrapping
:
return
j
.
MIRRORED_REPEAT
;
case
THREE
.
NearestFilter
:
return
j
.
NEAREST
;
case
THREE
.
NearestMipMapNearestFilter
:
return
j
.
NEAREST_MIPMAP_NEAREST
;
case
THREE
.
NearestMipMapLinearFilter
:
return
j
.
NEAREST_MIPMAP_LINEAR
;
case
THREE
.
LinearFilter
:
return
j
.
LINEAR
;
case
THREE
.
LinearMipMapNearestFilter
:
return
j
.
LINEAR_MIPMAP_NEAREST
;
case
THREE
.
LinearMipMapLinearFilter
:
return
j
.
LINEAR_MIPMAP_LINEAR
;
case
THREE
.
ByteType
:
return
j
.
BYTE
;
case
THREE
.
UnsignedByteType
:
return
j
.
UNSIGNED_BYTE
;
case
THREE
.
ShortType
:
return
j
.
SHORT
;
case
THREE
.
MirroredRepeatWrapping
:
return
j
.
MIRRORED_REPEAT
;
case
THREE
.
NearestFilter
:
return
j
.
NEAREST
;
case
THREE
.
NearestMipMapNearestFilter
:
return
j
.
NEAREST_MIPMAP_NEAREST
;
case
THREE
.
NearestMipMapLinearFilter
:
return
j
.
NEAREST_MIPMAP_LINEAR
;
case
THREE
.
LinearFilter
:
return
j
.
LINEAR
;
case
THREE
.
LinearMipMapNearestFilter
:
return
j
.
LINEAR_MIPMAP_NEAREST
;
case
THREE
.
LinearMipMapLinearFilter
:
return
j
.
LINEAR_MIPMAP_LINEAR
;
case
THREE
.
ByteType
:
return
j
.
BYTE
;
case
THREE
.
UnsignedByteType
:
return
j
.
UNSIGNED_BYTE
;
case
THREE
.
ShortType
:
return
j
.
SHORT
;
case
THREE
.
UnsignedShortType
:
return
j
.
UNSIGNED_SHORT
;
case
THREE
.
IntType
:
return
j
.
INT
;
case
THREE
.
UnsignedShortType
:
return
j
.
UNSIGNED_INT
;
case
THREE
.
FloatType
:
return
j
.
FLOAT
;
case
THREE
.
AlphaFormat
:
return
j
.
ALPHA
;
case
THREE
.
RGBFormat
:
return
j
.
RGB
;
case
THREE
.
RGBAFormat
:
return
j
.
RGBA
;
case
THREE
.
LuminanceFormat
:
return
j
.
LUMINANCE
;
case
THREE
.
LuminanceAlphaFormat
:
return
j
.
LUMINANCE_ALPHA
}
return
0
}
var
a
=
a
||
{},
D
=
void
0
!==
a
.
canvas
?
a
.
canvas
:
document
.
createElement
(
"
canvas
"
),
C
=
void
0
!==
a
.
precision
?
a
.
precision
:
case
THREE
.
UnsignedShortType
:
return
j
.
UNSIGNED_SHORT
;
case
THREE
.
IntType
:
return
j
.
INT
;
case
THREE
.
UnsignedShortType
:
return
j
.
UNSIGNED_INT
;
case
THREE
.
FloatType
:
return
j
.
FLOAT
;
case
THREE
.
AlphaFormat
:
return
j
.
ALPHA
;
case
THREE
.
RGBFormat
:
return
j
.
RGB
;
case
THREE
.
RGBAFormat
:
return
j
.
RGBA
;
case
THREE
.
LuminanceFormat
:
return
j
.
LUMINANCE
;
case
THREE
.
LuminanceAlphaFormat
:
return
j
.
LUMINANCE_ALPHA
}
return
0
}
var
a
=
a
||
{},
D
=
void
0
!==
a
.
canvas
?
a
.
canvas
:
document
.
createElement
(
"
canvas
"
),
C
=
void
0
!==
a
.
precision
?
a
.
precision
:
"
mediump
"
,
A
=
void
0
!==
a
.
alpha
?
a
.
alpha
:
!
0
,
E
=
void
0
!==
a
.
premultipliedAlpha
?
a
.
premultipliedAlpha
:
!
0
,
J
=
void
0
!==
a
.
antialias
?
a
.
antialias
:
!
1
,
N
=
void
0
!==
a
.
stencil
?
a
.
stencil
:
!
0
,
Y
=
void
0
!==
a
.
preserveDrawingBuffer
?
a
.
preserveDrawingBuffer
:
!
1
,
K
=
void
0
!==
a
.
clearColor
?
new
THREE
.
Color
(
a
.
clearColor
):
new
THREE
.
Color
(
0
),
O
=
void
0
!==
a
.
clearAlpha
?
a
.
clearAlpha
:
0
,
M
=
void
0
!==
a
.
maxLights
?
a
.
maxLights
:
4
;
this
.
domElement
=
D
;
this
.
context
=
null
;
this
.
autoUpdateScene
=
this
.
autoUpdateObjects
=
this
.
sortObjects
=
this
.
autoClearStencil
=
this
.
autoClearDepth
=
"
mediump
"
,
A
=
void
0
!==
a
.
alpha
?
a
.
alpha
:
!
1
,
E
=
void
0
!==
a
.
premultipliedAlpha
?
a
.
premultipliedAlpha
:
!
0
,
J
=
void
0
!==
a
.
antialias
?
a
.
antialias
:
!
1
,
N
=
void
0
!==
a
.
stencil
?
a
.
stencil
:
!
0
,
Y
=
void
0
!==
a
.
preserveDrawingBuffer
?
a
.
preserveDrawingBuffer
:
!
1
,
K
=
void
0
!==
a
.
clearColor
?
new
THREE
.
Color
(
a
.
clearColor
):
new
THREE
.
Color
(
0
),
O
=
void
0
!==
a
.
clearAlpha
?
a
.
clearAlpha
:
0
,
M
=
void
0
!==
a
.
maxLights
?
a
.
maxLights
:
4
;
this
.
domElement
=
D
;
this
.
context
=
null
;
this
.
autoUpdateScene
=
this
.
autoUpdateObjects
=
this
.
sortObjects
=
this
.
autoClearStencil
=
this
.
autoClearDepth
=
this
.
autoClearColor
=
this
.
autoClear
=!
0
;
this
.
shadowMapEnabled
=
this
.
physicallyBasedShading
=
this
.
gammaOutput
=
this
.
gammaInput
=!
1
;
this
.
shadowMapCullFrontFaces
=
this
.
shadowMapSoft
=
this
.
shadowMapAutoUpdate
=!
0
;
this
.
maxMorphTargets
=
8
;
this
.
autoScaleCubemaps
=!
0
;
this
.
renderPluginsPre
=
[];
this
.
renderPluginsPost
=
[];
this
.
info
=
{
memory
:{
programs
:
0
,
geometries
:
0
,
textures
:
0
},
render
:{
calls
:
0
,
vertices
:
0
,
faces
:
0
,
points
:
0
}};
var
H
=
this
,
j
,
X
=
[],
y
=
null
,
F
=
null
,
P
=-
1
,
Q
=
null
,
ca
=
null
,
ga
=
0
,
ba
=
null
,
T
=
null
,
aa
=
null
,
S
=
null
,
$
=
null
,
fa
=
null
,
this
.
autoClearColor
=
this
.
autoClear
=!
0
;
this
.
shadowMapEnabled
=
this
.
physicallyBasedShading
=
this
.
gammaOutput
=
this
.
gammaInput
=!
1
;
this
.
shadowMapCullFrontFaces
=
this
.
shadowMapSoft
=
this
.
shadowMapAutoUpdate
=!
0
;
this
.
maxMorphTargets
=
8
;
this
.
autoScaleCubemaps
=!
0
;
this
.
renderPluginsPre
=
[];
this
.
renderPluginsPost
=
[];
this
.
info
=
{
memory
:{
programs
:
0
,
geometries
:
0
,
textures
:
0
},
render
:{
calls
:
0
,
vertices
:
0
,
faces
:
0
,
points
:
0
}};
var
H
=
this
,
j
,
X
=
[],
y
=
null
,
F
=
null
,
P
=-
1
,
Q
=
null
,
ca
=
null
,
ga
=
0
,
ba
=
null
,
T
=
null
,
aa
=
null
,
S
=
null
,
$
=
null
,
fa
=
null
,
Ra
=
null
,
na
=
null
,
Ja
=
null
,
Ea
=
0
,
Aa
=
0
,
ja
=
0
,
ab
=
0
,
kb
=
0
,
db
=
0
,
Xa
=
new
THREE
.
Frustum
,
Ya
=
new
THREE
.
Matrix4
,
Qa
=
new
THREE
.
Vector4
,
Fa
=
new
THREE
.
Vector3
,
xa
=
{
ambient
:[
0
,
0
,
0
],
directional
:{
length
:
0
,
colors
:[],
positions
:[]},
point
:{
length
:
0
,
colors
:[],
positions
:[],
distances
:[]}};
j
=
function
(){
var
a
;
try
{
if
(
!
(
a
=
D
.
getContext
(
"
experimental-webgl
"
,{
alpha
:
A
,
premultipliedAlpha
:
E
,
antialias
:
J
,
stencil
:
N
,
preserveDrawingBuffer
:
Y
})))
throw
"
Error creating WebGL context.
"
;
console
.
log
(
navigator
.
userAgent
+
"
|
"
+
a
.
getParameter
(
a
.
VERSION
)
+
Ra
=
null
,
na
=
null
,
Ja
=
null
,
Ea
=
0
,
Aa
=
0
,
ja
=
0
,
ab
=
0
,
kb
=
0
,
db
=
0
,
Xa
=
new
THREE
.
Frustum
,
Ya
=
new
THREE
.
Matrix4
,
Qa
=
new
THREE
.
Vector4
,
Fa
=
new
THREE
.
Vector3
,
xa
=
{
ambient
:[
0
,
0
,
0
],
directional
:{
length
:
0
,
colors
:[],
positions
:[]},
point
:{
length
:
0
,
colors
:[],
positions
:[],
distances
:[]}};
j
=
function
(){
var
a
;
try
{
if
(
!
(
a
=
D
.
getContext
(
"
experimental-webgl
"
,{
alpha
:
A
,
premultipliedAlpha
:
E
,
antialias
:
J
,
stencil
:
N
,
preserveDrawingBuffer
:
Y
})))
throw
"
Error creating WebGL context.
"
;
console
.
log
(
navigator
.
userAgent
+
"
|
"
+
a
.
getParameter
(
a
.
VERSION
)
+
"
|
"
+
a
.
getParameter
(
a
.
VENDOR
)
+
"
|
"
+
a
.
getParameter
(
a
.
RENDERER
)
+
"
|
"
+
a
.
getParameter
(
a
.
SHADING_LANGUAGE_VERSION
))}
catch
(
b
){
console
.
error
(
b
)}
return
a
}();
j
.
clearColor
(
0
,
0
,
0
,
1
);
j
.
clearDepth
(
1
);
j
.
clearStencil
(
0
);
j
.
enable
(
j
.
DEPTH_TEST
);
j
.
depthFunc
(
j
.
LEQUAL
);
j
.
frontFace
(
j
.
CCW
);
j
.
cullFace
(
j
.
BACK
);
j
.
enable
(
j
.
CULL_FACE
);
j
.
enable
(
j
.
BLEND
);
j
.
blendEquation
(
j
.
FUNC_ADD
);
j
.
blendFunc
(
j
.
SRC_ALPHA
,
j
.
ONE_MINUS_SRC_ALPHA
);
j
.
clearColor
(
K
.
r
,
K
.
g
,
K
.
b
,
O
);
this
.
context
=
j
;
var
ya
=
j
.
getParameter
(
j
.
MAX_VERTEX_TEXTURE_IMAGE_UNITS
);
"
|
"
+
a
.
getParameter
(
a
.
VENDOR
)
+
"
|
"
+
a
.
getParameter
(
a
.
RENDERER
)
+
"
|
"
+
a
.
getParameter
(
a
.
SHADING_LANGUAGE_VERSION
))}
catch
(
b
){
console
.
error
(
b
)}
return
a
}();
j
.
clearColor
(
0
,
0
,
0
,
1
);
j
.
clearDepth
(
1
);
j
.
clearStencil
(
0
);
j
.
enable
(
j
.
DEPTH_TEST
);
j
.
depthFunc
(
j
.
LEQUAL
);
j
.
frontFace
(
j
.
CCW
);
j
.
cullFace
(
j
.
BACK
);
j
.
enable
(
j
.
CULL_FACE
);
j
.
enable
(
j
.
BLEND
);
j
.
blendEquation
(
j
.
FUNC_ADD
);
j
.
blendFunc
(
j
.
SRC_ALPHA
,
j
.
ONE_MINUS_SRC_ALPHA
);
j
.
clearColor
(
K
.
r
,
K
.
g
,
K
.
b
,
O
);
this
.
context
=
j
;
var
ya
=
j
.
getParameter
(
j
.
MAX_VERTEX_TEXTURE_IMAGE_UNITS
);
...
...
build/custom/ThreeWebGL.js
浏览文件 @
f24745dd
...
@@ -213,7 +213,7 @@ g.texParameteri(a,g.TEXTURE_MIN_FILTER,B(b.minFilter))):(g.texParameteri(a,g.TEX
...
@@ -213,7 +213,7 @@ g.texParameteri(a,g.TEXTURE_MIN_FILTER,B(b.minFilter))):(g.texParameteri(a,g.TEX
a
)):
b
.
depthBuffer
&&
b
.
stencilBuffer
?(
g
.
renderbufferStorage
(
g
.
RENDERBUFFER
,
g
.
DEPTH_STENCIL
,
b
.
width
,
b
.
height
),
g
.
framebufferRenderbuffer
(
g
.
FRAMEBUFFER
,
g
.
DEPTH_STENCIL_ATTACHMENT
,
g
.
RENDERBUFFER
,
a
)):
g
.
renderbufferStorage
(
g
.
RENDERBUFFER
,
g
.
RGBA4
,
b
.
width
,
b
.
height
)}
function
u
(
a
){
switch
(
a
){
case
THREE
.
NearestFilter
:
case
THREE
.
NearestMipMapNearestFilter
:
case
THREE
.
NearestMipMapLinearFilter
:
return
g
.
NEAREST
;
default
:
return
g
.
LINEAR
}}
function
B
(
a
){
switch
(
a
){
case
THREE
.
RepeatWrapping
:
return
g
.
REPEAT
;
case
THREE
.
ClampToEdgeWrapping
:
return
g
.
CLAMP_TO_EDGE
;
a
)):
b
.
depthBuffer
&&
b
.
stencilBuffer
?(
g
.
renderbufferStorage
(
g
.
RENDERBUFFER
,
g
.
DEPTH_STENCIL
,
b
.
width
,
b
.
height
),
g
.
framebufferRenderbuffer
(
g
.
FRAMEBUFFER
,
g
.
DEPTH_STENCIL_ATTACHMENT
,
g
.
RENDERBUFFER
,
a
)):
g
.
renderbufferStorage
(
g
.
RENDERBUFFER
,
g
.
RGBA4
,
b
.
width
,
b
.
height
)}
function
u
(
a
){
switch
(
a
){
case
THREE
.
NearestFilter
:
case
THREE
.
NearestMipMapNearestFilter
:
case
THREE
.
NearestMipMapLinearFilter
:
return
g
.
NEAREST
;
default
:
return
g
.
LINEAR
}}
function
B
(
a
){
switch
(
a
){
case
THREE
.
RepeatWrapping
:
return
g
.
REPEAT
;
case
THREE
.
ClampToEdgeWrapping
:
return
g
.
CLAMP_TO_EDGE
;
case
THREE
.
MirroredRepeatWrapping
:
return
g
.
MIRRORED_REPEAT
;
case
THREE
.
NearestFilter
:
return
g
.
NEAREST
;
case
THREE
.
NearestMipMapNearestFilter
:
return
g
.
NEAREST_MIPMAP_NEAREST
;
case
THREE
.
NearestMipMapLinearFilter
:
return
g
.
NEAREST_MIPMAP_LINEAR
;
case
THREE
.
LinearFilter
:
return
g
.
LINEAR
;
case
THREE
.
LinearMipMapNearestFilter
:
return
g
.
LINEAR_MIPMAP_NEAREST
;
case
THREE
.
LinearMipMapLinearFilter
:
return
g
.
LINEAR_MIPMAP_LINEAR
;
case
THREE
.
ByteType
:
return
g
.
BYTE
;
case
THREE
.
UnsignedByteType
:
return
g
.
UNSIGNED_BYTE
;
case
THREE
.
ShortType
:
return
g
.
SHORT
;
case
THREE
.
MirroredRepeatWrapping
:
return
g
.
MIRRORED_REPEAT
;
case
THREE
.
NearestFilter
:
return
g
.
NEAREST
;
case
THREE
.
NearestMipMapNearestFilter
:
return
g
.
NEAREST_MIPMAP_NEAREST
;
case
THREE
.
NearestMipMapLinearFilter
:
return
g
.
NEAREST_MIPMAP_LINEAR
;
case
THREE
.
LinearFilter
:
return
g
.
LINEAR
;
case
THREE
.
LinearMipMapNearestFilter
:
return
g
.
LINEAR_MIPMAP_NEAREST
;
case
THREE
.
LinearMipMapLinearFilter
:
return
g
.
LINEAR_MIPMAP_LINEAR
;
case
THREE
.
ByteType
:
return
g
.
BYTE
;
case
THREE
.
UnsignedByteType
:
return
g
.
UNSIGNED_BYTE
;
case
THREE
.
ShortType
:
return
g
.
SHORT
;
case
THREE
.
UnsignedShortType
:
return
g
.
UNSIGNED_SHORT
;
case
THREE
.
IntType
:
return
g
.
INT
;
case
THREE
.
UnsignedShortType
:
return
g
.
UNSIGNED_INT
;
case
THREE
.
FloatType
:
return
g
.
FLOAT
;
case
THREE
.
AlphaFormat
:
return
g
.
ALPHA
;
case
THREE
.
RGBFormat
:
return
g
.
RGB
;
case
THREE
.
RGBAFormat
:
return
g
.
RGBA
;
case
THREE
.
LuminanceFormat
:
return
g
.
LUMINANCE
;
case
THREE
.
LuminanceAlphaFormat
:
return
g
.
LUMINANCE_ALPHA
}
return
0
}
var
a
=
a
||
{},
H
=
void
0
!==
a
.
canvas
?
a
.
canvas
:
document
.
createElement
(
"
canvas
"
),
A
=
void
0
!==
a
.
precision
?
a
.
precision
:
case
THREE
.
UnsignedShortType
:
return
g
.
UNSIGNED_SHORT
;
case
THREE
.
IntType
:
return
g
.
INT
;
case
THREE
.
UnsignedShortType
:
return
g
.
UNSIGNED_INT
;
case
THREE
.
FloatType
:
return
g
.
FLOAT
;
case
THREE
.
AlphaFormat
:
return
g
.
ALPHA
;
case
THREE
.
RGBFormat
:
return
g
.
RGB
;
case
THREE
.
RGBAFormat
:
return
g
.
RGBA
;
case
THREE
.
LuminanceFormat
:
return
g
.
LUMINANCE
;
case
THREE
.
LuminanceAlphaFormat
:
return
g
.
LUMINANCE_ALPHA
}
return
0
}
var
a
=
a
||
{},
H
=
void
0
!==
a
.
canvas
?
a
.
canvas
:
document
.
createElement
(
"
canvas
"
),
A
=
void
0
!==
a
.
precision
?
a
.
precision
:
"
mediump
"
,
M
=
void
0
!==
a
.
alpha
?
a
.
alpha
:
!
0
,
N
=
void
0
!==
a
.
premultipliedAlpha
?
a
.
premultipliedAlpha
:
!
0
,
I
=
void
0
!==
a
.
antialias
?
a
.
antialias
:
!
1
,
S
=
void
0
!==
a
.
stencil
?
a
.
stencil
:
!
0
,
ua
=
void
0
!==
a
.
preserveDrawingBuffer
?
a
.
preserveDrawingBuffer
:
!
1
,
ka
=
void
0
!==
a
.
clearColor
?
new
THREE
.
Color
(
a
.
clearColor
):
new
THREE
.
Color
(
0
),
$
=
void
0
!==
a
.
clearAlpha
?
a
.
clearAlpha
:
0
,
Z
=
void
0
!==
a
.
maxLights
?
a
.
maxLights
:
4
;
this
.
domElement
=
H
;
this
.
context
=
null
;
this
.
autoUpdateScene
=
this
.
autoUpdateObjects
=
this
.
sortObjects
=
this
.
autoClearStencil
=
this
.
autoClearDepth
=
"
mediump
"
,
M
=
void
0
!==
a
.
alpha
?
a
.
alpha
:
!
1
,
N
=
void
0
!==
a
.
premultipliedAlpha
?
a
.
premultipliedAlpha
:
!
0
,
I
=
void
0
!==
a
.
antialias
?
a
.
antialias
:
!
1
,
S
=
void
0
!==
a
.
stencil
?
a
.
stencil
:
!
0
,
ua
=
void
0
!==
a
.
preserveDrawingBuffer
?
a
.
preserveDrawingBuffer
:
!
1
,
ka
=
void
0
!==
a
.
clearColor
?
new
THREE
.
Color
(
a
.
clearColor
):
new
THREE
.
Color
(
0
),
$
=
void
0
!==
a
.
clearAlpha
?
a
.
clearAlpha
:
0
,
Z
=
void
0
!==
a
.
maxLights
?
a
.
maxLights
:
4
;
this
.
domElement
=
H
;
this
.
context
=
null
;
this
.
autoUpdateScene
=
this
.
autoUpdateObjects
=
this
.
sortObjects
=
this
.
autoClearStencil
=
this
.
autoClearDepth
=
this
.
autoClearColor
=
this
.
autoClear
=!
0
;
this
.
shadowMapEnabled
=
this
.
physicallyBasedShading
=
this
.
gammaOutput
=
this
.
gammaInput
=!
1
;
this
.
shadowMapCullFrontFaces
=
this
.
shadowMapSoft
=
this
.
shadowMapAutoUpdate
=!
0
;
this
.
maxMorphTargets
=
8
;
this
.
autoScaleCubemaps
=!
0
;
this
.
renderPluginsPre
=
[];
this
.
renderPluginsPost
=
[];
this
.
info
=
{
memory
:{
programs
:
0
,
geometries
:
0
,
textures
:
0
},
render
:{
calls
:
0
,
vertices
:
0
,
faces
:
0
,
points
:
0
}};
var
D
=
this
,
g
,
Sa
=
[],
ba
=
null
,
pa
=
null
,
Q
=-
1
,
L
=
null
,
W
=
null
,
ya
=
0
,
ca
=
null
,
Ea
=
null
,
Ba
=
null
,
Na
=
null
,
Oa
=
null
,
Pa
=
this
.
autoClearColor
=
this
.
autoClear
=!
0
;
this
.
shadowMapEnabled
=
this
.
physicallyBasedShading
=
this
.
gammaOutput
=
this
.
gammaInput
=!
1
;
this
.
shadowMapCullFrontFaces
=
this
.
shadowMapSoft
=
this
.
shadowMapAutoUpdate
=!
0
;
this
.
maxMorphTargets
=
8
;
this
.
autoScaleCubemaps
=!
0
;
this
.
renderPluginsPre
=
[];
this
.
renderPluginsPost
=
[];
this
.
info
=
{
memory
:{
programs
:
0
,
geometries
:
0
,
textures
:
0
},
render
:{
calls
:
0
,
vertices
:
0
,
faces
:
0
,
points
:
0
}};
var
D
=
this
,
g
,
Sa
=
[],
ba
=
null
,
pa
=
null
,
Q
=-
1
,
L
=
null
,
W
=
null
,
ya
=
0
,
ca
=
null
,
Ea
=
null
,
Ba
=
null
,
Na
=
null
,
Oa
=
null
,
Pa
=
null
,
Ta
=
null
,
Ua
=
null
,
nb
=
null
,
Fb
=
0
,
Pb
=
0
,
Ab
=
0
,
Gb
=
0
,
cc
=
0
,
dc
=
0
,
Qb
=
new
THREE
.
Frustum
,
Va
=
new
THREE
.
Matrix4
,
Ia
=
new
THREE
.
Vector4
,
ib
=
new
THREE
.
Vector3
,
ec
=
{
ambient
:[
0
,
0
,
0
],
directional
:{
length
:
0
,
colors
:[],
positions
:[]},
point
:{
length
:
0
,
colors
:[],
positions
:[],
distances
:[]}};
g
=
function
(){
var
a
;
try
{
if
(
!
(
a
=
H
.
getContext
(
"
experimental-webgl
"
,{
alpha
:
M
,
premultipliedAlpha
:
N
,
antialias
:
I
,
stencil
:
S
,
preserveDrawingBuffer
:
ua
})))
throw
"
Error creating WebGL context.
"
;
console
.
log
(
navigator
.
userAgent
+
"
|
"
+
a
.
getParameter
(
a
.
VERSION
)
+
null
,
Ta
=
null
,
Ua
=
null
,
nb
=
null
,
Fb
=
0
,
Pb
=
0
,
Ab
=
0
,
Gb
=
0
,
cc
=
0
,
dc
=
0
,
Qb
=
new
THREE
.
Frustum
,
Va
=
new
THREE
.
Matrix4
,
Ia
=
new
THREE
.
Vector4
,
ib
=
new
THREE
.
Vector3
,
ec
=
{
ambient
:[
0
,
0
,
0
],
directional
:{
length
:
0
,
colors
:[],
positions
:[]},
point
:{
length
:
0
,
colors
:[],
positions
:[],
distances
:[]}};
g
=
function
(){
var
a
;
try
{
if
(
!
(
a
=
H
.
getContext
(
"
experimental-webgl
"
,{
alpha
:
M
,
premultipliedAlpha
:
N
,
antialias
:
I
,
stencil
:
S
,
preserveDrawingBuffer
:
ua
})))
throw
"
Error creating WebGL context.
"
;
console
.
log
(
navigator
.
userAgent
+
"
|
"
+
a
.
getParameter
(
a
.
VERSION
)
+
"
|
"
+
a
.
getParameter
(
a
.
VENDOR
)
+
"
|
"
+
a
.
getParameter
(
a
.
RENDERER
)
+
"
|
"
+
a
.
getParameter
(
a
.
SHADING_LANGUAGE_VERSION
))}
catch
(
b
){
console
.
error
(
b
)}
return
a
}();
g
.
clearColor
(
0
,
0
,
0
,
1
);
g
.
clearDepth
(
1
);
g
.
clearStencil
(
0
);
g
.
enable
(
g
.
DEPTH_TEST
);
g
.
depthFunc
(
g
.
LEQUAL
);
g
.
frontFace
(
g
.
CCW
);
g
.
cullFace
(
g
.
BACK
);
g
.
enable
(
g
.
CULL_FACE
);
g
.
enable
(
g
.
BLEND
);
g
.
blendEquation
(
g
.
FUNC_ADD
);
g
.
blendFunc
(
g
.
SRC_ALPHA
,
g
.
ONE_MINUS_SRC_ALPHA
);
g
.
clearColor
(
ka
.
r
,
ka
.
g
,
ka
.
b
,
$
);
this
.
context
=
g
;
var
fc
=
g
.
getParameter
(
g
.
MAX_VERTEX_TEXTURE_IMAGE_UNITS
);
"
|
"
+
a
.
getParameter
(
a
.
VENDOR
)
+
"
|
"
+
a
.
getParameter
(
a
.
RENDERER
)
+
"
|
"
+
a
.
getParameter
(
a
.
SHADING_LANGUAGE_VERSION
))}
catch
(
b
){
console
.
error
(
b
)}
return
a
}();
g
.
clearColor
(
0
,
0
,
0
,
1
);
g
.
clearDepth
(
1
);
g
.
clearStencil
(
0
);
g
.
enable
(
g
.
DEPTH_TEST
);
g
.
depthFunc
(
g
.
LEQUAL
);
g
.
frontFace
(
g
.
CCW
);
g
.
cullFace
(
g
.
BACK
);
g
.
enable
(
g
.
CULL_FACE
);
g
.
enable
(
g
.
BLEND
);
g
.
blendEquation
(
g
.
FUNC_ADD
);
g
.
blendFunc
(
g
.
SRC_ALPHA
,
g
.
ONE_MINUS_SRC_ALPHA
);
g
.
clearColor
(
ka
.
r
,
ka
.
g
,
ka
.
b
,
$
);
this
.
context
=
g
;
var
fc
=
g
.
getParameter
(
g
.
MAX_VERTEX_TEXTURE_IMAGE_UNITS
);
...
...
src/renderers/WebGLRenderer.js
浏览文件 @
f24745dd
...
@@ -15,7 +15,7 @@ THREE.WebGLRenderer = function ( parameters ) {
...
@@ -15,7 +15,7 @@ THREE.WebGLRenderer = function ( parameters ) {
_precision
=
parameters
.
precision
!==
undefined
?
parameters
.
precision
:
'
mediump
'
,
_precision
=
parameters
.
precision
!==
undefined
?
parameters
.
precision
:
'
mediump
'
,
_alpha
=
parameters
.
alpha
!==
undefined
?
parameters
.
alpha
:
tru
e
,
_alpha
=
parameters
.
alpha
!==
undefined
?
parameters
.
alpha
:
fals
e
,
_premultipliedAlpha
=
parameters
.
premultipliedAlpha
!==
undefined
?
parameters
.
premultipliedAlpha
:
true
,
_premultipliedAlpha
=
parameters
.
premultipliedAlpha
!==
undefined
?
parameters
.
premultipliedAlpha
:
true
,
_antialias
=
parameters
.
antialias
!==
undefined
?
parameters
.
antialias
:
false
,
_antialias
=
parameters
.
antialias
!==
undefined
?
parameters
.
antialias
:
false
,
_stencil
=
parameters
.
stencil
!==
undefined
?
parameters
.
stencil
:
true
,
_stencil
=
parameters
.
stencil
!==
undefined
?
parameters
.
stencil
:
true
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录