Skip to content

Conversation

@RigidStudios
Copy link
Contributor

No description provided.

const world = new World({...});
const query = world.createQuery(Position, ANY(Velocity, NOT(Acceleration)));
query.forEach(entityId => {
query.items().forEach((entityId) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should swap the order of these; const entityId of query.iter() should come first as I know the syntax is not desired, but it will (for now) be the way we should be doing it for most cases.



### :material-function-variant: **`#!typescript public forEach(callback: (entityId: EntityId) => void): void`** { #forEach data-toc-label='forEach' }
### :material-function-variant: **`#!typescript public items(): void`** { #forEach data-toc-label='items' }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Items and iter are not equivalent.

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.

4 participants