Viewer3d type
  • 20 Jun 2023
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Viewer3d type

  • Dark
    Light

Article summary

The Viewer3d type provides helper functions which can be used with slots of the Viewer 3d control.

Usage

To use any of the functions described on this page, you must prefix them with the Viewer3d type name:

Viewer3d.modelParameter(Models3d.CoffeeCup, "visible", true)

And if you already named something else Viewer3d, you need an additional prefix:

HiveTypes.Viewer3d.modelParameter(Models3d.CoffeeCup, "visible", true)

Models3d.CoffeeCup is the preferred syntax to refer to a babylon asset for Viewer3d.modelParameter(). This term will generate the valid string ("Models3d/CoffeeCup") for our 3d viewer. In order to avoid future breaking change, DO NOT construct this string on your own.

Functions

  • modelParameter(modelName, parameterName, parameterValue)
  • tagParameter(tagName, parameterName, parameterValue)
  • nodeParameter(nodeName, parameterName, parameterValue)
  • materialParameter(materialName, parameterName, parameterValue)

All these functions can be used to create records with parameter descriptions that can be passed to the viewer 3d control's Set parameter value slot.

See the Set parameter value docs for more details on how to use these functions and what values to pass to them


Was this article helpful?

What's Next