viewerModelSubscribe

Examples

# Subscribe a viewer to a model
kind: Model
frame: my-home-frame
source: my-model
assignMaterials: # OPTIONAL
  my-gh-out1: my-blue-mat # geometric objects will be assigned the 'my-blue-mat' material
  my-gh-out2: my-red-mat # geometric objects will be assigned the 'my-red-mat' material
assignLayers: # OPTIONAL
  my-gh-out1: 1 # geometric objects will be placed on layer 1
  my-gh-out2: 2 # geometric objects will be placed on layer 2

Object properties

Name Type Required
kind Constant: Model yes
frame string yes
source string yes
assignMaterials Dictionary no
assignLayers Dictionary no

Object information

  • Object with the following properties:
    • kind (required): Constant Model
      • Subscribe to the results of a model to import them into this viewer
    • frame (required): string
      • The frame name the model you wish to subscribe to lives
    • source (required): string
      • The model name to use as a source. This is the same name as used in your contents
    • assignMaterials (optional):
      • Optionally assign materials to different outputs of your model
      • Dictionary of:
        • string
    • assignLayers (optional):
      • Optionally assign layers to different outputs of your model
      • Dictionary of:
        • One of the following types:
          • Constant 0
          • Constant 1
          • Constant 2
          • Constant 3