# MeshInstanceData

class `MeshInstanceData`()

  Object representing a Mesh instance that will be created by the client at run time. This class allows for the specification of instance specific properties of a mesh.

  ## Index

  Constructors

  - `constructor`

  Properties

  - `overlayId`

  Methods

  - `clear`
  - `copy`
  - `getCreationFlags`
  - `getFaceColor`
  - `getInstanceName`
  - `getLineColor`
  - `getLineOpacity`
  - `getMatrix`
  - `getMeshId`
  - `getOpacity`
  - `getOverlayIndex`
  - `getPointColor`
  - `getPointOpacity`
  - `setCreationFlags`
  - `setFaceColor`
  - `setInstanceName`
  - `setLineColor`
  - `setLineOpacity`
  - `setMatrix`
  - `setMeshId`
  - `setOpacity`
  - `setOverlayIndex`
  - `setPointColor`
  - `setPointOpacity`

## Constructors

`MeshInstanceData.``constructor`()
  MeshInstanceData(meshId: (None | `MeshId`), matrix: (None | `Matrix`), instanceName: (None | string), faceColor: (None | `Color`), lineColor: (None | `Color`), pointColor: (None | `Color`), creationFlags: (None | `MeshInstanceCreationFlags`)): `MeshInstanceData`

  Creates a new MeshInstanceData object.

  Parameters

  > meshId: (None | `MeshId`)

  > > the [[MeshId]] of the mesh to instantiate

  > matrix: (None | `Matrix`)

  > > a matrix that will be applied to this instance

  > instanceName: (None | string)

  > > a name that will be visible when querying the model hierarchy

  > faceColor: (None | `Color`)

  > > the color for faces of this instance

  > lineColor: (None | `Color`)

  > > the color for lines of this instance

  > pointColor: (None | `Color`)

  > > the color for points of this instance

  > creationFlags: (None | `MeshInstanceCreationFlags`)

  > > additional options that can be used to alter the behavior of this instance

  Returns: `MeshInstanceData`

## Properties

`MeshInstanceData.``overlayId`
  overlayId: `OverlayId`

  The overlay for this instance.

## Methods

`MeshInstanceData.``clear`()
  clear(): void

  Resets all fields of this object.

  Returns: void

`MeshInstanceData.``copy`()
  copy(): `MeshInstanceData`

  Creates a copy of this MeshInstanceData.

  Returns: `MeshInstanceData`

  > Copy of this MeshInstanceData object.

`MeshInstanceData.``getCreationFlags`()
  getCreationFlags(): `MeshInstanceCreationFlags`

  Gets the mesh instance creation flags (SuppressCameraScale, DoNotExplode, DoNotLight…)

  Returns: `MeshInstanceCreationFlags`

  > the mesh instance creation flags (null if none set)

`MeshInstanceData.``getFaceColor`()
  getFaceColor(): (None | `Color`)

  Gets the color for face elements in this instance.

  Returns: (None | `Color`)

  > the color for face elements.

`MeshInstanceData.``getInstanceName`()
  getInstanceName(): (None | string)

  Gets the name that will be applied to the instance.

  Returns: (None | string)

  > the instance name.

`MeshInstanceData.``getLineColor`()
  getLineColor(): (None | `Color`)

  Gets the color for line elements in this instance.

  Returns: (None | `Color`)

  > the color for line elements.

`MeshInstanceData.``getLineOpacity`()
  getLineOpacity(): number

  Gets the line opacity value for this instance.

  Returns: number

  > the line opacity value for this instance.

`MeshInstanceData.``getMatrix`()
  getMatrix(): (None | `Matrix`)

  Gets the matrix to apply to this instance.

  Returns: (None | `Matrix`)

  > the current matrix that will be applied to this instance upon creation.

`MeshInstanceData.``getMeshId`()
  getMeshId(): (None | `MeshId`)

  Gets the [[MeshId]] of the mesh to use for this instance. [[MeshId]]s are created with [[Model.createMesh]] or retrieved with [[Model.getMeshIds]].

  Returns: (None | `MeshId`)

  > the mesh ID to use for this instance.

`MeshInstanceData.``getOpacity`()
  getOpacity(): number

  Gets the face opacity value for this instance.

  Returns: number

  > the face opacity value for this instance.

`MeshInstanceData.``getOverlayIndex`()
  getOverlayIndex(): number

  Gets the overlay index for this instance.

  Deprecated

  > use [[overlayId]] instead.

  Returns: number

  > the overlay index for this instance, but not the associated view.

`MeshInstanceData.``getPointColor`()
  getPointColor(): (None | `Color`)

  Gets the color for point elements in this instance.

  Returns: (None | `Color`)

  > the color for point elements.

`MeshInstanceData.``getPointOpacity`()
  getPointOpacity(): number

  Gets the point opacity value for this instance.

  Returns: number

  > the point opacity value for this instance.

`MeshInstanceData.``setCreationFlags`()
  setCreationFlags(flags: `MeshInstanceCreationFlags`): void

  Sets the mesh instance creation flags (SuppressCameraScale, DoNotExplode, DoNotLight…)

  Parameters

  > flags: `MeshInstanceCreationFlags`

  > > creation flags

  Returns: void

`MeshInstanceData.``setFaceColor`()
  setFaceColor(faceColor: `Color`): void

  Sets the color for face elements in this instance.

  Parameters

  > faceColor: `Color`

  > > the color to apply to face elements.

  Returns: void

`MeshInstanceData.``setInstanceName`()
  setInstanceName(instanceName: string): void

  Sets the name that will be assigned to this instance. This name will be visible when querying the model hierarchy.

  Parameters

  > instanceName: string

  > > the name to assign to this instance.

  Returns: void

`MeshInstanceData.``setLineColor`()
  setLineColor(lineColor: `Color`): void

  Sets the color for line elements in this instance.

  Parameters

  > lineColor: `Color`

  > > the color to apply to line elements.

  Returns: void

`MeshInstanceData.``setLineOpacity`()
  setLineOpacity(lineOpacity: number): void

  Sets the line opacity for this instance.

  Parameters

  > lineOpacity: number

  > > opacity value to set.

  Returns: void

`MeshInstanceData.``setMatrix`()
  setMatrix(matrix: `Matrix`): void

  Sets the matrix that will be applied to this instance.

  Parameters

  > matrix: `Matrix`

  > > the matrix to apply.

  Returns: void

`MeshInstanceData.``setMeshId`()
  setMeshId(meshId: `MeshId`): void

  Sets the [[MeshId]] of the mesh to use for the instance. [[MeshId]]s are created with [[Model.createMesh]] or retrieved with [[Model.getMeshIds]].

  Parameters

  > meshId: `MeshId`

  > > the [[MeshId]] to use.

  Returns: void

`MeshInstanceData.``setOpacity`()
  setOpacity(faceOpacity: number): void

  Sets the face opacity for this instance.

  Parameters

  > faceOpacity: number

  > > opacity value to set.

  Returns: void

`MeshInstanceData.``setOverlayIndex`()
  setOverlayIndex(overlayIndex: number): void

  Sets the overlay index for this instance but doesn’t change the associated view.

  Deprecated

  > use [[overlayId]] instead.

  Parameters

  > overlayIndex: number

  > > overlay index to set.

  Returns: void

`MeshInstanceData.``setPointColor`()
  setPointColor(pointColor: `Color`): void

  Sets the color for point elements in this instance.

  Parameters

  > pointColor: `Color`

  > > the color to apply to point elements.

  Returns: void

`MeshInstanceData.``setPointOpacity`()
  setPointOpacity(pointOpacity: number): void

  Sets the point opacity for this instance.

  Parameters

  > pointOpacity: number

  > > opacity value to set.

  Returns: void

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Visualize Web or choose a sample question below to start a conversation:

What is HOOPS Visualize Web?
What are the latest release notes for HOOPS Visualize Web?
How do I start evaluating HOOPS Visualize Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...