Skip to content

Commit

Permalink
Merge pull request #6935 from kaiserarg/gifongraphicanimationfix
Browse files Browse the repository at this point in the history
Fix for gif not animating when drawing to p5.graphics
  • Loading branch information
davepagurek authored Apr 22, 2024
2 parents 1b074f2 + 249174f commit bcb77cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/image/p5.Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bcb77cf

Please sign in to comment.