From 90d84672812bb86b71c3154846f08787f20e493a Mon Sep 17 00:00:00 2001 From: Someon1e <142684596+Someon1e@users.noreply.github.com> Date: Sat, 14 Sep 2024 20:04:53 +0100 Subject: [PATCH] Fix overview example --- docs/learn/overview/first-jecs-project.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/learn/overview/first-jecs-project.md b/docs/learn/overview/first-jecs-project.md index ea79cf2..94a9744 100644 --- a/docs/learn/overview/first-jecs-project.md +++ b/docs/learn/overview/first-jecs-project.md @@ -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 ``` @@ -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)) } ```