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

Update the jupyter notebook example to use current version #19

Open
ChristopherChudzicki opened this issue Apr 2, 2022 · 4 comments
Open

Comments

@ChristopherChudzicki
Copy link
Collaborator

See discussion in #17

@divisuals
Copy link

divisuals commented Mar 28, 2023

Spent some time debugging this issue, and here are a few findings:

  • the original mathbox-bundle used in the example notebook was not UMD, and had both THREE and other examples (controls) bundled together, so that needs to be re-created here
  • searching the web, it seems that loading a UMD-style module (latest mathbox) in an AMD (requirejs in jupyter) environment will run into issues - see here

I tested vanilla THREE setup with OrbitControls and make it work independently in a notebook - happy to add that if there's interest. For now, this is just stuck on the module incompatibility, and I can't seem to find any obvious workarounds.

Creating an old-style bundle just for this use-case is probably unnecessary, so not quite sure where to go from here @sritchie / @ChristopherChudzicki

@divisuals
Copy link

divisuals commented Mar 29, 2023

Another related update - when I tried to use the library in another AMD/require environment (ObservableHQ), the UMD bundle isn't looking usable. Public notebook here has more details - re-capturing the summary:

Attempts to import new mathbox bundles (v2.3.1) fail so far. Even the helper notebook fails for all combinations!
https://observablehq.com/@observablehq/module-require-debugger
Library needs a few fixes - possibly similar problems encountered here, and a possible webpack resolution

For now, added older examples in this collection using similar structure from the Jupyter notebook

@sritchie
Copy link
Collaborator

sritchie commented Apr 4, 2023

Thank you for digging into these issues! I am swamped with some work that uses this code, so I won't have time to get to these for a while. Hopefully that is not a blocker on anything you're doing. I think it's important to get this fixed and to get that readback example working, eventually, so thank you again.

@divisuals
Copy link

Happy to help!

Having a cleaner webpack bundle would help but this isn't blocking my downstream experiments as I'm using (ESM) source directly. I will definitely raise issues/ pull requests for any urgent blockers. Thanks

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