Skip to content

Commit

Permalink
Fix overview example (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
Someon1e committed Sep 16, 2024
1 parent e957ca2 commit f2ab8e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/learn/overview/first-jecs-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ local Position = world:component()
local Velocity = world:component()
for id, position, velocity in world:query(Position, Velocity) do
world:set(id, Position, position += velocity)
world:set(id, Position, position + velocity)
world:set(id, Velocity, velocity * 0.9)
end
```
Expand All @@ -57,7 +57,7 @@ const Position = world.component()
const Velocity = world.component()

for (const [id, position, velocity] of world.query(Position, Velocity)) {
world.set(id, Position, position.add(velocity)
world.set(id, Position, position.add(velocity))
world.set(id, Velocity, velocity.mul(0.9))
}
```
Expand Down

0 comments on commit f2ab8e0

Please sign in to comment.