mirror of
https://github.com/PavelDoGreat/WebGL-Fluid-Simulation.git
synced 2025-10-04 01:41:53 +02:00
update
This commit is contained in:
@@ -8,7 +8,6 @@
|
|||||||
<meta property="og:title" content="webgl fluid simulation">
|
<meta property="og:title" content="webgl fluid simulation">
|
||||||
<meta property="og:url" content="https://paveldogreat.github.io/WebGL-Fluid-Simulation/">
|
<meta property="og:url" content="https://paveldogreat.github.io/WebGL-Fluid-Simulation/">
|
||||||
<meta property="og:image" content="logo.png">
|
<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>
|
<script type="text/javascript" src="dat.gui.min.js"></script>
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
@@ -73,6 +72,5 @@
|
|||||||
<body>
|
<body>
|
||||||
<canvas></canvas>
|
<canvas></canvas>
|
||||||
<script src="./script.js"></script>
|
<script src="./script.js"></script>
|
||||||
<p height="1px"></p>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@@ -584,7 +584,7 @@ canvas.addEventListener('touchmove', (e) => {
|
|||||||
pointer.x = touches[i].pageX;
|
pointer.x = touches[i].pageX;
|
||||||
pointer.y = touches[i].pageY;
|
pointer.y = touches[i].pageY;
|
||||||
}
|
}
|
||||||
}, false);
|
}, { passive: true });
|
||||||
|
|
||||||
canvas.addEventListener('mousedown', () => {
|
canvas.addEventListener('mousedown', () => {
|
||||||
pointers[0].down = true;
|
pointers[0].down = true;
|
||||||
@@ -603,7 +603,7 @@ canvas.addEventListener('touchstart', (e) => {
|
|||||||
pointers[i].y = touches[i].pageY;
|
pointers[i].y = touches[i].pageY;
|
||||||
pointers[i].color = [Math.random() + 0.2, Math.random() + 0.2, Math.random() + 0.2];
|
pointers[i].color = [Math.random() + 0.2, Math.random() + 0.2, Math.random() + 0.2];
|
||||||
}
|
}
|
||||||
});
|
}, { passive: true });
|
||||||
|
|
||||||
window.addEventListener('mouseup', () => {
|
window.addEventListener('mouseup', () => {
|
||||||
pointers[0].down = false;
|
pointers[0].down = false;
|
||||||
@@ -616,7 +616,3 @@ window.addEventListener('touchend', (e) => {
|
|||||||
if (touches[i].identifier == pointers[j].id)
|
if (touches[i].identifier == pointers[j].id)
|
||||||
pointers[j].down = false;
|
pointers[j].down = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
window.addEventListener("load", () => {
|
|
||||||
window.scrollTo(1, 0);
|
|
||||||
}, false);
|
|
Reference in New Issue
Block a user