brianzinn / react-babylonjs

React for Babylon 3D engine
https://brianzinn.github.io/react-babylonjs/
809 stars 102 forks source link

feat: webgpu support. #284

Closed zhangyahan closed 1 year ago

zhangyahan commented 1 year ago

add createEngine?: (canvas: HTMLCanvasElement) => Engine callback to custom engine.

zhangyahan commented 1 year ago

It seems that this method cannot be written like this, https://doc.babylonjs.com/setup/support/webGPU/webGPUBreakingChanges#creation-of-the-webgpu-engine-is-asynchronous

brianzinn commented 1 year ago

yeah, my original thought was that it would be a new component that needs to be enclosed in a Suspense (throw the createEngine promise). Likely also people would want it to fallback, so some kind of recipe for that.

zhangyahan commented 1 year ago

I changed it again, or did I use the original idea. I just started learning babylonjs, I don't want to make too many changes to the code.

brianzinn commented 1 year ago

sorry about not following up on this. it was a good PR.