feat:add clear method for AnimationGraphPartialPreviewer (#15441)

* feat : add clearVariables method for AnimationGraphPartialPreviewer

* clear motionRecords too
This commit is contained in:
dogeFu
2023-06-14 18:41:19 +08:00
committed by GitHub
parent 9935f8ba51
commit f736b87db8
+5
View File
@@ -27,6 +27,11 @@ class AnimationGraphPartialPreviewer {
this._dummyAnimationController.node.destroy();
}
public clear() {
this._varInstances = {};
this._motionRecords = [];
}
public evaluate() {
const { _evaluationContext: evaluationContext } = this;
const pose = this.doEvaluate(evaluationContext);