From 9a5988e7c85aaeb7053c6ece9b37333f46012025 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Mon, 18 May 2015 11:44:26 +0200 Subject: [PATCH] Optimisation of clearing canvases --- static/js/prototype/Previewer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/prototype/Previewer.js b/static/js/prototype/Previewer.js index 760856f..4211183 100644 --- a/static/js/prototype/Previewer.js +++ b/static/js/prototype/Previewer.js @@ -46,6 +46,10 @@ Previewer.prototype.render = function(prev, container_width, container_height) { this.renderer.setViewport(left, bottom, width, height); this.renderer.render(scene, prev.camera); + if (!this.fixed) { + this.clearNeeded = true; + } + } else if (this.fixed) { this.clearNeeded = true; } }