Core

Feature

Pre-bind features: reusable slices that contribute a schema fragment and the schedules that operate on it.

A feature builds its schedules only after the final merged schema is bound, and its builder can only reach descriptors from its own fragment and from the features it requires.

Examples

const Combat = Schema.Feature.define("Combat", {
  schema: CombatSchema,
  requires: [Core],
  build: (Game) => ({ update: [Game.Schedule(Attack, Game.Schedule.applyDeferred())] })
})

const project = Schema.Feature.compose({ root: Root, features: [Core, Combat] })
const runtime = project.Game.Runtime.make({ services: project.Game.Runtime.services() })
runtime.tick(...project.schedules.update)

Variables

Functions

define

Source

Defines one pre-bind feature.

compose

Source

Composes features into one merged schema and one bound Game, then builds every feature against it.

Aggregated schedule order is the selected feature order, not dependency order. Run them with runtime.tick(...project.schedules.update).

Variables

Feature

Source

No description provided yet.