3.0.15 • Published 3 years ago

vr-viz v3.0.15

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

VR-Viz

Installation

npm install --save vr-viz

How To Use

First import this component where you want to use it

import VRViz from "vr-viz"

Then just renders it

<VRViz />

Props

PropDescription
sceneSets the 3D Scene (non mandatory)
graphSets the graph specification

Resources

  • Detailed documentation of different graphs and props can be found in vr-viz github repo.
  • Examples can be found here

Supported Visualizations

Charts

  • 3D Bar Graph
  • 3D Stacked Bar Graph
  • 3D Lollipop Chart
  • 3D Rectangle Chart
  • 3D Scatter Plot / 3D Bubble Chat
  • 3D Connected Scatter Plot
  • 3D Mesh Plot
  • Waterfall Plot
  • 3D Time Series
  • 3D Spiral Plot

Maps

  • 3D Prism Map
  • 3D Map Bar Graph
  • 3D Map Stacked Bar Graph
  • MapTimeBars
  • IsolineMap
  • 3D Flow Map

Diagrams

  • 3D Cross Sectional View
  • 3D Contour Map
  • 3D Point Cloud
  • 3D Force Directed Graph
  • 3D TreeMap Plots

  • 3D Contour Plot

  • 3D Parametric Curve Plot
  • 3D Surface Plot
  • 3D Parametric Surface Plot

Example

import React from 'react';
import  VRViz  from 'vr-viz';

const App = () => {
  render() {
    return (
      <div className="App">
      <VRViz
        scene={
          {
            'sky': {
              'style': {
                'color': '#333',
                'texture': false,
              }
            },
            'lights': [
              {
                'type': 'directional',
                'color': '#fff',
                'position': '0 1 1',
                'intensity': 1,
                "decay": 1,
              },
              {
                'type': 'ambient',
                'color': '#fff',
                'intensity': 1,
                "decay": 1,
              }
            ],
            'camera': {
              'position': '10.5 5.5 11',
              'rotation': '0 0 0',
            },
          }
        }
        graph={
          [
            {
              'type': 'SurfacePlot',
              'style': {
                'origin': [0, 6, 0],
                'dimensions': {
                  'width': 10,
                  'height': 5,
                  'depth': 10,
                },
              },
              'mark': {
                'type': 'plane',
                'position': {
                  'x': {
                    'domain': [0, 2 * Math.PI],
                    'steps': 50,
                  },
                  'y': {
                    'function': (x, z) => x * Math.sin(x) - z * Math.cos(z),
                  },
                  'z': {
                    'domain': [0, 2 * Math.PI],
                    'steps': 50,
                  }
                },
                'style': {
                  'fill': {
                    'function': (x, z) => x * z,
                    'color': ['#DB4437', '#0f9d58'],
                    'opacity': 1,
                  },
                }
              },
              'axis': {
                'axis-box': {
                  'color': 'black',
                },
                'x-axis': {
                  'orient': 'bottom-back',
                  'ticks': {
                    'noOfTicks': 10,
                    'size': 0.1,
                    'color': 'black',
                    'opacity': 1,
                    'fontSize': 10,
                  },
                  'grid': {
                    'color': 'black',
                    'opacity': 1,
                  }
                },
                'y-axis': {
                  'orient': 'bottom-back',
                  'ticks': {
                    'noOfTicks': 10,
                    'size': 0.1,
                    'color': 'black',
                    'opacity': 1,
                    'fontSize': 10,
                  },
                  'grid': {
                    'color': 'black',
                    'opacity': 1,
                  }
                },
                'z-axis': {
                  'orient': 'bottom-back',
                  'ticks': {
                    'noOfTicks': 10,
                    'size': 0.1,
                    'color': 'black',
                    'opacity': 1,
                    'fontSize': 10,
                  },
                  'grid': {
                    'color': 'black',
                    'opacity': 1,
                  }
                }
              }
            }
          ]
        }
      />
      </div>
    );
  }
}

export default App;
3.0.15

3 years ago

3.0.12

3 years ago

3.0.13

3 years ago

3.0.10

3 years ago

3.0.11

3 years ago

3.0.14

3 years ago

3.0.9

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.8

3 years ago

3.0.7

3 years ago

3.0.6

3 years ago

3.0.5

3 years ago

3.0.0

3 years ago

2.3.4

5 years ago

2.3.3

5 years ago

2.3.2

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.1-security

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago