Manages the collection of pins in the 3D canvas.

Hierarchy

  • Pins

Constructors

Accessors

  • get animationInterpolations(): number
  • Gets the number of animation interpolations.

    Returns

    The number of animation interpolations.

    Returns number

  • 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

    The animation time in milliseconds.

    Returns number

  • 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

    An array of PinWidget3D.

    Returns PinWidget3D[]

Methods

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

    Returns

    A promise that resolves to the created PinWidget3D.

    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.

    • Optional userObject: unknown

      Optional user-defined object associated with the pin.

    Returns Promise<PinWidget3D>

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

    Returns

    A promise that resolves to the created PinWidget3D.

    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.

    • Optional width: number

      Optional width of the pin image.

    • Optional height: number

      Optional height of the pin image.

    • dispatchInsertEvent: boolean = true

      Whether to dispatch the insert event.

    • Optional userObject: unknown

      Optional user-defined object associated with the pin.

    Returns Promise<PinWidget3D>

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

    Returns

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

    Parameters

    • x: number

      The x-coordinate on the screen.

    • y: number

      The y-coordinate on the screen.

    Returns PinWidget3D

  • Gets the current state of all pins.

    Returns

    The current PinState.

    Returns PinState

  • 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

  • Removes all pins.

    Parameters

    • cleanURLs: boolean = true

      Whether to clear the pin image URLs.

    Returns void

  • Removes a specific pin.

    Parameters

    • pin: PinWidget3D

      The pin to be removed.

    • destroy: boolean = true

      Whether to destroy the pin.

    Returns void

  • Sets the state of all pins.

    Parameters

    Returns Promise<void>

  • Updates the render of all pins.

    Parameters

    • periodBetweenUpdatesInMs: number

      The period between updates in milliseconds.

    Returns Promise<void>