Type alias DimensionLineOptions

DimensionLineOptions: { closingLineDirection?: Vector3; closingLineHeight: number; hideIfOccluded: boolean; labelCssClass: string; labelTextCb: ((lengthM: number) => string); lineColor: Color3; parentNode?: TransformNode; scaleWithCameraDistance: boolean }

Options for dimension line creation

Type declaration

  • Optional closingLineDirection?: Vector3

    Optional direction of the closing lines on start and end.
    Use built-in vector functions like Vector3.Left() or Vector3.Forward() for simple directions of use a custom normal vector like Vector3(1, 0.5 ,0).

    Default: x or y direction is taken, depending on the normal vector between start and end point

  • closingLineHeight: number

    Default: 0.05m

  • hideIfOccluded: boolean

    true: html elements can be occluded by other meshes false: html elements will always be shown in front of the scene

    Default: false

  • labelCssClass: string

    Custom CSS class for dimension line label.
    Can be used to overwrite the styling of the label.

  • labelTextCb: ((lengthM: number) => string)
      • (lengthM: number): string
      • Optional callback for label text creation.
        Provides calculated length from startPoint and endPoint as parameter in meters.

        Default: rounded (2 digits) "mm" value (e.g. "1234.56 mm")

        Parameters

        • lengthM: number

        Returns string

  • lineColor: Color3

    Default: Color3.Black()

  • Optional parentNode?: TransformNode

    Optional parent node of dimension line, can be used for easier calculation of start and end point

    Default: no parent node set

  • scaleWithCameraDistance: boolean

    true: html element size is relative to camera distance, just like a "normal" 3d object false: html element size remains constant

    Default: false

Generated using TypeDoc