forked from mirror/misskey
59255e11b8
* #10781 * fix tsconfig * fetch image?? * Revert "fetch image??" This reverts commit0925c28d5a
. * wip * Revert "wip" This reverts commitbe97c6cb88
. * loading="eager" * loading="eager" 2 * error * wip * wip * wip * wip * clean up * fix * 生成するworkerを1つにする? * clean up * use buraha * wip * smaller width, height * update buraha * clean up * fix * Update MkMediaImage.vue * Update MkImgWithBlurhash.vue * Revert "fix(frontend): センシティブ設定された画像を開くとき一瞬レイアウトが崩れる問題を修正" This reverts commit41e9aa6f9b
. * Update MkMediaList.vue * Update MkMediaList.vue * Update MkMediaList.vue * Update CHANGELOG.md * wait for decode * fix * ? * (test) remove container-type: inline-size; * Revert "(test) remove container-type: inline-size;" This reverts commit9448e64228
. * container-name * Revert "container-name" This reverts commit94385d3221
. * width: 100%; * improve performance * refactor * wip * WIP * wip * Revert "wip" This reverts commit36e3b75cab
. * Revert "WIP" This reverts commit05b729ef91
. * Revert "wip" This reverts commit0801e79361
. * #10860 * wip * no worker * Revert "no worker" This reverts commita9c49e4fb4
. * ✌️ * workerNumber固定は不要 --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
16 lines
501 B
TypeScript
16 lines
501 B
TypeScript
import { render } from 'buraha';
|
|
|
|
onmessage = (event) => {
|
|
// console.log(event.data);
|
|
if (!('id' in event.data && typeof event.data.id === 'string')) {
|
|
return;
|
|
}
|
|
if (!('hash' in event.data && typeof event.data.hash === 'string')) {
|
|
return;
|
|
}
|
|
const work = new OffscreenCanvas(event.data.width ?? 64, event.data.height ?? 64);
|
|
render(event.data.hash, work);
|
|
const bitmap = work.transferToImageBitmap();
|
|
postMessage({ id: event.data.id, bitmap });
|
|
};
|