Timeline keyframe scrub events

This commit is contained in:
Michael Chung committed 2024-03-30 22:53:01 -04:00
1 parent cb4b153897
commit 5b57423598
2 files changed
+19

No files matched your search

@@ -14,5 +14,7 @@ export enum toEngineActions {
UPDATE_CLIP = "update_clip",
// data=QueueClip
UPDATE_TIME = "update_time",
ADD_KEYFRAME = "add_keyframe",
// data={currentTime: number}
}
+17
View File
@@ -96,6 +96,9 @@ export class TimeLine {
public async handleTimelineActions(data: any) {
const action = data["action"]
switch (action) {
case toEngineActions.ADD_KEYFRAME:
await this.addKeyFrame(data)
break
case toEngineActions.ADD_CLIP:
await this.addClip(data)
break
@@ -117,6 +120,20 @@ export class TimeLine {
}
public async addKeyFrame(data: any) {
// KeyFrame Object
// version: number;
// clip_uuid: string;
// group: ClipGroup;
// object_uuid?: string;
// offset: number;
// position: XYZ
// rotation: XYZ;
// scale: XYZ;
// selected?: boolean;
}
public async addClip(data: any) {
let object_uuid = data['data']['object_uuid'];