npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcobom2019-menu

v1.0.3

Published

aframe menu created from a JSON

Readme

Exploration of Hand-Manipulable Interfaces in Extended Reality

Functional Description

General Overview

The developed project is an immersive data visualization application in virtual reality using web technologies such as A-Frame, WebXR, and BabiaXR. The scenes are designed to be accessible from various devices, although full functionality is experienced using Meta Quest 3 VR headsets, particularly leveraging hand interaction as the main method of navigation and control.

The system allows the user to access a main menu where, through interactive buttons, they can navigate through different submenus to reach data selection and visualization. This visualization is presented through pie or bar charts, and generation of 3D shapes such as beds, chairs, or tables from .glb files—all based on a JSON file containing structured data.

All interface elements (buttons, menus, sliders, etc.) are designed to respond to touch using the user’s hands, thanks to WebXR Hand Tracking support. Additionally, functionality has been added to grab and move panels (grabbable), allowing for a more personalized and flexible user experience.


General Structure and Operation

The main entry point of the project is the index.html file, which is responsible for importing all the libraries needed for the scene to function. Among the most important are:

  • aframe.min.js: base library for creating WebVR/WebXR scenes with A-Frame
  • aframe-hand-tracking-controls-extras.js and hand-tracking-controls-extras-components.js: used to enable and enhance hand tracking on compatible VR devices
  • aframe-environment-component.js: allows quick creation of immersive environments, like a room
  • aframe-rounded.js: used for custom aesthetic elements

Additionally, the following key scripts are imported:

  • menu.js (main script)
  • initMenu.js
  • button.js
  • pressable.js
  • pinchable.js
  • size-change.js
  • slider.js

Within the <a-scene> tag, the custom menu component (defined in menu.js) is instantiated, and input controllers (mouse, hands, VR controllers) are configured, as well as the visual environment of the scene (a room with walls, ceiling, floor, windows, and photographic background).


Key Components and Their Functionality

menu.js

Main component of the project. Responsible for:

  • Reading the scene.json file where the scene structure is defined
  • Automatically creating the specified menus and buttons
  • Associating functions to each button according to the JSON configuration
  • Handling complex features such as:
    • Minimizing/maximizing menus
    • Switching between menus
    • Switching modes (day/night)
    • Positioning/rotating menus
    • Enabling/disabling interactivity (grabbable)
  • Managing visibility and navigation states via internal booleans
  • Allowing feature extension through specific functions

scene.json

Dynamic configuration file. Defines:

  • Menus with properties such as ID, visibility, position, and whether they are grabbable
  • Buttons with:
    • Visible label (or "noLabel")
    • Position within the menu
    • Label text position
    • Size and color
    • Associated functions and parameters

This file is read by menu.js to generate the interactive interface without manually coding each button.

button.js

Defines the appearance and behavior of buttons:

  • Size, color, and shape
  • Label (text), position, and size
  • Button position and rotation
  • Interaction via mouse or hands (VR detection)

initMenu.js

Defines the base appearance of menus:

  • Represented as panels with rounded corners
  • Metallic gray color
  • Configurable size (width, height, border radius)

pressable.js

Adds the ability to detect physical presses on buttons, simulating a realistic “button press” experience. Compatible with both hands and mouse.

pinchable.js

Enables "pinch" gestures on elements, designed for sliders. Also supports mouse interaction.

size-change.js

Allows changing the size of scene elements through sliders. It interprets the current value and modifies the corresponding entity’s scale.

slider.js

Defines the visual and functional aspects of an interactive slider:

  • Combines pinchable.js and size-change.js
  • Its main function is to adjust the size of generated diagrams

System Usage Guide (From Scratch)

  1. Create index.html and import:

    • Basic libraries: A-Frame, environment, hand-tracking, etc.
    • Required scripts: menu.js, initMenu.js, button.js, etc.
  2. Within the <a-scene> tag, add the menu component and define the input controllers (mouse, hands, VR).

  3. Design the scene.json file:

    • Define existing menus
    • Define buttons within each menu
    • Set the functions each button will execute
    • Set positions, visibility, labels, colors, etc.
  4. Extend functionalities by developing additional functions inside menu.js (e.g., activate music, create charts, change colors, etc.)

  5. Include scripts like pressable.js, pinchable.js, slider.js, and size-change.js to enable advanced interaction for buttons and sliders.