Skip to content

Commit

Permalink
fix excessive initialization because of pixel ratio multiplication
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Dobryakov authored and Pavel Dobryakov committed Aug 7, 2019
1 parent 4223ee0 commit 2d86a9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let config = {
PRESSURE: 0.8,
PRESSURE_ITERATIONS: 20,
CURL: 30,
SPLAT_RADIUS: 0.4,
SPLAT_RADIUS: 0.25,
SPLAT_FORCE: 6000,
SHADING: true,
COLORFUL: true,
Expand Down Expand Up @@ -1348,5 +1348,5 @@ function getTextureScale (texture, width, height) {

function scaleByPixelRatio (input) {
let pixelRatio = window.devicePixelRatio || 1;
return input * pixelRatio;
return Math.floor(input * pixelRatio);
}

0 comments on commit 2d86a9f

Please sign in to comment.