Skip to content

Commit 2d401d7

Browse files
committed
Add srcLevel signatures, use null as default for dstLevel
1 parent 8547017 commit 2d401d7

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/renderers/common/Renderer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,15 +2460,15 @@ class Renderer {
24602460
* @param {Texture} dstTexture - The destination texture.
24612461
* @param {Box2|Box3} [srcRegion=null] - A bounding box which describes the source region. Can be two or three-dimensional.
24622462
* @param {Vector2|Vector3} [dstPosition=null] - A vector that represents the origin of the destination region. Can be two or three-dimensional.
2463-
* @param {number} level - The mipmap level to copy.
2464-
* @param {number} [dstLevel=0] - The destination mip level to copy to.
2463+
* @param {number} [srcLevel=0] - The mipmap level to copy.
2464+
* @param {number} [dstLevel=null] - The destination mip level to copy to.
24652465
*/
2466-
copyTextureToTexture( srcTexture, dstTexture, srcRegion = null, dstPosition = null, level = 0, dstLevel = 0 ) {
2466+
copyTextureToTexture( srcTexture, dstTexture, srcRegion = null, dstPosition = null, srcLevel = 0, dstLevel = null ) {
24672467

24682468
this._textures.updateTexture( srcTexture );
24692469
this._textures.updateTexture( dstTexture );
24702470

2471-
this.backend.copyTextureToTexture( srcTexture, dstTexture, srcRegion, dstPosition, level, dstLevel );
2471+
this.backend.copyTextureToTexture( srcTexture, dstTexture, srcRegion, dstPosition, srcLevel, dstLevel );
24722472

24732473
}
24742474

src/renderers/webgl-fallback/WebGLBackend.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,12 +1888,12 @@ class WebGLBackend extends Backend {
18881888
* @param {Texture} dstTexture - The destination texture.
18891889
* @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy.
18901890
* @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy.
1891-
* @param {number} [level=0] - The mip level to copy.
1892-
* @param {number} [dstLevel=0] - The destination mip level to copy to.
1891+
* @param {number} [srcLevel=0] - The mip level to copy.
1892+
* @param {number} [dstLevel=null] - The destination mip level to copy to.
18931893
*/
1894-
copyTextureToTexture( srcTexture, dstTexture, srcRegion = null, dstPosition = null, level = 0, dstLevel = 0 ) {
1894+
copyTextureToTexture( srcTexture, dstTexture, srcRegion = null, dstPosition = null, srcLevel = 0, dstLevel = null ) {
18951895

1896-
this.textureUtils.copyTextureToTexture( srcTexture, dstTexture, srcRegion, dstPosition, level, dstLevel );
1896+
this.textureUtils.copyTextureToTexture( srcTexture, dstTexture, srcRegion, dstPosition, srcLevel, dstLevel );
18971897

18981898
}
18991899

src/renderers/webgl-fallback/utils/WebGLTextureUtils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,9 +700,9 @@ class WebGLTextureUtils {
700700
* @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy.
701701
* @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy.
702702
* @param {number} [srcLevel=0] - The source mip level to copy from.
703-
* @param {number} [dstLevel=0] - The destination mip level to copy to.
703+
* @param {number} [dstLevel=null] - The destination mip level to copy to.
704704
*/
705-
copyTextureToTexture( srcTexture, dstTexture, srcRegion = null, dstPosition = null, srcLevel = 0, dstLevel = 0 ) {
705+
copyTextureToTexture( srcTexture, dstTexture, srcRegion = null, dstPosition = null, srcLevel = 0, dstLevel = null ) {
706706

707707
const { gl, backend } = this;
708708
const { state } = this.backend;

0 commit comments

Comments
 (0)