Skip to content

Commit

Permalink
address feedback on PR #28654 (#29190)
Browse files Browse the repository at this point in the history
* address feedback

* update screenshot
  • Loading branch information
HunterLarco authored Aug 20, 2024
1 parent 6dd4ddc commit 4c62a13
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Binary file modified examples/screenshots/webgl_texture2darray_layerupdate.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 12 additions & 3 deletions examples/webgl_texture2darray_layerupdate.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@
};

const gui = new GUI();
gui.add(formData, 'srcLayer', 0, spiritedaway.image.depth - 1, 1);
gui.add(formData, 'destLayer', 0, textureArray.image.depth - 1, 1);
gui.add(formData, 'transfer');
gui.add( formData, 'srcLayer', 0, spiritedaway.image.depth - 1, 1 );
gui.add( formData, 'destLayer', 0, textureArray.image.depth - 1, 1 );
gui.add( formData, 'transfer' );

/// Setup the scene.

Expand Down Expand Up @@ -173,6 +173,15 @@

window.addEventListener( 'resize', onWindowResize );

// Initialize the texture array by first rendering the spirited away
// frames in order.

textureArray.mipmaps[ 0 ].data.set(
spiritedaway.mipmaps[ 0 ].data.subarray( 0, textureArray.mipmaps[ 0 ].data.length )
);
textureArray.needsUpdate = true;
renderer.render( scene, camera );

}

function onWindowResize() {
Expand Down

0 comments on commit 4c62a13

Please sign in to comment.