Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelDoGreat committed Aug 27, 2017
1 parent 5a83634 commit 4a5cad0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 0 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<meta property="og:title" content="webgl fluid simulation">
<meta property="og:url" content="https://paveldogreat.github.io/WebGL-Fluid-Simulation/">
<meta property="og:image" content="logo.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="text/javascript" src="dat.gui.min.js"></script>
<style>
* {
Expand Down Expand Up @@ -73,6 +72,5 @@
<body>
<canvas></canvas>
<script src="./script.js"></script>
<p height="1px"></p>
</body>
</html>
10 changes: 3 additions & 7 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ canvas.addEventListener('touchmove', (e) => {
pointer.x = touches[i].pageX;
pointer.y = touches[i].pageY;
}
}, false);
}, { passive: true });

canvas.addEventListener('mousedown', () => {
pointers[0].down = true;
Expand All @@ -603,7 +603,7 @@ canvas.addEventListener('touchstart', (e) => {
pointers[i].y = touches[i].pageY;
pointers[i].color = [Math.random() + 0.2, Math.random() + 0.2, Math.random() + 0.2];
}
});
}, { passive: true });

window.addEventListener('mouseup', () => {
pointers[0].down = false;
Expand All @@ -615,8 +615,4 @@ window.addEventListener('touchend', (e) => {
for (let j = 0; j < pointers.length; j++)
if (touches[i].identifier == pointers[j].id)
pointers[j].down = false;
});

window.addEventListener("load", () => {
window.scrollTo(1, 0);
}, false);
});

0 comments on commit 4a5cad0

Please sign in to comment.