(resolution)
| 1610 | } |
| 1611 | |
| 1612 | function getResolution (resolution) { |
| 1613 | let aspectRatio = gl.drawingBufferWidth / gl.drawingBufferHeight; |
| 1614 | if (aspectRatio < 1) |
| 1615 | aspectRatio = 1.0 / aspectRatio; |
| 1616 | |
| 1617 | let min = Math.round(resolution); |
| 1618 | let max = Math.round(resolution * aspectRatio); |
| 1619 | |
| 1620 | if (gl.drawingBufferWidth > gl.drawingBufferHeight) |
| 1621 | return { width: max, height: min }; |
| 1622 | else |
| 1623 | return { width: min, height: max }; |
| 1624 | } |
| 1625 | |
| 1626 | function getTextureScale (texture, width, height) { |
| 1627 | return { |
no outgoing calls
no test coverage detected