Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
e3b71484
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,体验更适合开发者的 AI 搜索 >>
提交
e3b71484
编写于
12月 04, 2020
作者:
G
Garrett Johnson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update js examples
上级
f4fc43dd
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
8 deletion
+11
-8
examples/js/postprocessing/ClearPass.js
examples/js/postprocessing/ClearPass.js
+4
-3
examples/js/postprocessing/RenderPass.js
examples/js/postprocessing/RenderPass.js
+4
-3
examples/js/postprocessing/SSAARenderPass.js
examples/js/postprocessing/SSAARenderPass.js
+3
-2
未找到文件。
examples/js/postprocessing/ClearPass.js
浏览文件 @
e3b71484
...
@@ -6,6 +6,7 @@ THREE.ClearPass = function ( clearColor, clearAlpha ) {
...
@@ -6,6 +6,7 @@ THREE.ClearPass = function ( clearColor, clearAlpha ) {
this
.
clearColor
=
(
clearColor
!==
undefined
)
?
clearColor
:
0x000000
;
this
.
clearColor
=
(
clearColor
!==
undefined
)
?
clearColor
:
0x000000
;
this
.
clearAlpha
=
(
clearAlpha
!==
undefined
)
?
clearAlpha
:
0
;
this
.
clearAlpha
=
(
clearAlpha
!==
undefined
)
?
clearAlpha
:
0
;
this
.
oldClearColor
=
new
THREE
.
Color
();
};
};
...
@@ -15,11 +16,11 @@ THREE.ClearPass.prototype = Object.assign( Object.create( THREE.Pass.prototype )
...
@@ -15,11 +16,11 @@ THREE.ClearPass.prototype = Object.assign( Object.create( THREE.Pass.prototype )
render
:
function
(
renderer
,
writeBuffer
,
readBuffer
/*, deltaTime, maskActive */
)
{
render
:
function
(
renderer
,
writeBuffer
,
readBuffer
/*, deltaTime, maskActive */
)
{
var
oldClear
Color
,
oldClear
Alpha
;
var
oldClearAlpha
;
if
(
this
.
clearColor
)
{
if
(
this
.
clearColor
)
{
oldClearColor
=
renderer
.
getClearColor
().
getHex
(
);
renderer
.
getClearColor
(
this
.
oldClearColor
);
oldClearAlpha
=
renderer
.
getClearAlpha
();
oldClearAlpha
=
renderer
.
getClearAlpha
();
renderer
.
setClearColor
(
this
.
clearColor
,
this
.
clearAlpha
);
renderer
.
setClearColor
(
this
.
clearColor
,
this
.
clearAlpha
);
...
@@ -31,7 +32,7 @@ THREE.ClearPass.prototype = Object.assign( Object.create( THREE.Pass.prototype )
...
@@ -31,7 +32,7 @@ THREE.ClearPass.prototype = Object.assign( Object.create( THREE.Pass.prototype )
if
(
this
.
clearColor
)
{
if
(
this
.
clearColor
)
{
renderer
.
setClearColor
(
oldClearColor
,
oldClearAlpha
);
renderer
.
setClearColor
(
this
.
oldClearColor
,
oldClearAlpha
);
}
}
...
...
examples/js/postprocessing/RenderPass.js
浏览文件 @
e3b71484
...
@@ -13,6 +13,7 @@ THREE.RenderPass = function ( scene, camera, overrideMaterial, clearColor, clear
...
@@ -13,6 +13,7 @@ THREE.RenderPass = function ( scene, camera, overrideMaterial, clearColor, clear
this
.
clear
=
true
;
this
.
clear
=
true
;
this
.
clearDepth
=
false
;
this
.
clearDepth
=
false
;
this
.
needsSwap
=
false
;
this
.
needsSwap
=
false
;
this
.
oldClearColor
=
new
THREE
.
Color
();
};
};
...
@@ -25,7 +26,7 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype
...
@@ -25,7 +26,7 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype
var
oldAutoClear
=
renderer
.
autoClear
;
var
oldAutoClear
=
renderer
.
autoClear
;
renderer
.
autoClear
=
false
;
renderer
.
autoClear
=
false
;
var
oldClear
Color
,
oldClear
Alpha
,
oldOverrideMaterial
;
var
oldClearAlpha
,
oldOverrideMaterial
;
if
(
this
.
overrideMaterial
!==
undefined
)
{
if
(
this
.
overrideMaterial
!==
undefined
)
{
...
@@ -37,7 +38,7 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype
...
@@ -37,7 +38,7 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype
if
(
this
.
clearColor
)
{
if
(
this
.
clearColor
)
{
oldClearColor
=
renderer
.
getClearColor
().
getHex
(
);
renderer
.
getClearColor
(
this
.
oldClearColor
);
oldClearAlpha
=
renderer
.
getClearAlpha
();
oldClearAlpha
=
renderer
.
getClearAlpha
();
renderer
.
setClearColor
(
this
.
clearColor
,
this
.
clearAlpha
);
renderer
.
setClearColor
(
this
.
clearColor
,
this
.
clearAlpha
);
...
@@ -58,7 +59,7 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype
...
@@ -58,7 +59,7 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype
if
(
this
.
clearColor
)
{
if
(
this
.
clearColor
)
{
renderer
.
setClearColor
(
oldClearColor
,
oldClearAlpha
);
renderer
.
setClearColor
(
this
.
oldClearColor
,
oldClearAlpha
);
}
}
...
...
examples/js/postprocessing/SSAARenderPass.js
浏览文件 @
e3b71484
...
@@ -21,6 +21,7 @@ THREE.SSAARenderPass = function ( scene, camera, clearColor, clearAlpha ) {
...
@@ -21,6 +21,7 @@ THREE.SSAARenderPass = function ( scene, camera, clearColor, clearAlpha ) {
// as we need to clear the buffer in this pass, clearColor must be set to something, defaults to black.
// as we need to clear the buffer in this pass, clearColor must be set to something, defaults to black.
this
.
clearColor
=
(
clearColor
!==
undefined
)
?
clearColor
:
0x000000
;
this
.
clearColor
=
(
clearColor
!==
undefined
)
?
clearColor
:
0x000000
;
this
.
clearAlpha
=
(
clearAlpha
!==
undefined
)
?
clearAlpha
:
0
;
this
.
clearAlpha
=
(
clearAlpha
!==
undefined
)
?
clearAlpha
:
0
;
this
.
oldClearColor
=
new
THREE
.
Color
();
if
(
THREE
.
CopyShader
===
undefined
)
console
.
error
(
"
THREE.SSAARenderPass relies on THREE.CopyShader
"
);
if
(
THREE
.
CopyShader
===
undefined
)
console
.
error
(
"
THREE.SSAARenderPass relies on THREE.CopyShader
"
);
...
@@ -77,7 +78,7 @@ THREE.SSAARenderPass.prototype = Object.assign( Object.create( THREE.Pass.protot
...
@@ -77,7 +78,7 @@ THREE.SSAARenderPass.prototype = Object.assign( Object.create( THREE.Pass.protot
var
autoClear
=
renderer
.
autoClear
;
var
autoClear
=
renderer
.
autoClear
;
renderer
.
autoClear
=
false
;
renderer
.
autoClear
=
false
;
var
oldClearColor
=
renderer
.
getClearColor
().
getHex
(
);
renderer
.
getClearColor
(
this
.
oldClearColor
);
var
oldClearAlpha
=
renderer
.
getClearAlpha
();
var
oldClearAlpha
=
renderer
.
getClearAlpha
();
var
baseSampleWeight
=
1.0
/
jitterOffsets
.
length
;
var
baseSampleWeight
=
1.0
/
jitterOffsets
.
length
;
...
@@ -134,7 +135,7 @@ THREE.SSAARenderPass.prototype = Object.assign( Object.create( THREE.Pass.protot
...
@@ -134,7 +135,7 @@ THREE.SSAARenderPass.prototype = Object.assign( Object.create( THREE.Pass.protot
if
(
this
.
camera
.
clearViewOffset
)
this
.
camera
.
clearViewOffset
();
if
(
this
.
camera
.
clearViewOffset
)
this
.
camera
.
clearViewOffset
();
renderer
.
autoClear
=
autoClear
;
renderer
.
autoClear
=
autoClear
;
renderer
.
setClearColor
(
oldClearColor
,
oldClearAlpha
);
renderer
.
setClearColor
(
this
.
oldClearColor
,
oldClearAlpha
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录