build-systems
Build a feature's ecs system-database — the real-time tick loop (systems the scheduler runs each frame). For real-time features only.
来源信息
- 仓库
- adobe/data
- 最近来源活动
- 2026年7月24日 01:18
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 12
- Forks
- 8
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- build-systems
- description
- Build a feature's ecs system-database — the real-time tick loop (systems the scheduler runs each frame). For real-time features only.
- input
- feature
- output
- feature
Create `ecs/system-database/system-database.ts`: `Database.Plugin.create({ extends:
Database.Plugin.combine(ComputedDatabase.plugin, scheduler), systems })` where the `systems`
map is declared **inline** (see `features/ecs/systems.md` — inline is required for `db` to be
typed and for system-name inference; a `systems/` folder is optional, only for extracted
per-frame body helpers).
- A system is a `SystemDeclaration`: `{ create, schedule?: { before?, after?, during? } }`.
`create(db)` runs once (capture queries / index handles / closures); the returned function
advances the world one tick. Return `void` for an init-only system (seeding entities).
- The step math lives in `data/`; each system reads store rows, calls the pure `data/` step,
writes back — via `db.store` (writable) for hot per-row work, or `db.transactions.*` for
discrete events. Iterate archetypes per `archetypes.md` (tail→head when destroying rows).
- Order under `schedule` (mirror the `data/` step's internal sequence); drive the loop by
combining `scheduler` (rAF), gated by the `schedulerState` resource.
**Only for real-time features** (games, sims) — turn-based features skip this phase entirely.
Comes after `build-computed`. The how is in the auto-loading `features/ecs/systems.md` rule.
在 GitHub 查看