Skip to content

Commit

Permalink
Fix AnimationLoop drawing buffer resize (#1442)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Jan 24, 2021
1 parent 753d5ae commit 62811eb
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions modules/engine/src/lib/animation-loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ export default class AnimationLoop {

this._onMousemove = this._onMousemove.bind(this);
this._onMouseleave = this._onMouseleave.bind(this);
this._onSetupFrame = animationProps => {};
}

delete() {
Expand Down Expand Up @@ -357,15 +356,9 @@ export default class AnimationLoop {
}

_setupFrame() {
if (this._onSetupFrame) {
// call callback
this._onSetupFrame(this.animationProps);
// end callback
} else {
this._resizeCanvasDrawingBuffer();
this._resizeViewport();
this._resizeFramebuffer();
}
this._resizeCanvasDrawingBuffer();
this._resizeViewport();
this._resizeFramebuffer();
}

// Initialize the object that will be passed to app callbacks
Expand Down

0 comments on commit 62811eb

Please sign in to comment.