Preparing search index...

    The RoundedRectangleVisual class represents a visual component that renders a rounded rectangle with customizable properties such as border, gradients, and colors. It extends the base Visual class and provides additional functionality specific to rounded rectangles.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    animateDuration baseColor baseDefaultColor baseErrorColor baseHoveredColor baseInactiveColor baseToggledDefaultColor baseToggledHoveredColor baseToggledTriggeredColor baseTriggeredColor baseType borderDefaultColor borderDefaultGradient borderHoveredColor borderHoveredGradient borderInactiveColor borderInactiveGradient borderSize borderToggledDefaultColor borderToggledDefaultGradient borderToggledHoveredColor borderToggledHoveredGradient borderToggledTriggeredColor borderToggledTriggeredGradient borderTriggeredColor borderTriggeredGradient cornerRadius defaultBaseType defaultBorderSize defaultBorderType defaultGradient defaultHasBorder defaultPosition defaultScale defaultShouldPosition defaultShouldScale defaultTexture errorPosition errorScale hasBorder hoveredBaseType hoveredBorderSize hoveredBorderType hoveredGradient hoveredHasBorder hoveredPosition hoveredScale hoveredShouldPosition hoveredShouldScale hoveredTexture inactiveBaseType inactiveBorderSize inactiveBorderType inactiveGradient inactiveHasBorder inactivePosition inactiveScale inactiveShouldPosition inactiveShouldScale inactiveTexture isBorderGradient renderMeshVisual sceneObject shouldColorChange shouldScale shouldTranslate size toggledDefaultBaseType toggledDefaultBorderSize toggledDefaultBorderType toggledDefaultGradient toggledDefaultHasBorder toggledDefaultShouldPosition toggledDefaultShouldScale toggledDefaultTexture toggledHoveredBaseType toggledHoveredBorderSize toggledHoveredBorderType toggledHoveredGradient toggledHoveredHasBorder toggledHoveredPosition toggledHoveredScale toggledHoveredShouldPosition toggledHoveredShouldScale toggledHoveredTexture toggledPosition toggledScale toggledTriggeredBaseType toggledTriggeredBorderSize toggledTriggeredBorderType toggledTriggeredGradient toggledTriggeredHasBorder toggledTriggeredPosition toggledTriggeredScale toggledTriggeredShouldPosition toggledTriggeredShouldScale toggledTriggeredTexture transform triggeredBaseType triggeredBorderSize triggeredBorderType triggeredGradient triggeredHasBorder triggeredPosition triggeredScale triggeredShouldPosition triggeredShouldScale triggeredTexture visualStates

    Methods

    Constructors

    Properties

    _defaultColor: vec4 = COLORS.darkGray
    _errorColor: vec4 = ERROR_COLOR
    _hoveredColor: vec4 = COLORS.brightYellow
    _inactiveColor: vec4 = INACTIVE_COLOR
    _sceneObject: SceneObject
    _state: RoundedRectangleVisualState = undefined
    _toggledDefaultColor: vec4 = ...
    _toggledHoveredColor: vec4 = ...
    _toggledTriggeredColor: vec4 = ...
    _transform: Transform
    _triggeredColor: vec4 = ...
    _visualComponent: ScriptComponent
    initialized: boolean = false
    managedComponents: Component[] = []
    needsVisualStateUpdate: boolean = true
    onDestroyed: PublicApi<void> = ...
    onInitialized: PublicApi<void> = ...
    onPositionChanged: PublicApi<ScaleChangeArgs> = ...
    onScaleChanged: PublicApi<ScaleChangeArgs> = ...
    prevState: RoundedRectangleVisualState = undefined
    visualArgs: VisualArgs

    Accessors

    • get animateDuration(): number

      Gets the duration of the animation.

      Returns number

      The duration of the animation in milliseconds.

    • set animateDuration(animateDuration: number): void

      Sets the duration of the animation.

      Parameters

      • animateDuration: number

        The duration of the animation in milliseconds.

      Returns void

    • get baseColor(): vec4

      Retrieves the base color of the rounded rectangle visual.

      Returns vec4

      The background color of the rounded rectangle as a vec4 value.

    • set baseColor(value: vec4): void

      Parameters

      Returns void

    • get baseDefaultColor(): vec4

      Gets the default base color for the visual element.

      Returns vec4

      A vec4 representing the current base default color.

    • set baseDefaultColor(baseDefaultColor: vec4): void

      Sets the default base color for the visual element.

      Parameters

      • baseDefaultColor: vec4

        A vec4 representing the RGBA color to be used as the default.

      Returns void

    • get baseErrorColor(): vec4

      Gets the error color for the visual element.

      Returns vec4

      A vec4 representing the current error color.

    • set baseErrorColor(baseErrorColor: vec4): void

      Sets the error color for the visual element.

      Parameters

      • baseErrorColor: vec4

        A vec4 representing the RGBA color to be used as the error color.

      Returns void

    • get baseHoveredColor(): vec4

      Gets the hovered color for the visual element.

      Returns vec4

      A vec4 representing the current hovered color.

    • set baseHoveredColor(baseHoveredColor: vec4): void

      Sets the hovered color for the visual element.

      Parameters

      • baseHoveredColor: vec4

      Returns void

      A vec4 representing the current base hovered color.

    • get baseInactiveColor(): vec4

      Gets the inactive color for the visual element.

      Returns vec4

      A vec4 representing the current inactive color.

    • set baseInactiveColor(baseInactiveColor: vec4): void

      Sets the inactive color for the visual element.

      Parameters

      • baseInactiveColor: vec4

        A vec4 representing the RGBA color to be used as the inactive color.

      Returns void

    • get baseToggledDefaultColor(): vec4

      Gets the toggled default color for the visual element.

      Returns vec4

      A vec4 representing the current toggled default color.

    • set baseToggledDefaultColor(baseToggledDefaultColor: vec4): void

      Sets the toggled default color for the visual element.

      Parameters

      • baseToggledDefaultColor: vec4

        A vec4 representing the RGBA color to be used as the toggled default color.

      Returns void

    • get baseToggledHoveredColor(): vec4

      Gets the toggled hovered color for the visual element.

      Returns vec4

      A vec4 representing the current toggled hovered color.

    • set baseToggledHoveredColor(baseToggledHoveredColor: vec4): void

      Sets the toggled hovered color for the visual element.

      Parameters

      • baseToggledHoveredColor: vec4

        A vec4 representing the RGBA color to be used as the toggled hovered color.

      Returns void

    • get baseToggledTriggeredColor(): vec4

      Gets the toggled triggered color for the visual element.

      Returns vec4

      A vec4 representing the current toggled triggered color.

    • set baseToggledTriggeredColor(baseToggledTriggeredColor: vec4): void

      Sets the toggled triggered color for the visual element.

      Parameters

      • baseToggledTriggeredColor: vec4

        A vec4 representing the RGBA color to be used as the toggled triggered color.

      Returns void

    • get baseTriggeredColor(): vec4

      Gets the triggered color for the visual element.

      Returns vec4

      A vec4 representing the current triggered color.

    • set baseTriggeredColor(baseTriggeredColor: vec4): void

      Gets the triggered color for the visual element.

      Parameters

      • baseTriggeredColor: vec4

      Returns void

      A vec4 representing the current triggered color.

    • get baseType(): BaseType

      Whether the rounded rectangle uses a gradient for its base(background).

      Returns BaseType

    • set baseType(gradient: BaseType): void

      Whether the rounded rectangle uses a gradient for its base(background).

      Parameters

      • gradient: BaseType

        A boolean indicating whether to use a gradient (true) or a solid color (false).

      Returns void

    • get borderDefaultColor(): vec4

      Gets the default color for the border of the rounded rectangle.

      Returns vec4

      The default border color as a vec4 value.

    • set borderDefaultColor(color: vec4): void

      Sets the default color for the border of the rounded rectangle and initializes the visual states.

      Parameters

      • color: vec4

        The default color to be set for the border.

      Returns void

    • get borderDefaultGradient(): GradientParameters

      Gets the default gradient parameters for the border of the rounded rectangle.

      Returns GradientParameters

      The default border gradient parameters.

    • set borderDefaultGradient(gradient: GradientParameters): void

      Sets the gradient parameters for the default state of the border and initializes the visual states.

      Parameters

      • gradient: GradientParameters

        The gradient parameters to be set for the default state of the border.

      Returns void

    • get borderHoveredColor(): vec4

      Gets the hovered color for the border of the rounded rectangle.

      Returns vec4

      The hovered border color as a vec4 value.

    • set borderHoveredColor(borderHoveredColor: vec4): void

      Sets the hovered color for the border of the rounded rectangle and initializes the visual states.

      Parameters

      • borderHoveredColor: vec4

        The hovered color to be set for the border.

      Returns void

    • get borderHoveredGradient(): GradientParameters

      Gets the gradient parameters for the hovered state of the border.

      Returns GradientParameters

      The hovered border gradient parameters.

    • set borderHoveredGradient(borderHoveredGradient: GradientParameters): void

      Sets the gradient parameters for the hovered state of the border and initializes the visual states.

      Parameters

      • borderHoveredGradient: GradientParameters

        The gradient parameters to be set for the hovered state of the border.

      Returns void

    • get borderInactiveColor(): vec4

      Gets the inactive color for the border of the rounded rectangle.

      Returns vec4

      The inactive border color as a vec4 value.

    • set borderInactiveColor(color: vec4): void

      Sets the inactive color for the border of the rounded rectangle and initializes the visual states.

      Parameters

      • color: vec4

        The inactive color to be set for the border.

      Returns void

    • get borderInactiveGradient(): GradientParameters

      Gets the gradient parameters for the inactive state of the border.

      Returns GradientParameters

      The inactive border gradient parameters.

    • set borderInactiveGradient(gradient: GradientParameters): void

      Sets the gradient parameters for the inactive state of the border and initializes the visual states.

      Parameters

      • gradient: GradientParameters

        The gradient parameters to be set for the inactive state of the border.

      Returns void

    • get borderSize(): number

      Gets the size of the border for the rounded rectangle.

      Returns number

      The border size as a number.

    • get borderToggledDefaultColor(): vec4

      Gets the toggled default color for the border of the rounded rectangle.

      Returns vec4

      The toggled default border color as a vec4 value.

    • set borderToggledDefaultColor(color: vec4): void

      Sets the toggled default color for the border of the rounded rectangle and initializes the visual states.

      Parameters

      • color: vec4

        The toggled default color to be set for the border.

      Returns void

    • get borderToggledHoveredColor(): vec4

      Gets the toggled hovered color for the border of the rounded rectangle.

      Returns vec4

      The toggled hovered border color as a vec4 value.

    • set borderToggledHoveredColor(borderToggledHoveredColor: vec4): void

      Sets the toggled hovered color for the border of the rounded rectangle and initializes the visual states.

      Parameters

      • borderToggledHoveredColor: vec4

        The toggled hovered color to be set for the border.

      Returns void

    • get borderToggledHoveredGradient(): GradientParameters

      Gets the gradient parameters for the toggled hovered state of the border.

      Returns GradientParameters

    • set borderToggledHoveredGradient(
          borderToggledHoveredGradient: GradientParameters,
      ): void

      Sets the gradient parameters for the toggled hovered state of the border and initializes the visual states.

      Parameters

      Returns void

    • get borderToggledTriggeredColor(): vec4

      Gets the toggled triggered color for the border of the rounded rectangle.

      Returns vec4

      The toggled triggered border color as a vec4 value.

    • set borderToggledTriggeredColor(color: vec4): void

      Sets the toggled triggered color for the border of the rounded rectangle and initializes the visual states.

      Parameters

      • color: vec4

        The toggled triggered color to be set for the border.

      Returns void

    • get borderToggledTriggeredGradient(): GradientParameters

      Gets the gradient parameters for the toggled triggered state of the border.

      Returns GradientParameters

    • set borderToggledTriggeredGradient(gradient: GradientParameters): void

      Sets the gradient parameters for the toggled triggered state of the border and initializes the visual states.

      Parameters

      Returns void

    • get borderTriggeredColor(): vec4

      Gets the triggered color for the border of the rounded rectangle.

      Returns vec4

      The triggered border color as a vec4 value.

    • set borderTriggeredColor(color: vec4): void

      Sets the triggered color for the border of the rounded rectangle and initializes the visual states.

      Parameters

      • color: vec4

        The triggered color to be set for the border.

      Returns void

    • get borderTriggeredGradient(): GradientParameters

      Gets the gradient parameters for the triggered state of the border.

      Returns GradientParameters

      The triggered border gradient parameters.

    • set borderTriggeredGradient(gradient: GradientParameters): void

      Sets the gradient parameters for the triggered state of the border and initializes the visual states.

      Parameters

      • gradient: GradientParameters

        The gradient parameters to be set for the triggered state of the border.

      Returns void

    • get cornerRadius(): number

      Gets the corner radius of the rounded rectangle.

      Returns number

      The current corner radius of the rounded rectangle in pixels.

    • set cornerRadius(cornerRadius: number): void

      Sets the corner radius of the rounded rectangle.

      Parameters

      • cornerRadius: number

        The radius of the corners in pixels.

      Returns void

    • get defaultBaseType(): BaseType

      Gets the base type for the default state.

      Returns BaseType

      The base type for the default state.

    • set defaultBaseType(baseType: BaseType): void

      Sets the base type for the default state and initializes the visual states.

      Parameters

      • baseType: BaseType

        The base type to be set for the default state.

      Returns void

    • get defaultBorderSize(): number

      Gets the border size for the default state.

      Returns number

      The border size for the default state.

    • set defaultBorderSize(borderSize: number): void

      Sets the border size for the default state and initializes the visual states.

      Parameters

      • borderSize: number

        The border size to be set for the default state.

      Returns void

    • get defaultBorderType(): BorderType

      Gets the border type for the default state.

      Returns BorderType

      The border type for the default state.

    • set defaultBorderType(borderType: BorderType): void

      Sets the border type for the default state and initializes the visual states.

      Parameters

      • borderType: BorderType

        The border type to be set for the default state.

      Returns void

    • get defaultGradient(): GradientParameters

      Gets the default gradient parameters for the visual.

      Returns GradientParameters

      The default gradient parameters.

    • set defaultGradient(gradient: GradientParameters): void

      Sets the default gradient parameters for the visual and initializes the visual states.

      Parameters

      Returns void

    • get defaultHasBorder(): boolean

      Gets whether the default state has a border.

      Returns boolean

      true if the default state has a border; otherwise, false.

    • set defaultHasBorder(hasBorder: boolean): void

      Sets whether the default state has a border and initializes the visual states.

      Parameters

      • hasBorder: boolean

        A boolean indicating whether the default state should have a border.

      Returns void

    • get defaultPosition(): vec3

      Gets the default position of the visual element.

      Returns vec3

      A vec3 representing the current default position.

    • set defaultPosition(position: vec3): void

      Sets the default position of the visual element.

      Parameters

      • position: vec3

        A vec3 object representing the new default position.

      Returns void

    • get defaultScale(): vec3

      Gets the default scale of the visual element.

      Returns vec3

      A vec3 representing the current default scale.

    • set defaultScale(scale: vec3): void

      Sets the default scale of the visual and initializes its visual states.

      Parameters

      • scale: vec3

        A vec3 object representing the default scale to be applied.

      Returns void

    • get defaultShouldPosition(): boolean

      Gets whether the default state should apply position changes.

      Returns boolean

      true if the default state should apply position changes; otherwise, false.

    • set defaultShouldPosition(shouldPosition: boolean): void

      Sets whether the default state should apply position changes and initializes the visual states.

      Parameters

      • shouldPosition: boolean

        A boolean indicating whether the default state should apply position changes.

      Returns void

    • get defaultShouldScale(): boolean

      Gets whether the default state should apply scale changes.

      Returns boolean

      true if the default state should apply scale changes; otherwise, false.

    • set defaultShouldScale(shouldScale: boolean): void

      Sets whether the default state should apply scale changes and initializes the visual states.

      Parameters

      • shouldScale: boolean

        A boolean indicating whether the default state should apply scale changes.

      Returns void

    • get defaultTexture(): Texture

      Gets the default texture for the rounded rectangle.

      Returns Texture

      The default texture as a Texture value.

    • set defaultTexture(texture: Texture): void

      Sets the default texture for the rounded rectangle.

      Parameters

      • texture: Texture

        The texture to be set for the default state.

      Returns void

    • get errorPosition(): vec3

      Gets the position of the visual element when it is in an error state.

      Returns vec3

      A vec3 representing the current error position.

    • set errorPosition(position: vec3): void

      Sets the position of the visual element when it is in an error state.

      Parameters

      • position: vec3

        A vec3 object representing the new position for the error state.

      Returns void

    • get errorScale(): vec3

      Gets the scale applied when the visual is in an error state.

      Returns vec3

      A vec3 representing the current error scale.

    • set errorScale(scale: vec3): void

      Sets the scale for the error visualization and initializes its visual states.

      Parameters

      • scale: vec3

        A vec3 object representing the scale to be applied to the error visualization.

      Returns void

    • get hasBorder(): boolean

      Indicates whether the rounded rectangle visual has a border.

      Returns boolean

      true if the visual has a border; otherwise, false.

    • get hoveredBaseType(): BaseType

      Gets the base type for the hovered state.

      Returns BaseType

      The base type for the hovered state.

    • set hoveredBaseType(hoveredBaseType: BaseType): void

      Sets the base type for the hovered state and initializes the visual states.

      Parameters

      • hoveredBaseType: BaseType

        The base type to be set for the hovered state.

      Returns void

    • get hoveredBorderSize(): number

      Gets the border size for the hovered state.

      Returns number

      The border size for the hovered state.

    • set hoveredBorderSize(hoveredBorderSize: number): void

      Sets the border size for the hovered state and initializes the visual states.

      Parameters

      • hoveredBorderSize: number

        The border size to be set for the hovered state.

      Returns void

    • get hoveredBorderType(): BorderType

      Gets the border type for the hovered state.

      Returns BorderType

      The border type for the hovered state.

    • set hoveredBorderType(hoveredBorderType: BorderType): void

      Sets the border type for the hovered state and initializes the visual states.

      Parameters

      • hoveredBorderType: BorderType

        The border type to be set for the hovered state.

      Returns void

    • get hoveredGradient(): GradientParameters

      Gets the hovered gradient parameters for the visual.

      Returns GradientParameters

      The hovered gradient parameters.

    • set hoveredGradient(hoveredGradient: GradientParameters): void

      Sets the hovered gradient parameters for the visual and initializes the visual states.

      Parameters

      • hoveredGradient: GradientParameters

        The gradient parameters to be set for the hovered state.

      Returns void

    • get hoveredHasBorder(): boolean

      Gets whether the hovered state has a border.

      Returns boolean

      true if the hovered state has a border; otherwise, false.

    • set hoveredHasBorder(hoveredHasBorder: boolean): void

      Sets whether the hovered state has a border and initializes the visual states.

      Parameters

      • hoveredHasBorder: boolean

        A boolean indicating whether the hovered state should have a border.

      Returns void

    • get hoveredPosition(): vec3

      Gets the hovered position of the visual element.

      Returns vec3

      A vec3 representing the current hovered position.

    • set hoveredPosition(hoveredPosition: vec3): void

      Gets the hovered position of the visual element.

      Parameters

      • hoveredPosition: vec3

      Returns void

      A vec3 representing the new hovered position.

    • get hoveredScale(): vec3

      Gets the hovered scale of the visual element.

      Returns vec3

      A vec3 representing the current hovered scale.

    • set hoveredScale(hoveredScale: vec3): void

      Sets the hovered scale for the visual element and initializes its visual states.

      Parameters

      • hoveredScale: vec3

        A vec3 object representing the hovered scale to be applied.

      Returns void

    • get hoveredShouldPosition(): boolean

      Gets whether the hover state should apply position changes.

      Returns boolean

      true if the hovered state should apply position changes; otherwise, false.

    • set hoveredShouldPosition(hoveredShouldPosition: boolean): void

      Sets whether the hovered state should apply position changes and initializes the visual states.

      Parameters

      • hoveredShouldPosition: boolean

        A boolean indicating whether the hovered state should apply position changes.

      Returns void

    • get hoveredShouldScale(): boolean

      Gets whether the hovered state should apply scale changes.

      Returns boolean

      true if the hovered state should apply scale changes; otherwise, false.

    • set hoveredShouldScale(hoveredShouldScale: boolean): void

      Sets whether the hovered state should apply scale changes and initializes the visual states.

      Parameters

      • hoveredShouldScale: boolean

        A boolean indicating whether the hovered state should apply scale changes.

      Returns void

    • get hoveredTexture(): Texture

      Gets the hovered texture for the rounded rectangle.

      Returns Texture

      The hovered texture as a Texture value.

    • set hoveredTexture(hoveredTexture: Texture): void

      Sets the hovered texture for the rounded rectangle.

      Parameters

      • hoveredTexture: Texture

        The texture to be set for the hovered state.

      Returns void

    • get inactiveBaseType(): BaseType

      Gets the base type for the inactive state.

      Returns BaseType

      The base type for the inactive state.

    • set inactiveBaseType(baseType: BaseType): void

      Sets the base type for the inactive state and initializes the visual states.

      Parameters

      • baseType: BaseType

        The base type to be set for the inactive state.

      Returns void

    • get inactiveBorderSize(): number

      Gets the border size for the inactive state.

      Returns number

      The border size for the inactive state.

    • set inactiveBorderSize(borderSize: number): void

      Sets the border size for the inactive state and initializes the visual states.

      Parameters

      • borderSize: number

        The border size to be set for the inactive state.

      Returns void

    • get inactiveBorderType(): BorderType

      Gets the border type for the inactive state.

      Returns BorderType

      The border type for the inactive state.

    • set inactiveBorderType(borderType: BorderType): void

      Sets the border type for the inactive state and initializes the visual states.

      Parameters

      • borderType: BorderType

        The border type to be set for the inactive state.

      Returns void

    • get inactiveGradient(): GradientParameters

      Gets the inactive gradient parameters for the visual.

      Returns GradientParameters

      The inactive gradient parameters.

    • set inactiveGradient(gradient: GradientParameters): void

      Sets the inactive gradient parameters for the visual and initializes the visual states.

      Parameters

      Returns void

    • get inactiveHasBorder(): boolean

      Gets whether the inactive state has a border.

      Returns boolean

      true if the inactive state has a border; otherwise, false.

    • set inactiveHasBorder(hasBorder: boolean): void

      Sets whether the inactive state has a border and initializes the visual states.

      Parameters

      • hasBorder: boolean

        A boolean indicating whether the inactive state should have a border.

      Returns void

    • get inactivePosition(): vec3

      Gets the position of the visual element when it is in a inactive state.

      Returns vec3

      A vec3 representing the current inactive position.

    • set inactivePosition(position: vec3): void

      Sets the position of the visual element when it is in a inactive state.

      Parameters

      • position: vec3

        A vec3 object representing the new position for the inactive state.

      Returns void

    • get inactiveScale(): vec3

      Gets the scale applied when the visual is in a inactive state.

      Returns vec3

      A vec3 representing the current inactive scale.

    • set inactiveScale(scale: vec3): void

      Sets the scale to be applied when the visual is in a inactive state and initializes its visual states.

      Parameters

      • scale: vec3

        A vec3 object representing the scale to apply in the inactive state.

      Returns void

    • get inactiveShouldPosition(): boolean

      Gets whether the inactive state should apply position changes.

      Returns boolean

      true if the inactive state should apply position changes; otherwise, false.

    • set inactiveShouldPosition(shouldPosition: boolean): void

      Sets whether the inactive state should apply position changes and initializes the visual states.

      Parameters

      • shouldPosition: boolean

        A boolean indicating whether the inactive state should apply position changes.

      Returns void

    • get inactiveShouldScale(): boolean

      Gets whether the inactive state should apply scale changes.

      Returns boolean

      true if the inactive state should apply scale changes; otherwise, false.

    • set inactiveShouldScale(shouldScale: boolean): void

      Sets whether the inactive state should apply scale changes and initializes the visual states.

      Parameters

      • shouldScale: boolean

        A boolean indicating whether the inactive state should apply scale changes.

      Returns void

    • get inactiveTexture(): Texture

      Gets the inactive texture for the rounded rectangle.

      Returns Texture

      The inactive texture as a Texture value.

    • set inactiveTexture(texture: Texture): void

      Sets the inactive texture for the rounded rectangle.

      Parameters

      • texture: Texture

        The texture to be set for the inactive state.

      Returns void

    • get isBorderGradient(): boolean

      Gets the type of border for the rounded rectangle.

      Returns boolean

      The type of border, which can be either "Color" or "Gradient".

    • set isBorderGradient(gradient: boolean): void

      Sets whether the rounded rectangle uses a gradient for its border.

      Parameters

      • gradient: boolean

        A boolean indicating whether to use a gradient (true) or a solid color (false) for the border.

      Returns void

    • get renderMeshVisual(): RenderMeshVisual

      Gets the RenderMeshVisual associated with the rounded rectangle.

      Returns RenderMeshVisual

      The visual representation of the rounded rectangle's mesh.

    • get sceneObject(): SceneObject

      Gets the associated SceneObject instance.

      Returns SceneObject

      The SceneObject associated with this visual.

    • get shouldColorChange(): boolean

      Determines whether the color should change when transition to a new state.

      Returns boolean

      A boolean value indicating if the color change is enabled.

    • set shouldColorChange(shouldColorChange: boolean): void

      Sets whether to enable the color changing behavior for the visual.

      Parameters

      • shouldColorChange: boolean

        A boolean indicating whether the color change is enabled (true) or disabled (false).

      Returns void

    • get shouldScale(): boolean

      Determines whether the visual element should scale when transitioning to a new state

      Returns boolean

      true if the visual element should scale, otherwise false.

    • get shouldTranslate(): boolean

      Indicates whether the visual element should be translated when transitioning to a new state.

      Returns boolean

      true if the visual element should be translated; otherwise, false.

    • get size(): vec3

      Gets the size of the RoundedRectangleVisual.

      Returns vec3

      A vec3 representing the dimensions of the RoundedRectangleVisual.

    • set size(size: vec3): void

      Sets the size of the RoundedRectangleVisual. Updates both the internal _size property.

      Parameters

      • size: vec3

        A vec3 object representing the dimensions of the RoundedRectangleVisual.

      Returns void

    • get toggledDefaultBaseType(): BaseType

      Gets the base type for the toggled default state.

      Returns BaseType

      The base type for the toggled default state.

    • set toggledDefaultBaseType(baseType: BaseType): void

      Sets the base type for the toggled default state and initializes the visual states.

      Parameters

      • baseType: BaseType

        The base type to be set for the toggled default state.

      Returns void

    • get toggledDefaultBorderSize(): number

      Gets the border size for the toggled default state.

      Returns number

      The border size for the toggled default state.

    • set toggledDefaultBorderSize(borderSize: number): void

      Sets the border size for the toggled default state and initializes the visual states.

      Parameters

      • borderSize: number

        The border size to be set for the toggled default state.

      Returns void

    • get toggledDefaultBorderType(): BorderType

      Gets the border type for the toggled default state.

      Returns BorderType

      The border type for the toggled default state.

    • set toggledDefaultBorderType(borderType: BorderType): void

      Sets the border type for the toggled default state and initializes the visual states.

      Parameters

      • borderType: BorderType

        The border type to be set for the toggled default state.

      Returns void

    • get toggledDefaultGradient(): GradientParameters

      Gets the toggled default gradient parameters for the visual.

      Returns GradientParameters

      The toggled default gradient parameters.

    • set toggledDefaultGradient(gradient: GradientParameters): void

      Sets the toggled default gradient parameters for the visual and initializes the visual states.

      Parameters

      • gradient: GradientParameters

        The gradient parameters to be set for the toggled default state.

      Returns void

    • get toggledDefaultHasBorder(): boolean

      Gets whether the toggled default state has a border.

      Returns boolean

      true if the toggled default state has a border; otherwise, false.

    • set toggledDefaultHasBorder(hasBorder: boolean): void

      Sets whether the toggled default state has a border and initializes the visual states.

      Parameters

      • hasBorder: boolean

        A boolean indicating whether the toggled default state should have a border.

      Returns void

    • get toggledDefaultShouldPosition(): boolean

      Gets whether the toggled default state should apply position changes.

      Returns boolean

      true if the toggled default state should apply position changes; otherwise, false.

    • set toggledDefaultShouldPosition(shouldPosition: boolean): void

      Sets whether the toggled default state should apply position changes and initializes the visual states.

      Parameters

      • shouldPosition: boolean

        A boolean indicating whether the toggled default state should apply position changes.

      Returns void

    • get toggledDefaultShouldScale(): boolean

      Gets whether the toggled default state should apply scale changes.

      Returns boolean

      true if the toggled default state should apply scale changes; otherwise, false.

    • set toggledDefaultShouldScale(shouldScale: boolean): void

      Sets whether the toggled default state should apply scale changes and initializes the visual states.

      Parameters

      • shouldScale: boolean

        A boolean indicating whether the toggled default state should apply scale changes.

      Returns void

    • get toggledDefaultTexture(): Texture

      Gets the toggled default texture for the rounded rectangle.

      Returns Texture

      The toggled default texture as a Texture value.

    • set toggledDefaultTexture(texture: Texture): void

      Sets the toggled default texture for the rounded rectangle.

      Parameters

      • texture: Texture

        The texture to be set for the toggled default state.

      Returns void

    • get toggledHoveredBaseType(): BaseType

      Gets the base type for the toggled hovered state.

      Returns BaseType

      The base type for the toggled hovered state.

    • set toggledHoveredBaseType(toggledHoveredBaseType: BaseType): void

      Sets the base type for the toggled hovered state and initializes the visual states.

      Parameters

      • toggledHoveredBaseType: BaseType

        The base type to be set for the toggled hovered state.

      Returns void

    • get toggledHoveredBorderSize(): number

      Gets the border size for the toggled hovered state.

      Returns number

      The border size for the toggled hovered state.

    • set toggledHoveredBorderSize(toggledHoveredBorderSize: number): void

      Sets the border size for the toggled hovered state and initializes the visual states.

      Parameters

      • toggledHoveredBorderSize: number

        The border size to be set for the toggled hovered state.

      Returns void

    • get toggledHoveredBorderType(): BorderType

      Gets the border type for the toggled hovered state.

      Returns BorderType

      The border type for the toggled hovered state.

    • set toggledHoveredBorderType(toggledHoveredBorderType: BorderType): void

      Sets the border type for the toggled hovered state and initializes the visual states.

      Parameters

      • toggledHoveredBorderType: BorderType

        The border type to be set for the toggled hovered state.

      Returns void

    • get toggledHoveredGradient(): GradientParameters

      Gets the toggled hovered gradient parameters for the visual.

      Returns GradientParameters

      The toggled hovered gradient parameters.

    • set toggledHoveredGradient(toggledHoveredGradient: GradientParameters): void

      Sets the toggled hovered gradient parameters for the visual and initializes the visual states.

      Parameters

      • toggledHoveredGradient: GradientParameters

        The gradient parameters to be set for the toggled hovered state.

      Returns void

    • get toggledHoveredHasBorder(): boolean

      Gets whether the toggled hovered state has a border.

      Returns boolean

      true if the toggled hovered state has a border; otherwise, false.

    • set toggledHoveredHasBorder(toggledHoveredHasBorder: boolean): void

      Sets whether the toggled hovered state has a border and initializes the visual states.

      Parameters

      • toggledHoveredHasBorder: boolean

        A boolean indicating whether the toggled hovered state should have a border.

      Returns void

    • get toggledHoveredPosition(): vec3

      Gets the toggled hovered position for the visual element.

      Returns vec3

      A vec3 representing the current toggled hovered position.

    • set toggledHoveredPosition(toggledHoveredPosition: vec3): void

      Sets the toggled hovered position for the visual element.

      Parameters

      • toggledHoveredPosition: vec3

        A vec3 object representing the new toggled hovered position.

      Returns void

    • get toggledHoveredScale(): vec3

      Gets the toggled hovered scale of the visual element.

      Returns vec3

      A vec3 representing the current toggled hovered scale.

    • set toggledHoveredScale(toggledHoveredScale: vec3): void

      Sets the scale to be applied when the visual is toggled and hovered.

      Parameters

      • toggledHoveredScale: vec3

        A vec3 representing the new scale to apply when toggled and hovered.

      Returns void

    • get toggledHoveredShouldPosition(): boolean

      Gets whether the toggled hovered state should apply position changes.

      Returns boolean

      true if the toggled hovered state should apply position changes; otherwise, false.

    • set toggledHoveredShouldPosition(toggledHoveredShouldPosition: boolean): void

      Sets whether the toggled hovered state should apply position changes and initializes the visual states.

      Parameters

      • toggledHoveredShouldPosition: boolean

        A boolean indicating whether the toggled hovered state should apply position changes.

      Returns void

    • get toggledHoveredShouldScale(): boolean

      Gets whether the toggled hovered state should apply scale changes.

      Returns boolean

      true if the toggled hovered state should apply scale changes; otherwise, false.

    • set toggledHoveredShouldScale(toggledHoveredShouldScale: boolean): void

      Sets whether the toggled hovered state should apply scale changes and initializes the visual states.

      Parameters

      • toggledHoveredShouldScale: boolean

        A boolean indicating whether the toggled hovered state should apply scale changes.

      Returns void

    • get toggledHoveredTexture(): Texture

      Gets the toggled hovered texture for the rounded rectangle.

      Returns Texture

      The toggled hovered texture as a Texture value.

    • set toggledHoveredTexture(toggledHoveredTexture: Texture): void

      Sets the toggled hovered texture for the rounded rectangle.

      Parameters

      • toggledHoveredTexture: Texture

        The texture to be set for the toggled hovered state.

      Returns void

    • get toggledPosition(): vec3

      Gets the toggled position of the visual element.

      Returns vec3

      A vec3 representing the current toggled position.

    • set toggledPosition(position: vec3): void

      Sets the toggled position of the visual element.

      Parameters

      • position: vec3

        A vec3 object representing the new toggled position.

      Returns void

    • get toggledScale(): vec3

      Gets the toggled scale of the visual element.

      Returns vec3

      A vec3 representing the current toggled scale.

    • set toggledScale(scale: vec3): void

      Sets the scale to be applied when the visual is toggled and initializes its visual states.

      Parameters

      • scale: vec3

        A vec3 representing the new scale to apply when toggled.

      Returns void

    • get toggledTriggeredBaseType(): BaseType

      Gets the base type for the toggled triggered state.

      Returns BaseType

      The base type for the toggled triggered state.

    • set toggledTriggeredBaseType(baseType: BaseType): void

      Sets the base type for the toggled triggered state and initializes the visual states.

      Parameters

      • baseType: BaseType

        The base type to be set for the toggled triggered state.

      Returns void

    • get toggledTriggeredBorderSize(): number

      Gets the border size for the toggled triggered state.

      Returns number

      The border size for the toggled triggered state.

    • set toggledTriggeredBorderSize(borderSize: number): void

      Sets the border size for the toggled triggered state and initializes the visual states.

      Parameters

      • borderSize: number

        The border size to be set for the toggled triggered state.

      Returns void

    • get toggledTriggeredBorderType(): BorderType

      Gets the border type for the toggled triggered state.

      Returns BorderType

      The border type for the toggled triggered state.

    • set toggledTriggeredBorderType(borderType: BorderType): void

      Sets the border type for the toggled triggered state and initializes the visual states.

      Parameters

      • borderType: BorderType

        The border type to be set for the toggled triggered state.

      Returns void

    • get toggledTriggeredGradient(): GradientParameters

      Gets the toggled triggered gradient parameters for the visual.

      Returns GradientParameters

      The toggled triggered gradient parameters.

    • set toggledTriggeredGradient(gradient: GradientParameters): void

      Sets the toggled triggered gradient parameters for the visual and initializes the visual states.

      Parameters

      • gradient: GradientParameters

        The gradient parameters to be set for the toggled triggered state.

      Returns void

    • get toggledTriggeredHasBorder(): boolean

      Gets whether the toggled triggered state has a border.

      Returns boolean

      true if the toggled triggered state has a border; otherwise, false.

    • set toggledTriggeredHasBorder(hasBorder: boolean): void

      Sets whether the toggled triggered state has a border and initializes the visual states.

      Parameters

      • hasBorder: boolean

        A boolean indicating whether the toggled triggered state should have a border.

      Returns void

    • get toggledTriggeredPosition(): vec3

      Gets the toggled triggered position of the visual element.

      Returns vec3

      A vec3 representing the current toggled triggered position.

    • set toggledTriggeredPosition(position: vec3): void

      Sets the toggled triggered position of the visual element.

      Parameters

      • position: vec3

        A vec3 object representing the new toggled triggered position.

      Returns void

    • get toggledTriggeredScale(): vec3

      Gets the toggled triggered scale of the visual element.

      Returns vec3

      A vec3 representing the current toggled triggered scale.

    • set toggledTriggeredScale(scale: vec3): void

      Sets the toggled triggered scale of the visual element.

      Parameters

      • scale: vec3

        A vec3 object representing the new toggled triggered scale.

      Returns void

    • get toggledTriggeredShouldPosition(): boolean

      Gets whether the toggled triggered state should apply position changes.

      Returns boolean

      true if the toggled triggered state should apply position changes; otherwise, false.

    • set toggledTriggeredShouldPosition(shouldPosition: boolean): void

      Sets whether the toggled triggered state should apply position changes and initializes the visual states.

      Parameters

      • shouldPosition: boolean

        A boolean indicating whether the toggled triggered state should apply position changes.

      Returns void

    • get toggledTriggeredShouldScale(): boolean

      Gets whether the toggled triggered state should apply scale changes.

      Returns boolean

      true if the toggled triggered state should apply scale changes; otherwise, false.

    • set toggledTriggeredShouldScale(shouldScale: boolean): void

      Sets whether the toggled triggered state should apply scale changes and initializes the visual states.

      Parameters

      • shouldScale: boolean

        A boolean indicating whether the toggled triggered state should apply scale changes.

      Returns void

    • get toggledTriggeredTexture(): Texture

      Gets the toggled triggered texture for the rounded rectangle.

      Returns Texture

      The toggled triggered texture as a Texture value.

    • set toggledTriggeredTexture(texture: Texture): void

      Sets the toggled triggered texture for the rounded rectangle.

      Parameters

      • texture: Texture

        The texture to be set for the toggled triggered state.

      Returns void

    • get transform(): Transform

      Gets the transform associated with this visual.

      Returns Transform

      The current transform of the visual.

    • get triggeredBaseType(): BaseType

      Gets the base type for the triggered state.

      Returns BaseType

      The base type for the triggered state.

    • set triggeredBaseType(baseType: BaseType): void

      Sets the base type for the triggered state and initializes the visual states.

      Parameters

      • baseType: BaseType

        The base type to be set for the triggered state.

      Returns void

    • get triggeredBorderSize(): number

      Gets the border size for the triggered state.

      Returns number

      The border size for the triggered state.

    • set triggeredBorderSize(borderSize: number): void

      Sets the border size for the triggered state and initializes the visual states.

      Parameters

      • borderSize: number

        The border size to be set for the triggered state.

      Returns void

    • get triggeredBorderType(): BorderType

      Gets the border type for the triggered state.

      Returns BorderType

      The border type for the triggered state.

    • set triggeredBorderType(borderType: BorderType): void

      Sets the border type for the triggered state and initializes the visual states.

      Parameters

      • borderType: BorderType

        The border type to be set for the triggered state.

      Returns void

    • get triggeredGradient(): GradientParameters

      Gets the triggered gradient parameters for the visual.

      Returns GradientParameters

      The triggered gradient parameters.

    • set triggeredGradient(gradient: GradientParameters): void

      Sets the triggered gradient parameters for the visual and initializes the visual states.

      Parameters

      Returns void

    • get triggeredHasBorder(): boolean

      Gets whether the triggered state has a border.

      Returns boolean

      true if the triggered state has a border; otherwise, false.

    • set triggeredHasBorder(hasBorder: boolean): void

      Sets whether the triggered state has a border and initializes the visual states.

      Parameters

      • hasBorder: boolean

        A boolean indicating whether the triggered state should have a border.

      Returns void

    • get triggeredPosition(): vec3

      Gets the triggered position of the visual element.

      Returns vec3

      A vec3 representing the current triggered position.

    • set triggeredPosition(position: vec3): void

      Sets the triggered position of the visual element.

      Parameters

      • position: vec3

        A vec3 object representing the new triggered position.

      Returns void

    • get triggeredScale(): vec3

      Gets the triggered scale of the visual element.

      Returns vec3

      A vec3 representing the current triggered scale.

    • set triggeredScale(scale: vec3): void

      Sets the triggered scale of the visual and initializes its visual states.

      Parameters

      • scale: vec3

        A vec3 representing the scale to be applied to the visual.

      Returns void

    • get triggeredShouldPosition(): boolean

      Gets whether the triggered state should apply position changes.

      Returns boolean

      true if the triggered state should apply position changes; otherwise, false.

    • set triggeredShouldPosition(shouldPosition: boolean): void

      Sets whether the triggered state should apply position changes and initializes the visual states.

      Parameters

      • shouldPosition: boolean

        A boolean indicating whether the triggered state should apply position changes.

      Returns void

    • get triggeredShouldScale(): boolean

      Gets whether the triggered state should apply scale changes.

      Returns boolean

      true if the triggered state should apply scale changes; otherwise, false.

    • set triggeredShouldScale(shouldScale: boolean): void

      Sets whether the triggered state should apply scale changes and initializes the visual states.

      Parameters

      • shouldScale: boolean

        A boolean indicating whether the triggered state should apply scale changes.

      Returns void

    • get triggeredTexture(): Texture

      Gets the triggered texture for the rounded rectangle.

      Returns Texture

      The triggered texture as a Texture value.

    • set triggeredTexture(texture: Texture): void

      Sets the triggered texture for the rounded rectangle.

      Parameters

      • texture: Texture

        The texture to be set for the triggered state.

      Returns void

    Methods

    • Destroys the current instance.

      Returns void

    • Initializes the visual component by setting up its initial scale and position, and preparing its visual states. This method is typically called during the setup phase to ensure the visual component is ready for use.

      Returns void

    • Prints the configuration of the rounded rectangle visual to the console.

      Returns void

    • Sets the gradient start and end positions for the base of the rounded rectangle.

      Parameters

      • gradientStartPosition: vec2

        A 2D vector representing the starting position of the gradient.

      • gradientEndPosition: vec2

        A 2D vector representing the ending position of the gradient.

      Returns void

    • Sets the start and end positions for the border gradient of the rounded rectangle.

      Parameters

      • gradientStartPosition: vec2

        A 2D vector representing the starting position of the border gradient.

      • gradientEndPosition: vec2

        A 2D vector representing the ending position of the border gradient.

      Returns void

    • Updates the visual state of the RoundedRectangleVisual component.

      This method overrides the base setState method to apply visual updates specific to the RoundedRectangleVisual, such as gradients and border colors.

      Parameters

      • stateName: StateName

        The new state to apply, represented as a stateName object.

      Returns void

    • Parameters

      Returns void

    • Parameters

      Returns void

    • Parameters

      Returns void

    • Parameters

      • borderSize: number

      Returns void

    • Parameters

      • hasBorder: boolean

      Returns void