Installation
SenangStart XR is a GUI framework built on top of A-Frame. It ships as a single browser bundle that registers 18 sxr-* components and their matching a-sxr-* HTML primitives on the global AFRAME object.
Supported A-Frame versions are 1.7.x and 1.8.x (peer dependency >=1.7.0 <1.9.0). See A-Frame Versions.
Local build
Include A-Frame, then the SenangStart XR bundle, in the <head> of your page:
<script src="https://aframe.io/releases/1.7.0/aframe.min.js"></script>
<!-- local build -->
<script src="dist/senangstart-xr.js"></script>Then use the a-sxr-* primitives inside your <a-scene> (see the Components section):
<a-scene>
<a-sxr-flex-container
flex-direction="column" justify-content="center" align-items="center"
width="4" height="3" opacity="0"
position="0 1.6 -2">
<a-sxr-button width="2" height="0.6" value="Hello XR"
onclick="handleClick"></a-sxr-button>
</a-sxr-flex-container>
</a-scene>Install via npm
npm install @bookklik/senangstart-xrA-Frame is a peer dependency (supported range: >=1.7.0 <1.9.0) and must be loaded on the page first. The package ships the built bundles and the bundled font in dist/ / package root; reference dist/senangstart-xr.min.js via a <script> tag (the bundle registers its components against the global AFRAME object and is not require()-able):
<script src="https://aframe.io/releases/1.7.0/aframe.min.js"></script>
<script src="node_modules/@bookklik/senangstart-xr/dist/senangstart-xr.min.js"></script>CDN usage
<script src="https://unpkg.com/@bookklik/senangstart-xr@2.1.0/dist/senangstart-xr.min.js"></script>Pin CDN versions
unpkg/jsdelivr redirects of unversioned URLs can serve a different release than the one you tested against.
Run the showcase example
A ready-to-run demo scene is included at examples/index.html. Start the bundled dev server:
npm startThen open http://localhost:8080 in a browser to see the widgets in action.
Next steps
- Layout with Flex Container — arrange widgets in 3D panels
- Interaction — callbacks, events, keyboard and VR lasers
- Styling & Fonts — brand tokens and custom typefaces
- SXR Namespace API — programmatic helpers