Forked from: zz85's Ink Like Fluid Test 1 View Diff (339)

Ink Like Fluid Test 2

zz85

License: MIT License

Fork
1
Fav
2
View
3690
  • Play

Fullscreen

Smart Phone

Fork tree

  • Readme
  • JavaScript 423 lines
  • HTML 1 lines
  • CSS 16 lines

Here's the rework of my eariler js fluid implementation

The main differences:

  • I switched back from an array of objects to parrallel arrays
  • Used Typed Arrays for these arrays
  • Used Typed Arrays with Canvas's image data
  • So, so what more optimized but could be more optimized.

What I can try next

  • Mixing different dyes
  • Using displacement map
  • GPGPU

References

Jos Stam's GDC03 paper, the source of many references online for fluid simulation code

However a little hard to read, so fluid for dummies might give a little explaination to the code.

Fortunately, Stam's has some presentation slides which is more useful for anyone to wish to understand the thinking behind his algorithms which is much easier for reading too.

Probably the better thing (which I only later on found out), was that there was accompanying source code. It kinds of re-checks my code for bugs, even though it was mostly lifted from his paper.

I dont claim to have done this really well. Oliver's simple fluid dynamics simulator is close but optimized port of Jos Stam's code.

  • Ink Like Fluid Test 2
  • Ink Like Fluid Test 2

play

Complete!

Description What kind of game?

Control Device

jsdo.it websocket controller

Mouse

keyboard

smartphone

Fullscreen

zz85

Author

learning and playing with visual effects with javascript!

twitter: http://twitter.com/blurspline github: https://github.com/zz85

Default Panel

Size

  • Width: px
  • Height: px

code

QR Code

Discussion

Questions on this code?

Tags

Favorite by

Forked

sort by