Oolite JavaScript Reference: Planet

From Elite Wiki
Revision as of 15:36, 8 October 2007 by Ahruman (talk | contribs) (New page: <small>'''Prototype:''' <code>Entity</code></small><br /> <small>'''Subtypes:''' none {{Oolite-future-scripting}} The '''<code>Planet</code>...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Prototype: Entity
Subtypes: none

The Planet class is an Entity representing a celestial body. Just as a Ship may in fact be an asteroid, a Planet may be the sun. A Planet has all the properties and methods of a Entity, and several others.

Properties

isMainPlanet

isMainPlanet : Boolean

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

isSun

isSun : Boolean

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

hasAtmosphere

hasAtmosphere : Boolean

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

radius

radius : Number

The equatorial radius of the planet, in metres.