From f956e65bc62e668d3a0aae5f707dbbfcc6c2e6c0 Mon Sep 17 00:00:00 2001 From: Michael Chung <6252325+ArEnSc@users.noreply.github.com> Date: Thu, 4 Apr 2024 17:12:54 -0400 Subject: [PATCH] Removed buttons that were no longer needed moved functionality to generate movie cross checking if there are odd keyframing issues. --- app/pages/PageEnigma/PageEnigmaComponent.tsx | 15 +++- .../ControlsTopButtons/ControlsTopButtons.tsx | 78 +------------------ .../contexts/TrackContext/TrackProvider.tsx | 47 +---------- app/pages/PageEnigma/js/timeline.ts | 4 +- 4 files changed, 20 insertions(+), 124 deletions(-) diff --git a/app/pages/PageEnigma/PageEnigmaComponent.tsx b/app/pages/PageEnigma/PageEnigmaComponent.tsx index b8416749c1..160c9ca07e 100644 --- a/app/pages/PageEnigma/PageEnigmaComponent.tsx +++ b/app/pages/PageEnigma/PageEnigmaComponent.tsx @@ -1,5 +1,4 @@ import { useContext } from "react"; - import { faSparkles } from "@fortawesome/pro-solid-svg-icons"; import { Button, LoadingBar, LoadingDots } from "~/components"; @@ -19,9 +18,12 @@ import { APPUI_VIEW_MODES } from "./reducers"; import { timelineHeight } from "~/pages/PageEnigma/store"; import { useSignals } from "@preact/signals-react/runtime"; import { AppUiContext } from "~/pages/PageEnigma/contexts/AppUiContext"; +import { EngineContext } from "./contexts/EngineContext"; export const PageEnigmaComponent = () => { useSignals(); + + const editorEngine = useContext(EngineContext); const [appUiState] = useContext(AppUiContext); //To prevent the click event from propagating to the canvas: TODO: HANDLE THIS BETTER? @@ -29,13 +31,20 @@ export const PageEnigmaComponent = () => { event.stopPropagation(); }; + const handleGenerateMovieClick=()=> { + if ( editorEngine != null) { + editorEngine?.generateVideo() + } else { + console.log("Tried to generate movie but editor was null") + } + }; + const lowerHeight = timelineHeight.value; return (