[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] HI-DPI displays and WebGL issues

On Thu, Jun 21, 2012 at 11:14 AM, Mark Callow <callow_mark@hicorp.co.jp> wrote:
Don't the mouse events give the coordinates in css pixels?
Mouse events come in CSS pixels. A common case for using mouse coordinates is to generate picking rays. Depending on what you divide those coordinates to arrive at device normal coordinates, you might end up in trouble.

* Dividing by canvas style size: OK
* Dividing by canvas.width/height: Was OK, maybe break
* Dividing by drawingBufferWidth/Height: Was OK, maybe break