mirror of
https://github.com/misskey-dev/misskey
synced 2024-11-27 22:38:39 +09:00
wip
This commit is contained in:
parent
05b729ef91
commit
36e3b75cab
@ -136,6 +136,8 @@ async function draw() {
|
||||
worker.postMessage({
|
||||
id: viewId,
|
||||
hash: props.hash,
|
||||
width: canvasWidth,
|
||||
height: canvasHeight,
|
||||
});
|
||||
} else {
|
||||
try {
|
||||
|
@ -8,7 +8,7 @@ onmessage = async (event) => {
|
||||
if (!('hash' in event.data && typeof event.data.hash === 'string')) {
|
||||
return;
|
||||
}
|
||||
const work = new OffscreenCanvas(canvas.width, canvas.height);
|
||||
const work = new OffscreenCanvas(event.data.width ?? 64, event.data.height ?? 64);
|
||||
render(event.data.hash, work);
|
||||
const bitmap = await createImageBitmap(work);
|
||||
postMessage({ id: event.data.id, bitmap });
|
||||
|
Loading…
Reference in New Issue
Block a user