Function: anchorCapability()
anchorCapability(
session,frame):AnchorCapability
Defined in: src/world/anchors/AnchorCapability.ts:22
Determines what the running platform can do with anchors.
The anchor APIs are optional in three independent places: a frame may not be able to create anchors, a session may not be able to restore them, and an individual anchor may not be able to hand back a persistent handle. Presence of an XR session says nothing about any of them, so each is probed directly rather than inferred.
persistent is therefore a statement about the session, not a promise about
any particular anchor: whether an anchor can hand back a handle is only
knowable once that anchor exists. AnchorManager.persist reports that
per anchor, so treat this as "saving is worth offering" rather than
"saving will work".
Parameters
session
The active XR session, if any.
XRSession | null | undefined
frame
The current XR frame, if any.
XRFrame | null | undefined
Returns
What the platform supports.