Merge branch 'main' into patterns-tab
This commit is contained in:
commit
6c3173f45b
76 changed files with 2981 additions and 531 deletions
|
|
@ -18,6 +18,7 @@ function useStrudel({
|
|||
canvasId,
|
||||
drawContext,
|
||||
drawTime = [-2, 2],
|
||||
paintOptions = {},
|
||||
}) {
|
||||
const id = useMemo(() => s4(), []);
|
||||
canvasId = canvasId || `canvas-${id}`;
|
||||
|
|
@ -88,9 +89,9 @@ function useStrudel({
|
|||
(pattern, time, haps, drawTime) => {
|
||||
const { onPaint } = pattern.context || {};
|
||||
const ctx = typeof drawContext === 'function' ? drawContext(canvasId) : drawContext;
|
||||
onPaint?.(ctx, time, haps, drawTime);
|
||||
onPaint?.(ctx, time, haps, drawTime, paintOptions);
|
||||
},
|
||||
[drawContext, canvasId],
|
||||
[drawContext, canvasId, paintOptions],
|
||||
);
|
||||
|
||||
const drawFirstFrame = useCallback(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue