@javelin/track
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-alpha.4 • Public • Published

@javelin/track

Track changes made to Javelin components.

Docs

https://javelin.games/ecs/change-detection/

API Example

import * as Track from "@javelin/track"
// ...
const p1 = component(Position)
const p2 = component(Position)
const changes = component(Track.ChangeSet)
// update p1 and write to ChangeSet
Track.set(p1, changes, "x", 123)
// apply changes to p2
Track.apply(changes, p2)
p2.x // 123

Package Sidebar

Install

npm i @javelin/track

Weekly Downloads

0

Version

1.0.0-alpha.4

License

MIT

Unpacked Size

77.6 kB

Total Files

61

Last publish

Collaborators

  • ericmcdaniel