Class
Transform2DPlugin
View sourceExtendsPlugin
Adds 2D transform support to an App.
Register this plugin to compute global transforms from each entity’s local
2D position, orientation, and scale values. Entities in a hierarchy inherit
their parent entities’ transforms. The plugin requires CorePlugin,
ReflectPlugin, and HierarchyPlugin.
Examples
import { App } from '@wimaengine/app'
import { CorePlugin } from '@wimaengine/core'
import { HierarchyPlugin } from '@wimaengine/hierarchy'
import { ReflectPlugin } from '@wimaengine/reflect'
import { Transform2DPlugin } from '@wimaengine/transform'
new App()
.registerPlugin(new ReflectPlugin())
.registerPlugin(new CorePlugin())
.registerPlugin(new HierarchyPlugin())
.registerPlugin(new Transform2DPlugin())
.run()Constructor
Methods
register(app: App): void
View sourceEnables 2D transform support for an App.
Entities with local 2D position, orientation, and scale values receive composed global transforms, and child entities inherit their parent’s transform through the hierarchy.
requires(): TypeId[]
View sourceDeclares the dependencies required by 2D transform support.
The app validates these dependencies and does not install them automatically.
