max-mapper / voxel-engine

3D HTML5 voxel game engine
http://maxogden.github.com/voxel-engine
BSD 3-Clause "New" or "Revised" License
1.29k stars 220 forks source link

How to check whether or not the mouse pointer is locked in game or not. #129

Closed joemars305 closed 7 years ago

joemars305 commented 7 years ago

Thanks in advance for your answer.

haitaoli commented 7 years ago

If you haven't found the answer yet, you can listen to pointerlockchange event: https://developer.mozilla.org/en-US/docs/Web/Events/pointerlockchange