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 🙏

© 2024 – Pkg Stats / Ryan Hefner

aframe-registry

v0.6.0

Published

Curated collection of community A-Frame components.

Downloads

42

Readme

aframe-registry

Curated collection of community A-Frame components.

VIEW SITE

Introduction

The Registry collects components from the community. We curate them to make sure they work for the versions of A-Frame they say they work. We also try to improve the components as they come in with code review and API suggestions. Versioning is handled so you don't have to look for which version of the component works with your version of A-Frame. As a component repository, the Registry is similar to the Unity Asset Store or npm.

Usage

You can install or try out components from the Registry in one of several ways.

angle

angle is a command-line interface (CLI) for A-Frame. You can install components through this CLI straight into your HTML file. angle will inject the appropriate <script> tag pointing to a CDN depending on your version of A-Frame:

npm install -g angle && angle install aframe-physics-system

Download

If you browse the Registry's website, you'll see download links for components. The Registry will currently show builds for the latest versions of A-Frame for now. You can either download the file locally, or copy and paste the URLs and reference from a <script> tag in your HTML.

Inspector

If you open any A-Frame scene using the visual Inspector with <ctrl> + <alt> + i, you'll find components from the Registry in the Inspector's dropdowns when adding a component to an entity. Straight from the Inspector, you can do things such as select animations, physics, or mountains from the dropdown straight from the Registry.

Maintaining the Registry

A single registry file is maintained at registry.yml. The format of a component looks like:

<npm package name>:
  names: [<component names (as used from HTML) included>]
  versions:
    <aframe major version series>:
      version: <npm package version>
      path: <relative path to component JS file from package root>

All other metadata will be fetched from npm, and the component build will be served via unpkg.com, a CDN for npm.

This registry will then be processed and output to JSON files, one for each major version of A-Frame. These JSON files will be consumed by tools, libraries, and websites such as the A-Frame Inspector.

Versioning

Once A-Frame updates, all existing components will still work but are marked with a compatibility warning until either the component's entry in the registry is updated and compatibility confirmed. Here's how component compatibility is determined in relation to A-Frame:

  • If there is a component version explicitly listed for an A-Frame version, use that.
  • If there is no component version listed for an A-Frame version, use the version registered for the previous A-Frame version if possible. Then set a flag in order to raise compatibility warnings.
  • If a component version for an A-Frame version is explicitly set to null, exclude it.

Excluding from the Inspector

Components may be more optimal to use straight from code instead of from visual tools such as the Inspector. In such cases, specify inspector: false:

aframe-codey-component:
  names: codey
  inspector: false
  versions:
    0.4.0:
      version: 1.2.3
      path: dist/aframe-codey-component.min.js

Submitting a Component

To submit a component, make a pull request adding your component to the registry file in the format explained above.

We recommend using angle's component template to get started on a component:

npm install -g angle
angle initcomponent

Component Requirements

  1. Must be published to npm.
  2. Must be published to GitHub.
  3. Must self-register themselves with AFRAME.registerComponent.
  4. Must contain documentation on component properties and sample usage in the README.
  5. Must contain at least one example published to GitHub Pages.
  6. A link to the examples must be added as the GitHub repository's Website next to the GitHub repository's Description.
  7. Must make sense in the context of a WebVR application. This can change later, but the initial components of the Registry will be under strict curation.

Component Suggestions

  • Should include an attractive preview image or GIF in your README for display.
  • Should follow semver in your component versioning scheme, mirroring A-Frame's latest stable version.
  • Use angle, an A-Frame command-line tool, to bootstrap a component template for publishing.
  • Add A-Frame Registry maintainer Kevin Ngo as a collaborator to your GitHub repository and as an owner to your npm package (npm owner add ngokevin) if you want help maintaining your component.

Updating the Registry

Add or update your module in the registry.yml file (not the files in build/). Then make a pull request!

To build the output registry JSON files that correspond to each A-Frame version:

npm install
npm run config  # Local config. You will need to add your GitHub API token.
npm run build

If you want to see the registry in a more readable format:

npm run print

Try to keep the registry in alphabetical order.

Local Development

If updating the build scripts, make sure you have npm installed. Then you can modify scripts and run npm run test to unit test or npm run build to do a full run.

If updating the website, run npm run site to re-generate the templates. This doesn't need to be done if just working on CSS.

Once deployed to master, the Registry's GitHub Pages will update.