BimCT SDK / WebGL2 Viewer
    Preparing search index...

    Class Pins

    Manages the collection of pins in the 3D canvas.

    Index

    Constructors

    Accessors

    • get animationInterpolations(): number

      Gets the number of animation interpolations.

      Returns number

      The number of animation interpolations.

    • set animationInterpolations(interpolations: number): void

      Sets the number of animation interpolations.

      Parameters

      • interpolations: number

        The number of animation interpolations.

      Returns void

    • get animationTime(): number

      Gets the animation time in milliseconds.

      Returns number

      The animation time in milliseconds.

    • set animationTime(animationTime: number): void

      Sets the animation time in milliseconds.

      Parameters

      • animationTime: number

        The animation time in milliseconds.

      Returns void

    • get pins(): PinWidget3D[]

      Gets the list of all pins.

      Returns PinWidget3D[]

      An array of PinWidget3D.

    Methods

    • Adds a pin by color at the specified 3D point.

      Parameters

      • point3d: Vector3D

        The 3D coordinates where the pin will be placed.

      • color: string

        The color of the pin.

      • dispatchInsertEvent: boolean = true

        Whether to dispatch the insert event.

      • OptionaluserObject: unknown

        Optional user-defined object associated with the pin.

      Returns Promise<PinWidget3D>

      A promise that resolves to the created PinWidget3D.

    • Adds a pin by image at the specified 3D point.

      Parameters

      • point3d: Vector3D

        The 3D coordinates where the pin will be placed.

      • imageURL: string

        The URL of the image to be used for the pin.

      • Optionalwidth: number

        Optional width of the pin image.

      • Optionalheight: number

        Optional height of the pin image.

      • dispatchInsertEvent: boolean = true

        Whether to dispatch the insert event.

      • OptionaluserObject: unknown

        Optional user-defined object associated with the pin.

      Returns Promise<PinWidget3D>

      A promise that resolves to the created PinWidget3D.

    • Moves an existing pin to a new 3D position.

      Parameters

      • pinWidget: PinWidget3D

        The pin to be moved.

      • x: number

        The new x-coordinate.

      • y: number

        The new y-coordinate.

      • z: number

        The new z-coordinate.

      • animate: boolean

        Whether to animate the movement.

      • dispatchMovedEvent: boolean = true

        Whether to dispatch the moved event.

      Returns void

    • Updates the render of all pins.

      Parameters

      • periodBetweenUpdatesInMs: number

        The period between updates in milliseconds.

      Returns Promise<void>

    • Checks if a pin is present at the specified screen coordinates.

      Parameters

      • x: number

        The x-coordinate on the screen.

      • y: number

        The y-coordinate on the screen.

      Returns PinWidget3D

      The pin at the specified coordinates, or null if no pin is found.

    • Removes a specific pin.

      Parameters

      • pin: PinWidget3D

        The pin to be removed.

      • destroy: boolean = true

        Whether to destroy the pin.

      Returns void

    • Removes all pins.

      Parameters

      • cleanURLs: boolean = true

        Whether to clear the pin image URLs.

      Returns void

    • Gets the current state of all pins.

      Returns PinState

      The current PinState.

    • Sets the state of all pins.

      Parameters

      Returns Promise<void>