Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Overlay

Manages 2d overlay items in a View.

Overlay items are 2d items drawn in the view together with the 3d model, for example color legends, navigation cube, step text and info box.

You can access the overlay object with the View.overlay property.

Hierarchy

  • Overlay

Index

Accessors

autoAppendModelInfoToInfoBox

autoAppendModelInfoToInfoBox: boolean

Whether information from the models should be appended to the info box

infoBoxPosition

infoBoxPosition: OverlayItemPosition

The position of the info box.

infoBoxVisible

infoBoxVisible: boolean

The visibility of the info box (the blue box in the bottom right corner) in the view

legendsPosition

legendsPosition: OverlayItemPosition

The position of the legends.

maximumLegendHeight

maximumLegendHeight: number

The maximum height of the legends (color legends and category legends).

Legends are sized to fit the view, depending on the view height and the number of legends. This property controls the maximum height a legend can have.

The value of this property is in device pixels, so it's multiplied by the display's pixelScaleFactor to give the native (full resolution) pixel height.

modelColorLegendsVisible

modelColorLegendsVisible: boolean

The visibility of the color legend overlay items for models (currently only for RemoteModel).

navigationCubeHomeDirection

navigationCubeHomeDirection: Vec3

The view direction to set when the "Home" button on the navigation cube is pressed

navigationCubeHomeEye

navigationCubeHomeEye: Vec3 | undefined

The view eye position to set when the "Home" button on the navigation cube is pressed If undefined then eye position is set automatically to fit view

navigationCubeHomeUp

navigationCubeHomeUp: Vec3

The up direction to set when the "Home" button on the navigation cube is pressed

navigationCubePosition

navigationCubePosition: OverlayItemPosition

The position of the navigation cube.

navigationCubeVisible

navigationCubeVisible: boolean

The visibility of the navigation cube in the view

stepTextVisible

stepTextVisible: boolean

The visibility of the step text (the text at the bottom of the view displaying the current step for RemoteModels)

Methods

addCustomCategoryLegend

  • addCustomCategoryLegend(categories: string[], colors: ArrayLike<Color3Like>, legendTitle: string, resultId: number): void
  • Adds a category legend to the view.

    The category legend shows each color with its corresponding descriptive text.

    Note that the categories and colors arrays must have the same length.

    Legends can be removed with the removeAllCustomLegends method.

    Parameters

    • categories: string[]
    • colors: ArrayLike<Color3Like>
    • legendTitle: string
    • resultId: number

    Returns void

addCustomColorLegend

addCustomColorLegendForScalarMapper

configureNavigationCube

  • configureNavigationCube(faceNames: string[], faceColors?: Color3Like[], axisLabels?: string[]): void
  • Configure the navigation cube

    faceNames: Must contain 6 values, names for: Pos_X, Neg_X, Pos_Y, Neg_Y, Pos_Z, Neg_Z faceColors: null or 6 values, colors for: Pos_X, Neg_X, Pos_Y, Neg_Y, Pos_Z, Neg_Z axisLabels: null (defaults to x,y,z) or 3 values, names for X_AXIS, Y_AXIS, Z_AXIS

    Parameters

    • faceNames: string[]
    • Optional faceColors: Color3Like[]
    • Optional axisLabels: string[]

    Returns void

removeAllCustomLegends

  • removeAllCustomLegends(): void

setInfoBoxAppearance

  • Sets the appearance of the info box.

    Parameters

    Returns void

setInfoBoxContent

  • setInfoBoxContent(content: string): void
  • Sets the text to show in the info box.

    Note that any information from the models will be appended to the given string unless autoAppendModelInfoToInfoBox is set to false.

    Parameters

    • content: string

    Returns void

setStepTextContent

  • setStepTextContent(content: string): void
  • Sets the text to show in as the step info.

    This will remove any automatic step info from the Remote Model.

    Parameters

    • content: string

    Returns void

viewConfigurationFromNavigationCubeItem

Generated using TypeDoc