[IPython-dev] Conflict between IPython notebook javascript and three.js?

David Powell DavidAnthonyPowell+python at gmail.com
Fri Oct 31 03:19:10 EDT 2014

I am trying to display 3D objects in IPython notebooks, and so far
three.js looks like the most promising approach. In particular, it is
important that the 3D plot is still visible after converting the
notebook to html.

So far I have succeeded in getting a basic example working, by
adapting http://nbviewer.ipython.org/github/payne92/notebooks/blob/master/00%20Javascript%20In%20Notebooks.ipynb

However, I run into problems when I include the trackball controls
from three.js, and restrict the controls to input only on the cavas
DOM element (so that clicking outside the canvas does not modify the
perspective). The trackball controls do not work correctly, as can be
seen by running the attached notebook example.

When I export the notebook to html, I see that the wegbl output is
present as I wanted. Furthermore, it seems that in the html, the
trackball controls work perfectly. This suggests that the problem is
some kind of conflict with the notebook's javascript. Any hints as to
the possible cause of this problem would be greatly appreciated.

In case it matters, I am using IPython 2.3

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141031/9ead1efb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Cube geometry.ipynb
Type: application/octet-stream
Size: 28930 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141031/9ead1efb/attachment.obj>

More information about the IPython-dev mailing list