mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-07 10:31:46 +00:00
support bevy's scene.ron
This commit is contained in:
1 parent
954dfc21ad
commit
09c64dfc95
2 files changed
+31
No files matched your search
@@ -2,9 +2,27 @@ export enum MediaFileType {
|
||||
Audio = "audio",
|
||||
Video = "video",
|
||||
Image = "image",
|
||||
|
||||
// BVH is a very popular file format for motion capture.
|
||||
// It is compatible with our engine.
|
||||
BVH = "bvh",
|
||||
|
||||
// GLTF is the text-based format of GLB. Unforunately it requires a
|
||||
// second file to include the visual data, so we strongly discourage
|
||||
// the use of this format in favor of GLB.
|
||||
GLTF = "gltf",
|
||||
|
||||
// GLB is the format we convert FBX files into. It's a very popular
|
||||
// open source 3D file format.
|
||||
GLB = "glb",
|
||||
|
||||
// FBX isn't supported by Storyteller Engine, but we can get
|
||||
// uploads in this format. It's a very popular 3D graphics format.
|
||||
FBX = "fbx",
|
||||
|
||||
// Full Storyteller Engine scenes (RON = Rusty Object Notation)
|
||||
// This is a temporary format that will eventually go away.
|
||||
SceneRon = "scene_ron",
|
||||
|
||||
None = "none",
|
||||
}
|
||||
@@ -226,6 +226,19 @@ export default function MediaPage() {
|
||||
}}
|
||||
/>
|
||||
);
|
||||
case MediaFileType.SceneRon:
|
||||
// NB: Storyteller Engine makes the API call to load the scene.
|
||||
// We don't need to pass the bucket path.
|
||||
// The engine, does, however, need a `.scn.ron` file extension.
|
||||
const sceneRonUrl = `remote://${mediaFile.token}.scn.ron`;
|
||||
return (
|
||||
<Iframe
|
||||
{...{
|
||||
url: `https://engine.fakeyou.com?mode=studio&scene=${sceneRonUrl}`,
|
||||
className: "fy-studio-frame",
|
||||
}}
|
||||
/>
|
||||
);
|
||||
case MediaFileType.FBX:
|
||||
return (
|
||||
<Panel padding={true}>
|
||||
|
||||
Reference in new issue
Block a user