Skip to content

Commit

Permalink
feat(ruhrjs): Added fixtures
Browse files Browse the repository at this point in the history
Fixes #82
  • Loading branch information
TimPietrusky committed Oct 2, 2018
1 parent 325b68b commit b2c1682
Show file tree
Hide file tree
Showing 11 changed files with 306 additions and 5 deletions.
12 changes: 10 additions & 2 deletions src/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const REMOVE_ANIMATION = uuidV1()
export const SET_ANIMATION_NAME = uuidV1()
export const ADD_KEYFRAME = uuidV1()
export const ADD_FIXTURE = uuidV1()
export const SET_FIXTURE = uuidV1()
export const SET_FIXTURE_ADDRESS = uuidV1()
export const SET_FIXTURE_PROPERTIES = uuidV1()
export const SET_ALL_FIXTURE_PROPERTIES = uuidV1()
Expand Down Expand Up @@ -73,14 +74,21 @@ export const STORAGE_STATE = 'LuminaveConfig'
export const FIXTURE_TYPES = ['EuroliteTMH8', 'FunGenerationSeParQuadLedRgbUv',
'AdjStarburst', 'CameoFlatPar1RGBW', 'CameoPixBar600PRO', 'CameoWookie200RGY',
'StairvilleAF150', 'StairvilleBowlBeam604LEDCOBMovingHead', 'JsFestMovingHeadWash',
'StairvilleOutdoorStageParTri', 'BasicColor', 'BasicFluter']
'StairvilleOutdoorStageParTri', 'BasicColor', 'BasicFluter', 'EuroliteTMH7',
'TourHazerII', 'SgmXC5', 'BasicDimmer', 'LTHLedParCob250w', 'AdjSweeperBeamQuadLed',
'RobeColorWash575EAt1_4'
]

export const FIXTURE_PROPERTIES = ['color', 'dimmer', 'strobe', 'white',
'yellow', 'uv', 'rotate', 'pan', 'tilt', 'speed', 'brightness', 'colorSpeed',
'movement', 'gobo', 'amount', 'mode', 'modvColor', 'colors', 'pattern', 'zoom',
'xAxisRolling', 'yAxisRolling', 'zAxisRolling', 'xAxisMoving', 'yAxisMoving',
'panTilt', 'panEndless', 'tiltEndless', 'sound', 'colorMacro', 'strobeMacro',
'scanSpeed', 'rgbwMacro', 'resetAuto']
'scanSpeed', 'rgbwMacro', 'resetAuto', 'pump', 'fan', 'strobeDuration', 'strobeRate',
'white1', 'white2', 'white3', 'white4', 'white5', 'tiltMacro', 'tiltMacroSpeed',
'chase', 'chaseSpeed', 'panTiltMacro', 'panTiltMacroSpeed', 'goboRotating', 'goboWheelRotating',
'goboRotation', 'prism', 'prismRotation', 'frost', 'iris', 'focus'
]

export const MIDI_TYPE_BUTTON = 'Button'
export const MIDI_TYPE_KNOB = 'Knob'
Expand Down
8 changes: 8 additions & 0 deletions src/utils/dmx-fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@ export { default as CameoFlatPar1RGBW } from './dmx/CameoFlatPar1RGBW.js'
export { default as CameoPixBar600PRO } from './dmx/CameoPixBar600PRO.js'
export { default as CameoWookie200RGY } from './dmx/CameoWookie200RGY.js'
export { default as EuroliteB100 } from './dmx/EuroliteB100.js'
export { default as EuroliteTMH7 } from './dmx/EuroliteTMH7.js'
export { default as EuroliteTMH8 } from './dmx/EuroliteTMH8.js'
export { default as FunGenerationSeParQuadLedRgbUv } from './dmx/FunGenerationSeParQuadLedRgbUv.js'
export { default as JsFestMovingHeadWash } from './dmx/JsFestMovingHeadWash.js'
export { default as StairvilleAF150 } from './dmx/StairvilleAF150.js'
export { default as StairvilleBowlBeam604LEDCOBMovingHead } from './dmx/StairvilleBowlBeam604LEDCOBMovingHead.js'
export { default as StairvilleOutdoorStageParTri } from './dmx/StairvilleOutdoorStageParTri.js'
export { default as BasicColor } from './dmx/BasicColor.js'
export { default as BasicDimmer } from './dmx/BasicDimmer.js'
export { default as BasicFluter } from './dmx/BasicFluter.js'
export { default as TourHazerII } from './dmx/TourHazerII.js'
export { default as SgmXC5 } from './dmx/SgmXC5.js'
export { default as LTHLedParCob250w } from './dmx/LTHLedParCob250w.js'
export { default as AdjSweeperBeamQuadLed } from './dmx/AdjSweeperBeamQuadLed.js'
export { default as RobeColorWash575EAt1_4 } from './dmx/RobeColorWash575EAt1_4.js'

2 changes: 1 addition & 1 deletion src/utils/dmx/AdjStarburst.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class AdjStarburst extends DmxDevice {
uv: new RangeParam(6, { min: 0, max: 255 }),

strobeMacro: new MultiRangeParam(7, {
off: { range: [0, 7] },
off: { range: [0, 7], values: [0, 7] },
on: { range: [8, 15], values: [8, 15] },
slowToFast: { range: [16, 131], values: [16, 131] },
slowOpenToFastClose: { range: [140, 181], values: [140, 181] },
Expand Down
116 changes: 116 additions & 0 deletions src/utils/dmx/AdjSweeperBeamQuadLed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
import RgbParam from '/libs/fivetwelve/lib/param/RgbParam.js'
import RangeParam from '/libs/fivetwelve/lib/param/RangeParam.js'
import MappedParam from '/libs/fivetwelve/lib/param/MappedParam.js'
import DmxDevice from './DmxDevice.js'

export default class AdjSweeperBeamQuadLed extends DmxDevice {
constructor(options) {
super(Object.assign({}, options, {
params: {
tilt: new RangeParam(1, { min: 0, max: 255 }),
tiltMacro: new RangeParam(2, { min: 0, max: 255 }),
tiltMacroSpeed: new RangeParam(3, { min: 0, max: 255 }),
chase: new MappedParam(4, AdjSweeperBeamQuadLed.CHASES),
chaseSpeed: new RangeParam(5, { min: 0, max: 255 }),
dimmer: new RangeParam(6, { min: 0, max: 255 }),
strobe: new RangeParam(7, { min: 0, max: 255 }),

led1: {
color: new RgbParam([8, 9, 10]),
white: new RangeParam(11, { min: 0, max: 255 })
},

led2: {
color: new RgbParam([12, 13, 14]),
white: new RangeParam(15, { min: 0, max: 255 })
},

led3: {
color: new RgbParam([16, 17, 18]),
white: new RangeParam(19, { min: 0, max: 255 })
},

led4: {
color: new RgbParam([20, 21, 22]),
white: new RangeParam(23, { min: 0, max: 255 })
},

led5: {
color: new RgbParam([24, 25, 26]),
white: new RangeParam(27, { min: 0, max: 255 })
},

led6: {
color: new RgbParam([28, 29, 30]),
white: new RangeParam(31, { min: 0, max: 255 })
},

led7: {
color: new RgbParam([32, 33, 34]),
white: new RangeParam(35, { min: 0, max: 255 })
},

led8: {
color: new RgbParam([36, 37, 38]),
white: new RangeParam(39, { min: 0, max: 255 })
}
}
}))

this.layout = {}
this.layout.width = 8
this.layout.height = 1

this.channels = 39
this.weight = 6.3
}

/*
* Set Color on all LEDs at once
*/
set color(value) {
this.led1.color = value
this.led2.color = value
this.led3.color = value
this.led4.color = value
this.led5.color = value
this.led6.color = value
this.led7.color = value
this.led8.color = value
}

/*
* Set white on all LEDs at once
*/
set white(value) {
this.led1.white = value
this.led2.white = value
this.led3.white = value
this.led4.white = value
this.led5.white = value
this.led6.white = value
this.led7.white = value
this.led8.white = value
}
}

AdjSweeperBeamQuadLed.CHASES = {
off: [0, 7],
chase1: [8, 22],
chase2: [23, 37],
chase3: [38, 52],
chase4: [53, 67],
chase5: [68, 82],
chase6: [83, 97],
chase7: [98, 112],
chase8: [113, 127],
chase9: [128, 142],
chase10: [143, 157],
chase11: [158, 172],
chase12: [173, 187],
chase13: [188, 202],
chase14: [203, 217],
chase15: [218, 232],
chase16: [233, 247],
full: [248, 255],
}
20 changes: 20 additions & 0 deletions src/utils/dmx/BasicDimmer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import RangeParam from '/libs/fivetwelve/lib/param/RangeParam.js'

import DmxDevice from './DmxDevice.js'

export default class BasicDimmer extends DmxDevice {
constructor(options) {
super(Object.assign({}, options, {
params: {
dimmer: new RangeParam(1, { min: 0, max: 255 }),
}
}))

this.layout = {}
this.layout.width = 1
this.layout.height = 1

this.channels = 1
this.weight = 1.2
}
}
32 changes: 32 additions & 0 deletions src/utils/dmx/EuroliteTMH7.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import RgbParam from '/libs/fivetwelve/lib/param/RgbParam.js'
import RangeParam from '/libs/fivetwelve/lib/param/RangeParam.js'
import MultiRangeParam from '/libs/fivetwelve/lib/param/MultiRangeParam.js'
import HiResParam from '/libs/fivetwelve/lib/param/HiResParam.js'

import DmxDevice from './DmxDevice.js'

/*
* @see https://www.thomann.de/gb/eurolite_led_tmh7_moving_head_wash.htm
*/
export default class EuroliteTMH8 extends DmxDevice {
constructor(options) {
super(Object.assign(options, {
params: {
pan: new HiResParam([1, 10], { min: -270, max: 270 }),
tilt: new HiResParam([2, 11], { min: -135, max: 135 }),
speed: new RangeParam(3, { min: 0, max: 255 }),
color: new RgbParam([4, 5, 6]),
// colorMacro: 7
brightness: new MultiRangeParam(8, {
dimmer: { range: [11, 20], values: [0, 255] },
strobe: { range: [31, 200], values: [0, 255] }
}),

dimmer: new RangeParam(9, { min: 0, max: 255 })
}
}))

this.channels = 11
this.weight = 3
}
}
4 changes: 2 additions & 2 deletions src/utils/dmx/InvolightStratus700.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import DmxDevice from './DmxDevice.js'
export default class InvolightStratus700 extends DmxDevice {
constructor(options) {
options.params = {
fan: new RangeParam(1),
pump: new RangeParam(2)
fan: new RangeParam(1, { min: 0, max: 255 }),
pump: new RangeParam(2, { min: 0, max: 255 })
}
super(options)

Expand Down
21 changes: 21 additions & 0 deletions src/utils/dmx/LTHLedParCob250w.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import RangeParam from '/libs/fivetwelve/lib/param/RangeParam.js'
import DmxDevice from './DmxDevice.js'

export default class LTHLedParCob250w extends DmxDevice {
constructor(options) {
super(Object.assign(options, {
params: {
dimmer: new RangeParam(1, { min: 0, max: 255 }),
strobe: new RangeParam(2, { min: 0, max: 255 }),
white1: new RangeParam(3, { min: 0, max: 255 }),
white2: new RangeParam(4, { min: 0, max: 255 }),
white3: new RangeParam(5, { min: 0, max: 255 }),
white4: new RangeParam(6, { min: 0, max: 255 }),
white5: new RangeParam(7, { min: 0, max: 255 })
}
}))

this.channels = 7
this.weight = 3.8
}
}
59 changes: 59 additions & 0 deletions src/utils/dmx/RobeColorWash575EAt1_4.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import RangeParam from '/libs/fivetwelve/lib/param/RangeParam.js'
import MappedParam from '/libs/fivetwelve/lib/param/MappedParam.js'
import HiResParam from '/libs/fivetwelve/lib/param/HiResParam.js'

import DmxDevice from './DmxDevice.js'

export default class RobeColorWash575EAt1_4 extends DmxDevice {
constructor(options) {
super(Object.assign(options, {
params: {
pan: new HiResParam([1, 2], { min: -265, max: 265 }),
tilt: new HiResParam([3, 4], { min: -140, max: 140 }),
speed: new RangeParam(5, { min: 0, max: 255 }),
// Power/Special functions 6
panTiltMacro: new MappedParam(7, RobeColorWash575EAt1_4.PANTILTMACRO),
panTiltMacroSpeed: new RangeParam(8, { min: 0, max: 255 }),
// colorWheel1 9
// colorWheel2 10
gobo: new MappedParam(11, RobeColorWash575EAt1_4.GOBOS),
goboWheelRotating: new RangeParam(12, { min: 0, max: 255 }),
goboRotation: new RangeParam(13, { min: 0, max: 255 }),
prism: new RangeParam(14, { min: 0, max: 255 }),
prismRotation: new RangeParam(15, { min: 0, max: 255 }),
frost: new RangeParam(16, { min: 0, max: 255 }),
iris: new RangeParam(17, { min: 0, max: 255 }),
zoom: new RangeParam(18, { min: 0, max: 255 }),
focus: new RangeParam(19, { min: 0, max: 255 }),
strobe: new RangeParam(20, { min: 0, max: 255 }),
dimmer: new RangeParam(21, { min: 0, max: 255 })
}
}))

this.channels = 21
this.weight = 3
}
}

RobeColorWash575EAt1_4.PANTILTMACRO = {
off: [0, 9],
circle: [32, 63],
horizontalEight: [64, 95],
verticalEight: [96, 127],
rectangle: [128, 159],
triangle: [160, 191],
fivePointedStar: [192, 223],
cross: [224, 255]
}
RobeColorWash575EAt1_4.GOBOS = {
open: [0, 1],
gobo1: [7, 8],
gobo2: [13, 14],
gobo3: [19, 20],
gobo4: [26, 27],
gobo5: [32, 33],
gobo6: [39, 40],
gobo7: [45, 46],
gobo8: [51, 52],
gobo9: [64, 65]
}
21 changes: 21 additions & 0 deletions src/utils/dmx/SgmXC5.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import RgbParam from '/libs/fivetwelve/lib/param/RgbParam.js'
import RangeParam from '/libs/fivetwelve/lib/param/RangeParam.js'

import DmxDevice from './DmxDevice.js'

export default class SgmXC5 extends DmxDevice {
constructor(options) {
super(Object.assign(options, {
params: {
strobe: new RangeParam(1, { min: 0, max: 255 }),
color: new RgbParam([2, 3, 4]),
strobeDuration: new RangeParam(5, { min: 0, max: 255 }),
strobeRate: new RangeParam(6, { min: 0, max: 255 })
// strobeEffect 7
}
}))

this.channels = 7
this.weight = 3
}
}
16 changes: 16 additions & 0 deletions src/utils/dmx/TourHazerII.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import RangeParam from '/libs/fivetwelve/lib/param/RangeParam.js'

import DmxDevice from './DmxDevice.js'

export default class TourHazerII extends DmxDevice {
constructor(options) {
options.params = {
pump: new RangeParam(1, { min: 0, max: 255 }),
fan: new RangeParam(2, { min: 0, max: 255 })
}
super(options)

this.channels = 2
this.weight = 14.5
}
}

0 comments on commit b2c1682

Please sign in to comment.