Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Ib Green committed Apr 8, 2019
1 parent 2333a72 commit b1912ad
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions modules/addons/src/webvr/display-animation-loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ import {AnimationLoop} from '@luma.gl/core';
// This code could be folded into the core animation loop
export default class DisplayAnimationLoop extends AnimationLoop {
finalize() {
if (this.display) {
this.display.animationLoop = null;
this.display.finalize();
this.display = null;
}
this._setDisplay(null);
}

_setDisplay(display) {
// store anumation loop on the display
if (display) {
display.animationLoop = this;
}

if (!display && this.display) {
this.display.finalize();
this.display.animationLoop = null;
}

this.display = display;
}

Expand Down

0 comments on commit b1912ad

Please sign in to comment.