Merge branch 'master' of github.com:jean-emmanuel/open-stage-control

This commit is contained in:
bordun 2020-04-19 10:49:03 +02:00
commit 00b86d08cd
5 changed files with 6 additions and 3 deletions

View file

@ -20,6 +20,7 @@ module.exports = class Visualizer extends StaticProperties(Plot, {rangeX: {min:
_visualizer:'visualizer',
duration: {type: 'number', value: 1, help: 'Defines visualization duration in seconds'},
framerate: {type: 'number', value: 30, help: 'Defines visualization framerate'},
rangeY: {type: 'object', value: {min:0,max:1}, help: 'Defines the min and max values for the y axis'},
origin: {type: 'number', value: 'auto', help: 'Defines the y axis origin. Set to `false` to disable it'},
logScaleY: {type: 'boolean|number', value: false, help: 'Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm\'s base.'},
@ -33,7 +34,7 @@ module.exports = class Visualizer extends StaticProperties(Plot, {rangeX: {min:
super(options)
this.fps = CANVAS_FRAMERATE
this.fps = clip(this.getProp('framerate'), [1, CANVAS_FRAMERATE])
this.length = Math.round(clip(this.fps * this.getProp('duration'), [8, 4096]))
this.value = new Array(this.length).fill(this.rangeY.min)
this.cancel = false

View file

@ -319,7 +319,7 @@ module.exports = {
var targets = []
if (shortdata.i && settings.read('send') && !shortdata.target) Array.prototype.push.apply(targets, settings.read('send'))
if (!shortdata.i && settings.read('send') && !shortdata.target) Array.prototype.push.apply(targets, settings.read('send'))
if (data.target) Array.prototype.push.apply(targets, data.target)
data.args = data.preArgs ? data.preArgs.concat(value) : [value]