Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/HermannBjorgvin/Gravity-Simulator
2D newtonian gravity simulator in JS
https://github.com/HermannBjorgvin/Gravity-Simulator
Last synced: 2 months ago
JSON representation
2D newtonian gravity simulator in JS
- Host: GitHub
- URL: https://github.com/HermannBjorgvin/Gravity-Simulator
- Owner: HermannBjorgvin
- Created: 2015-03-08T11:26:38.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-12-04T00:14:53.000Z (about 6 years ago)
- Last Synced: 2024-11-01T00:43:24.572Z (3 months ago)
- Language: JavaScript
- Homepage: https://hermann.is/gravity
- Size: 6.64 MB
- Stars: 135
- Watchers: 10
- Forks: 41
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-physics - Gravity-Simulator - A 2D newtonian gravity simulator in JS (Mechanics / Gravity)
README
# 2018 Refactor
I have set a goal to refactor this application in 2018-2019. I want this application to be highly usable on desktops, tablets, and mobile devices, with a user interface that adapts to the device but lets desktop users still be able to use the more complicated toolset.The first issue to resolve is migrating to VueJS and a ES6 module system.
Goals for the refactor
* new much improved Desktop/tablet/phone ui
* touch input support
* new logo
* Dark/light theme
* Webassembly barnes hutt algorithm implementation## How is the code structured?
I used the AMD module system to build the application, specifically I use require.js for a module loaderThere are three seperate modules
### js/gravity/spacetime.js
A module that stores all objects and performs calculations on those objects at a set speed and accuracy.### js/gravity/branes-hut.js
There's a separate branched called 'barnes-hut' which has an implementation of the barnes-hut algorithm. Supposed to be a plug and play thing where you can toggle it for greater speeds### js/gravity/new_render.js
The old gui and render modules have been scrapped for a new combined one that doesn't have the same annoying problem of shared state of things like the cursor or camera. Currently being worked on, sorry for any annoyance