Examples
import { EulerIntegrator2DPlugin } from '@wimaengine/integrator'
app.registerPlugin(new EulerIntegrator2DPlugin())
// The orientation system runs during the app's Update schedule.Function
updateOrientationEuler2D(world: World): voidComputes a 2D orientation step from each matching angular rotation.
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 Orientation2D and Rotation2D, in that
order. For each matching entity, the system creates a rotary increment
from rotation.value * (1 / 60) and passes it to
Orientation2D#multiply. The returned rotary value is ignored by
the current implementation, so this function does not write a new
orientation back in place; it also leaves Rotation2D unchanged. Entities
missing either component are skipped. The step is fixed at 1 / 60; the
system does not read Time.delta or
VirtualClock.
import { EulerIntegrator2DPlugin } from '@wimaengine/integrator'
app.registerPlugin(new EulerIntegrator2DPlugin())
// The orientation system runs during the app's Update schedule.