Allow Skybox to take a Color (#57)

This PR Adds the ability to set the color of the skybox using the URL
parameters.

- Now you can pass a color's hexadecimal number (without the #) in the
  skybox parameter, and that will set the skybox to that color.
This commit is contained in:
Brooks Palin
2024-02-27 22:11:37 -07:00
committed by GitHub
parent c788bcf6b7
commit 343919a9f5
6 changed files with 91 additions and 22 deletions
+2 -4
View File
@@ -1,4 +1,4 @@
import { type SkyboxId, StudioMode } from "@storyteller/studio";
import { StudioMode } from "@storyteller/studio";
import { match } from "@storyteller/utility";
export class StudioURLParams {
@@ -12,9 +12,7 @@ export class StudioURLParams {
get mixamo() { return this.#nativeParams.get("mixamo") ?? undefined; }
get sceneImport() { return this.#nativeParams.get("sceneImport") ?? undefined; }
get scene() { return this.#nativeParams.get("scene") ?? undefined; }
get skybox() {
return this.#nativeParams.get("skybox") as SkyboxId ?? undefined;
}
get skybox() { return this.#nativeParams.get("skybox") ?? undefined; }
get mode(): StudioMode {
return match(this.#nativeParams.get("mode"), {
"studio": () => StudioMode.Editor,