Class
VerletIntegrator2DPlugin
View sourceExtendsPlugin
Adds fixed-step 2D Verlet integration to an App.
Use this plugin when an application needs 2D position, velocity, and angular
values to advance with fixed-step Verlet integration. It processes
Position2D, Velocity2D, Acceleration2D,
Orientation2D, Rotation2D, and Torque2D with a
fixed 1 / 60 step.
Examples
import { App } from '@wimaengine/app'
import { CorePlugin } from '@wimaengine/core'
import { HierarchyPlugin } from '@wimaengine/hierarchy'
import { MathPlugin } from '@wimaengine/math'
import { Movable2DPlugin } from '@wimaengine/movable'
import { ReflectPlugin } from '@wimaengine/reflect'
import { Transform2DPlugin } from '@wimaengine/transform'
import { VerletIntegrator2DPlugin } from '@wimaengine/integrator'
new App()
.registerPlugin(new ReflectPlugin())
.registerPlugin(new CorePlugin())
.registerPlugin(new MathPlugin())
.registerPlugin(new HierarchyPlugin())
.registerPlugin(new Movable2DPlugin())
.registerPlugin(new Transform2DPlugin())
.registerPlugin(new VerletIntegrator2DPlugin())
.run()Constructor
Methods
register(app: App): void
View sourceEnables fixed-step 2D Verlet integration for an App. Position,
velocity, and angular values advance with the fixed 1 / 60 step.
requires(): TypeId[]
View sourceReturns the plugin IDs required for 2D Verlet integration.
The app must already have CorePlugin, Movable2DPlugin,
and Transform2DPlugin registered. Registering this plugin does
not install those dependencies automatically.
