Class
Movable2DPlugin
View sourceExtendsPlugin
Adds 2D movable component support to an App.
Register this plugin to make Velocity2D, Rotation2D,
Acceleration2D, and Torque2D available as movable
components.
It depends on CorePlugin, ReflectPlugin, and
MathPlugin. Registering Movable2DPlugin does not install
missing dependencies automatically. Use Movable3DPlugin when an
app needs the corresponding 3D components.
Examples
import { App } from '@wimaengine/app'
import { CorePlugin } from '@wimaengine/core'
import { MathPlugin } from '@wimaengine/math'
import { Movable2DPlugin } from '@wimaengine/movable'
import { ReflectPlugin } from '@wimaengine/reflect'
new App()
.registerPlugin(new ReflectPlugin())
.registerPlugin(new CorePlugin())
.registerPlugin(new MathPlugin())
.registerPlugin(new Movable2DPlugin())
.run()Constructor
Methods
register(app: App): void
View sourceEnables 2D movable component support for an App.
requires(): TypeId[]
View sourceReturns the plugin IDs required for 2D movable component support.
The app must already have CorePlugin, ReflectPlugin,
and MathPlugin registered. Registering this plugin does not
install them automatically.
