-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
WebGPURenderer: Introduce CanvasTarget
#31919
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
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
|
After seeing the shape and properties of // -- setup --
const canvas = document.querySelector( '#mycanvas' );
const output = new THREE.RenderOutput( canvas );
// -- loop --
renderer.setRenderOutput( output );
renderer.render( scene, camera );Regarding this:
How would the |
I think And if so, should |
|
After more testing on I can confirm reverting this PR fixes |
| descriptionElement.innerText = 'Scene ' + ( i + 1 ); | ||
| element.appendChild( descriptionElement ); | ||
|
|
||
| const canvasTarget = new THREE.CanvasTarget( sceneCanvas, { antialias: true } ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the antialias parameter was removed in #31928. Not sure what the alternative is, or if this should just be removed?
Related issue: #31730
Description
Instead of using
RenderTargets, the current implementation considersCanvasTargetthe currentcanvas, always having one as default, and it cannot be null.The main motivation, besides bringing these new WebGPU features, is to inspect the nodes individually through the new inspector.
The API follows @mrdoob ’s suggestion. #31730 (comment)