API

Class TouchHolographicButtonV3

Class used to create the mrtkv3 button

Hierarchy (View Summary)

Index
backGlowOffset: number = 0.1

Gets or sets the offset value for button's back glow. This variable determines the x, y scaling of the button's meshes.

backPlateDepth: number = 0.04

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.

flatPlaneDepth: number = 0.001

Gets or sets the value that determines the z scaling and z position for the innerQuad and BackGlow meshes.

frontPlateDepth: number = 0.2

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: number = 1

Gets or sets the vertical scaling for the button.

imageSizeInPixels: number = 40

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.

innerQuadColor: any = ...

Gets or sets the color for innerQuadMaterial.

innerQuadHoverColor: any = ...

Gets or sets the color for innerQuadMaterial for when it is hovered.

innerQuadRadius: number = ...

Gets or sets the radius for FrontMaterial and innerQuadMaterial.

innerQuadToggledColor: any = ...

Gets or sets the color for innerQuadMaterial for when it is toggled.

innerQuadToggledHoverColor: any = ...

Gets or sets the color for innerQuadMaterial for when it is toggled and hovered.

name?: string

Defines the control name

onPointerClickObservable: any = ...

An event triggered when a control is clicked on (with a mouse)

onPointerDownObservable: any = ...

An event triggered when the pointer taps the control

onPointerEnterObservable: any = ...

An event triggered when pointer enters the control

onPointerMoveObservable: any = ...

An event triggered when the pointer moves over the control

onPointerOutObservable: any = ...

An event triggered when the pointer moves out of the control

onPointerUpObservable: any = ...

An event triggered when pointer is up

onToggleObservable: any = ...

An event triggered when the button is toggled. Only fired if 'isToggleButton' is true

parent: Nullable<Container3D>

Gets or sets the parent container

plateMaterialColor: any = ...

Gets or sets the color of the button plate.

pointerDownAnimation: () => void

Callback used to start pointer down animation

pointerEnterAnimation: () => void

Callback used to start pointer enter animation

pointerOutAnimation: () => void

Callback used to start pointer out animation

pointerUpAnimation: () => void

Callback used to start pointer up animation

radius: number = 0.14

Gets or sets the bevel radius for the button.

textSizeInPixels: number = 18

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: number = 1

Gets or sets the horizontal scaling for the button.

BACKGLOW_MODEL_FILENAME: string = "mrtk-fluent-button.glb"

File name for the backglow model.

BACKPLATE_MODEL_FILENAME: string = "mrtk-fluent-backplate.glb"

File name for the backplate model.

FRONTPLATE_MODEL_FILENAME: string = "mrtk-fluent-frontplate.glb"

File name for the frontplate model.

INNERQUAD_MODEL_FILENAME: string = "SlateProximity.glb"

File name for the innerquad model.

MRTK_ASSET_BASE_URL: string = "https://assets.babylonjs.com/core/MRTK/"

Base Url for the frontplate model.

  • 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

  • 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

  • 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