Skip to content

Commit 78c9d38

Browse files
authored
Fix performance issue on morph targets manager clone (#16899)
1 parent 2a36f70 commit 78c9d38

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/dev/core/src/Morph/morphTargetManager.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,10 +412,12 @@ export class MorphTargetManager implements IDisposable {
412412
*/
413413
public clone(): MorphTargetManager {
414414
const copy = new MorphTargetManager(this._scene);
415+
copy.areUpdatesFrozen = true;
415416

416417
for (const target of this._targets) {
417418
copy.addTarget(target.clone());
418419
}
420+
copy.areUpdatesFrozen = false;
419421

420422
copy.enablePositionMorphing = this.enablePositionMorphing;
421423
copy.enableNormalMorphing = this.enableNormalMorphing;

0 commit comments

Comments
 (0)