@fern-solutions/aframe-hud
v0.1.0
Published
A-Frame component for adding HUD elements on top of the rest in both desktop and VR
Downloads
2
Readme
HUD component
This component allows hud elements to be rendered. The elements render in both desktop and VR mode. On desktop the elements appear on the screen (flat), whereas in VR they are projected on a sphere around the user's head.
The intended usage is mostly for debugging, but can be used for simple overlays as well.
Checkout the example: Online Demo | Source
Usage
Load the script from npm or add the following script tag:
<script src="https://unpkg.com/@fern-solutions/aframe-hud/dist/hud.umd.min.js"></script>
The a-hud
and a-hud-element
primitives can be used as children of <a-camera>
as follows:
<a-camera>
<a-hud>
<a-hud-element align="center" content-size="1 1" hud-size="0.5" anchor="center"><a-plane></a-plane></a-hud-element>
</a-hud>
</a-camera>