Bind slider handel function

This commit is contained in:
2022-05-01 13:03:49 +08:00
parent a0547095e2
commit 53ae625c92
4 changed files with 43 additions and 3 deletions
+17
View File
@@ -217,6 +217,23 @@ class Actuator extends Emitter<IActuatorEvent> {
private playTickerTimer?: number;
/**
* 设置播放进度
*/
public setPlayProcess(id: number) {
if (this.playClip && id >= 0 && id < this.playClip.frames.length) {
// 跳转值这帧
this.playFrameId = id;
this.playFrame = this.playClip.frames[this.playFrameId];
this.emit("record", this.playFrame.duration);
if (this.mod !== ActuatorModel.Play) {
this.playClip.play(this.playFrame);
}
}
}
/**
* 播放时钟
*/