|
@@ -54,7 +54,7 @@ function CubeCamera( near, far, cubeResolution ) {
|
|
|
this.renderTarget = new WebGLRenderTargetCube( cubeResolution, cubeResolution, options );
|
|
|
this.renderTarget.texture.name = "CubeCamera";
|
|
|
|
|
|
- this.updateCubeMap = function ( renderer, scene ) {
|
|
|
+ this.update = function ( renderer, scene ) {
|
|
|
|
|
|
if ( this.parent === null ) this.updateMatrixWorld();
|
|
|
|
|
@@ -87,6 +87,23 @@ function CubeCamera( near, far, cubeResolution ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
+ this.clear = function ( color, depth, stencil ) {
|
|
|
+
|
|
|
+ var renderTarget = this.renderTarget;
|
|
|
+
|
|
|
+ for ( var i = 0; i < 6; i ++ ) {
|
|
|
+
|
|
|
+ renderTarget.activeCubeFace = i;
|
|
|
+ renderer.setRenderTarget( renderTarget );
|
|
|
+
|
|
|
+ renderer.clear( color, depth, stencil );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ renderer.setRenderTarget( null );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
CubeCamera.prototype = Object.create( Object3D.prototype );
|