viewerConfig

Examples

kind: Viewer
settings: # OPTIONAL
  kind: BasicSettings
  size: 500
  grid: true
  axes: true
  fog: true
  shadows: true
viewerControls: # OPTIONAL
  topLeft:
    kind: ButtonBar
    orientation: vertical
    buttons:
      - kind: ZoomToFit
materials: # OPTIONAL
  my-blue-mat:
    kind: StandardMaterial
    color: [0, 0, 255]
  my-red-mat:
    kind: StandardMaterial
    color: [255, 0, 0]        
subscribe: # OPTIONAL
  - kind: Model
    frame: my-home-frame
    source: my-model
    assignMaterials:
      my-gh-out1: my-blue-mat
      my-gh-out2: my-red-mat
    assignLayers:
      my-gh-out1: 2
      my-gh-out2: 3
  - kind: ControlPanel
    frame: my-home-frame
    source: my-control-panel
    control: my-control
    material: my-blue-mat # change the colour of 'my-blue-mat'
    assignMaterialPropertiesByKey:
      my-key-blue1:
        color: [0, 0, 255]
      my-key-blue2:
        color: [0, 0, 180]
      my-key-blue3:
        color: [0, 0, 100]
objects: # OPTIONAL
  - kind: Obj
    objFile: my-geometry1.obj
    material: my-blue-mat
    layers: [0, 1]
  - kind: Obj
    objFile: my-geometry2.obj
    material: my-red-mat
    layers: [0, 2]

Object properties

Name Type Required
kind Constant: Viewer yes
materials Dictionary no
viewerControls Object no
subscribe Array no
settings Object: settingsConfig no
objects Array no

Object information

  • Object with the following properties:
    • kind (required): Constant Viewer
      • The Viewer can be used to display (parametric) geometry
    • materials (optional):
    • viewerControls (optional): Object with the following properties:
    • subscribe (optional):
    • settings (optional): Object settingsConfig
    • objects (optional):
      • Objects to place into the viewer scene
      • Array of: