FPS-style movement/camera controller for my experimental branch of voxeljs.
This module abstracts the connection between inputs and
player/camera movement. It takes a state object full of truthy values
representing inputs (
jump, etc.), and manipulates a rigid body
in the physics engine (such as this one).
It also consumes
dy values from the state object and controls
a camera, via passed-in accessor functions.
The module was made to work with voxeljs, but doesn't take references to any core parts of the engine, and can be used with other game engines, such as noa-hello-world.
(For voxel.js, this module conceptually sort of combines (and is based on) game-shell-fps-camera, and voxel-controls, bit it removes the stream-like behavior, and depends on a more general kind of physics engine.)