From f8e04dacede5ff861677d6cbe31bb5acf2f61ea4 Mon Sep 17 00:00:00 2001 From: Michael Chung <6252325+ArEnSc@users.noreply.github.com> Date: Thu, 4 Apr 2024 20:12:21 -0400 Subject: [PATCH] Y bot added to the scene --- app/pages/PageEnigma/js/editor.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/pages/PageEnigma/js/editor.ts b/app/pages/PageEnigma/js/editor.ts index 69167e783c..4471fbddf2 100644 --- a/app/pages/PageEnigma/js/editor.ts +++ b/app/pages/PageEnigma/js/editor.ts @@ -653,10 +653,15 @@ class Editor { // note the database from the server is the source of truth for all the data. // Test code here const object: THREE.Object3D = await this.activeScene.load_glb( - "m_9f3d3z94kk6m25zywyz6an3p43fjtw", + "m_r7w1tmkx2jg8nznr3hyzj4k6zhfh7d", ); + object.uuid = "CH1"; + // Stick Open Pose Man: m_9f3d3z94kk6m25zywyz6an3p43fjtw + // XBot: m_r7w1tmkx2jg8nznr3hyzj4k6zhfh7d + // YBot: m_9sqg0evpr23587jnr8z3zsvav1x077 + // Load timeline creates the the clips from the datastructure and loads them in here. // load object into the engine for lip syncing //this.lipsync_engine.load_object( @@ -1024,7 +1029,8 @@ class Editor { document.body.removeChild(downloadLink); const data = await this.api_manager.uploadMedia(blob, "render.mp4"); - // Create a link to download the file + // Create a link to download the file stylize video using api .. + //{"success":true,"upload_token":"mu_x9kr5cfafn512pjbygdszvbdpktrr"} payload } @@ -1095,15 +1101,16 @@ class Editor { } } + // This initializes the generation of a video render scene is where the core work happens generateVideo() { console.log("Generating video..."); if (this.rendering) { return; } + this.rendering = true; // has to go first to debounce this.startPlayback(); this.frame_buffer = []; this.render_timer = 0; - this.rendering = true; this.activeScene.renderMode(this.rendering); if (this.activeScene.hot_items) { this.activeScene.hot_items.forEach((element) => { @@ -1140,7 +1147,7 @@ class Editor { this.activeScene.scene.add(this.control); } - // Render the scene to the camera. + // Render the scene to the camera, this is called in the update. renderScene() { if (this.composer != null && !this.rendering && this.rawRenderer) { this.composer.render();