Warning

Nightly releases are generated automatically from the latest source code and are intended for experimental purposes only. These builds may contain incomplete or untested features, bugs, or security vulnerabilities, and as such, are not for production use. Users should be aware that nightly releases may cause unexpected behavior, data loss, or system instability. Use of these releases is at the user's own risk, and it is advised to have adequate backups before testing. The software is provided as is with no guarantees or support.

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.