Giter Site home page Giter Site logo

jsorrery's Introduction

jsOrrery

jsOrrery is a Solar System / orbital mechanics simulation, or orrery, that I wrote in WebGL and Javascript. The main feature of jsOrrery is that the planets positions are accurate in regards to the date you set, and it has the consequence that you can observe things that happen in the real Solar System.

See the project live at [orrery.com] (http://orrery.com). Thanks to [@neave] (https://twitter.com/neave) for the domain :)

Usage

The directory named dist contains the built app. The html file is an example of jsOrrery placed in a page. Basically, you link jsOrrery's js and css files in your HTML file and call the app.

As soon as jsOrrery is loaded, it calls a function window.onJsOrreryLoaded if it exists, with JSOrrery class as param. JSOrrery is also accessible through the global window.jsOrrery variable. To init the app, you just create a new instance.

const jsOrrery = new JSOrrery();

Options

If you want to customize how jsOrrery behaves, you can pass a config object to its init method.

Building the app

You can also use webpack to display the app in a local environment with npm start, which will then make the orrery available at http://localhost:2018. To build the js, you can run webpack directly in the terminal, for example env NODE_ENV=production webpack.

Credits

More details on La Grange's blog at http://lab.la-grange.ca/en/jsorrery

jsorrery's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsorrery's Issues

Mars Satellites

Do you have any information on Mars satellites orbits to create a scenario?

Why it does not affect to any value with new jsorrery object?

Hello,

I'm trying to add new animate(speed) function in JSOrrery.js file to call the function from console by creating new jsorrery object, but it does not trigger the value from the class.

My code:

	animate(speed) {
		this.ticker.secondsPerTick = speed;
		this.ticker.setSecondsPerTick(speed);
	}

this has to change the speed of animation, but it does not do anything. Do you know why?

Changed properties of planets, other orbits unaffected. Is it calculating anything?

Hi
I got it running on my local machine. It looks great!
However, when I changed Venus to be (for example) in orbit immediately inside Earth and to be 1000 times heavier, only venus moved. I expected that earth's orbit would be affected. But earth continues without any change. Is the system calculating anything? The code looks as if it is, but then earth's orbit should be significantly affected.
H

We need your help

Hello, my name is Michelle. I'm from Taiwan and I'm 15 now. These days, my classmates and I are doing the study about comet. We found that your JsOrrey is useful. Because we want to put many data of comet tracks in one picture, we need to use your code to modify. Could you give us the code and let us modify it?

feature request: labels of star constellations

Hi, this is really a great project - the great visualisations are enabling me to finally be able to grasp how our solar system revolves.

Just a quick feature request - I notice that the visualisation already contains line connections to depict constellations. It would be great if these could also be labelled (or to have a checkbox option to display / hide these labels: especially the 12 main constellations we use for zodiacs)

It would also be nice if there was a setting that would allow one to see how the sky looks when we are to just continuously look up at the sky from one point on the earth. (I'm not sure if this is currently possible)

Thank you for a great project!

feature request: real time animation and others

Hello,
I couldn't find any live solar system simulation and almost decided to start writing one in three.js, but I stumbled upon yours. I'd like to contibute, for now some feature requests and ideas and in future code/models/textures or planetary data if possible:

  1. real time animation speed
  2. all planets spinning
  3. moons
  4. planet's layers (core, atmosphere)

I hope I'm not beaking github etiquette, I'm a complete noob here, but I've done some (very bad) coding in two (http://free.of.pl/k/kupikowski/2B) and three (http://free.of.pl/k/kupikowski/flowerbulb/three) so I can maybe contribute to the project.

Orbit color on Ubuntu 16 is black

HI mgvez

Thanks for the interesting app. Running jsorrery on ubuntu 16/firefox 76, the orbits are black. I also notice none of the planet textures are used, and the labels for the planets are really very small.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.