Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGLRenderer: Update copyFramebufferToTexture function signature #960

Merged
merged 2 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion three.js
Submodule three.js updated 68 files
+2 −2 .github/workflows/ci.yml
+1 −1 docs/api/ar/renderers/WebGLRenderer.html
+1 −1 docs/api/en/renderers/WebGLRenderer.html
+1 −1 docs/api/en/textures/FramebufferTexture.html
+1 −1 docs/api/it/renderers/WebGLRenderer.html
+1 −1 docs/api/zh/renderers/WebGLRenderer.html
+1 −1 docs/api/zh/textures/FramebufferTexture.html
+4 −0 editor/css/main.css
+0 −66 editor/js/Menubar.Examples.js
+73 −5 editor/js/Menubar.File.js
+0 −2 editor/js/Menubar.js
+48 −0 editor/js/Sidebar.Properties.js
+29 −32 editor/js/Strings.js
+12 −0 editor/js/libs/ui.js
+31 −12 examples/jsm/loaders/MMDLoader.js
+2 −2 examples/jsm/objects/Lensflare.js
+17 −2 examples/jsm/renderers/CSS2DRenderer.js
+18 −2 examples/jsm/renderers/CSS3DRenderer.js
+4 −4 examples/jsm/renderers/common/Bindings.js
+0 −8 examples/jsm/renderers/common/SampledTexture.js
+0 −6 examples/jsm/renderers/common/nodes/NodeSampledTexture.js
+ examples/screenshots/games_fps.jpg
+ examples/screenshots/physics_ammo_break.jpg
+ examples/screenshots/physics_ammo_volume.jpg
+ examples/screenshots/webaudio_timing.jpg
+ examples/screenshots/webgl2_rendertarget_texture2darray.jpg
+ examples/screenshots/webgl_animation_multiple.jpg
+ examples/screenshots/webgl_animation_skinning_ik.jpg
+ examples/screenshots/webgl_buffergeometry_drawrange.jpg
+ examples/screenshots/webgl_buffergeometry_lines.jpg
+ examples/screenshots/webgl_camera_cinematic.jpg
+ examples/screenshots/webgl_effects_peppersghost.jpg
+ examples/screenshots/webgl_geometry_cube.jpg
+ examples/screenshots/webgl_gpgpu_birds.jpg
+ examples/screenshots/webgl_gpgpu_birds_gltf.jpg
+ examples/screenshots/webgl_gpgpu_protoplanet.jpg
+ examples/screenshots/webgl_gpgpu_water.jpg
+ examples/screenshots/webgl_instancing_morph.jpg
+ examples/screenshots/webgl_instancing_performance.jpg
+ examples/screenshots/webgl_interactive_cubes.jpg
+ examples/screenshots/webgl_interactive_cubes_ortho.jpg
+ examples/screenshots/webgl_interactive_points.jpg
+ examples/screenshots/webgl_interactive_raycasting_points.jpg
+ examples/screenshots/webgl_layers.jpg
+ examples/screenshots/webgl_lines_colors.jpg
+ examples/screenshots/webgl_loader_bvh.jpg
+ examples/screenshots/webgl_loader_fbx.jpg
+ examples/screenshots/webgl_marchingcubes.jpg
+ examples/screenshots/webgl_materials_texture_anisotropy.jpg
+ examples/screenshots/webgl_materials_texture_filters.jpg
+ examples/screenshots/webgl_materials_texture_manualmipmap.jpg
+ examples/screenshots/webgl_math_obb.jpg
+ examples/screenshots/webgl_mesh_batch.jpg
+ examples/screenshots/webgl_points_waves.jpg
+ examples/screenshots/webgl_postprocessing.jpg
+ examples/screenshots/webgl_postprocessing_advanced.jpg
+ examples/screenshots/webgl_postprocessing_afterimage.jpg
+ examples/screenshots/webgl_postprocessing_fxaa.jpg
+ examples/screenshots/webgl_postprocessing_rgb_halftone.jpg
+ examples/screenshots/webgl_postprocessing_smaa.jpg
+ examples/screenshots/webgl_postprocessing_ssaa.jpg
+ examples/screenshots/webgl_postprocessing_taa.jpg
+ examples/screenshots/webgl_shadow_contact.jpg
+ examples/screenshots/webgl_shadowmap_performance.jpg
+ examples/screenshots/webgl_test_memory.jpg
+1 −1 examples/webgl_framebuffer_texture.html
+16 −2 src/renderers/WebGLRenderer.js
+3 −0 test/e2e/puppeteer.js
4 changes: 2 additions & 2 deletions types/three/src/renderers/WebGLRenderer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,11 +441,11 @@ export class WebGLRenderer implements Renderer {
* Copies a region of the currently bound framebuffer into the selected mipmap level of the selected texture.
* This region is defined by the size of the destination texture's mip level, offset by the input position.
*
* @param position Specifies the pixel offset from which to copy out of the framebuffer.
* @param texture Specifies the destination texture.
* @param position Specifies the pixel offset from which to copy out of the framebuffer.
* @param level Specifies the destination mipmap level of the texture.
*/
copyFramebufferToTexture(position: Vector2, texture: Texture, level?: number): void;
copyFramebufferToTexture(texture: Texture, position?: Vector2 | null, level?: number): void;

/**
* Copies the pixels of a texture in the bounds `srcRegion` in the destination texture starting from the given
Expand Down
2 changes: 1 addition & 1 deletion types/three/src/textures/FramebufferTexture.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Texture } from "./Texture.js";
* renderer.render( scene, camera );
*
* // copy part of the rendered frame into the framebuffer texture
* renderer.copyFramebufferToTexture( vector, frameTexture );
* renderer.copyFramebufferToTexture( frameTexture, vector );
* ```
* @see Example: {@link https://threejs.org/examples/#webgl_framebuffer_texture | webgl_framebuffer_texture}
* @see {@link https://threejs.org/docs/index.html#api/en/textures/FramebufferTexture | Official Documentation}
Expand Down
Loading