Represents an icon that can be rendered using the Icons plugin

See

Icons

Hierarchy

  • Icon

Constructors

  • Creates an instance of Icon.

    Example

    const icon = new Icon('Sample Icon', 'This is a sample icon.', 1, 101, 'imageDataString', new Float32Array([0, 0, 0]), 100, 100, () => console.log('Icon selected'));
    

    Parameters

    • name: string

      The name of the icon.

    • description: string

      A brief description of the icon.

    • modelId: number

      The model ID associated with the icon.

    • productId: number

      The product ID associated with the icon.

    • imageData: string

      Base64 encoded image data for the icon.

    • Optional location: Float32Array = null

      The XYZ coordinates for the icon location. If not provided, the centroid of the product bounding box is used.

    • Optional width: number = null

      The width of the icon. If null, default width is used.

    • Optional height: number = null

      The height of the icon. If null, default height is used.

    • Optional onIconSelected: (() => void) = null

      Callback function to be executed when the icon is selected.

        • (): void
        • Returns void

    Returns Icon

Accessors

  • get onIconSelected(): (() => void)
  • Gets the callback function to be executed when the icon is selected.

    Returns

    The callback function.

    Returns (() => void)

      • (): void
      • Gets the callback function to be executed when the icon is selected.

        Returns

        The callback function.

        Returns void

Generated using TypeDoc