<XrHandMenu>
A menu on the wrist. It shows above your hand when you turn the palm toward your face and goes away when you turn it back, like the Quest system menu. Poke it with the other hand's fingertip. Only tracked hands open it: there is no live demo here because a mouse has no palm. Try it in the playground on a Quest, with hands.
Usage
vue
<XrHandMenu hand="left" @open="opened++">
<XrPanel :width="240">
<XrButton @click="recenterContent">Bring panels here</XrButton>
<XrToggle v-model="showSurfaces">Surfaces</XrToggle>
</XrPanel>
</XrHandMenu>angle(50°) is how far the palm may turn away from your eyes before the menu closes; it opens 15° inside that, so it does not flicker at the edge.offsetplaces it relative to the palm:[toward the thumb, up, out of the palm], in metres. The default floats it 12 cm above the hand, facing you.- The content is mounted only while the menu is open: keep state that must survive in the parent (as with
v-if). - Controllers never open it. If your app supports controllers too, give the same actions another place.
API
Props
| Prop | Type | Default | Description |
|---|---|---|---|
offset | Vec3 | [0, 0.12, 0.04] | Where the menu sits relative to the palm, in metres: [side, up, out], with side toward the thumb, up toward the sky and out along the palm's normal. |
angle | number | 50 | How far the palm may turn away from your eyes, in degrees, before the menu closes. It opens 15 degrees inside that, so it does not flicker at the edge. |
hand | "left" | "right" | 'left' | Which hand carries the menu. The other one pokes it. |
Events
| Event | Payload | Description |
|---|---|---|
close | The palm turned away or the hand was lost: the menu closed. | |
open | The palm turned toward the face: the menu opened. |