Class
Damping3DPlugin
View sourceExtendsPlugin
Adds scalar linear and angular damping to an App.
Register this plugin to provide Linear3DDamping and
Angular3DDamping resources and apply their values to matching 3D
motion components. It depends on CorePlugin,
ReflectPlugin, and Movable3DPlugin.
Examples
import { App } from '@wimaengine/app'
import { CorePlugin } from '@wimaengine/core'
import { Damping3DPlugin } from '@wimaengine/damping'
import { MathPlugin } from '@wimaengine/math'
import { Movable3DPlugin } from '@wimaengine/movable'
import { ReflectPlugin } from '@wimaengine/reflect'
new App()
.registerPlugin(new ReflectPlugin())
.registerPlugin(new CorePlugin())
.registerPlugin(new MathPlugin())
.registerPlugin(new Movable3DPlugin())
.registerPlugin(new Damping3DPlugin())
.run()Constructor
Methods
register(app: App): void
View sourceAdds the 3D damping resources to an App and enables damping for
matching 3D motion components.
The installed Linear3DDamping and Angular3DDamping
resources start with a value of 0.01. Their values are applied to
matching 3D linear and angular motion as the app updates.
requires(): TypeId[]
View sourceLists the plugins required by 3D damping.
The app must already have CorePlugin, ReflectPlugin,
and Movable3DPlugin registered. Registering this plugin does not
install those dependencies automatically.
