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

outrealm

v0.1.2

Published

Seamless inter-domain portals and third-person player controller for 3D web experiences using Three.js.

Readme

Outrealm

npm version Build Status License Downloads GitHub Stars GitHub Issues


What is Outrealm?

Outrealm is a lightweight JavaScript library for creating seamless inter-domain portals between 3D web experiences.
It enables transferring player state — including position, rotation, and more — between separate Three.js projects with smooth transitions.

Perfect for modular virtual worlds, multi-scene portfolios, or any app requiring immersive teleportation across domains.


Features

  • Store and transfer user state securely via backend API
  • Seamless fade transition effect between domains
  • Built-in ThirdPersonPlayer class with:
    • Smooth WASD movement
    • Modular animation blending (walk/idle)
    • Pointer lock support
    • Optional grid-based collision using sharedGrid
  • Easy integration with any Three.js project

Installation

npm install outrealm

Usage

Creating a Portal

import { createPortal } from "outrealm";

const destination = "https://my-other-experience.com";
const playerState = {
  position: { x: 1, y: 0, z: 3 },
  rotation: { y: Math.PI / 2 },
};

await createPortal(destination, playerState);

Receiving User State

import { receivePortalUserState } from "outrealm";

const userState = await receivePortalUserState();
if (userState) {
  player.model.position.set(
    userState.position.x,
    userState.position.y,
    userState.position.z
  );
  player.model.rotation.y = userState.rotation.y;
}

Using the Built-in ThirdPersonPlayer

import { ThirdPersonPlayer } from "outrealm";

// Optional imports for collision
import { sharedGrid, updateSharedObstacles } from "./your/grid/setup";

const player = new ThirdPersonPlayer({
  model: gltf.scene,
  camera: camera,
  walkAnimationClip: gltf.animations[0],
  idleAnimationClip: gltf.animations[1], // optional
  enablePointerLock: true,
  useCollision: true,
  sharedGrid, // optional for grid-based navigation
  updateSharedObstacles, // optional for runtime obstacle sync
});

// In your animation loop
function animate(delta) {
  player.update(delta);
}

API

createPortal(destinationUrl, userState, options?)

Saves the current user state and transitions to a new domain.

  • destinationUrl (string): The URL to redirect the user to
  • userState (object): The state object to transfer (e.g. position, rotation)
  • options (object, optional): Options passed to the transition animation

receivePortalUserState()

Returns a promise that resolves with the user state received from the backend, or null if invalid.


ThirdPersonPlayer(config)

A modular third-person character controller with pointer-lock, animation, and collision support.

Required:

  • model (THREE.Object3D): The GLTF/FBX 3D model
  • camera (THREE.Camera): The camera that follows the player

Optional:

  • walkAnimationClip (THREE.AnimationClip): Walk animation
  • idleAnimationClip (THREE.AnimationClip): Idle animation
  • enablePointerLock (boolean): Enable camera rotation with mouse
  • pitchLimits (object): Clamp vertical pitch. Default: { min: -π/4, max: π/4 }
  • useCollision (boolean): Enable grid-based collision detection
  • sharedGrid (object): Your Grid instance for walkability
  • updateSharedObstacles (function): Updates grid obstacles (if needed)

License

MIT License. See LICENSE for details.


Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.


Acknowledgments


Author

Dheer Jain


Enjoy building seamless virtual experiences with Outrealm!