Examples
import { World } from '@wimaengine/ecs'
import { createMovable3D } from '@wimaengine/movable'
const world = new World()
world.spawn(createMovable3D())Function
createMovable3D(): [Position3D, Orientation3D, Scale3D, GlobalTransform3D, Velocity3D, Rotation3D, Acceleration3D, Torque3D]Creates an ordered 3D transform and motion component bundle.
The returned tuple is ready for World#spawn and contains, in
insertion order, Position3D, Orientation3D,
Scale3D, GlobalTransform3D, Velocity3D,
Rotation3D, Acceleration3D, and Torque3D.
Position defaults to (0, 0, 0), orientation defaults to the identity,
scale defaults to (1, 1, 1), and all motion components default to zero.
import { World } from '@wimaengine/ecs'
import { createMovable3D } from '@wimaengine/movable'
const world = new World()
world.spawn(createMovable3D())