Skip to content

Instantly share code, notes, and snippets.

@abulka
Last active May 17, 2020 11:49
Show Gist options
  • Save abulka/36818b7092c8be2e81eb8bf1758752c9 to your computer and use it in GitHub Desktop.
Save abulka/36818b7092c8be2e81eb8bf1758752c9 to your computer and use it in GitHub Desktop.
TodoMVC-ECS Optimising
engine.system('dirty-todoitems', ['data', 'dirty'], (entity, {data, _}) => {
// do something with entity and data
// ...
entity.deleteComponent('dirty') // important! remove dirty flag
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment