Skip to main content

LED

LED

The LED turns on when signal input connnected to it is 1. Outputs a bright light.


Constructor

public LED

new LED()

Initializes LED, has clamped value of 0 and 1 inputs.


Properties

No publicly accessible properties on LED


Methods

public activate

activate(signal, i) => void

Turn the LED on.

Parameters

  •  signal: false | true – Signal connected to the LED (on or off).

  •  i: number – The output port index.

public getOffset

getOffset() => Vector

Returns offset of light radius when LED is on, if the LED is off, there is no offset to return (0).

Returns

  •   Vector – Gets extra offset of light radius if LED is on.

public isOn

isOn() => false | true

Returns true (1) if LED is on.

Returns

  •   false | true – Light status of LED.

public getPropInfo

getPropInfo(key) => BasePropInfo & { type: "boolean"; } | BasePropInfo & { type: "button"; getText: (states: any[]) => string; getNewState: (states: any[]) => any; } | BasePropInfo & UnitInfo | BasePropInfo & { type: "string"; constraint?: RegExp; } | BasePropInfo & { type: "color"; } | BasePropInfo & { type: "string[]"; options: [string, string][]; } | BasePropInfo & { type: "number[]"; options: [string, number][]; } | BasePropInfo & { type: "veci" | "vecf"; min?: Vector; max?: Vector; step?: Vector; }

Description needed

Parameters

  •  key: stringDescription needed

Returns

public getDisplayName

getDisplayName() => string

Returns the display name of the LED.

Returns

  •   string – Display name of the LED.

public getImageName

getImageName() => string

Returns the image name of the LED in the off state.

Returns

  •   string – Image name of the LED (OFF).

public getOnImageName

getOnImageName() => string

Returns the image name of the LED in the on state.

Returns

  •   string – Image name of the LED (ON).

Static Methods

No static methods for LED