From 219f461412861f3c4b20538fcd8b79367e2525f7 Mon Sep 17 00:00:00 2001 From: Martin Valigursky Date: Wed, 16 Oct 2024 09:46:29 +0100 Subject: [PATCH 1/2] Exposed Scene.sky properties --- src/index.js | 3 +++ src/scene/scene.js | 3 +++ src/scene/skybox/sky.js | 7 ++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index b29d25d4be7..d1b8ac94408 100644 --- a/src/index.js +++ b/src/index.js @@ -193,6 +193,9 @@ export { shaderChunks } from './scene/shader-lib/chunks/chunks.js'; export { shaderChunksLightmapper } from './scene/shader-lib/chunks/chunks-lightmapper.js'; export { ChunkBuilder } from './scene/shader-lib/chunk-builder.js'; // used by shed +// SCENE / SKY +export { Sky } from './scene/skybox/sky.js'; + // SCENE / SPLAT export { GSplatData } from './scene/gsplat/gsplat-data.js'; export { GSplat } from './scene/gsplat/gsplat.js'; diff --git a/src/scene/scene.js b/src/scene/scene.js index 1137d763b0e..8b5dd61f942 100644 --- a/src/scene/scene.js +++ b/src/scene/scene.js @@ -417,6 +417,9 @@ class Scene extends EventHandler { return this._layers; } + /** + * Gets the {@link Sky} that defines sky properties. + */ get sky() { return this._sky; } diff --git a/src/scene/skybox/sky.js b/src/scene/skybox/sky.js index 113688d3039..770f6298dfc 100644 --- a/src/scene/skybox/sky.js +++ b/src/scene/skybox/sky.js @@ -50,6 +50,7 @@ class Sky { * Constructs a new sky. * * @param {Scene} scene - The scene owning the sky. + * @ignore */ constructor(scene) { this.device = scene.device; @@ -76,9 +77,9 @@ class Sky { * The type of the sky. One of the SKYMESH_* constants. Defaults to {@link SKYTYPE_INFINITE}. * Can be: * - * {@link SKYTYPE_INFINITE} - * {@link SKYTYPE_BOX} - * {@link SKYTYPE_DOME} + * - {@link SKYTYPE_INFINITE} + * - {@link SKYTYPE_BOX} + * - {@link SKYTYPE_DOME} * * @type {string} */ From d9ea3c6eead1c802d9d1be3c315aadea90325b28 Mon Sep 17 00:00:00 2001 From: Martin Valigursky Date: Wed, 16 Oct 2024 09:50:04 +0100 Subject: [PATCH 2/2] lint --- src/scene/scene.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scene/scene.js b/src/scene/scene.js index 8b5dd61f942..dad5a714431 100644 --- a/src/scene/scene.js +++ b/src/scene/scene.js @@ -419,6 +419,8 @@ class Scene extends EventHandler { /** * Gets the {@link Sky} that defines sky properties. + * + * @type {Sky} */ get sky() { return this._sky;