Examples
import { EulerIntegrator2DPlugin } from '@wimaengine/integrator'
app.registerPlugin(new EulerIntegrator2DPlugin())
// Position2D is advanced from Velocity2D during Update.Function
updatePositionEuler2D(world: World): voidAdvances each matching 2D position with its linear velocity.
EulerIntegrator2DPlugin registers this exact function directly in the
repeating AppSchedule.Update schedule. The registration does not specify a system
group, so the schedule’s default group is used.
The query requires Position2D and Velocity2D, in that
order. For each matching entity, the system adds each velocity coordinate
multiplied by the fixed 1 / 60 step to the existing position and writes
the result back into that same Position2D component. Velocity is
read but not cleared or replaced. Entities missing either component are
skipped, and the system does not read Time.delta or
VirtualClock.
import { EulerIntegrator2DPlugin } from '@wimaengine/integrator'
app.registerPlugin(new EulerIntegrator2DPlugin())
// Position2D is advanced from Velocity2D during Update.