Skip to content
Caterpy edited this page Jan 11, 2021 · 2 revisions

The Input object supplies three default input methods.

  • FirstPerson - A camera that allows you to fly freely in first person view. Use WASDQE to move.
  • ModelRotate - The camera rotates around the [0,0,0] point. Click and drag or use touch controls to rotate the camera.
  • None - The default input method. The camera stays stationary.

All input handlers need all of these methods:

  • setAttributes(screen, camera) - responsible for passing data to the input handler.
    • screen - The Screen attached to the renderer.
    • camera - The Camera attached to the renderer.
  • setupMovement() - The method called during the renderer's setup() call.
  • update() - Called during every frame
export namespace Input {
    export { None };
    export { FirstPerson };
    export { ModelRotate };
}

This is outdated. Visit github pages for a updated version.

All pages contain a short description alongside a .d.ts snippet. If you have any issues or questions, feel free to open a new issue.

Clone this wiki locally