mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-24 20:18:34 +00:00
Merge pull request #916 from oscarbyrne/fix-swatch-static-paths
Fix: swatch/[name].png.js static path
This commit is contained in:
commit
70b27fbff2
@ -14,10 +14,7 @@ export async function GET({ params, request }) {
|
|||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
pianoroll({ time: 4, haps, ctx, playhead: 1, fold: 1, background: 'transparent', playheadColor: 'transparent' });
|
pianoroll({ time: 4, haps, ctx, playhead: 1, fold: 1, background: 'transparent', playheadColor: 'transparent' });
|
||||||
const buffer = canvas.toBuffer('image/png');
|
const buffer = canvas.toBuffer('image/png');
|
||||||
return {
|
return new Response(buffer);
|
||||||
body: buffer,
|
|
||||||
encoding: 'binary',
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const patterns = await getMyPatterns();
|
const patterns = await getMyPatterns();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user