From 1828852f4830d3ea968af04e24bbf2d52c11a6e2 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Fri, 26 Aug 2022 14:31:29 -0400 Subject: [PATCH] Reduced scene flicker when resizing --- js/component/scene.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/component/scene.js b/js/component/scene.js index e515fb9..ddb2cf5 100644 --- a/js/component/scene.js +++ b/js/component/scene.js @@ -65,6 +65,7 @@ beestat.component.scene.prototype.set_width = function(width) { this.camera_.updateProjectionMatrix(); this.renderer_.setSize(this.width_, this.height_); + this.renderer_.render(this.scene_, this.camera_); }; /** @@ -75,6 +76,9 @@ beestat.component.scene.prototype.set_width = function(width) { beestat.component.scene.prototype.decorate_ = function(parent) { const self = this; + // Dark background to help reduce apparant flicker when resizing + parent.style('background', '#202a30'); + this.debug_ = { 'axes': false, // 'directional_light_moon_helper': false,