Difference between revisions of "Oolite JavaScript Reference: Flasher"

From Elite Wiki
(New flasher object)
 
m (Added Link)
Line 39: Line 39:
 
  function '''remove'''()
 
  function '''remove'''()
 
Remove the flasher completely from the ship
 
Remove the flasher completely from the ship
 +
 +
== Links ==
 +
*[http://www.aegidian.org/bb/viewtopic.php?p=177611#p177611 BB Thread] with some details (2012)
  
 
[[Category:Oolite JavaScript Reference]]
 
[[Category:Oolite JavaScript Reference]]

Revision as of 01:17, 2 May 2021

Prototype: Entity

The Flasher class is an Entity representing a flasher on a ship. It has all the properties and methods of an Entity, and several others. Available from Oolite 1.79 onwards.

Properties

This property was added in Oolite test release 1.79.

active

active : Boolean (read/write)

Whether or not the flasher is currently lit.

See also: Ship.lightsActive

color

color : Color (read/write)

The current colour of the flasher. If the flasher is defined to have a list of colours which it cycles through, then setting this variable will only override the colour until it changes again - when it cycles back to that colour, it will be as specified in the flasher's plist entry. Note that when reading from plists, a desaturation effect is applied to the specified colour. This is not applied when directly setting a colour.

fraction

fraction : Number (read/write)

The fraction of the flashing cycle in seconds for which the flasher is in an illuminated state.

frequency

frequency : non-negative Number (read/write)

The frequency of the flashing cycle in Hz, or zero for always-on

phase

phase : Number (read/write)

The phase shift applied to the flashing cycle in seconds

size

size : positive Number (read/write)

The diameter of the flasher in metres

Methods

This method was added in Oolite test release 1.79.

remove

function remove()

Remove the flasher completely from the ship

Links