Options
All
  • Public
  • Public/Protected
  • All
V1.7
  • V1.6
  • V1.7
Menu

Class UiGridLayout

UiGridLayout provides for automatic layout of elements in a grid.

The UiGridLayout will grow to accommodate items as they are added based on the row and column settings. Setting the number of rows or columns to be non-zero will lock that grid dimension to the provided value while the other dimension grows to fit content. If both are set to be non-zero, the columns will take precedence.

Hierarchy

Index

Methods

Methods

addChild

  • addChild(a_pChild: Node | null): boolean
  • Adds a child to the current Node, removing it from its current parent.

    A child can only have a single Parent

    priv

    none

    Parameters

    • a_pChild: Node | null

      The Node to add as a child to this Node.

    Returns boolean

    true if successful, false if failed

addItem

  • addItem(item: TransformNode | null): void
  • addItem(item: TransformNode | null, padding: [number, number, number, number] | Float32Array): void
  • addItem(item: TransformNode | null, padding: [number, number, number, number] | Float32Array, alignment: Alignment): void
  • Adds an item to the grid.

    priv

    none

    Parameters

    • item: TransformNode | null

      The node hierarchy to add to the grid.

    Returns void

  • Adds an item to the grid.

    Note that padding in a dimension will work only for items smaller in that dimension than the cell they are in. Large horizontal padding for an item will also contribute to the width of the column the item is in. The same applies for large vertical padding vis-a-vis the height of the row the item is in.

    priv

    none

    Parameters

    • item: TransformNode | null

      The node hierarchy to add to the grid.

    • padding: [number, number, number, number] | Float32Array

      The item padding within the grid.

    Returns void

  • Adds an item to the grid.

    Note that padding in a dimension will work only for items smaller in that dimension than the cell they are in. Large horizontal padding for an item will also contribute to the width of the column the item is in. The same applies for large vertical padding vis-a-vis the height of the row the item is in. Also for the right and the bottom alignments to kick in, the containing cell should be, respectively, wider and higher than its content.

    priv

    none

    Parameters

    • item: TransformNode | null

      The node hierarchy to add to the grid.

    • padding: [number, number, number, number] | Float32Array

      The item padding within the grid.

    • alignment: Alignment

      The item alignment.

    Returns void

addItemAt

  • addItemAt(index: number, item: TransformNode | null): void
  • addItemAt(index: number, item: TransformNode | null, padding: [number, number, number, number] | Float32Array): void
  • addItemAt(index: number, item: TransformNode | null, padding: [number, number, number, number] | Float32Array, alignment: Alignment): void
  • Adds an item to the grid at the specific index.

    If the index is out of bounds, the item will be added to the last index.

    priv

    none

    Parameters

    • index: number

      index at which item will be placed

    • item: TransformNode | null

      The node hierarchy to add to the grid.

    Returns void

  • Adds an item to the grid at the specified index.

    If the index is out of bounds, the item will be added to the last index. Note that padding in a dimension will work only for items smaller in that dimension than the cell they are in. Large horizontal padding for an item will also contribute to the width of the column the item is in. The same applies for large vertical padding vis-a-vis the height of the row the item is in.

    priv

    none

    Parameters

    • index: number

      index at which item will be placed

    • item: TransformNode | null

      The node hierarchy to add to the grid.

    • padding: [number, number, number, number] | Float32Array

      The item padding within the grid.

    Returns void

  • Adds an item to the grid at the specified index.

    If the index is out of bounds, the item will be added to the last index. Note that padding in a dimension will work only for items smaller in that dimension than the cell they are in. Large horizontal padding for an item will also contribute to the width of the column the item is in. The same applies for large vertical padding vis-a-vis the height of the row the item is in. Also for the right and the bottom alignments to kick in, the containing cell should be, respectively, wider and higher than its content.

    priv

    none

    Parameters

    • index: number

      index at which item will be placed

    • item: TransformNode | null

      The node hierarchy to add to the grid.

    • padding: [number, number, number, number] | Float32Array

      The item padding within the grid.

    • alignment: Alignment

      The item alignment.

    Returns void

addMoveCallback

  • addMoveCallback(track?: number): void
  • Adds a client-side callback event to the move list. When the event is reached during the animation playback, the ServerEventCallback function set in Client will be called with an event TransformAnimationEventData.

    priv

    none

    Parameters

    • Optional track: number

    Returns void

addToLayer

  • addToLayer(a_layer: bigint): void

clearAllEventSounds

  • clearAllEventSounds(): void

clearEventSound

delayMove

  • delayMove(durationSecs: number, track?: number): void
  • Adds a delay to the current move sequence.

    priv

    none

    Parameters

    • durationSecs: number

      How long to delay, in seconds.

    • Optional track: number

      default = 0
      which animation track to add the delay to.

    Returns void

findChild

  • findChild(name: string): Node | null
  • Find the first named child in the node hierarchy, including this Node.

    Does a breadth-first search of the child node hierarchy for the specified named Node and will return the first encountered match, or nullptr if no named Node found.

    priv

    none

    Parameters

    • name: string

      The name to search for.

    Returns Node | null

findChildren

  • findChildren(a_type: number, a_bExactType?: boolean, a_bIncludeSelf?: boolean): Array<Node | null>
  • Does a breadth-first search of the child node hierarchy for the specified Node type.

    priv

    none

    Parameters

    • a_type: number

      The type of Node to find in the child hierarchy.

    • Optional a_bExactType: boolean

      default = false
      Flag to indicate if the child node must be the exact type or can be derived from the type (default false).

    • Optional a_bIncludeSelf: boolean

      default = false
      Flag to indicate if the search should include this Node (default false).

    Returns Array<Node | null>

    A vector of Node pointers containing the results.

findParent

  • findParent(a_type: number, a_bExactType?: boolean): Node | null
  • Searches up the tree parentage for the specific Node type.

    priv

    none

    Parameters

    • a_type: number

      The type of Node to find in the parent hierarchy.

    • Optional a_bExactType: boolean

      default = false
      Flag to indicate if the parent node must be the exact type or can be derived from the type (default false).

    Returns Node | null

    The parent node, if found, null if not found.

getAABB

  • Get the AABB of this Node's full hierarchy, including all descendants, with all Node transforms applied.

    The returned AABB encompasses this Node and all descendant Nodes and is aligned to the coordinate system the Node resides within, i.e. the Node's parent coordinate system. Note, the returned AABB is not guaranteed to be the minimal, tightest fitting AABB to encompass the Node's descendant hierarchy, but it will fully enlose the Node's hierarchy.

    priv

    none

    Returns AABB

    The bounding box

getAlignment

getAnchorPosition

  • getAnchorPosition(): [number, number, number]

getChild

  • getChild(a_iIndex: number): Node | null

getChildCount

  • getChildCount(): number

getColumns

  • getColumns(): number

getCurrentColumns

  • getCurrentColumns(): number
  • Gets the current calculated columns based on row and column settings and the number of items currently added.

    priv

    none

    Returns number

getCurrentPrismTransform

  • getCurrentPrismTransform(): [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]
  • Get the Cached Prism Transform of this Node

    priv

    none

    Returns [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]

    Transform Matrix

getCurrentRows

  • getCurrentRows(): number
  • Gets the current calculated rows based on row and column settings and the number of items currently added.

    priv

    none

    Returns number

getCurrentWorldTransform

  • getCurrentWorldTransform(): [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]
  • Get the Cached World Transform of this Node

    priv

    none

    Returns [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]

    Transform Matrix

getCursorHoverState

getDefaultItemAlignment

getDefaultItemPadding

  • getDefaultItemPadding(): [number, number, number, number]

getEnabled

  • getEnabled(): boolean

getEventPassThrough

  • getEventPassThrough(): boolean

getEventSound

  • Gets the Sound for the specified event, if set. If no sound ID set for the specified event, nullptr will be returned.

    priv

    none

    Parameters

    • event: SoundEvent

      The sound event to get the Sound for.

    Returns Sound | null

    Pointer to the Sound object associated with the sound ID for the event or nullptr if no sound set.

getEventSoundID

getFocused

  • getFocused(): boolean

getGravityWellEnabled

  • getGravityWellEnabled(): boolean

getGravityWellProperties

getHideBounds

  • getHideBounds(): boolean

getHovered

  • getHovered(): boolean

getItem

  • Gets the item found at the zero-based index, regardless whether it's visible or not.

    If the index is out of bounds, nullptr will be returned.

    priv

    none

    Parameters

    • index: number

      The position of the item (zero-based).

    Returns TransformNode | null

    Item node pointer.

  • Gets the item at the row and col position.

    Invisible items in the grid will not be considered if the grid is set to skip invisble items. If the row and column are out of bounds, nullptr will be returned.

    priv

    none

    Parameters

    • row: number

      The row position of the item (zero-based).

    • col: number

      The column position of the item (zero-based).

    Returns TransformNode | null

    Item node pointer.

getItemAlignment

  • Gets the item alignment at the specified row and col position.

    priv

    none

    Parameters

    • row: number

      The row position of the item (zero-based).

    • col: number

      The column position of the item (zero-based).

    Returns Alignment | null

    Reference to receive the setting.

  • Gets the item alignment.

    priv

    none

    Parameters

    Returns Alignment | null

    Reference to receive the setting.

getItemCount

  • getItemCount(): number

getItemPadding

  • getItemPadding(row: number, col: number): [number, number, number, number] | null
  • getItemPadding(item: TransformNode | null): [number, number, number, number] | null
  • Gets the item padding at the specified row and col position.

    priv

    none

    Parameters

    • row: number

      The row position of the item (zero-based).

    • col: number

      The column position of the item (zero-based).

    Returns [number, number, number, number] | null

    Reference to receive the setting.

  • Gets the item padding.

    priv

    none

    Parameters

    Returns [number, number, number, number] | null

    Reference to receive the setting.

getLocalAABB

  • getLocalAABB(): AABB
  • Get the local AABB of this Node only, not including children, aligned to this Node's local coordinate system.

    A local AABB of math::AABB::EMPTY indicates the Node either has no visual information or that local AABB is not supported for the Node.

    Note: The local AABB for ModelNodes is currently not supported and will report math::AABB::EMPTY.

    priv

    none

    Returns AABB

    The bounding box.

getLocalPosition

  • getLocalPosition(): [number, number, number]

getLocalRotation

  • getLocalRotation(): [number, number, number, number]

getLocalScale

  • getLocalScale(): [number, number, number]

getLocalTransform

  • getLocalTransform(): [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]
  • Get the Local Transform of this Node

    priv

    none

    Returns [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]

    Transform Matrix

getName

  • getName(): string
  • Get the name of the Node.

    This call returns EMPTY_STRING if the Node's name has not been set.

    priv

    none

    Returns string

    The name of the Node, if set.

getNodeId

  • getNodeId(): bigint

getOnActivateResponse

getParent

  • getParent(): Node | null

getParentedBoneName

  • getParentedBoneName(): string

getPrismId

  • getPrismId(): bigint

getPrismPosition

  • getPrismPosition(): [number, number, number]

getRenderingLayer

  • getRenderingLayer(): number

getRigidBody

getRoot

getRows

  • getRows(): number

getSize

  • getSize(): [number, number]

getSkipInvisibleItems

  • getSkipInvisibleItems(): boolean
  • Gets whether this layout skips invisible items or not.

    priv

    none

    Returns boolean

    true if the layout skips invisible items, false if not.

getWorldPosition

  • getWorldPosition(): [number, number, number]

isInLayer

  • isInLayer(a_layer: bigint): boolean
  • Checks to see if node subscribes to the specified node layer.

    priv

    none

    Parameters

    • a_layer: bigint

      The layer to test if this node is a member of.

    Returns boolean

    True if this node subscribes to the specified layer.

isInSubtree

  • isInSubtree(pParent: Node | null): boolean

isSkipRaycast

  • isSkipRaycast(): boolean

isTriggerable

  • isTriggerable(): boolean
  • Returns true if this node should handle trigger presses directly.

    Returns boolean

    true if this node will handle trigger presses directly when focused, false if trigger press will instead enter prism placement mode.

isVisibilityInherited

  • isVisibilityInherited(): boolean

isVisible

  • isVisible(): boolean
  • Returns the visibility state of the node. Note that only the local state is checked, the effect of a parent's visibility is ignored.

    priv

    none

    Returns boolean

    True if the Node is visible.

isVisibleInPrism

  • isVisibleInPrism(): boolean
  • Returns the visibility of the Node in the hierarchy based on self visibility and any potential inherited visibility.

    priv

    none

    Returns boolean

    True if the Node is visible in the Prism.

onActivateSub

onActivateUnsub

  • onActivateUnsub(callbackID: CallbackID): boolean

onDeletedSub

onDeletedUnsub

onDisabledSub

onDisabledUnsub

  • onDisabledUnsub(callbackID: CallbackID): boolean

onEnabledSub

onEnabledUnsub

onFocusGainedSub

onFocusGainedUnsub

  • onFocusGainedUnsub(callbackID: CallbackID): boolean

onFocusInputSub

onFocusInputUnsub

  • onFocusInputUnsub(callbackID: CallbackID): boolean

onFocusLostSub

onFocusLostUnsub

  • onFocusLostUnsub(callbackID: CallbackID): boolean

onHoverEnterSub

onHoverEnterUnsub

  • onHoverEnterUnsub(callbackID: CallbackID): boolean

onHoverExitSub

onHoverExitUnsub

  • onHoverExitUnsub(callbackID: CallbackID): boolean

onHoverMoveSub

  • onHoverMoveSub(callback: ((arg0: UiEventData, arg1: [number, number, number] | Float32Array) => void) | null): CallbackID

onHoverMoveUnsub

  • onHoverMoveUnsub(callbackID: CallbackID): boolean

onLongPressSub

onLongPressUnsub

  • onLongPressUnsub(callbackID: CallbackID): boolean

onPressedSub

onPressedUnsub

onReleasedSub

onReleasedUnsub

  • onReleasedUnsub(callbackID: CallbackID): boolean

onUpdateSub

onUpdateUnsub

removeChild

  • removeChild(a_pChild: Node | null): void

removeFromLayer

  • removeFromLayer(a_layer: bigint): void

removeItem

  • Removes the item at the row and col position.

    Removing an item from the grid can alter the grid position of other items based on the grid's row and column settings.

    The returned Node hierarchy will be orphaned (no longer attached to the scene graph) and must be handled by the caller.

    If the row and column are out of bounds, nothing happens.

    priv

    none

    Parameters

    • row: number

      The row position of the item (zero-based).

    • col: number

      The column position of the item (zero-based).

    Returns TransformNode | null

    Item node pointer.

replaceItem

  • Replaces the item in the grid at (row, col).

    The returned Node hierarchy will be orphaned (no longer attached to the scene graph) and must be handled by the caller.

    If (row, col) is out of bounds, nothing happens.

    Parameters

    • row: number

      The row of the item to be replaced.

    • col: number

      The column of the item to be replaced.

    • newItem: TransformNode | null

      The new item replacing the Node at (row, col)

    Returns TransformNode | null

    replaced Node's pointer.

  • Replaces an existing item in the grid with a new item

    If either of the Node's are invalid - Null or not contained in the grid - nothing happens.

    Parameters

    • oldItem: TransformNode | null

      The pointer for the grid item you would like to replace

    • newItem: TransformNode | null

      The pointer for the new item replacing the oldItem in the grid

    Returns boolean

    true if the newItem has successfully replaced the oldItem

setAlignment

  • Sets the UiNodes's self alignment relative to Node position.

    Alignment is defined as what side the Node position is in relative to the planar, XY element bounds. A horizontal left alignment would result in the node position being on the left side of the bounds area. A vertical top alignment would result in the node position being on the top side of the bounds area.

    priv

    none

    Parameters

    Returns void

setAnchorPosition

  • setAnchorPosition(a_position: [number, number, number] | Float32Array): void
  • Sets the anchor position of the Node's transform. Rotations, scaling, and translations of the transform will take place around this point. Changing the anchor point will recalculate the transform to the new anchor point.

    priv

    none

    Parameters

    • a_position: [number, number, number] | Float32Array

      Anchor position. This is relative to the default 0,0,0 position of the transform.

    Returns void

setColumns

  • setColumns(columns: number): void
  • Sets the number of columns for the grid.

    The default value of 0 indicates the number of columns can grow to fit items as they are added. Setting the value above 0 will lock the grid column dimension.

    If both rows and columns are set, columns will take precedence.

    If neither rows or columns are set, the grid layout will have 1 row and add columns as needed.

    When the number of columns is set, the grid will lay items in row-major order.

    priv

    none

    Parameters

    • columns: number

      the number of columns for the grid layout.

    Returns void

setCursorHoverState

setDefaultItemAlignment

  • setDefaultItemAlignment(alignment: Alignment): void
  • Sets the default item alignment within the grid.

    Default item alignments are TOP_LEFT.

    This will be set for any new items that are added that aren't explicitly specifying alignment. The alignment of each individual item can still be set later if needed. Note that for the right and the bottom alignments to kick in, the containing cell should be, respectively, wider and higher than its content.

    priv

    none

    Parameters

    • alignment: Alignment

      The default item alignment.

    Returns void

setDefaultItemPadding

  • setDefaultItemPadding(padding: [number, number, number, number] | Float32Array): void
  • Sets the default padding of each item within the grid, in scene units. The default is no padding (0,0,0,0).

    The padding order is: top, right, bottom, left

    This will be set for any new items that are added that aren't explicitly specifying padding. The padding of each individual item can still be set later if needed. Note that padding in a dimension will work only for items smaller in that dimension than the cell they are in. Large horizontal padding for an item will also contribute to the width of the column the item is in. The same applies for large vertical padding vis-a-vis the height of the row the item is in.

    priv

    none

    Parameters

    • padding: [number, number, number, number] | Float32Array

      the padding vector for the 4 sides.

    Returns void

setEnabled

  • setEnabled(enabled: boolean): void
  • Sets the enabled state

    Disabled UiNodes don't send out certain input events, such as OnPress, OnRelease, OnActivate, etc.

    priv

    none

    Parameters

    • enabled: boolean

      The enabled state of the UiNode.

    Returns void

setEventPassThrough

  • setEventPassThrough(passThrough: boolean): void
  • Sets whether this UiNode passes events through to the next UiNode parent or processes them internally.

    The UI events that will be passed through are the cursor interaction events like onHoverEnter, onHoverExit, and onActivate.

    priv

    none

    Parameters

    • passThrough: boolean

      the event pass through flag.

    Returns void

setEventPassThroughChildren

  • setEventPassThroughChildren(passThrough: boolean): void
  • Sets all descendant UiNodes to either pass through events or not.

    This call is handy if this UiNode potentially has many internal UiNode children in the Node hierarchy but wants all input events to pass through them to be processed and dispatched by this UiNode parent.

    priv

    none

    Parameters

    • passThrough: boolean

      the event pass through flag.

    Returns void

setEventSoundID

  • setEventSoundID(event: SoundEvent, nameID: string): void

setGravityWellEnabled

  • setGravityWellEnabled(enabled: boolean): void

setGravityWellProperties

  • Sets the gravity well properties for this UiNode.

    The default gravity well properties for a UiNode are a sharp cornered rectangular BoundaryShape that matches the UiNode's local AABB that snaps to center of the shape. This should be sufficient in many situations and all that needs to be done to turn on the gravity well for the UiNode is to setGravityWellEnabled(true).

    The default BoundaryShape size is (0,0), which instructs the UiNode to use its own local AABB for the shape size and offset. Setting a size greater than 0 in either X or Y will turn off the automatic use of local AABB and will use the specified size and offset of the BoundaryShape instead. Setting the size back to (0,0) will once again inform the UiNode to use the local AABB for shape parameters.

    priv

    none

    Parameters

    Returns void

setHideBounds

  • setHideBounds(hide: boolean): void

setItemAlignment

  • Sets the item alignment at the specified row and col position.

    Note that for the right and the bottom alignments to kick in, the containing cell should be, respectively, wider and higher than its content.

    priv

    none

    Parameters

    • row: number

      The row position of the item (zero-based).

    • col: number

      The column position of the item (zero-based).

    • alignment: Alignment

      The item alignment.

    Returns void

  • Sets the item alignment.

    Note that for the right and the bottom alignments to kick in, the containing cell should be, respectively, wider and higher than its content.

    priv

    none

    Parameters

    Returns void

setItemPadding

  • setItemPadding(row: number, col: number, padding: [number, number, number, number] | Float32Array): void
  • setItemPadding(item: TransformNode | null, padding: [number, number, number, number] | Float32Array): void
  • Sets the item padding at the specified row and col position.

    Note that padding in a dimension will work only for items smaller in that dimension than the cell they are in. Large horizontal padding for an item will also contribute to the width of the column the item is in. The same applies for large vertical padding vis-a-vis the height of the row the item is in.

    priv

    none

    Parameters

    • row: number

      The row position of the item (zero-based).

    • col: number

      The column position of the item (zero-based).

    • padding: [number, number, number, number] | Float32Array

      The item padding.

    Returns void

  • Sets the item padding.

    Note that padding in a dimension will work only for items smaller in that dimension than the cell they are in. Large horizontal padding for an item will also contribute to the width of the column the item is in. The same applies for large vertical padding vis-a-vis the height of the row the item is in.

    priv

    none

    Parameters

    • item: TransformNode | null

      Pointer to the item Node.

    • padding: [number, number, number, number] | Float32Array

      The item padding.

    Returns void

setLocalPosition

  • setLocalPosition(aPos: [number, number, number] | Float32Array): void

setLocalRotation

  • setLocalRotation(aRot: [number, number, number, number] | Float32Array): void

setLocalScale

  • setLocalScale(aScale: [number, number, number] | Float32Array): void

setLocalTransform

  • setLocalTransform(aTransform: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] | Float32Array): void
  • Set the local transform of this Node

    priv

    none

    Parameters

    • aTransform: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] | Float32Array

      transform matrix

    Returns void

setName

  • setName(a_name: string): boolean
  • Set the name of the Node

    By default a Node has no name.

    priv

    none

    Parameters

    • a_name: string

      The new name of the Node.

    Returns boolean

    true if the name of the Node was successfully set, false otherwise.

setOnActivateResponse

setParentedBoneName

  • setParentedBoneName(a_boneName: string): boolean
  • Set the bone in the parent by name that this child will attach to This node must have a parent and the parent must be of type ModelNode.

    priv

    none

    Parameters

    • a_boneName: string

      bone name to attach to

    Returns boolean

    true if successful, false if failed

setRenderingLayer

  • setRenderingLayer(a_renderLayer: RenderingLayer): void
  • setRenderingLayer(a_renderLayer: number): void
  • Sets Custom RenderLayer on this UiNode. Which internally sets the render layer on all RenderNode Children

    priv

    none

    Parameters

    • a_renderLayer: RenderingLayer

      Of type uint16_t. Value will be clamped to kRenderingLayerMAX = 999, if more.

      Note: Please use, "render::RenderingLayer" enum to set layers. for eg. RenderNode->setRenderingLayer(render::RenderingLayer::kHUDLayer); or you can also send in the layer value as well eg. RenderNode->setRenderingLayer(static_cast(render::RenderingLayer::kHUDLayer));

      You can also create your own custom layering by using existing layers and your own. eg. uint16_t customHUDLayer1 = static_cast(render::RenderingLayer::kHUDLayer) + 1; uint16_t customHUDLayer2 = static_cast(render::RenderingLayer::kHUDLayer) + 2; uint16_t customHUDLayer3 = static_cast(render::RenderingLayer::kHUDLayer) + 3;

    Returns void

  • Sets Custom RenderLayer on this UiNode. Which internally sets the render layer on all RenderNode Children

    priv

    none

    Parameters

    • a_renderLayer: number

      Of type uint16_t. Value will be clamped to kRenderingLayerMAX = 999, if more.

    Returns void

setRows

  • setRows(rows: number): void
  • Sets the number of rows for the grid.

    The default value of 0 indicates the number of rows can grow to fit items as they are added. Setting the value above 0 will lock the grid row dimension.

    If both rows and columns are set, columns will take precedence.

    If neither rows or columns are set, the grid layout will have 1 row and add columns as needed.

    When the number of rows is set (and columns is 0), the grid will lay items in column-major order.

    priv

    none

    Parameters

    • rows: number

      the number of rows for the grid layout.

    Returns void

setSize

  • setSize(size: [number, number] | Float32Array): void
  • Sets the requested size of the layout's rectangular area in scene units.

    Setting a size of zero or less in either the X or Y dimension indicates the layout should grow to fit content in that dimension. Setting a size greater than zero, on the other hand, sets the layout size explicitly.

    The default setting is (0,0), which will grow to fit content in both directions.

    Currently, content will not be clipped if it is larger than the requested layout size (content will overflow).

    priv

    none

    Parameters

    • size: [number, number] | Float32Array

      the requested size of the layout area.

    Returns void

setSkipInvisibleItems

  • setSkipInvisibleItems(skip: boolean): void
  • Skips invisble items.

    Setting this value true will cause the layout to skip over any invisible items. The layout will check the visibility of each top-level item Node added and if invisible, along with inherited visibility, will skip that Node for layout.

    Using this setting will affect the displayed grid layout by collapsing the location of invisible items in the grid while the remaining, visible items adjust to fill in those absent locations. Using this setting also affects the getItemCount() and calcualted rows and colums returned by getCurrentRows(), getCurrentColumns(), and any of the methods using row and column locations will access the visible item at that location, not any invisible item no longer shown at that location. Using this setting effectively alters the grid content and properties to be only the visible items while still allowing the invisble items to be held by the layout.

    priv

    none

    Parameters

    • skip: boolean

      Flag indicating whether to skip invis items or not.

    Returns void

setSkipRaycast

  • setSkipRaycast(a_skipRaycast: boolean, a_propagateToChildren?: boolean): void
  • Sets the skip raycast state of the node.

    priv

    none

    Parameters

    • a_skipRaycast: boolean

      Raycast skip flag.

    • Optional a_propagateToChildren: boolean

      default = false
      Flag to also set the raycast state of any children

    Returns void

setTriggerable

  • setTriggerable(a_triggerable: boolean): void
  • Sets whether this node should handle trigger presses directly.

    priv

    none

    Parameters

    • a_triggerable: boolean

      true if this node should handle trigger presses directly when focused, false if trigger press should instead enter prism placement mode.

    Returns void

setVisibilityInherited

  • setVisibilityInherited(a_inherit: boolean): void
  • Flags that the visibility state of this node should be inherited by its children. This does not change a child's visibility set by setVisible. A visibility of false will take precedence over a visibility of true. The tables below show the draw result for various combinations of node visibility and inheritance.

             visible     inherit     drawn
    node  :   false       true        no
    child :   true          x         no
    
             visible     inherit     drawn
    node  :   false       false       no
    child :   true          x         yes
    
             visible     inherit     drawn
    node  :   true        true        yes
    child :   false         x         no
    
             visible     inherit     drawn
    node  :   true        false       yes
    child :   false         x         no
    priv

    none

    Parameters

    • a_inherit: boolean

      Flag that this node's children should inherit its visibility.

    Returns void

setVisible

  • setVisible(a_visible: boolean, a_propagateToChildren?: boolean): void
  • Sets the visibility state of the node.

    priv

    none

    Parameters

    • a_visible: boolean

      Visibility flag

    • Optional a_propagateToChildren: boolean

      default = false
      Flag to also set the visibility state of any children

    Returns void

stopTransformAnimations

  • stopTransformAnimations(): void

swapItems

  • swapItems(row1: number, col1: number, row2: number, col2: number): boolean
  • swapItems(item1: TransformNode | null, item2: TransformNode | null): boolean
  • Swap two items in the grid.

    If either of the row and column pair's are out of bounds, nothing will happen.

    Parameters

    • row1: number

      row for item1

    • col1: number

      col for item1

    • row2: number

      row for item2

    • col2: number

      col for item2

    Returns boolean

    true if the two Nodes at (row1, col1) and (row2, col2) have been sucessfully swapped

  • Swap two items in the grid.

    If the Node's are the same or invalid - Null or not contained in the grid - nothing happens.

    Parameters

    • item1: TransformNode | null

      The pointer for a valid item in the grid

    • item2: TransformNode | null

      The pointer for a valid item in the grid

    Returns boolean

    true if item1 and item2 have successfully been swapped

updateLayout

  • updateLayout(): void

Static Create

Static Delete

  • Delete(node: Node | null): void
  • Client-side only: this static function is used to delete a node with its Prism's deleteNode function.

    priv

    none

    Parameters

    • node: Node | null

      is the node to delete

    Returns void

Static RequestFocus

  • RequestFocus(pUiNode: UiNode | null): void

Generated using TypeDoc