Skip to main content

NanoForge


npm versionnpm downloadsTests statusLast commitContributors

About

@nanoforge-dev/graphics-3d is NanoForge’s built-in 3D rendering library, powered by Three.js. It renders a Scene with a camera on a WebGPU canvas (WebGL2 fallback), once per engine tick, and exposes them on Context.graphics. Client-only. An app uses either graphics-2d or graphics-3d, not both.

Installation

Node.js 26 or newer is required. three is a peer dependency: install it next to the library, so the game and Three.js add-ons share one copy.

Example usage

Register Graphics3DLibrary on your client app:
Add Three.js objects to Context.graphics.scene. Three.js is re-exported from @nanoforge-dev/graphics-3d/three:

Contributing

Before creating an issue, please ensure that it hasn’t already been reported/suggested, and double-check the documentation.
See the contribution guide if you’d like to submit a PR.

Help

If you don’t understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don’t hesitate to ask questions in discussions.

Classes

Interfaces

Type Aliases

Variables