Class TouchHolographicButtonV3
Hierarchy (View Summary)
- TouchButton3D
- TouchHolographicButtonV3
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Creates a new button
Parameters
Optionalname: stringdefines the control name
- shareMaterials: boolean = true
Returns TouchHolographicButtonV3
Properties
back Glow Offset
Gets or sets the offset value for button's back glow. This variable determines the x, y scaling of the button's meshes.
back Plate Depth
Gets or sets the depth of the button's back plate. This variable determines the z scaling and z position for some of the button's meshes.
flat Plane Depth
Gets or sets the value that determines the z scaling and z position for the innerQuad and BackGlow meshes.
front Plate Depth
Gets or sets the depth of the button's front plate. This variable determines the z scaling and z position for some of the button's meshes.
height
Gets or sets the vertical scaling for the button.
image Size In Pixels
Gets or sets the size of the button image in pixels. This is only adjustable for a button with width to height ratio greater than 1.
inner Quad Color
Gets or sets the color for innerQuadMaterial.
inner Quad Hover Color
Gets or sets the color for innerQuadMaterial for when it is hovered.
inner Quad Radius
Gets or sets the radius for FrontMaterial and innerQuadMaterial.
inner Quad Toggled Color
Gets or sets the color for innerQuadMaterial for when it is toggled.
inner Quad Toggled Hover Color
Gets or sets the color for innerQuadMaterial for when it is toggled and hovered.
Optionalname
Defines the control name
on Pointer Click Observable
An event triggered when a control is clicked on (with a mouse)
on Pointer Down Observable
An event triggered when the pointer taps the control
on Pointer Enter Observable
An event triggered when pointer enters the control
on Pointer Move Observable
An event triggered when the pointer moves over the control
on Pointer Out Observable
An event triggered when the pointer moves out of the control
on Pointer Up Observable
An event triggered when pointer is up
on Toggle Observable
An event triggered when the button is toggled. Only fired if 'isToggleButton' is true
parent
Gets or sets the parent container
plate Material Color
Gets or sets the color of the button plate.
pointer Down Animation
Callback used to start pointer down animation
pointer Enter Animation
Callback used to start pointer enter animation
pointer Out Animation
Callback used to start pointer out animation
pointer Up Animation
Callback used to start pointer up animation
radius
Gets or sets the bevel radius for the button.
text Size In Pixels
Gets or sets the font size of the button text in pixels. This is only adjustable for a button with width to height ratio greater than 1.
width
Gets or sets the horizontal scaling for the button.
StaticBACKGLOW_ MODEL_ FILENAME
File name for the backglow model.
StaticBACKPLATE_ MODEL_ FILENAME
File name for the backplate model.
StaticFRONTPLATE_ MODEL_ FILENAME
File name for the frontplate model.
StaticINNERQUAD_ MODEL_ FILENAME
File name for the innerquad model.
StaticMRTK_ ASSET_ BASE_ URL
Base Url for the frontplate model.
Accessors
back Glow Material
-
get backGlowMaterial(): MRDLBackglowMaterial
Gets the back glow material used by this button
Returns MRDLBackglowMaterial
back Material
-
Gets the back material used by this button
Returns MRDLBackplateMaterial
behaviors
-
Gets the list of attached behaviors
Returns Behavior<Control3D>[]
collidable Front Direction
-
get collidableFrontDirection(): Vector3
Returns the front-facing direction of the button, or Vector3.Zero if there is no 'front'
Returns Vector3
-
set collidableFrontDirection(frontWorldDir: Vector3): void
Sets the front-facing direction of the button. Pass in Vector3.Zero to allow interactions from any direction
Parameters
- frontWorldDir: Vector3
the forward direction of the button
Returns void
- frontWorldDir: Vector3
collision Mesh
-
set collisionMesh(collisionMesh: Mesh): void
Sets the mesh used for testing input collision
Parameters
- collisionMesh: Mesh
the new collision mesh for the button
Returns void
- collisionMesh: Mesh
content
content Resolution
-
get contentResolution(): number | { height: number; width: number }
Gets or sets the texture resolution used to render content (512 by default)
Returns number | { height: number; width: number }
-
set contentResolution(value: number | { height: number; width: number }): void
Parameters
- value: number | { height: number; width: number }
Returns void
front Material
-
get frontMaterial(): MRDLFrontplateMaterial
Gets the front material used by this button
Returns MRDLFrontplateMaterial
image Url
-
get imageUrl(): string
Gets or sets the image url for the button
Returns string
-
set imageUrl(value: string): void
Parameters
- value: string
Returns void
inner Quad Material
-
get innerQuadMaterial(): MRDLInnerquadMaterial
Gets the inner quad material used by this button
Returns MRDLInnerquadMaterial
is Active Near Interaction
-
get isActiveNearInteraction(): boolean
Whether the current interaction is caused by near interaction or not
Returns boolean
is Backplate Visible
-
set isBackplateVisible(isVisible: boolean): void
Sets whether the backplate is visible or hidden. Hiding the backplate is not recommended without some sort of replacement
Parameters
- isVisible: boolean
Returns void
is Toggle Button
-
get isToggleButton(): boolean
Returns boolean
-
set isToggleButton(value: boolean): void
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
- value: boolean
is Toggled
-
get isToggled(): boolean
Returns boolean
-
set isToggled(newState: boolean): void
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
- newState: boolean
is Visible
-
get isVisible(): boolean
Gets or sets a boolean indicating if the control is visible
Returns boolean
-
set isVisible(value: boolean): void
Parameters
- value: boolean
Returns void
mesh
-
get mesh(): Nullable<AbstractMesh>
Gets the mesh used to render this control
Returns Nullable<AbstractMesh>
node
-
get node(): Nullable<TransformNode>
Gets the transform node used by this control
Returns Nullable<TransformNode>
plate Material
-
get plateMaterial(): StandardMaterial
Gets the plate material used by this button
Returns StandardMaterial
position
-
get position(): Vector3
Gets or sets the control position in world space
Returns Vector3
-
set position(value: Vector3): void
Parameters
- value: Vector3
Returns void
rendering Group Id
-
get renderingGroupId(): number
Returns number
-
set renderingGroupId(id: number): void
Rendering ground id of all the mesh in the button
Parameters
- id: number
Returns void
scaling
-
get scaling(): Vector3
Gets or sets the control scaling in world space
Returns Vector3
-
set scaling(value: Vector3): void
Parameters
- value: Vector3
Returns void
share Materials
-
Gets a boolean indicating if this button shares its material with other V3 Buttons
Returns boolean
subtext
-
get subtext(): string
Gets or sets subtext for a button with larger width
Returns string
-
set subtext(value: string): void
Parameters
- value: string
Returns void
text
-
get text(): string
Gets or sets text for the button
Returns string
-
set text(value: string): void
Parameters
- value: string
Returns void
tooltip Text
-
get tooltipText(): Nullable<string>
Returns Nullable<string>
-
set tooltipText(text: Nullable<string>): void
Text to be displayed on the tooltip shown when hovering on the button. When set to null tooltip is disabled. (Default: null) Set this property after adding the button to the GUI3DManager
Parameters
- text: Nullable<string>
Returns void
type Name
-
get typeName(): string
Gets a string representing the class name
Returns string
Methods
add Behavior
dispose
-
Releases all associated resources
Returns void
get Behavior By Name
-
Gets an attached behavior by name
Parameters
- name: string
defines the name of the behavior to look for
Returns Nullable<Behavior<Control3D>>
null if behavior was not found else the requested behavior
- name: string
get Class Name
-
Get the current class name of the control.
Returns string
current class name
get Press Depth
-
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
- touchPoint: Vector3
link To Transform Node
-
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
- node: Nullable<TransformNode>
Class used to create the mrtkv3 button