Skip to content

What is vgai?

vgai is a game engine built on Three.js, shipped together with a visual editor and a scaffolded game template — all in one monorepo. Its defining choice is the Object3D-as-truth model.

Most engines put a separate entity layer next to the renderer (an ECS, a scene-node wrapper, a “VNode” bridge). vgai does not. The Three.js Object3D you add to the scene is the entity. There is no parallel world to keep in sync.

Gameplay behavior is attached to an Object3D with a GameComponent — a small class with init / update / dispose methods (and optional onTriggerEnter / onTriggerExit). If something needs per-frame logic, it gets a GameComponent; if it is static scenery, a light, or UI, it stays a plain Three.js object with no component at all.

vgai deliberately avoids wrappers, adapters, or helper abstractions around its dependencies. You call the real APIs as documented:

  • Three.js for rendering and the scene graph.
  • Rapier for physics (rigid bodies, colliders, joints).
  • Colyseus for multiplayer (rooms + schema sync).

When you need something the engine doesn’t pre-package, you reach into the library directly through the GameContextctx.scene, ctx.rapierWorld, ctx.composer, and so on.

PackageWhat it is
packages/engineThe engine: game loop, GameComponent model, physics, scene loader + Zod schemas, animation, audio, input, networking.
packages/editorThe visual editor (viewport, inspector, hierarchy, asset browser, prefab system, visual UI editor) and its e2e suite.
packages/editor/templateThe scaffolded game project you build in. Example games live in src/examples/; the Colyseus server in server/.
packages/create-vgai-project, packages/vgai-cli, packages/editor-sdkScaffolding and CLI tooling.

The engine source is meant to be read and edited directly — it is not a black-box library.