updateVelocityEuler2D

View sourceupdateVelocityEuler2D(world: World): void

Advances each matching 2D linear velocity with its accumulated acceleration.

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 Velocity2D and Acceleration2D, in that order. Each matching velocity is updated in place with acceleration * (1 / 60), then the acceleration is reset to zero in place. Entities missing either component are skipped. This implementation uses the fixed 1 / 60 step in the source; it does not read Time.delta or VirtualClock.

Examples

import { EulerIntegrator2DPlugin } from '@wimaengine/integrator'

app.registerPlugin(new EulerIntegrator2DPlugin())
// Velocity2D entities are integrated during each Update pass.

Parameters

NameDescriptionDefault
world

Update world containing velocity and acceleration components.

—