安全上下文
此特征只可用于 安全上下文 (HTTPS),在某些或所有 支持浏览器 .

XRReferenceSpaceEventInit property referenceSpace is used to establish the value of a newly-constructed XRReferenceSpaceEvent object when calling the XRReferenceSpaceEvent() 构造函数。

句法

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

XRReferenceSpace indicating the source of the event.

范例

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
});
					

规范

规范 状态 注释
WebXR 设备 API
The definition of 'XRReferenceSpaceEventInit.referenceSpace' in that specification.
工作草案 初始定义。

浏览器兼容性

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

No compatibility data found. Please contribute data for "api.XRReferenceSpaceEventInit.referenceSpace" (depth: 1) to the MDN 兼容性数据存储库 .

元数据

  • 最后修改: