WebXRAnchorSystem

An implementation of the anchor system of WebXR. Note that the current documented implementation is not available in any browser. Future implementations will use the frame to create an anchor and not the session or a detected plane For further information see https://github.com/immersive-web/anchors/

Hierarchy

Implements

Index

Constructors

constructor

Find examples in Playground

Properties

disableAutoAttach

Find examples in Playground
disableAutoAttach: boolean

Should auto-attach be disabled?

onAnchorAddedObservable

Find examples in Playground
onAnchorAddedObservable: Observable<IWebXRAnchor>

Observers registered here will be executed when a new anchor was added to the session

onAnchorRemovedObservable

Find examples in Playground
onAnchorRemovedObservable: Observable<IWebXRAnchor>

Observers registered here will be executed when an anchor was removed from the session

onAnchorUpdatedObservable

Find examples in Playground
onAnchorUpdatedObservable: Observable<IWebXRAnchor>

Observers registered here will be executed when an existing anchor updates This can execute N times every frame

Static Name

Find examples in Playground
Name: string

The module's name

Static Version

Find examples in Playground
Version: number

The (Babylon) version of this module. This is an integer representing the implementation version. This number does not correspond to the WebXR specs version

Accessors

attached

Find examples in Playground
  • get attached(): boolean

Methods

addAnchorAtRigidTransformation

Find examples in Playground
  • Add anchor at a specific XR point.

    Parameters

    • xrRigidTransformation: XRRigidTransform

      xr-coordinates where a new anchor should be added

    • Optional anchorCreator: XRAnchorCreator

      the object o use to create an anchor with. either a session or a plane

    Returns Promise<XRAnchor>

    a promise the fulfills when the anchor was created

attach

Find examples in Playground
  • attach(): boolean
  • attach this feature Will usually be called by the features manager

    Returns boolean

    true if successful.

detach

Find examples in Playground
  • detach(): boolean

dispose

Find examples in Playground
  • dispose(): void

setHitTestModule

Find examples in Playground
  • If set, it will improve performance by using the current hit-test results instead of executing a new hit-test

    Parameters

    Returns void

setPlaneDetector

Find examples in Playground
  • set the plane detector to use in order to create anchors from frames

    Parameters

    • planeDetector: WebXRPlaneDetector

      the plane-detector module to use

    • Optional enable: boolean

      enable plane-anchors. default is true

    Returns void

Generated using TypeDoc