Skip to content

Commit 67566cd

Browse files
authored
Merge pull request #93 from immersive-web/plane_detection_info
Add test extensions for plane detection
2 parents c031ac2 + 72e7ca0 commit 67566cd

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

index.bs

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ dictionary FakeXRRigidTransformInit {
365365

366366
dictionary FakeXRVisibilityMask {
367367
required sequence<float> vertices;
368-
required sequence<uint32> indices;
368+
required sequence<unsigned long> indices;
369369
};
370370
</script>
371371

@@ -749,6 +749,35 @@ enum FakeXRRegionType {
749749

750750
{{FakeXRRegionType}} enum is used to describe a type of the world region.
751751

752+
Plane detection extensions {#plane-detection-extensions}
753+
===================
754+
755+
The plane detection extensions for test API SHOULD be implemented by all user agents that implement <a href="https://immersive-web.github.io/plane-detection/">WebXR Plane Detection Module</a>. These extensions depend on the [[#hit-test-extensions|Hit test extensions]].
756+
757+
<script type="idl">
758+
dictionary FakeXRPlanePolygonPointInit {
759+
required float x;
760+
required float z;
761+
};
762+
763+
dictionary FakeXRPlaneInformationInit {
764+
required FakeXRRigidTransformInit origin;
765+
required sequence<FakeXRPlanePolygonPointInit> polygon;
766+
required XRPlaneOrientation orientation;
767+
DOMString? semanticLabel;
768+
};
769+
770+
partial dictionary FakeXRRegionInit {
771+
FakeXRPlaneInformationInit planeInfo;
772+
};
773+
</script>
774+
775+
{{FakeXRRegionInit/planeInfo}} is an optional dictionary that MAY be set when {{FakeXRRegionInit/type}} is {{FakeXRRegionType/"plane"}}. It MUST be ignored if {{FakeXRRegionInit/type}} is not {{FakeXRRegionType/"plane"}}. If {{FakeXRRegionInit/planeInfo}} is set, {{FakeXRRegionInit/faces}} should be used for hit-testing purposes, while the {{FakeXRPlaneInformationInit/polygon}} should be reported to the page as-is. The two MAY describe different areas. No information in {{FakeXRPlaneInformationInit}} overrides any data from it's containing {{FakeXRRegionInit}}.
776+
777+
{{FakeXRPlaneInformationInit/polygon}} contains the points that describe the polygon representing the plane. They MUST be in the form of a loop of points at the edges of the polygon in the coordinate system defined by {{FakeXRPlaneInformationInit/origin}}.
778+
779+
If {{FakeXRPlaneInformationInit/semanticLabel}} is set, the user agent MAY ignore any value that is not in the <a href="https://github.com/immersive-web/semantic-labels">semantic label registry</a>.
780+
752781

753782
DOM overlay extensions {#dom-overlay-extensions}
754783
======================

0 commit comments

Comments
 (0)