Constructor
new UiPortalIcon()
Extends
Methods
addChild(a_pChild) → {boolean}
- Inherited From:
Adds a child to the current Node, removing it from its current parent.
A child can only have a single Parent
Parameters:
Name | Type | Description |
---|---|---|
a_pChild |
lumin.Node | The Node to add as a child to this Node. |
Returns:
true if successful, false if failed
- Type
- boolean
addMoveCallback(trackopt)
- Inherited From:
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.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
track |
number |
<optional> |
0
|
addToLayer(a_layer)
- Inherited From:
Adds this node to the specified node layer. Nodes can be members of multiple layers.
Parameters:
Name | Type | Description |
---|---|---|
a_layer |
BigInt |
clearAllEventSounds()
- Inherited From:
Clears all event sounds.
clearEventSound(event)
- Inherited From:
Clears the sound for the specifiec event.
Parameters:
Name | Type | Description |
---|---|---|
event |
lumin.ui.SoundEvent | The sound event to clear. |
(static) Create(prism, labelText, portalSizeopt) → {lumin.ui.UiPortalIcon}
Creates a UiPortalIcon element using default settings.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
prism |
lumin.Prism | The prism to create the icon for. |
||
labelText |
string | The UTF-8 encoded text to initially set the portal icon label to. |
||
portalSize |
lumin.ui.PortalIconSize |
<optional> |
PortalIconSize.kSmall
|
One of the built-in sizes for the portal icon (defaults to Small) |
Returns:
The new UiPortalIcon node.
delayMove(durationSecs, trackopt)
- Inherited From:
Adds a delay to the current move sequence.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
durationSecs |
number | How long to delay, in seconds. |
||
track |
number |
<optional> |
0
|
which animation track to add the delay to. |
detachBackgroundModel() → {lumin.Node}
Detaches the Node hierarchy used as background visual representation for this portal icon.
The returned Node hierarchy will be orphaned (no longer attached
to the scene graph) and must be handled by the caller.
Returns:
- Type
- lumin.Node
detachIconModel() → {lumin.ModelNode}
Detaches the Node hierarchy used as icon visual representation for this portal icon.
The returned Node hierarchy will be orphaned (no longer attached
to the scene graph) and must be handled by the caller.
Returns:
- Type
- lumin.ModelNode
findChild(name) → {lumin.Node}
- Inherited From:
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.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name to search for. |
Returns:
- Type
- lumin.Node
findChildren(a_type, a_bExactTypeopt, a_bIncludeSelfopt) → {Array.<lumin.Node>}
- Inherited From:
Does a breadth-first search of the child node hierarchy
for the specified Node type.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
a_type |
number | The type of Node to find in the child hierarchy. |
||
a_bExactType |
boolean |
<optional> |
false
|
Flag to indicate if the child node must be the exact type or can be derived from the type (default false). |
a_bIncludeSelf |
boolean |
<optional> |
false
|
Flag to indicate if the search should include this Node (default false). |
Returns:
A vector of Node pointers containing the results.
- Type
- Array.<lumin.Node>
findParent(a_type, a_bExactTypeopt) → {lumin.Node}
- Inherited From:
Searches up the tree parentage for the specific Node type.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
a_type |
number | The type of Node to find in the parent hierarchy. |
||
a_bExactType |
boolean |
<optional> |
false
|
Flag to indicate if the parent node must be the exact type or can be derived from the type (default false). |
Returns:
The parent node, if found, null if not found.
- Type
- lumin.Node
getAABB() → {lumin.math.AABB}
- Inherited From:
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.
Returns:
The bounding box
- Type
- lumin.math.AABB
getAlignment() → {lumin.ui.Alignment}
- Inherited From:
Gets the UiNode's self alignment relative to Node position.
Returns:
The alignment.
- Type
- lumin.ui.Alignment
getAnchorPosition() → {vec3}
- Inherited From:
Returns the anchor position of the node.
Returns:
The anchor position.
- Type
- vec3
getBackgroundModel() → {lumin.Node}
Gets the Node hierarchy used as background visual representation for the portal icon.
Returns:
a pointer to the model node used.
- Type
- lumin.Node
getChild(a_iIndex) → {lumin.Node}
- Inherited From:
Gets the n'th child from this Node's children
Parameters:
Name | Type | Description |
---|---|---|
a_iIndex |
number | The index of the child. |
Returns:
Child Node
- Type
- lumin.Node
getChildCount() → {number}
- Inherited From:
Gets the number of immediate children this Node has
Returns:
Count of immediate child Nodes
- Type
- number
getCurrentPrismTransform() → {mat4}
- Inherited From:
Get the Cached Prism Transform of this Node
Returns:
Transform Matrix
- Type
- mat4
getCurrentWorldTransform() → {mat4}
- Inherited From:
Get the Cached World Transform of this Node
Returns:
Transform Matrix
- Type
- mat4
getCursorHoverState() → {lumin.CursorHoverState}
- Inherited From:
Get the cursor hover state for this Node.
Returns:
the cursor state.
getEnabled() → {boolean}
- Inherited From:
Gets the enabled state
Returns:
the enabled state of the UiNode.
- Type
- boolean
getEventPassThrough() → {boolean}
- Inherited From:
Gets whether this UiNode passes events through or not.
Returns:
TRUE if pass through set, FALSE if not.
- Type
- boolean
getEventSound(event) → {lumin.Sound}
- Inherited From:
Gets the Sound for the specified event, if set. If no sound ID set for
the specified event, nullptr will be returned.
Parameters:
Name | Type | Description |
---|---|---|
event |
lumin.ui.SoundEvent | The sound event to get the Sound for. |
Returns:
Pointer to the Sound object associated with the sound ID for the event or nullptr if no sound set.
- Type
- lumin.Sound
getEventSoundID(event) → {string}
- Inherited From:
Gets the sound ID to be played for the UI event.
Parameters:
Name | Type | Description |
---|---|---|
event |
lumin.ui.SoundEvent | the sound event. |
Returns:
the name of the sound to play for the sound event.
- Type
- string
getFocused() → {boolean}
- Inherited From:
Gets the focus state
Returns:
the focus state of the UiNode.
- Type
- boolean
getGravityWellEnabled() → {boolean}
- Inherited From:
Gets whether the gravity well is enabled.
Returns:
- Type
- boolean
getGravityWellProperties() → {lumin.ui.GravityWellProperties}
- Inherited From:
Gets the gravity well properties for this UiNode.
Returns:
the GravityWellProperties.
getHideBounds() → {boolean}
- Inherited From:
Return whether or not this node, and its children, should be included in the bounds
Returns:
bounds hidden or not
- Type
- boolean
getHovered() → {boolean}
- Inherited From:
Gets the hover state
Returns:
the hover state of the UiNode.
- Type
- boolean
getHoverScale() → {number}
Gets the overall hover scale multiplier of the portal icon element.
Returns:
- Type
- number
getHoverZOffset() → {number}
Gets the overall hover Z offset of the portal icon element.
Returns:
- Type
- number
getIconActivateAnimation() → {string}
Gets the icon activate animation name.
Returns:
the animation name.
- Type
- string
getIconContextMenuAnimation() → {string}
Gets the icon ContextMenu animation name.
Returns:
the animation name.
- Type
- string
getIconHoverAnimation() → {string}
Gets the icon hover animation name.
Returns:
the animation name.
- Type
- string
getIconHoverPosition() → {vec3}
Gets the icon hover position.
Returns:
the icon hover position.
- Type
- vec3
getIconIdleAnimation() → {string}
Gets the icon idle animation name.
Returns:
the animation name.
- Type
- string
getIconModel() → {lumin.ModelNode}
Gets the Node hierarchy used as icon visual representation for the portal icon.
Returns:
a pointer to the model node used.
- Type
- lumin.ModelNode
getLabelDisplayMode() → {lumin.ui.LabelDisplayMode}
Gets the display mode for the portal icon label.
Returns:
getLocalAABB() → {lumin.math.AABB}
- Inherited From:
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.
Returns:
The bounding box.
- Type
- lumin.math.AABB
getLocalPosition() → {vec3}
- Inherited From:
Get the Local Position of this Node
Returns:
Position
- Type
- vec3
getLocalRotation() → {quat}
- Inherited From:
Get the Local Rotation of this Node
Returns:
Rotation
- Type
- quat
getLocalScale() → {vec3}
- Inherited From:
Get the Local Scale of this Node
Returns:
Scale
- Type
- vec3
getLocalTransform() → {mat4}
- Inherited From:
Get the Local Transform of this Node
Returns:
Transform Matrix
- Type
- mat4
getName() → {string}
- Inherited From:
Get the name of the Node.
This call returns EMPTY_STRING if the Node's
name has not been set.
Returns:
The name of the Node, if set.
- Type
- string
getNodeId() → {BigInt}
- Inherited From:
Gets the Node Id of this Node
Every Node is assigned a unique ID per Prism
Returns:
Node id of the current Node
- Type
- BigInt
getOnActivateResponse() → {lumin.ui.OnActivateResponse}
- Inherited From:
Gets the OnActivateResponse properties of this UiNode.
Returns:
getParent() → {lumin.Node}
- Inherited From:
Gets this Node's immediate parent
Returns:
Parent Node, nullptr = no parent
- Type
- lumin.Node
getParentedBoneName() → {string}
- Inherited From:
When parented to a parents bone with setParentedBoneName
Returns:
Parents bone name we are attached to
- Type
- string
getPrismId() → {BigInt}
- Inherited From:
Returns the id of the prism the node belongs to.
Returns:
the prism id (0 = invalid prism)
- Type
- BigInt
getPrismPosition() → {vec3}
- Inherited From:
Get the Prism Position of this Node
Returns:
Position
- Type
- vec3
getRenderingLayer() → {number}
- Inherited From:
Gets the rendering layer of this UiNode.
Returns:
: the uint16_t value of the layer.
- Type
- number
getRigidBody() → {lumin.PhysicsRigidBody}
- Inherited From:
Returns the PhysicsRigidBody attached to the node, if the node is participating in the physics
system.
Returns:
the rigid body
getRoot() → {lumin.RootNode}
- Inherited From:
Gets the root node of the node tree this node belongs to.
Returns:
The root node, or nullptr if none.
- Type
- lumin.RootNode
getText() → {string}
Gets the UTF-8 encoded portal icon text.
Returns:
The portal icon text.
- Type
- string
getTextColor() → {vec4}
Gets the RGBA color of the portal icon text; the default is white; i.e., (1, 1, 1, 1).
Returns:
Text color.
- Type
- vec4
getTextSize() → {number}
Gets the portal icon text label render size height in scene units.
Returns:
the text size.
- Type
- number
getUiTextLabel() → {lumin.ui.UiText}
Gets the UiText label for this portal icon.
Returns:
a UiText pointer (can be null).
- Type
- lumin.ui.UiText
getWorldPosition() → {vec3}
- Inherited From:
Get the World Position of this Node
Returns:
Position
- Type
- vec3
isInLayer(a_layer) → {boolean}
- Inherited From:
Checks to see if node subscribes to the specified node layer.
Parameters:
Name | Type | Description |
---|---|---|
a_layer |
BigInt | The layer to test if this node is a member of. |
Returns:
True if this node subscribes to the specified layer.
- Type
- boolean
isInSubtree(pParent) → {boolean}
- Inherited From:
Determines if this Node is within the subtree.
Parameters:
Name | Type | Description |
---|---|---|
pParent |
lumin.Node |
Returns:
true if this Node is within the subtree, false if not.
- Type
- boolean
isSkipRaycast() → {boolean}
- Inherited From:
Returns the skip raycast state of the node.
Returns:
True if the node is skipped during raycasting.
- Type
- boolean
isTriggerable() → {boolean}
- Inherited From:
Returns true if this node should handle trigger presses directly.
Returns:
true if this node will handle trigger presses directly when focused,
false if trigger press will instead enter prism placement mode.
- Type
- boolean
isVisibilityInherited() → {boolean}
- Inherited From:
Returns whether this Node's visibility is inherited by its children or not.
Returns:
True if the Node's visiblity is inherited.
- Type
- boolean
isVisible() → {boolean}
- Inherited From:
Returns the visibility state of the node. Note that only the local state is checked, the
effect of a parent's visibility is ignored.
Returns:
True if the Node is visible.
- Type
- boolean
isVisibleInPrism() → {boolean}
- Inherited From:
Returns the visibility of the Node in the hierarchy based on self visibility and any
potential inherited visibility.
Returns:
True if the Node is visible in the Prism.
- Type
- boolean
onActivateSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on click Event.
This event is dispatched when the element has been activated (clicked, selected).
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onActivateUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
onDeletedSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on deleted Event.
This event is dispatched when the element is about to be deleted.
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onDeletedUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
onDisabledSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on disabled Event.
This event is dispatched when the element has been disabled.
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onDisabledUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
onEnabledSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on enabled Event.
This event is dispatched when the element has been enabled.
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onEnabledUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
onFocusGainedSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on focus gained Event.
This event is dispatched when the element has gained focus.
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onFocusGainedUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
onFocusInputSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on focus input Event.
This event is dispatched when the focused element should process input.
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onFocusInputUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
onFocusLostSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on focus lost Event.
This event is dispatched when the element has lost focus.
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onFocusLostUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
onHoverEnterSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on hover enter Event.
This event is dispatched when the cursor starts hovering over the UiNode.
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onHoverEnterUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
onHoverExitSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on hover exit Event.
This event is dispatched when the cursor stops hovering over the UiNode.
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onHoverExitUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
onHoverMoveSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on hover move Event.
This event is dispatched when the cursor is hovering over the UiNode.
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onHoverMoveUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
onLongPressSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on long press Event.
This event is dispatched when the element has been held down on.
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onLongPressUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
onPressedSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on pressed Event.
This event is dispatched when the element is pressed.
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onPressedUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
onReleasedSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on released Event.
This event is dispatched when the element is released (after being pressed).
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onReleasedUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
onUpdateSub(callback) → {lumin.utils.CallbackID}
- Inherited From:
The on update Event.
This event is dispatched during element update.
Parameters:
Name | Type | Description |
---|---|---|
callback |
callable |
Returns:
onUpdateUnsub(callbackID) → {boolean}
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
callbackID |
lumin.utils.CallbackID |
Returns:
- Type
- boolean
removeChild(a_pChild)
- Inherited From:
Remove a child from the current Node
Parameters:
Name | Type | Description |
---|---|---|
a_pChild |
lumin.Node | The child Node to remove. |
removeFromLayer(a_layer)
- Inherited From:
Removes this node from the specified node layer.
Parameters:
Name | Type | Description |
---|---|---|
a_layer |
BigInt | The layer this node will be removed from. |
setAlignment(alignment)
- Inherited From:
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.
Parameters:
Name | Type | Description |
---|---|---|
alignment |
lumin.ui.Alignment | The alignment. |
setAnchorPosition(a_position)
- Inherited From:
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.
Parameters:
Name | Type | Description |
---|---|---|
a_position |
vec3 | Anchor position. This is relative to the default 0,0,0 position of the |
setBackgroundModel(pNode, offsetopt)
Sets the Node hierarchy used as visual representation for the background of
the portal icon.
If there is a current Node hierarchy for the background, this call will delete the
current hierarchy and replace with the new hierarchy.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
pNode |
lumin.Node | A pointer to the top of the Node hierarchy to use for visual representation. |
||
offset |
vec3 |
<optional> |
VEC3_ZERO
|
An optional offset to position the Node within the UiPortalIcon (default is [0,0,0]). |
setCursorHoverState(state)
- Inherited From:
Set the cursor hover state for this Node.
Setting this will set the cursor state when this Node
or any descendant Nodes, that are not explicitly set,
are hovered over.
Parameters:
Name | Type | Description |
---|---|---|
state |
lumin.CursorHoverState | The cursor state |
setEnabled(enabled)
- Inherited From:
Sets the enabled state
Disabled UiNodes don't send out certain input events,
such as OnPress, OnRelease, OnActivate, etc.
Parameters:
Name | Type | Description |
---|---|---|
enabled |
boolean | The enabled state of the UiNode. |
setEventPassThrough(passThrough)
- Inherited From:
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.
Parameters:
Name | Type | Description |
---|---|---|
passThrough |
boolean |