Skip to content

Commit f0ef51f

Browse files
authored
WebGLRenderer: Update copyFramebufferToTexture function signature (#960)
* WebGLRenderer: Update copyFramebufferToTexture function signature * Update three.js
1 parent 2d2697e commit f0ef51f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

three.js

Submodule three.js updated 68 files

types/three/src/renderers/WebGLRenderer.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,11 @@ export class WebGLRenderer implements Renderer {
441441
* Copies a region of the currently bound framebuffer into the selected mipmap level of the selected texture.
442442
* This region is defined by the size of the destination texture's mip level, offset by the input position.
443443
*
444-
* @param position Specifies the pixel offset from which to copy out of the framebuffer.
445444
* @param texture Specifies the destination texture.
445+
* @param position Specifies the pixel offset from which to copy out of the framebuffer.
446446
* @param level Specifies the destination mipmap level of the texture.
447447
*/
448-
copyFramebufferToTexture(position: Vector2, texture: Texture, level?: number): void;
448+
copyFramebufferToTexture(texture: Texture, position?: Vector2 | null, level?: number): void;
449449

450450
/**
451451
* Copies the pixels of a texture in the bounds `srcRegion` in the destination texture starting from the given

types/three/src/textures/FramebufferTexture.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { Texture } from "./Texture.js";
2121
* renderer.render( scene, camera );
2222
*
2323
* // copy part of the rendered frame into the framebuffer texture
24-
* renderer.copyFramebufferToTexture( vector, frameTexture );
24+
* renderer.copyFramebufferToTexture( frameTexture, vector );
2525
* ```
2626
* @see Example: {@link https://threejs.org/examples/#webgl_framebuffer_texture | webgl_framebuffer_texture}
2727
* @see {@link https://threejs.org/docs/index.html#api/en/textures/FramebufferTexture | Official Documentation}

0 commit comments

Comments
 (0)