Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
() => now('frame'),
this.updateStats,
() => 2 * Math.PI * now('frame') / 1000,
t => this.simulateWalk(model, t),
get now() {
return (now('frame') / 1000) - this.model.startTime
}
() => 2 * Math.PI * now('frame') / 1000,
t => simulateWalk(model, t),
get playTime() {
const time = this.isPlaying
? this.currentTime + (now('frame') - this.playStartedAt)
: this.currentTime
return time >= this.endTime ? this.endTime : time
}
@computed get time() {
return mobxUtils.now(this.interval);
}
disposeOnUnmount(this, reaction(() => this.props.animate && now('frame'), this.update))
}
this.props.animate && disposeOnUnmount(this, reaction(() => now('frame'), this.update))
}
disposeOnUnmount(this, reaction(() => now('frame'), this.onAnimationFrame))
}
@computed get elapsedTime() {
if (this.isRunning) {
return now(TICK_INTERVAL) - this.startTime;
} else {
return 0;
}
}