BimCT SDK / WebGL2 Viewer
    Preparing search index...

    Class BimCTOverlay

    The main overlay class for the BIM canvas.

    Index

    Constructors

    Accessors

    • get modelsTextWidget(): ModelsTextWidget

      Returns ModelsTextWidget

    • set halfSplashScreen(val: boolean): void

      Parameters

      • val: boolean

      Returns void

    • get topLeftLabel(): LabelWidget

      Gets the top left label widget.

      Returns LabelWidget

      The top left label widget.

    • get canvas(): HTMLCanvasElement

      Gets the primary canvas element.

      Returns HTMLCanvasElement

      The primary canvas HTMLCanvasElement.

    Methods

    • Destroys the overlay and clears any timeouts.

      Returns void

    • Creates the splash screen element.

      Returns HTMLDivElement

      The splash screen HTMLDivElement.

    • Creates the date and time spinner element.

      Returns HTMLDivElement

      The date and time spinner HTMLDivElement.

    • Sets the date and time displayed on the spinner.

      Parameters

      • dateTime: Date

        The date and time to display.

      Returns void

    • Creates the game legend element.

      Returns HTMLDivElement

      The game legend HTMLDivElement.

    • Removes the game legend element.

      Returns void

    • Creates the primary canvas element.

      Returns HTMLCanvasElement

      The primary canvas HTMLCanvasElement.

    • Reconstructs the extrusions in the canvas widget. This method is asynchronous and returns a promise that resolves when the reconstruction is complete.

      Returns Promise<void>

    • Removes the date and time spinner element.

      Returns void

    • Removes the splash screen element.

      Returns void

    • Sets the visibility of the splash screen.

      Parameters

      • url: string

        The background image URL.

      • visible: boolean

        Whether the splash screen is visible.

      Returns void

    • Gets the visibility of the splash screen.

      Returns boolean

      Whether the splash screen is visible.

    • Sets the visibility of the game legend.

      Parameters

      • visible: boolean

        Whether the game legend is visible.

      Returns void

    • Checks if the overlay is fully visible.

      Returns boolean

      Whether the overlay is fully visible.

    • Resizes the canvas and updates the overlay.

      Parameters

      • width: number

        The new width.

      • height: number

        The new height.

      Returns void

    • Updates the rubberband selection area.

      Parameters

      • x: number

        The x-coordinate.

      • y: number

        The y-coordinate.

      • w: number

        The width.

      • h: number

        The height.

      Returns void

    • Clears the rubberband selection area.

      Returns void

    • Clears the loading status.

      Returns void

    • Sets the top center message.

      Parameters

      • message: string

        The message to display.

      Returns void

    • Clears the top center message.

      Returns void

    • Sets the top left message.

      Parameters

      • message: string

        The message to display.

      • lineThrough: boolean = false

        Whether the message should have a line through it.

      Returns void

    • Clears the top left message.

      Returns void

    • Sets the fill message.

      Parameters

      • message: string

        The message to display.

      Returns void

    • Clears the fill message.

      Returns void

    • Checks if the top left label is visible.

      Returns boolean

      Whether the top left label is visible.

    • Checks if the top center label is visible.

      Returns boolean

      Whether the top center label is visible.

    • Sets the visibility of the top center label.

      Parameters

      • val: boolean

        Whether the top center label is visible.

      Returns void

    • Sets the visibility of the top left label.

      Parameters

      • val: boolean

        Whether the top left label is visible.

      Returns void

    • Sets the loading progress and message.

      Parameters

      • percentage: number

        The loading percentage.

      • text: string

        The loading message.

      Returns void

    • Redraws the canvas.

      Returns void

    • Clears the loading status.

      Returns void

    • Checks if the overlay is loading.

      Returns boolean

      Whether the overlay is loading.

    • Sets a 2D symbol on the canvas.

      Parameters

      • x: number

        The x-coordinate.

      • y: number

        The y-coordinate.

      • r: number

        The red color value.

      • g: number

        The green color value.

      • b: number

        The blue color value.

      • symbol_type: number

        The symbol type.

      • enable: number

        Whether the symbol is enabled.

      Returns void

    • Adds a label to the canvas.

      Parameters

      • text: string

        The label text.

      • x: number

        The x-coordinate.

      • y: number

        The y-coordinate.

      • orientation: Orientation

        The label orientation.

      • rotationAngle: number

        The rotation angle.

      • background: boolean

        Whether the label has a background.

      • border: boolean

        Whether the label has a border.

      Returns LabelWidget

      The created LabelWidget.

    • Adds a 3D polyline to the canvas.

      Parameters

      Returns PolyLineWidget3D

      The created PolyLineWidget3D.

    • Adds a 3D polyline to the canvas.

      Parameters

      Returns RectangleWidget3D

      The created PolyLineWidget3D.

    • Adds a ruler to the canvas.

      Parameters

      Returns MeasureRulerWidget3D

      The created MeasureRulerWidget3D.

    • Creates a linear shape widget for 3D rendering. Use setPoints to show the linear widget or bind it to a Measurement using bindLinearWidget in Measurement class.

      Parameters

      • thickness: number

        thickness of the line in mm

      • color: RGB

        color of the line

      • pattern: BIM_MEASUREMENT2D_FILL_PATTERN

        pattern of the line (solid, dashed, dotted, etc.)

      • direction: LinearTakeoffDirection
      • baseOffset: number
      • height: number
      • opacity: number

      Returns LinearShapeWidget3D

      LinearShapeWidget3D instance

    • Creates an area shape widget for 3D rendering. Use setPoints to show the area widget or bind it to a Measurement using bindAreaWidget in Measurement class.

      Parameters

      • color: RGB
      • pattern: BIM_MEASUREMENT2D_FILL_PATTERN
      • baseOffset: number
      • height: number
      • opacity: number
      • slopRise: number
      • slopRun: number

      Returns AreaShapeWidget3D

    • Parameters

      • shapeType: ShapeType
      • shapeAnchor: ShapeAnchorType
      • width: number
      • length: number
      • diameter: number
      • color: RGB
      • pattern: BIM_MEASUREMENT2D_FILL_PATTERN
      • baseOffset: number
      • height: number

      Returns CountShapeWidget3D

    • Gets the canvas widget.

      Returns CanvasWidget

      The canvas widget.