{"id":16323614,"url":"https://github.com/im-rises/particle-simulator-webgl","last_synced_at":"2025-10-25T20:31:10.136Z","repository":{"id":107335991,"uuid":"604946197","full_name":"Im-Rises/particle-simulator-webgl","owner":"Im-Rises","description":"1 000 000 particles at 60fps made in C++ using OpenGL build for WebAssembly WebGL2","archived":false,"fork":false,"pushed_at":"2023-06-25T19:36:17.000Z","size":7302,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-30T02:28:08.066Z","etag":null,"topics":["3d-graphics","cmake","glsl","imgui","opengl","particle-simulation","particles","physics-simulation","simulation","simulator","webgl"],"latest_commit_sha":null,"homepage":"https://im-rises.github.io/particle-simulator-webgl/","language":"C++","has_issues":true,"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/Im-Rises.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}},"created_at":"2023-02-22T05:31:37.000Z","updated_at":"2024-08-30T15:12:01.000Z","dependencies_parsed_at":"2023-10-12T17:44:07.192Z","dependency_job_id":null,"html_url":"https://github.com/Im-Rises/particle-simulator-webgl","commit_stats":{"total_commits":167,"total_committers":2,"mean_commits":83.5,"dds":0.005988023952095856,"last_synced_commit":"84aaba5afa3b56d1279317cb9ba91584f090ae61"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2Fparticle-simulator-webgl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2Fparticle-simulator-webgl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2Fparticle-simulator-webgl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Im-Rises%2Fparticle-simulator-webgl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Im-Rises","download_url":"https://codeload.github.com/Im-Rises/particle-simulator-webgl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238207641,"owners_count":19434095,"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","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":["3d-graphics","cmake","glsl","imgui","opengl","particle-simulation","particles","physics-simulation","simulation","simulator","webgl"],"created_at":"2024-10-10T22:55:15.826Z","updated_at":"2025-10-25T20:31:04.435Z","avatar_url":"https://github.com/Im-Rises.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# particle-simulator-webgl\n\n\u003cp align=\"center\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/C%2B%2B-00599C?style=for-the-badge\u0026logo=c%2B%2B\u0026logoColor=white\" alt=\"cppLogo\" style=\"height:60px;\"/\u003e\n      \u003cimg src=\"https://img.shields.io/badge/OpenGL-FFFFFF?style=for-the-badge\u0026logo=opengl\" alt=\"openglLogo\" style=\"height:60px;\"/\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/59691442/183268126-b3d19e66-8f2d-463a-805e-ae6ef7cc6c01.png\" alt=\"cmakeLogo\" style=\"height:60px;\"/\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/59691442/226524871-c73aa62f-d191-42d3-a1b9-ebbfc216a7bb.png\" alt=\"webglLogo\" style=\"height:60px;\"/\u003e\n      \u003cimg src=\"https://user-images.githubusercontent.com/59691442/190315147-ec9dc33f-0090-4f0d-98ab-514eb1463e01.png\" alt=\"glfwLogo\" style=\"height:60px;\"/\u003e\n\u003c/p\u003e\n\n## Description\n\nThis is a particle simulator written in C++ and compiled to WebGL2 using\nEmscripten. It is a port of my particle simulator written in C++ and OpenGL which can be\nfound [here](https://github.com/Im-Rises/ParticleSimulator).\nThis version is displaying 1 000 000 particles (which can be changed using the integrated UI).\nOn the contrary of the Desktop version, this version is using a Transform Feedback buffering instead of a SSBO, WebGL2\nis limited to OpenGL ES 3.0 which doesn't support SSBOs.\n\n## 🚀🚀[you can try the webgl build online by clicking here](https://im-rises.github.io/particle-simulator-webgl/) 🚀🚀\n\n\u003e **Note**  \n\u003e The website work for desktop and mobile, but on mobile you won't be able to use the UI to change the simulation\n\u003e parameters.\n\n## Images\n\n![Screenshot 1](https://user-images.githubusercontent.com/59691442/225486502-770ec82b-562a-452b-9ef2-f2a68c6fef18.png)\n![Screenshot 2](https://user-images.githubusercontent.com/59691442/225486505-e8ccd756-056a-4507-917a-6be6bd8decb9.png)\n\n## Videos\n\nhttps://user-images.githubusercontent.com/59691442/225486109-9fb793d5-878f-430b-b418-938535038aed.mp4\n\n## Dependencies\n\n- OpenGL version: 4.6.0\n- GLSL version: 4.60\n- GLFW version: 3.3.8\n- Glad version: 0.1.36\n- ImGui version: 1.89.6 WIP\n- GLM version: 0.9.8\n- Emscripten: 3.1.37\n\n## Building\n\nTo build the project, you need to use a UNIX system, like Ubuntu or if you're on Windows you can use WSL.\nThen you have to install Emscripten. You can find\ninstructions on how to install Emscripten here:  \n\u003chttps://emscripten.org/docs/getting_started/downloads.html\u003e\n\nYou also need to have CMake and make installed. You can find instructions on how to\ninstall CMake here:  \n\u003chttps://cmake.org/install/\u003e\n\nMake can be installed by running this command in the terminal:\n\n```bash\nsudo apt install make\n```\n\nOnce you have Emscripten and CMake installed run this command in the project root directory:\n\n```bash\nemcmake cmake .\n```\n\nThen run this command in the same directory:\n\n```bash\nemmake make\n```\n\n## To test the website locally\n\nTo test the website locally, you need to have Python installed. You can find instructions on how to install Python here:\n\n\u003chttps://www.python.org/downloads/\u003e\n\nOnce you have Python installed, run this command in the project build directory:\n\n```bash\npython -m http.server\n```\n\nThen open your browser and go to this address:\n\n\u003chttp://localhost:8000/\u003e\n\n## Controls\n\nThe speed and some parameters can be modified directly in the ImGui windows.\n\n| Action                   | Key                                                |\n|--------------------------|----------------------------------------------------|\n| Translate camera         | WASD (← → ↑ ↓)                                     |\n| Pause/Resume             | P                                                  |\n| Move up/down camera      | SPACE/SHIFT                                        |\n| Rotate camera            | Right Mouse Button + Mouse movement                |\n| Toggle UI visible/hidden | U                                                  |\n| Fullscreen               | F11                                                |\n| Drag particles           | Left Mouse Button + Mouse movement OR Touch screen |\n\n\u003e **Note**\n\u003e The translation commands are set for QWERTY keyboard layout.\n\n## GitHub Actions\n\nThis project uses GitHub Actions to build the project and deploy it to GitHub\n\n[![CodeQL](https://github.com/Im-Rises/particle-simulator-webgl/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/Im-Rises/particle-simulator-webgl/actions/workflows/codeql.yml)\n[![CMake](https://github.com/Im-Rises/particle-simulator-webgl/actions/workflows/cmake.yml/badge.svg?branch=main)](https://github.com/Im-Rises/particle-simulator-webgl/actions/workflows/cmake.yml)\n[![flawfinder](https://github.com/Im-Rises/particle-simulator-webgl/actions/workflows/flawfinder.yml/badge.svg?branch=main)](https://github.com/Im-Rises/particle-simulator-webgl/actions/workflows/flawfinder.yml)\n[![cpp-linter](https://github.com/Im-Rises/particle-simulator-webgl/actions/workflows/cpp-linter.yml/badge.svg?branch=main)](https://github.com/Im-Rises/particle-simulator-webgl/actions/workflows/cpp-linter.yml)\n[![Emscripten-CMake](https://github.com/Im-Rises/particle-simulator-webgl/actions/workflows/emscripten-cmake.yml/badge.svg)](https://github.com/Im-Rises/particle-simulator-webgl/actions/workflows/emscripten-cmake.yml)\n[![Emscripten-Publish](https://github.com/Im-Rises/particle-simulator-webgl/actions/workflows/emscripten-publish.yml/badge.svg)](https://github.com/Im-Rises/particle-simulator-webgl/actions/workflows/emscripten-publish.yml)\n\nThe project is set with a set of different scripts:\n\n- CodeQL: This script is used to check the code for security issues.\n- CMake: This script is used to build the project.\n- Cpp Cmake Publish: This script is used to publish the project on GitHub.\n- Flawfinder: This script is used to check the code for security issues.\n- Microsoft C++ Code Analysis: This script is used to check the code for security issues.\n- Cpp Linter: This script is used to check the code for security issues.\n- Emscripten CMake: This script is used to test build of the project using Emscripten toolchain.\n- Emscripten-Publish: This script build to webgl and publish the project on GitHub Pages.\n\n## Libraries\n\nglfw:  \n\u003chttps://www.glfw.org/docs/latest/\u003e\n\nglm:  \n\u003chttps://glm.g-truc.net/0.9.9/index.html\u003e\n\nglad:  \n\u003chttps://glad.dav1d.de/\u003e\n\nDear ImGui:  \n\u003chttps://github.com/ocornut/imgui\u003e\n\nOpenGL:  \n\u003chttps://www.opengl.org/\u003e\n\nemscripten:  \n\u003chttps://emscripten.org/docs/getting_started/downloads.html\u003e\n\n## Documentation\n\nlearnopengl (OpenGL tutorial):  \n\u003chttps://learnopengl.com/In-Practice/2D-Game/Particles\u003e\n\nunrealistic.dev (Change CMake working directory):  \n\u003chttps://unrealistic.dev/posts/setting-debug-parameters-with-cmake-tools-for-visual-studio\u003e\n\nOpenGL ES 3.0 Reference Pages:  \n\u003chttps://www.khronos.org/registry/OpenGL-Refpages/es3.0/\u003e\n\nWikipedia (OpenGL versions):  \n\u003chttps://en.wikipedia.org/wiki/OpenGL_Shading_Language\u003e\n\ncodepen (WebGL 2 Particles):  \n\u003chttps://codepen.io/stopyransky/pen/gBoQoO\u003e\n\nnopjiap (WebGL 2 Particles):  \n\u003chttps://github.com/nopjia/particles-mrt\u003e\n\n## Contributors\n\nQuentin MOREL:\n\n- @Im-Rises\n- \u003chttps://github.com/Im-Rises\u003e\n\n[![GitHub contributors](https://contrib.rocks/image?repo=Im-Rises/particle-simulator-webgl)](https://github.com/Im-Rises/particle-simulator-webgl/graphs/contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim-rises%2Fparticle-simulator-webgl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fim-rises%2Fparticle-simulator-webgl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim-rises%2Fparticle-simulator-webgl/lists"}