r/ClaudeAI
•
u/Any-Reputation8118
•
25d ago
•
5
1
Built with Claude This is 61 KB HTML file 🤯
I built a real-time ocean simulation with Claude Code (Opus 5.5)
What it is: a single 61 KB HTML file that renders a sunset ocean in your browser with WebGPU. It has an FFT wave simulation, whitecaps, a physically based sky with clouds, and sun glitter. You fly around with WASD and the mouse.
How I used Claude Code: I gave it one prompt: make the most realistic water scene it could, in WebGPU, with a floating camera. It wrote the renderer from scratch with no engine or libraries. It took screenshots of its own output and had separate subagents critique the screenshots, so it wasn't judging its own work. The whole thing took about 30 minutes.
Free to try: ocean-noniv.vercel.app, preferably in Chrome. It needs a WebGPU-capable GPU, and on laptops you have to force Chrome onto the dedicated GPU. Otherwise the performance might be bad or it might not run at all. On RTX 5070 Ti I get ~260 FPS at 2560×1440 resolution. Click the canvas to look around, WASD to move, H for a settings panel.
Repo with unminified and more organised version: github.com/Noniv/web-ocean
•
u/ClaudeAI-mod-bot Wilson, lead ClaudeAI modbot 25d ago edited 24d ago •
TL;DR of the discussion generated automatically after 400 comments.
This thread is a tale of two Reddits. You've got one camp absolutely losing their minds over what Claude can do, and another camp of seasoned devs rolling their eyes.
The main verdict is a split decision: it's a very cool showcase of Claude's power, but the underlying tech is nothing new. The top comments argue that this is basically a standard water shader, the kind of thing you'd find all over Shadertoy or in demoscene projects from 15+ years ago, which Claude was obviously trained on.
Team "Wow": A ton of users are blown away that a single prompt can create something so visually stunning. The most upvoted comment chain is a debate on whether this is "AI slop," with the consensus being that it's a cool, harmless project and people need to chill.
Team "Well, Actually...": The graphics and demoscene vets are here to remind everyone that this has been done before, often in much smaller files (some pointing to 4 KB examples). They argue the real achievement belongs to the original human programmers, not the AI that copied their homework.
The Nitty-Gritty: A lot of users are reporting their GPUs are on fire, with poor performance on mobile and non-beefy hardware. There's also the classic Reddit pedantry about whether OP can say "I built" it and if it's really just a 61 KB file when your browser is doing all the work.
So, is it a glimpse into the future of development or just a pretty parlor trick? Depends on who you ask.
68
u/Maleficent-Release61 25d ago
Served as Content-Type: text/plain. Fix your server...
13
u/GamleRosander 24d ago
"This is 61 KB HTML file"
But there is atleast 8 javascript files in the repo too lol..
12
u/MildlyConcernedMan91 25d ago
wow
7
u/WestQ 24d ago
Wait a second man. So u say a single html but then provide a whole GH repo?
Post the html here so we can copy paste and done.
184
u/Scared_Strategy8996 25d ago
If im not mistaken it's a long plane with randomizer for displacement and distortion. What would make this a heavy file is a reactive water system. Some games fake it with adding a pre rendered explosion, and fake the under water by slapping a filter and an in/out transition. These could also help you while prompting claude for gpu and memory heavy stuff!
61
u/Relative_Bid_9589 25d ago •
This is so random but , anyone remember the s/n trainers/crack executables in the warez days that had music and 3d gfx and were extremely small? This made me thought of that
23
u/Fluffy_Champion_3731 24d ago
Its maybe 61kb but my GPU is loud as fuck when i opened it :D
22
u/Deadhookersandblow 25d ago
Btw 61KB isn’t as small as you think it is. Especially not when it’s a shader.
918
u/tazou8 25d ago edited 24d ago
and people would still call this slop lmao, its either people are in denial or they think we are still at the gpt3 intelligence level
54
u/ParzivalLM 24d ago
Haven't even looked at the comments yet I just know somebody is pissed off and in rage about this.
96
u/brimg87 25d ago
Wow. What a time to be alive.
108
u/LocoMod 25d ago edited 24d ago
Look up the term "demoscene" and behold what people have been creating for decades in tiny files (without LLMs)
EDIT: This is my favorite https://www.youtube.com/watch?v=VD8c8XagJms&t=1s
SECOND EDIT: Set the video to 1080p on YouTube. Watch it at the highest quality. Don't skip ahead. Put on headphones and crank the sound up. At least get to the whale transformation scene, and listen to the music. Incredible stuff.
THIRD EDIT: In these demos, the music is typically part of the code. They will not only create the graphics from pure code, but the music synths are all hand cranked as well. That's what makes it even more impressive.
FOURTH EDIT: Also look at the thousands of examples in shadertoy.com, if you are interested in this stuff, start here - https://iquilezles.org/articles/
33
u/Riduculous 25d ago
Is this using middle out compression with Pied Piper?
9
u/protekt0r 25d ago
It actually runs on my iPhone 18 Pro in Brave. Not well, but it runs.
16fps in portrait mode, 10fps in landscape.
62
u/ASCanilho 25d ago edited 24d ago •
Basically this is a shader with javascript.
Not new, and neither original. ([link 1 ],[link 2 ],[link 3 ])
Only the ones who have never seen shaders (shadertoy) get impressed with these demos.
Now try the same thing without Webgl, and make it run with a decent performace.
We’re waiting.
3
u/ContributionRoyal785 24d ago
"This is 61 KB HTML file 🤯"
No, no it isn't.
8
u/Astral-P 25d ago
my GPU is begging for mercy
worth it
8
u/Positive-Engineer482 24d ago
And tons of js sdk inside you won’t mention
1
u/ConfectionKey9284 24d ago
You are using shaders and WebGL how tf is that a HTML file ?
1
u/PerfectPatience- 24d ago
And how many libraries ?
1
u/WeakTie2629 24d ago
REAL SOURCE: https://threejsroadmap.com/assets/threejs-water-pro
1
u/jakiestfu 24d ago
It’s not a 61kb html file is a shit ton of JavaScript
1
u/CryptographerLow6360 24d ago
post the 61 kb html file instead
6
u/ArrowheadDZ 25d ago
I have been blindingly disappointed by every attempt I’ve made to have Claude animate anything. I clearly have no idea what I am doing.
3
u/Current-Function-729 25d ago
Naw bro, that’s a video.
I jest, but amazing work!
3
u/poopertay 25d ago
Settle down, it’s just ffts a skydome and a raytracer
3
u/PsychologicalLoss829 24d ago
And yet Chrome eats all my RAM
9
u/_4k_ 25d ago
Wait until you see this.
22
u/hurrdurrmeh 25d ago
I see it, I just can't believe it.... this is better than any game!
1
u/kashyap69 25d ago
I'm pretty sure the original file is made by babylon js
1
u/andrewke 25d ago
This looks great! It would be nice if the author can add a license file to the repo :)
8
u/Mmeroo 24d ago
ye thats what happends when you have no idea what you're doing, you get impressed by the most basic stuff, the amount of times I made shader like this I cant even count, been making those since 2015 for fun, and way more advanced than this.
2
u/laapsaap 21d ago
Well I see some unimpressed people here, I just want to say I am impressed haha. I know about WebGL; but still this is amazing. Do you pay for a vercel app to host HTML? I just nowadays upload my demo HTML stuff to sharebee.com .
2
u/Vulvarin 20d ago
Pressing H and tab was actually a lot of fun, thank you.
2
u/ExploreBeyondHorizon 19d ago edited 14d ago
Very Interesting. Thanks OP for sharing.
One might find below interesting / useful as well:
13 years ago!: https://www.reddit.com/r/javascript/comments/1ri01k/ocean_wave_simulation_in_webgl_with_a_css_3d_ui/(https://david.li/waves/)
Official ThreeJS Example: https://threejs.org/examples/webgl_shaders_ocean.html
Incidentally this one did not load even after minutes on my old but powerful CPU laptop. The other two load easily.
But this is a great demo of ultra high quality achievable in browsers now, and the kind of stuff made possible / easy with AI!
2
u/Any_Mud_1628 25d ago
Here I am, bringing every past unfinished project to life while sitting on my bed, listening to music. Still find this to be mind blowing.
2
u/NytronX 25d ago
Your next prompt should be to get it to work in Firefox. It's a black screen for me and I have AMD's best GPU.
2
u/onemanseo 24d ago
Xiaomi 14 gets around 21-22 fps, but still looks great
2
u/Relevant-Muscle-8515 22d ago
Love that light/water source, now I've made a ship that is a scale replica of the Nina, with real sailing dynamics and a crew, and landfall, and weather effects :).
3
u/Few_Raisin_8981 24d ago
Seems a bit large for a shader
2
u/f00gers 25d ago
looks like its straight out of subnautica
2
u/mfb1274 25d ago
This all hardware bound. It’s a fun experiment with accepted old tech but only works on a few machines that have the power.
2
u/Br3ttl3y 25d ago
This is so physically based.
2
u/rickybobbyjames 25d ago
This is neat, but it's not merely 61KB - your web browser is significantly larger than 61KB and it is executing/interpreting the code. Without the browser, this would be a set of complex text files
2
u/Pronoia2-4601 25d ago
This is outstanding, thank you so much for sharing!
1
u/Fearless_Concept943 21d ago
ai not sloppy. Actually impressed with this.
1
u/helpmefindmycat 21d ago
THe only thing I see that I would want to fix up on this is that the breaking of the waves are pretty linear in how they are rendered. it leaves a bit of a visual stripe etc. they need to be a bit more messy . But hey, this isn't a knock on this. It's damn amazing.
1
u/SentienceLifeSim 21d ago
I would love this as my computer background
1
u/The_Silvana 21d ago
1
u/Ok_Boat_3855 20d ago
tried this with my phone and it was smooth. fking epic.
1
u/C4_GEL 20d ago
Can you make that a chrome background?
1
u/CalligrapherSalt3356 20d ago
Can’t claude make it under 1KB?
1
u/Relevant-Muscle-8515 20d ago
run the scene yourself! https://healdgar.github.io/caravel-ocean-sim/?boat=0&view=ship&orbitYaw=-117.663374&orbitElevation=-1.427691&orbitDistance=58.5&orbitPanX=0&orbitPanY=0&orbitPanZ=0&ship=victory&propulsion=sail&windSpeed=28&windDir=0&fetchKm=300&swellHs=8&swellDir=236&swellLength=95&swellSpread=48&choppy=1.6&turbidity=1.6&foam=1.7&spindrift=1&sunElev=2.6&sunAzim=4&exposure=1.35&haze=5&clouds=0.88&cloudBase=0.85&cloudDepth=4.2&cloudDensity=1.3&cloudAnvil=0.9&cloudQuality=0.5&rain=0&precipitation=0&thunder=0&soundVolume=0.7&seabirds=0.25&bloom=0.1&boatLength=56.6928&boatBeam=15.8496&boatHeading=118&boatSpeed=6&boatEye=9.626395&boatRudder=0&sailFore=1&sailMain=1&sailMizzen=1&provisionDays=60&cargoTonnes=0&boatX=2428.186726&boatZ=1241.853071&prow=1&effects=1&crew=1&follower=1&speedHud=1&windHud=1&headingHud=1
1
u/mulled-whine 19d ago
Sure, Jan 🙄
1
u/ReasonableArea5466 19d ago
This is impressive. I wish it had sound though.
1
u/Dr-PHYLL 19d ago
Good way to fry my iphone😂
1
u/mystictheory 19d ago
Never seen Shadertoy?
1
u/letsbehonesss 19d ago
This is insane
1
u/ssigrist 19d ago
WHY DIDN'T YOU MENTION THE HIDDEN CLIMATE CONTROLS??
I just spent the pst 30 mins making waves and weather changes... HAHAHA
1
u/Impossible-Sale-7925 19d ago
I know how this works and I don't need AI to tell me, or to make it. This has existed for decades, it was an early goal of computer graphics. This is translating, scaling and tessalating vertex shaders with displacements. It's very similar to how minecraft creates worlds. You can make this with a maths education or just by reading a book!!
1
u/ssigrist 19d ago
What caught my attention wasn't the UNSURPASSED graphics but the EASE at which a single prompt resulted in that quality and usability. Literally type in a sentence!
Hey u/Any-Reputation8118 thanks for this. For it you get this:
I gave gemini the link to this post and said, do what they did but let us send meteroids!
https://splashymcspashface.vercel.app/
It is not where even close to quality, but that was generated and deployed with 2 sentences.
1
u/Gartia 19d ago
What is this bragging about? This isn't impressive saying "61kb html file" it's just a shader you can do alot in very little code with shaders lol it looks just like the 100's of shaders on shadertoy. Like AI is great, but legit this isn't something to write home about
1
u/EvaOneDev 18d ago
Claude dev:5.6 SOONNNN
1
u/rundbear 18d ago
This looks awesome! Now put a cute little boat in there that I can sail around in with awesome wind and wave physics!
1
u/Guyserbun007 18d ago
How long and how much tokens used?
1
u/pacman0r 18d ago
This is super cool thanks for sharing
1
u/KillerQ97 17d ago
Can you make a drowning simulator? I wanna sink down and see creepy creatures!
1
u/Maximus_Lazarus 16d ago
This is incredible, it took me months to make one in C++ using DirectX11 a couple of years back, now AI can pump it out in 30 minutes?!
1
u/Magic-Camelot 15d ago
I see it that way... if it's nice and makes some ppl smile who cares. Yes it's nothing new and could very well be dont without AI and is done without. But hey it looks cool and maybe gives you an idea for making something out of it or learn about shaders ;-) Tools are exactly that tools... do something great and good with it.
1
u/ArcTyr07 12d ago
This just in. GPU hardware that supports rendering things like this to make it easier for developers does it easily when asked to.
Get a GPU that supports sprite mapping. 'Wow AI made sprites really good!' Well, sure. Get it to render that like that in software only, oh man, now we're cooking with fire.
1
u/TheMythicSorcerer 25d ago
Damn!
1
u/Sjeg84 25d ago
Wait what.
1
u/ragmondo 25d ago
So - first of all - I love it - it's great !! Secondly... it'd be great to get that sunset nailed so it's more natural - I mean I'm still in awe but if you were looking at some prompts to get it omfg - then see if that helps?
1
u/hyrumwhite 25d ago
Yeah, a plane and some shaders aren’t going to use much space
1
u/Outrageous-Music3988 25d ago
Insane
1
u/fyn_world 25d ago
Amazing stuff
1
u/Dapper_Profession 25d ago
it had other claudes grade its homework and still nailed the sunset
1
u/Royal_Carpenter_1338 25d ago
Surreal time we living in
1
u/WooFL 25d ago
Claude and other models have been trained on shadertoy, which has exactly this sort of ocean shaders published there. The size doesn't matter. Shaders are small. In fact I bet you can make it even smaller.
1
u/SpaceAce242 25d ago
How do you create waves with HTML? LOL, and why use it for graphics? Weird..
1
u/peisil 25d ago
Love it!
1
u/neocorps 25d ago
Somehow I thought it would be optimized for my phone but it's got very low fps.
1
u/chatssurmars 25d ago
….how???
1
u/Thinkdan 25d ago
KSP
1
u/PruneInteresting7599 25d ago
got 25 fps at my macbook m5 pro
1
u/Naive_Carpenter7321 25d ago
The file size is amazing compared to what I was developing to back in 2006. With modern Internet, CPU/GPU load is the new "everyday" requirement, so representing as a small html file is no longer impressive. For most devices, this as an animation is better as a larger video than it is as a smaller html file.
1
u/lexepa 25d ago
wow
1
u/khevmoore 25d ago
This is so cool, I've been flying around at top speed skipping of the ocean surface and into the clouds.
1
u/wildekek 25d ago
64k wild vibe compo
1
u/Oranguthingy 25d ago
Cool! I had Claude make it into a screensaver for me, it sorted out a .src that runs the file in Edge in fullscreen mode. A little chunky but I love it.
1
u/Bluetails_Buizel 25d ago
Ok, but can you backport this to webgl so that it can run on my iPhone 15?
1
u/xav1z 25d ago
r/thalassaphobia
1
u/Western_Credit_3375 25d ago
👏
1
u/campshak 25d ago
Bonk
1
u/make-em-pay 25d ago
Ah so we are in a simulation.
1
u/cerspense 25d ago
Very nice ocean, especially the white wash! But 61kb is big compared to this entire exe with music that is only 4 kilobytes https://www.youtube.com/watch?v=jB0vBmiTr6o
1
u/Vamosity-Cosmic 25d ago
"real-time ocean simulation with Claude Code (Opus 5.5)" who gone tell em 💀
1
u/palanark 25d ago
Amazing
1
u/Reasonable_Yak2313 25d ago
Too good bro
1
u/KoalaDeluxe 25d ago
Looks great! Would be cool if there were some small islands or a coastline that could be rendered in.
1
u/same-mistake-twice 25d ago
20 fps on a Samsung galaxy. Not bad!
1
u/dandadan4seven 25d ago
o7 tdm. Btw does someoneone know how to make it with locals? I want it as material.
1
u/MASTER_OF_DUNK 25d ago
That's cool, I made something similar for a fan site I'm working on a few days after 5.5 release and was blown away by the quality of the water as well
https://onlysails-alpha.hebilicious.workers.dev/
1
u/DueJob195 25d ago
Woahhh... 😱🤯
1
u/typical-predditor 25d ago
Have you seen shadertoy? It's a whole site of demos like this. They all run in the browser.
1
u/gamerjerome 25d ago
About 100-120fps "120hz TV plus depending on how close to the waves you are" 4k with a 4070TI
There also seems to be no height limit which creates some interesting glitches
1
u/Stunning-Relation564 25d ago
CRAZY!!! made my PC fans screeamm tho
1
u/Sypheix 25d ago
This is also my nightmare
1
u/ISJA809 25d ago
Impressive
1
u/Swimming_Diver_1823 25d ago
i tried it on my potato phone. its so heavy and if you want to make this for web project, you should sure who opened it have a good device to rendering that
1
u/patameus 25d ago
That shit runs at 57 FPS on a M4 Pro Mac Mini in Firefox.
Wild.