mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
Merge branch 'main' into test
This commit is contained in:
6 files changed
+6
-33
No files matched your search
@@ -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");
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user