@fern-solutions/aframe-hud

0.1.0 • Public • Published

HUD component

npm version npm version github twitter mastodon ko-fi

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>

Readme

Keywords

Package Sidebar

Install

npm i @fern-solutions/aframe-hud

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

12.3 kB

Total Files

7

Last publish

Collaborators

  • mrxz