trimesh.viewer package¶
Submodules¶
Module contents¶
viewer¶
View meshes and scenes via pyglet or inline HTML.
- trimesh.viewer.in_notebook()¶
Check to see if we are in an IPython or Jypyter notebook.
- Returns:
in_notebook – Returns True if we are in a notebook
- Return type:
bool
- trimesh.viewer.scene_to_html(scene)¶
Return HTML that will render the scene using GLTF/GLB encoded to base64 loaded by three.js
- Parameters:
scene (trimesh.Scene) – Source geometry
- Returns:
html – HTML containing embedded geometry
- Return type:
str
- trimesh.viewer.scene_to_notebook(scene, height=500, **kwargs)¶
Convert a scene to HTML containing embedded geometry and a three.js viewer that will display nicely in an IPython/Jupyter notebook.
- Parameters:
scene (trimesh.Scene) – Source geometry
- Returns:
html – Object containing rendered scene
- Return type:
IPython.display.HTML