Skip to content

No way to detect if a feature is enabled for a session. #64

@Maksims

Description

@Maksims

Currently, there is no way to detect if anchors feature has been enabled for the session.

Some other APIs provide some way to detect a feature, e.g. plane-detection throws an exception when trying to access detectedPlanes property, which I've argued is not a good API design here: immersive-web/plane-detection#30

Regardless of anchors feature been enabled or not on the session, XRFrame has a property trackedAnchors that always returns a Set-like object.

For consistency across APIs, it would be best to not return Set, but either throw an exception as in plane-detection, or better to be null if the feature is not available on the session.

That way, the developer has a graceful way to detect if anchors feature is enabled or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions