model-api.md

June 12, 2026 · View on GitHub

Classes

AbstractChannel

Base class for channels.

Capability

A capability represents a range of a channel.

CoarseChannelAbstractChannel

A single DMX channel, either created as availableChannel or resolved templateChannel. Only the MSB (most significant byte) channel if it's a multi-byte channel.

Entity

A physical entity with numerical value and unit information.

FineChannelAbstractChannel

Represents a finer channel of a 16+ bit channel. Also called LSB (least significant byte) channel.

Fixture

A physical DMX device.

Manufacturer

A company or brand that produces fixtures. A fixture is associated to exactly one manufacturer.

Matrix

Contains information of how the pixels in a 1-, 2- or 3-dimensional space are arranged and named.

Meta

Information about a fixture's author and history.

Mode

A fixture's configuration that enables a fixed set of channels and channel order.

NullChannelCoarseChannel

Dummy channel used to represent null in a mode's channel list.

Physical

A fixture's technical data, belonging to the hardware and not the DMX protocol.

Range

Represents a range from one integer to a higher or equal integer. Primarily used for DMX ranges of capabilities.

Resource

Information about a resource.

SwitchingChannelAbstractChannel

Represents a channel that switches its behavior depending on trigger channel's value. The different behaviors are implemented as different CoarseChannels or FineChannels.

TemplateChannel

Represents a blueprint channel of which several similar channels can be generated. Currently used to create matrix channels.

Wheel

Information about a fixture's wheel.

WheelSlot

Information about a single wheel slot (or a split slot).

Typedefs

Resolution : number

1 for 8bit, 2 for 16bit, ...

TriggerCapability : object
SwitchingChannelBehavior : 'keyOnly' | 'defaultOnly' | 'switchedOnly' | 'all'

AbstractChannel

Base class for channels.

Kind: global abstract class

new AbstractChannel(key)

Create a new AbstractChannel instance. Call this from child classes as super(key).

Throws:

  • TypeError If the AbstractChannel is instantiated directly.
ParamTypeDescription
keystringThe channel's identifier, must be unique in the fixture.

abstractChannel.fixture ⇒ Fixture

Kind: instance abstract property of AbstractChannel
Returns: Fixture - The fixture instance this channel is associated to.
Throws:

  • TypeError If this property is not overridden in child classes.

abstractChannel.key ⇒ string

Kind: instance property of AbstractChannel
Returns: string - The channel key.

abstractChannel.name ⇒ string

Override this method for more sensible implementation.

Kind: instance property of AbstractChannel
Returns: string - The channel key (as name).

abstractChannel.uniqueName ⇒ string

Kind: instance property of AbstractChannel
Returns: string - Unique version of this channel's name.
See: uniqueChannelNames

abstractChannel.pixelKey ⇒ string | null

Kind: instance property of AbstractChannel
Returns: string | null - The key of the pixel (group) that this channel is associated to. Defaults to null.

abstractChannel.pixelKey

Kind: instance property of AbstractChannel

ParamTypeDescription
pixelKeystring | nullThe key of the pixel (group) that this channel is associated to. Set to null to dereference a channel from a pixel (group).

Capability

A capability represents a range of a channel.

Kind: global class

new Capability(jsonObject, resolution, channel)

Create a new Capability instance.

ParamTypeDescription
jsonObjectReadonly.<object>The capability data from the channel's JSON.
resolutionResolutionHow fine this capability is declared.
channelReadonly.<CoarseChannel>The channel instance this channel is associated to.

capability.jsonObject ⇒ object

Kind: instance property of Capability
Returns: object - The capability data from the channel's JSON.

capability.dmxRange ⇒ Range

Kind: instance property of Capability
Returns: Range - The capability's DMX bounds in the channel's highest resolution.

capability.rawDmxRange ⇒ Range

Kind: instance property of Capability
Returns: Range - The capability's DMX bounds from the JSON data.

capability.type ⇒ string

Kind: instance property of Capability
Returns: string - Describes which feature is controlled by this capability.

capability.name ⇒ string

Kind: instance property of Capability
Returns: string - Short one-line description of the capability, generated from the capability's type and type-specific properties.

capability.hasComment ⇒ boolean

Kind: instance property of Capability
Returns: boolean - Whether this capability has a comment set.

capability.comment ⇒ string

Kind: instance property of Capability
Returns: string - Short additional information on this capability

capability.isStep ⇒ boolean

Kind: instance property of Capability
Returns: boolean - Whether this capability has the same effect from the start to the end.

capability.isInverted ⇒ boolean

Kind: instance property of Capability
Returns: boolean - Whether this capability ranges from a high to a low value (e.g. speed fast…slow).

capability.usedStartEndEntities ⇒ Array.<string>

Kind: instance property of Capability
Returns: Array.<string> - Names of non-null properties with (maybe equal) start/end value.

capability.helpWanted ⇒ string | null

Kind: instance property of Capability
Returns: string | null - A string describing the help that is needed for this capability, or null if no help is needed.

capability.menuClick ⇒ 'start' | 'center' | 'end' | 'hidden'

Kind: instance property of Capability
Returns: 'start' | 'center' | 'end' | 'hidden' - The method which DMX value to set when this capability is chosen in a lighting software's auto menu.

capability.menuClickDmxValue ⇒ number

Kind: instance property of Capability
Returns: number - The DMX value to set when this capability is chosen in a lighting software's auto menu.

capability.switchChannels ⇒ Record.<string, string>

Kind: instance property of Capability
Returns: Record.<string, string> - Switching channel aliases mapped to the channel key to which the switching channel should be set to when this capability is activated.

capability.shutterEffect ⇒ string | null

Kind: instance property of Capability
Returns: string | null - Behavior for the shutter, for example 'Closed', 'Strobe' or 'Pulse'. Defaults to null.

capability.color ⇒ 'Red' | 'Green' | 'Blue' | 'Cyan' | 'Magenta' | 'Yellow' | 'Amber' | 'White' | 'Warm White' | 'Cold White' | 'UV' | 'Lime' | 'Indigo' | null

Kind: instance property of Capability
Returns: 'Red' | 'Green' | 'Blue' | 'Cyan' | 'Magenta' | 'Yellow' | 'Amber' | 'White' | 'Warm White' | 'Cold White' | 'UV' | 'Lime' | 'Indigo' | null - The color of the lamp that is controlled by this ColorIntensity capability. Defaults to null.

capability.colors ⇒ object | null

Kind: instance property of Capability
Returns: object | null - The color hex codes for each visually distinguishable light beam. Defaults to null.

capability.wheels ⇒ Array.<Wheel>

Kind: instance property of Capability
Returns: Array.<Wheel> - The wheels this capability refers to. The array has one or more elements in wheel-related capabilities, zero otherwise.

capability.isShaking ⇒ 'slot' | 'wheel'

Use only in WheelShake capabilities!

Kind: instance property of Capability
Returns: 'slot' | 'wheel' - The fixture component that is shaking.

capability.effectName ⇒ string | null

Kind: instance property of Capability
Returns: string | null - Describes the effect that this capability activates. May be a pretty name for an effect preset. Defaults to null.

capability.effectPreset ⇒ string | null

Kind: instance property of Capability
Returns: string | null - Describes the effect that this capability activates by using a predefined, standard name. Defaults to null.

capability.isSoundControlled ⇒ boolean

Kind: instance property of Capability
Returns: boolean - Whether this effect is controlled by sound perceived by a microphone. Defaults to false.

capability.randomTiming ⇒ boolean

Kind: instance property of Capability
Returns: boolean - Whether this capability's speed / duration varies by a random offset. Defaults to false.

capability.blade ⇒ 'Top' | 'Right' | 'Bottom' | 'Left' | number | null

Kind: instance property of Capability
Returns: 'Top' | 'Right' | 'Bottom' | 'Left' | number | null - At which position the blade is attached. Defaults to null.

capability.fogType ⇒ 'Fog' | 'Haze' | null

Kind: instance property of Capability
Returns: 'Fog' | 'Haze' | null - The kind of fog that should be emitted. Defaults to null.

capability.hold ⇒ Entity | null

Kind: instance property of Capability
Returns: Entity | null - How long this capability should be selected to take effect. Defaults to null.

capability.speed ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end speed values. Defaults to null.

capability.duration ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end duration values. Defaults to null.

capability.time ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end time values. Defaults to null.

capability.brightness ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end brightness values. Defaults to null.

capability.slotNumber ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end slot numbers. Defaults to null.

capability.wheelSlot ⇒ Array.<WheelSlot> | null

Kind: instance property of Capability
Returns: Array.<WheelSlot> | null - Start and end wheel slot objects this capability is referencing. Defaults to null.

capability.angle ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end angle values. Defaults to null.

capability.horizontalAngle ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end horizontal angle values. Defaults to null.

capability.verticalAngle ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end vertical angle values. Defaults to null.

capability.colorTemperature ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end colorTemperature values. Defaults to null.

capability.soundSensitivity ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end sound sensitivity values. Defaults to null.

capability.shakeAngle ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end shake angle values. Defaults to null.

capability.shakeSpeed ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end shake speed values. Defaults to null.

capability.distance ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end distance values. Defaults to null.

capability.openPercent ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end openPercent values. Defaults to null.

capability.frostIntensity ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end frostIntensity values. Defaults to null.

capability.insertion ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end insertion values. Defaults to null.

capability.fogOutput ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end fogOutput values. Defaults to null.

capability.parameter ⇒ Array.<Entity> | null

Kind: instance property of Capability
Returns: Array.<Entity> | null - Start and end parameter values. Defaults to null.

capability.getDmxRangeWithResolution(desiredResolution) ⇒ Range

Kind: instance method of Capability
Returns: Range - The capability's DMX bounds scaled (down) to the given resolution.

ParamTypeDescription
desiredResolutionnumberThe grade of resolution the dmxRange should be scaled to.

capability.canCrossfadeTo(nextCapability) ⇒ boolean

Kind: instance method of Capability
Returns: boolean - Whether this capability's end value equals the given capability's start value, i. e. one can fade from this capability to the given one.

ParamTypeDescription
nextCapabilityCapabilityThe next capability after this one.

capability.getMenuClickDmxValueWithResolution(desiredResolution) ⇒ number

Kind: instance method of Capability
Returns: number - The DMX value (scaled to the given resolution) to set when this capability is chosen in a lighting software's auto menu, or -1 if the capability should be hidden in the auto menu.

ParamTypeDescription
desiredResolutionnumberThe grade of resolution the dmxRange should be scaled to.

capability.isSlotType(slotType) ⇒ boolean

Kind: instance method of Capability
Returns: boolean - True if the capability references a slot (or range of slots) of the given type, false otherwise.

ParamTypeDescription
slotTypestring | RegExpThe type of the slot to check. Can be a regular expression to be checked against the type.

capability._getStartEndArray(property) ⇒ Array.<Entity> | null

Parses a property that has start and end variants by generating an array with start and end value.

Kind: instance method of Capability
Returns: Array.<Entity> | null - Start and end value of the property (may be equal), parsed to Entity instances. null if it isn't defined in JSON.
Access: private

ParamTypeDescription
propertystringThe base property name. 'Start' and 'End' will be appended to get the start/end variants.

Capability.START_END_ENTITIES ⇒ Array.<string>

Kind: static property of Capability
Returns: Array.<string> - Type-specific properties that may have a start and an end value.

CoarseChannel ⇐ AbstractChannel

A single DMX channel, either created as availableChannel or resolved templateChannel. Only the MSB (most significant byte) channel if it's a multi-byte channel.

Kind: global class
Extends: AbstractChannel

new CoarseChannel(key, jsonObject, fixture)

Create a new CoarseChannel instance.

ParamTypeDescription
keystringThe channel's identifier, must be unique in the fixture.
jsonObjectReadonly.<object>The channel data from the fixture's JSON.
fixtureReadonly.<Fixture>The fixture instance this channel is associated to.

coarseChannel.jsonObject ⇒ object

Kind: instance property of CoarseChannel
Returns: object - The channel data from the fixture's JSON.

coarseChannel.fixture ⇒ Fixture

Overrides AbstractChannel.fixture.

Kind: instance property of CoarseChannel
Overrides: fixture
Returns: Fixture - The fixture instance this channel is associated to.

coarseChannel.name ⇒ string

Overrides AbstractChannel.name.

Kind: instance property of CoarseChannel
Overrides: name
Returns: string - The channel name if present or else the channel key.

coarseChannel.type ⇒ string

Kind: instance property of CoarseChannel
Returns: string - The channel type, derived from the channel's capability types.

coarseChannel.color ⇒ string | null

Kind: instance property of CoarseChannel
Returns: string | null - The color of an included ColorIntensity capability, null if there's no such capability.

coarseChannel.fineChannelAliases ⇒ Array.<string>

Kind: instance property of CoarseChannel
Returns: Array.<string> - This channel's fine channel aliases, ordered by resolution (coarsest first).

coarseChannel.fineChannels ⇒ Array.<FineChannel>

Kind: instance property of CoarseChannel
Returns: Array.<FineChannel> - This channel's fine channels, ordered by resolution (coarsest first).

coarseChannel.maxResolution ⇒ Resolution

Kind: instance property of CoarseChannel
Returns: Resolution - How fine this channel can be used at its maximum. Equals the amount of coarse and fine channels.

coarseChannel.dmxValueResolution ⇒ Resolution

Kind: instance property of CoarseChannel
Returns: Resolution - How fine this channel is declared in the JSON data. Defaults to maxResolution.

coarseChannel.maxDmxBound ⇒ number

Kind: instance property of CoarseChannel
Returns: number - The maximum DMX value in the highest possible resolution. E.g. 65535 for a 16bit channel.

coarseChannel.hasDefaultValue ⇒ boolean

Kind: instance property of CoarseChannel
Returns: boolean - Whether this channel has a defaultValue.

coarseChannel.defaultValue ⇒ number

Kind: instance property of CoarseChannel
Returns: number - The DMX value this channel initially should be set to. Specified in the finest possible resolution. Defaults to 0.

coarseChannel._defaultValuePerResolution ⇒ Record.<Resolution, number>

Kind: instance property of CoarseChannel
Returns: Record.<Resolution, number> - The default DMX value of this channel in the given resolution, for all resolutions up to the channel's maximum resolution.
Access: private

coarseChannel.hasHighlightValue ⇒ boolean

Kind: instance property of CoarseChannel
Returns: boolean - Whether this channel has a highlightValue.

coarseChannel.highlightValue ⇒ number

Kind: instance property of CoarseChannel
Returns: number - A DMX value that "highlights" the function of this channel. Specified in the finest possible resolution. Defaults to the highest possible DMX value.

coarseChannel._highlightValuePerResolution ⇒ Record.<Resolution, number>

Kind: instance property of CoarseChannel
Returns: Record.<Resolution, number> - The highlight DMX value of this channel in the given resolution, for all resolutions up to the channel's maximum resolution.
Access: private

coarseChannel.isInverted ⇒ boolean

Kind: instance property of CoarseChannel
Returns: boolean - Whether a fader for this channel should be displayed upside down.

coarseChannel.isConstant ⇒ boolean

Kind: instance property of CoarseChannel
Returns: boolean - Whether this channel should constantly stay at the same value.

coarseChannel.canCrossfade ⇒ boolean

Kind: instance property of CoarseChannel
Returns: boolean - Whether switching from one DMX value to another in this channel can be faded smoothly.

coarseChannel.precedence ⇒ 'HTP' | 'LTP'

Kind: instance property of CoarseChannel
Returns: 'HTP' | 'LTP' - The channel's behavior when being affected by multiple faders: HTP (Highest Takes Precedent) or LTP (Latest Takes Precedent).

coarseChannel.switchingChannelAliases ⇒ Array.<string>

Kind: instance property of CoarseChannel
Returns: Array.<string> - Aliases of the switching channels defined by this channel, ordered by appearance in the JSON.

coarseChannel.switchingChannels ⇒ Array.<SwitchingChannel>

Kind: instance property of CoarseChannel
Returns: Array.<SwitchingChannel> - Switching channels defined by this channel, ordered by appearance in the JSON.

coarseChannel.switchToChannelKeys ⇒ Array.<string>

Kind: instance property of CoarseChannel
Returns: Array.<string> - The keys of the channels to which the switching channels defined by this channel can be switched to.

coarseChannel.capabilities ⇒ Array.<Capability>

Kind: instance property of CoarseChannel
Returns: Array.<Capability> - All capabilities of this channel, ordered by DMX range.

coarseChannel.isHelpWanted ⇒ boolean

Kind: instance property of CoarseChannel
Returns: boolean - True if help is needed in a capability of this channel, false otherwise.

coarseChannel.key ⇒ string

Kind: instance property of CoarseChannel
Overrides: key
Returns: string - The channel key.

coarseChannel.uniqueName ⇒ string

Kind: instance property of CoarseChannel
Overrides: uniqueName
Returns: string - Unique version of this channel's name.
See: uniqueChannelNames

coarseChannel.pixelKey ⇒ string | null

Kind: instance property of CoarseChannel
Overrides: pixelKey
Returns: string | null - The key of the pixel (group) that this channel is associated to. Defaults to null.

coarseChannel.ensureProperResolution(uncheckedResolution)

Checks the given resolution if it can safely be used in this channel.

Kind: instance method of CoarseChannel
Throws:

  • RangeError If the given resolution is invalid in this channel.
ParamTypeDescription
uncheckedResolutionResolutionThe resolution to be checked.

coarseChannel.getResolutionInMode(mode, switchingChannelBehavior) ⇒ Resolution

Kind: instance method of CoarseChannel
Returns: Resolution - How fine this channel is used in the given mode. 0 if the channel isn't used at all.

ParamTypeDescription
modeModeThe mode in which this channel is used.
switchingChannelBehaviorSwitchingChannelBehaviorHow switching channels are treated, see getChannelIndex.

coarseChannel.getDefaultValueWithResolution(desiredResolution) ⇒ number

Kind: instance method of CoarseChannel
Returns: number - The DMX value this channel initially should be set to, scaled to match the given resolution.

ParamTypeDescription
desiredResolutionResolutionThe grade of resolution the defaultValue should be scaled to.

coarseChannel.getHighlightValueWithResolution(desiredResolution) ⇒ number

Kind: instance method of CoarseChannel
Returns: number - A DMX value that "highlights" the function of this channel, scaled to match the given resolution.

ParamTypeDescription
desiredResolutionResolutionThe grade of resolution the highlightValue should be scaled to.

CoarseChannel.RESOLUTION_8BIT ⇒ Resolution

Kind: static property of CoarseChannel
Returns: Resolution - Resolution of an 8bit channel.

CoarseChannel.RESOLUTION_16BIT ⇒ Resolution

Kind: static property of CoarseChannel
Returns: Resolution - Resolution of a 16bit channel.

CoarseChannel.RESOLUTION_24BIT ⇒ Resolution

Kind: static property of CoarseChannel
Returns: Resolution - Resolution of a 24bit channel.

CoarseChannel.RESOLUTION_32BIT ⇒ Resolution

Kind: static property of CoarseChannel
Returns: Resolution - Resolution of a 32bit channel.

Entity

A physical entity with numerical value and unit information.

Kind: global class

new Entity(number, unit, keyword)

Creates a new Entity instance.

ParamTypeDefaultDescription
numbernumberThe numerical value.
unitstringThe unit symbol, e.g. 'Hz'. Must be the same as in the schema.
keywordstring | nullnullThe keyword if defined using a keyword. Optional.

entity.number ⇒ number

Kind: instance property of Entity
Returns: number - The numerical value of this entity.

entity.unit ⇒ string

Kind: instance property of Entity
Returns: string - The unit symbol, like "Hz" or "%".

entity.keyword ⇒ string | null

Kind: instance property of Entity
Returns: string | null - The used keyword, or null if no keyword was used.

entity.baseUnitEntity ⇒ Entity

Kind: instance property of Entity
Returns: Entity - An entity of the same value, but scaled to the base unit. Returns the entity itself if it is already in the base unit.

entity.valueOf() ⇒ number

Used to allow comparing like entity1 < entity2

Kind: instance method of Entity
Returns: number - The numerical value of this entity.

entity.toString() ⇒ string

Kind: instance method of Entity
Returns: string - The entity string that could be used in the fixture's JSON data.

entity.equals(anotherEntity) ⇒ boolean

Kind: instance method of Entity
Returns: boolean - Whether this entity exactly equals the given one.

ParamTypeDescription
anotherEntityEntityAnother Entity instance to compare with.

Entity.createFromEntityString(entityString) ⇒ Entity

Kind: static method of Entity
Returns: Entity - A new entity from the given string.
Throws:

  • Error If the entity string is invalid.
ParamTypeDescription
entityStringstringThe string for a single entity value from the JSON data. May also be a keyword.

FineChannel ⇐ AbstractChannel

Represents a finer channel of a 16+ bit channel. Also called LSB (least significant byte) channel.

Kind: global class
Extends: AbstractChannel

new FineChannel(key, coarseChannel)

Creates a new FineChannel instance.

ParamTypeDescription
keystringThe fine channel alias as defined in the coarse channel.
coarseChannelReadonly.<CoarseChannel>The coarse (MSB) channel.

fineChannel.coarseChannel ⇒ CoarseChannel

Kind: instance property of FineChannel
Returns: CoarseChannel - The coarse (MSB) channel.

fineChannel.coarserChannel ⇒ CoarseChannel | FineChannel

Kind: instance property of FineChannel
Returns: CoarseChannel | FineChannel - The next coarser channel. May also be a fine channel, if this fine channel's resolution is 24bit or higher.

fineChannel.name ⇒ string

Overrides AbstractChannel.name.

Kind: instance property of FineChannel
Overrides: name
Returns: string - A generated channel name, based upon the coarse channel's name.

fineChannel.fixture ⇒ Fixture

Overrides AbstractChannel.fixture.

Kind: instance property of FineChannel
Overrides: fixture
Returns: Fixture - The fixture this channel belongs to.

fineChannel.resolution ⇒ Resolution

Kind: instance property of FineChannel
Returns: Resolution - The resolution of this fine channel. E.g. 2 (16bit) for the first fine channel, 3 (24bit) for the second fine channel, etc.

fineChannel.defaultValue ⇒ number

Kind: instance property of FineChannel
Returns: number - The DMX value (from 0 to 255) this channel should be set to by default.

fineChannel.key ⇒ string

Kind: instance property of FineChannel
Overrides: key
Returns: string - The channel key.

fineChannel.uniqueName ⇒ string

Kind: instance property of FineChannel
Overrides: uniqueName
Returns: string - Unique version of this channel's name.
See: uniqueChannelNames

fineChannel.pixelKey ⇒ string | null

Kind: instance property of FineChannel
Overrides: pixelKey
Returns: string | null - The key of the pixel (group) that this channel is associated to. Defaults to null.

Fixture

A physical DMX device.

Kind: global class

new Fixture(manufacturer, key, jsonObject)

Create a new Fixture instance.

ParamTypeDescription
manufacturerReadonly.<Manufacturer>A Manufacturer instance.
keystringThe fixture's unique key. Equals to filename without '.json'.
jsonObjectReadonly.<object>The fixture's parsed JSON data.

fixture.manufacturer ⇒ Manufacturer

Kind: instance property of Fixture
Returns: Manufacturer - The fixture's manufacturer.

fixture.key ⇒ string

Kind: instance property of Fixture
Returns: string - The fixture's unique key. Equals to filename without '.json'.

fixture.jsonObject ⇒ object

Kind: instance property of Fixture
Returns: object - The fixture's parsed JSON data.

fixture.url ⇒ string

Kind: instance property of Fixture
Returns: string - An URL pointing to the fixture's page on the Open Fixture Library website.

fixture.name ⇒ string

Kind: instance property of Fixture
Returns: string - The fixture's product name.

fixture.hasShortName ⇒ boolean

Kind: instance property of Fixture
Returns: boolean - Whether a short name is defined for this fixture.

fixture.shortName ⇒ string

Kind: instance property of Fixture
Returns: string - A globally unique and as short as possible product name, defaults to name.

fixture.categories ⇒ Array.<string>

Kind: instance property of Fixture
Returns: Array.<string> - The fixture's categories with the most applicable one first.

fixture.mainCategory ⇒ string

Kind: instance property of Fixture
Returns: string - The fixture's most applicable category. Equals to first item of categories.

fixture.meta ⇒ Meta

Kind: instance property of Fixture
Returns: Meta - A Meta instance providing information like author or create date.

fixture.hasComment ⇒ boolean

Kind: instance property of Fixture
Returns: boolean - Whether a comment is defined for this fixture.

fixture.comment ⇒ string

Kind: instance property of Fixture
Returns: string - A comment about the fixture (often a note about an incorrectness in the manual). Defaults to an empty string.

fixture.helpWanted ⇒ string | null

Kind: instance property of Fixture
Returns: string | null - A string describing the help that is needed for this fixture, or null if no help is needed.

fixture.isHelpWanted ⇒ boolean

Kind: instance property of Fixture
Returns: boolean - True if help is needed in this fixture (maybe in a capability), false otherwise.

fixture.isCapabilityHelpWanted ⇒ boolean

Kind: instance property of Fixture
Returns: boolean - True if help is needed in a capability, false otherwise.

Kind: instance property of Fixture
Returns: Record.<string, Array.<string>> | null - An object with URL arrays, organized by link type, or null if no links are available for this fixture.

fixture.rdm ⇒ object | null

Kind: instance property of Fixture
Returns: object | null - Information about the RDM functionality of this fixture. Defaults to null.
Properties

NameTypeDescription
modelIdnumberThe RDM model/product id of the fixture, given in decimal format.
softwareVersionstring | nullThe software version used as reference in this fixture definition.

fixture.physical ⇒ Physical | null

Kind: instance property of Fixture
Returns: Physical | null - The general physical information for the fixture, may be overridden by modes.

fixture.matrix ⇒ Matrix | null

Kind: instance property of Fixture
Returns: Matrix | null - The matrix information for this fixture.

fixture.wheels ⇒ Array.<Wheel>

Kind: instance property of Fixture
Returns: Array.<Wheel> - The fixture's wheels as Wheel instances.

fixture._wheelByName ⇒ Record.<string, Wheel>

Kind: instance property of Fixture
Returns: Record.<string, Wheel> - This fixture's wheel names pointing to the respective Wheel instance.
Access: private

fixture.uniqueChannelNames ⇒ Record.<string, string>

Kind: instance property of Fixture
Returns: Record.<string, string> - Channel keys from allChannelKeys pointing to unique versions of their channel names.

fixture.availableChannelKeys ⇒ Array.<string>

Kind: instance property of Fixture
Returns: Array.<string> - Coarse channels from the fixture definition's availableChannels section. Ordered by appearance.

fixture.availableChannels ⇒ Array.<CoarseChannel>

Kind: instance property of Fixture
Returns: Array.<CoarseChannel> - Coarse channels from the fixture definition's availableChannels section. Ordered by appearance.

fixture.coarseChannelKeys ⇒ Array.<string>

Kind: instance property of Fixture
Returns: Array.<string> - Coarse channels' keys, including matrix channels' keys. If possible, ordered by appearance.

fixture.coarseChannels ⇒ Array.<CoarseChannel>

Kind: instance property of Fixture
Returns: Array.<CoarseChannel> - Coarse channels, including matrix channels. If possible, ordered by appearance.

fixture.fineChannelAliases ⇒ Array.<string>

Kind: instance property of Fixture
Returns: Array.<string> - All fine channels' aliases, including matrix fine channels' aliases. If possible, ordered by appearance.

fixture.fineChannels ⇒ Array.<FineChannel>

Kind: instance property of Fixture
Returns: Array.<FineChannel> - All fine channels, including matrix fine channels. If possible, ordered by appearance.

fixture.switchingChannelAliases ⇒ Array.<string>

Kind: instance property of Fixture
Returns: Array.<string> - All switching channels' aliases, including matrix switching channels' aliases. If possible, ordered by appearance.

fixture.switchingChannels ⇒ Array.<SwitchingChannel>

Kind: instance property of Fixture
Returns: Array.<SwitchingChannel> - All switching channels, including matrix switching channels. If possible, ordered by appearance.

fixture.templateChannelKeys ⇒ Array.<string>

Template channels are used to automatically generate channels.

Kind: instance property of Fixture
Returns: Array.<string> - All template channel keys from the fixture definition's templateChannels section. Ordered by appearance.

fixture.templateChannels ⇒ Array.<TemplateChannel>

Template channels are used to automatically generate channels.

Kind: instance property of Fixture
Returns: Array.<TemplateChannel> - TemplateChannel instances for all template channels from the fixture definition's templateChannels section. Ordered by appearance.

fixture._templateChannelByKey ⇒ Record.<string, TemplateChannel>

Kind: instance property of Fixture
Returns: Record.<string, TemplateChannel> - This fixture's template channel keys pointing to the respective template channel.
Access: private

fixture.matrixChannelKeys ⇒ Array.<string>

Kind: instance property of Fixture
Returns: Array.<string> - Keys of all resolved matrix channels.

fixture.matrixChannels ⇒ Array.<AbstractChannel>

Kind: instance property of Fixture
Returns: Array.<AbstractChannel> - All (resolved) channels with pixelKey information (including fine and switching channels).

fixture.nullChannelKeys ⇒ Array.<string>

Kind: instance property of Fixture
Returns: Array.<string> - All null channels' keys.

fixture.nullChannels ⇒ Array.<NullChannel>

Kind: instance property of Fixture
Returns: Array.<NullChannel> - Automatically generated null channels.

fixture.allChannelKeys ⇒ Array.<string>

Kind: instance property of Fixture
Returns: Array.<string> - All channel keys used in this fixture, including resolved matrix channels' keys. If possible, ordered by appearance.

fixture.allChannels ⇒ Array.<AbstractChannel>

Kind: instance property of Fixture
Returns: Array.<AbstractChannel> - All channels used in this fixture, including resolved matrix channels. If possible, ordered by appearance.

fixture.allChannelsByKey ⇒ Record.<string, AbstractChannel>

Kind: instance property of Fixture
Returns: Record.<string, AbstractChannel> - All channel keys used in this fixture pointing to the respective channel, including matrix channels. If possible, ordered by appearance.

fixture.capabilities ⇒ Array.<Capability>

Kind: instance property of Fixture
Returns: Array.<Capability> - All available channels' and template channels' capabilities.

fixture.modes ⇒ Array.<Mode>

Kind: instance property of Fixture
Returns: Array.<Mode> - The fixture's modes.

fixture.getLinksOfType(type) ⇒ Array.<string>

Kind: instance method of Fixture
Returns: Array.<string> - An array of URLs of the specified type (may be empty).

ParamTypeDescription
typestringThe type of the links that should be returned.

fixture.getWheelByName(wheelName) ⇒ Wheel | null

Kind: instance method of Fixture
Returns: Wheel | null - The wheel with the given name, or null if no wheel with the given name exists.

ParamTypeDescription
wheelNamestringThe name of the wheel.

fixture.getTemplateChannelByKey(channelKey) ⇒ TemplateChannel | null

Searches the template channel with the given key. Fine and switching template channel aliases can't be found.

Kind: instance method of Fixture
Returns: TemplateChannel | null - The corresponding template channel.

ParamTypeDescription
channelKeystringThe template channel's key

fixture.getChannelByKey(key) ⇒ AbstractChannel | null

Kind: instance method of Fixture
Returns: AbstractChannel | null - The found channel, null if not found.

ParamTypeDescription
keystringThe channel's key.

Manufacturer

A company or brand that produces fixtures. A fixture is associated to exactly one manufacturer.

Kind: global class

new Manufacturer(key, jsonObject)

Creates a new Manufacturer instance.

ParamTypeDescription
keystringThe manufacturer key. Equals to directory name in the fixtures directory.
jsonObjectReadonly.<object>The manufacturer's JSON object.

manufacturer.name ⇒ string

Kind: instance property of Manufacturer
Returns: string - The manufacturer's display name. Often used as prefix of fixture names, e.g. "cameo" + "Hydrabeam 100".

manufacturer.comment ⇒ string

Kind: instance property of Manufacturer
Returns: string - An additional description or explanation, if the name doesn't give enough information. Defaults to an empty string.

manufacturer.hasComment ⇒ boolean

Kind: instance property of Manufacturer
Returns: boolean - Whether this manufacturer has a comment.

manufacturer.website ⇒ string | null

Kind: instance property of Manufacturer
Returns: string | null - An URL pointing to the manufacturer's website (with fixture product pages).

manufacturer.rdmId ⇒ number | null

Kind: instance property of Manufacturer
Returns: number | null - The id associated to this manufacturer in the RDM protocol.

Matrix

Contains information of how the pixels in a 1-, 2- or 3-dimensional space are arranged and named.

Kind: global class

new Matrix(jsonObject)

ParamTypeDescription
jsonObjectReadonly.<object>The fixture's JSON object containing the matrix information.

matrix.jsonObject ⇒ object

Kind: instance property of Matrix
Returns: object - The fixture's JSON object containing the matrix information.

matrix.pixelCount ⇒ Array.<number>

Kind: instance property of Matrix
Returns: Array.<number> - Amount of pixels in X, Y and Z direction. A horizontal bar with 4 LEDs would be [4, 1, 1], a 5x5 pixel head would be [5, 5, 1].
Throws:

  • ReferenceError If neither pixelCount nor pixelKeys are defined in the matrix JSON object.

matrix.pixelCountX ⇒ number

Kind: instance property of Matrix
Returns: number - Amount of pixels in X direction.

matrix.pixelCountY ⇒ number

Kind: instance property of Matrix
Returns: number - Amount of pixels in Y direction.

matrix.pixelCountZ ⇒ number

Kind: instance property of Matrix
Returns: number - Amount of pixels in Z direction.

matrix.definedAxes ⇒ Array.<string>

Kind: instance property of Matrix
Returns: Array.<string> - Contains each of 'X', 'Y', 'Z' if its respective axis is defined (= if its pixelCount is > 1).

matrix.pixelKeyStructure ⇒ Array.<Array.<Array.<string>>>

Kind: instance property of Matrix
Returns: Array.<Array.<Array.<string>>> - Pixel keys by Z, Y and X position.
Throws:

  • ReferenceError if neither pixelCount nor pixelKeys are defined in the matrix JSON object.

matrix.pixelKeys ⇒ Array.<string>

Kind: instance property of Matrix
Returns: Array.<string> - All pixelKeys, ordered alphanumerically (1 < 2 < 10 < alice < bob < carol)

matrix.pixelKeyPositions ⇒ Record.<string, Array.<number>>

Kind: instance property of Matrix
Returns: Record.<string, Array.<number>> - Each pixelKey pointing to an array of its X/Y/Z position

matrix.pixelGroupKeys ⇒ Array.<string>

Kind: instance property of Matrix
Returns: Array.<string> - All available pixel group keys, ordered by appearance.

matrix.pixelGroups ⇒ Record.<string, Array.<string>>

Kind: instance property of Matrix
Returns: Record.<string, Array.<string>> - Key is the group key, value is an array of pixel keys.

matrix._getPixelDefaultKeys() ⇒ Array.<Array.<Array.<string>>>

Generate default keys for all pixels.

Kind: instance method of Matrix
Returns: Array.<Array.<Array.<string>>> - Default pixel keys by Z, Y and X position.
Access: private

matrix._getPixelDefaultKey(x, y, z) ⇒ string

Generate default name based on defined axes and given position if no custom names are set via pixelKeys.

DimensionDefault pixelKey
1D"$number"
2D"($x, $y)"
3D"($x, $y, $z)"

Kind: instance method of Matrix
Returns: string - The pixel's default key.
Throws:

Access: private

ParamTypeDescription
xnumberPosition of pixel in X direction.
ynumberPosition of pixel in Y direction.
znumberPosition of pixel in Z direction.

matrix.getPixelKeysByOrder(firstAxis, secondAxis, thirdAxis) ⇒ Array.<string>

Sorts the pixelKeys by given X/Y/Z order. Order of the parameters equals the order in a repeatFor's "eachPixelXYZ".

Kind: instance method of Matrix
Returns: Array.<string> - All pixelKeys ordered by given axis order.

ParamTypeDescription
firstAxis'X' | 'Y' | 'Z'Axis with highest ordering.
secondAxis'X' | 'Y' | 'Z'Axis with middle ordering.
thirdAxis'X' | 'Y' | 'Z'Axis with lowest ordering.

matrix._pixelKeyFulfillsConstraints(pixelKey, constraints) ⇒ boolean

Kind: instance method of Matrix
Returns: boolean - True if the pixel key fulfills all constraints, false otherwise.

ParamTypeDescription
pixelKeystringThe pixel key to check against the constraints.
constraintsobjectThe constraints to apply.

Meta

Information about a fixture's author and history.

Kind: global class

new Meta(jsonObject)

Creates a new Meta instance.

ParamTypeDescription
jsonObjectReadonly.<object>A meta object from the fixture's JSON data.

meta.authors ⇒ Array.<string>

Kind: instance property of Meta
Returns: Array.<string> - Names of people who contributed to this fixture.

meta.createDate ⇒ Date

Kind: instance property of Meta
Returns: Date - When this fixture was created. Might not refer to the creation in OFL, but in the lighting software from which this fixture was imported.

meta.lastModifyDate ⇒ Date

Kind: instance property of Meta
Returns: Date - When this fixture was changed the last time. Might not refer to a modification in OFL, but in the lighting software from which this fixture was imported.

meta.importPlugin ⇒ string | null

Kind: instance property of Meta
Returns: string | null - The key of the plugin with which this fixture was imported. Null if it's not imported.

meta.importDate ⇒ Date | null

Kind: instance property of Meta
Returns: Date | null - When this fixture was imported. Null if it's not imported.

meta.importComment ⇒ string | null

Kind: instance property of Meta
Returns: string | null - A comment further describing the import process. Null if it's not imported.

meta.hasImportComment ⇒ boolean

Kind: instance property of Meta
Returns: boolean - Whether there is an import comment. Always false if it's not imported.

Mode

A fixture's configuration that enables a fixed set of channels and channel order.

Kind: global class

new Mode(jsonObject, fixture)

Creates a new Mode instance

ParamTypeDescription
jsonObjectReadonly.<object>The mode object from the fixture's JSON data.
fixtureReadonly.<Fixture>The fixture this mode is associated to.

mode.jsonObject ⇒ object

Kind: instance property of Mode
Returns: object - The JSON data representing this mode. It's a fragment of a fixture's JSON data.

mode.fixture ⇒ Fixture

Kind: instance property of Mode
Returns: Fixture - The fixture this mode belongs to.

mode.name ⇒ string

Kind: instance property of Mode
Returns: string - The mode's name from the JSON data.

mode.shortName ⇒ string

Kind: instance property of Mode
Returns: string - A shorter mode name from the JSON data. Defaults to the normal name.

mode.hasShortName ⇒ boolean

Kind: instance property of Mode
Returns: boolean - Whether this mode has a short name set in the JSON data.

mode.rdmPersonalityIndex ⇒ number | null

Kind: instance property of Mode
Returns: number | null - The index used in the RDM protocol to reference this mode. Defaults to null.

mode.physicalOverride ⇒ Physical | null

Kind: instance property of Mode
Returns: Physical | null - Extend the fixture's physical data with this physical data object when this mode is activated. Defaults to null.

mode.physical ⇒ Physical | null

Kind: instance property of Mode
Returns: Physical | null - Fixture's physical with mode's physical override (if present) applied on. Null if neither fixture nor mode define physical data.

mode.channelKeys ⇒ Array.<string>

Kind: instance property of Mode
Returns: Array.<string> - The mode's channel keys. The count and position equals to actual DMX channel count and position.

mode.nullChannelCount ⇒ number

Kind: instance property of Mode
Returns: number - The number of null channels used in this mode.

mode.channels ⇒ Array.<AbstractChannel>

Kind: instance property of Mode
Returns: Array.<AbstractChannel> - The mode's channels. The count and position equals to actual DMX channel count and position.

mode._getMatrixChannelKeysFromInsertBlock(channelInsert) ⇒ Array.<string>

Resolves the matrix channel insert block into a list of channel keys

Kind: instance method of Mode
Returns: Array.<string> - The resolved channel keys
Access: private

ParamTypeDescription
channelInsertobjectThe JSON channel insert block

mode._getRepeatForPixelKeys(repeatFor) ⇒ Array.<string>

Resolves repeatFor keywords into a list of pixel (group) keys or just returns the given pixel (group) key array.

Kind: instance method of Mode
Returns: Array.<string> - The properly ordered list of pixel (group) keys.
Access: private

ParamTypeDescription
repeatForstring | Array.<string>A matrix channel insert's repeatFor property.

mode.getChannelIndex(channelKey, [switchingChannelBehavior]) ⇒ number

Kind: instance method of Mode
Returns: number - The index of the given channel in this mode or -1 if not found.

ParamTypeDefaultDescription
channelKeystringThe key of the channel to get the index for.
[switchingChannelBehavior]SwitchingChannelBehavior'all'Controls how switching channels are counted, see usesChannelKey for possible values.

NullChannel ⇐ CoarseChannel

Dummy channel used to represent null in a mode's channel list.

Kind: global class
Extends: CoarseChannel

new NullChannel(fixture)

Creates a new NullChannel instance by creating a Channel object with NoFunction channel data. Uses a unique uuid as channel key.

ParamTypeDescription
fixtureReadonly.<Fixture>The fixture this channel is associated to.

nullChannel.jsonObject ⇒ object

Kind: instance property of NullChannel
Overrides: jsonObject
Returns: object - The channel data from the fixture's JSON.

nullChannel.fixture ⇒ Fixture

Overrides AbstractChannel.fixture.

Kind: instance property of NullChannel
Overrides: fixture
Returns: Fixture - The fixture instance this channel is associated to.

nullChannel.name ⇒ string

Overrides AbstractChannel.name.

Kind: instance property of NullChannel
Overrides: name
Returns: string - The channel name if present or else the channel key.

nullChannel.type ⇒ string

Kind: instance property of NullChannel
Overrides: type
Returns: string - The channel type, derived from the channel's capability types.

nullChannel.color ⇒ string | null

Kind: instance property of NullChannel
Overrides: color
Returns: string | null - The color of an included ColorIntensity capability, null if there's no such capability.

nullChannel.fineChannelAliases ⇒ Array.<string>

Kind: instance property of NullChannel
Overrides: fineChannelAliases
Returns: Array.<string> - This channel's fine channel aliases, ordered by resolution (coarsest first).

nullChannel.fineChannels ⇒ Array.<FineChannel>

Kind: instance property of NullChannel
Overrides: fineChannels
Returns: Array.<FineChannel> - This channel's fine channels, ordered by resolution (coarsest first).

nullChannel.maxResolution ⇒ Resolution

Kind: instance property of NullChannel
Overrides: maxResolution
Returns: Resolution - How fine this channel can be used at its maximum. Equals the amount of coarse and fine channels.

nullChannel.dmxValueResolution ⇒ Resolution

Kind: instance property of NullChannel
Overrides: dmxValueResolution
Returns: Resolution - How fine this channel is declared in the JSON data. Defaults to maxResolution.

nullChannel.maxDmxBound ⇒ number

Kind: instance property of NullChannel
Overrides: maxDmxBound
Returns: number - The maximum DMX value in the highest possible resolution. E.g. 65535 for a 16bit channel.

nullChannel.hasDefaultValue ⇒ boolean

Kind: instance property of NullChannel
Overrides: hasDefaultValue
Returns: boolean - Whether this channel has a defaultValue.

nullChannel.defaultValue ⇒ number

Kind: instance property of NullChannel
Overrides: defaultValue
Returns: number - The DMX value this channel initially should be set to. Specified in the finest possible resolution. Defaults to 0.

nullChannel._defaultValuePerResolution ⇒ Record.<Resolution, number>

Kind: instance property of NullChannel
Overrides: _defaultValuePerResolution
Returns: Record.<Resolution, number> - The default DMX value of this channel in the given resolution, for all resolutions up to the channel's maximum resolution.
Access: private

nullChannel.hasHighlightValue ⇒ boolean

Kind: instance property of NullChannel
Overrides: hasHighlightValue
Returns: boolean - Whether this channel has a highlightValue.

nullChannel.highlightValue ⇒ number

Kind: instance property of NullChannel
Overrides: highlightValue
Returns: number - A DMX value that "highlights" the function of this channel. Specified in the finest possible resolution. Defaults to the highest possible DMX value.

nullChannel._highlightValuePerResolution ⇒ Record.<Resolution, number>

Kind: instance property of NullChannel
Overrides: _highlightValuePerResolution
Returns: Record.<Resolution, number> - The highlight DMX value of this channel in the given resolution, for all resolutions up to the channel's maximum resolution.
Access: private

nullChannel.isInverted ⇒ boolean

Kind: instance property of NullChannel
Overrides: isInverted
Returns: boolean - Whether a fader for this channel should be displayed upside down.

nullChannel.isConstant ⇒ boolean

Kind: instance property of NullChannel
Overrides: isConstant
Returns: boolean - Whether this channel should constantly stay at the same value.

nullChannel.canCrossfade ⇒ boolean

Kind: instance property of NullChannel
Overrides: canCrossfade
Returns: boolean - Whether switching from one DMX value to another in this channel can be faded smoothly.

nullChannel.precedence ⇒ 'HTP' | 'LTP'

Kind: instance property of NullChannel
Overrides: precedence
Returns: 'HTP' | 'LTP' - The channel's behavior when being affected by multiple faders: HTP (Highest Takes Precedent) or LTP (Latest Takes Precedent).

nullChannel.switchingChannelAliases ⇒ Array.<string>

Kind: instance property of NullChannel
Overrides: switchingChannelAliases
Returns: Array.<string> - Aliases of the switching channels defined by this channel, ordered by appearance in the JSON.

nullChannel.switchingChannels ⇒ Array.<SwitchingChannel>

Kind: instance property of NullChannel
Overrides: switchingChannels
Returns: Array.<SwitchingChannel> - Switching channels defined by this channel, ordered by appearance in the JSON.

nullChannel.switchToChannelKeys ⇒ Array.<string>

Kind: instance property of NullChannel
Overrides: switchToChannelKeys
Returns: Array.<string> - The keys of the channels to which the switching channels defined by this channel can be switched to.

nullChannel.capabilities ⇒ Array.<Capability>

Kind: instance property of NullChannel
Overrides: capabilities
Returns: Array.<Capability> - All capabilities of this channel, ordered by DMX range.

nullChannel.isHelpWanted ⇒ boolean

Kind: instance property of NullChannel
Overrides: isHelpWanted
Returns: boolean - True if help is needed in a capability of this channel, false otherwise.

nullChannel.key ⇒ string

Kind: instance property of NullChannel
Overrides: key
Returns: string - The channel key.

nullChannel.uniqueName ⇒ string

Kind: instance property of NullChannel
Overrides: uniqueName
Returns: string - Unique version of this channel's name.
See: uniqueChannelNames

nullChannel.pixelKey ⇒ string | null

Kind: instance property of NullChannel
Overrides: pixelKey
Returns: string | null - The key of the pixel (group) that this channel is associated to. Defaults to null.

nullChannel.ensureProperResolution(uncheckedResolution)

Checks the given resolution if it can safely be used in this channel.

Kind: instance method of NullChannel
Overrides: ensureProperResolution
Throws:

  • RangeError If the given resolution is invalid in this channel.
ParamTypeDescription
uncheckedResolutionResolutionThe resolution to be checked.

nullChannel.getResolutionInMode(mode, switchingChannelBehavior) ⇒ Resolution

Kind: instance method of NullChannel
Overrides: getResolutionInMode
Returns: Resolution - How fine this channel is used in the given mode. 0 if the channel isn't used at all.

ParamTypeDescription
modeModeThe mode in which this channel is used.
switchingChannelBehaviorSwitchingChannelBehaviorHow switching channels are treated, see getChannelIndex.

nullChannel.getDefaultValueWithResolution(desiredResolution) ⇒ number

Kind: instance method of NullChannel
Overrides: getDefaultValueWithResolution
Returns: number - The DMX value this channel initially should be set to, scaled to match the given resolution.

ParamTypeDescription
desiredResolutionResolutionThe grade of resolution the defaultValue should be scaled to.

nullChannel.getHighlightValueWithResolution(desiredResolution) ⇒ number

Kind: instance method of NullChannel
Overrides: getHighlightValueWithResolution
Returns: number - A DMX value that "highlights" the function of this channel, scaled to match the given resolution.

ParamTypeDescription
desiredResolutionResolutionThe grade of resolution the highlightValue should be scaled to.

Physical

A fixture's technical data, belonging to the hardware and not the DMX protocol.

Kind: global class

new Physical(jsonObject)

Creates a new Physical instance.

ParamTypeDescription
jsonObjectReadonly.<object>A fixture's or mode's physical JSON data.

physical.jsonObject ⇒ object

Kind: instance property of Physical
Returns: object - The object from the JSON data that is represented by this Physical object.

physical.dimensions ⇒ Array.<number> | null

Kind: instance property of Physical
Returns: Array.<number> | null - Width, height and depth of the fixture in millimeters. Defaults to null.

physical.width ⇒ number | null

Kind: instance property of Physical
Returns: number | null - Width of the fixture in millimeters. Defaults to null.

physical.height ⇒ number | null

Kind: instance property of Physical
Returns: number | null - Height of the fixture in millimeters. Defaults to null.

physical.depth ⇒ number | null

Kind: instance property of Physical
Returns: number | null - Depth of the fixture in millimeters. Defaults to null.

physical.weight ⇒ number | null

Kind: instance property of Physical
Returns: number | null - Weight of the fixture in kilograms. Defaults to null.

physical.power ⇒ number | null

Kind: instance property of Physical
Returns: number | null - Power consumption of the fixture in watts. Defaults to null.

physical.powerConnectors ⇒ Record.<string, string>

Kind: instance property of Physical
Returns: Record.<string, string> - Power connector information.

physical.DMXconnector ⇒ string | null

Kind: instance property of Physical
Returns: string | null - The DMX plug to be used to control the fixture, e.g. "3-pin" (XLR). Defaults to null.

physical.hasBulb ⇒ boolean

Kind: instance property of Physical
Returns: boolean - Whether physical data about the light source is available.

physical.bulbType ⇒ string | null

Kind: instance property of Physical
Returns: string | null - The kind of lamp that is used in the fixture, e.g. "LED". Defaults to null.

physical.bulbColorTemperature ⇒ number | null

Kind: instance property of Physical
Returns: number | null - The color temperature of the bulb in kelvins. Defaults to null.

physical.bulbLumens ⇒ number | null

Kind: instance property of Physical
Returns: number | null - The luminous flux of the bulb in lumens. Defaults to null.

physical.hasLens ⇒ boolean

Kind: instance property of Physical
Returns: boolean - Whether physical data about the lens is available.

physical.lensName ⇒ string | null

Kind: instance property of Physical
Returns: string | null - The kind of lens that is used in the fixture, e.g. "Fresnel". Defaults to null.

physical.lensDegreesMin ⇒ number | null

Kind: instance property of Physical
Returns: number | null - The minimum possible beam angle in degrees. Defaults to null.

physical.lensDegreesMax ⇒ number | null

Kind: instance property of Physical
Returns: number | null - The maximum possible beam angle in degrees. Defaults to null.

physical.hasMatrixPixels ⇒ boolean

Kind: instance property of Physical
Returns: boolean - Whether physical data about the matrix is available.

physical.matrixPixelsDimensions ⇒ Array.<number> | null

Kind: instance property of Physical
Returns: Array.<number> | null - Width, height, depth of a matrix pixel in millimeters.

physical.matrixPixelsSpacing ⇒ Array.<number> | null

Kind: instance property of Physical
Returns: Array.<number> | null - XYZ-Spacing between matrix pixels in millimeters.

Range

Represents a range from one integer to a higher or equal integer. Primarily used for DMX ranges of capabilities.

Kind: global class

new Range(rangeArray)

Creates a new Range instance.

ParamTypeDescription
rangeArrayArray.<number>Array of start and end value. Start value may not be greater than end value.

range.start ⇒ number

Kind: instance property of Range
Returns: number - The start number of the range. Lower or equal to end.

range.end ⇒ number

Kind: instance property of Range
Returns: number - The end number of the range. Higher or equal to start.

range.center ⇒ number

Kind: instance property of Range
Returns: number - The arithmetic mean of start and end value. Can be a fraction.

range.contains(value) ⇒ boolean

Kind: instance method of Range
Returns: boolean - Whether the given number is inside this range, i.e. if it's not lower than the start value and not higher than the end value.

ParamTypeDescription
valuenumberThe number to check whether it's in the range.

range.overlapsWith(range) ⇒ boolean

Kind: instance method of Range
Returns: boolean - Whether this range overlaps with the given one.

ParamTypeDescription
rangeRangeAnother Range object.

range.overlapsWithOneOf(ranges) ⇒ boolean

Kind: instance method of Range
Returns: boolean - Whether this range overlaps with any of the given ones.

ParamTypeDescription
rangesArray.<Range>An array of Range objects.

range.isAdjacentTo(range) ⇒ boolean

Kind: instance method of Range
Returns: boolean - Whether this range is exactly next to the given one, i.e. the lower range's end value is by 1 lower than the higher range's start value.

ParamTypeDescription
rangeRangeAnother Range object.

range.getRangeMergedWith(range) ⇒ Range

Kind: instance method of Range
Returns: Range - A new range that covers both the initial and the other range.

ParamTypeDescription
rangeRangeAnother range to merge with.

range.toString() ⇒ string

Kind: instance method of Range
Returns: string - Textual representation of this range.

Range.getMergedRanges(ranges) ⇒ Array.<Range>

Merge specified Range objects. Asserts that ranges don't overlap and that all ranges are valid (start<=end).

Kind: static method of Range
Returns: Array.<Range> - Merged ranges.

ParamTypeDescription
rangesArray.<Range>Range objects to merge into as few ranges as possible.

Resource

Information about a resource.

Kind: global class

new Resource(jsonObject)

Creates a new Resource instance.

ParamTypeDescription
jsonObjectReadonly.<object>An embedded resource object from the fixture's JSON data.

resource.name ⇒ string

Kind: instance property of Resource
Returns: string - The resource's name.

resource.keywords ⇒ Array.<string>

Kind: instance property of Resource
Returns: Array.<string> - An array of keywords belonging to this resource.

resource.source ⇒ string | null

Kind: instance property of Resource
Returns: string | null - The source this resource was taken from, or null if it's not specified.

resource.key ⇒ string

Kind: instance property of Resource
Returns: string - The resource key.

resource.type ⇒ string

Kind: instance property of Resource
Returns: string - The resource name, i.e. its directory.

resource.alias ⇒ string | null

Kind: instance property of Resource
Returns: string | null - The resource alias, as specified in the fixture, or null if the resource was referenced directly.

resource.hasImage ⇒ boolean

Kind: instance property of Resource
Returns: boolean - True if this resource has an associated image, false otherwise.

resource.imageExtension ⇒ string | null

Kind: instance property of Resource
Returns: string | null - The resource image's file extension, or null if there is no image.

resource.imageMimeType ⇒ string | null

Kind: instance property of Resource
Returns: string | null - The resource image's MIME type, or null if there is no image.

resource.imageData ⇒ string | null

Kind: instance property of Resource
Returns: string | null - The resource image data (base64 or utf-8 encoded), or null if there is no image.

resource.imageEncoding ⇒ 'base64' | 'utf-8' | null

Kind: instance property of Resource
Returns: 'base64' | 'utf-8' | null - The resource image's data encoding, or null if there is no image.

resource.imageDataUrl ⇒ string | null

Kind: instance property of Resource
Returns: string | null - A data URL containing the resource image, or null if there is no image.

SwitchingChannel ⇐ AbstractChannel

Represents a channel that switches its behavior depending on trigger channel's value. The different behaviors are implemented as different CoarseChannels or FineChannels.

Kind: global class
Extends: AbstractChannel

new SwitchingChannel(alias, triggerChannel)

Creates a new SwitchingChannel instance.

ParamTypeDescription
aliasstringThe unique switching channel alias as defined in the trigger channel's switchChannels properties.
triggerChannelReadonly.<AbstractChannel>The channel whose DMX value this channel depends on.

switchingChannel.triggerChannel ⇒ AbstractChannel

Kind: instance property of SwitchingChannel
Returns: AbstractChannel - The channel whose DMX value this switching channel depends on.

switchingChannel.fixture ⇒ Fixture

Overrides AbstractChannel.fixture.

Kind: instance property of SwitchingChannel
Overrides: fixture
Returns: Fixture - The fixture in which this channel is used.

switchingChannel.triggerCapabilities ⇒ Array.<TriggerCapability>

Kind: instance property of SwitchingChannel
Returns: Array.<TriggerCapability> - The trigger channel's capabilities in a compact form to only include the DMX range and which channel should be switched to. DMX values are given in the trigger channel's highest possible resolution.

switchingChannel.triggerRanges ⇒ Record.<string, Array.<Range>>

Kind: instance property of SwitchingChannel
Returns: Record.<string, Array.<Range>> - Keys of channels that can be switched to pointing to an array of DMX values the trigger channel must be set to to active the channel. DMX values are given in the trigger channel's highest possible resolution.

switchingChannel.defaultChannelKey ⇒ string

Kind: instance property of SwitchingChannel
Returns: string - The key of the channel that is activated when the trigger channel is set to its default value.

switchingChannel.defaultChannel ⇒ AbstractChannel

Kind: instance property of SwitchingChannel
Returns: AbstractChannel - The channel that is activated when the trigger channel is set to its default value.

switchingChannel.switchToChannelKeys ⇒ Array.<string>

Kind: instance property of SwitchingChannel
Returns: Array.<string> - All channel keys this channel can be switched to.

switchingChannel.switchToChannels ⇒ Array.<AbstractChannel>

Kind: instance property of SwitchingChannel
Returns: Array.<AbstractChannel> - All channels this channel can be switched to.

switchingChannel.isHelpWanted ⇒ boolean

Kind: instance property of SwitchingChannel
Returns: boolean - True if help is needed in one of the switched channels, false otherwise.

switchingChannel.key ⇒ string

Kind: instance property of SwitchingChannel
Overrides: key
Returns: string - The channel key.

switchingChannel.name ⇒ string

Override this method for more sensible implementation.

Kind: instance property of SwitchingChannel
Overrides: name
Returns: string - The channel key (as name).

switchingChannel.uniqueName ⇒ string

Kind: instance property of SwitchingChannel
Overrides: uniqueName
Returns: string - Unique version of this channel's name.
See: uniqueChannelNames

switchingChannel.pixelKey ⇒ string | null

Kind: instance property of SwitchingChannel
Overrides: pixelKey
Returns: string | null - The key of the pixel (group) that this channel is associated to. Defaults to null.

switchingChannel.usesChannelKey(channelKey, [switchingChannelBehavior]) ⇒ boolean

Kind: instance method of SwitchingChannel
Returns: boolean - Whether this SwitchingChannel contains the given channel key.

ParamTypeDefaultDescription
channelKeystringThe channel key to search for.
[switchingChannelBehavior]SwitchingChannelBehavior'all'Define which channels to include in the search.

TemplateChannel

Represents a blueprint channel of which several similar channels can be generated. Currently used to create matrix channels.

Kind: global class

new TemplateChannel(key, jsonObject, fixture)

Creates new TemplateChannel instance. Also clears cache by setting jsonObject.

ParamTypeDescription
keystringThe templateChannel's key with the required variables.
jsonObjectReadonly.<object>The template's JSON data which looks pretty similar to a normal channel's data except that channel aliases must include variables.
fixtureReadonly.<Fixture>The Fixture instance.

templateChannel.allTemplateKeys ⇒ Array.<string>

Kind: instance property of TemplateChannel
Returns: Array.<string> - Template keys and aliases introduced by this channel, i.e. the channel key itself and defined fine and switching channels.

templateChannel.possibleMatrixChannelKeys ⇒ Map.<string, Array.<string>>

Kind: instance property of TemplateChannel
Returns: Map.<string, Array.<string>> - All template keys pointing to the key resolved with each pixel key to a matrix channel key.

templateChannel.createMatrixChannels() ⇒ Array.<AbstractChannel>

Creates matrix channels from this template channel (together with its fine and switching channels if defined) and all pixel keys.

Kind: instance method of TemplateChannel
Returns: Array.<AbstractChannel> - The generated channels associated to the given pixel key and its fine and switching channels.

TemplateChannel.resolveTemplateObject(object, variables) ⇒ object

Replaces the specified variables in the specified object by cloning the object.

Kind: static method of TemplateChannel
Returns: object - A copy of the object with replaced variables.

ParamTypeDescription
objectobjectThe object which has to be modified.
variablesRecord.<string, string>Each variable (without $) pointing to its value.

TemplateChannel.resolveTemplateString(string, variables) ⇒ string

Replaces the specified variables in the specified string.

Kind: static method of TemplateChannel
Returns: string - The modified string.

ParamTypeDescription
stringstringThe string which has to be modified.
variablesRecord.<string, string>Each variable (without $) pointing to its value.

Wheel

Information about a fixture's wheel.

Kind: global class

new Wheel(wheelName, jsonObject)

Creates a new Wheel instance.

ParamTypeDescription
wheelNamestringThe wheel's name, like specified in the JSON.
jsonObjectReadonly.<object>A wheel object from the fixture's JSON data.

wheel.name ⇒ string

Kind: instance property of Wheel
Returns: string - The wheel's name.

wheel.direction ⇒ 'CW' | 'CCW'

Kind: instance property of Wheel
Returns: 'CW' | 'CCW' - The direction the wheel's slots are arranged in. Defaults to clockwise.

wheel.type ⇒ string

Kind: instance property of Wheel
Returns: string - The type of the Wheel, i.e. the most frequent slot type (except for animation gobo wheels; the wheel type is AnimationGobo there).

wheel.slots ⇒ Array.<WheelSlot>

Kind: instance property of Wheel
Returns: Array.<WheelSlot> - Array of wheel slots.

wheel.getSlot(slotNumber) ⇒ WheelSlot

Kind: instance method of Wheel
Returns: WheelSlot - The slot object. Can be a split slot object, if a non-integer index is specified.

ParamTypeDescription
slotNumbernumberThe one-based slot number.

wheel.getAbsoluteSlotIndex(slotNumber) ⇒ number

Kind: instance method of Wheel
Returns: number - The zero-based slot index, bounded by the number of slots.

ParamTypeDescription
slotNumbernumberThe one-based slot number, can be smaller than 1 and greater than the number of slots.

wheel.getSlotsOfType(type) ⇒ Array.<WheelSlot>

Kind: instance method of Wheel
Returns: Array.<WheelSlot> - All slots with the given type.

ParamTypeDescription
typestringThe wheel slot type to search for.

WheelSlot

Information about a single wheel slot (or a split slot).

Kind: global class

new WheelSlot(jsonObject, wheel, floorSlot, ceilSlot)

Creates a new WheelSlot instance.

ParamTypeDefaultDescription
jsonObjectReadonly.<object> | nullA wheel slot object from the fixture's JSON data. If null, this WheelSlot is a split slot.
wheelReadonly.<Wheel>The wheel that this slot belongs to.
floorSlotReadonly.<WheelSlot> | nullFor split slots, the WheelSlot instance at the start.
ceilSlotReadonly.<WheelSlot> | nullFor split slots, the WheelSlot instance at the end.

wheelSlot.isSplitSlot ⇒ boolean

Kind: instance property of WheelSlot
Returns: boolean - True if this WheelSlot instance represents a split slot.

wheelSlot.type ⇒ string

Kind: instance property of WheelSlot
Returns: string - The slot's type.

wheelSlot.nthOfType ⇒ number

Kind: instance property of WheelSlot
Returns: number - The zero-based index of this slot amongst all slots with the same type in this wheel.

wheelSlot.resource ⇒ Resource | string | null

Kind: instance property of WheelSlot
Returns: Resource | string | null - The gobo resource object if it was previously embedded, or the gobo resource reference string, or null if no resource is specified for the slot.

wheelSlot.name ⇒ string

Kind: instance property of WheelSlot
Returns: string - The wheel slot's name.

wheelSlot.colors ⇒ Array.<string> | null

Kind: instance property of WheelSlot
Returns: Array.<string> | null - The colors of this wheel slot, or null if this slot has no colors.

wheelSlot.colorTemperature ⇒ Entity | null

Kind: instance property of WheelSlot
Returns: Entity | null - For Color slots, the slot's color temperature. Null if this slot has no color temperature.

wheelSlot.facets ⇒ number | null

Kind: instance property of WheelSlot
Returns: number | null - For Prism slots, the number of prism facets. Null if number of facets is not defined.

wheelSlot.openPercent ⇒ Entity | null

Kind: instance property of WheelSlot
Returns: Entity | null - For Iris slots, the slot's openPercent value. Null if this slot has no openPercent value.

wheelSlot.frostIntensity ⇒ Entity | null

Kind: instance property of WheelSlot
Returns: Entity | null - For Frost slots, the slot's frost intensity. Null if this slot has no frost intensity.

wheelSlot.floorSlot ⇒ WheelSlot | null

Kind: instance property of WheelSlot
Returns: WheelSlot | null - For split slots, the floor (start) slot. Null for non-split slots.

wheelSlot.ceilSlot ⇒ WheelSlot | null

Kind: instance property of WheelSlot
Returns: WheelSlot | null - For split slots, the ceil (end) slot. Null for non-split slots.

Resolution : number

1 for 8bit, 2 for 16bit, ...

Kind: global typedef

TriggerCapability : object

Kind: global typedef
Properties

NameTypeDescription
dmxRangeRangeThe DMX range that triggers the switching channel.
switchTostringThe channel to switch to in the given DMX range.

SwitchingChannelBehavior : 'keyOnly' | 'defaultOnly' | 'switchedOnly' | 'all'

Kind: global typedef