diff --git a/src/RenderWebGL.js b/src/RenderWebGL.js index 4e09f11..69e408e 100644 --- a/src/RenderWebGL.js +++ b/src/RenderWebGL.js @@ -1454,7 +1454,12 @@ class RenderWebGL extends EventEmitter { twgl.bindFramebufferInfo(gl, skin._framebuffer); // Limit size of viewport to the bounds around the stamp Drawable and create the projection matrix for the draw. - gl.viewport(240 + bounds.left, 180 - bounds.top, bounds.width, bounds.height); + gl.viewport( + (this._nativeSize[0] * 0.5) + bounds.left, + (this._nativeSize[1] * 0.5) - bounds.top, + bounds.width, + bounds.height + ); const projection = twgl.m4.ortho(bounds.left, bounds.right, bounds.top, bounds.bottom, -1, 1); // Draw the stamped sprite onto the PenSkin's framebuffer.