XRReferenceSpaceEventInit.transform

Secure context

This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The XRReferenceSpaceEventInit property transform indicates the position and orientation of the affected reference space's native origin after the changes the event represents are applied. The transform is defined using the old coordinate system, which allows it to be used to convert coordinates from the pre-event coordinate system to the post-event coordiante system.

Syntax

let eventInitDict = {
  referenceSpace: xrReferenceSpace,
  transform: xrRigidTransform
});

Value

An XRRigidTransform object providing a transform that can be used to convert coordinates from the pre-event coordinate system to the post-event coordinate system.

Examples

This simple snippet calls the constructor to create a new reference space event of type reset.

let refSpaceEvent = new XRReferenceSpaceEvent("reset", {
      referenceSpace: myRefSpace,
      transform: myTransform
});

Specifications

Specification Status Comment
WebXR Device API
The definition of 'XRReferenceSpaceEventInit.transform' in that specification.
Working Draft Initial definition.

Browser compatibility

No compatibility data found for api.XRReferenceSpaceEventInit.transform.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.