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

@vmlibs/unit_three

v1.0.0

Published

Three.js game engine style library for building scenes, objects, managers, and effects

Downloads

28

Readme

unit_three

@vmlibs/unit_three is a TypeScript library built on top of Three.js to help create game-like scenes, objects, managers, and visual effects with a reusable engine-style architecture.

What this library provides

  • Three.js-based core runtime (GameCore) and high-level manager (GameManager)
  • Scene composition helpers (Scenary, skybox/floor/background setup)
  • Object and component system (GameObject, GameComponent, mesh/light/rigidbody/collider/skybox components)
  • Editor-oriented interactions (TransformControls, selection, object manipulation hooks)
  • Built-in managers for input, HUD, lighting, collisions, rigid body orchestration, scene state control
  • Visual effects helpers (for example FireParticles)
  • Typed API surface for scenary/game options and engine events

Installation

npm install @vmlibs/unit_three three

Peer ecosystem used by this library:

  • three
  • @dimforge/rapier3d-compat
  • dat.gui
  • rxjs

Quick start

import { GameManager } from '@vmlibs/unit_three';

const game = new GameManager({
  gameOptions: {
    showFps: true,
    isEditor: true,
  },
  initScene: {
    scenaryOptions: {
      skybox: {
        images: {
          front: '/assets/barren_ft.jpg',
          back: '/assets/barren_bk.jpg',
          left: '/assets/barren_lf.jpg',
          right: '/assets/barren_rt.jpg',
          up: '/assets/barren_up.jpg',
          down: '/assets/barren_dn.jpg',
        },
        size: 300,
      },
      floor: {
        primitiveType: 'plane',
        gameObjectName: 'floor',
        width: 200,
        height: 200,
      },
    },
    charactersOptions: [],
    objectsOptions: [],
  },
});

Main exports

From package root:

  • THREE (re-exported Three.js namespace from shared constants)
  • GameManager
  • GameObject
  • GameComponent
  • All public types exports (GameOptions, IScenary, ISceneOptions, etc.)
  • VFX exports (FireParticles)
  • testIsFromPackage helper

Entry files:

  • src/index.ts exports package root API
  • src/scripts/index.ts exports managers/common engine primitives
  • src/types/index.ts exports public type contracts
  • src/vfx/index.ts exports effects

Core concepts

1. Engine core

GameCore handles renderer/camera setup, controls, input, resize lifecycle, and update loop infrastructure.

2. Manager layer

GameManager extends GameCore and centralizes scene states, game object selection, physics debug overlays, and editor actions.

3. Scene composition

Scenary composes:

  • Skybox
  • Floor mesh
  • Directional background groups (north/south/east/west)

4. Components and objects

Objects are built and updated through component abstractions (GameMeshComponent, GameLightComponent, GameSkyboxComponent, GameRigidBodyComponent, GameColliderComponent, etc.).

Development

Build

npm run build

Build pipeline uses tsup and generates:

  • CommonJS (dist/**/*.js)
  • ESM (dist/**/*.mjs)
  • Type declarations (dist/**/*.d.ts)
  • Source maps

Test

npm test

Jest is configured with ts-jest and matches tests under:

  • src/__tests__/**/*.test.ts
  • **/?(*.)+(spec|test).ts

Repository structure (high level)

src/
  factory/        # mesh/box/skybox and primitive factories
  scripts/        # core runtime, managers, components, scenes, states
  types/          # public TypeScript contracts
  vfx/            # effects modules
  examples/       # example/demo implementations
  __tests__/      # unit tests

Package metadata

  • Package: @vmlibs/unit_three
  • Version: 1.0.0
  • Author: Vitor Machado
  • License: ISC

Notes

  • The library is browser-focused (Three.js renderer + DOM integration).
  • Some editor/debug behaviors depend on runtime scene setup and object metadata (gameObjectName in userData).