Skip to content

Commit b72a191

Browse files
committed
Update copyTextureToTexture signatures
1 parent 71fa656 commit b72a191

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/renderers/common/Renderer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2461,13 +2461,14 @@ class Renderer {
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.
24632463
* @param {number} level - The mipmap level to copy.
2464+
* @param {number} [dstLevel=0] - The destination mip level to copy to.
24642465
*/
2465-
copyTextureToTexture( srcTexture, dstTexture, srcRegion = null, dstPosition = null, level = 0 ) {
2466+
copyTextureToTexture( srcTexture, dstTexture, srcRegion = null, dstPosition = null, level = 0, dstLevel = 0 ) {
24662467

24672468
this._textures.updateTexture( srcTexture );
24682469
this._textures.updateTexture( dstTexture );
24692470

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

24722473
}
24732474

src/renderers/webgl-fallback/WebGLBackend.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,13 +1886,14 @@ class WebGLBackend extends Backend {
18861886
*
18871887
* @param {Texture} srcTexture - The source texture.
18881888
* @param {Texture} dstTexture - The destination texture.
1889-
* @param {?Vector4} [srcRegion=null] - The region of the source texture to copy.
1889+
* @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.
18911891
* @param {number} [level=0] - The mip level to copy.
1892+
* @param {number} [dstLevel=0] - The destination mip level to copy to.
18921893
*/
1893-
copyTextureToTexture( srcTexture, dstTexture, srcRegion = null, dstPosition = null, level = 0 ) {
1894+
copyTextureToTexture( srcTexture, dstTexture, srcRegion = null, dstPosition = null, level = 0, dstLevel = 0 ) {
18941895

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

18971898
}
18981899

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ class WebGLTextureUtils {
697697
*
698698
* @param {Texture} srcTexture - The source texture.
699699
* @param {Texture} dstTexture - The destination texture.
700-
* @param {?Vector4} [srcRegion=null] - The region of the source texture to copy.
700+
* @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.
703703
* @param {number} [dstLevel=0] - The destination mip level to copy to.

0 commit comments

Comments
 (0)