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

ENH: JupyterLite, WebGL #38

Open
westurner opened this issue Mar 11, 2023 · 6 comments
Open

ENH: JupyterLite, WebGL #38

westurner opened this issue Mar 11, 2023 · 6 comments

Comments

@nir
Copy link
Owner

nir commented Apr 14, 2023

I don't think it can be made to work without a SIGNIFICANT amount of work

@westurner
Copy link
Author

westurner commented Apr 14, 2023

Hopefully the compiler will do most of that work. Maybe @martinRenou knows of an example emscripten-forge empack package that has OpenGL/EGL code?

ipygany does 3D in notebooks with VTK, which may or may not already be transpiled to WASM IIUC
https://github.com/QuantStack/ipygany

There may need to be a 'polyfill' like requests-wasm-polyfill?
https://github.com/emscripten-forge/recipes/blob/main/recipes/recipes_emscripten/requests-wasm-polyfill/recipe.yaml

Students could easily develop and share STEM games with a WASM compilation of jupylet that works in JupyterLite or VSCode.dev

@martinRenou
Copy link

Maybe @martinRenou knows of an example emscripten-forge empack package that has OpenGL/EGL code?

I don't!

ipygany does 3D in notebooks with VTK, which may or may not already be transpiled to WASM IIUC

ipygany only uses VTK on the back-end for file loading, the rendering is done entirely using WebGL.

From time to time I google to see if Kitware folks provide an easy way to compile VTK for WASM, thankfully today you triggered that search and it seems to be fruitful https://gitlab.kitware.com/vtk/vtk-wasm-docker (initial commit a month ago).

Though I guess all of this VTK discussion is completely out of scope for jupylet, so sorry for the spamming. If you want, @westurner, I'd be happy to have this discussion under an ipygany issue.

@nir
Copy link
Owner

nir commented Apr 14, 2023

hi @martinRenou, you were one of the first people to star jupylet when it first came out. thanks! :)

@nir
Copy link
Owner

nir commented Apr 14, 2023

@westurner, I don't have the time to jump into such a project at the moment, but I see that jupyterlite supports numpy ipywidgets and ipyevents, and is using async just as classic jupyter, so actually it may be possible to put aside audio, 3d, and sharertoy support and just reimplement the sprites and labels modules and start with them and get an initial version of jupylet for jupyterlite and continue from there (that is how jupylet started anyway).

@westurner
Copy link
Author

an example emscripten-forge empack package that has OpenGL/EGL code?

It looks like there's already glfw support in emscripten.

Is VTK actually out of scope? There probably could be a VTK backend; IDK what the advantage would be.

actually it may be possible to put aside audio, 3d, and sharertoy support

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

No branches or pull requests

3 participants