You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGES.md
+2
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ Change Log
7
7
* Shrink minified and gzipped Cesium.js by 27 KB (~3.7%) by delay loading seldom-used third-party dependencies. [#7140](https://github.com/AnalyticalGraphicsInc/cesium/pull/7140)
8
8
* Added WMS-T (time) support in WebMapServiceImageryProvider [#2581](https://github.com/AnalyticalGraphicsInc/cesium/issues/2581)
9
9
* Added `cutoutRectangle` to `ImageryLayer`, which allows cutting out rectangular areas in imagery layers to reveal underlying imagery. [#7056](https://github.com/AnalyticalGraphicsInc/cesium/pull/7056)
10
+
* Added `imageBasedLightingFactor` property to `Cesium3DTileset`, `Model`, and `ModelGraphics` to scale the diffuse and specular image-based lighting contributions to the final color. [#7025](https://github.com/AnalyticalGraphicsInc/cesium/pull/7025)
11
+
* Added `lightColor` property to `Cesium3DTileset`, `Model`, and `ModelGraphics` to change the intensity of the light used when shading model. [#7025](https://github.com/AnalyticalGraphicsInc/cesium/pull/7025)
10
12
11
13
##### Fixes :wrench:
12
14
* Fixed an issue where `pickPosition` would return incorrect results when called after `sampleHeight` or `clampToHeight`. [#7113](https://github.com/AnalyticalGraphicsInc/cesium/pull/7113)
Copy file name to clipboardexpand all lines: Source/DataSources/ModelGraphics.js
+25-1
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,8 @@ define([
56
56
* @param {Property} [options.colorBlendMode=ColorBlendMode.HIGHLIGHT] An enum Property specifying how the color blends with the model.
57
57
* @param {Property} [options.colorBlendAmount=0.5] A numeric Property specifying the color strength when the <code>colorBlendMode</code> is <code>MIX</code>. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two.
58
58
* @param {Property} [options.clippingPlanes] A property specifying the {@link ClippingPlaneCollection} used to selectively disable rendering the model.
59
+
* @param {Property} [options.imageBasedLightingFactor=new Cartesian2(1.0, 1.0)] A property specifying the contribution from diffuse and specular image-based lighting.
60
+
* @param {Property} [options.lightColor] A property specifying the light color to use when shading the model. The default sun light color will be used when <code>undefined</code>.
Copy file name to clipboardexpand all lines: Source/Scene/Cesium3DTileset.js
+40
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,8 @@ define([
115
115
* @param {ClassificationType} [options.classificationType] Determines whether terrain, 3D Tiles or both will be classified by this tileset. See {@link Cesium3DTileset#classificationType} for details about restrictions and limitations.
116
116
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid determining the size and shape of the globe.
117
117
* @param {Object} [options.pointCloudShading] Options for constructing a {@link PointCloudShading} object to control point attenuation based on geometric error and lighting.
118
+
* @param {Cartesian2} [options.imageBasedLightingFactor=new Cartesian2(1.0, 1.0)] Scales the diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox.
119
+
* @param {Cartesian3} [options.lightColor] The color and intensity of the sunlight used to shade models.
118
120
* @param {Boolean} [options.debugFreezeFrame=false] For debugging only. Determines if only the tiles from last frame should be used for rendering.
119
121
* @param {Boolean} [options.debugColorizeTiles=false] For debugging only. When true, assigns a random color to each tile.
120
122
* @param {Boolean} [options.debugWireframe=false] For debugging only. When true, render's each tile's content as a wireframe.
Copy file name to clipboardexpand all lines: Source/Scene/Model.js
+99-3
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
define([
2
2
'../Core/BoundingSphere',
3
+
'../Core/Cartesian2',
3
4
'../Core/Cartesian3',
4
5
'../Core/Cartesian4',
5
6
'../Core/Cartographic',
7
+
'../Core/Check',
6
8
'../Core/clone',
7
9
'../Core/Color',
8
10
'../Core/combine',
@@ -74,9 +76,11 @@ define([
74
76
'./ShadowMode'
75
77
],function(
76
78
BoundingSphere,
79
+
Cartesian2,
77
80
Cartesian3,
78
81
Cartesian4,
79
82
Cartographic,
83
+
Check,
80
84
clone,
81
85
Color,
82
86
combine,
@@ -282,6 +286,8 @@ define([
282
286
* @param {Number} [options.silhouetteSize=0.0] The size of the silhouette in pixels.
283
287
* @param {ClippingPlaneCollection} [options.clippingPlanes] The {@link ClippingPlaneCollection} used to selectively disable rendering the model.
284
288
* @param {Boolean} [options.dequantizeInShader=true] Determines if a {@link https://github.com/google/draco|Draco} encoded model is dequantized on the GPU. This decreases total memory usage for encoded models.
289
+
* @param {Cartesian2} [options.imageBasedLightingFactor=Cartesian2(1.0, 1.0)] Scales diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox.
290
+
* @param {Cartesian3} [options.lightColor] The color and intensity of the sunlight used to shade the model.
285
291
*
286
292
* @see Model.fromGltf
287
293
*
@@ -656,6 +662,11 @@ define([
656
662
this._rtcCenter2D=undefined;// in projected world coordinates
657
663
658
664
this._keepPipelineExtras=options.keepPipelineExtras;// keep the buffers in memory for use in other applications
* The color and intensity of the sunlight used to shade the model.
1118
+
* <p>
1119
+
* For example, disabling additional light sources by setting <code>model.imageBasedLightingFactor = new Cesium.Cartesian2(0.0, 0.0)</code> will make the
1120
+
* model much darker. Here, increasing the intensity of the light source will make the model brighter.
0 commit comments