Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cppshane/dynamic-particle-simulator
Easily create WebGL based N-body simulations in the browser.
https://github.com/cppshane/dynamic-particle-simulator
javascript nbody physics shaders webgl
Last synced: 27 days ago
JSON representation
Easily create WebGL based N-body simulations in the browser.
- Host: GitHub
- URL: https://github.com/cppshane/dynamic-particle-simulator
- Owner: cppshane
- Created: 2021-01-12T23:27:01.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-06T00:05:59.000Z (over 2 years ago)
- Last Synced: 2024-11-15T05:28:12.826Z (3 months ago)
- Topics: javascript, nbody, physics, shaders, webgl
- Language: JavaScript
- Homepage: https://cppshane.github.io/dynamic-particle-simulator
- Size: 1.89 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dynamic Particle Simulator
Easily create WebGL based N-body simulations in the browser.![dps-demo](https://user-images.githubusercontent.com/6633831/169607605-40e1c4d3-82df-4975-bbb8-fd2eec910191.gif)
## How Does It Work?
You just need to call `ParticleRender.SetTimestepFunction(function(dt) { ... });`, where the function you pass in should return an array of positions (in 3d space) given some timestep. Everything else (running time loop, rendering via WebGL, etc.) is handled by the platform!A sample of all functionality including setting the initial camera angle/zoom and passing a timestep function can be seen in the default configuration.