I finally have a preliminary version of basic Three.js support for the Sage command line:
https://trac.sagemath.org/ticket/12402 It's not yet integrated with the Rich Output backend because I want to see whether people have any interest in it first. It currently works just like the cell server: wrap any Graphics3d object with threejs(). Please do have a look! On Friday, June 24, 2016 at 8:53:32 PM UTC-7, Andrey Novoseltsev wrote: > > On Friday, 24 June 2016 15:38:06 UTC-6, Paul Masson wrote: >> >> Andrey, you're absolutely right about the difference between Jmol and >> JSmol. I guess I got confused because there doesn't appear to be a way to >> launch JSmol from the Sage command line, only in the context of a notebook. >> Typing "show(plot3d(...,view='canvas3d'))" at the command line still >> launches the Java version. >> >> Is this a design decision? Is there some reason why the JavaScript >> version can't be launched in a new browser window, just like the Tachyon >> viewer opens a .png? This would have a bearing on how Three.js would be >> used on the desktop. Must it also be restricted to the notebook environment? >> >> This is probably a discussion for sage-devel, but I'd like a bit more >> context before starting it there. Thanks! >> >> > You probably should look over > https://github.com/sagemath/sage/tree/master/src/sage/repl/rich_output > > Jmol for the command line is launched by > > https://github.com/sagemath/sage/blob/master/src/sage/repl/rich_output/backend_ipython.py#L265 > Nothing prevents you from making it use JSmol rather than Jmol, just make > the function create appropriate web page to feed to a browser. Historically > there was only Java version so it is used everywhere where the switch was > not made. In principle Java has some advantages like being faster (I am > actually not sure if there is anything else), but in reality I think the > choice is between JS and not working at all... > > I also remembered why I don't recall any threejs code in SMCell - it is in > a separate coffee file > https://github.com/sagemath/sagecell/blob/master/js/3d.coffee > and the only change to it by me was move to js folder, everything else was > done by Jason 2 years ago. So feel free to tinker with it and perhaps ask > William where is the current version of his code. > -- You received this message because you are subscribed to the Google Groups "sage-cell" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cell/a4fa740b-ba1d-4117-aa76-5474ead1ae08%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
