Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a water physics engine for javascript?

I want to make a demo using javascript and <canvas>, I was thinking of doing a little moving creature, seen from the top and swimming in a water environment.

Concept "art" : enter image description here

Is there something I can use to start this project, or do I need to create everything from scratch ?

like image 266
Manu Avatar asked Jun 20 '11 13:06

Manu


People also ask

What is ammo JS?

ammo. js is a direct port of the Bullet physics engine to JavaScript, using Emscripten. The source code is translated directly to JavaScript, without human rewriting, so functionality should be identical to the original Bullet.

What is the use of matter JS library?

Matter. js is a 2D rigid body physics engine written in JavaScript. This library can help you easily simulate 2D physics in the browser. It offers a lot of features like the ability to create rigid bodies and assign physical properties like mass, area or density to them.

How is water related to physics?

In water, some of the heat energy is used to break the hydrogen bonds between molecules. When water cools, hydrogen bonds reform, and heat is released. Because of its high specific heat, liquid water can store a lot of energy, a property that has significant consequences for Earth's climate and biological life.


2 Answers

Here's one demo http://code.almeros.com/code-examples/water-effect-canvas/

like image 126
mrBorna Avatar answered Oct 19 '22 13:10

mrBorna


http://rumpetroll.com/ is open source and has the kind of movement you could probably modify to do as you wanted

like image 25
Alex Avatar answered Oct 19 '22 15:10

Alex