Jupyter Advent Calendar 2016 Day 10 @ enakai00's article "How to execute kernel code from JavaScript on Jupyter notebook From: //enakai00.hatenablog.com/entry/2016/12/10/141301) ”, I was told that you can execute arbitrary JavaScript within Jupyter.
Let's run Hello, X3DOM!.
Jupyter notebook below: https://gist.github.com/anonymous/8359a7be1499fa9c63ef5eb1af181b9e
from IPython.display import HTML
javascript = '''
<script type='text/javascript' src='http://www.x3dom.org/download/x3dom.js'> </script>
<link rel='stylesheet' type='text/css' href='http://www.x3dom.org/download/x3dom.css'></link>
<x3d width='400px' height='300px'>
<scene>
<shape>
<appearance>
<material diffuseColor='1 0 0'></material>
</appearance>
<box></box>
</shape>
</scene>
</x3d>
'''
HTML(javascript)
Hello X3DOM on Jupyter !
Recommended Posts