Skip to content

Commit

Permalink
Fixed issue #28
Browse files Browse the repository at this point in the history
  • Loading branch information
jobtalle committed Oct 15, 2020
1 parent b3d0052 commit 8172741
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/koi/weather/weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Weather.prototype.setState = function(state) {
this.applyState(state.lastState);
this.applyState(state.state);

this.transition = this.transitionPrevious = Math.min(1, state.time / (1 / this.TRANSITION_SPEED));
this.transition = this.transitionPrevious = Math.min(1, state.time * this.TRANSITION_SPEED);
this.filter.r = this.filterPrevious.r + (this.filterCurrent.r - this.filterPrevious.r) * this.transition;
this.filter.g = this.filterPrevious.g + (this.filterCurrent.g - this.filterPrevious.g) * this.transition;
this.filter.b = this.filterPrevious.b + (this.filterCurrent.b - this.filterPrevious.b) * this.transition;
Expand Down

0 comments on commit 8172741

Please sign in to comment.