A component to simulate WebXR XRPlanes, while running on a desktop system
This component has no schema. Simulated planes are configured via the plane geometry configured on the same element.
Configure an a-plane
(or other element with a plane
geometry) with the desired position, size, rotation and appearance (can be invisible if desired)
Then add the desktop-xr-plane
component
<a-plane width="2"
height="2"
position="1 1 0"
rotation="0 -90 0"
color="white"
wireframe="true"
desktop-xr-plane>
</a-plane>
Does not support the scale
attribute on the element - scale is assumed to be 1 1 1
Only supports rectangles. The WebXR standard supports XRPlanes that are arbitrary polygons, so this is a limitation vs. the WebXR standard. However note that as of July 2023, the Meta Quest room setup process always generates rectangles (even for the ceiling and floor of a non-rectangular room). So it’s possible to simulate all XRPlanes that can be generated by Meta Quest room setup.
Via CDN
<script src="https://cdn.jsdelivr.net/npm/aframe-desktop-xr-plane@0.0.1/index.min.js"></script>
Or via npm
npm install aframe-desktop-xr-plane
This component is used in tests for the xr-room-physics
component, for example: