提交 a598c8ea 编写于 作者: W WestLangley

Simplify CubeCamera method names

上级 a37edbfd
......@@ -32,7 +32,7 @@
//Update the render target cube
car.setVisible( false );
cubeCamera.position.copy( car.position );
cubeCamera.updateCubeMap( renderer, scene );
cubeCamera.update( renderer, scene );
//Render the scene
car.setVisible( true );
......@@ -67,7 +67,7 @@
<div>See the base [page:Object3D] class for common methods.</div>
<h3>[method:null updateCubeMap]( [page:WebGLRenderer renderer], [page:Scene scene] )</h3>
<h3>[method:null update]( [page:WebGLRenderer renderer], [page:Scene scene] )</h3>
<div>
renderer -- The current WebGL renderer <br />
scene -- The current scene
......@@ -76,7 +76,7 @@
Call this to update the [page:CubeCamera.renderTarget renderTarget].
</div>
<h3>[method:null clearCubeMap]( [page:Boolean color], [page:Boolean depth], [page:Boolean stencil] )</h3>
<h3>[method:null clear]( [page:Boolean color], [page:Boolean depth], [page:Boolean stencil] )</h3>
<div>
Call this to clear the [page:CubeCamera.renderTarget renderTarget] color, depth, and/or stencil buffers.
The color buffer is set to the renderer's current clear color. Arguments default to *true*.
......
......@@ -961,7 +961,7 @@
cubeCamera.position.copy( currentCar.root.position );
renderer.autoClear = true;
cubeCamera.updateCubeMap( renderer, scene );
cubeCamera.update( renderer, scene );
veyron.setVisible( true );
gallardo.setVisible( true );
......
......@@ -191,12 +191,12 @@
if ( count % 2 === 0 ) {
material.envMap = cubeCamera1.renderTarget.texture;
cubeCamera2.updateCubeMap( renderer, scene );
cubeCamera2.update( renderer, scene );
} else {
material.envMap = cubeCamera2.renderTarget.texture;
cubeCamera1.updateCubeMap( renderer, scene );
cubeCamera1.update( renderer, scene );
}
......
......@@ -392,7 +392,7 @@
// render cube map
mesh.visible = false;
cubeCamera.updateCubeMap( renderer, scene );
cubeCamera.update( renderer, scene );
mesh.visible = true;
// render scene
......
......@@ -66,6 +66,7 @@ import { WebGLRenderer } from './renderers/WebGLRenderer.js';
import { WebGLRenderTarget } from './renderers/WebGLRenderTarget.js';
import { WebGLShadowMap } from './renderers/webgl/WebGLShadowMap.js';
import { Shape } from './extras/core/Shape.js';
import { CubeCamera } from './cameras/CubeCamera.js';
export { BoxGeometry as CubeGeometry };
......@@ -1426,6 +1427,15 @@ AudioAnalyser.prototype.getData = function () {
//
CubeCamera.prototype.updateCubeMap = function ( renderer, scene ) {
console.warn( 'THREE.CubeCamera: .updateCubeMap() is now .update().' );
return this.update( renderer, scene );
};
//
export var GeometryUtils = {
merge: function ( geometry1, geometry2, materialIndexOffset ) {
......
......@@ -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,7 +87,7 @@ function CubeCamera( near, far, cubeResolution ) {
};
this.clearCubeMap = function ( color, depth, stencil ) {
this.clear = function ( color, depth, stencil ) {
var renderTarget = this.renderTarget;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册