Class InteractiveGizmoSliderXY

Interactive gizmo that is positioned in screen-space, and reports 2D movement in screen space (in pixels). When setting the position the Z coordinate will be ignored, and XY coordinates will be interpreted as pixels relative to the camera its viewed through.

Hierarchy (view full)

Constructors

  • Constructs a new 2D slider.

    Parameters

    • parentGizmo: InteractiveGizmo
    • width: number

      Width of the area of the slider that can be interacted with, in pixels.

    • height: number

      Height of the area of the slider that can be interacted with, in pixels.

    • layer: rsx.LayerMask

      The Layer that allows filtering of which sliders are interacted with from a specific camera.

    • Optionalconstraint: EnumValue<XYSliderConstraint, number>

      Optional constraint that determines in which direction is the slider allowed to be moved in.

    • OptionalisInternalConstructor: boolean

    Returns InteractiveGizmoSliderXY

Accessors

  • get color(): Immutable<Color>
  • The color of the slider.

    Returns Immutable<Color>

    This is only relevant if CustomDrawing is enabled and the default slider representation is drawn.

  • set color(value): void
  • Parameters

    Returns void

  • get delta(): Immutable<Vector2>
  • Returns a delta value that is the result of dragging/sliding the pointer. This changes every frame and will be zero unless the slider is active. The value is in screen space (pixels).

    Returns Immutable<Vector2>

  • get isCustomDrawingEnabled(): boolean
  • Determines if custom drawing is enabled. This allows the user to draw custom gizmos for the slider in the Draw method of the parent InteractiveGizmo. If custom drawing is enabled, the built in visual representation for the slider will not be drawn.

    Returns boolean

  • set isCustomDrawingEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isDrawingWireframe(): boolean
  • Determines if the slider is being drawn as wireframe mesh instead of solid.

    Returns boolean

    This is only relevant if CustomDrawing is enabled and the default slider representation is drawn.

  • set isDrawingWireframe(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isEnabled(): boolean
  • Enables or disables the slider, making it interactable or not.

    Returns boolean

  • set isEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isFixedScale(): boolean
  • Returns if fixed scale is enabled. If enabled the interactive gizmo will always try to maintain the same visible area in the viewport regardless of distance from camera.

    Returns boolean

  • get layer(): rsx.LayerMask
  • Returns a layer that determines which sliders are interacted with from a specific camera.

    Returns rsx.LayerMask

  • get position(): Immutable<Vector3>
  • Sets the world position of the slider.

    Returns Immutable<Vector3>

  • set position(value): void
  • Parameters

    Returns void

  • get scale(): Immutable<Vector3>
  • Sets the scale of the slider.

    Returns Immutable<Vector3>

  • set scale(value): void
  • Parameters

    Returns void