xy: add sendosc
This commit is contained in:
parent
97b58abd06
commit
b1a9752677
1 changed files with 15 additions and 1 deletions
|
|
@ -1,5 +1,7 @@
|
|||
var _pads_base = require('./_pads_base'),
|
||||
Fader = require('./_fake_fader')
|
||||
Fader = require('./_fake_fader'),
|
||||
{sendOsc} = require('../utils')
|
||||
|
||||
|
||||
|
||||
module.exports.options = {
|
||||
|
|
@ -81,6 +83,18 @@ Xy.prototype = Object.create(_pads_base.prototype)
|
|||
|
||||
Xy.prototype.constructor = Xy
|
||||
|
||||
Xy.prototype.sendValue = function() {
|
||||
var args = this.widgetData.preArgs.concat(this.value)
|
||||
|
||||
sendOsc({
|
||||
target:this.widgetData.target,
|
||||
path:this.widgetData.path,
|
||||
precision:this.widgetData.precision,
|
||||
args:args
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
module.exports.create = function(widgetData) {
|
||||
var xy = new Xy(widgetData)
|
||||
return xy.widget
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue