From 020022105b48dd499d5a4f6137eb1157c0da7d57 Mon Sep 17 00:00:00 2001 From: alteredq Date: Mon, 20 Aug 2012 21:42:59 +0200 Subject: [PATCH] Fixed shadow camera helper that got broken with CameraHelper changes. --- build/three.js | 2 +- build/three.min.js | 2 +- src/extras/renderers/plugins/ShadowMapPlugin.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/three.js b/build/three.js index 67b34114e6..f76ef30fef 100644 --- a/build/three.js +++ b/build/three.js @@ -34004,7 +34004,7 @@ THREE.ShadowMapPlugin = function ( ) { shadowCamera.matrixWorldInverse.getInverse( shadowCamera.matrixWorld ); - if ( light.cameraHelper ) light.cameraHelper.lines.visible = light.shadowCameraVisible; + if ( light.cameraHelper ) light.cameraHelper.visible = light.shadowCameraVisible; if ( light.shadowCameraVisible ) light.cameraHelper.update(); // compute shadow matrix diff --git a/build/three.min.js b/build/three.min.js index 779a1efbdc..a3f11c5260 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -748,7 +748,7 @@ y.shadowCameraBottom=s.shadowCameraBottom;y.shadowCameraTop=s.shadowCameraTop;y. u=u.shadowCascadeFarZ[v];s=s.pointsFrustum;s[0].z=t;s[1].z=t;s[2].z=t;s[3].z=t;s[4].z=u;s[5].z=u;s[6].z=u;s[7].z=u;A[o]=y;o++}else{A[o]=p;o++}}m=0;for(q=A.length;mj.x)j.x=v.x;if(v.yj.y)j.y=v.y;if(v.zj.z)j.z=v.z}o.left=i.x;o.right= -j.x;o.top=j.y;o.bottom=i.y;o.updateProjectionMatrix()}o=p.shadowMap;t=p.shadowMatrix;r=p.shadowCamera;r.position.copy(p.matrixWorld.getPosition());r.lookAt(p.target.matrixWorld.getPosition());r.updateMatrixWorld();r.matrixWorldInverse.getInverse(r.matrixWorld);if(p.cameraHelper)p.cameraHelper.lines.visible=p.shadowCameraVisible;p.shadowCameraVisible&&p.cameraHelper.update();t.set(0.5,0,0,0.5,0,0.5,0,0.5,0,0,0.5,0.5,0,0,0,1);t.multiplySelf(r.projectionMatrix);t.multiplySelf(r.matrixWorldInverse);if(!r._viewMatrixArray)r._viewMatrixArray= +j.x;o.top=j.y;o.bottom=i.y;o.updateProjectionMatrix()}o=p.shadowMap;t=p.shadowMatrix;r=p.shadowCamera;r.position.copy(p.matrixWorld.getPosition());r.lookAt(p.target.matrixWorld.getPosition());r.updateMatrixWorld();r.matrixWorldInverse.getInverse(r.matrixWorld);if(p.cameraHelper)p.cameraHelper.visible=p.shadowCameraVisible;p.shadowCameraVisible&&p.cameraHelper.update();t.set(0.5,0,0,0.5,0,0.5,0,0.5,0,0,0.5,0.5,0,0,0,1);t.multiplySelf(r.projectionMatrix);t.multiplySelf(r.matrixWorldInverse);if(!r._viewMatrixArray)r._viewMatrixArray= new Float32Array(16);if(!r._projectionMatrixArray)r._projectionMatrixArray=new Float32Array(16);r.matrixWorldInverse.flattenToArray(r._viewMatrixArray);r.projectionMatrix.flattenToArray(r._projectionMatrixArray);h.multiply(r.projectionMatrix,r.matrixWorldInverse);g.setFromMatrix(h);b.setRenderTarget(o);b.clear();s=l.__webglObjects;p=0;for(o=s.length;p