Skip to content

Quickstart

Install

pip install vixar          # core
pip install "vixar[las]"   # + LAS reading (laspy)
pip install "vixar[all]"   # + LAS and mesh (meshio)

No Node.js is required — the JS engine ships pre-built inside the wheel.

A point cloud from a NumPy array

import numpy as np
import vixar as vx

xyz = np.random.rand(10_000, 3) * 100
viewer = vx.Viewer()
viewer.add_point_cloud(
    source=xyz,
    attributes={"elevation": xyz[:, 2]},
    color_by="elevation",
    cmap="spectral",
)
viewer.serve()   # opens http://localhost:8050 in your browser

LAS + an interactive slicer

viewer = vx.Viewer()
viewer.add_point_cloud("survey.las", color_by="elevation")
s = viewer.add_slicer(axis="z", position=450.0, label="450 m RL")
viewer.split_pane(True)            # show the 2-D cross-section pane
viewer.animate_slicer(s, start=300.0, end=600.0, fps=10)
viewer.serve()

Output targets

Method Use
viewer.show() Inline widget in Jupyter / VS Code
viewer.serve() Local FastAPI server, iframe-embeddable
viewer.to_html(...) A single self-contained .html file

Viewer keyboard shortcuts

R reset · T/F/S/I axis views · P split-pane · [ / ] nudge slicer · M measure · Space play/pause animation · H high-contrast · Ctrl+S screenshot · Esc cancel · F3 dev overlay.