Optimisation of clearing canvases

This commit is contained in:
Thomas FORGIONE 2015-05-18 11:44:26 +02:00
parent 964482afcd
commit 9a5988e7c8
1 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,10 @@ Previewer.prototype.render = function(prev, container_width, container_height) {
this.renderer.setViewport(left, bottom, width, height); this.renderer.setViewport(left, bottom, width, height);
this.renderer.render(scene, prev.camera); this.renderer.render(scene, prev.camera);
if (!this.fixed) {
this.clearNeeded = true;
}
} else if (this.fixed) {
this.clearNeeded = true; this.clearNeeded = true;
} }
} }