提交 3257ab27 编写于 作者: W WestLangley

WebGLRenderer: activeMipMapLevel -> activeMipmapLevel

上级 c4652f7a
......@@ -354,7 +354,7 @@
<h3>[method:Integer getActiveCubeFace]()</h3>
<p>Returns the current active cube face.</p>
<h3>[method:Integer getActiveMipMapLevel]()</h3>
<h3>[method:Integer getActiveMipmapLevel]()</h3>
<p>Returns the current active mipmap level.</p>
<h3>[method:RenderTarget getRenderTarget]()</h3>
......@@ -446,11 +446,11 @@
<h3>[method:null setPixelRatio]( [param:number value] )</h3>
<p>Sets device pixel ratio. This is usually used for HiDPI device to prevent bluring output canvas.</p>
<h3>[method:null setRenderTarget]( [param:WebGLRenderTarget renderTarget], [param:Integer activeCubeFace], [param:Integer activeMipMapLevel] )</h3>
<h3>[method:null setRenderTarget]( [param:WebGLRenderTarget renderTarget], [param:Integer activeCubeFace], [param:Integer activeMipmapLevel] )</h3>
<p>
renderTarget -- The [page:WebGLRenderTarget renderTarget] that needs to be activated. When *null* is given, the canvas is set as the active render target instead.<br />
activeCubeFace -- Specifies the active cube side (PX 0, NX 1, PY 2, NY 3, PZ 4, NZ 5) of [page:WebGLRenderTargetCube] (optional).<br />
activeMipMapLevel -- Specifies the active mipmap level (optional).<br /><br />
activeMipmapLevel -- Specifies the active mipmap level (optional).<br /><br />
This method sets the active rendertarget.
</p>
......
......@@ -1499,6 +1499,12 @@ Object.assign( WebGLRenderer.prototype, {
console.warn( 'THREE.WebGLRenderer: .setTextureCube() has been removed.' );
},
getActiveMipMapLevel: function () {
console.warn( 'THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel().' );
return this.getActiveMipmapLevel();
}
} );
......
......@@ -365,7 +365,7 @@ export class WebGLRenderer implements Renderer {
/**
* Returns the current active mipmap level.
*/
getActiveMipMapLevel(): number;
getActiveMipmapLevel(): number;
/**
* Returns the current render target. If no render target is set, null is returned.
......@@ -382,9 +382,9 @@ export class WebGLRenderer implements Renderer {
*
* @param renderTarget The {@link WebGLRenderTarget renderTarget} that needs to be activated. When `null` is given, the canvas is set as the active render target instead.
* @param activeCubeFace Specifies the active cube side (PX 0, NX 1, PY 2, NY 3, PZ 4, NZ 5) of {@link WebGLRenderTargetCube}.
* @param activeMipMapLevel Specifies the active mipmap level.
* @param activeMipmapLevel Specifies the active mipmap level.
*/
setRenderTarget( renderTarget: RenderTarget | null, activeCubeFace?: number, activeMipMapLevel?: number ): void;
setRenderTarget( renderTarget: RenderTarget | null, activeCubeFace?: number, activeMipmapLevel?: number ): void;
readRenderTargetPixels(
renderTarget: RenderTarget,
......
......@@ -2399,7 +2399,7 @@ function WebGLRenderer( parameters ) {
};
this.getActiveMipMapLevel = function () {
this.getActiveMipmapLevel = function () {
return _currentActiveMipmapLevel;
......@@ -2411,11 +2411,11 @@ function WebGLRenderer( parameters ) {
};
this.setRenderTarget = function ( renderTarget, activeCubeFace, activeMipMapLevel ) {
this.setRenderTarget = function ( renderTarget, activeCubeFace, activeMipmapLevel ) {
_currentRenderTarget = renderTarget;
_currentActiveCubeFace = activeCubeFace;
_currentActiveMipmapLevel = activeMipMapLevel;
_currentActiveMipmapLevel = activeMipmapLevel;
if ( renderTarget && properties.get( renderTarget ).__webglFramebuffer === undefined ) {
......@@ -2471,7 +2471,7 @@ function WebGLRenderer( parameters ) {
if ( isCube ) {
var textureProperties = properties.get( renderTarget.texture );
_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + ( activeCubeFace || 0 ), textureProperties.__webglTexture, activeMipMapLevel || 0 );
_gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + ( activeCubeFace || 0 ), textureProperties.__webglTexture, activeMipmapLevel || 0 );
}
......
......@@ -102,7 +102,7 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
var currentRenderTarget = _renderer.getRenderTarget();
var activeCubeFace = _renderer.getActiveCubeFace();
var activeMipMapLevel = _renderer.getActiveMipMapLevel();
var activeMipmapLevel = _renderer.getActiveMipmapLevel();
var _state = _renderer.state;
......@@ -260,7 +260,7 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
scope.needsUpdate = false;
_renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipMapLevel );
_renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipmapLevel );
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册