Oolite JavaScript Reference: Sun

From Elite Wiki

Prototype: Entity
Subtypes: none

The Sun class is an Entity representing a sun. A Sun has all the properties and methods of a Entity, and several others. Currently, Oolite supports at most one sun per system, accessible via the system.sun property.



hasGoneNova : Boolean (read-only)

true if the sun has gone nova.

See Also: isGoingNova, goNova()


isGoingNova : Boolean (read-only)

true if the sun is scheduled to go nova.

See Also: hasGoneNova, goNova(), cancelNova()


This property was added in Oolite test release 1.79.

name : String (read-only)

The name of the sun, as set by the sun_name property in planetinfo.plist


radius : Number (read-only)

The equatorial radius of the sun, in metres.



function cancelNova()

Cancels a scheduled nova, if a nova has been scheduled but not yet occurred.

See Also: hasGoneNova, isGoingNova, goNova()


function goNova([delay : Number])

Causes the sun to explode. The optional delay parameter causes the nova to happen after a specified delay (specified in seconds in game real time).

See Also: hasGoneNova, isGoingNova, cancelNova()


  • See Frame's 2017 YouTube film here where he discusses plans for barycenters such as binary stars, asteroid rings etc. - and having everything to a realistic scale.