Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IWebXRTeleportationOptions

The options container for the teleportation module

Hierarchy

  • IWebXRTeleportationOptions

Index

Properties

Optional customUtilityLayerSceneSearch playground for customUtilityLayerScene

customUtilityLayerScene: Scene

if provided, this scene will be used to render meshes.

Optional defaultTargetMeshOptionsSearch playground for defaultTargetMeshOptions

defaultTargetMeshOptions: { disableAnimation?: boolean; disableLighting?: boolean; teleportationBorderColor?: string; teleportationFillColor?: string; torusArrowMaterial?: Material }

Values to configure the default target mesh

Type declaration

  • Optional disableAnimation?: boolean

    Disable the mesh's animation sequence

  • Optional disableLighting?: boolean

    Disable lighting on the material or the ring and arrow

  • Optional teleportationBorderColor?: string

    Border color for the teleportation area

  • Optional teleportationFillColor?: string

    Fill color of the teleportation area

  • Optional torusArrowMaterial?: Material

    Override the default material of the torus and arrow

Optional floorMeshesSearch playground for floorMeshes

floorMeshes: AbstractMesh[]

A list of meshes to use as floor meshes. Meshes can be added and removed after initializing the feature using the addFloorMesh and removeFloorMesh functions If empty, rotation will still work

Optional forceHandednessSearch playground for forceHandedness

forceHandedness: XRHandedness

Should teleport work only on a specific hand?

Optional generateRayPathMeshSearch playground for generateRayPathMesh

generateRayPathMesh: (points: Vector3[]) => AbstractMesh

If provided, this function will be used to generate the ray mesh instead of the lines mesh being used per default

Type declaration

Optional pickBlockerMeshesSearch playground for pickBlockerMeshes

pickBlockerMeshes: AbstractMesh[]

Meshes that the teleportation ray cannot go through

Optional renderingGroupIdSearch playground for renderingGroupId

renderingGroupId: number

use this rendering group id for the meshes (optional)

Optional snapPointsOnlySearch playground for snapPointsOnly

snapPointsOnly: boolean

Should teleportation move only to snap points

Optional snapPositionsSearch playground for snapPositions

snapPositions: Vector3[]

An array of points to which the teleportation will snap to. If the teleportation ray is in the proximity of one of those points, it will be corrected to this point.

Optional snapToPositionRadiusSearch playground for snapToPositionRadius

snapToPositionRadius: number

How close should the teleportation ray be in order to snap to position. Default to 0.8 units (meters)

Optional teleportationTargetMeshSearch playground for teleportationTargetMesh

teleportationTargetMesh: AbstractMesh

Provide your own teleportation mesh instead of babylon's wonderful doughnut. If you want to support rotation, make sure your mesh has a direction indicator.

When left untouched, the default mesh will be initialized.

Optional timeToTeleportSearch playground for timeToTeleport

timeToTeleport: number

If main component is used (no thumbstick), how long should the "long press" take before teleport

Optional useMainComponentOnlySearch playground for useMainComponentOnly

useMainComponentOnly: boolean

Disable using the thumbstick and use the main component (usually trigger) on long press. This will be automatically true if the controller doesn't have a thumbstick or touchpad.

Optional useUtilityLayerSearch playground for useUtilityLayer

useUtilityLayer: boolean

Should meshes created here be added to a utility layer or the main scene

xrInputSearch playground for xrInput

xrInput: WebXRInput

Babylon XR Input class for controller

Legend

  • Property
  • Method
  • Constructor
  • Property
  • Static method