three.js - 有没有办法在 jupyter 的 ijavascript 内核中运行threejs?
问题描述
我有一个建立在三个.js 之上的库,我想在 ijavascript (jupyter + ijavascript) 笔记本中运行它。有谁知道这是否可能?
据我所知,three.js 使用 require('three') 运行得很好,但我在附加渲染器时遇到了麻烦。
解决方案
已经有一个成熟的解决方案,您可以使用 Jupyter-Widigts 以更 Pythonic 的方式进行编码。
pythreejs three.js 嵌入在一个 jupyter widgit 中
在笔记本中显示一个绿色球体。
ball = Mesh(geometry=SphereGeometry(radius=1),
material=MeshLambertMaterial(color='#00ff00'),
position=[0, 0, 0])
ball
推荐阅读
- python - 无法选择列名列表并在 Streamlit 中查看这些列中的数据
- css - Removing a break line from the form text input
- configuration - Filebeat 中央管理替代方案
- laravel - 嵌套的雄辩关系
- dll - Uno WASM 在使用 DLL 时无法解析包
- javascript - NW.js 中的 nvm-windows Node.js 版本更改
- javascript - 使用Javascript遍历无序列表
- postgresql - 如何从包含数组的某个键的 jsonb 列中获取 uniq 数据?
- vue.js - 在 Nuxt JS 中重新加载页面后路由参数值消失
- c++ - 如何在 C++ 中调试未捕获的异常核心转储