Skip to content

pindiespace/webvr-planets-babylon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebVR solar system model using BabylonJS engine.

Adapted from tutorial

Example

Check out the example here.

Description

This app is an example of how to build a simple model using BabylonJS and WebVR. It is provided as a compliment to the frequent use of the THREE.js engine. BabylonJS uses a different model (pre-built WebVR cameras) and should be easier to implement for beginners.

WebVR Scene from App

The current version has a few planets circling the Sun. Later versions will have more planets, along with more correct relative distances between the planets.

Use

If WebVR is not present, the app defaults to the BabylonJS ArcRotate camera, which is entertaining on desktops. You can enable WebVR on devices that don't support it by adding in WebVR-Polyfill.

Distances used from Sun (in final simulation)

Planet distance (AU) revolution eccentricity inclination (deg)
Sun 0 24.47 d -
Mercury 0.387 87.969 d 0.2056 7.005
Venus 0.723 224.701 d 0.0068 3.3947
Earth 1.000 365.256 d 0.0167 0.000
Mars 1.524 686.98 d 0.0934 1.851
Jupiter 5.203 11.862 y 0.0484 1.305
Saturn 9.537 29.457 y 0.0542 2.484
Uranus 19.191 84.011 y 0.0472 0.770
Neptune 30.069 164.79 y 0.0086 1.769
Planet 9 ? ? ? ?
Planet distance (AU) revolution eccentricity inclination (deg)
Pluto 39.482 248.54 d 0.2488 17.16
Charon
Ceres 2.76 4.559 y 0.07976 10.587
Eris 67.67 557 y 0.44177 44.187
Dysnomia
Haumea 43.33 285.4 y 0.18874 ?
MakeMake 45.80 309.88 y 0.44177

Resources

Image sources

Data

BabylonJS CDN

BabylonJS Documentation

Useful links

Utility

Markdown Generator for Tables

Apache License 2.0 (Apache)

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/

=======

webvr-planets-babylon

babylonjs planet simulation in WebVR

About

babylonjs planet simulation in WebVR

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published