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

aframe-hotspots

v1.0.1

Published

A-Frame component for interactive VR hotspots with audio and scene transitions

Readme

🎯 Usage Guide

Basic Setup

<a-entity id="spots" hotspots>
  <!-- Initial visible group -->
  <a-entity id="group-point1" visible="true">
    <a-image
      face-camera
      spot="linkto:#point2; spotgroup:group-point2; label:Conference Room"
      position="-11 0 2"
    >
    </a-image>
  </a-entity>

  <!-- Hidden group (activated later) -->
  <a-entity id="group-point2" visible="false">
    <a-image
      face-camera
      spot="linkto:#point1; spotgroup:group-point1; label:Return"
      position="10 0 -8"
    >
    </a-image>
  </a-entity>
</a-entity>

Key Concepts

  1. Hotspot Groups (<a-entity id="group-*"):

    • Organize hotspots into logical groups (one per scene/location)
    • Only one group should have visible="true" initially
    • Switch between groups using the spotgroup property
  2. Spot Component (spot=""):

    spot="linkto:#TARGET_PANO; spotgroup:GROUP_ID; label:YOUR_TEXT;
    audio:#AUDIO_ID; labelBackground:#COLOR; labelPadding:0.2"
    • linkto: Target panorama ID (matches your <img id>)
    • spotgroup: Next group to show when clicked
    • label: Text display under hotspot
    • audio: Optional audio element ID
    • labelBackground: Label background color
    • labelPadding: Text padding around label
  3. Navigation Flow:

    graph LR
    A[Current Group] -->|click spot| B[New Group]
    B -->|spotgroup| C[Next Scene]

Full Implementation Steps

  1. Install the package:
npm install aframe-hotspots
  1. Add required assets:
<a-assets>
  <img id="point1" src="scene1.jpg" />
  <img id="point2" src="scene2.jpg" />
  <img id="hotspot" src="arrow.png" />
  <audio id="ambient" src="sound.mp3"></audio>
</a-assets>
  1. Set up your scene structure:
<a-scene>
  <!-- Hotspot system -->
  <a-entity id="spots" hotspots>
    <!-- First visible group -->
    <a-entity id="entrance" visible="true">
      <a-image
        face-camera
        spot="linkto:#main-hall; spotgroup:main-hall; label:Enter Main Hall"
        position="0 1.6 -3"
      >
      </a-image>
    </a-entity>

    <!-- Secondary group -->
    <a-entity id="main-hall" visible="false">
      <a-image
        face-camera
        spot="linkto:#entrance; spotgroup:entrance; label:Exit"
        position="0 1.6 3"
      >
      </a-image>
    </a-entity>
  </a-entity>

  <!-- Panorama viewer -->
  <a-sky id="skybox" src="#entrance-scene"></a-sky>
</a-scene>

Advanced Features

Audio Hotspots:

<a-image
  face-camera
  spot="audio:#info-audio; label:Audio Guide"
  position="2 1.5 -4"
>
</a-image>

Custom Labels:

spot="label:Meeting Room; labelBackground:#FF0000; labelPadding:0.4;
lineHeight:50"

Lifecycle Flow

  1. Initial group (visible="true") shows hotspots
  2. Clicking a spot:
    • Changes panorama via linkto
    • Hides current group
    • Shows new spotgroup
    • Plays/pauses audio if configured

Best Practices

  • Keep group IDs descriptive (lobby, gallery-1, etc)
  • Position hotspots using camera coordinates (X,Y,Z)
  • Test group visibility transitions using:
    document.getElementById("spots").emit("reloadspots", {
      newspots: "new-group-id",
      currspots: "current-group-id",
    });

    📬 Connect with Me

  • 🌐 Portfolio
  • 🔗 LinkedIn