Skip to content

Commit

Permalink
Exposed Scene.sky properties (#7041)
Browse files Browse the repository at this point in the history
* Exposed Scene.sky properties

* lint

---------

Co-authored-by: Martin Valigursky <[email protected]>
  • Loading branch information
mvaligursky and Martin Valigursky authored Nov 5, 2024
1 parent 3a1cbf0 commit 641ee34
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
5 changes: 5 additions & 0 deletions src/scene/scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,11 @@ class Scene extends EventHandler {
return this._layers;
}

/**
* Gets the {@link Sky} that defines sky properties.
*
* @type {Sky}
*/
get sky() {
return this._sky;
}
Expand Down
7 changes: 4 additions & 3 deletions src/scene/skybox/sky.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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}
*/
Expand Down

0 comments on commit 641ee34

Please sign in to comment.