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 🙏

© 2025 – Pkg Stats / Ryan Hefner

create-xr

v0.1.2

Published

[![npm version](https://img.shields.io/npm/v/create-xr.svg)](https://www.npmjs.com/package/create-xr) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm downloads](https://img.shields.io/npm/

Readme

😎 Hello XR - Demo

npm version License: MIT npm downloads

This repository is meant to be an easy to use starter kit of the best / most current 3D and XR libraries on the web, with some of my own contributions as well. Packages such as AFRAME, THREE.js, the IWSDK by Meta, and a few others, all bundled using Vite, with a simple npm create xr command to generate a template project with all the functionality you would expect from a modern day game engine, like physics, locomotion, controller/hand tracking, skyboxes, gltf model rendering, scene editor, XR emulator, and many more.

Getting Started

Get up and running with web xr development with just a few commands!

Template

To create a new Web XR project using the template, use:

npm create xr

to run the project use:

npm run dev

Components

To import all AFRAME components into your project (done automatically when using the template), use:

<script src="https://cdn.skypack.dev/pin/[email protected]/mode=raw,min/foobar404/webxr-sdk@main/components/index.js"></script>

To import individual components into your AFRAME project use:

<script src="https://cdn.jsdelivr.net/gh/foobar404/webxr-sdk@main/components/component.js"></script>

Replace component with your desired component, for example the fly component would be:

<script src="https://cdn.jsdelivr.net/gh/foobar404/webxr-sdk@main/components/fly.js"></script>

Components

AFRAME.js provides the scaffolding to build a powerful XR app, such as geometry, materials / textures, gltf model rendering, animations, and more. This project aims to fill the gaps and create a cohesive development experience, similar to a modern game development workflow that one would have with Unity or Unreal. Crucial missing features for quick webxr development include things like locomotion, VR UI for things like menus, basic object interactions, performance optimization such as model compression, LOD controls, foveated rendering, and many other components one would expect that have for a streamlined XR development workflow.

Current Components

  • bullet: Manages bullet projectiles with collision detection, pooling, and target interaction
  • confetti: Creates a confetti effect with falling particles in waves
  • decal: Adds decals (stickers) to surfaces at specified points with texture support
  • fly: Provides flying movement controls using VR controllers with joystick, trigger, and grip inputs
  • gravity: Applies gravity and damping to rigid bodies with basic collision detection
  • haptics: Enables haptic feedback (vibration) for VR controllers with pulse and burst modes
  • jump: Implements jumping mechanics for entities
  • origin: Sets the origin or reset position for the scene
  • passthrough-toggle: Toggles AR passthrough mode for mixed reality experiences
  • phone-controls: Provides controls optimized for mobile phone input
  • rigid-body: Defines physics rigid bodies with velocity and collision properties
  • shooter: Handles shooting mechanics and projectile spawning
  • smooth-move: Enables smooth movement controls for locomotion
  • smooth-turn: Provides smooth turning controls for camera rotation
  • snap-turn: Implements snap turning for VR locomotion
  • static-body: Defines static physics bodies that don't move but can collide
  • super-keyboard: Enhanced keyboard controls with additional features
  • target: Creates interactive targets for shooting or other interactions
  • vignette: Applies a vignette visual effect to the scene
  • wasd-plus: WASD movement controls with additional locomotion features
  • world-grab: Allows grabbing and manipulating objects in the world

References

To take full advantage of the project it's necessary to understand the basics of aframe.js, and THREE.js to some degree, so here are some links to important resources.

  • AFRAME - https://aframe.io/docs/master/introduction/
  • THREE.js - https://threejs.org/manual/#en/installation
  • IWSDK - https://developers.meta.com/horizon/documentation/web/iwsdk-overview

License

This project is licensed under the MIT License - see the LICENSE file for details.