Skip to content

Python module to export standalone animations of 3D objects in HTML files.

Notifications You must be signed in to change notification settings

mimesis-inria/SimExporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

58e9598 · Sep 13, 2024

History

42 Commits
Sep 13, 2024
Sep 13, 2024
Sep 13, 2024
Sep 13, 2024
Sep 13, 2024
Sep 13, 2024
Jun 27, 2024

Repository files navigation

SimExporter

A small python tool to export standalone 3D interactive animations in HTML files using K3D.

gallery

Presentation

SimExporter is a Python module for creating 3D interactive scenes of various 3D objects using K3D and exporting a 3D plot or a 3D animation in a standalone HTML file.

This HTML file can then be shared and opened in any browsers and laptop, it can also be easily integrated into a website or presentation slides.

Gallery

See the interactive gallery in the documentation !

gallery

Try an integrated animation on our team website !

gallery

Install

# Option 1 (USERS): install with pip
$ pip install git+https://github.com/mimesis-inria/SimExporter.git

# Option 2 (DEVS): install as editable
$ git clone https://github.com/mimesis-inria/SimExporter.git
$ cd SimExporter
$ pip install -e .

How to use

The code below is the minimum for exporting a 3D scene with various objects to a standalone HTML file:

from SimExporter.core import Exporter

# Create the exporter
exporter = Exporter()

# Add 3D objects to the scene
exporter.objects.add_points(positions=...)
exporter.objects.add_mesh(positions=..., 
                          cells=...)

# Export the scene to an HTML file
exporter.to_html(filename='scene.html')

The code below is the minimum for exporting a 3D animation with various objects to a standalone HTML file:

from SimExporter.core import Exporter

# Create the exporter
exporter = Exporter(animation=True)

# Add 3D objects to the scene
exporter.objects.add_points(positions=..., 
                            time_positions=...)
exporter.objects.add_mesh(positions=..., 
                          cells=..., 
                          time_positions=...)

# Export the animation to an HTML file
exporter.to_html(filename='animation.html')                          

To integrate the HTML file into a website or presentation slides, see the dedicated section in the documentation.

Documentation

See more ⟶ documentation

About

Python module to export standalone animations of 3D objects in HTML files.

Resources

Stars

Watchers

Forks

Releases

No releases published