Movable2DPlugin

View source

ExtendsPlugin

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


constructor()

Methods


register(app: App): void

View source

Enables 2D movable component support for an App.

Parameters

NameDescriptionDefault
app

App to configure.

—