Difference between revisions of "Oolite JavaScript Reference: Planet"
From Elite Wiki
(Removed bits about the sun being a planet, because it now isn’t.) |
(Changed future-scripting tag to added-in-1.70) |
||
| Line 2: | Line 2: | ||
<small>'''Subtypes:''' none | <small>'''Subtypes:''' none | ||
| − | {{Oolite- | + | {{Oolite-class-added|1.70}} |
The '''<code>Planet</code>''' class is an <code>[[Oolite/Development/Scripting/Class/Entity|Entity]]</code> representing a planet or moon. A <code>Planet</code> has all the properties and methods of a <code>Entity</code>, and several others. | The '''<code>Planet</code>''' class is an <code>[[Oolite/Development/Scripting/Class/Entity|Entity]]</code> representing a planet or moon. A <code>Planet</code> has all the properties and methods of a <code>Entity</code>, and several others. | ||
Revision as of 10:56, 6 December 2007
Prototype: Entity
Subtypes: none
This class was added in Oolite test release 1.70.
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.