提交 ecd8117e 编写于 作者: G Garrett Johnson

this.oldClearColor -> this._oldClearColor

上级 e4702c1b
...@@ -64,7 +64,7 @@ THREE.BokehPass = function ( scene, camera, params ) { ...@@ -64,7 +64,7 @@ THREE.BokehPass = function ( scene, camera, params ) {
this.fsQuad = new THREE.Pass.FullScreenQuad( this.materialBokeh ); this.fsQuad = new THREE.Pass.FullScreenQuad( this.materialBokeh );
this.oldClearColor = new THREE.Color(); this._oldClearColor = new THREE.Color();
}; };
...@@ -78,7 +78,7 @@ THREE.BokehPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ) ...@@ -78,7 +78,7 @@ THREE.BokehPass.prototype = Object.assign( Object.create( THREE.Pass.prototype )
this.scene.overrideMaterial = this.materialDepth; this.scene.overrideMaterial = this.materialDepth;
renderer.getClearColor( this.oldClearColor ); renderer.getClearColor( this._oldClearColor );
var oldClearAlpha = renderer.getClearAlpha(); var oldClearAlpha = renderer.getClearAlpha();
var oldAutoClear = renderer.autoClear; var oldAutoClear = renderer.autoClear;
renderer.autoClear = false; renderer.autoClear = false;
...@@ -109,7 +109,7 @@ THREE.BokehPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ) ...@@ -109,7 +109,7 @@ THREE.BokehPass.prototype = Object.assign( Object.create( THREE.Pass.prototype )
} }
this.scene.overrideMaterial = null; this.scene.overrideMaterial = null;
renderer.setClearColor( this.oldClearColor ); renderer.setClearColor( this._oldClearColor );
renderer.setClearAlpha( oldClearAlpha ); renderer.setClearAlpha( oldClearAlpha );
renderer.autoClear = oldAutoClear; renderer.autoClear = oldAutoClear;
......
...@@ -6,7 +6,7 @@ THREE.ClearPass = function ( clearColor, clearAlpha ) { ...@@ -6,7 +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(); this._oldClearColor = new THREE.Color();
}; };
...@@ -20,7 +20,7 @@ THREE.ClearPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ) ...@@ -20,7 +20,7 @@ THREE.ClearPass.prototype = Object.assign( Object.create( THREE.Pass.prototype )
if ( this.clearColor ) { if ( this.clearColor ) {
renderer.getClearColor( this.oldClearColor ); renderer.getClearColor( this._oldClearColor );
oldClearAlpha = renderer.getClearAlpha(); oldClearAlpha = renderer.getClearAlpha();
renderer.setClearColor( this.clearColor, this.clearAlpha ); renderer.setClearColor( this.clearColor, this.clearAlpha );
...@@ -32,7 +32,7 @@ THREE.ClearPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ) ...@@ -32,7 +32,7 @@ THREE.ClearPass.prototype = Object.assign( Object.create( THREE.Pass.prototype )
if ( this.clearColor ) { if ( this.clearColor ) {
renderer.setClearColor( this.oldClearColor, oldClearAlpha ); renderer.setClearColor( this._oldClearColor, oldClearAlpha );
} }
......
...@@ -96,7 +96,7 @@ THREE.OutlinePass = function ( resolution, scene, camera, selectedObjects ) { ...@@ -96,7 +96,7 @@ THREE.OutlinePass = function ( resolution, scene, camera, selectedObjects ) {
this.enabled = true; this.enabled = true;
this.needsSwap = false; this.needsSwap = false;
this.oldClearColor = new THREE.Color(); this._oldClearColor = new THREE.Color();
this.oldClearAlpha = 1; this.oldClearAlpha = 1;
this.fsQuad = new THREE.Pass.FullScreenQuad( null ); this.fsQuad = new THREE.Pass.FullScreenQuad( null );
...@@ -276,7 +276,7 @@ THREE.OutlinePass.prototype = Object.assign( Object.create( THREE.Pass.prototype ...@@ -276,7 +276,7 @@ THREE.OutlinePass.prototype = Object.assign( Object.create( THREE.Pass.prototype
if ( this.selectedObjects.length > 0 ) { if ( this.selectedObjects.length > 0 ) {
renderer.getClearColor( this.oldClearColor ); renderer.getClearColor( this._oldClearColor );
this.oldClearAlpha = renderer.getClearAlpha(); this.oldClearAlpha = renderer.getClearAlpha();
var oldAutoClear = renderer.autoClear; var oldAutoClear = renderer.autoClear;
...@@ -391,7 +391,7 @@ THREE.OutlinePass.prototype = Object.assign( Object.create( THREE.Pass.prototype ...@@ -391,7 +391,7 @@ THREE.OutlinePass.prototype = Object.assign( Object.create( THREE.Pass.prototype
renderer.setRenderTarget( readBuffer ); renderer.setRenderTarget( readBuffer );
this.fsQuad.render( renderer ); this.fsQuad.render( renderer );
renderer.setClearColor( this.oldClearColor, this.oldClearAlpha ); renderer.setClearColor( this._oldClearColor, this.oldClearAlpha );
renderer.autoClear = oldAutoClear; renderer.autoClear = oldAutoClear;
} }
......
...@@ -13,7 +13,7 @@ THREE.RenderPass = function ( scene, camera, overrideMaterial, clearColor, clear ...@@ -13,7 +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(); this._oldClearColor = new THREE.Color();
}; };
...@@ -38,7 +38,7 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ...@@ -38,7 +38,7 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype
if ( this.clearColor ) { if ( this.clearColor ) {
renderer.getClearColor( this.oldClearColor ); renderer.getClearColor( this._oldClearColor );
oldClearAlpha = renderer.getClearAlpha(); oldClearAlpha = renderer.getClearAlpha();
renderer.setClearColor( this.clearColor, this.clearAlpha ); renderer.setClearColor( this.clearColor, this.clearAlpha );
...@@ -59,7 +59,7 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ...@@ -59,7 +59,7 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype
if ( this.clearColor ) { if ( this.clearColor ) {
renderer.setClearColor( this.oldClearColor, oldClearAlpha ); renderer.setClearColor( this._oldClearColor, oldClearAlpha );
} }
......
...@@ -16,7 +16,7 @@ THREE.SAOPass = function ( scene, camera, depthTexture, useNormals, resolution ) ...@@ -16,7 +16,7 @@ THREE.SAOPass = function ( scene, camera, depthTexture, useNormals, resolution )
this.supportsNormalTexture = ( useNormals !== undefined ) ? useNormals : false; this.supportsNormalTexture = ( useNormals !== undefined ) ? useNormals : false;
this.originalClearColor = new THREE.Color(); this.originalClearColor = new THREE.Color();
this.oldClearColor = new THREE.Color(); this._oldClearColor = new THREE.Color();
this.oldClearAlpha = 1; this.oldClearAlpha = 1;
this.params = { this.params = {
...@@ -192,7 +192,7 @@ THREE.SAOPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), ...@@ -192,7 +192,7 @@ THREE.SAOPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ),
} }
renderer.getClearColor( this.oldClearColor ); renderer.getClearColor( this._oldClearColor );
this.oldClearAlpha = renderer.getClearAlpha(); this.oldClearAlpha = renderer.getClearAlpha();
var oldAutoClear = renderer.autoClear; var oldAutoClear = renderer.autoClear;
renderer.autoClear = false; renderer.autoClear = false;
...@@ -303,7 +303,7 @@ THREE.SAOPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), ...@@ -303,7 +303,7 @@ THREE.SAOPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ),
// Rendering SAOPass result on top of previous pass // Rendering SAOPass result on top of previous pass
this.renderPass( renderer, outputMaterial, this.renderToScreen ? null : readBuffer ); this.renderPass( renderer, outputMaterial, this.renderToScreen ? null : readBuffer );
renderer.setClearColor( this.oldClearColor, this.oldClearAlpha ); renderer.setClearColor( this._oldClearColor, this.oldClearAlpha );
renderer.autoClear = oldAutoClear; renderer.autoClear = oldAutoClear;
}, },
......
...@@ -21,7 +21,7 @@ THREE.SSAARenderPass = function ( scene, camera, clearColor, clearAlpha ) { ...@@ -21,7 +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(); 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" );
...@@ -78,7 +78,7 @@ THREE.SSAARenderPass.prototype = Object.assign( Object.create( THREE.Pass.protot ...@@ -78,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;
renderer.getClearColor( this.oldClearColor ); renderer.getClearColor( this._oldClearColor );
var oldClearAlpha = renderer.getClearAlpha(); var oldClearAlpha = renderer.getClearAlpha();
var baseSampleWeight = 1.0 / jitterOffsets.length; var baseSampleWeight = 1.0 / jitterOffsets.length;
...@@ -135,7 +135,7 @@ THREE.SSAARenderPass.prototype = Object.assign( Object.create( THREE.Pass.protot ...@@ -135,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( this.oldClearColor, oldClearAlpha ); renderer.setClearColor( this._oldClearColor, oldClearAlpha );
} }
......
...@@ -131,7 +131,7 @@ THREE.UnrealBloomPass = function ( resolution, strength, radius, threshold ) { ...@@ -131,7 +131,7 @@ THREE.UnrealBloomPass = function ( resolution, strength, radius, threshold ) {
this.enabled = true; this.enabled = true;
this.needsSwap = false; this.needsSwap = false;
this.oldClearColor = new THREE.Color(); this._oldClearColor = new THREE.Color();
this.oldClearAlpha = 1; this.oldClearAlpha = 1;
this.basic = new THREE.MeshBasicMaterial(); this.basic = new THREE.MeshBasicMaterial();
...@@ -185,7 +185,7 @@ THREE.UnrealBloomPass.prototype = Object.assign( Object.create( THREE.Pass.proto ...@@ -185,7 +185,7 @@ THREE.UnrealBloomPass.prototype = Object.assign( Object.create( THREE.Pass.proto
render: function ( renderer, writeBuffer, readBuffer, deltaTime, maskActive ) { render: function ( renderer, writeBuffer, readBuffer, deltaTime, maskActive ) {
renderer.getClearColor( this.oldClearColor ); renderer.getClearColor( this._oldClearColor );
this.oldClearAlpha = renderer.getClearAlpha(); this.oldClearAlpha = renderer.getClearAlpha();
var oldAutoClear = renderer.autoClear; var oldAutoClear = renderer.autoClear;
renderer.autoClear = false; renderer.autoClear = false;
...@@ -273,7 +273,7 @@ THREE.UnrealBloomPass.prototype = Object.assign( Object.create( THREE.Pass.proto ...@@ -273,7 +273,7 @@ THREE.UnrealBloomPass.prototype = Object.assign( Object.create( THREE.Pass.proto
// Restore renderer settings // Restore renderer settings
renderer.setClearColor( this.oldClearColor, this.oldClearAlpha ); renderer.setClearColor( this._oldClearColor, this.oldClearAlpha );
renderer.autoClear = oldAutoClear; renderer.autoClear = oldAutoClear;
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册