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

@directivegames/genesys.js

v3.1.30

Published

Mini game engine built on top of three.js

Downloads

675

Readme

CI Publish

Version

genesys.js is a lightweight game engine built on top of three.js with an architecture inspired by Unreal Engine. It provides familiar classes like World, Actor, Component, Pawn, and PlayerController for easy game development.

Documentation for this repo is generated by AI and typedoc, check the docs folder.

Folder Structure

Mirrored in folder-structure.mdc

project/                    # Root folder
├── src/                    # Core engine source code
│   ├── actors/             # Actor classes (e.g. characters, entities)
│   ├── components/         # Reusable component classes
│   ├── game/               # Gameplay logic (e.g. world, game loop)
│   ├── physics/            # Physics API and implementations
│   ├── systems/            # Individual service-like systems
│   ├── utils/              # Utility and helper classes
│   └── index.ts            # Main entry point for the engine module
├── games/                  # Internal mini-games for engine feature testing
├── scripts/                # Development and build helper scripts
└── launcher.ts             # Web launcher entry – links to each mini-game

Features

  • 🏗️ Entity-Component system architecture
  • 🎮 Built-in input management
  • ⚡ Physics simulation (Havok and Rapier)
  • 🕹️ Player controller system
  • 🏃 Character movement components
  • 🧊 Scene graph management
  • Ragdoll Physics: Realistic physics-based character simulation with seamless transitions between animation and physics control
  • Integration Ready: Works seamlessly with existing character actors and animation systems

Architecture Overview

classDiagram
    World --> InputManager
    World --> Actor
    Actor --> Component
    Actor --> SceneComponent
    SceneComponent --|> THREE.Object3D
    SceneComponent --> SceneComponent

Note that SceneComponent is also a THREE.Object3D so we can reuse their scene graph implementation.

Getting Started

Prerequisites

  • Node.js (v18+ recommended)
  • pnpm (v9+ recommended)

Installation

pnpm install

Running the Project

# Development mode
pnpm dev

# Production build
pnpm build

Engine Versioning

We support making backward incompatible changes in the engine but you need to follow the steps below exactly:

  • When making breaking changes (those causing existing published games fail to run without fixes), you MUST bump up the major version.
  • After the new major version is published to npm, create an aliased import of the previous version in genesys.ai, example:
    "genesys.js": "^1.0.0",
    "genesys.js-0": "npm:genesys.js@^0.22.40",
    Note that the non-aliased version is assumed to be the latest.
  • Modify GameRuntime.ts, add new import for the just-deprecated major version and return it, etc.

As a side note, the compatible engine version is saved in the genesys project file and it's being updated by the sdk app when the project is created/opened.

How to use local genesys.js build

There are 2 ways to use a local genesys.js build in downstream projects:

| Method | Best for | Workflow overhead | |--------|----------|-------------------| | Tarball | Testing release-like builds, CI | Re-pack + re-install on each change | | Symlink | Active development | Build engine only, no downstream changes |

Local tarball

  1. In genesys.js, run pnpm run pack — builds and generates genesys.js-{version}.tgz in the root.
  2. In downstream project, run:
    pnpm add file:/path/to/genesys.js-{version}.tgz --force
  3. Repeat both steps whenever the engine code changes.

Local symlink (recommended for development)

  1. In genesys.js, run pnpm build to compile.
  2. In downstream project, update package.json:
    "genesys.js": "link:/path/to/genesys.js"
  3. Run pnpm install to create the symlink.
  4. On subsequent engine changes, only pnpm build in genesys.js is needed — the downstream project picks up changes automatically via the symlink.

Workflow for testing a genesys game WITHOUT the editor

  1. Install genesys sdk CLI: pnpm add -g genesys.sdk
  2. In the game project, run genesys-sdk build && pnpm dev This builds the game in the same way as the sdk launcher and run a local dev server to serve the game content via https. You can incorporate the local tarball/symlink engine into this flow to test engine changes.
  3. This workflow is suitable for those focusing on the game/engine code without too much dependency on the editor features.

Roadmap

See https://www.notion.so/TODO-LIST-1d6bf732b9bf8050a7acc1707dbf4c5e

References

  • https://fly.pieter.com/
  • https://x.com/levelsio/status/1893385114496766155
  • https://dev.hytopia.com/
  • https://playcanvas.com/
  • https://www.meshy.ai/
  • https://www.tripo3d.ai/