mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-06 02:00:46 +00:00
open studio to sample scene
This commit is contained in:
1 parent
5939c8c752
commit
26973fd232
2 files changed
+13
-2
No files matched your search
@@ -2,17 +2,28 @@ import React from "react";
|
||||
import IframeResizer from "iframe-resizer-react";
|
||||
import "./Scene3D.scss";
|
||||
|
||||
// See the following page for Storyteller Engine's query param documentation:
|
||||
// https://www.notion.so/storytellerai/Studio-Iframe-Query-Params-a748a9929ec3404780c3884e7fb89bdb
|
||||
interface Scene3DProps {
|
||||
mode: string;
|
||||
fullScreen?: boolean;
|
||||
urlParams?: string;
|
||||
objectId?: string;
|
||||
}
|
||||
|
||||
export default function Scene3D({
|
||||
mode,
|
||||
fullScreen = false,
|
||||
objectId,
|
||||
urlParams,
|
||||
}: Scene3DProps) {
|
||||
|
||||
let engineUrl = `https://engine.fakeyou.com?mode=${mode}`;
|
||||
|
||||
if (objectId) {
|
||||
engineUrl += `&objectId=${objectId}`;
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`${
|
||||
@@ -20,7 +31,7 @@ export default function Scene3D({
|
||||
}`.trim()}
|
||||
>
|
||||
<IframeResizer
|
||||
src={`https://engine.fakeyou.com?mode=${mode}`}
|
||||
src={engineUrl}
|
||||
width="100%"
|
||||
height="100%"
|
||||
id=""
|
||||
|
||||
@@ -19,7 +19,7 @@ function StorytellerStudioListPage(props: Props) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Scene3D fullScreen={true} mode="studio" />
|
||||
<Scene3D fullScreen={true} mode="studio" objectId="sample-room.gltf" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user