From 983c7047610a554e1805503d621b7dbb0aba6e93 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Tue, 7 Mar 2017 11:19:39 -0500 Subject: [PATCH] Add stamping flag to make draw ignore visibility --- src/RenderWebGL.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/RenderWebGL.js b/src/RenderWebGL.js index 433fd09..5042ad5 100644 --- a/src/RenderWebGL.js +++ b/src/RenderWebGL.js @@ -935,7 +935,7 @@ class RenderWebGL extends EventEmitter { try { gl.disable(gl.BLEND); - this._drawThese([stampID], ShaderManager.DRAW_MODE.default, projection); + this._drawThese([stampID], ShaderManager.DRAW_MODE.default, projection, {isStamping: true}); } finally { gl.enable(gl.BLEND); } @@ -1045,8 +1045,8 @@ class RenderWebGL extends EventEmitter { const drawable = this._allDrawables[drawableID]; /** @todo check if drawable is inside the viewport before anything else */ - // Hidden drawables (e.g., by a "hide" block) are never drawn. - if (!drawable.getVisible()) continue; + // Hidden drawables (e.g., by a "hide" block) are not drawn unless stamping + if (!drawable.getVisible() && !opts.isStamping) continue; const drawableScale = drawable.scale;