MCPcopy Create free account
hub / github.com/microsoft/SandDance / getGLViewport

Function getGLViewport

docs/app/js/sanddance-app.js:81667–81678  ·  view source on GitHub ↗
(gl, _ref3)

Source from the content-addressed store, hash-verified

81665 return resolveLayerIndex1;
81666}
81667function getGLViewport(gl, _ref3) {
81668 var viewport = _ref3.viewport;
81669 var height = gl.canvas ? gl.canvas.clientHeight || gl.canvas.height : 100;
81670 var dimensions = viewport;
81671 var pixelRatio = (0, _core.cssToDeviceRatio)(gl);
81672 return [
81673 dimensions.x * pixelRatio,
81674 (height - dimensions.y - dimensions.height) * pixelRatio,
81675 dimensions.width * pixelRatio,
81676 dimensions.height * pixelRatio
81677 ];
81678}
81679function clearGLCanvas(gl) {
81680 var width = gl.drawingBufferWidth;
81681 var height = gl.drawingBufferHeight;

Callers 1

sanddance-app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected