1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-26 05:35:22 +02:00
This commit is contained in:
syuilo
2026-05-21 21:23:05 +09:00
parent c85ee681bb
commit 73d6764a0b
13 changed files with 19 additions and 3 deletions

View File

@@ -243,6 +243,7 @@ export class ObjectContainer {
this.model = null;
this.subRoot?.dispose();
this.root.removeChild(this.subRoot);
this.scene.removeTransformNode(this.subRoot);
this.timer = new Timer();
@@ -263,10 +264,12 @@ export class ObjectContainer {
}
public destroy() {
this.sr.disableSnapshotRendering();
this.timer.dispose();
this.instance?.dispose?.();
this.subRoot?.dispose();
this.root.dispose(true);
this.subRoot.dispose();
this.root.dispose();
this.scene.removeTransformNode(this.root);
this.sr.enableSnapshotRendering();
}
}

View File

@@ -145,6 +145,7 @@ export const allInOnePc = defineObject({
dispose: () => {
light.dispose();
if (lc != null) lc.removeLight(light);
scene.removeLight(light); // lc使用時はsceneには追加してないはずだが、これがないとクラッシュする babylonのバグ
},
};
},

View File

@@ -33,6 +33,7 @@ export const beamLamp = defineObject({
dispose: () => {
light.dispose();
if (lc != null) lc.removeLight(light);
scene.removeLight(light); // lc使用時はsceneには追加してないはずだが、これがないとクラッシュする babylonのバグ
},
};
},

View File

@@ -134,6 +134,8 @@ export const desktopPc = defineObject({
lc.removeLight(light1);
lc.removeLight(light2);
}
scene.removeLight(light1); // lc使用時はsceneには追加してないはずだが、これがないとクラッシュする babylonのバグ
scene.removeLight(light2); // lc使用時はsceneには追加してないはずだが、これがないとクラッシュする babylonのバグ
},
};
},

View File

@@ -130,6 +130,7 @@ export const ductRailSpotLights = defineObject({
for (const light of lights) {
light.dispose();
if (lc != null) lc.removeLight(light);
scene.removeLight(light); // lc使用時はsceneには追加してないはずだが、これがないとクラッシュする babylonのバグ
}
},
};

View File

@@ -170,6 +170,7 @@ export const laptopPc = defineObject({
dispose: () => {
light.dispose();
if (lc != null) lc.removeLight(light);
scene.removeLight(light); // lc使用時はsceneには追加してないはずだが、これがないとクラッシュする babylonのバグ
},
};
},

View File

@@ -157,6 +157,7 @@ export const lavaLamp = defineObject({
dispose: () => {
light.dispose();
if (lc != null) lc.removeLight(light);
scene.removeLight(light); // lc使用時はsceneには追加してないはずだが、これがないとクラッシュする babylonのバグ
if (animationObserver != null) {
scene.onAfterAnimationsObservable.remove(animationObserver);
}

View File

@@ -133,6 +133,7 @@ export const monitor = defineObject({
dispose: () => {
light.dispose();
if (lc != null) lc.removeLight(light);
scene.removeLight(light); // lc使用時はsceneには追加してないはずだが、これがないとクラッシュする babylonのバグ
},
};
},

View File

@@ -115,6 +115,7 @@ export const spotLight = defineObject({
dispose: () => {
light.dispose();
if (lc != null) lc.removeLight(light);
scene.removeLight(light); // lc使用時はsceneには追加してないはずだが、これがないとクラッシュする babylonのバグ
},
};
},

View File

@@ -99,6 +99,7 @@ export const tv = defineObject({
dispose: () => {
light.dispose();
if (lc != null) lc.removeLight(light);
scene.removeLight(light); // lc使用時はsceneには追加してないはずだが、これがないとクラッシュする babylonのバグ
},
};
},

View File

@@ -116,6 +116,7 @@ export const wallMountSpotLight = defineObject({
dispose: () => {
light.dispose();
if (lc != null) lc.removeLight(light);
scene.removeLight(light); // lc使用時はsceneには追加してないはずだが、これがないとクラッシュする babylonのバグ
},
};
},

View File

@@ -109,8 +109,9 @@ export const woodRingFloorLamp = defineObject({
for (const light of lights) {
light.dispose();
if (lc != null) lc.removeLight(light);
scene.removeLight(light); // lc使用時はsceneには追加してないはずだが、これがないとクラッシュする babylonのバグ
}
}
},
};
},
});

View File

@@ -129,6 +129,7 @@ export const woodRingsPendantLight = defineObject({
dispose: () => {
light.dispose();
if (lc != null) lc.removeLight(light);
scene.removeLight(light); // lc使用時はsceneには追加してないはずだが、これがないとクラッシュする babylonのバグ
},
};
},