From d0434f4d4f679b58efb565aaadb618b4395948f9 Mon Sep 17 00:00:00 2001 From: Brad Huang Date: Tue, 26 Mar 2024 22:09:29 -0400 Subject: [PATCH] Modified p5.Image.js to include a fallback incase pInst._lastRealFrameTime; does not exist. Fixes gif animation on graphic issue. --- src/image/p5.Image.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/image/p5.Image.js b/src/image/p5.Image.js index 38355135d8..b9188c4b44 100644 --- a/src/image/p5.Image.js +++ b/src/image/p5.Image.js @@ -344,7 +344,7 @@ p5.Image = class { */ _animateGif(pInst) { const props = this.gifProperties; - const curTime = pInst._lastRealFrameTime; + const curTime = pInst._lastRealFrameTime || window.performance.now(); if (props.lastChangeTime === 0) { props.lastChangeTime = curTime; }