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

Utils: export createCanvasElement to public and use it for WebGPURenderer module #26601

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

linbingquan
Copy link
Contributor

@linbingquan linbingquan commented Aug 19, 2023

Related issue: #XXXX

Description

Motivation: Export createCanvasElement function method, and use it for WebGPURenderer module. like:

createCanvasElement() {
const canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
canvas.style.display = 'block';
return canvas;
}

TODO:

  • Export createCanvasElement to public
  • Use createCanvasElement function for WebGPURenderer module from three.

@github-actions
Copy link

github-actions bot commented Aug 19, 2023

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
646.2 kB (160.3 kB) 646.2 kB (160.3 kB) +26 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
439.1 kB (106.4 kB) 439.1 kB (106.3 kB) +0 B

@Mugen87 Mugen87 added this to the r156 milestone Aug 20, 2023
@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 20, 2023

@linbingquan Do you want to implement the TODOs in this PR?

@linbingquan
Copy link
Contributor Author

linbingquan commented Aug 20, 2023

Do you want to implement the TODOs in this PR?

Done. But I am not sure it can pass CI tests without build latest three.module.js.

@linbingquan linbingquan changed the title Utils: export createCanvasElement to public Utils: export createCanvasElement to public and use it for WebGPURenderer module Aug 20, 2023
@Mugen87
Copy link
Collaborator

Mugen87 commented Aug 21, 2023

But I am not sure it can pass CI tests without build latest three.module.js.

#26608 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants