{"id":15597249,"url":"https://github.com/topaz1008/canvas-fluid-solver","last_synced_at":"2025-10-08T06:38:18.554Z","repository":{"id":18247186,"uuid":"21399060","full_name":"topaz1008/canvas-fluid-solver","owner":"topaz1008","description":"Real-time fluid simulation in Javascript.","archived":false,"fork":false,"pushed_at":"2024-02-19T07:40:51.000Z","size":1070,"stargazers_count":52,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T00:41:24.706Z","etag":null,"topics":["canvas","fluid","fluid-dynamics","fluid-simulation","fluid-solver","physics","simulation"],"latest_commit_sha":null,"homepage":"http://topaz1008.github.io/canvas-fluid-solver","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/topaz1008.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-07-01T19:00:34.000Z","updated_at":"2025-02-22T05:19:01.000Z","dependencies_parsed_at":"2024-10-03T01:21:12.496Z","dependency_job_id":"e511cd54-bdd1-439d-85dc-9af0a4ccda34","html_url":"https://github.com/topaz1008/canvas-fluid-solver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/topaz1008/canvas-fluid-solver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topaz1008%2Fcanvas-fluid-solver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topaz1008%2Fcanvas-fluid-solver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topaz1008%2Fcanvas-fluid-solver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topaz1008%2Fcanvas-fluid-solver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/topaz1008","download_url":"https://codeload.github.com/topaz1008/canvas-fluid-solver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topaz1008%2Fcanvas-fluid-solver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278903014,"owners_count":26065785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canvas","fluid","fluid-dynamics","fluid-simulation","fluid-solver","physics","simulation"],"created_at":"2024-10-03T01:21:03.896Z","updated_at":"2025-10-08T06:38:18.538Z","avatar_url":"https://github.com/topaz1008.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"HTML5 Canvas Fluid Solver\n==========================\n\nA Simple fluid solver implementation in javascript.\n\nA live demo can be found [HERE](https://topaz1008.github.io/canvas-fluid-solver).\n\nThe demo uses [lil-gui](https://github.com/georgealways/lil-gui) for the GUI.\n\nSimulates the [Navier–Stokes](https://en.wikipedia.org/wiki/Navier-Stokes_equations) equations for incompressible fluids.\n\nLargely based on Jos Stam's paper [Real-Time Fluid Dynamics for Games](https://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf).\n\nThe density field is rendered on an off-screen bitmap and blit'ed to the canvas for performance reasons.\n\nThe code is commented as best I could where ever I felt it was necessary.\n\nThe best reference is the original paper which is still online and contains a very clear explanation of the solver and methods it uses. It also contains a complete C implementation of the solver.\n\nIf the original paper ever goes offline I have a copy of it [here](https://github.com/topaz1008/canvas-fluid-solver/blob/master/doc/GDC03.pdf).\n\nOther implementations I've looked at while making this. (these links are very old and are dead and/or insecure so proceed at you own risk)\n\n* [http://www.multires.caltech.edu/teaching/demos/java/stablefluids.htm](http://www.multires.caltech.edu/teaching/demos/java/stablefluids.htm)\n* ~~`http://blog.inspirit.ru/fluidsolver-as3-port-of-msafluid/`~~\n* ~~`http://http.developer.nvidia.com/GPUGems/gpugems_ch38.html`~~\n\nRunning\n---------\n\nJust open `index.html` in your browser or see the live demo [HERE](https://topaz1008.github.io/canvas-fluid-solver).\n\nWishlist\n---------\n* Add internal grid boundaries.\n* Maybe think about considering thinking about a 3D implementation ;)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftopaz1008%2Fcanvas-fluid-solver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftopaz1008%2Fcanvas-fluid-solver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftopaz1008%2Fcanvas-fluid-solver/lists"}