diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml
index 9d50fff..8be1ba1 100644
--- a/.github/workflows/documentation.yml
+++ b/.github/workflows/documentation.yml
@@ -13,7 +13,7 @@ jobs:
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
- pip install sphinx sphinx_rtd_theme myst_parser numpy k3d vedo colour
+ pip install sphinx sphinx_rtd_theme sphinx-tabs myst_parser numpy k3d vedo colour
- name: Sphinx build
run: |
sphinx-build docs/src docs/build
diff --git a/docs/src/_static/html/points.html b/docs/src/_static/html/points.html
new file mode 100644
index 0000000..01852c1
--- /dev/null
+++ b/docs/src/_static/html/points.html
@@ -0,0 +1,2210 @@
+
+
+
+
+ K3D snapshot viewer - [TIMESTAMP]
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/src/conf.py b/docs/src/conf.py
index 9b78072..2d3fd53 100644
--- a/docs/src/conf.py
+++ b/docs/src/conf.py
@@ -32,7 +32,7 @@
'sphinx.ext.autosummary',
'sphinx.ext.viewcode',
'sphinx.ext.extlinks',
- ]
+ 'sphinx_tabs.tabs']
intersphinx_mapping = {'python': ('https://docs.python.org/3/', None),
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
diff --git a/docs/src/demo.rst b/docs/src/demo.rst
index 879f7c0..1b1dc89 100644
--- a/docs/src/demo.rst
+++ b/docs/src/demo.rst
@@ -2,41 +2,90 @@
Demo
====
-.. raw:: html
-
-
-
-.. code-block:: python
-
- from SimExporter.core import Exporter
-
- # Load data
- ...
-
- # Create the exporter
- exporter = Exporter(animation=True,
- fps=50)
-
- # Add meshes to the scene
- exporter.objects.add_mesh(positions=...,
- cells=...,
- color=[192, 28, 40],
- alpha=0.6,
- flat_shading=False,
- time_positions=...)
- exporter.objects.add_mesh(positions=...,
- cells=...,
- alpha=1.,
- flat_shading=False,
- wireframe=True,
- colormap_name='Reds',
- colormap_range=[0, 1],
- time_colormap_values=...,
- time_positions=...)
-
- # Export to HTML
- exporter.process(filename='scene.html',
- background_color='black',
- menu_visible=True,
- grid_visible=False,
- frame_visible=True)
+
+.. tabs::
+
+ .. group-tab:: Meshes
+
+ .. raw:: html
+
+
+
+ .. group-tab:: Points
+
+ .. raw:: html
+
+
+
+.. tabs::
+
+ .. group-tab:: Meshes
+
+ .. code-block:: python
+
+ from SimExporter.core import Exporter
+
+ # Load data
+ ...
+
+ # Create the exporter
+ exporter = Exporter(animation=True,
+ fps=50)
+
+ # Add meshes to the scene
+ exporter.objects.add_mesh(positions=...,
+ cells=...,
+ color=[192, 28, 40],
+ alpha=0.6,
+ flat_shading=False,
+ time_positions=...)
+ exporter.objects.add_mesh(positions=...,
+ cells=...,
+ alpha=1.,
+ flat_shading=False,
+ wireframe=True,
+ colormap_name='Reds',
+ colormap_range=[0, 1],
+ time_colormap_values=...,
+ time_positions=...)
+
+ # Export to HTML
+ exporter.process(filename='scene.html',
+ background_color='black',
+ menu_visible=True,
+ grid_visible=False,
+ frame_visible=True)
+
+ .. group-tab:: Points
+
+ .. code-block:: python
+
+ from SimExporter.core import Exporter
+
+ # Load data
+ ...
+
+ # Create the exporter
+ exporter = Exporter(animation=True,
+ fps=50)
+
+ # Add meshes to the scene
+
+ exporter.objects.add_points(positions=...,
+ point_size=2.,
+ colormap_name='YlOrBr',
+ time_colormap_values=...,
+ time_positions=...)
+ exporter.objects.add_mesh(positions=...,
+ cells=...,
+ color='grey',
+ alpha=0.6,
+ wireframe=True,
+ time_positions=...)
+
+ # Export to HTML
+ exporter.process(filename='scene.html',
+ background_color='black',
+ menu_visible=True,
+ grid_visible=False,
+ frame_visible=True)