Skip to content

Commit d0434f4

Browse files
committed
Modified p5.Image.js to include a fallback incase
pInst._lastRealFrameTime; does not exist. Fixes gif animation on graphic issue.
1 parent 8e1810f commit d0434f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/image/p5.Image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ p5.Image = class {
344344
*/
345345
_animateGif(pInst) {
346346
const props = this.gifProperties;
347-
const curTime = pInst._lastRealFrameTime;
347+
const curTime = pInst._lastRealFrameTime || window.performance.now();
348348
if (props.lastChangeTime === 0) {
349349
props.lastChangeTime = curTime;
350350
}

0 commit comments

Comments
 (0)