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

WebGL component #64

Open
stevenpetryk opened this issue Jan 2, 2023 · 4 comments
Open

WebGL component #64

stevenpetryk opened this issue Jan 2, 2023 · 4 comments
Labels

Comments

@stevenpetryk
Copy link
Owner

I think it'd be nice to add some sort of API for easily integrating webgl/threejs/react-three-fiber if someone wants to embed some really performance-intensive stuff into Mafs.

Much like the Mafs SVG stuff, this would really just be a matter of making sure that a WebGL canvas "has its bearings" and knows how to map things from coordinate space to pixel space.

An interesting idea would be to move Function and VectorField to WebGL to improve performance. VectorField would especially benefit. We do, however, lose server side rendering with that approach.

Side-note: I would never want Mafs to be pure WebGL, because it's really difficult to make that accessible. I enjoy how Mafs is keyboard accessible by default at the moment.

@debater-coder
Copy link

Possible WebGPU support?

@stevenpetryk
Copy link
Owner Author

Possible WebGPU support?

Something in particular you had in mind?

@debater-coder
Copy link

debater-coder commented Apr 28, 2023

Either through three.js or a raw implementation (WebGPU makes this actually feasible as it is less painful to work with directly). Not sure if there is much computation to GPU accelerate, but the graphics could definitely benefit.

@stevenpetryk
Copy link
Owner Author

The only computation worth GPU accelerating would be function plotting/sampling, but doing that on the GPU would require Mafs users to write their function in shader code.

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

No branches or pull requests

2 participants