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

@metaverse-backpack/backpack-aframe-client-sdk

v0.0.6

Published

A-Frame components for Backpack

Downloads

8

Readme

@metaverse-backpack/backpack-aframe-client-sdk

About the project

A collection of components to integrate Backpack into your A-Frame project. Backpack is an open-source, virtual backpack for the Metaverse.

Getting started

Prerequisites

  • npm

    Install npm as this project uses npm as a package manager. NOTE: This installation command requires brew and only runs on Mac.

    $ brew install node

Installation

  1. Clone the repo
    $ git clone https://github.com/Metaverse-Backpack/backpack-aframe-client-sdk.git
  2. Install NPM packages
    $ npm install

Usage

Integrate in your existing A-Frame project

To integrate the Backpack A-Frame components into your existing project, add the following dependencies in your <head> tag underneath your A-Frame import.

<script src="https://cdn.jsdelivr.net/npm/@metaverse-backpack/backpack-aframe-client-sdk/dist/backpack-aframe-client-sdk.min.js"></script>

There are various A-Frame components with different purposes:

| Component | Purpose | Status | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | backpack-avatar-selector | Automatically creates a room with all your avatars and provides a selection mechanism | Draft, Tied to Meditation PoC demonstrator | | backpack-portal | Portal that automatically listens to the events from backpack-avatar-selector and takes the selected avatar as query parameter to the portal link | Draft, Tied to Meditation PoC demonstrator | | backpack-avatar | Component that automatically loads an avatar from the backpack by providing the backpack item ID | Draft, Tied to Meditation PoC demonstrator |

Directly use this project

Development

For development, the Backpack A-Frame components can be seen in various examples by starting a local webserver:

# Start development webserver in watch mode (automatically reload if files change)
$ npm run start

Navigate to http://localhost:9000 to choose one of the examples.

Examples
  1. Basic example of an avatar selection room based on Backpack
  2. Basic example of loading an avatar from the Backpack

Production

For production, the Backpack A-Frame components can be built and minified with the following command:

# Build component in production
$ npm run dist

It builds the components for production to the dist folder. It contains a minified and non-minified version.

Custom provider modules

Each avatar provider can provide a custom module to extend the generalized functionality of the backpack-avatar component. E.g., use different rigging for different providers as their bone structure differs from each other. Feel free to contribute your very own provider module, please check Contributing for further instructions. A provider module is a function that receives the Avatar element avatarEl as a parameter and additionally gets access to the context of the component bind to this, specifically to this.data. To illustrate, here is an example adding a custom idle animation to ReadyPlayerMe avatars by using the rig-animation component:

const PROVIDER_LOADERS = {
  "ready-player-me": function (avatarEl) {
    avatarEl.setAttribute("rig-animation", {
      remoteId:
        this.data.metadata.outfitGender === "masculine"
          ? "animated-m"
          : "animated-f",
      clip: "IDLE",
      loop: "repeat",
      crossFadeDuration: 0,
    });
  },
};

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/amazing-feature)
  3. Commit your Changes (git commit -m 'add some amazing feature')
  4. Push to the Branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

Related projects

Contact

Benedikt Wölk - @web3woelk - [email protected]

Tobias Petrasch - @TPetrasch - [email protected]

Acknowledgments