@cesium/engine 12.0.0 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/Workers/{chunk-2RHMHHJH.js → chunk-22NU5WU5.js} +2 -2
- package/Build/Workers/{chunk-3OM5QZSI.js → chunk-2IIE2UZ3.js} +2 -2
- package/Build/Workers/{chunk-WQCX7U65.js → chunk-2OD54CUD.js} +7 -7
- package/Build/Workers/{chunk-IT6AWHFV.js → chunk-2TSF7N76.js} +2 -2
- package/Build/Workers/{chunk-AL7BHP36.js → chunk-3VHIUS7I.js} +6 -6
- package/Build/Workers/{chunk-MSY2AAW2.js → chunk-3ZMTG4X5.js} +4 -4
- package/Build/Workers/{chunk-GZG526CC.js → chunk-4HS475MU.js} +14 -14
- package/Build/Workers/{chunk-4IQPX22D.js → chunk-4IM6WQEI.js} +6 -6
- package/Build/Workers/{chunk-7DSVCRFD.js → chunk-6HWW6KNV.js} +6 -6
- package/Build/Workers/{chunk-GUW6BS72.js → chunk-6ZOS2ACR.js} +7 -7
- package/Build/Workers/{chunk-7OISMGQF.js → chunk-BFNZUP2C.js} +7 -41
- package/Build/Workers/{chunk-WW5RTJ72.js → chunk-BLTSMJIP.js} +1 -1
- package/Build/Workers/{chunk-ES6Q5HWK.js → chunk-BZMHXDKV.js} +13 -13
- package/Build/Workers/{chunk-5YKJKOFE.js → chunk-CQDSGG3R.js} +7 -7
- package/Build/Workers/{chunk-ZZNBFQL5.js → chunk-CUMDCSMT.js} +11 -11
- package/Build/Workers/{chunk-BQNTN4CC.js → chunk-D3VPMNUR.js} +13 -13
- package/Build/Workers/{chunk-4ESQ3DN2.js → chunk-DIAH2ZTB.js} +9 -9
- package/Build/Workers/{chunk-VQZNBD3T.js → chunk-EXDSJZ7J.js} +4 -4
- package/Build/Workers/{chunk-T6FZFMTF.js → chunk-FANORJU6.js} +2 -2
- package/Build/Workers/{chunk-US3L7FXC.js → chunk-FLPIQK2R.js} +6 -6
- package/Build/Workers/{chunk-J64XIF5C.js → chunk-GBXJIWAZ.js} +34 -8
- package/Build/Workers/{chunk-TQK4D4AR.js → chunk-GJZQSAES.js} +7 -7
- package/Build/Workers/{chunk-X67KKHI7.js → chunk-GNG3V432.js} +4 -4
- package/Build/Workers/{chunk-B4AZL6Q4.js → chunk-H4Y7ADFL.js} +5 -5
- package/Build/Workers/{chunk-SXJ37VUC.js → chunk-H7BML7HH.js} +6 -6
- package/Build/Workers/{chunk-5FSKL7US.js → chunk-HMMPNR4Z.js} +12 -12
- package/Build/Workers/{chunk-ARTM66DL.js → chunk-JISDBAYP.js} +5 -5
- package/Build/Workers/{chunk-6DYMJ57Z.js → chunk-KCCTLUKK.js} +10 -10
- package/Build/Workers/{chunk-X7VRF25X.js → chunk-KKVKSTWC.js} +5 -5
- package/Build/Workers/{chunk-JGGZ3H4W.js → chunk-KRCUHV7P.js} +1 -1
- package/Build/Workers/{chunk-AOCENJVH.js → chunk-MMILY4S7.js} +11 -11
- package/Build/Workers/{chunk-GYHHNFW5.js → chunk-MSKD73KW.js} +10 -10
- package/Build/Workers/{chunk-C4IAULHW.js → chunk-NVFEDMX4.js} +15 -15
- package/Build/Workers/{chunk-YANQEHO5.js → chunk-OUIF26MQ.js} +6 -6
- package/Build/Workers/{chunk-GKBICLGC.js → chunk-OZZD3VY4.js} +17 -17
- package/Build/Workers/{chunk-56LALJCU.js → chunk-PD2MCNV7.js} +2 -2
- package/Build/Workers/{chunk-62YGXNGC.js → chunk-PMNQULFU.js} +7 -7
- package/Build/Workers/{chunk-3OHDXGFC.js → chunk-Q4MTXEB7.js} +6 -6
- package/Build/Workers/{chunk-4XPGN5Y7.js → chunk-RC5N5SJL.js} +7 -7
- package/Build/Workers/{chunk-IL6SMMDD.js → chunk-RGZWZ4PP.js} +4 -4
- package/Build/Workers/{chunk-GMGUR5GM.js → chunk-RIQGQMS4.js} +4 -4
- package/Build/Workers/{chunk-VUCVRDLD.js → chunk-RR4M3ZGF.js} +7 -7
- package/Build/Workers/{chunk-3UJV3W4Y.js → chunk-S4SCKDK4.js} +1 -1
- package/Build/Workers/{chunk-VGT4ONMC.js → chunk-T5H7YWC7.js} +17 -17
- package/Build/Workers/{chunk-QXBRZZQS.js → chunk-W2DVQETH.js} +10 -10
- package/Build/Workers/{chunk-HYUTWUXN.js → chunk-W2E67GLE.js} +13 -13
- package/Build/Workers/{chunk-3X2LXRHU.js → chunk-WXJY6NDI.js} +13 -13
- package/Build/Workers/{chunk-W2Q2F7JS.js → chunk-XQP37R5E.js} +5 -5
- package/Build/Workers/{chunk-VJVTWBXB.js → chunk-YBDL7YPF.js} +1 -1
- package/Build/Workers/{chunk-HILBDZUP.js → chunk-YDEZMDB7.js} +2 -2
- package/Build/Workers/{chunk-JRULXFCC.js → chunk-Z7OYBX6P.js} +5 -5
- package/Build/Workers/{chunk-2B5H7KIN.js → chunk-ZIWULRRD.js} +1 -1
- package/Build/Workers/combineGeometry.js +22 -22
- package/Build/Workers/createBoxGeometry.js +16 -16
- package/Build/Workers/createBoxOutlineGeometry.js +14 -14
- package/Build/Workers/createCircleGeometry.js +24 -24
- package/Build/Workers/createCircleOutlineGeometry.js +17 -17
- package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createCorridorGeometry.js +27 -27
- package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
- package/Build/Workers/createCylinderGeometry.js +18 -18
- package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
- package/Build/Workers/createEllipseGeometry.js +24 -24
- package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
- package/Build/Workers/createEllipsoidGeometry.js +17 -17
- package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
- package/Build/Workers/createFrustumGeometry.js +16 -16
- package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
- package/Build/Workers/createGeometry.js +22 -22
- package/Build/Workers/createGroundPolylineGeometry.js +20 -20
- package/Build/Workers/createPlaneGeometry.js +14 -14
- package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
- package/Build/Workers/createPolygonGeometry.js +30 -30
- package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
- package/Build/Workers/createPolylineGeometry.js +23 -23
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -32
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
- package/Build/Workers/createRectangleGeometry.js +25 -25
- package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
- package/Build/Workers/createSimplePolylineGeometry.js +21 -21
- package/Build/Workers/createSphereGeometry.js +17 -17
- package/Build/Workers/createSphereOutlineGeometry.js +16 -16
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
- package/Build/Workers/createVectorTileGeometries.js +22 -22
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +20 -20
- package/Build/Workers/createVectorTilePolylines.js +13 -13
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
- package/Build/Workers/createVerticesFromHeightmap.js +20 -20
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
- package/Build/Workers/createWallGeometry.js +22 -22
- package/Build/Workers/createWallOutlineGeometry.js +21 -21
- package/Build/Workers/decodeDraco.js +11 -11
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/transcodeKTX2.js +7 -7
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
- package/Source/Core/BingMapsGeocoderService.js +2 -0
- package/Source/Core/GoogleGeocoderService.js +110 -0
- package/Source/Core/ITwinPlatform.js +359 -0
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/IonGeocodeProviderType.js +33 -0
- package/Source/Core/IonGeocoderService.js +72 -0
- package/Source/Core/Rectangle.js +0 -20
- package/Source/Core/TrackingReferenceFrame.js +45 -0
- package/Source/DataSources/Entity.js +15 -1
- package/Source/DataSources/EntityView.js +55 -4
- package/Source/DataSources/SampledProperty.js +24 -0
- package/Source/Renderer/ContextLimits.js +1 -1
- package/Source/Renderer/Texture.js +104 -92
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Cesium3DTilesetStatistics.js +109 -42
- package/Source/Scene/DerivedCommand.js +109 -16
- package/Source/Scene/DynamicEnvironmentMapManager.js +130 -8
- package/Source/Scene/GltfTextureLoader.js +16 -1
- package/Source/Scene/ITwinData.js +138 -0
- package/Source/Scene/Label.js +17 -3
- package/Source/Scene/MetadataClassProperty.js +26 -0
- package/Source/Scene/MetadataPicking.js +108 -17
- package/Source/Scene/MetadataType.js +20 -0
- package/Source/Scene/Model/Extensions/Gpm/GltfMeshPrimitiveGpmLoader.js +6 -11
- package/Source/Scene/Model/Model3DTileContent.js +23 -1
- package/Source/Scene/Model/ModelStatistics.js +33 -5
- package/Source/Scene/Model/PointCloudStylingPipelineStage.js +2 -1
- package/Source/Scene/PickedMetadataInfo.js +21 -3
- package/Source/Scene/Picking.js +7 -1
- package/Source/Scene/PostProcessStage.js +14 -17
- package/Source/Scene/PostProcessStageCollection.js +4 -16
- package/Source/Scene/PostProcessStageLibrary.js +13 -51
- package/Source/Scene/PropertyAttributeProperty.js +15 -3
- package/Source/Scene/PropertyTextureProperty.js +12 -0
- package/Source/Scene/Scene.js +17 -2
- package/Source/Scene/SkyBox.js +23 -4
- package/Source/Scene/UrlTemplateImageryProvider.js +5 -5
- package/Source/Scene/createGooglePhotorealistic3DTileset.js +55 -16
- package/Source/Scene/getMetadataProperty.js +48 -0
- package/Source/Shaders/Builtin/Functions/reverseLogDepth.glsl +1 -1
- package/Source/Shaders/Builtin/Functions/reverseLogDepth.js +1 -1
- package/Source/Shaders/ConvolveSpecularMapFS.glsl +1 -1
- package/Source/Shaders/ConvolveSpecularMapFS.js +1 -1
- package/Source/Shaders/Model/ModelFS.glsl +7 -0
- package/Source/Shaders/Model/ModelFS.js +7 -0
- package/Source/Shaders/Model/ModelVS.glsl +9 -1
- package/Source/Shaders/Model/ModelVS.js +9 -1
- package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.glsl +66 -37
- package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.js +66 -37
- package/index.d.ts +286 -40
- package/index.js +59 -53
- package/package.json +1 -1
|
@@ -438,6 +438,10 @@ Object.defineProperties(MetadataClassProperty.prototype, {
|
|
|
438
438
|
/**
|
|
439
439
|
* The offset to be added to property values as part of the value transform.
|
|
440
440
|
*
|
|
441
|
+
* This is always defined, even when `hasValueTransform` is `false`. If
|
|
442
|
+
* the class property JSON itself did not define it, then it will be
|
|
443
|
+
* initialized to the default value.
|
|
444
|
+
*
|
|
441
445
|
* @memberof MetadataClassProperty.prototype
|
|
442
446
|
* @type {number|number[]|number[][]}
|
|
443
447
|
* @readonly
|
|
@@ -451,6 +455,10 @@ Object.defineProperties(MetadataClassProperty.prototype, {
|
|
|
451
455
|
/**
|
|
452
456
|
* The scale to be multiplied to property values as part of the value transform.
|
|
453
457
|
*
|
|
458
|
+
* This is always defined, even when `hasValueTransform` is `false`. If
|
|
459
|
+
* the class property JSON itself did not define it, then it will be
|
|
460
|
+
* initialized to the default value.
|
|
461
|
+
*
|
|
454
462
|
* @memberof MetadataClassProperty.prototype
|
|
455
463
|
* @type {number|number[]|number[][]}
|
|
456
464
|
* @readonly
|
|
@@ -1139,6 +1147,24 @@ function normalizeInPlace(values, valueType, normalizeFunction) {
|
|
|
1139
1147
|
}
|
|
1140
1148
|
|
|
1141
1149
|
/**
|
|
1150
|
+
* Applies the value transform that is defined with the given offsets
|
|
1151
|
+
* and scales to the given values.
|
|
1152
|
+
*
|
|
1153
|
+
* If the given values are not an array, then the given transformation
|
|
1154
|
+
* function will be applied directly.
|
|
1155
|
+
*
|
|
1156
|
+
* If the values are an array, then this function will be called recursively
|
|
1157
|
+
* with the array elements, boiling down to a component-wise application
|
|
1158
|
+
* of the transformation function to the innermost array elements.
|
|
1159
|
+
*
|
|
1160
|
+
* @param {number|number[]|number[][]} values The input values
|
|
1161
|
+
* @param {number|number[]|number[][]} offsets The offsets
|
|
1162
|
+
* @param {number|number[]|number[][]} scales The scales
|
|
1163
|
+
* @param {Function} transformationFunction The function with the signature
|
|
1164
|
+
* `(value:number, offset:number, scale:number) : number` that will be
|
|
1165
|
+
* applied to the innermost elements
|
|
1166
|
+
* @returns The input values (or the result of applying the transformation
|
|
1167
|
+
* function to a single value if the values have not been an array).
|
|
1142
1168
|
* @private
|
|
1143
1169
|
*/
|
|
1144
1170
|
MetadataClassProperty.valueTransformInPlace = function (
|
|
@@ -6,6 +6,7 @@ import Matrix2 from "../Core/Matrix2.js";
|
|
|
6
6
|
import Matrix3 from "../Core/Matrix3.js";
|
|
7
7
|
import Matrix4 from "../Core/Matrix4.js";
|
|
8
8
|
import RuntimeError from "../Core/RuntimeError.js";
|
|
9
|
+
import MetadataClassProperty from "./MetadataClassProperty.js";
|
|
9
10
|
import MetadataComponentType from "./MetadataComponentType.js";
|
|
10
11
|
import MetadataType from "./MetadataType.js";
|
|
11
12
|
|
|
@@ -29,6 +30,10 @@ const MetadataPicking = {};
|
|
|
29
30
|
* @param {DataView} dataView The data view
|
|
30
31
|
* @param {number} index The index (byte offset)
|
|
31
32
|
* @returns {number|bigint|undefined} The value
|
|
33
|
+
* @throws RuntimeError If the given component type is not a valid
|
|
34
|
+
* `MetadataComponentType`
|
|
35
|
+
* @throws RangeError If reading the data from the given data view would
|
|
36
|
+
* cause an out-of-bounds access
|
|
32
37
|
*
|
|
33
38
|
* @private
|
|
34
39
|
*/
|
|
@@ -43,21 +48,21 @@ MetadataPicking.decodeRawMetadataValue = function (
|
|
|
43
48
|
case MetadataComponentType.UINT8:
|
|
44
49
|
return dataView.getUint8(index);
|
|
45
50
|
case MetadataComponentType.INT16:
|
|
46
|
-
return dataView.getInt16(index);
|
|
51
|
+
return dataView.getInt16(index, true);
|
|
47
52
|
case MetadataComponentType.UINT16:
|
|
48
|
-
return dataView.getUint16(index);
|
|
53
|
+
return dataView.getUint16(index, true);
|
|
49
54
|
case MetadataComponentType.INT32:
|
|
50
|
-
return dataView.getInt32(index);
|
|
55
|
+
return dataView.getInt32(index, true);
|
|
51
56
|
case MetadataComponentType.UINT32:
|
|
52
|
-
return dataView.getUint32(index);
|
|
57
|
+
return dataView.getUint32(index, true);
|
|
53
58
|
case MetadataComponentType.INT64:
|
|
54
|
-
return dataView.getBigInt64(index);
|
|
59
|
+
return dataView.getBigInt64(index, true);
|
|
55
60
|
case MetadataComponentType.UINT64:
|
|
56
|
-
return dataView.getBigUint64(index);
|
|
61
|
+
return dataView.getBigUint64(index, true);
|
|
57
62
|
case MetadataComponentType.FLOAT32:
|
|
58
|
-
return dataView.getFloat32(index);
|
|
63
|
+
return dataView.getFloat32(index, true);
|
|
59
64
|
case MetadataComponentType.FLOAT64:
|
|
60
|
-
return dataView.getFloat64(index);
|
|
65
|
+
return dataView.getFloat64(index, true);
|
|
61
66
|
}
|
|
62
67
|
throw new RuntimeError(`Invalid component type: ${componentType}`);
|
|
63
68
|
};
|
|
@@ -77,6 +82,10 @@ MetadataPicking.decodeRawMetadataValue = function (
|
|
|
77
82
|
* @param {number} dataViewOffset The byte offset within the data view from
|
|
78
83
|
* which the component should be read
|
|
79
84
|
* @returns {number|bigint|undefined} The metadata value component
|
|
85
|
+
* @throws RuntimeError If the component of the given property is not
|
|
86
|
+
* a valid `MetadataComponentType`
|
|
87
|
+
* @throws RangeError If reading the data from the given data view would
|
|
88
|
+
* cause an out-of-bounds access
|
|
80
89
|
*/
|
|
81
90
|
MetadataPicking.decodeRawMetadataValueComponent = function (
|
|
82
91
|
classProperty,
|
|
@@ -114,6 +123,11 @@ MetadataPicking.decodeRawMetadataValueComponent = function (
|
|
|
114
123
|
* @param {number} elementIndex The index of the element. This is the index
|
|
115
124
|
* inside the array for array-typed properties, and 0 for non-array types.
|
|
116
125
|
* @returns {number|number[]|bigint|bigint[]|undefined} The decoded metadata value element
|
|
126
|
+
* @throws RuntimeError If the component of the given property is not
|
|
127
|
+
* a valid `MetadataComponentType`
|
|
128
|
+
* @throws RangeError If reading the data from the given data view would
|
|
129
|
+
* cause an out-of-bounds access
|
|
130
|
+
*
|
|
117
131
|
*/
|
|
118
132
|
MetadataPicking.decodeRawMetadataValueElement = function (
|
|
119
133
|
classProperty,
|
|
@@ -183,6 +197,7 @@ MetadataPicking.decodeRawMetadataValueElement = function (
|
|
|
183
197
|
* @param {MetadataClassProperty} classProperty The `MetadataClassProperty`
|
|
184
198
|
* @param {Uint8Array} rawPixelValues The raw values
|
|
185
199
|
* @returns {number|bigint|number[]|bigint[]|undefined} The value
|
|
200
|
+
* @throws RuntimeError If the class property has an invalid component type
|
|
186
201
|
*
|
|
187
202
|
* @private
|
|
188
203
|
*/
|
|
@@ -229,7 +244,8 @@ MetadataPicking.decodeRawMetadataValues = function (
|
|
|
229
244
|
*
|
|
230
245
|
* @param {string} type The `ClassProperty` type
|
|
231
246
|
* @param {number|bigint|number[]|bigint[]|undefined} value The input value
|
|
232
|
-
* @returns {
|
|
247
|
+
* @returns {undefined|number|bigint|string|boolean|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4} The object representation
|
|
248
|
+
* @throws RuntimeError If the type is not a valid `MetadataType`
|
|
233
249
|
*/
|
|
234
250
|
MetadataPicking.convertToObjectType = function (type, value) {
|
|
235
251
|
if (!defined(value)) {
|
|
@@ -250,7 +266,7 @@ MetadataPicking.convertToObjectType = function (type, value) {
|
|
|
250
266
|
case MetadataType.VEC3:
|
|
251
267
|
return Cartesian3.unpack(numbers, 0, new Cartesian3());
|
|
252
268
|
case MetadataType.VEC4:
|
|
253
|
-
return Cartesian4.unpack(numbers, 0, new
|
|
269
|
+
return Cartesian4.unpack(numbers, 0, new Cartesian4());
|
|
254
270
|
case MetadataType.MAT2:
|
|
255
271
|
return Matrix2.unpack(numbers, 0, new Matrix2());
|
|
256
272
|
case MetadataType.MAT3:
|
|
@@ -259,29 +275,104 @@ MetadataPicking.convertToObjectType = function (type, value) {
|
|
|
259
275
|
return Matrix4.unpack(numbers, 0, new Matrix4());
|
|
260
276
|
}
|
|
261
277
|
// Should never happen:
|
|
262
|
-
|
|
278
|
+
throw new RuntimeError(`Invalid metadata object type: ${type}`);
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Converts the given type into a raw value or array representation.
|
|
283
|
+
*
|
|
284
|
+
* For `VECn/MATn` types, the given value is converted into an array.
|
|
285
|
+
* For other types, the value is returned directly
|
|
286
|
+
*
|
|
287
|
+
* @param {string} type The `ClassProperty` type
|
|
288
|
+
* @param {undefined|number|bigint|string|boolean|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4} value The input value
|
|
289
|
+
* @returns {undefined|number|bigint|string|boolean|number[]} The array representation
|
|
290
|
+
* @throws RuntimeError If the type is not a valid `MetadataType`
|
|
291
|
+
*/
|
|
292
|
+
MetadataPicking.convertFromObjectType = function (type, value) {
|
|
293
|
+
if (!defined(value)) {
|
|
294
|
+
return value;
|
|
295
|
+
}
|
|
296
|
+
if (
|
|
297
|
+
type === MetadataType.SCALAR ||
|
|
298
|
+
type === MetadataType.STRING ||
|
|
299
|
+
type === MetadataType.BOOLEAN ||
|
|
300
|
+
type === MetadataType.ENUM
|
|
301
|
+
) {
|
|
302
|
+
return value;
|
|
303
|
+
}
|
|
304
|
+
switch (type) {
|
|
305
|
+
case MetadataType.VEC2:
|
|
306
|
+
return Cartesian2.pack(value, Array(2));
|
|
307
|
+
case MetadataType.VEC3:
|
|
308
|
+
return Cartesian3.pack(value, Array(3));
|
|
309
|
+
case MetadataType.VEC4:
|
|
310
|
+
return Cartesian4.pack(value, Array(4));
|
|
311
|
+
case MetadataType.MAT2:
|
|
312
|
+
return Matrix2.pack(value, Array(4));
|
|
313
|
+
case MetadataType.MAT3:
|
|
314
|
+
return Matrix3.pack(value, Array(9));
|
|
315
|
+
case MetadataType.MAT4:
|
|
316
|
+
return Matrix4.pack(value, Array(16));
|
|
317
|
+
}
|
|
318
|
+
// Should never happen:
|
|
319
|
+
throw new RuntimeError(`Invalid metadata object type: ${type}`);
|
|
263
320
|
};
|
|
264
321
|
|
|
265
322
|
/**
|
|
266
323
|
* Decode the given raw values into a metadata property value.
|
|
267
324
|
*
|
|
268
|
-
* This
|
|
269
|
-
*
|
|
325
|
+
* This applies the value transform (offset/scale) to the result
|
|
326
|
+
* of `decodeRawMetadataValues`, and converts this from array-based
|
|
327
|
+
* types into object types like `CartesianN`.
|
|
270
328
|
*
|
|
271
329
|
* @param {MetadataClassProperty} classProperty The `MetadataClassProperty`
|
|
330
|
+
* @param {object} metadataProperty The
|
|
331
|
+
* `PropertyTextureProperty` or `PropertyAttributeProperty`
|
|
272
332
|
* @param {Uint8Array} rawPixelValues The raw values
|
|
273
|
-
* @returns {
|
|
333
|
+
* @returns {MetadataValue} The value
|
|
334
|
+
* @throws RuntimeError If the class property has an invalid type
|
|
335
|
+
* or component type
|
|
336
|
+
* @throws RangeError If the given pixel values do not have sufficient
|
|
337
|
+
* size to contain the expected value type
|
|
274
338
|
*
|
|
275
339
|
* @private
|
|
276
340
|
*/
|
|
277
341
|
MetadataPicking.decodeMetadataValues = function (
|
|
278
342
|
classProperty,
|
|
343
|
+
metadataProperty,
|
|
279
344
|
rawPixelValues,
|
|
280
345
|
) {
|
|
281
|
-
|
|
346
|
+
let arrayBasedResult = MetadataPicking.decodeRawMetadataValues(
|
|
282
347
|
classProperty,
|
|
283
348
|
rawPixelValues,
|
|
284
349
|
);
|
|
350
|
+
|
|
351
|
+
if (metadataProperty.hasValueTransform) {
|
|
352
|
+
// In the MetadataClassProperty, these offset/scale are always in
|
|
353
|
+
// their array-based form (e.g. a number[3] for `VEC3`). But for
|
|
354
|
+
// the PropertyTextureProperty and PropertyAttributeProperty,
|
|
355
|
+
// the type of the offset/scale is defined to be
|
|
356
|
+
// number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4
|
|
357
|
+
// So these types are converted into their array-based form here, before
|
|
358
|
+
// applying them with `MetadataClassProperty.valueTransformInPlace`
|
|
359
|
+
|
|
360
|
+
const offset = MetadataPicking.convertFromObjectType(
|
|
361
|
+
classProperty.type,
|
|
362
|
+
metadataProperty.offset,
|
|
363
|
+
);
|
|
364
|
+
const scale = MetadataPicking.convertFromObjectType(
|
|
365
|
+
classProperty.type,
|
|
366
|
+
metadataProperty.scale,
|
|
367
|
+
);
|
|
368
|
+
arrayBasedResult = MetadataClassProperty.valueTransformInPlace(
|
|
369
|
+
arrayBasedResult,
|
|
370
|
+
offset,
|
|
371
|
+
scale,
|
|
372
|
+
MetadataComponentType.applyValueTransform,
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
|
|
285
376
|
if (classProperty.isArray) {
|
|
286
377
|
const arrayLength = classProperty.arrayLength;
|
|
287
378
|
const result = Array(arrayLength);
|
|
@@ -295,11 +386,11 @@ MetadataPicking.decodeMetadataValues = function (
|
|
|
295
386
|
}
|
|
296
387
|
return result;
|
|
297
388
|
}
|
|
298
|
-
const
|
|
389
|
+
const objectResult = MetadataPicking.convertToObjectType(
|
|
299
390
|
classProperty.type,
|
|
300
391
|
arrayBasedResult,
|
|
301
392
|
);
|
|
302
|
-
return
|
|
393
|
+
return objectResult;
|
|
303
394
|
};
|
|
304
395
|
|
|
305
396
|
export default Object.freeze(MetadataPicking);
|
|
@@ -7,6 +7,26 @@ import Matrix2 from "../Core/Matrix2.js";
|
|
|
7
7
|
import Matrix3 from "../Core/Matrix3.js";
|
|
8
8
|
import Matrix4 from "../Core/Matrix4.js";
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* An instance of a metadata value.<br>
|
|
12
|
+
* <br>
|
|
13
|
+
* This can be one of the following types:
|
|
14
|
+
* <ul>
|
|
15
|
+
* <li><code>number</code> for type <code>SCALAR</code> and numeric component types except for <code>INT64</code> or <code>UINT64</code></li>
|
|
16
|
+
* <li><code>bigint</code> for type <code>SCALAR</code> and component type <code>INT64</code> or <code>UINT64</code></li>
|
|
17
|
+
* <li><code>string</code> for type <code>STRING</code> or <code>ENUM</code></li>
|
|
18
|
+
* <li><code>boolean</code> for type <code>BOOLEAN</code></li>
|
|
19
|
+
* <li><code>Cartesian2</code> for type <code>VEC2</code></li>
|
|
20
|
+
* <li><code>Cartesian3</code> for type <code>VEC3</code></li>
|
|
21
|
+
* <li><code>Cartesian4</code> for type <code>VEC4</code></li>
|
|
22
|
+
* <li><code>Matrix2</code> for type <code>MAT2</code></li>
|
|
23
|
+
* <li><code>Matrix3</code> for type <code>MAT3</code></li>
|
|
24
|
+
* <li><code>Matrix4</code> for type <code>MAT4</code></li>
|
|
25
|
+
* <li>Arrays of these types when the metadata value is an array</li>
|
|
26
|
+
* </ul>
|
|
27
|
+
* @typedef {(number|bigint|string|boolean|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4|number[]|bigint[]|string[]|boolean[]|Cartesian2[]|Cartesian3[]|Cartesian4[]|Matrix2[]|Matrix3[]|Matrix4[])} MetadataValue
|
|
28
|
+
*/
|
|
29
|
+
|
|
10
30
|
/**
|
|
11
31
|
* An enum of metadata types. These metadata types are containers containing
|
|
12
32
|
* one or more components of type {@link MetadataComponentType}
|
|
@@ -234,7 +234,7 @@ GltfMeshPrimitiveGpmLoader.ppeTexturesMetadataSchemaCache = new Map();
|
|
|
234
234
|
* Create the JSON description of a metadata class that treats
|
|
235
235
|
* the given PPE texture as a property texture property.
|
|
236
236
|
*
|
|
237
|
-
* @param {
|
|
237
|
+
* @param {PpeTexture} ppeTexture - The PPE texture
|
|
238
238
|
* @param {number} index - The index of the texture in the extension
|
|
239
239
|
* @returns The class JSON
|
|
240
240
|
*/
|
|
@@ -268,9 +268,9 @@ GltfMeshPrimitiveGpmLoader._createPpeTextureClassJson = function (
|
|
|
268
268
|
// property values when they are `normalized`, the values will be
|
|
269
269
|
// declared as `normalized` here.
|
|
270
270
|
// The normalization factor will later have to be cancelled out,
|
|
271
|
-
//
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
// with the `scale` being multiplied by 255.
|
|
272
|
+
const offset = ppeTexture.offset ?? 0.0;
|
|
273
|
+
const scale = (ppeTexture.scale ?? 1.0) * 255.0;
|
|
274
274
|
const classJson = {
|
|
275
275
|
name: `PPE texture class ${index}`,
|
|
276
276
|
properties: {
|
|
@@ -279,6 +279,8 @@ GltfMeshPrimitiveGpmLoader._createPpeTextureClassJson = function (
|
|
|
279
279
|
type: "SCALAR",
|
|
280
280
|
componentType: "UINT8",
|
|
281
281
|
normalized: true,
|
|
282
|
+
offset: offset,
|
|
283
|
+
scale: scale,
|
|
282
284
|
min: traits.min,
|
|
283
285
|
max: traits.max,
|
|
284
286
|
},
|
|
@@ -406,19 +408,12 @@ GltfMeshPrimitiveGpmLoader._convertToStructuralMetadata = function (
|
|
|
406
408
|
const ppePropertyName = traits.source;
|
|
407
409
|
const metadataClass = ppeTexturesMetadataSchema.classes[classId];
|
|
408
410
|
|
|
409
|
-
// The class property has been declared as `normalized`, so
|
|
410
|
-
// that `offset` and `scale` can be applied. The normalization
|
|
411
|
-
// factor has to be cancelled out here, by multiplying the
|
|
412
|
-
// `scale` with 255.
|
|
413
|
-
const scale = (ppeTexture.scale ?? 1.0) * 255.0;
|
|
414
411
|
const ppeTextureAsPropertyTexture = {
|
|
415
412
|
class: classId,
|
|
416
413
|
properties: {
|
|
417
414
|
[ppePropertyName]: {
|
|
418
415
|
index: ppeTexture.index,
|
|
419
416
|
texCoord: ppeTexture.texCoord,
|
|
420
|
-
offset: ppeTexture.offset,
|
|
421
|
-
scale: scale,
|
|
422
417
|
},
|
|
423
418
|
},
|
|
424
419
|
};
|
|
@@ -152,12 +152,34 @@ Object.defineProperties(Model3DTileContent.prototype, {
|
|
|
152
152
|
},
|
|
153
153
|
});
|
|
154
154
|
|
|
155
|
+
/**
|
|
156
|
+
* Returns an array containing the `texture.id` values for all textures
|
|
157
|
+
* that are part of this content.
|
|
158
|
+
*
|
|
159
|
+
* @returns {string[]} The texture IDs
|
|
160
|
+
*/
|
|
161
|
+
Model3DTileContent.prototype.getTextureIds = function () {
|
|
162
|
+
return this._model.statistics.getTextureIds();
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Returns the length, in bytes, of the texture data for the texture with
|
|
167
|
+
* the given ID that is part of this content, or `undefined` if this
|
|
168
|
+
* content does not contain the texture with the given ID.
|
|
169
|
+
*
|
|
170
|
+
* @param {string} textureId The texture ID
|
|
171
|
+
* @returns {number|undefined} The texture byte length
|
|
172
|
+
*/
|
|
173
|
+
Model3DTileContent.prototype.getTextureByteLengthById = function (textureId) {
|
|
174
|
+
return this._model.statistics.getTextureByteLengthById(textureId);
|
|
175
|
+
};
|
|
176
|
+
|
|
155
177
|
/**
|
|
156
178
|
* Returns the object that was created for the given extension.
|
|
157
179
|
*
|
|
158
180
|
* The given name may be the name of a glTF extension, like `"EXT_example_extension"`.
|
|
159
181
|
* If the specified extension was present in the root of the underlying glTF asset,
|
|
160
|
-
* and a
|
|
182
|
+
* and a loader for the specified extension has processed the extension data, then
|
|
161
183
|
* this will return the model representation of the extension.
|
|
162
184
|
*
|
|
163
185
|
* @param {string} extensionName The name of the extension
|
|
@@ -61,7 +61,15 @@ function ModelStatistics() {
|
|
|
61
61
|
// Sets of buffers and textures that have already been counted.
|
|
62
62
|
// This is to prevent double-counting cached assets.
|
|
63
63
|
this._bufferIdSet = {};
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The mapping from `texture.id` strings to the byte length of the
|
|
67
|
+
* respective texture
|
|
68
|
+
*
|
|
69
|
+
* @type {object}
|
|
70
|
+
* @private
|
|
71
|
+
*/
|
|
72
|
+
this._textureIdByteLengths = {};
|
|
65
73
|
|
|
66
74
|
// Associated array of batch textures that have already been counted.
|
|
67
75
|
// This allows for quick look-up to check if a texture has been counted,
|
|
@@ -111,7 +119,7 @@ ModelStatistics.prototype.clear = function () {
|
|
|
111
119
|
this.propertyTablesByteLength = 0;
|
|
112
120
|
|
|
113
121
|
this._bufferIdSet = {};
|
|
114
|
-
this.
|
|
122
|
+
this._textureIdByteLengths = {};
|
|
115
123
|
this._batchTextureIdMap.removeAll();
|
|
116
124
|
};
|
|
117
125
|
|
|
@@ -160,12 +168,32 @@ ModelStatistics.prototype.addTexture = function (texture) {
|
|
|
160
168
|
Check.typeOf.object("texture", texture);
|
|
161
169
|
//>>includeEnd('debug');
|
|
162
170
|
|
|
163
|
-
if (!this.
|
|
171
|
+
if (!this._textureIdByteLengths.hasOwnProperty(texture._id)) {
|
|
164
172
|
this.texturesByteLength += texture.sizeInBytes;
|
|
173
|
+
this._textureIdByteLengths[texture._id] = texture.sizeInBytes;
|
|
165
174
|
}
|
|
175
|
+
};
|
|
166
176
|
|
|
167
|
-
|
|
168
|
-
|
|
177
|
+
/**
|
|
178
|
+
* Returns an array containing the `texture.id` values for all textures
|
|
179
|
+
* that are part of the model.
|
|
180
|
+
*
|
|
181
|
+
* @returns {string[]} The texture IDs
|
|
182
|
+
*/
|
|
183
|
+
ModelStatistics.prototype.getTextureIds = function () {
|
|
184
|
+
return Object.keys(this._textureIdByteLengths);
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Returns the length, in bytes, of the texture data for the texture with
|
|
189
|
+
* the given ID that is part of the model, or `undefined` if the model
|
|
190
|
+
* does not contain the texture with the given ID.
|
|
191
|
+
*
|
|
192
|
+
* @param {string} textureId The texture ID
|
|
193
|
+
* @returns {number|undefined} The texture byte length
|
|
194
|
+
*/
|
|
195
|
+
ModelStatistics.prototype.getTextureByteLengthById = function (textureId) {
|
|
196
|
+
return this._textureIdByteLengths[textureId];
|
|
169
197
|
};
|
|
170
198
|
|
|
171
199
|
/**
|
|
@@ -333,9 +333,10 @@ function addShaderFunctionsAndDefines(shaderBuilder, shaderFunctionInfo) {
|
|
|
333
333
|
shaderBuilder.addDefine(
|
|
334
334
|
"HAS_POINT_CLOUD_SHOW_STYLE",
|
|
335
335
|
undefined,
|
|
336
|
-
ShaderDestination.
|
|
336
|
+
ShaderDestination.BOTH,
|
|
337
337
|
);
|
|
338
338
|
shaderBuilder.addVertexLines(showStyleFunction);
|
|
339
|
+
shaderBuilder.addVarying("float", "v_pointCloudShow");
|
|
339
340
|
}
|
|
340
341
|
|
|
341
342
|
const pointSizeStyleFunction = shaderFunctionInfo.pointSizeStyleFunction;
|
|
@@ -6,11 +6,17 @@
|
|
|
6
6
|
* the metadata values of an object into the picking frame buffer. The
|
|
7
7
|
* raw values are read from that buffer, and are then translated back into
|
|
8
8
|
* proper metadata values in `Picking.pickMetadata`, using the structural
|
|
9
|
-
* information about the metadata
|
|
9
|
+
* information about the metadata that is stored here.
|
|
10
10
|
*
|
|
11
11
|
* @private
|
|
12
12
|
*/
|
|
13
|
-
function PickedMetadataInfo(
|
|
13
|
+
function PickedMetadataInfo(
|
|
14
|
+
schemaId,
|
|
15
|
+
className,
|
|
16
|
+
propertyName,
|
|
17
|
+
classProperty,
|
|
18
|
+
metadataProperty,
|
|
19
|
+
) {
|
|
14
20
|
/**
|
|
15
21
|
* The optional ID of the metadata schema
|
|
16
22
|
*
|
|
@@ -29,11 +35,23 @@ function PickedMetadataInfo(schemaId, className, propertyName, classProperty) {
|
|
|
29
35
|
* @type {string}
|
|
30
36
|
*/
|
|
31
37
|
this.propertyName = propertyName;
|
|
38
|
+
|
|
32
39
|
/**
|
|
33
|
-
* The
|
|
40
|
+
* The the `MetadataClassProperty` that is described by this
|
|
41
|
+
* structure, as obtained from the `MetadataSchema`
|
|
34
42
|
*
|
|
35
43
|
* @type {MetadataClassProperty}
|
|
36
44
|
*/
|
|
37
45
|
this.classProperty = classProperty;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The `PropertyTextureProperty` or `PropertyAttributeProperty` that
|
|
49
|
+
* is described by this structure, as obtained from the property texture
|
|
50
|
+
* or property attribute of the `StructuralMetadata` that matches the
|
|
51
|
+
* class name and property name.
|
|
52
|
+
*
|
|
53
|
+
* @type {object}
|
|
54
|
+
*/
|
|
55
|
+
this.metadataProperty = metadataProperty;
|
|
38
56
|
}
|
|
39
57
|
export default PickedMetadataInfo;
|
package/Source/Scene/Picking.js
CHANGED
|
@@ -426,9 +426,14 @@ Picking.prototype.pickVoxelCoordinate = function (
|
|
|
426
426
|
* - For `VEC3`, the return type will be a `Cartesian3`
|
|
427
427
|
* - For `VEC4`, the return type will be a `Cartesian4`
|
|
428
428
|
*
|
|
429
|
+
* Future implementations may additionally return `string`- or
|
|
430
|
+
* `boolean` types, and `MATn` values as `MatrixN` objects,
|
|
431
|
+
* and arrays of the respective types.
|
|
432
|
+
*
|
|
429
433
|
* @param {Cartesian2} windowPosition Window coordinates to perform picking on.
|
|
430
434
|
* @param {PickedMetadataInfo} pickedMetadataInfo Information about the picked metadata.
|
|
431
|
-
* @returns {
|
|
435
|
+
* @returns {MetadataValue|undefined} The metadata value, or `undefined`
|
|
436
|
+
* when no matching metadata value could be picked at the given position
|
|
432
437
|
*
|
|
433
438
|
* @private
|
|
434
439
|
*/
|
|
@@ -517,6 +522,7 @@ Picking.prototype.pickMetadata = function (
|
|
|
517
522
|
|
|
518
523
|
const metadataValue = MetadataPicking.decodeMetadataValues(
|
|
519
524
|
pickedMetadataInfo.classProperty,
|
|
525
|
+
pickedMetadataInfo.metadataProperty,
|
|
520
526
|
rawMetadataPixel,
|
|
521
527
|
);
|
|
522
528
|
|
|
@@ -94,9 +94,16 @@ import PostProcessStageSampleMode from "./PostProcessStageSampleMode.js";
|
|
|
94
94
|
function PostProcessStage(options) {
|
|
95
95
|
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
96
96
|
const {
|
|
97
|
+
name = createGuid(),
|
|
97
98
|
fragmentShader,
|
|
99
|
+
uniforms,
|
|
98
100
|
textureScale = 1.0,
|
|
101
|
+
forcePowerOfTwo = false,
|
|
102
|
+
sampleMode = PostProcessStageSampleMode.NEAREST,
|
|
99
103
|
pixelFormat = PixelFormat.RGBA,
|
|
104
|
+
pixelDatatype = PixelDatatype.UNSIGNED_BYTE,
|
|
105
|
+
clearColor = Color.BLACK,
|
|
106
|
+
scissorRectangle,
|
|
100
107
|
} = options;
|
|
101
108
|
|
|
102
109
|
//>>includeStart('debug', pragmas.debug);
|
|
@@ -113,19 +120,13 @@ function PostProcessStage(options) {
|
|
|
113
120
|
//>>includeEnd('debug');
|
|
114
121
|
|
|
115
122
|
this._fragmentShader = fragmentShader;
|
|
116
|
-
this._uniforms =
|
|
123
|
+
this._uniforms = uniforms;
|
|
117
124
|
this._textureScale = textureScale;
|
|
118
|
-
this._forcePowerOfTwo =
|
|
119
|
-
this._sampleMode =
|
|
120
|
-
options.sampleMode,
|
|
121
|
-
PostProcessStageSampleMode.NEAREST,
|
|
122
|
-
);
|
|
125
|
+
this._forcePowerOfTwo = forcePowerOfTwo;
|
|
126
|
+
this._sampleMode = sampleMode;
|
|
123
127
|
this._pixelFormat = pixelFormat;
|
|
124
|
-
this._pixelDatatype =
|
|
125
|
-
|
|
126
|
-
PixelDatatype.UNSIGNED_BYTE,
|
|
127
|
-
);
|
|
128
|
-
this._clearColor = defaultValue(options.clearColor, Color.BLACK);
|
|
128
|
+
this._pixelDatatype = pixelDatatype;
|
|
129
|
+
this._clearColor = clearColor;
|
|
129
130
|
|
|
130
131
|
this._uniformMap = undefined;
|
|
131
132
|
this._command = undefined;
|
|
@@ -143,18 +144,14 @@ function PostProcessStage(options) {
|
|
|
143
144
|
const passState = new PassState();
|
|
144
145
|
passState.scissorTest = {
|
|
145
146
|
enabled: true,
|
|
146
|
-
rectangle: defined(
|
|
147
|
-
? BoundingRectangle.clone(
|
|
147
|
+
rectangle: defined(scissorRectangle)
|
|
148
|
+
? BoundingRectangle.clone(scissorRectangle)
|
|
148
149
|
: new BoundingRectangle(),
|
|
149
150
|
};
|
|
150
151
|
this._passState = passState;
|
|
151
152
|
|
|
152
153
|
this._ready = false;
|
|
153
154
|
|
|
154
|
-
let name = options.name;
|
|
155
|
-
if (!defined(name)) {
|
|
156
|
-
name = createGuid();
|
|
157
|
-
}
|
|
158
155
|
this._name = name;
|
|
159
156
|
|
|
160
157
|
this._logDepthChanged = undefined;
|
|
@@ -155,32 +155,20 @@ Object.defineProperties(PostProcessStageCollection.prototype, {
|
|
|
155
155
|
* surface receives light and regardless of the light's position.
|
|
156
156
|
* </p>
|
|
157
157
|
* <p>
|
|
158
|
-
* The uniforms have the following properties:
|
|
159
|
-
* <code>stepSize</code>, <code>frustumLength</code>, <code>ambientOcclusionOnly</code>,
|
|
160
|
-
* <code>delta</code>, <code>sigma</code>, and <code>blurStepSize</code>.
|
|
161
|
-
* </p>
|
|
158
|
+
* The uniforms have the following properties:
|
|
162
159
|
* <ul>
|
|
163
160
|
* <li><code>intensity</code> is a scalar value used to lighten or darken the shadows exponentially. Higher values make the shadows darker. The default value is <code>3.0</code>.</li>
|
|
164
|
-
*
|
|
165
161
|
* <li><code>bias</code> is a scalar value representing an angle in radians. If the dot product between the normal of the sample and the vector to the camera is less than this value,
|
|
166
162
|
* sampling stops in the current direction. This is used to remove shadows from near planar edges. The default value is <code>0.1</code>.</li>
|
|
167
|
-
*
|
|
168
163
|
* <li><code>lengthCap</code> is a scalar value representing a length in meters. If the distance from the current sample to first sample is greater than this value,
|
|
169
164
|
* sampling stops in the current direction. The default value is <code>0.26</code>.</li>
|
|
170
|
-
*
|
|
171
|
-
* <li><code>
|
|
172
|
-
*
|
|
173
|
-
* <li><code>frustumLength</code> is a scalar value in meters. If the current fragment has a distance from the camera greater than this value, ambient occlusion is not computed for the fragment.
|
|
174
|
-
* The default value is <code>1000.0</code>.</li>
|
|
175
|
-
*
|
|
165
|
+
* <li><code>directionCount</code> is the number of directions along which the ray marching will search for occluders. The default value is <code>8</code>.</li>
|
|
166
|
+
* <li><code>stepCount</code> is the number of steps the ray marching will take along each direction. The default value is <code>32</code>.</li>
|
|
167
|
+
* <li><code>randomTexture</code> is a texture where the red channel is a random value in [0.0, 1.0]. The default value is <code>undefined</code>. This texture needs to be set.</li>
|
|
176
168
|
* <li><code>ambientOcclusionOnly</code> is a boolean value. When <code>true</code>, only the shadows generated are written to the output. When <code>false</code>, the input texture is modulated
|
|
177
169
|
* with the ambient occlusion. This is a useful debug option for seeing the effects of changing the uniform values. The default value is <code>false</code>.</li>
|
|
178
170
|
* </ul>
|
|
179
171
|
* <p>
|
|
180
|
-
* <code>delta</code>, <code>sigma</code>, and <code>blurStepSize</code> are the same properties as {@link PostProcessStageLibrary#createBlurStage}.
|
|
181
|
-
* The blur is applied to the shadows generated from the image to make them smoother.
|
|
182
|
-
* </p>
|
|
183
|
-
* <p>
|
|
184
172
|
* When enabled, this stage will execute before all others.
|
|
185
173
|
* </p>
|
|
186
174
|
*
|