Skip to content

Commit 49bab3e

Browse files
aidinabedimvaligurskyCopilot
authored
[DOCS] Fix types and documentation for applySceneSettings (#8085)
* docs: fix type for settings.render.lightingCells * docs: fix optional properties in settings and add defaults * docs: adding missing properties in settings * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Martin Valigursky <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 77c5dec commit 49bab3e

File tree

1 file changed

+31
-19
lines changed

1 file changed

+31
-19
lines changed

src/framework/app-base.js

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,33 +1386,44 @@ class AppBase extends EventHandler {
13861386
* of the scene.
13871387
* @param {number|null} [settings.render.skybox] - The asset ID of the cube map texture to be
13881388
* used as the scene's skybox. Defaults to null.
1389-
* @param {number} settings.render.skyboxIntensity - Multiplier for skybox intensity.
1390-
* @param {number} settings.render.skyboxLuminance - Lux (lm/m^2) value for skybox intensity when physical light units are enabled.
1391-
* @param {number} settings.render.skyboxMip - The mip level of the skybox to be displayed.
1389+
* @param {number} [settings.render.skyboxIntensity] - Multiplier for skybox intensity. Defaults to 1.
1390+
* @param {number} [settings.render.skyboxLuminance] - Lux (lm/m^2) value for skybox intensity when physical light units are enabled. Defaults to 20000.
1391+
* @param {number} [settings.render.skyboxMip] - The mip level of the skybox to be displayed. Defaults to 0.
13921392
* Only valid for prefiltered cubemap skyboxes.
1393-
* @param {number[]} settings.render.skyboxRotation - Rotation of skybox.
1393+
* @param {number[]} [settings.render.skyboxRotation] - Rotation of skybox. Defaults to [0, 0, 0].
1394+
*
1395+
* @param {string} [settings.render.skyType] - The type of the sky. One of the SKYTYPE_* constants. Defaults to {@link SKYTYPE_INFINITE}.
1396+
* @param {number[]} [settings.render.skyMeshPosition] - The position of sky mesh. Ignored for {@link SKYTYPE_INFINITE}. Defaults to [0, 0, 0].
1397+
* @param {number[]} [settings.render.skyMeshRotation] - The rotation of sky mesh. Ignored for {@link SKYTYPE_INFINITE}. Defaults to [0, 0, 0].
1398+
* @param {number[]} [settings.render.skyMeshScale] - The scale of sky mesh. Ignored for {@link SKYTYPE_INFINITE}. Defaults to [1, 1, 1].
1399+
* @param {number[]} [settings.render.skyCenter] - The center of the sky. Ignored for {@link SKYTYPE_INFINITE}. Defaults to [0, 1, 0].
1400+
*
13941401
* @param {number} settings.render.lightmapSizeMultiplier - The lightmap resolution multiplier.
13951402
* @param {number} settings.render.lightmapMaxResolution - The maximum lightmap resolution.
13961403
* @param {number} settings.render.lightmapMode - The lightmap baking mode. Can be:
13971404
*
13981405
* - {@link BAKE_COLOR}: single color lightmap
13991406
* - {@link BAKE_COLORDIR}: single color lightmap + dominant light direction (used for bump/specular)
14001407
*
1401-
* @param {boolean} settings.render.ambientBake - Enable baking ambient light into lightmaps.
1402-
* @param {number} settings.render.ambientBakeNumSamples - Number of samples to use when baking ambient light.
1403-
* @param {number} settings.render.ambientBakeSpherePart - How much of the sphere to include when baking ambient light.
1404-
* @param {number} settings.render.ambientBakeOcclusionBrightness - Brightness of the baked ambient occlusion.
1405-
* @param {number} settings.render.ambientBakeOcclusionContrast - Contrast of the baked ambient occlusion.
1408+
* @param {boolean} [settings.render.lightmapFilterEnabled] - Enables bilateral filter on runtime baked color lightmaps. Defaults to false.
1409+
* @param {number} [settings.render.lightmapFilterRange] - Sets the range parameter of the bilateral filter. Defaults to 10.
1410+
* @param {number} [settings.render.lightmapFilterSmoothness] - Sets the spatial parameter of the bilateral filter. Defaults to 0.2.
1411+
*
1412+
* @param {boolean} [settings.render.ambientBake] - Enable baking ambient light into lightmaps. Defaults to false.
1413+
* @param {number} [settings.render.ambientBakeNumSamples] - Number of samples to use when baking ambient light. Defaults to 1.
1414+
* @param {number} [settings.render.ambientBakeSpherePart] - How much of the sphere to include when baking ambient light. Defaults to 0.4.
1415+
* @param {number} [settings.render.ambientBakeOcclusionBrightness] - Brightness of the baked ambient occlusion. Defaults to 0.
1416+
* @param {number} [settings.render.ambientBakeOcclusionContrast] - Contrast of the baked ambient occlusion. Defaults to 0.
14061417
* @param {number} settings.render.ambientLuminance - Lux (lm/m^2) value for ambient light intensity.
14071418
*
1408-
* @param {boolean} settings.render.clusteredLightingEnabled - Enable clustered lighting.
1409-
* @param {boolean} settings.render.lightingShadowsEnabled - If set to true, the clustered lighting will support shadows.
1410-
* @param {boolean} settings.render.lightingCookiesEnabled - If set to true, the clustered lighting will support cookie textures.
1411-
* @param {boolean} settings.render.lightingAreaLightsEnabled - If set to true, the clustered lighting will support area lights.
1412-
* @param {number} settings.render.lightingShadowAtlasResolution - Resolution of the atlas texture storing all non-directional shadow textures.
1413-
* @param {number} settings.render.lightingCookieAtlasResolution - Resolution of the atlas texture storing all non-directional cookie textures.
1414-
* @param {number} settings.render.lightingMaxLightsPerCell - Maximum number of lights a cell can store.
1415-
* @param {number} settings.render.lightingShadowType - The type of shadow filtering used by all shadows. Can be:
1419+
* @param {boolean} [settings.render.clusteredLightingEnabled] - Enable clustered lighting. Defaults to false.
1420+
* @param {boolean} [settings.render.lightingShadowsEnabled] - If set to true, the clustered lighting will support shadows. Defaults to true.
1421+
* @param {boolean} [settings.render.lightingCookiesEnabled] - If set to true, the clustered lighting will support cookie textures. Defaults to false.
1422+
* @param {boolean} [settings.render.lightingAreaLightsEnabled] - If set to true, the clustered lighting will support area lights. Defaults to false.
1423+
* @param {number} [settings.render.lightingShadowAtlasResolution] - Resolution of the atlas texture storing all non-directional shadow textures. Defaults to 2048.
1424+
* @param {number} [settings.render.lightingCookieAtlasResolution] - Resolution of the atlas texture storing all non-directional cookie textures. Defaults to 2048.
1425+
* @param {number} [settings.render.lightingMaxLightsPerCell] - Maximum number of lights a cell can store. Defaults to 255.
1426+
* @param {number} [settings.render.lightingShadowType] - The type of shadow filtering used by all shadows. Can be:
14161427
*
14171428
* - {@link SHADOW_PCF1_32F}
14181429
* - {@link SHADOW_PCF3_32F}
@@ -1421,8 +1432,9 @@ class AppBase extends EventHandler {
14211432
* - {@link SHADOW_PCF3_16F}
14221433
* - {@link SHADOW_PCF5_16F}
14231434
*
1424-
* @param {Vec3} settings.render.lightingCells - Number of cells along each world space axis the space containing lights
1425-
* is subdivided into.
1435+
* Defaults to {@link SHADOW_PCF3_32F}.
1436+
* @param {number[]} [settings.render.lightingCells] - Number of cells along each world space axis the space containing lights
1437+
* is subdivided into. Defaults to [10, 3, 10].
14261438
*
14271439
* Only lights with bakeDir=true will be used for generating the dominant light direction.
14281440
* @example

0 commit comments

Comments
 (0)