Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IDrawingToolsApi

Hierarchy

  • IDrawingToolsApi

Implemented by

Index

Properties

closed: boolean

Check if the drawing tool is closed.

paused: boolean

Check if the drawing tool is paused.

pointsData: PointsData

The points data of the drawing tool.

restrictions: {}

The restrictions of the drawing tool.

Type declaration

showDistanceLabels: boolean

Show the distance labels of the drawing tool.

showPointLabels: boolean

Show the point labels of the drawing tool.

uuid: string

The unique identifier of the drawing tool instance.

Methods

  • addPoint(index: number, position?: vec3): void
  • Add a point to the drawing tool.

    Parameters

    • index: number

      The index of the point in the position array.

    • Optional position: vec3

      The position of the point.

    Returns void

  • Add a ray tracing intersection restriction to the drawing tool.

    Parameters

    Returns undefined | IRestrictionApi

    The api of the restriction.

  • canRedo(): boolean
  • Check if the drawing tool can redo the last action.

    Returns boolean

  • canUndo(): boolean
  • Check if the drawing tool can undo the last action.

    Returns boolean

  • cancel(): void
  • Cancel the drawing tool.

    Returns void

  • cancelDrag(): void
  • Cancel any in-progress hover or drag interaction without closing the drawing tool.

    Returns void

  • close(): void
  • Close the drawing tool.

    Returns void

  • continue(): void
  • Resume the drawing tool after it has been paused.

    Returns void

  • isInteractionActive(): boolean
  • Returns true if a point or control is currently hovered or being dragged.

    Returns boolean

  • movePoint(index: number, position: vec3, temporary?: boolean, skipConstraints?: boolean): void
  • Move a point of the drawing tool.

    Parameters

    • index: number

      The index of the point in the position array.

    • position: vec3

      The new position of the point.

    • Optional temporary: boolean

      If true, the move will not be applied immediately (default: false).

    • Optional skipConstraints: boolean

    Returns void

  • pause(): void
  • Pause the drawing tool, suspending all user interactions while keeping the current state. Call continue to resume.

    Returns void

  • redo(): void
  • Redo the last action of the drawing tool.

    Returns void

  • removePoint(index: number): void
  • Remove a point from the drawing tool.

    Parameters

    • index: number

      The index of the point in the position array.

    Returns void

  • removeRestriction(id: string): void
  • Remove a restriction from the drawing tool.

    Parameters

    • id: string

    Returns void

  • undo(): void
  • Undo the last action of the drawing tool.

    Returns void

  • Receive an update of the drawing tool.

    Returns void | { metaData: (undefined | RayTraceResult)[]; pointsData: PointsData }

    The points data of the drawing tool.