Skip to content

Latest commit

 

History

History
74 lines (56 loc) · 2.81 KB

File metadata and controls

74 lines (56 loc) · 2.81 KB

Runtime Modules & APIs

This section lists primary exports for each runtime module. File paths are under src/runtime/.

For detailed API documentation, see the module-specific pages:

  • Engine & Config (engine.js): Core loop, configuration, and app instance.
  • Component System (component.js): Base class and registries for logic and archetypes.
  • Asset Loading (assetLoader.js): GLTF loading, scene composition, and budgeting.
  • Input (input.js): Composite input handling (Keyboard, Gamepad, Touch).
  • Physics (physics.js): Ammo.js integration, colliders, and raycasting.
  • Rendering (renderer.js): Three.js wrapper and retro post-processing.
  • UI System (uiSystem.js): HTML overlay management.
  • Audio (audioSystem.js): Simple audio playback with voice limits.
  • Scene (scene.js): Scene-scoped configuration (lighting, skybox).
  • Event System (eventSystem.js): Pub/Sub messaging and game loop phases.
  • Pooling (pool.js): Object pooling and prewarming.

Additional Modules

agent.js

  • export class Agent extends Component
  • AI/agent behavior component (ticks per frame).

characterController.js

  • export class CharacterController
  • Movement + ground checks; integrates with physics.

debug.js

  • export const Debug: Dev flags, HUD elements, CLI controls.
  • export class BudgetTracker: Tracks triangles, particles, UI tiles, RAM.

io.js

  • saveLocal(key, data), loadLocal(key, fallback)
  • downloadJSON(filename, data)
  • Utilities for saving/loading state.

loadingScreen.js

  • Default loading screen implementation.

navmesh.js

  • export class NavMesh extends Component
  • Navmesh ingestion and queries.

network.js / multisynq.js

  • export class NetworkSystem / MultisynqNetworkSystem
  • Multiplayer state replication and remote player management.

particleSystem.js

  • export class ParticleSystem
  • Particle emitters/effects with per-frame budgeting.

projectile.js

  • export class Projectile extends Component
  • Simple projectile logic.

raycaster.js

  • export class Raycaster extends Component
  • Recurring raycast queries (e.g., for sensors).

rigidbody.js

  • export class Rigidbody extends Component
  • Component wrapper for PhysicsWorld bodies.

skybox.js

  • export function createSkybox(camera, options)
  • Procedural gradient skybox helper.

statistic.js / statisticBar.js

  • Components for tracking and displaying values (health, mana, etc.).

volume.js

  • export class Volume extends Component
  • Trigger volumes (Enter/Exit/Stay events).