https://github.com/exposedcat/world.js
Are we living in simulation? what if our world written in JavaScript ? 😆
https://github.com/exposedcat/world.js
Last synced: 27 days ago
JSON representation
Are we living in simulation? what if our world written in JavaScript ? 😆
- Host: GitHub
- URL: https://github.com/exposedcat/world.js
- Owner: ExposedCat
- Created: 2020-08-07T19:04:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-18T19:05:47.000Z (almost 5 years ago)
- Last Synced: 2025-01-18T14:34:12.652Z (12 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# World.JS
Are we living in simulation? What if our world written in JavaScript ? 😆
To run World, import `Universe` class from `universe.mjs`, one of initialization types from `initTypes.mjs` and make anything you want 😜
Exmaple `index.js`:
```js
import { Universe } from './universe.mjs'
import { bigBang } from './initTypes.mjs'
const myUniverse = new Universe()
myUniverse.init(bigBang)
myUniverse.makeGalaxy()
myUniverse.galaxies[0].makePlanet()
myUniverse.galaxies[0].makeStar()
myUniverse.galaxies[0].makeStar()
console.dir(myUniverse)
```