mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 17:58:55 +00:00
Timeline keyframe scrub events
This commit is contained in:
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}
|
||||
}
|
||||
@@ -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'];
|
||||
|
||||
|
||||
Reference in new issue
Block a user