https://github.com/openchemistry/tomvizweb
Tomviz web code supporting the Tomviz desktop application for web export of data
https://github.com/openchemistry/tomvizweb
Last synced: 5 months ago
JSON representation
Tomviz web code supporting the Tomviz desktop application for web export of data
- Host: GitHub
- URL: https://github.com/openchemistry/tomvizweb
- Owner: OpenChemistry
- License: bsd-3-clause
- Created: 2017-03-20T15:21:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-07-13T14:23:10.000Z (about 8 years ago)
- Last Synced: 2025-04-03T23:02:56.172Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://openchemistry.github.io/tomvizweb/
- Size: 69.5 MB
- Stars: 1
- Watchers: 14
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This directory bundle ArcticViewer for Tomviz usage.
Build
-----
To update and build the given viewer, just run the following commands:
```
$ npm install
$ npm run build:release
```
Usage
-----
Tomviz Web Viewer can be used inside any web site by loading the proper JavaScript library like below:
```
```
Then you need to position a `
` into your web content with the following informations.
```
```
Look for an actual export to see what the viewer could actually look like based on the data visualized.
Additional arguments can be provided to remove control UI, disable mouse interaction, create animation...
## Removing control UI
In order to remove the control UI, you can do so by adding `data-no-ui` attribute.
## Removing mouse control
In order to remove the control via mouse interaction, you can do so by adding `data-no-mouse` attribute.
## Initial state definition
Addition information can be provided to chose the exact camera angle and/or parameter setting.
To achieve that you will have to provide a `data-initialization` attribute like the following example:
```
```
## Adding animation
An animation can be achieved by changing several parameter at the same time but not the same time step.
Below is an example that will make the data spin changing `phi` and while also changing the `contour` value but using a different pace. The unit is actually in milliseconds.
```
```
## Step information
For local rendering and rotation animation, you may want to provide what is the amount you want to change a given parameter.
To do so, just provide the step information for those parameters with the attribute `data-step="azimuth=2&dolly=5"`
## Toggle interaction mode
When a viewer is used with `data-no-ui`, `data-no-mouse` and `data-animation`, you may feel helpless if you want to use the actual control panel to tune some parameter or the view. To do so, you will just need to __double click__ on the view to toggle the current mode you are in. This will stop the animation and you will gain back the mouse interaction.