A Product can be created to initialize and render an instance of a ProductTemplate. This class will also control configurability and manipulation of the instance.

Constructors

  • Constructor.

    Parameters

    • template: ProductTemplate

      The ProductTemplate that will be used to initialize and render this Product.

    Returns Product

Accessors

  • get destroyed(): boolean
  • Gets the destruction status of the instance.

    Returns boolean

    True if the instance is destroyed.

  • get hotspots(): Hotspot[]
  • Retrieves an array of all hotspots in this Product.

    Returns Hotspot[]

    An array of Hotspot objects representing all hotspots in the Product.

  • get id(): string
  • The unique id of the Product.

    Returns string

    The id of the Product.

  • get onSetValue(): Observable
  • Retrieves The Observable object associated with setValue()

    Returns Observable

    The Observable object associated with setValue()

  • get onTriggerEvent(): Observable
  • Retrieves The Observable object associated with triggerEvent()

    Returns Observable

    The Observable object associated with triggerEvent()

  • get template(): ProductTemplate
  • The ProductTemplate that was used in the creation of this Product.

    Returns ProductTemplate

    The ProductTemplate that was used in the creation of this Product.

Methods

  • Destroys the Product and destroys all it's parts.

    Returns Promise<void>

    Resolves when the Product is destroyed.

  • Retrieves a value associated with the given property name.

    Parameters

    • property: string

      The name of the property whose value to retrieve.

    Returns unknown

    The value associated with the given value name.

  • Retrieves all of the available values within this Product and all Parts inside of it.

    Returns Map<string, unknown>

    A map containing all values in this Product's hierarchy.

  • Waits for the product to be instantiated by waiting for the root part to be ready

    Returns Promise<void>

    A promise that resolves the root part is ready

  • Sets the value associated with the specified property

    Parameters

    • property: string

      The property name of the value to set

    • value: unknown

      The value of the property

    • options: ProductSetValueOptions = {}

      additional setValue options

    Returns Promise<void>

  • Triggers the event associated with the specified name.

    Parameters

    • event: string

      The name of the event to trigger.

    Returns Promise<void>

Generated using TypeDoc