Oolite JavaScript Reference: Planet

From Elite Wiki
Revision as of 13:22, 15 October 2007 by Ahruman (talk | contribs) (Removed bits about the sun being a planet, because it now isn’t.)

Prototype: Entity
Subtypes: none

The Planet class is an Entity representing a planet or moon. A Planet has all the properties and methods of a Entity, and several others.

Properties

isMainPlanet

isMainPlanet : Boolean (read-only)

true if the entity is the main planet of the current system, false otherwise.

hasAtmosphere

hasAtmosphere : Boolean (read-only)

true if the entity has an atmosphere, false otherwise. Planets created with the System.addMoon() method (or corresponding legacy scripting method) have no atmosphere, other planets do.

radius

radius : Number (read-only)

The equatorial radius of the planet, in metres.