@@ -37,7 +37,7 @@ THREE.ShaderLib[ 'mirror' ] = {
3737 "float blendOverlay(float base, float blend) {" ,
3838 "return( base < 0.5 ? ( 2.0 * base * blend ) : (1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );" ,
3939 "}" ,
40-
40+
4141 "void main() {" ,
4242
4343 "vec4 color = texture2DProj(mirrorSampler, mirrorCoord);" ,
@@ -76,7 +76,7 @@ THREE.Mirror = function ( renderer, camera, options ) {
7676 this . rotationMatrix = new THREE . Matrix4 ( ) ;
7777 this . lookAtPosition = new THREE . Vector3 ( 0 , 0 , - 1 ) ;
7878 this . clipPlane = new THREE . Vector4 ( ) ;
79-
79+
8080 // For debug only, show the normal and plane of the mirror
8181 var debugMode = options . debugMode !== undefined ? options . debugMode : false ;
8282
@@ -257,7 +257,7 @@ THREE.Mirror.prototype.render = function () {
257257 // Render the mirrored view of the current scene into the target texture
258258 var scene = this ;
259259
260- while ( scene . parent !== undefined ) {
260+ while ( scene . parent !== null ) {
261261
262262 scene = scene . parent ;
263263
@@ -286,7 +286,7 @@ THREE.Mirror.prototype.renderTemp = function () {
286286 // Render the mirrored view of the current scene into the target texture
287287 var scene = this ;
288288
289- while ( scene . parent !== undefined ) {
289+ while ( scene . parent !== null ) {
290290
291291 scene = scene . parent ;
292292
0 commit comments