mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-08 11:01:35 +00:00
preview window for camera
This commit is contained in:
1 parent
4557aa1674
commit
d94f8b5c6e
4 files changed
+40
-10
No files matched your search
@@ -9,6 +9,7 @@ import { SidePanel } from "~/modules/SidePanel";
|
||||
import { Controls3D } from "./comps/Controls3D";
|
||||
import { ControlsTopButtons } from "./comps/ControlsTopButtons";
|
||||
import { ControlsVideo } from "./comps/ControlsVideo";
|
||||
import { PreviewWindow } from "./comps/PreviewWindow";
|
||||
import { Timeline } from "./comps/Timeline";
|
||||
import { SidePanelTabs } from "./comps/SidePanelTabs";
|
||||
|
||||
@@ -74,6 +75,7 @@ export const PageEnigma = () => {
|
||||
|
||||
{/* Bottom controls */}
|
||||
<div className="absolute bottom-0 left-0 w-full">
|
||||
<PreviewWindow />
|
||||
<ControlsVideo />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,16 +24,14 @@ export const ControlsVideo = () => {
|
||||
console.log("Controls Video: Forward-Fast clicked");
|
||||
};
|
||||
return (
|
||||
<div>
|
||||
<div className="flex justify-center">
|
||||
<div className="rounded-t-lg border-x border-t border-ui-panel-border bg-ui-controls p-2 text-white">
|
||||
<div className="flex content-center gap-2">
|
||||
<ButtonIcon icon={faBackwardFast} onClick={handleBackwardFast} />
|
||||
<ButtonIcon icon={faBackwardStep} onClick={handleBackwardStep} />
|
||||
<ButtonIcon icon={faPlay} onClick={handlePlay} />
|
||||
<ButtonIcon icon={faForwardStep} onClick={handleForwardStep} />
|
||||
<ButtonIcon icon={faForwardFast} onClick={handleForwardFast} />
|
||||
</div>
|
||||
<div className="flex justify-center">
|
||||
<div className="rounded-t-lg border-x border-t border-ui-panel-border bg-ui-controls p-2 text-white">
|
||||
<div className="flex content-center gap-2">
|
||||
<ButtonIcon icon={faBackwardFast} onClick={handleBackwardFast} />
|
||||
<ButtonIcon icon={faBackwardStep} onClick={handleBackwardStep} />
|
||||
<ButtonIcon icon={faPlay} onClick={handlePlay} />
|
||||
<ButtonIcon icon={faForwardStep} onClick={handleForwardStep} />
|
||||
<ButtonIcon icon={faForwardFast} onClick={handleForwardFast} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import { useContext } from "react"
|
||||
import { EngineContext } from "~/contexts/EngineContext"
|
||||
|
||||
export const PreviewWindow = ()=>{
|
||||
const editorEngine = useContext(EngineContext);
|
||||
//take data from egine context
|
||||
|
||||
return (
|
||||
<div
|
||||
id="preview-window"
|
||||
className="absolute bottom-0 w-30 m-4"
|
||||
>
|
||||
<div className="relative">
|
||||
<div
|
||||
id="preview-window-label"
|
||||
className="text-white bg-ui-panel pt-1 px-2 pb-3 -z-10 rounded-t-lg -mb-2 w-fit"
|
||||
>
|
||||
<p>Camera View</p>
|
||||
</div>
|
||||
<div className="rounded-lg border border-white box overflow-hidden">
|
||||
<img
|
||||
//shoot that datat from engine context to this image
|
||||
className="aspect-video max-h-40"
|
||||
src="/resources/uiAssets/video_player_placeholder.gif"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
Reference in new issue
Block a user