Skip to main content

Overview

The system schematic scaffolds a new ECS system function for a NanoForge client or server part. The generated file includes the system function, a default export required for code generation, and an EDITOR_SYSTEM_MANIFEST required for the NanoForge editor to display and configure the system.

Usage

Options

Generated file

{directory}/{name}.system.ts

Editor manifest

The EDITOR_SYSTEM_MANIFEST export is required for the NanoForge editor to discover the system and wire it into the game loop.

System signature

Every NanoForge system follows the same function signature:
  • registry — the ECS registry; use registry.getZipper([...]) to query entities with specific components.
  • ctx — the application context; provides access to ctx.app, ctx.assets, and other engine services.

Examples

Generate a PhysicsSystem for the client:
Generate a JavaScript server system: