Class TouchMeshButton3D
Hierarchy
- TouchButton3D
- TouchMeshButton3D
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Creates a new 3D button based on a mesh
Parameters
mesh: Mesh
mesh to become a 3D button. By default this is also the mesh for near interaction collision checking
Optional name: string
defines the control name
Returns TouchMeshButton3D
Properties
Optional nameSearch playground for name
Defines the control name
on Pointer Click ObservableSearch playground for onPointerClickObservable
An event triggered when a control is clicked on (with a mouse)
on Pointer Down ObservableSearch playground for onPointerDownObservable
An event triggered when the pointer taps the control
on Pointer Enter ObservableSearch playground for onPointerEnterObservable
An event triggered when pointer enters the control
on Pointer Move ObservableSearch playground for onPointerMoveObservable
An event triggered when the pointer moves over the control
on Pointer Out ObservableSearch playground for onPointerOutObservable
An event triggered when the pointer moves out of the control
on Pointer Up ObservableSearch playground for onPointerUpObservable
An event triggered when pointer is up
on Toggle ObservableSearch playground for onToggleObservable
An event triggered when the button is toggled. Only fired if 'isToggleButton' is true
parentSearch playground for parent
Gets or sets the parent container
pointer Down AnimationSearch playground for pointerDownAnimation
Type declaration
Callback used to start pointer down animation
Returns void
pointer Enter AnimationSearch playground for pointerEnterAnimation
Type declaration
Callback used to start pointer enter animation
Returns void
pointer Out AnimationSearch playground for pointerOutAnimation
Type declaration
Callback used to start pointer out animation
Returns void
pointer Up AnimationSearch playground for pointerUpAnimation
Type declaration
Callback used to start pointer up animation
Returns void
Accessors
behaviors
collidable Front Direction
Returns the front-facing direction of the button, or BABYLON.Vector3.Zero if there is no 'front'
Returns Vector3
Sets the front-facing direction of the button. Pass in BABYLON.Vector3.Zero to allow interactions from any direction
Parameters
frontWorldDir: Vector3
the forward direction of the button
Returns void
collision Mesh
Sets the mesh used for testing input collision
Parameters
collisionMesh: Mesh
the new collision mesh for the button
Returns void
content
content Resolution
Gets or sets the texture resolution used to render content (512 by default)
Returns number
Gets or sets the texture resolution used to render content (512 by default)
Parameters
value: number
Returns void
is Active Near Interaction
Whether the current interaction is caused by near interaction or not
Returns boolean
is Toggle Button
Setter for if this TouchButton3D should be treated as a toggle button
Returns boolean
Setter for if this TouchButton3D should be treated as a toggle button
Parameters
value: boolean
If this TouchHolographicButton should act like a toggle button
Returns void
is Toggled
A public entrypoint to set the toggle state of the TouchHolographicButton. Only works if 'isToggleButton' is true
Returns boolean
A public entrypoint to set the toggle state of the TouchHolographicButton. Only works if 'isToggleButton' is true
Parameters
newState: boolean
The new state to set the TouchHolographicButton's toggle state to
Returns void
is Visible
Gets or sets a boolean indicating if the control is visible
Returns boolean
Gets or sets a boolean indicating if the control is visible
Parameters
value: boolean
Returns void
mesh
Gets the mesh used to render this control
Returns Nullable<AbstractMesh>
node
Gets the transform node used by this control
Returns Nullable<TransformNode>
position
scaling
type Name
Gets a string representing the class name
Returns string
Methods
_prepare NodeSearch playground for _prepareNode
Parameters
scene: Scene
Returns void
add BehaviorSearch playground for addBehavior
disposeSearch playground for dispose
Releases all associated resources
Returns void
get Behavior By NameSearch playground for getBehaviorByName
get Class NameSearch playground for getClassName
Get the current class name of the control.
Returns string
current class name
get Press DepthSearch playground for getPressDepth
Get the height of the touchPoint from the collidable part of the button
Parameters
touchPoint: Vector3
the point to compare to the button, in absolute position
Returns number
the depth of the touch point into the front of the button
link To Transform NodeSearch playground for linkToTransformNode
Link the control as child of the given node
Parameters
node: Nullable<TransformNode>
defines the node to link to. Use null to unlink the control
Returns Control3D
the current control
Class used to create an interactable object. It's a touchable 3D button using a mesh coming from the current scene
5.0.0