Function: toDeviceGLRect()
ts
function toDeviceGLRect(rect, canvasCssHeight, pixelRatio, out?): ViewportRect;Experimental
Convert a CSS rect (top-left origin) to a device-px GL rect (bottom-left origin) the way three.js setViewport/setScissor do: flip against the CSS canvas height, scale by DPR, round.
Parameters
| Parameter | Type |
|---|---|
rect | Readonly<ViewportRect> |
canvasCssHeight | number |
pixelRatio | number |
out | ViewportRect |