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

feat(webgpu-rendering-context): import webgpu renderer #99

Merged
merged 4 commits into from
Sep 14, 2023

Conversation

esterTion
Copy link
Contributor

@esterTion esterTion commented Sep 11, 2023

This PR closes #74

Copy link
Member

@Lutra-Fs Lutra-Fs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node_modules\three\examples\jsm\capabilities\WebGPU.js
or how do we add the three addons? needs to specify these instructions first.

@esterTion
Copy link
Contributor Author

they are already in the three package, and import will work with current configuration.
the only thing required is typescript declaration of the type, since these modules are not released yet

this commits fix that vite is complaining about
top-level await used in threejs. it is ok to bump the version
since our support target is
2 most recent Chromium/Firefox/Safari version

Signed-off-by: Bill ZHANG <[email protected]>
@@ -59,6 +63,15 @@ function DiffusionPlane(
props: ThreeElements['mesh'] & Renderable,
): React.ReactElement {
// INITIALISATION

// WebGPU capability test
if ( WebGPU.isAvailable() === true ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CFlowSim\src\components\Simulation.tsx
  68:8   error  Unsafe call of an `any` typed value  @typescript-eslint/no-unsafe-call
  69:11  error  Unsafe assignment of an `any` value  @typescript-eslint/no-unsafe-assignment

line returns these errors in npm run lint

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also pls make sure that you have configured prettier as the formatter.

@Lutra-Fs
Copy link
Member

they are already in the three package, and import will work with current configuration. the only thing required is typescript declaration of the type, since these modules are not released yet

Understood. pls resolve format and linting error to get it merged

Copy link
Member

@Lutra-Fs Lutra-Fs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Lutra-Fs Lutra-Fs requested a review from kyubxy September 12, 2023 06:53
@Lutra-Fs Lutra-Fs merged commit 089feed into main Sep 14, 2023
2 checks passed
@Lutra-Fs Lutra-Fs deleted the webgpu-rendering-context branch September 14, 2023 04:58
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.

import WebGPU threejs addons into project
4 participants