Skip to content

ecs 0.3.0: despawnWhere before its sync point, resource orderings, exclusive rows, idle sync points, trait watches, update on match - #250

Merged
krisnye merged 1 commit into
mainfrom
knye/ecs-0.3.0
Nov 1, 2026
Merged

krisnye merged 1 commit into
mainfrom
knye/ecs-0.3.0

Conversation

@krisnye

@krisnye krisnye commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

@adobe/ecs 0.3.0, @adobe/ecs-persistence 0.1.1, @adobe/ecs-gpu 0.0.3

Syncs ecs/ from the ecs repository at 41399c5 (Adobe-Firefly/ecs#9).

Closes #242, closes #243, closes #244, closes #245, closes #246, closes #247, closes #248, closes #249. 0.3.0 because despawnWhere changes meaning (#244); persistence and gpu republish against it.

New API, for review:

// #243: a system orders itself against every other leaf of its composite that accesses a resource
readonly before?: readonly (System<unknown> | Resource.Key)[];
readonly after?:  readonly (System<unknown> | Resource.Key)[];

// #242: Finalizer.changes watches by trait, and every component with chosen resources
watch?: readonly (Essential | Resource.Key | OwnTrait)[]
      | { readonly components: true | readonly (Essential | OwnTrait)[]; readonly resources: readonly (Resource.Key | OwnTrait)[] };

// #249: a matched row's saved components are written onto the entity it matches
commands.spawnTables(tables, { resources?, existing?, update?: boolean })
spawn({ world, snapshot, match?, update?: boolean, entities? })   // @adobe/ecs-persistence

Behaviour:

Performance: eight chained systems, 100 runs per sample:

Before After
one tier 538 ns 538 ns
8 tiers, no commands 717 ns 636 ns
8 tiers, 7 idle sync points 859 ns 713 ns

A tier boundary costs 14 ns (26 before), an idle sync point 11 ns (20). A 3-pass comparison of every node benchmark: loop tick add remove −8.5%; read run +3.7% and loop tick add remove again +3.9%, after removing allocations from building a schedule; the rest within noise on 10–12 alternating reruns.

Checks: from a clean state, check:workspace, build, typecheck and every package's full suite pass locally, with a GPU and CI unset: ecs 1766, ecs-persistence 77, ecs-guide 131, ecs-gpu 38, ecs-todo-vanillajs 65, ecs-sample-browser 13, ecs-particles-webgpu 2, ecs-gpu-views 1, ecs-transfers-canvas 1; and every other package here.

The next pnpm run publish <otp> here publishes @adobe/ecs 0.3.0, @adobe/ecs-persistence 0.1.1 and @adobe/ecs-gpu 0.0.3.

🤖 Generated with Claude Code

…re before its sync point, resource orderings, exclusive rows, idle sync points, trait watches, update on match

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment