mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-18 07:35:19 +00:00
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:
@@ -2,7 +2,6 @@ import { inject } from "@storyteller/framework";
|
||||
import * as studio from "@storyteller/studio";
|
||||
import {
|
||||
type InitOptions,
|
||||
type SkyboxId,
|
||||
StudioMode,
|
||||
ViewportSize,
|
||||
} from "@storyteller/studio";
|
||||
@@ -21,7 +20,7 @@ export class StudioElement extends LitElement {
|
||||
@property() mixamoPath?: string;
|
||||
@property() sceneImport?: string;
|
||||
@property() storytellerScene?: string;
|
||||
@property() skyboxId?: SkyboxId;
|
||||
@property() skyboxId?: string;
|
||||
@property({ type: Number }) mode?: StudioMode;
|
||||
|
||||
@inject(CANVAS_PROVIDER)
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user