Live data from Hacker News

Web GL Ocean Simulation

david.li

1–10 of 138 posts

Re: Web GL Ocean Simulation

#5

The code is quite cool to look at. Love seeing the extensive use of matrices and mathematics to create such a beautiful and mesmerizing display. If anyone is interested in playing around with it, I threw it up at JSFiddle here: http://jsfiddle.net/zyAzg/ Excellent demo.

Great demo, well written code. Though reading through it also highlights that JS is not a great language for linear algebra. But I don't think anyone is really suggesting otherwise.

Re: Web GL Ocean Simulation

#9
> Your browser does not appear to support the required technologies.

It would've been nice to have an 'I don't care, proceed anyway' button. The check excludes Safari 7, which runs the demo just as well as Chrome.

http://jsfiddle.net/bYHfh

^ removes the hasWebGLSupport() invocation.

Very nice demo, though!

Re: Web GL Ocean Simulation

#10
post #4

Sorry if this is a dumb question, but how hard would it be to add a boat that realistically bobs up and down with the water?

Just calculate the boat's water displayment via some very approximate measure. Then use that to determine buoyancy relative to boat weight and just integrate that overtime and add some dampening to represent friction/inertia.

But there is a better way of doing interactive waves from a boat, wave particles:

http://www.cemyuksel.com/research/waveparticles/waveparticle...

Post reply on HN