Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kitware/vtp-web-viewer
A simple, standalone VTP viewer for the TeleSculptor Multiplex project
https://github.com/kitware/vtp-web-viewer
3d visualization vtkjs web
Last synced: 3 days ago
JSON representation
A simple, standalone VTP viewer for the TeleSculptor Multiplex project
- Host: GitHub
- URL: https://github.com/kitware/vtp-web-viewer
- Owner: Kitware
- License: apache-2.0
- Created: 2022-01-13T19:50:44.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-20T18:00:07.000Z (almost 3 years ago)
- Last Synced: 2024-12-30T11:44:20.205Z (19 days ago)
- Topics: 3d, visualization, vtkjs, web
- Language: JavaScript
- Homepage: https://kitware.github.io/vtp-web-viewer/
- Size: 9.76 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vtk.js Standalone VTP Viewer
This is for embedding a VTP file into a standalone HTML web app for 3D viewing
with vtk.js## Usage
Please head over to the [releases page](https://kwgitlab.kitware.com/bane.sullivan/vtp-web-viewer/-/releases)
and download the pre-built HTML file from the latest release notes with the
Python script for "injecting" a VTP mesh file into the viewer.Once you have both files downloaded, point the Python script to both your VTP
mesh file and the prebuilt HTML file:```
python inject_data.py .vtp index.html
```This will ouptut a new HTML file next to the mesh file where you can view that
mesh and share the HTML file for anyone to view it (with/without an internet
connection and without sharing the original mesh file).## Local Development
Install the app:
```
npm install
```Build the static HTML app:
```
npm run-script build
```Inject your `.vtp` mesh file into the app:
```
python inject_data.py .vtp dist/index.html
```And then you can share the produced `.html` file with the same basename as the
mesh for 3D viewing anywhere!## Notes
For building source in the HTML file, see https://github.com/DustinJackson/html-webpack-inline-source-plugin/issues/79
## Supported VTP File Types
The given mesh file should have a point data array named `'RGB'`.
|| Appended | Ascii | Binary |
|------|----|----|----|
| None | ✅ | ✅ | ✅ |
| LZ4 | ❌ | ❌ | ❌ |
| ZLib | ✅ | ✅ | ✅ |
| LZMA | ❌ | ❌ | ❌ |Of the supported formats, `Appended-ZLib` has the mallest file size. For one specific mesh, here is a comparison. This should scale:
|| Appended | Ascii | Binary |
|------|----|----|----|
| None | 27 Mb | 48 Mb | 35 Mb |
| ZLib | 8.7 Mb | 48 Mb | 11 Mb |