1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-13 12:55:30 +02:00

Update engine.ts

This commit is contained in:
syuilo
2026-04-03 19:49:15 +09:00
parent f5ebbbca50
commit b89fc36cd0

View File

@@ -203,20 +203,20 @@ class ModelManager {
if (mesh instanceof BABYLON.InstancedMesh) {
const sourceMesh = mesh.sourceMesh;
const newMesh = sourceMesh.clone(mesh.name + '_baked');
sourceMesh.getScene().removeMesh(newMesh);
const realizedMesh = sourceMesh.clone(mesh.name + '_realized', null, true);
realizedMesh.getScene().removeMesh(realizedMesh);
newMesh.position = mesh.position.clone();
realizedMesh.position = mesh.position.clone();
if (mesh.rotationQuaternion) {
newMesh.rotationQuaternion = mesh.rotationQuaternion.clone();
realizedMesh.rotationQuaternion = mesh.rotationQuaternion.clone();
} else {
newMesh.rotation = mesh.rotation.clone();
realizedMesh.rotation = mesh.rotation.clone();
}
newMesh.scaling = mesh.scaling.clone();
newMesh.parent = mesh.parent;
newMesh.setEnabled(false);
realizedMesh.scaling = mesh.scaling.clone();
realizedMesh.parent = mesh.parent;
realizedMesh.setEnabled(false);
fixedMesh = newMesh;
fixedMesh = realizedMesh;
}
_toMerge.push(fixedMesh);