fixed timeline scene reset & camera view selection.

This commit is contained in:
Quicksticks-oss committed 2024-03-30 16:15:19 -04:00
1 parent 05ebad745b
commit 7a9f0d0d39
3 files changed
+13 -1

No files matched your search

@@ -113,6 +113,11 @@ step() {
}
reset() {
if (this.lipsync.face != undefined) {
this.lipsync.face.morphTargetInfluences[this.blendshape_helper.ee] = 0;
this.lipsync.face.morphTargetInfluences[this.blendshape_helper.ah] = 0
this.lipsync.face.morphTargetInfluences[this.blendshape_helper.oh] = 0;
}
this.lipsync = new LipSync();
}
+3 -1
View File
@@ -512,11 +512,12 @@ class Editor {
if (this.cameraViewControls) {
this.cameraViewControls.enabled = true;
}
this.cam_obj.scale.set(0,0,0);
if (this.activeScene.hot_items) {
this.activeScene.hot_items.forEach((element) => {
element.visible = false;
});
}
} else {
this.camera.position.copy(this.last_cam_pos);
@@ -530,6 +531,7 @@ class Editor {
if (this.cameraViewControls) {
this.cameraViewControls.enabled = false;
}
this.cam_obj.scale.set(1,1,1);
if (this.activeScene.hot_items) {
this.activeScene.hot_items.forEach((element) => {
element.visible = true;
+5
View File
@@ -130,6 +130,7 @@ export class TimeLine {
this.audio_engine.loadClip(element.media_id);
}
else if (element.type == "animation") {
this.animation_engine.clips[element.object_uuid].stop();
}
else if (element.type == "lipsync") {
this.lipSync_engine.clips[element.object_uuid].reset();
@@ -199,6 +200,10 @@ export class TimeLine {
this.stop()
}
}
if (this.scrubber_frame_position >= this.timeline_limit) {
await this.resetScene();
}
}
private async stop(): Promise<void> {