Skip to content

scottbyrns/THREE.SolarSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THREE.SolarSystem

A library for generating solar systems with THREE.js

Dependencies

THREE.GEO

https://github.com/scottbyrns/THREE.GEO-Geospatial-Mapping

Ussage

	
	var solarSystemData = {
	    "sun": {
	        "radius": 6.955,
	        "representation": {
	            "texture": "textures/sun.gif"
	        }
	    },
	    "planets": [{
	        "name": "Mercury",
	        "representation": {
	            "texture": "textures/Planets/mercurymap.jpg",
	            "bumpMap": "textures/Planets/mercurybump.jpg",
	            "textureOffset": -180.806168
	        },
	        "distance": 579.1,
	        "radius": 0.0244,
	        "rotationPeriod": {
	            "years": 0,
	            "days": 58,
	            "hours": 15,
	            "minutes": 30
	        },
	        "orbitalPeriod": {
	            "years": 0,
	            "days": 88,
	            "hours": 0,
	            "minutes": 0
	        },
	        "mass": 3.285e+23,
	        "coordinates": {
	            "phi": 212.7696388888889,
	            "lambda": 1.9079166666666665,
	            "radius": 648.928187987607
	        }
	    }
	};

	ourSolarSystem = new THREE.SolarSystem(solarSystemData, scene);
		
	function render() {

		ourSolarSystem.update();
		
		camera.lookAt( ourSolarSystem.star.position );
		renderer.render( scene, camera );

	}

About

A library for generating solar systems with THREE.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published