Three.js first person controls, adapted from https://github.com/mrdoob/three.js/blob/master/examples/js/controls/FirstPersonControls.js