Metadata-Version: 2.4
Name: compas_threejs
Version: 1.0.1
Summary: A lightweight Three.js viewer for COMPAS using Protobuf
Author-email: Eric Gozzi <eric.gozzi@arch.ethz.ch>, Nicolas Benjamin Boscoboinik <boscoboinik@arch.ethz.ch>
License-Expression: MIT
Project-URL: Homepage, https://compas.dev/compas_threejs
Project-URL: Documentation, https://compas.dev/compas_threejs
Project-URL: Repository, https://github.com/compas-dev/compas_threejs
Project-URL: Changelog, https://github.com/compas-dev/compas_threejs/blob/main/CHANGELOG.md
Project-URL: Forum, https://forum.compas-framework.org/
Project-URL: Issues, https://github.com/compas-dev/compas_threejs/issues
Keywords: compas,viewer,threejs,protobuf
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: compas
Requires-Dist: compas-pb<2,>=1
Requires-Dist: compas_brep[occ]
Requires-Dist: websockets
Requires-Dist: fastapi
Requires-Dist: uvicorn
Requires-Dist: rich
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: bump-my-version; extra == "dev"
Requires-Dist: invoke; extra == "dev"
Requires-Dist: mkdocs; extra == "dev"
Requires-Dist: mkdocs-material; extra == "dev"
Requires-Dist: mkdocstrings; extra == "dev"
Requires-Dist: mkdocstrings-python; extra == "dev"
Requires-Dist: compas_invocations2[mkdocs]>=1.0.2; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: wheel; extra == "dev"
Requires-Dist: pytest>=8.4.2; extra == "dev"
Dynamic: license-file

# COMPAS ThreeJS

<p align="center">
    <a href="https://pypi.org/project/compas-threejs/"><img src="https://img.shields.io/pypi/v/compas-threejs.svg" alt="PyPI version"></a>
    <a href="https://pypi.org/project/compas-threejs/"><img src="https://img.shields.io/pypi/pyversions/compas-threejs.svg" alt="Python versions"></a>
    <a href="https://github.com/compas-dev/compas_threejs/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License MIT"></a>
    <a href="https://github.com/compas-dev/compas_threejs/actions"><img src="https://github.com/compas-dev/compas_threejs/actions/workflows/build.yml/badge.svg" alt="Build Status"></a>
    <a href="https://compas.dev/compas_threejs"><img src="https://img.shields.io/badge/docs-latest-brightgreen.svg" alt="Documentation"></a>
    <a href="https://compas.dev/mission-control/#compas_threejs"><img src="https://compas.dev/badge.svg" alt="Made with COMPAS"></a>
</p>

`compas_threejs` is a browser-based 3D viewer for COMPAS geometry. The Python
package serves a bundled Three.js frontend and exchanges geometry, scene, and
interaction messages through COMPAS Protobuf and WebSockets.

## Installation

```bash
pip install compas_threejs
```

## Quick start

```python
from compas.geometry import Box
from compas_threejs.viewer import App

viewer = App()
viewer.add_geometry(Box(2, 3, 1))
viewer.start(show=True)
```

The viewer runs until interrupted with `Ctrl+C`.

## Related projects

- [TypeScript viewer](https://github.com/compas-dev/compas_threejs_ts)
- [COMPAS](https://github.com/compas-dev/compas)
- [COMPAS Protobuf](https://github.com/compas-dev/compas_pb)

## License

MIT, copyright COMPAS Association. See [LICENSE](LICENSE).
