-
Notifications
You must be signed in to change notification settings - Fork 216
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
make viewer='threejs' be the default for 3d plots in jupyter notebooks with sage #1963
Comments
From Eric Gourgoulhon:
so marking this "upstream" |
Security improvements have broken the install, so viewer='threejs' no longer works at all, with errors (in the console) like this: "a.html:16 GET https://cocalc.com/nbextensions/threejs/OrbitControls.js net::ERR_ABORTED 404; a.html:1 Refused to execute script from 'https://cocalc.com/nbextensions/threejs/OrbitControls.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled." at least for me in Chrome 69.
|
Is it possible to set threejs as default viewer from inside a notebook ? |
Any use of three.js at all with the Sage kernel from Jupyter is still completely broken. |
I haven't actually encountered this specific issue. In Sage 8.7 at least ThreeJS in the Jupyter Notebook is working fine for me, even on Windows. That's when running locally at least. There is a known problem with this when running Notebooks in Binder. I haven't looked too deeply into it yet but I know it's a major blocker (though that problem also affects using JSmol). The problem I'm trying to fix right now is the long-standing problem with shading of polytopes mentioned at: https://trac.sagemath.org/ticket/22408#comment:33 The fix to that from the ThreeJS perspective is easy enough: Use flat shading. What I'm not clear is what the best way is, through Sage's 3D graphics framework, to pass that rendering detail around in a generic manner. I'm still trying to understand how things are supposed to work in the plot3d module. But in any case that's just a 3D rendering detail, and not the more tedious, mundane kind of problems we have with server/browser/file path interactions. |
embray for me, as williamstein indicates , in the Jupyter notebook threejs doesn't work (produces no image) while it works fine in a sage worksheet (this is on CoCalc). One of the problems is I want to be able to save the html of a 3d image, and apparently that can only be done from the Jupyter notebook, so...Catch-22 !!! Thanks for any help or suggestions! williamstein suggested to me that I write to sage support, which I will also do... |
It is now the case that sage jupyter uses threejs by default, so this is a non-issue. |
We may have to do this by simply modifying the sage source code.
The reason is that the jmol.js default is horrendously slow / inefficient / painful...
Uses jmol and hurts BAD, e.g., 1000x worse than threejs:
Then with three.js, which is very fast and smooth!
The text was updated successfully, but these errors were encountered: