Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add background picture #59

Open
wants to merge 52 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
59a7790
update readme
PavelDoGreat Aug 27, 2017
4454fd1
remove redundancy
PavelDoGreat Aug 29, 2017
2be97a8
add screenshot
PavelDoGreat Aug 30, 2017
14379aa
update readme
PavelDoGreat Aug 30, 2017
ed04523
little refactoring
PavelDoGreat Sep 3, 2017
9aea4da
Merge branch 'master' of https://github.com/PavelDoGreat/WebGL-Fluid-…
PavelDoGreat Sep 3, 2017
08337a8
make image smaller
PavelDoGreat Sep 3, 2017
c832389
optimization
PavelDoGreat Nov 23, 2017
4760827
refactoring
PavelDoGreat Nov 24, 2017
3bb1955
fix cache
PavelDoGreat Nov 24, 2017
bf85e5f
experiment with ga
PavelDoGreat Nov 29, 2017
2303251
change extensions initialization and update ga
PavelDoGreat Nov 30, 2017
13f2b94
improve checking rendering to texture support
PavelDoGreat Dec 1, 2017
42433d7
improve render target creation, fix safari alpha dissipation, small r…
PavelDoGreat Jan 26, 2018
a9d20ca
tweak analytics
PavelDoGreat Jan 27, 2018
064404a
fix strange bug, when velocity texture is drawed instead of density, …
PavelDoGreat Feb 4, 2018
f00b8eb
experimenting with meta tags
PavelDoGreat Mar 27, 2018
a0c7330
update meta tags
PavelDoGreat Jun 7, 2018
50228a2
add link to my new app
PavelDoGreat Oct 14, 2018
759333b
huge update
Dec 23, 2018
b0e913f
cleaning
Dec 23, 2018
2594ce1
update link
Dec 23, 2018
ba1c07e
fix
PavelDoGreat Dec 24, 2018
e41ed80
pause, transparency, background color, take screenshot
Jan 6, 2019
ffc6914
very professinal seo
PavelDoGreat Mar 15, 2019
53eb1c8
add discord link
Mar 31, 2019
176ba83
add bloom effect
May 18, 2019
49d6de7
reduce dithering
May 18, 2019
d20a9bb
update images
May 18, 2019
fc9b271
Add background color to html tag
Jun 13, 2019
8c52823
Merge pull request #13 from megasmack/add-background-color
PavelDoGreat Aug 6, 2019
c74dfed
so many changes, don't have time to explain them here
Aug 6, 2019
9423aa0
Update README.md
PavelDoGreat Aug 6, 2019
fba226e
little bit of perfection
PavelDoGreat Aug 6, 2019
f96cd91
perfect 😅
PavelDoGreat Aug 6, 2019
4223ee0
😭
PavelDoGreat Aug 6, 2019
2d86a9f
fix excessive initialization because of pixel ratio multiplication
Aug 7, 2019
d2d1497
fix capture at high quality
Aug 8, 2019
b6e9825
best update
Aug 25, 2019
2240ab2
greatupdatewhaterversr
Aug 25, 2019
3c36a98
fix my brain is not working
Aug 26, 2019
2ca3e06
fix touches
Aug 26, 2019
c6096ec
Create FUNDING.yml
PavelDoGreat Aug 28, 2019
d28b740
improve touch handling
Aug 31, 2019
2043a4f
wth
Aug 31, 2019
9ad0744
I can't figure this out
Aug 31, 2019
ab1ca45
simplification
PavelDoGreat Sep 2, 2019
93cad8a
add promo popup for mobile users
Mar 31, 2020
bfb4636
blit refactoring
May 29, 2020
54ed78b
can't figure this out rn, would come later
May 29, 2020
88a7314
Update README.md
pbrubaker Mar 12, 2023
a2d2929
Merge pull request #91 from pbrubaker/main
PavelDoGreat Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://play.google.com/store/apps/details?id=games.paveldogreat.fluidsimfree', 'https://apps.apple.com/app/fluid-simulation/id1443124993']# Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
Binary file added LDR_LLL1_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
# WebGL-Fluid-Simulation
# WebGL Fluid Simulation

[Play here](https://paveldogreat.github.io/WebGL-Fluid-Simulation/)

<img src="/screenshot.jpg?raw=true" width="880">

## References

https://developer.nvidia.com/gpugems/gpugems/part-vi-beyond-triangles/chapter-38-fast-fluid-dynamics-simulation-gpu

https://github.com/mharrys/fluids-2d

https://github.com/haxiomic/GPU-Fluid-Experiments

## License

The code is available under the [MIT license](LICENSE)
Binary file added app_badge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 13 additions & 2 deletions dat.gui.min.js

Large diffs are not rendered by default.

Binary file added gp_badge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified iconfont.ttf
100644 → 100755
Binary file not shown.
174 changes: 161 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,44 @@
<html>
<head>
<meta charset="utf-8">
<title>Fluid Simulation</title>
<meta http-equiv="Cache-Control" content="no-cache">

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">

<link rel="apple-touch-icon" href="logo.png">
<link rel="icon" href="logo.png">

<title>WebGL Fluid Simulation</title>
<meta name="description" content="A WebGL fluid simulation that works in mobile browsers.">

<meta property="og:type" content="website">
<meta property="og:title" content="webgl fluid simulation">
<meta property="og:title" content="Webgl Fluid Simulation">
<meta property="og:description" content="A WebGL fluid simulation that works in mobile browsers.">
<meta property="og:url" content="https://paveldogreat.github.io/WebGL-Fluid-Simulation/">
<meta property="og:image" content="logo.png">
<meta property="og:image" content="https://paveldogreat.github.io/WebGL-Fluid-Simulation/logo.png">

<script type="text/javascript" src="dat.gui.min.js"></script>
<style>
@font-face {
font-family: 'iconfont';
src: url('iconfont.ttf') format('truetype');
}

* {
user-select: none;
}

html, body {
overflow: hidden;
background-color: #000;
}

body {
margin: 0;
position: absolute;
position: fixed;
width: 100%;
height: 100%;
}
Expand All @@ -38,20 +57,31 @@
overflow: visible;
}

@font-face {
font-family: 'iconfont';
src: url('iconfont.ttf') format('truetype');
}

.bigFont {
font-size: 150%;
color: #8C8C8C;
}

.cr.function.appBigFont {
font-size: 150%;
line-height: 27px;
color: #A5F8D3;
background-color: #023C40;
}

.cr.function.appBigFont .property-name {
float: none;
}

.cr.function.appBigFont .icon {
position: sticky;
bottom: 27px;
}

.icon {
font-family: 'iconfont';
font-size: 130%;
float: right;
font-family: 'iconfont';
font-size: 130%;
float: right;
}

.twitter:before {
Expand All @@ -61,16 +91,134 @@
.github:before {
content: 'b';
}

.app:before {
content: 'c';
}

.discord:before {
content: 'd';
}

.promo {
display: none;
/* display: table; */
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
overflow: auto;
color: lightblue;
background-color: rgba(0,0,0,0.4);
animation: promo-appear-animation 0.35s ease-out;
}

.promo-middle {
display: table-cell;
vertical-align: middle;
}

.promo-content {
width: 80vw;
height: 80vh;
max-width: 80vh;
max-height: 80vw;
margin: auto;
padding: 0;
font-size: 2.8vmax;
font-family: Futura, "Trebuchet MS", Arial, sans-serif;
text-align: center;
background-image: url("promo_back.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
border-radius: 15px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
}

.promo-header {
height: 10%;
padding: 2px 16px;
}

.promo-close {
width: 10%;
height: 100%;
text-align: left;
float: left;
font-size: 1.3em;
/* transition: 0.2s; */
}

.promo-close:hover {
/* transform: scale(1.25); */
cursor: pointer;
}

.promo-body {
padding: 8px 16px 16px 16px;
margin: auto;
}

.promo-body p {
margin-top: 0;
mix-blend-mode: color-dodge;
}

.link {
width: 100%;
display: inline-block;
}

.link img {
width: 100%;
}

@keyframes promo-appear-animation {
0% {
transform: scale(2.0);
opacity: 0;
}
100% {
transform: scale(1.0);
opacity: 1;
}
}
</style>
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-105392568-1', 'auto');
ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</head>
<body>
<canvas></canvas>

<!-- Mother of God, pls forgive me -->
<div class="promo">
<div class="promo-middle">
<div class="promo-content">
<div class="promo-header">
<span class="promo-close">&times;</span>
</div>
<div class="promo-body">
<p>Try Fluid Simulation app!</p>
<div class="links-container">
<a class="link" id="apple_link" target="_blank">
<img class="link-img" alt="Download on the App Store" src="app_badge.png"/>
</a>
<a class="link" id="google_link" target="_blank">
<img class="link-img" alt="Get it on Google Play" src="gp_badge.png"/>
</a>
</div>
</div>
</div>
</div>
</div>

<script src="./script.js"></script>
</body>
</html>
Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added promo_back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading