mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-18 15:44:36 +00:00
conver fbx page and header images
This commit is contained in:
1 parent
0be1e2a97a
commit
5c74222205
14 files changed
+114
-14
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -29,7 +29,8 @@ export default function PageContainer({
|
||||
}
|
||||
|
||||
// Merge the classNames
|
||||
const mergedClassNames = `${containerClass} ${className}`;
|
||||
const mergedClassNames =
|
||||
`${containerClass} ${className} min-height-100vh`.trim();
|
||||
|
||||
return <div className={mergedClassNames}>{children}</div>;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import React from "react";
|
||||
import { FileDetails, FileLabel, FileWrapper } from "components/common";
|
||||
import { faFileAudio } from "@fortawesome/pro-solid-svg-icons";
|
||||
|
||||
interface Props {
|
||||
label?: string;
|
||||
blob?: string;
|
||||
children?: any;
|
||||
clear?: (file?: any) => void;
|
||||
file?: any;
|
||||
hideDetails?: boolean;
|
||||
hideClearDetails?: boolean;
|
||||
inputProps?: any;
|
||||
[x: string]: any;
|
||||
fileTypes?: string[];
|
||||
}
|
||||
|
||||
const n = () => {};
|
||||
|
||||
export default function FileInput({
|
||||
label,
|
||||
children,
|
||||
clear = n,
|
||||
file,
|
||||
hideDetails,
|
||||
hideClearDetails,
|
||||
inputProps,
|
||||
fileTypes = ["MP3"],
|
||||
...rest
|
||||
}: Props) {
|
||||
return (
|
||||
<div>
|
||||
{label && <label className="sub-title">{label}</label>}
|
||||
<FileWrapper
|
||||
{...{ fileTypes, ...inputProps, panelClass: "p-3", ...rest }}
|
||||
>
|
||||
{file ? (
|
||||
<FileDetails
|
||||
{...{ clear, hideClearDetails, icon: faFileAudio, file }}
|
||||
/>
|
||||
) : (
|
||||
<FileLabel {...{ fileTypes }} />
|
||||
)}
|
||||
</FileWrapper>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from "./FileInput";
|
||||
@@ -24,6 +24,7 @@
|
||||
.fy-uploader-layout {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
|
||||
.fy-uploader-layout-icon {
|
||||
font-size: 2.625rem;
|
||||
|
||||
@@ -2,7 +2,6 @@ import React, { useEffect } from "react";
|
||||
import { useSpring } from "@react-spring/web";
|
||||
import { FileDetails, FileWrapper, FileLabel } from "components/common";
|
||||
import { faFileVideo, faVideo } from "@fortawesome/pro-solid-svg-icons";
|
||||
import "./videoinput.scss";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
@import "scss/colours.scss";
|
||||
|
||||
.upload-details {
|
||||
background-color: rgba($panel, .85);
|
||||
}
|
||||
@@ -144,6 +144,7 @@ export default function PageHeader({
|
||||
alt="Header"
|
||||
className="img-fluid my-3"
|
||||
height="235"
|
||||
loading="lazy"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@ const mediaFileTypeInfo: MediaFileTypeInfo = {
|
||||
},
|
||||
[MediaFileType.FBX]: {
|
||||
label: "FBX",
|
||||
color: "turquoise",
|
||||
color: "lime",
|
||||
},
|
||||
[MediaFileType.None]: {
|
||||
label: "None",
|
||||
|
||||
@@ -106,6 +106,7 @@ import { SearchProvider } from "context/SearchContext";
|
||||
import WeightEditPage from "./pages/weight/WeightEditPage";
|
||||
import UploadSdWeightPage from "./pages/upload/UploadSdWeightPage";
|
||||
import { FooterNav } from "./nav/FooterNav";
|
||||
import FbxToGltfPage from "./pages/fbx_to_gltf/FbxToGltfPage";
|
||||
|
||||
interface Props {
|
||||
sessionWrapper: SessionWrapper;
|
||||
@@ -676,6 +677,10 @@ class PageContainer extends React.Component<
|
||||
/>
|
||||
</Route>
|
||||
|
||||
<Route path="/fbx-to-gltf/:mediaToken?">
|
||||
<FbxToGltfPage />
|
||||
</Route>
|
||||
|
||||
<Route path="/studio">
|
||||
<StorytellerStudioListPage
|
||||
sessionWrapper={this.props.sessionWrapper}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import { faArrowRightArrowLeft } from "@fortawesome/pro-solid-svg-icons";
|
||||
import { Button, Container, Panel } from "components/common";
|
||||
import FileInput from "components/common/FileInput";
|
||||
import PageHeader from "components/layout/PageHeader";
|
||||
import { useFile } from "hooks";
|
||||
import React from "react";
|
||||
|
||||
interface FbxToGltfPageProps {}
|
||||
|
||||
export default function FbxToGltfPage(props: FbxToGltfPageProps) {
|
||||
const fileProps = useFile({});
|
||||
|
||||
return (
|
||||
<Container type="panel">
|
||||
<PageHeader
|
||||
title="Convert FBX to glTF"
|
||||
subText="For converting 3D model assets on FBX format to glTF 2.0 for use with Storyteller Studio."
|
||||
imageUrl="/images/header/fbx-to-gltf.png"
|
||||
/>
|
||||
|
||||
<Panel padding={true}>
|
||||
<div className="d-flex flex-column gap-3">
|
||||
<FileInput
|
||||
{...fileProps}
|
||||
label="Select FBX File"
|
||||
fileTypes={["FBX"]}
|
||||
/>
|
||||
<div className="d-flex justify-content-end">
|
||||
<Button
|
||||
icon={faArrowRightArrowLeft}
|
||||
label="Convert to glTF"
|
||||
onClick={() => {}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Panel>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
@@ -141,10 +141,10 @@ export default function MediaPage() {
|
||||
}
|
||||
}
|
||||
|
||||
const weightTypeInfo = useMediaFileTypeInfo(
|
||||
const mediaTypeInfo = useMediaFileTypeInfo(
|
||||
mediaFile?.media_type || MediaFileType.None
|
||||
);
|
||||
const { label: mediaType, color: mediaTagColor } = weightTypeInfo;
|
||||
const { label: mediaType, color: mediaTagColor } = mediaTypeInfo;
|
||||
|
||||
let audioLink = new BucketConfig().getGcsUrl(mediaFile?.public_bucket_path);
|
||||
|
||||
@@ -277,7 +277,10 @@ export default function MediaPage() {
|
||||
];
|
||||
|
||||
const bvhDetails = [
|
||||
{ property: "Type", value: mediaFile?.media_type || "" },
|
||||
{
|
||||
property: "Type",
|
||||
value: mediaType || "",
|
||||
},
|
||||
{
|
||||
property: "Visibility",
|
||||
value: mediaFile?.creator_set_visibility.toString() || "",
|
||||
@@ -286,7 +289,10 @@ export default function MediaPage() {
|
||||
];
|
||||
|
||||
const gltfDetails = [
|
||||
{ property: "Type", value: mediaFile?.media_type || "" },
|
||||
{
|
||||
property: "Type",
|
||||
value: mediaType || "",
|
||||
},
|
||||
{
|
||||
property: "Visibility",
|
||||
value: mediaFile?.creator_set_visibility.toString() || "",
|
||||
@@ -295,7 +301,10 @@ export default function MediaPage() {
|
||||
];
|
||||
|
||||
const fbxDetails = [
|
||||
{ property: "Type", value: mediaFile?.media_type || "" },
|
||||
{
|
||||
property: "Type",
|
||||
value: mediaType || "",
|
||||
},
|
||||
{
|
||||
property: "Visibility",
|
||||
value: mediaFile?.creator_set_visibility.toString() || "",
|
||||
|
||||
@@ -78,11 +78,12 @@ export default function VideoMotionCapture(props: {
|
||||
<PageHeader
|
||||
title={t("headings.title")}
|
||||
subText={t("headings.subtitle")}
|
||||
imageUrl="/images/header/video-mocap.png"
|
||||
/>
|
||||
|
||||
<VideoMocapJobList />
|
||||
|
||||
<Panel className="mt-3">
|
||||
<Panel>
|
||||
<div className="row g-0">
|
||||
{pageState.status < FILE_UPLOADING && (
|
||||
<>
|
||||
|
||||
Reference in new issue
Block a user