mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-20 00:05:32 +02:00
Update engine.ts
This commit is contained in:
@@ -203,20 +203,20 @@ class ModelManager {
|
|||||||
|
|
||||||
if (mesh instanceof BABYLON.InstancedMesh) {
|
if (mesh instanceof BABYLON.InstancedMesh) {
|
||||||
const sourceMesh = mesh.sourceMesh;
|
const sourceMesh = mesh.sourceMesh;
|
||||||
const newMesh = sourceMesh.clone(mesh.name + '_baked');
|
const realizedMesh = sourceMesh.clone(mesh.name + '_realized', null, true);
|
||||||
sourceMesh.getScene().removeMesh(newMesh);
|
realizedMesh.getScene().removeMesh(realizedMesh);
|
||||||
|
|
||||||
newMesh.position = mesh.position.clone();
|
realizedMesh.position = mesh.position.clone();
|
||||||
if (mesh.rotationQuaternion) {
|
if (mesh.rotationQuaternion) {
|
||||||
newMesh.rotationQuaternion = mesh.rotationQuaternion.clone();
|
realizedMesh.rotationQuaternion = mesh.rotationQuaternion.clone();
|
||||||
} else {
|
} else {
|
||||||
newMesh.rotation = mesh.rotation.clone();
|
realizedMesh.rotation = mesh.rotation.clone();
|
||||||
}
|
}
|
||||||
newMesh.scaling = mesh.scaling.clone();
|
realizedMesh.scaling = mesh.scaling.clone();
|
||||||
newMesh.parent = mesh.parent;
|
realizedMesh.parent = mesh.parent;
|
||||||
newMesh.setEnabled(false);
|
realizedMesh.setEnabled(false);
|
||||||
|
|
||||||
fixedMesh = newMesh;
|
fixedMesh = realizedMesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
_toMerge.push(fixedMesh);
|
_toMerge.push(fixedMesh);
|
||||||
|
|||||||
Reference in New Issue
Block a user