Class GraphicComponent<TVisualName>

Represents a component of type Graphic Can be used to set specific inputs of the general component or its containing visuals

Type Parameters

  • TVisualName extends string

Hierarchy

  • GraphicComponent

Constructors

Properties

Methods

Constructors

  • Type Parameters

    • TVisualName extends string

    Parameters

    • name: string

    Returns GraphicComponent<TVisualName>

Properties

name: string

Methods

  • Parameters

    • listener: CmpValueChangedListener<string>

      Called whenever the value (SVG string) of the given cmp has changed

    • callImmediately: boolean = false

      True: The listener is immediately called with the current value of the cmp at the time, the listener is added
      False: The listener will be called for the first time when the value of the cmp actually changes

    • Optional condition: CmpValueChangedCondition<string>

      A predicate function which is given the new cmp value.
      The function can decide on whether the listener is called or not by returning true or false.

    Returns void

  • Set an input value of the graphic component Hint: Ensure that the Hive rule actually processes the input when setting a value

    Parameters

    • property: "Width" | "Height" | "Archive"
    • value: unknown

    Returns void

  • Set an input value of a specific visual Hint: Ensure that the Hive rule actually processes the input when setting a value

    Parameters

    • visual: TVisualName

      Name of the visual

    • property: string

      Name of the property as seen in the cfgr editor (e.g. 'X' or 'Texture.Source')

    • value: unknown

      Value to set

    Returns void

Generated using TypeDoc