XRReferenceSpaceEventInit.referenceSpace

Secure context

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

The XRReferenceSpaceEventInit property referenceSpace is used to establish the value of a newly-constructed XRReferenceSpaceEvent object when calling the XRReferenceSpaceEvent() constructor.

Syntax

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

Value

An XRReferenceSpace indicating the source of the event.

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