HTML panels in a real room

Two HTML panels for a WebXR session that knows about the room. A tracked fingertip presses buttons the way it would on a touch screen. The panels attach to walls and tables from plane detection and stay there with anchors. Depth sensing hides them behind real objects. One panel can be given to the headset's compositor as an XRQuadLayer.

None of this has run on a device yet. The scene below is a simulated room that drives the same code: your pointer moves a fingertip, and the wall, table and column stand in for detected planes and a real object. The table under the demo says what a real session reports.

Emulate a headset
Show the code fingertip presses, planes, anchors, depth, quad layer
  1. Ask the session for the room features. Each one is optional, and the page reports which were granted.
  2. Give each hand's index fingertip a pointer. The tip's position is read from the hand joints every frame.
  3. Inside the library: a fingertip as a pointer. Distance to the panel decides hover, press and release. The ray pointer from html3d.js turns that into events on the element.
  4. Put a panel on the nearest wall or table, then anchor it.
  5. Inside the library: planes and anchors.
  6. Inside the library: a panel as an XRQuadLayer. It first tries to upload the element straight into the layer's texture.
  7. The whole library.

Move the pointer over a panel to bring the fingertip near it, and press to push it in. Drag on the list to scroll it. Drag empty space to look around. On a phone, a touch is the fingertip.

Room controlsnothing pressed yet
3
What this session hassimulated room

Presses

    What a session reports

    Filled in while a session runs and kept after it ends. The same rows show on the status panel inside the headset.

    FeatureSimulated roomLast real or emulated session

    Checks

    These move the simulated fingertip and the panels on this page, so they wait for a tap.

    ResultExperimentDetail

    Findings