Skip to content

Record swift-sprite's upstream work for the Sprites design - #41

Merged
colemancda merged 2 commits into
masterfrom
feature/sprites-upstream-status
Dec 3, 2026
Merged

colemancda merged 2 commits into
masterfrom
feature/sprites-upstream-status

Conversation

@colemancda

@colemancda colemancda commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Sprites.md described swift-sprite's changes as still to come. They're done, in PureSwift/swift-sprite #59 to #68. This updates the design to match. In two places it differs from what the design said:

  • The main actor: the design said to drop @MainActor. SpriteGraph instead takes it as the module's default isolation, which an Embedded build leaves out, so the public API is the same on every other platform.
  • Weak references: the design said a child keeps an unowned(unsafe) parent. A node instead keeps a lifetime that it marks when it's freed. A parent, listener, emitter target or constraint reference reads it, so they turn nil as weak references do.

Also recorded:

  • name patterns without Regex in an Embedded build
  • the moveToView(ofSize:) / moveFromView() hooks
  • that Physics2D matches Box2D bit for bit, with its benchmark still to run

The roadmap item now says the upstream work is done and Packages/Games is next.

@colemancda
colemancda merged commit 118e6d6 into master Dec 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant