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
+1 -10
View File
@@ -6,19 +6,10 @@ use crate::{InitAsset, InitParams, StudioMode, ViewportSize};
#[wasm_bindgen(typescript_custom_section)]
const WASM_ENTRY_POINTS: &str = r#"
export type SkyboxId
= "gum_trees_4k"
| "kloofenfal_28d_misty_4k"
| "meadow_4k"
| "promenade_de_vidy_4k"
| "scythian_tombs_4k"
| "test_scene"
;
export interface InitOptions {
mode: StudioMode;
/** Required for all entry-points except `initFromStorytellerScene()` */
skyboxId?: SkyboxId;
skyboxId?: string;
canvasSelector: string;
canvasAlt: string;
viewportSize: ViewportSize;