spectrum widget
This commit is contained in:
parent
648fbf99fa
commit
8a33c171f5
1 changed files with 7 additions and 0 deletions
|
|
@ -133,3 +133,10 @@ registerWidget('_pitchwheel', (id, options = {}, pat) => {
|
||||||
const ctx = getCanvasWidget(id, options).getContext('2d');
|
const ctx = getCanvasWidget(id, options).getContext('2d');
|
||||||
return pat.pitchwheel({ ...options, ctx, id });
|
return pat.pitchwheel({ ...options, ctx, id });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
registerWidget('_spectrum', (id, options = {}, pat) => {
|
||||||
|
let _size = options.size || 200;
|
||||||
|
options = { width: _size, height: _size, ...options, size: _size / 5 };
|
||||||
|
const ctx = getCanvasWidget(id, options).getContext('2d');
|
||||||
|
return pat.spectrum({ ...options, ctx, id });
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue