10 ms·
Wow, that's crazy amazing. I've really enjoyed some of the WebGL stuff I've seen, I only wish there was a more natural way to control the camera angle...The cl
by cpfohl 15y ago
Wow, that's crazy amazing. I've really enjoyed some of the WebGL stuff I've seen, I only wish there was a more natural way to control the camera angle...The click and Drag thing drives me nuts.
- Pewpewarrows 15y agoUnfortunately there's no easy way to do that with the current state of JavaScript and WebGL. If you try to just translate raw mouse events into it you end up with lots of bugs related to the cursor reaching edges of the rendered area, browser window, or desktop in general. The ideal solution in my opinion is to just offer mouse capturing as a user-enabled permission on page load from a domain (kind of how geolocation works now). The user would see a bar near the top of the browser asking if they want to give control of their mouse to the website, with the option to always break-out of that control with some key (such as ESC).
- elisee 15y agoChrome devs are working on such an API. - Bug tracker: http://code.google.com/p/chromium/issues/detail?id=72754 http://code.google.com/p/chromium/issues/detail?id=72754 - Design doc: https://sites.google.com/a/chromium.org/dev/developers/design-documents/mouse-lock https://sites.google.com/a/chromium.org/dev/developers/desig...
- whichdan 15y agoIMHO, the following would be ideal: W = Forward S = Backward A = Turn Left D = Turn Right Q = Strafe Left E = Strafe Right That way, you don't need a mouse, and you only lose strafing by using the arrow keys.