Add record function
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user