ReadonlyapiGeneric object accessible by other instances of ScriptComponent. Use this object to store references to properties and methods that need to be accessible from other ScriptComponents.
If disabled, the Component will stop enacting its behavior.
ReadonlyfrustumFrustum that handles helper viewport logic. Use this to test if your content is visible within the scroll window.
ReadonlyisReturns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.
ReadonlyonEvent that fires when the ScrollWindow has been initialized
ReadonlyonEvent that fires when scroll dimensions are updated. Use this event to execute logic when the scrollable area size changes.
ReadonlyonEvent that fires during scroll drag interactions. Use this event to execute logic when the user drags to scroll.
ReadonlyonEvent that fires when scroll position is updated. Use this event to execute logic when the scroll position changes. The position is in local space.
ReadonlysceneThe SceneObject this component is on.
Readonlyuniqueget the number of children in the content of scroll window
Whether edge fade is enabled
true if edge fade is enabled, false otherwise
Whether edge fade is enabled
true to enable edge fade, false to disable
The boundary within which child colliders will be enabled when an interactor hovers over the ScrollWindow. Uses normalized positions from -1 to 1 on both axes. For example, if we provide a Rect with Rect.create(-1, 1, -0.8, 1), hovering the bottom 10% of the ScrollWindow will not enable the child ColliderComponents.
The current enable child colliders boundary
The boundary within which child colliders will be enabled when an interactor hovers over the ScrollWindow.
The boundary rect using normalized positions from -1 to 1
Whether hard stop at ends is enabled When true, disables the bounce-back effect at the edges of the scroll area. When false (default), the scroll window will use a spring animation to bounce back when scrolled beyond bounds.
true if hard stop at ends is enabled, false otherwise
Whether hard stop at ends is enabled
true to enable hard stop at ends, false to disable
Whether horizontal scrolling is enabled
true if horizontal scrolling is enabled, false otherwise
Whether horizontal scrolling is enabled
true to enable horizontal scrolling, false to disable
Whether this scroll window is controlled externally
true if controlled externally, false otherwise
Whether this scroll window is controlled externally
true to control externally, false to control internally
get whether this scroll window is initialized
The size of the total scrollable area
The scroll dimensions in local space
Whether scrolling is currently paused
true if scrolling is paused, false otherwise
Pause or resume scrolling
true to pause scrolling, false to resume
The scroll position in local space
The scroll position in normalized space -1, 1 on the x (left to right) if scrollDimensions.x is not -1, otherwise the scroll position.x in pixels -1, 1 on the y (bottom to top) if scrollDimensions.y is not -1, otherwise the scroll position.y in pixels
The scroll position in normalized space -1, 1 on the x (left to right) -1, 1 on the y (bottom to top)
Whether this scroll window is using snap scrolling
true if snap scrolling is enabled, false otherwise
Whether this scroll window is using snap scrolling
Whether vertical scrolling is enabled
true if vertical scrolling is enabled, false otherwise
Whether vertical scrolling is enabled
true to enable vertical scrolling, false to disable
The size of the masked window viewport in local space
The window size in local space
Adds a SceneObject to this scroll window's scrollable content area. The object's parent will be set to the internal scroller object.
The SceneObject to add to the scroll window
Adds a new SceneEvent, triggered by eventType events, to the ScriptComponent.
Destroys the component.
Returns the SceneObject the component is attached to.
Returns the Transform this component is attached to.
StaticgetReturns the name of this object's type.
ReadonlygetGets the viewable window of local space at zero depth. The window ranges from -windowSize.x/2 to windowSize.x/2 on the x-axis (left to right) and -windowSize.y/2 to windowSize.y/2 on the y-axis (bottom to top).
VisibleWindow object containing bottomLeft and topRight corners in local space
Gets the viewable window in normalized space at zero depth. The window ranges from -1 to 1 on the x-axis (left to right) and -1 to 1 on the y-axis (bottom to top).
VisibleWindow object containing bottomLeft and topRight corners in normalized space
Initializes the ScrollWindow component. This method runs once on creation and sets up all necessary components and event handlers.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Removes a previously added SceneEvent from the ScriptComponent.
Sets the scroll velocity for programmatic scrolling animations.
The velocity to set in local space units per frame
Helper function to tween scroll
final position
duration of tweened scroll in milliseconds
A low-level scrolling interaction solution for Spectacles.
Children of this Component's SceneObject will be masked into windowSize and scrollable by scrollDimensions