Add record function

This commit is contained in:
2022-04-29 22:10:45 +08:00
parent 776a5f571e
commit 5a3ec7d2af
8 changed files with 162 additions and 18 deletions
+2
View File
@@ -11,6 +11,7 @@ enum ActuatorModel {
interface IActuatorEvent {
startChange: boolean;
record: number;
loop: number;
}
@@ -130,6 +131,7 @@ class Actuator extends Emitter<IActuatorEvent> {
this.mod === ActuatorModel.Offline
) {
this.recordClip?.record(this.alignTimer * this.speed);
this.emit("record", this.alignTimer);
}
this.emit("loop", this.alignTimer);
+6
View File
@@ -24,6 +24,11 @@ class Clip {
public id: string;
/**
* 时间
*/
public time: number = 0;
/**
* 用户自定义名称
*/
@@ -76,6 +81,7 @@ class Clip {
duration: t
};
this.time += t;
this.frames.push(frame);
return frame;