-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from NERDDISCO/next
Next
- Loading branch information
Showing
15 changed files
with
1,970 additions
and
45 deletions.
There are no files selected for viewing
1,674 changes: 1,674 additions & 0 deletions
1,674
docs/configs/LuminveConfig_dunarnia_budapest_dec14_2019.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
import { LitElement, html } from 'lit-element' | ||
import { shared } from '../../styles/shared.js' | ||
|
||
/* | ||
* Show DMX512 channels in a grid | ||
*/ | ||
class ChannelGrid extends LitElement { | ||
static get properties() { | ||
return { | ||
channels: { type: Array }, | ||
refresh: { type: Boolean } | ||
} | ||
} | ||
|
||
/** | ||
* When the value of a speicifc channel is updated, we send out an event. | ||
* | ||
* @param {Object} e - The event that contains the channel and it's value | ||
*/ | ||
handleChange(e) { | ||
const { value } = e.target | ||
const { channelIndex } = e.target.dataset | ||
const channelValue = parseInt(value, 10) | ||
|
||
this.dispatchEvent(new CustomEvent('update-channel', { | ||
detail: { | ||
channelIndex, | ||
channelValue | ||
} | ||
})) | ||
} | ||
|
||
shouldUpdate(changedProps) { | ||
const { refresh } = this | ||
|
||
// Make sure that when refresh is changed (especially to false) | ||
// that the component renders at least once so that something is visible for the user | ||
if (changedProps.has('refresh')) { | ||
return true | ||
} | ||
|
||
return refresh | ||
} | ||
|
||
render() { | ||
const { channels } = this | ||
|
||
return html` | ||
${shared} | ||
<style> | ||
.items { | ||
counter-reset: universe; | ||
} | ||
.item { | ||
flex: 0 0 3em; | ||
position: relative; | ||
padding: 0 .25em 0 1.75em; | ||
} | ||
.item:before { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
counter-increment: universe; | ||
content: counter(universe); | ||
font-size: 0.65em; | ||
opacity: 0.7; | ||
} | ||
</style> | ||
<div class="items"> | ||
${channels.map((channel, index) => html` | ||
<div class="item"> | ||
<input | ||
type="number" | ||
min=0 | ||
max=255 | ||
.value="${channel}" | ||
data-channel-index="${index}" | ||
@change="${e => this.handleChange(e)}" | ||
/> | ||
</div> | ||
` | ||
)} | ||
</div> | ||
` | ||
} | ||
|
||
} | ||
|
||
customElements.define('channel-grid', ChannelGrid) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import RgbParam from './param/RgbParam.js' | ||
import RangeParam from 'fivetwelve/lib/param/RangeParam.js' | ||
|
||
import DmxDevice from './DmxDevice.js' | ||
|
||
export default class BasicLedBar extends DmxDevice { | ||
constructor(options) { | ||
super(Object.assign({}, options, { | ||
params: { | ||
color: new RgbParam([1, 2, 3]), | ||
white: new RangeParam(4, { min: 0, max: 255 }), | ||
dimmer: new RangeParam(5, { min: 0, max: 255 }), | ||
strobe: new RangeParam(6, { min: 0, max: 255 }) | ||
} | ||
})) | ||
|
||
this.layout = {} | ||
this.layout.width = 1 | ||
this.layout.height = 1 | ||
|
||
this.channels = 6 | ||
this.weight = 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import RgbParam from './param/RgbParam.js' | ||
import RangeParam from 'fivetwelve/lib/param/RangeParam.js' | ||
|
||
import DmxDevice from './DmxDevice.js' | ||
|
||
export default class InvolightMovingBar1808 extends DmxDevice { | ||
constructor(options) { | ||
super(Object.assign({}, options, { | ||
params: { | ||
tilt: new RangeParam(1, { min: 0, max: 255 }), | ||
tiltSpeed: new RangeParam(2, { min: 0, max: 255 }), | ||
// 3: Program | ||
// 4: Program Speed | ||
dimmer: new RangeParam(5, { min: 0, max: 255 }), | ||
strobe: new RangeParam(6, { min: 0, max: 255 }), | ||
color: new RgbParam([7, 8, 9]), | ||
white: new RangeParam(10, { min: 0, max: 255 }) | ||
} | ||
})) | ||
|
||
this.layout = {} | ||
this.layout.width = 1 | ||
this.layout.height = 1 | ||
|
||
this.channels = 10 | ||
this.weight = 1.2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import RgbParam from './param/RgbParam.js' | ||
import RangeParam from 'fivetwelve/lib/param/RangeParam.js' | ||
|
||
import DmxDevice from './DmxDevice.js' | ||
|
||
export default class InvolightSlimPar784 extends DmxDevice { | ||
constructor(options) { | ||
super(Object.assign({}, options, { | ||
params: { | ||
color: new RgbParam([1, 2, 3]), | ||
white: new RangeParam(4, { min: 0, max: 255 }), | ||
dimmer: new RangeParam(5, { min: 0, max: 255 }), | ||
strobe: new RangeParam(6, { min: 0, max: 255 }) | ||
} | ||
})) | ||
|
||
this.layout = {} | ||
this.layout.width = 1 | ||
this.layout.height = 1 | ||
|
||
this.channels = 6 | ||
this.weight = 1.2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import RgbParam from './param/RgbParam.js' | ||
import RangeParam from 'fivetwelve/lib/param/RangeParam.js' | ||
|
||
import DmxDevice from './DmxDevice.js' | ||
|
||
export default class ShowtecHelixQ4000 extends DmxDevice { | ||
constructor(options) { | ||
super(Object.assign({}, options, { | ||
params: { | ||
color: new RgbParam([1, 2, 3]), | ||
white: new RangeParam(4, { min: 0, max: 255 }) | ||
} | ||
})) | ||
|
||
this.layout = {} | ||
this.layout.width = 1 | ||
this.layout.height = 1 | ||
|
||
this.channels = 4 | ||
this.weight = 0 | ||
} | ||
} |
Oops, something went wrong.