38 lines
615 B
TypeScript
38 lines
615 B
TypeScript
import type { SequenceObject } from '../files';
|
|
|
|
interface SequenceState {
|
|
hash : string,
|
|
name : string,
|
|
progress : number
|
|
}
|
|
|
|
export class Sequence {
|
|
private current : SequenceObject = null;
|
|
private running : boolean;
|
|
private progress : number;
|
|
private frames : number;
|
|
|
|
constructor () {}
|
|
|
|
public start () {
|
|
this.running = true;
|
|
}
|
|
|
|
public stop () {
|
|
this.running = false;
|
|
}
|
|
|
|
public isRunning () {
|
|
return this.running;
|
|
}
|
|
|
|
public getState () : SequenceState {
|
|
return {
|
|
hash : this.current.hash,
|
|
name : this.current.name,
|
|
progress : this.progress
|
|
}
|
|
}
|
|
}
|
|
|
|
export type { SequenceState }; |