basic pitchwheel vis

This commit is contained in:
Felix Roos 2024-04-01 15:19:50 +02:00
parent 010329dcfc
commit 8a3e9171a4
3 changed files with 122 additions and 0 deletions

View file

@ -126,3 +126,10 @@ registerWidget('_scope', (id, options = {}, pat) => {
const ctx = getCanvasWidget(id, options).getContext('2d');
return pat.tag(id).scope({ ...options, ctx, id });
});
registerWidget('_pitchwheel', (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.tag(id).pitchwheel({ ...options, ctx, id });
});