Gijs Posted July 30, 2017 Share Posted July 30, 2017 Hi, On Firefox the camera stops rotating when your pointer leaves the canvas: http://playground.babylonjs.com/ Which doesn't happen on Edge, IE, Chrome or Opera Quote Link to comment Share on other sites More sharing options...
jerome Posted July 30, 2017 Share Posted July 30, 2017 I suppose this is how each vendor wants to implement the security in his browser : can the active browser window still read the pointer events (and coordinates) when this one's outside it ? Although I like Chrome as a Linux user, because it's the fastest browser for WebGL on this platform, I'm not sure that I prefer that it can still access the pointer events when it's outside the window ... Quote Link to comment Share on other sites More sharing options...
Gijs Posted July 30, 2017 Author Share Posted July 30, 2017 Never mind, I found the solution after all: canvas.addEventListener('mousedown', function(event){ event.target.setCapture(); }); Thanks for your input @jerome The events are only still received when you keep holding down the mouse button as you move outside the canvas Edit: apparently it's not a cross-browser thing, so you can't use the snippet above like that Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.