Repository navigation
ecs 0.2.3: World.Table and spawnTables, readonly: true; @adobe/ecs-gpu and @adobe/ecs-persistence publishable - #230
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…true in place of observer: true Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he guide's sync points chapter Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…clarations, and @adobe/ecs-persistence Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…blishable Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
ecs/from the ecs repository atb27a246(Adobe-Firefly/ecs#6).@adobe/ecs0.2.3:readonly: truereplacesobserver: true, with the same rules and the same behavior at runtime. The guide's systems chapter mentions it, and its sync points chapter spells it out.Worldis a namespace holdingcreate,joinandTable. The table types areWorld.Table,World.Table.ColumnandWorld.Table.Spawned.tableson a readonly system without components copies whole archetypes' columns;wherekeeps it to archetypes holding equal values of shared components.commands.spawnTables(tables, { resources?, existing? })spawns them as block copies, rewriting entity values by the reference traits, and sets resources;existingmaps rows to entities already in the world.Component.declarations(),Resource.declarations()andIndex.declarationOf(index)give each key's and index's declaration.small archetypes 1K7.74 → 6.90 ns a row) andup load(186 → 123 ms), with no benchmark slower. Two fixes, each with a test: a holder spawned with its owner in one sync point survives the owner's despawn no more, and spawned holders are journaled once.@adobe/ecs-persistence0.0.1, a new package, publishable:persist, a trait;snapshot({ world, ...selection }), bywith,notandwhereon shared components, or arootand what it owns;encodeanddecode, a binary format whose columns are viewed in place on decode;spawn({ world, snapshot, entities?, match? }), wherematchmerges a snapshot's entities into the world's by unique indexes;Snapshot, which is opaque,FailureandSpawned.At 1M entities, a snapshot takes about 6 ms, encode about 5 ms, decode about 0 ms, spawn about 167 ms, and a merge matching every entity 439 ms. One chunk of 10K among 1M snapshots by
wherein 0.13 ms and spawns back in 1.8 ms.@adobe/ecs-gpuis publishable as 0.0.1, and its typecheck leaves out its vitest config.The guide has a section per library, with chapters for ecs-gpu and ecs-persistence.
pnpm-workspace.yamllists the new packages, and the lockfile takes their entries (format v6). Nothing outsideecs/uses what changed.From a clean state,
check:workspace,pnpm -r run typecheckandbuildpass locally, and so do every package's full suite, with a GPU andCIunset:ecsecs-persistenceecs-gpuecs-guideecs-todo-vanillajsecs-sample-browserecs-particles-webgpuecs-transfers-canvasecs-gpu-viewsecs-sample-browser's page test failed to build once in the full run and passed in two reruns.The next
pnpm run publish <otp>here publishes@adobe/ecs0.2.3,@adobe/ecs-gpu0.0.1 and@adobe/ecs-persistence0.0.1.🤖 Generated with Claude Code