Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TextElementState

TextElementState keeps the current state of a text element while it's being rendered.

Hierarchy

  • TextElementState

Index

Constructors

constructor

Properties

Readonly element

element: TextElement

TextElement this state represents

Accessors

iconRenderState

  • get iconRenderState(): RenderState | undefined
  • Returns the icon render state for the case where the text element has only one icon.

    Returns RenderState | undefined

    The icon render state if the text element has a single icon, otherwise undefined.

initialized

  • get initialized(): boolean

lineMarkerIndex

  • get lineMarkerIndex(): number | undefined

position

  • get position(): Vector3
  • Returns the position of the TextElement. If this TextElementState belongs to a TextElement of type LineMarker, it returns the position of the marker at the references index in the path of the TextElement.

    Returns Vector3

renderDistance

  • get renderDistance(): number
  • Return the last distance that has been computed for sorting during placement. This may not be the actual distance if the camera is moving, as the distance is computed only during placement. If the property alwaysOnTop is true, the value returned is always 0.

    Returns number

    0 or negative distance to camera.

textPlacement

textRenderState

  • get textRenderState(): RenderState | undefined

viewDistance

  • get viewDistance(): number | undefined

visible

  • get visible(): boolean

Methods

isBaseTextPlacement

  • isBaseTextPlacement(placement: TextPlacement): boolean | undefined
  • Returns information if the text placement provided is the base one defined in style (theme).

    Parameters

    Returns boolean | undefined

    [[true]] if the placement provided is exactly the same as in theme base layout, [[false]] if it differs from the basic layout provided in style or [[undefined]] if the layout style is not yet defined so it is hard to say.

replace

reset

  • reset(): void

setViewDistance

  • setViewDistance(viewDistance: number | undefined): void
  • Sets the distance of the element to the current view center.

    Parameters

    • viewDistance: number | undefined

      The new view distance to set. If undefined, element is considered to be out of view.

    Returns void

update

  • update(viewDistance: number | undefined): void

updateFading

  • updateFading(time: number, disableFading: boolean): void
  • Updates the fading state to the specified time.

    Parameters

    • time: number

      The current time.

    • disableFading: boolean

      If True there will be no fading transitions, i.e., state will go directly from FadedIn to FadedOut and vice versa.

    Returns void

Generated using TypeDoc