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

@oparamo/aframe-room-component

v1.0.0

Published

An A-Frame component for quickly creating rooms connected by doors.

Downloads

26

Readme

aframe-room-component

Version License

A set of A-Frame components for quickly creating rooms connected by doors.

Click here to see an example

Installation

Browser

<head>
  <script src="https://aframe.io/releases/1.7.1/aframe.min.js"></script>
  <script src="https://cdn.jsdelivr.net/gh/oparamo/[email protected]/dist/aframe-room-component.min.js"></script>
</head>

<body>
  <a-scene>
    <a-room position="-2 0 -2" material="color:#866">
      <a-wall position="4 0 0"></a-wall>
      <a-wall position="4 0 4"></a-wall>
      <a-wall position="0 0 4"></a-wall>
      <a-wall position="0 0 0">
        <a-doorhole id="holeA"></a-doorhole>
        <a-doorlink from="#holeA" to="#holeB" position="2.5 0 0"></a-doorlink>
      </a-wall>
    </a-room>
    <a-room position="0 0 -3">
      <a-wall position=" 1 0 -1" material="color:#787"></a-wall>
      <a-wall position=" 1 0  1" material="color:#877">
        <a-doorhole id="holeB"></a-doorhole>
      </a-wall>
      <a-wall position="-1 0  1" material="color:#878"></a-wall>
      <a-wall position="-1 0 -1" material="color:#778"></a-wall>
    </a-room>
  </a-scene>
</body>

npm

npm install @oparamo/aframe-room-component
import 'aframe';
import '@oparamo/aframe-room-component';

Usage

Overview

A set of primitives (also usable as components) for laying out rooms connected by doors in A-Frame. Attributes in italics are material/height shorthands inherited from the parent element.

| Primitive | Component | Purpose | Attributes | | - | - | - | - | | a-room | room | Contains a set of walls and other objects. | position, outside, height, width, length, material | | a-wall | wall | Marks one corner of a wall, connecting to the next. | position, height, material | | a-doorhole | doorhole | Marks a wall so a doorlink can connect to it. | (none) | | a-doorlink | doorlink | Connects two doorholes and positions them along their walls. | from, to, position, width, height | | a-floor, a-ceiling, a-sides | floor, ceiling, sides | Attach materials to room/doorlink surfaces. | material |

Hierarchy

An a-scene can contain multiple a-rooms.

An a-room must contain at least three a-walls. Set outside="true" on a room to make its walls describe the exterior of a building rather than an interior.

An a-wall can have any A-Frame entity as a child. Walls are oriented so their local x axis points toward the next wall — meaning a child entity's x coordinate is its distance along the wall, y is height off the ground, and z is distance from the wall surface.

An a-doorhole must be a child of an a-wall. It marks where a door connection exists. It can have any A-Frame entity as a child (e.g. a door model). Do not set a position on an a-doorhole — its position is controlled by the a-doorlink it is connected to.

An a-doorlink can be a child of an a-scene or of an a-wall (but not of an a-doorhole). Its world position is used to automatically place the two connected doorholes as close to it as possible on their respective walls. Whether to parent the doorlink to the scene or to one of the walls depends on your layout — it affects whether the doorway moves with a room or stays fixed.

An a-floor and a-ceiling must be a child of either an a-room or an a-doorlink. An a-sides is only used inside a-doorlinks. All three exist solely to carry a material component for their surface. They can be omitted if you prefer to handle surfaces manually.

Shorthands

If an a-wall has no material component, it inherits from its parent a-room. If an a-floor, a-ceiling, or a-sides has no material, it inherits from its parent a-doorlink or a-room.

If an a-wall has no height attribute, it inherits from its parent a-room's height. The default room height is 2.4m.

If an a-room has both a width and a length attribute and contains exactly four a-walls, wall positions can be omitted — they will be set automatically to form a rectangle from (0,0) to (width, length).

Tips

  • Use a mixin for commonly repeated materials (e.g. a floor texture shared across rooms).
  • To connect a room to the outside world, wrap your rooms in an a-room outside="true" and put one doorhole on one of its walls.
  • Have a look at the example source for a walkthrough of the available features.