Merge branch 'main' into test

This commit is contained in:
ArEnSc authored and GitHub committed 2024-03-29 19:32:03 -04:00
commit f71e9d76d8
6 files changed
+6 -33

No files matched your search

+1
View File
@@ -27,6 +27,7 @@ export const SidePanel = ({ children }: Props) => {
<div className="relative w-[23.5rem] h-full">
{children}
</div>
</div>
);
};
@@ -1,5 +1,3 @@
import { useContext } from "react";
import {
faBackwardFast,
faBackwardStep,
@@ -7,12 +5,9 @@ import {
faForwardStep,
faPlay,
} from "@fortawesome/pro-solid-svg-icons";
import { EngineContext } from "../../contexts/EngineContext";
import { ButtonIcon } from "~/components";
export const ControlsVideo = () => {
const editorEngine = useContext(EngineContext);
const handleBackwardFast = () => {
console.log("Controls Video: Backward-Fast clicked");
};
@@ -21,8 +16,6 @@ export const ControlsVideo = () => {
};
const handlePlay = () => {
console.log("Controls Video: Play clicked");
editorEngine?.startPlayback();
};
const handleForwardStep = () => {
console.log("Controls Video: Forward-Step clicked");
-24
View File
@@ -1,24 +0,0 @@
import { useContext, useEffect, useState } from "react";
import { faSparkles } from "@fortawesome/pro-solid-svg-icons";
import { TopBarHelmet } from "~/modules/TopBarHelmet/TopBarHelmet";
import { Button } from "~/components";
import { EngineContext } from "../contexts/EngineContext";
export const Helmet = () => {
const [helmetKey, setHelmetKey] = useState<number>(Date.now());
const engineContext = useContext(EngineContext);
const handleGenerateVideo = () => {
engineContext?.generateVideo();
};
useEffect(()=>{
setHelmetKey(Date.now());
},[engineContext]);
return (
<TopBarHelmet key={helmetKey}>
<Button icon={faSparkles} onClick={handleGenerateVideo}>Generate Movie</Button>
</TopBarHelmet>
);
}
@@ -8,7 +8,7 @@ export const PreviewEngineCamera = ()=>{
const [showLoader, setShowLoader] = useState<boolean>(true);
useEffect(()=>{
setTimeout(()=>setShowLoader(false), 500);
setTimeout(()=>setShowLoader(false), 5000);
},[]);
return (
<div
@@ -74,16 +74,19 @@ export class AnimationClip {
this.clip_action.play();
}
}
console.log("Play")
}
}
step(deltatime: number) {
if (this.mixer == null) { return; }
this.mixer?.update(deltatime);
console.log("Update")
}
stop() {
this.mixer?.stopAllAction();
console.log("stop.")
}
toJSON(): string {
+1 -1
View File
@@ -162,7 +162,7 @@ class APIManager {
* @param media_file_token
* @returns
*/
public async getMediaFile(media_file_token: string): Promise<string> {
private async getMediaFile(media_file_token: string): Promise<string> {
let api_base_url = "https://api.fakeyou.com";
let url = `${api_base_url}/v1/media_files/file/${media_file_token}`;
let response = await fetch(url);