XRAnchorOptions

Type Alias XRAnchorOptions

XRAnchorOptions: {
    anchorToSurface: boolean;
    xrAnchorOffsetTransform?:
        | [
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
        ]
        | Float32Array;
}

Options for anchoring an object in AR.

This type specifies the configuration options available when creating an anchor for an object in an Augmented Reality (AR) environment.

Type declaration

  • anchorToSurface: boolean

    Determines whether the anchor should be attached to a detected surface.

  • OptionalxrAnchorOffsetTransform?:
        | [
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
            number,
        ]
        | Float32Array

    The XR anchor offset transform is used to set a scene's box volume position in conjunction with ContextAPI.anchorXR so that when anchored to a surface, the scene does not appear to be embedded in the surface. The offset transform also allows for rotations to be applied, but not scaling. If scaling is included in the offset transform, unexpected results may occur. Default value is the identity matrix.


Did you find this page useful? Please give it a rating:
Thank you for rating this page!
Any issues or feedback?
What kind of problem would you like to report?
Please tell us more about what's wrong: