Metadata-Version: 2.4
Name: vixar
Version: 1.0.2
Summary: Proprietary geoscientific 3D/2D visualization engine, distributed as a Python library.
Author: Vixar
License: Proprietary
Keywords: geoscience,mining,point-cloud,visualization,webgl
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.10
Requires-Dist: anywidget>=0.9
Requires-Dist: fastapi>=0.110
Requires-Dist: numpy>=1.24
Requires-Dist: pandas>=2.0
Requires-Dist: pydantic>=2.5
Requires-Dist: pyproj>=3.5
Requires-Dist: uvicorn>=0.27
Provides-Extra: all
Requires-Dist: laspy>=2.5; extra == 'all'
Requires-Dist: lazrs>=0.5; extra == 'all'
Requires-Dist: meshio>=5.3; extra == 'all'
Provides-Extra: dev
Requires-Dist: httpx>=0.27; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.26; extra == 'docs'
Provides-Extra: las
Requires-Dist: laspy>=2.5; extra == 'las'
Requires-Dist: lazrs>=0.5; extra == 'las'
Provides-Extra: mesh
Requires-Dist: meshio>=5.3; extra == 'mesh'
Description-Content-Type: text/markdown

# Vixar

**Proprietary geoscientific 3D/2D visualization engine for Python.**

Vixar renders point clouds, boreholes, block models, surfaces, and volumes in
WebGL2 — inside a Jupyter notebook, a local browser, or a self-contained HTML
file. No Node.js required; the engine ships pre-built inside the wheel.

```python
import vixar as vx

viewer = vx.Viewer(theme="dark")
viewer.add_point_cloud("survey.las", color_by="elevation", cmap="spectral")
viewer.serve()           # local web server — opens http://localhost:8050
# viewer.show()          # inline Jupyter / VS Code widget
# viewer.to_html("scene.html")  # standalone HTML file
```

## Install

```bash
pip install vixar                # core
pip install "vixar[las]"         # + LAS / LAZ point-cloud reading
pip install "vixar[all]"         # + LAS, LAZ, and mesh formats (meshio)
```

## Features

- **Full geology geometry suite** — point clouds (inline + streamed), boreholes,
  block models, ore bodies, surfaces (OBJ / GOCAD TS), volumes, isosurfaces.
- **Scales to 20+ GB** via spatial tiling, octree frustum-culling, LOD, and an
  LRU tile cache with optional IndexedDB persistence.
- **LAS / LAZ support** — reads LAS 1.x–1.4 and LASzip-compressed LAZ files
  transparently with the `vixar[las]` extra.
- **Interactive tools** — slicer planes, split-pane cross-section, distance and
  angle measurement, 3-D annotations, slicer animation.
- **Rust/WASM acceleration** for LAS parsing and Marching Cubes (≈2–5× faster).
- **Export** — high-res PNG screenshot, WebM video via `record_video()`,
  standalone HTML via `to_html()`.
- **Accessible** — ARIA-labelled controls, keyboard shortcuts, high-contrast mode
  (`H` key or `viewer.set_high_contrast(True)`), graceful WebGL2 fallback.
- **Full UTM support** — float64 in Python, camera-relative float32 in the GPU;
  no precision jitter at any scale.

## Quick examples

### Tiled streaming (large datasets)

```python
from vixar.tiler import tile_point_cloud

# Pre-tile once (can be done offline)
tile_point_cloud("large_survey.las", output_dir="./tiles/", tile_size=100.0)

viewer = vx.Viewer()
viewer.add_tiled_point_cloud("./tiles/meta.json", name="Survey")
viewer.serve()
```

### Block model + isosurface

```python
import numpy as np

viewer = vx.Viewer()
viewer.add_block_model(
    df,                        # DataFrame with x, y, z, au_ppm columns
    x_col="x", y_col="y", z_col="z",
    value_col="au_ppm", cmap="hot",
    block_size=(10, 10, 5),
)
viewer.add_isosurface(grid, threshold=0.5, name="0.5 g/t shell")
viewer.serve()
```

### CLI tiling

```bash
vixar tile survey.las --output ./tiles/ --tile-size 100 --color-by intensity
```

## Keyboard shortcuts

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

## Documentation

Full API reference, architecture notes, and format support:
**[omkar3344.github.io/Vixar](https://omkar3344.github.io/Vixar)**

## Development

```bash
pnpm install
pnpm build:viewer          # compiles viewer.js → python/src/vixar/static/
cd python && pip install -e ".[dev]"
pytest
pnpm test                  # JS unit tests
pnpm test:e2e              # Playwright E2E (4 browsers)
```
