Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shakthi/threeuniverse

ThreeJS based virtual world where one can be a part of it.
https://github.com/shakthi/threeuniverse

distributed github-pages three-js wiki

Last synced: 4 days ago
JSON representation

ThreeJS based virtual world where one can be a part of it.

Awesome Lists containing this project

README

        

# Three Universe
Imagine a wiki-like 3D world, where anybody can create their 3d structures, forms, models and they can roam around to check out their neighbor's creation. Three universe is essentially a **ThreeJS** based universe, powered by **GitHub Pages**.

FPS controls enable to roam around the universe and check out the areas with different parts of the universe progressively loaded from individual contributor's GitHub Pages. With exception of browser cache, the changes made to universe parts dyanamically reflected, and no more pull-requests needed.

Please checkout the current progress at

- https://threeuniverse.org/#x:1088&z:556 - Village life
- https://threeuniverse.org/#x:83&z:483 - Small forest
- https://threeuniverse.org/#x:-174&z:-1894 - Future world
- https://threeuniverse.org/#x:-4192&z:2975 - Tiny pond

# Local testing

```sh
yarn install
yarn start
```
Which will create a server at http://localhost:8080/

*Quick contribution guide:*

It is super easy to create your structure in this universe.
- Fork this repo. Let your new repo path github.com/YourName/threeuniverse
- Delete file github.com/YourName/CNAME - Make a commit
- [Enable GitHub pages for the repository.](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/). This should create your GitHub Pages at https://yourname.github.io/threeuniverse/index.html *Note: Sometimes it might take couple of minutes to your GitHub pages to start to work*
- Goto the above page. Roam around in the universe. Observe your coordinates on browser URL (say https://yourname.github.io/threeuniverse/index.html#x:744&z:495)
- Create a part at src/universe_parts. You can copy or refer to existing parts.
```javascript
//sampleCube.js - Sample cube part file
defineThreeUniverse(function (THREE) {

var geometry = new THREE.BoxGeometry( 100, 100, 100 );
var material = new THREE.MeshStandardMaterial( {color: 0x00ff00} );
var cube = new THREE.Mesh( geometry, material );

return cube;
});
```
- Add your entry to src/universe_parts/mapping.js with position as the position you noted earlier.
- Save/Commit. On refresh, your model should appear at https://yourname.github.io/threeuniverse/index.html#x:744&z:495
- Create a pull request to share your creation with threeuniverse.org You need to send pull request only once, all further modifications appears automatically on threeuniverse.org