Scene storage backend integration (#51)

This PR adds Storyteller.ai API integration for saving and loading
Storyteller Studio scenes to/from the backend.

### Known issues
* The skybox is not currently stored in the serialized scene format
This commit is contained in:
Danny McGee
2024-02-23 22:04:06 -05:00
committed by GitHub
parent 6ca2a992e5
commit 7b06d48c5d
14 changed files with 244 additions and 62 deletions
+28
View File
@@ -0,0 +1,28 @@
import * as studio from "@storyteller/studio";
import { ViewportSize } from "@storyteller/studio";
import { PropertyValues } from "lit";
import { customElement, property } from "lit/decorators.js";
import { StudioBaseElement } from "./studio-base.element";
@customElement("sts-editor")
export class EditorElement extends StudioBaseElement {
@property() scenePath?: string;
onStart(viewportSize: ViewportSize): void {
if (!this.scenePath) return;
studio.startEditor(
this.scenePath,
`#${this._canvasProvider!.canvasId}`,
"Storyteller Studio",
viewportSize,
);
}
onChanges(changes: PropertyValues<this>): void {
if (changes.has("scenePath") && !!this.scenePath) {
// TODO
}
}
}