From 88f5c1f1aa814e9d7604fd2d5de965412b51829c Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 22 Sep 2020 05:14:31 -0700 Subject: [PATCH] fix bug where resizes pause the animations --- src/app/components/OutfitCanvas.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/components/OutfitCanvas.js b/src/app/components/OutfitCanvas.js index 7cc0bf9..4fdfc76 100644 --- a/src/app/components/OutfitCanvas.js +++ b/src/app/components/OutfitCanvas.js @@ -68,14 +68,14 @@ function OutfitCanvas({ children, width, height }) { ); }, []); - // When the canvas resizes, resize all the layers, then a single bulk update. + // When the canvas resizes, resize all the layers. React.useEffect(() => { for (const handler of resizeListenersRef.current) { handler(); } - if (stage) { - stage.update(); - } + // NOTE: We don't bother firing an update, because we trust the ticker + // to do it on the next frame. (And, I don't understand why, but + // updating here actually paused all movies! So, don't!) }, [stage, width, height]); if (loading) {