Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 819 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 819 Bytes

EllipticOrbit

EllipticOrbit is a JavaScript library for animating objects along elliptic orbits.

Here's an example of how to instantiate an animated object:

var planet1 = new EllipticOrbit('planet1',200,77,20,0,0,0);
planet1.start();

Options

EllipticOrbit() takes the following options:

divId               //Div Identifier
semiMajorAxis       //Long Axis of Ellipse
semiMinorAxis       //Short Axis of Ellipse
xOffset             // x offset of planet from orbital path
yOffset             // y offset of planet from orbital path
tiltAngle           //Orbit Tilt
degree              //where planet starts on orbital path

Credit

requestAnimationFrame algorithm created by Paul Irish