aframe-desktop-xr-plane
v0.0.1
Published
Simulation of XR Planes on Desktop, for A-Frame
Downloads
4
Readme
Overview
A component to simulate WebXR XRPlanes, while running on a desktop system
Schema
This component has no schema. Simulated planes are configured via the plane geometry configured on the same element.
Usage
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>
Limitations
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.
Installation
Via CDN
<script src="https://cdn.jsdelivr.net/npm/[email protected]/index.min.js"></script>
Or via npm
npm install aframe-desktop-xr-plane
Examples
This component is used in tests for the xr-room-physics
component, for example: