mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-23 16:54:10 +02:00
Update utility.ts
This commit is contained in:
@@ -278,8 +278,9 @@ export class ModelManager {
|
|||||||
if (newMesh.morphTargetManager != null && newMesh.morphTargetManager.numTargets > 0) {
|
if (newMesh.morphTargetManager != null && newMesh.morphTargetManager.numTargets > 0) {
|
||||||
hasMorphTarget = true;
|
hasMorphTarget = true;
|
||||||
applyMorphTargetsToMesh(newMesh);
|
applyMorphTargetsToMesh(newMesh);
|
||||||
newMesh.morphTargetManager?.dispose();
|
// 消すと選択解除した後に再度選択した時にエンジンがクラッシュする
|
||||||
newMesh.morphTargetManager = null;
|
//newMesh.morphTargetManager?.dispose();
|
||||||
|
//newMesh.morphTargetManager = null;
|
||||||
}
|
}
|
||||||
if (newMesh.parent === this.root) {
|
if (newMesh.parent === this.root) {
|
||||||
newMesh.parent = null;
|
newMesh.parent = null;
|
||||||
@@ -313,8 +314,9 @@ export class ModelManager {
|
|||||||
|
|
||||||
const merged = BABYLON.Mesh.MergeMeshes(toMerge, true, false, undefined, false, true);
|
const merged = BABYLON.Mesh.MergeMeshes(toMerge, true, false, undefined, false, true);
|
||||||
merged.parent = this.root;
|
merged.parent = this.root;
|
||||||
merged.morphTargetManager?.dispose();
|
// 消すと選択解除した後に再度選択した時にエンジンがクラッシュする
|
||||||
merged.morphTargetManager = null;
|
//merged.morphTargetManager?.dispose();
|
||||||
|
//merged.morphTargetManager = null;
|
||||||
|
|
||||||
if (!hasMorphTarget) { // https://forum.babylonjs.com/t/is-it-intentional-that-morph-targets-do-not-work-on-meshes-with-frozen-materials/63252
|
if (!hasMorphTarget) { // https://forum.babylonjs.com/t/is-it-intentional-that-morph-targets-do-not-work-on-meshes-with-frozen-materials/63252
|
||||||
merged.material.freeze();
|
merged.material.freeze();
|
||||||
|
|||||||
Reference in New Issue
Block a user