Skip to content

Commit bcb77cf

Browse files
authored
Merge pull request #6935 from kaiserarg/gifongraphicanimationfix
Fix for gif not animating when drawing to p5.graphics
2 parents 1b074f2 + 249174f commit bcb77cf

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)