1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-24 05:44:12 +02:00
This commit is contained in:
syuilo
2026-02-13 14:10:02 +09:00
parent efd101d0a0
commit 8665923337
2 changed files with 13 additions and 2 deletions

View File

@@ -25,6 +25,10 @@ const canvas = useTemplateRef('canvas');
let engine: RoomEngine;
function resize() {
if (engine != null) engine.resize();
}
onMounted(() => {
engine = new RoomEngine({
roomType: 'default',
@@ -184,10 +188,14 @@ onMounted(() => {
engine.init();
canvas.value!.focus();
window.addEventListener('resize', resize);
});
onUnmounted(() => {
engine.destroy();
window.removeEventListener('resize', resize);
});
function onKeydown(ev: KeyboardEvent) {