Defines the scroll area, a box collider that the user can interact with using an Interactor. The dragging events are exposed to be consumed in ScrollView

Hierarchy (view full)

Constructors

Properties

_alpha: number = 1
attachedToScene: boolean = false
childViews: default<any>[] = []
container: SceneObject
isDestroyed: boolean = false
onDragEnd: PublicApi<DragInteractorEvent> = ...
onDragStart: PublicApi<DragInteractorEvent> = ...
onDragUpdate: PublicApi<DragInteractorEvent> = ...
onEnabled: PublicApi<boolean> = ...
onFocusEnter: PublicApi<ScrollViewFocusEventArgs> = ...
onTriggerCanceled: PublicApi<InteractorEvent>
onTriggerEnd: PublicApi<InteractorEvent>
onTriggerStart: PublicApi<InteractorEvent>
onCreateView: PublicApi<default<any>> = ...
onDestroyView: PublicApi<default<any>> = ...

Accessors

  • get alpha(): number
  • Returns the current alpha of the view

    Returns number

  • set alpha(a): void
  • Parameters

    • a: number

    Returns void

  • get config(): Config
  • Returns Config

  • get debugDrawEnabled(): boolean
  • Returns boolean

    if collider wire is visible or not

  • set debugDrawEnabled(debugDrawEnabled): void
  • Toggles collider wire rendering for visualizing collider geometry shape and where it is placed.

    Parameters

    • debugDrawEnabled: boolean

    Returns void

  • get localPosition(): vec3
  • Returns vec3

  • set localPosition(position): void
  • Parameters

    Returns void

  • get localRotation(): quat
  • Returns quat

  • set localRotation(rotation): void
  • Parameters

    Returns void

  • get localScale(): number
  • Return the local scale of an object, assuming uniform scaling

    Returns number

  • set localScale(scale): void
  • Parameters

    • scale: number

    Returns void

  • get localScaleVec3(): vec3
  • Returns vec3

  • set localScaleVec3(vec): void
  • Parameters

    Returns void

  • get name(): string
  • Returns string

  • get position(): vec3
  • Deprecated

    use localPosition instead

    Returns vec3

  • set position(position): void
  • Deprecated

    pleasre use localPosition

    Parameters

    Returns void

  • set scale(scale): void
  • Deprecated

    use localScale instead

    Parameters

    • scale: number

    Returns void

  • get scrollColliderBounds(): vec2
  • Returns vec2

    the collider's BoxShape's bounds.

  • set scrollColliderBounds(scrollColliderBounds): void
  • Parameters

    • scrollColliderBounds: vec2

      the collider's BoxShape's bounds.

    Returns void

  • get worldPosition(): vec3
  • Returns vec3

  • set worldPosition(position): void
  • Parameters

    Returns void

  • get worldRotation(): quat
  • Returns quat

  • set worldRotation(rotation): void
  • Parameters

    Returns void

  • get worldScale(): number
  • Returns number

  • set worldScale(scale): void
  • Parameters

    • scale: number

    Returns void

  • get worldScaleVec3(): vec3
  • Returns vec3

  • set worldScaleVec3(scale): void
  • Parameters

    Returns void

Methods

  • Type Parameters

    Parameters

    • child: Child
    • Optionalconfigure: ((c: Child) => void)
        • (c): void
        • Parameters

          Returns void

    • preserveWorldTransform: boolean = false

    Returns Child

  • Destroys and removes the child from this View

    Type Parameters

    Parameters

    • child: Child

      the child to be destroyed

    Returns boolean

    whether the child was destroyed

  • Detaches child from parent and removes the child from this View

    Type Parameters

    Parameters

    • child: Child

      the child to be detached

    Returns boolean

    whether the child was detached

  • Parameters

    • worldPos: vec3

      a point representing something's world position

    Returns vec3

    the point's position relative to this view

  • Parameters

    • defaults: Partial<{
          colorMask: vec4b;
          font: Font;
          fontSize: number;
          textColor: vec4;
      }>
    • parentView: default<Partial<{
          defaults: Partial<{
              colorMask: vec4b;
              font: Font;
              fontSize: number;
              textColor: vec4;
          }>;
          enabled: boolean;
          name: string;
          position: vec3;
          rotation: quat;
          scale: number;
      }>>

    Returns void

  • Deprecated

    use destroyChild or detachChild instead.

    Type Parameters

    Parameters

    Returns void

  • Set the alpha of the View to a, and recursively apply this alpha to all descendents. The alpha will be applied by setting the .a component of baseColor to a.

    Parameters

    • a: number

      The value to set the alpha of the view to, from 0 to 1

    Returns void

  • Parameters

    • enabled: boolean

    Returns void