I took the Pointerlock example from mrdoob (the creator of the famous three.js JavaScript library) and created a small prototype to showcase multiplayer and multiple viewport capabilities.