export_vtkjs#

Plotter.export_vtkjs(filename, compress_arrays=False)#

Export the current rendering scene as a VTKjs scene.

It can be used for rendering in a web browser.

Parameters
filenamestr

Filename to export the scene to. A filename extension of '.vtkjs' will be added.

compress_arraysbool, optional

Enable array compression.

Examples

>>> import pyvista
>>> from pyvista import examples
>>> pl = pyvista.Plotter()
>>> _ = pl.add_mesh(examples.load_hexbeam())
>>> pl.export_vtkjs("sample")