-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Sage: Black canvas output when using threejs viewer in jupyter notebook #118806
Comments
Hi @tenaf0, thanks for working on this! I took the easy way out in #113603 and I am glad someone is fixing this. I am working on updating Sage to version 9.3, and it's my goal to finish this ASAP so we can have it in NixOS 21.05. Hopefully that will make it easier to use threejs-sage directly, since I believe 9.3 is the first version to use the threejs fork. I am posting updates in #116365 and I will probably have more time to work on it this weekend. |
I'm not sure how I missed that pull request, thanks for linking it! I've subscribed to both and will try to be somehow useful. |
Sage (even 9.3) uses I've included your changes in my Sage 9.3 branch [2] and 3D graphics in Jupyter notebooks work fine there, many thanks! I copied authorship data from a pull request of yours, but I can change that if you prefer. I haven't tried to backport the patch to Sage 9.2, but it should be doable. The only thing to keep in mind is that Sage 9.2 greps [0] https://github.com/sagemath/sage/blob/develop/src/sage/ext_data/threejs/threejs_template.html#L89 |
By the way, my browser cached |
Sorry for not answering before, thank you for including me in the commit, but I hardly did anything :) Thank You for your work on the 9.3 update! Should I close this issue in your opinion, or wait for 9.3 being merged? |
It was just merged, so 3D plots should work again once the channels advance :) cc @ralsei @Synthetica9 (I think you were discussing this on IRC the other day) |
Describe the bug
On 3d1a771, the following issue happens:
The exact same issue as can be found on this arch forum post: https://bbs.archlinux.org/viewtopic.php?id=263728
I tried the same thing on master (5db7e33) where I got this instead:
current backend does not support offline threejs graphics
I did try fixing it by packaging https://github.com/sagemath/threejs-sage , but I could not fix it yet, and the iterations are quite slow due to having to recompile sage-lib all the time.
My changes are: using
three-sage = callPackage ./threejs-sage.nix {};
instead of the nodePackages.threejs package.And the following (not yet cleaned up) threejs-sage.nix file:
Just helping somehow decouple the js lib from the sage-lib build would be really helpful.
To Reproduce
Steps to reproduce the behavior:
sage -n jupyter
Expected behavior
The 3d plot of the given function in a threejs canvas.
@timokau
@omasanori
@collares
The text was updated successfully, but these errors were encountered: