mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 16:52:43 +08:00
split present() from root.frameMove() (#4647)
This commit is contained in:
@@ -1071,12 +1071,15 @@ class Director extends EventTarget {
|
||||
this._physicsSystem!.update(this._deltaTime);
|
||||
|
||||
this.emit(cc.Director.EVENT_BEFORE_DRAW);
|
||||
this._root!.frameMove(this._deltaTime); // Render
|
||||
this._root!.frameMove(this._deltaTime);
|
||||
this.emit(cc.Director.EVENT_AFTER_DRAW);
|
||||
|
||||
eventManager.frameUpdateListeners();
|
||||
if (this._scene) { this._scene.resetHasChanged(); }
|
||||
this._totalFrames++;
|
||||
|
||||
// Present current frame
|
||||
this._root!.device.present();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -281,7 +281,7 @@ export class Root {
|
||||
}
|
||||
}
|
||||
|
||||
this._device.present();
|
||||
// this._device.present();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user