@cesium/engine 22.2.0 → 22.3.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-C35SJ4QP.js → chunk-2MLJ46ZZ.js} +13 -13
- package/Build/Workers/{chunk-JERDRSEI.js → chunk-4BBANFU6.js} +1 -1
- package/Build/Workers/{chunk-JONWM4IO.js → chunk-4O2ARYS7.js} +1 -1
- package/Build/Workers/{chunk-VGH2CSC7.js → chunk-4R6FGUFP.js} +9 -9
- package/Build/Workers/{chunk-IVN5HSOI.js → chunk-5PJB7ASO.js} +6 -6
- package/Build/Workers/{chunk-35J4D6PX.js → chunk-6GBGEUWR.js} +2 -2
- package/Build/Workers/{chunk-DCR62BCO.js → chunk-6WDMPXQ7.js} +12 -12
- package/Build/Workers/{chunk-4ZQN7M7E.js → chunk-7ATKQRBM.js} +10 -10
- package/Build/Workers/{chunk-FPRM6PCE.js → chunk-7SLNBIZS.js} +5 -34
- package/Build/Workers/{chunk-VSZ5DB2W.js → chunk-7U5YNLF3.js} +1 -1
- package/Build/Workers/{chunk-I4D5IP46.js → chunk-AFGP5BXS.js} +7 -7
- package/Build/Workers/{chunk-IWOSJVFQ.js → chunk-AWELU5C6.js} +14 -14
- package/Build/Workers/{chunk-LDSQMLRC.js → chunk-BO22JHBX.js} +3 -3
- package/Build/Workers/{chunk-2YVTOY5Z.js → chunk-D2PEV362.js} +10 -10
- package/Build/Workers/{chunk-PSHZAHFE.js → chunk-D63Z7KKL.js} +11 -11
- package/Build/Workers/{chunk-AMWXJ5A7.js → chunk-D6OKR3BQ.js} +2 -2
- package/Build/Workers/{chunk-I45CATZK.js → chunk-E4YDCSQK.js} +9 -9
- package/Build/Workers/{chunk-YFEZPDAY.js → chunk-EAAH543Q.js} +11 -11
- package/Build/Workers/{chunk-SDUH3N6G.js → chunk-EOSX23OS.js} +4 -4
- package/Build/Workers/{chunk-A3NUMZBG.js → chunk-EUDHHS7K.js} +6 -6
- package/Build/Workers/{chunk-BKYJBTHW.js → chunk-EY5HOJFQ.js} +5 -5
- package/Build/Workers/{chunk-64PJ4MTB.js → chunk-FDOLXORR.js} +7 -7
- package/Build/Workers/{chunk-WH4HDRGN.js → chunk-FS42VX2H.js} +2 -2
- package/Build/Workers/{chunk-ED4UXMYY.js → chunk-FUDC3KOT.js} +5 -5
- package/Build/Workers/{chunk-CQCEPC6N.js → chunk-HWGP4GVC.js} +13 -13
- package/Build/Workers/{chunk-QO6Z5UJE.js → chunk-IHFAFGR2.js} +2 -2
- package/Build/Workers/{chunk-72LZ3FN6.js → chunk-IXL46IYV.js} +12 -12
- package/Build/Workers/{chunk-JFN2DQHY.js → chunk-K2PLKJJG.js} +5 -5
- package/Build/Workers/{chunk-NY3CWLIZ.js → chunk-K4PGSAR5.js} +8 -8
- package/Build/Workers/{chunk-UBJYWGMV.js → chunk-KIJR26N3.js} +16 -16
- package/Build/Workers/{chunk-MWGB6DLR.js → chunk-L4OFWHNI.js} +1 -1
- package/Build/Workers/{chunk-XPNY2VY3.js → chunk-LK7GEFGB.js} +2 -2
- package/Build/Workers/{chunk-3JB2X2PR.js → chunk-LWZHJWYK.js} +6 -6
- package/Build/Workers/{chunk-ZGWX2R5I.js → chunk-LYBNPUEI.js} +4 -4
- package/Build/Workers/{chunk-4I7BCCNU.js → chunk-M5DVYXJJ.js} +6 -6
- package/Build/Workers/{chunk-4MCPC4TE.js → chunk-MASEF4OV.js} +8 -8
- package/Build/Workers/{chunk-FM5XPC2E.js → chunk-N66PIK46.js} +4 -4
- package/Build/Workers/{chunk-C6FTHSJA.js → chunk-N6XBJBI7.js} +6 -6
- package/Build/Workers/{chunk-7OPRTZBT.js → chunk-NO3LMU7T.js} +7 -7
- package/Build/Workers/{chunk-DIJ7IG5D.js → chunk-NVL7JXAQ.js} +10 -10
- package/Build/Workers/{chunk-O3GWUTWM.js → chunk-OOYICVOK.js} +1 -1
- package/Build/Workers/{chunk-K6BXEBAF.js → chunk-PJLRXIMS.js} +17 -17
- package/Build/Workers/{chunk-7CDQUIP5.js → chunk-S2KVL7OJ.js} +8 -8
- package/Build/Workers/{chunk-PMDPP22G.js → chunk-T5MJDW43.js} +7 -7
- package/Build/Workers/{chunk-GMHDOQPH.js → chunk-TCOUGKXF.js} +4 -4
- package/Build/Workers/{chunk-ZUWF63QU.js → chunk-TMGLPEZW.js} +4 -4
- package/Build/Workers/{chunk-JUOSYFXT.js → chunk-TY5JXMVO.js} +1 -1
- package/Build/Workers/{chunk-3HUEBDFC.js → chunk-VIQIKMTZ.js} +14 -14
- package/Build/Workers/{chunk-N5MNKWED.js → chunk-VRAAQ3FS.js} +2 -2
- package/Build/Workers/{chunk-K64RQCRK.js → chunk-W5NV72VR.js} +17 -17
- package/Build/Workers/{chunk-G6WQA27G.js → chunk-WHLGBMBC.js} +5 -5
- package/Build/Workers/{chunk-2JNPWPLE.js → chunk-WUWPKBOZ.js} +6 -6
- package/Build/Workers/{chunk-MSTAVM2N.js → chunk-XLIJV3YZ.js} +10 -10
- package/Build/Workers/{chunk-V26Y7ZQL.js → chunk-Y5MRBKQN.js} +37 -27
- package/Build/Workers/{chunk-L2FSBEW2.js → chunk-YHPBT4I5.js} +5 -5
- package/Build/Workers/{chunk-7MGTX4WP.js → chunk-ZGGVEGTA.js} +12 -12
- package/Build/Workers/{chunk-P7ISUYLW.js → chunk-ZWWN2CQH.js} +4 -4
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +16 -16
- package/Build/Workers/createCircleGeometry.js +26 -26
- package/Build/Workers/createCircleOutlineGeometry.js +19 -19
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
- package/Build/Workers/createEllipseGeometry.js +26 -26
- package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
- package/Build/Workers/createEllipsoidGeometry.js +19 -19
- package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
- package/Build/Workers/createFrustumGeometry.js +18 -18
- package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
- package/Build/Workers/createGeometry.js +24 -24
- package/Build/Workers/createGroundPolylineGeometry.js +22 -22
- package/Build/Workers/createPlaneGeometry.js +16 -16
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
- package/Build/Workers/createPolygonGeometry.js +32 -32
- package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createPolylineGeometry.js +25 -25
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
- package/Build/Workers/createSimplePolylineGeometry.js +23 -23
- package/Build/Workers/createSphereGeometry.js +19 -19
- package/Build/Workers/createSphereOutlineGeometry.js +18 -18
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +24 -24
- package/Build/Workers/createVectorTilePoints.js +13 -13
- package/Build/Workers/createVectorTilePolygons.js +22 -22
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
- package/Build/Workers/createVerticesFromHeightmap.js +22 -22
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
- package/Build/Workers/createWallGeometry.js +24 -24
- package/Build/Workers/createWallOutlineGeometry.js +23 -23
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/gaussianSplatSorter.js +4 -4
- package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
- package/Build/Workers/incrementallyBuildTerrainPicker.js +20 -12
- package/Build/Workers/transcodeKTX2.js +6 -6
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Source/Core/BoxGeometry.js +1 -1
- package/Source/Core/CornerType.js +1 -1
- package/Source/Core/CorridorGeometry.js +1 -1
- package/Source/Core/FeatureDetection.js +1 -32
- package/Source/Core/Geometry.js +1 -1
- package/Source/Core/IntersectionTests.js +2 -2
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/PinBuilder.js +1 -1
- package/Source/Core/PolygonGeometry.js +1 -1
- package/Source/Core/PolylineGeometry.js +1 -1
- package/Source/Core/PolylineVolumeGeometry.js +1 -1
- package/Source/Core/RectangleGeometry.js +1 -1
- package/Source/Core/ScreenSpaceEventHandler.js +4 -8
- package/Source/Core/TerrainMesh.js +11 -8
- package/Source/Core/TerrainPicker.js +24 -7
- package/Source/Core/VideoSynchronizer.js +1 -1
- package/Source/Core/WallGeometry.js +1 -1
- package/Source/Core/writeTextToCanvas.js +40 -86
- package/Source/DataSources/BillboardGraphics.js +1 -1
- package/Source/DataSources/BoxGraphics.js +1 -1
- package/Source/DataSources/CallbackPositionProperty.js +1 -1
- package/Source/DataSources/CorridorGraphics.js +1 -1
- package/Source/DataSources/CzmlDataSource.js +1 -1
- package/Source/DataSources/EllipseGraphics.js +1 -1
- package/Source/DataSources/EllipsoidGraphics.js +1 -1
- package/Source/DataSources/Entity.js +1 -1
- package/Source/DataSources/EntityCluster.js +2 -2
- package/Source/DataSources/GeoJsonDataSource.js +2 -2
- package/Source/DataSources/GpxDataSource.js +1 -1
- package/Source/DataSources/KmlDataSource.js +1 -1
- package/Source/DataSources/KmlTour.js +1 -1
- package/Source/DataSources/LabelGraphics.js +1 -1
- package/Source/DataSources/ModelGraphics.js +1 -1
- package/Source/DataSources/PlaneGraphics.js +1 -1
- package/Source/DataSources/PolygonGraphics.js +1 -1
- package/Source/DataSources/PolylineGraphics.js +1 -1
- package/Source/DataSources/PolylineVolumeGraphics.js +1 -1
- package/Source/DataSources/RectangleGraphics.js +1 -1
- package/Source/DataSources/WallGraphics.js +1 -1
- package/Source/DataSources/exportKml.js +1 -1
- package/Source/Renderer/Context.js +11 -10
- package/Source/Renderer/ContextLimits.js +66 -33
- package/Source/Renderer/ShaderSource.js +19 -18
- package/Source/Renderer/Texture.js +1 -1
- package/Source/Renderer/Texture3D.js +166 -7
- package/Source/Renderer/TextureAtlas.js +2 -2
- package/Source/Scene/Appearance.js +1 -1
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +1 -1
- package/Source/Scene/BillboardCollection.js +1 -1
- package/Source/Scene/BillboardTexture.js +4 -1
- package/Source/Scene/Camera.js +13 -2
- package/Source/Scene/ClippingPlaneCollection.js +2 -2
- package/Source/Scene/CloudCollection.js +2 -2
- package/Source/Scene/CumulusCloud.js +1 -1
- package/Source/Scene/DynamicEnvironmentMapManager.js +41 -26
- package/Source/Scene/Fog.js +1 -1
- package/Source/Scene/GaussianSplatPrimitive.js +1 -1
- package/Source/Scene/Globe.js +3 -10
- package/Source/Scene/GltfLoader.js +10 -0
- package/Source/Scene/ImageBasedLighting.js +2 -2
- package/Source/Scene/ImageryLayerCollection.js +2 -2
- package/Source/Scene/ImageryProvider.js +2 -2
- package/Source/Scene/Label.js +1 -1
- package/Source/Scene/LabelCollection.js +1 -1
- package/Source/Scene/Material.js +1 -1
- package/Source/Scene/MaterialAppearance.js +1 -1
- package/Source/Scene/Megatexture.js +174 -242
- package/Source/Scene/Model/MaterialPipelineStage.js +17 -0
- package/Source/Scene/Model/Model.js +1 -1
- package/Source/Scene/ModelComponents.js +10 -0
- package/Source/Scene/ParticleSystem.js +2 -2
- package/Source/Scene/PointPrimitive.js +1 -1
- package/Source/Scene/Polyline.js +0 -1
- package/Source/Scene/PolylineCollection.js +1 -4
- package/Source/Scene/PolylineColorAppearance.js +1 -6
- package/Source/Scene/PolylineMaterialAppearance.js +1 -6
- package/Source/Scene/PostProcessStageCollection.js +1 -1
- package/Source/Scene/QuadtreePrimitive.js +6 -3
- package/Source/Scene/ShadowMap.js +1 -2
- package/Source/Scene/Vector3DTileClampedPolylines.js +1 -5
- package/Source/Scene/Vector3DTilePolylines.js +1 -5
- package/Source/Scene/VoxelPrimitive.js +16 -33
- package/Source/Scene/VoxelRenderResources.js +1 -8
- package/Source/Scene/VoxelTraversal.js +16 -61
- package/Source/Scene/WebMapTileServiceImageryProvider.js +1 -1
- package/Source/Scene/createElevationBandMaterial.js +1 -1
- package/Source/Scene/processVoxelProperties.js +1 -1
- package/Source/Shaders/Builtin/Functions/columbusViewMorph.glsl +8 -1
- package/Source/Shaders/Builtin/Functions/columbusViewMorph.js +8 -1
- package/Source/Shaders/Model/ModelFS.glsl +8 -0
- package/Source/Shaders/Model/ModelFS.js +8 -0
- package/Source/Shaders/Model/ModelVS.glsl +2 -0
- package/Source/Shaders/Model/ModelVS.js +2 -0
- package/Source/Shaders/Voxels/IntersectionUtils.glsl +1 -1
- package/Source/Shaders/Voxels/IntersectionUtils.js +1 -1
- package/Source/Shaders/Voxels/Megatexture.glsl +15 -83
- package/Source/Shaders/Voxels/Megatexture.js +15 -83
- package/Source/Shaders/Voxels/Octree.glsl +6 -9
- package/Source/Shaders/Voxels/Octree.js +6 -9
- package/Source/Widget/CesiumWidget.js +1 -1
- package/Source/Workers/incrementallyBuildTerrainPicker.js +16 -2
- package/index.d.ts +18 -4
- package/index.js +90 -90
- package/package.json +2 -1
|
@@ -31,7 +31,7 @@ import defined from "../Core/defined.js";
|
|
|
31
31
|
* @internalConstructor
|
|
32
32
|
* @class
|
|
33
33
|
*
|
|
34
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?
|
|
34
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=cloud-parameters|Cesium Sandcastle Cloud Parameters Demo}
|
|
35
35
|
*/
|
|
36
36
|
function CumulusCloud(options, cloudCollection) {
|
|
37
37
|
options = options ?? Frozen.EMPTY_OBJECT;
|
|
@@ -33,7 +33,7 @@ import ConvolveSpecularMapVS from "../Shaders/ConvolveSpecularMapVS.js";
|
|
|
33
33
|
* @typedef {object} DynamicEnvironmentMapManager.ConstructorOptions
|
|
34
34
|
* Options for the DynamicEnvironmentMapManager constructor
|
|
35
35
|
* @property {boolean} [enabled=true] If true, the environment map and related properties will continue to update.
|
|
36
|
-
* @property {number} [mipmapLevels=7] The number of mipmap levels to generate for specular maps. More mipmap levels will produce a higher resolution specular reflection.
|
|
36
|
+
* @property {number} [mipmapLevels=7] The maximum desired number of mipmap levels to generate for specular maps. More mipmap levels will produce a higher resolution specular reflection. The actual number of mipmaps used will be bounded by the cubemap texture size supported on the client machine. The number of mipmaps must be at least one for the environment map to be generated.
|
|
37
37
|
* @property {number} [maximumSecondsDifference=3600] The maximum amount of elapsed seconds before a new environment map is created.
|
|
38
38
|
* @property {number} [maximumPositionEpsilon=1000] The maximum difference in position before a new environment map is created, in meters. Small differences in position will not visibly affect results.
|
|
39
39
|
* @property {number} [atmosphereScatteringIntensity=2.0] The intensity of the scattered light emitted from the atmosphere. This should be adjusted relative to the value of {@link Scene.light} intensity.
|
|
@@ -81,14 +81,21 @@ function DynamicEnvironmentMapManager(options) {
|
|
|
81
81
|
|
|
82
82
|
options = options ?? Frozen.EMPTY_OBJECT;
|
|
83
83
|
|
|
84
|
-
const mipmapLevels = Math.
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
const mipmapLevels = Math.max(
|
|
85
|
+
Math.floor(
|
|
86
|
+
Math.min(
|
|
87
|
+
options.mipmapLevels ?? 7,
|
|
88
|
+
Math.log2(ContextLimits.maximumCubeMapSize),
|
|
89
|
+
),
|
|
90
|
+
),
|
|
91
|
+
0,
|
|
87
92
|
);
|
|
88
93
|
|
|
89
94
|
this._mipmapLevels = mipmapLevels;
|
|
95
|
+
|
|
96
|
+
const arrayLength = Math.max(mipmapLevels - 1, 0) * 6;
|
|
90
97
|
this._radianceMapComputeCommands = new Array(6);
|
|
91
|
-
this._convolutionComputeCommands = new Array(
|
|
98
|
+
this._convolutionComputeCommands = new Array(arrayLength);
|
|
92
99
|
this._irradianceComputeCommand = undefined;
|
|
93
100
|
|
|
94
101
|
this._radianceMapFS = undefined;
|
|
@@ -97,7 +104,7 @@ function DynamicEnvironmentMapManager(options) {
|
|
|
97
104
|
this._va = undefined;
|
|
98
105
|
|
|
99
106
|
this._radianceMapTextures = new Array(6);
|
|
100
|
-
this._specularMapTextures = new Array(
|
|
107
|
+
this._specularMapTextures = new Array(arrayLength);
|
|
101
108
|
this._radianceCubeMap = undefined;
|
|
102
109
|
this._irradianceMapTexture = undefined;
|
|
103
110
|
|
|
@@ -105,7 +112,7 @@ function DynamicEnvironmentMapManager(options) {
|
|
|
105
112
|
DynamicEnvironmentMapManager.DEFAULT_SPHERICAL_HARMONIC_COEFFICIENTS.slice();
|
|
106
113
|
|
|
107
114
|
this._lastTime = new JulianDate();
|
|
108
|
-
const width = Math.pow(2, mipmapLevels - 1);
|
|
115
|
+
const width = Math.max(Math.pow(2, mipmapLevels - 1), 1);
|
|
109
116
|
this._textureDimensions = new Cartesian2(width, width);
|
|
110
117
|
|
|
111
118
|
this._radiiAndDynamicAtmosphereColor = new Cartesian3();
|
|
@@ -621,6 +628,28 @@ function updateSpecularMaps(manager, frameState) {
|
|
|
621
628
|
const context = frameState.context;
|
|
622
629
|
|
|
623
630
|
let facesCopied = 0;
|
|
631
|
+
const checkComplete = () => {
|
|
632
|
+
// All faces for each mipmap level have been copied
|
|
633
|
+
const length = manager._specularMapTextures.length;
|
|
634
|
+
if (facesCopied >= length) {
|
|
635
|
+
manager._irradianceCommandDirty = true;
|
|
636
|
+
|
|
637
|
+
if (mipmapLevels > 1) {
|
|
638
|
+
radianceCubeMap.sampler = new Sampler({
|
|
639
|
+
minificationFilter: TextureMinificationFilter.LINEAR_MIPMAP_LINEAR,
|
|
640
|
+
});
|
|
641
|
+
|
|
642
|
+
manager._shouldRegenerateShaders = true;
|
|
643
|
+
|
|
644
|
+
// Cleanup shared resources
|
|
645
|
+
manager._va.destroy();
|
|
646
|
+
manager._va = undefined;
|
|
647
|
+
manager._convolveSP.destroy();
|
|
648
|
+
manager._convolveSP = undefined;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
};
|
|
652
|
+
|
|
624
653
|
const getPostExecute = (command, index, texture, face, level) => () => {
|
|
625
654
|
if (manager.isDestroyed() || command.canceled) {
|
|
626
655
|
DynamicEnvironmentMapManager._activeComputeCommandCount--;
|
|
@@ -638,22 +667,7 @@ function updateSpecularMaps(manager, frameState) {
|
|
|
638
667
|
texture.destroy();
|
|
639
668
|
manager._specularMapTextures[index] = undefined;
|
|
640
669
|
|
|
641
|
-
|
|
642
|
-
const length = manager._specularMapTextures.length;
|
|
643
|
-
if (facesCopied >= length) {
|
|
644
|
-
manager._irradianceCommandDirty = true;
|
|
645
|
-
radianceCubeMap.sampler = new Sampler({
|
|
646
|
-
minificationFilter: TextureMinificationFilter.LINEAR_MIPMAP_LINEAR,
|
|
647
|
-
});
|
|
648
|
-
|
|
649
|
-
manager._shouldRegenerateShaders = true;
|
|
650
|
-
|
|
651
|
-
// Cleanup shared resources
|
|
652
|
-
manager._va.destroy();
|
|
653
|
-
manager._va = undefined;
|
|
654
|
-
manager._convolveSP.destroy();
|
|
655
|
-
manager._convolveSP = undefined;
|
|
656
|
-
}
|
|
670
|
+
checkComplete();
|
|
657
671
|
};
|
|
658
672
|
|
|
659
673
|
let index = 0;
|
|
@@ -721,6 +735,7 @@ function updateSpecularMaps(manager, frameState) {
|
|
|
721
735
|
width /= 2;
|
|
722
736
|
height /= 2;
|
|
723
737
|
}
|
|
738
|
+
checkComplete();
|
|
724
739
|
}
|
|
725
740
|
|
|
726
741
|
const irradianceTextureDimensions = new Cartesian2(3, 3); // 9 coefficients
|
|
@@ -839,9 +854,9 @@ function updateSphericalHarmonicCoefficients(manager, frameState) {
|
|
|
839
854
|
DynamicEnvironmentMapManager.prototype.update = function (frameState) {
|
|
840
855
|
const mode = frameState.mode;
|
|
841
856
|
const isSupported =
|
|
842
|
-
// A FrameState type works here because the function only references the context parameter.
|
|
843
|
-
|
|
844
|
-
|
|
857
|
+
// @ts-expect-error A FrameState type works here because the function only references the context parameter.
|
|
858
|
+
DynamicEnvironmentMapManager.isDynamicUpdateSupported(frameState) &&
|
|
859
|
+
this._mipmapLevels >= 1;
|
|
845
860
|
|
|
846
861
|
if (
|
|
847
862
|
!isSupported ||
|
package/Source/Scene/Fog.js
CHANGED
|
@@ -8,7 +8,7 @@ import SceneMode from "./SceneMode.js";
|
|
|
8
8
|
* Blends the atmosphere to geometry far from the camera for horizon views. Allows for additional
|
|
9
9
|
* performance improvements by rendering less geometry and dispatching less terrain requests.
|
|
10
10
|
*
|
|
11
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?
|
|
11
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=fog|Cesium Sandcastle Fog Demo}
|
|
12
12
|
*
|
|
13
13
|
* @alias Fog
|
|
14
14
|
* @constructor
|
|
@@ -788,7 +788,7 @@ GaussianSplatPrimitive.buildGSplatDrawCommand = function (
|
|
|
788
788
|
cull: renderStateOptions.cull.enabled,
|
|
789
789
|
pass: Pass.GAUSSIAN_SPLATS,
|
|
790
790
|
count: renderResources.count,
|
|
791
|
-
owner:
|
|
791
|
+
owner: primitive,
|
|
792
792
|
instanceCount: renderResources.instanceCount,
|
|
793
793
|
primitiveType: PrimitiveType.TRIANGLE_STRIP,
|
|
794
794
|
debugShowBoundingVolume: tileset.debugShowBoundingVolume,
|
package/Source/Scene/Globe.js
CHANGED
|
@@ -723,14 +723,7 @@ Globe.prototype.pickWorldCoordinates = function (
|
|
|
723
723
|
const sphereIntersections = scratchArray;
|
|
724
724
|
sphereIntersections.length = 0;
|
|
725
725
|
|
|
726
|
-
const
|
|
727
|
-
let length = tilesToRender.length;
|
|
728
|
-
|
|
729
|
-
let tile;
|
|
730
|
-
let i;
|
|
731
|
-
|
|
732
|
-
for (i = 0; i < length; ++i) {
|
|
733
|
-
tile = tilesToRender[i];
|
|
726
|
+
for (const tile of this._surface._tilesRenderedThisFrame) {
|
|
734
727
|
const surfaceTile = tile.data;
|
|
735
728
|
|
|
736
729
|
if (!defined(surfaceTile)) {
|
|
@@ -776,8 +769,8 @@ Globe.prototype.pickWorldCoordinates = function (
|
|
|
776
769
|
sphereIntersections.sort(createComparePickTileFunction(ray.origin));
|
|
777
770
|
|
|
778
771
|
let intersection;
|
|
779
|
-
length = sphereIntersections.length;
|
|
780
|
-
for (i = 0; i < length; ++i) {
|
|
772
|
+
const length = sphereIntersections.length;
|
|
773
|
+
for (let i = 0; i < length; ++i) {
|
|
781
774
|
intersection = sphereIntersections[i].pick(
|
|
782
775
|
ray,
|
|
783
776
|
scene.mode,
|
|
@@ -1811,6 +1811,16 @@ function loadMaterial(loader, gltfMaterial, frameState) {
|
|
|
1811
1811
|
material.alphaCutoff = gltfMaterial.alphaCutoff;
|
|
1812
1812
|
material.doubleSided = gltfMaterial.doubleSided;
|
|
1813
1813
|
|
|
1814
|
+
// BENTLEY_materials_point_style extension
|
|
1815
|
+
const pointStyleExtension = extensions.BENTLEY_materials_point_style;
|
|
1816
|
+
if (defined(pointStyleExtension) && defined(pointStyleExtension.diameter)) {
|
|
1817
|
+
const diameter = pointStyleExtension.diameter;
|
|
1818
|
+
// The spec requires a positive integer, but we floor non-integers as a best effort.
|
|
1819
|
+
if (diameter >= 1) {
|
|
1820
|
+
material.pointDiameter = Math.floor(diameter);
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1814
1824
|
return material;
|
|
1815
1825
|
}
|
|
1816
1826
|
|
|
@@ -162,7 +162,7 @@ Object.defineProperties(ImageBasedLighting.prototype, {
|
|
|
162
162
|
* @memberof ImageBasedLighting.prototype
|
|
163
163
|
*
|
|
164
164
|
* @type {Cartesian3[]}
|
|
165
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?
|
|
165
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=image-based-lighting|Sandcastle Image Based Lighting Demo}
|
|
166
166
|
* @see {@link https://graphics.stanford.edu/papers/envmap/envmap.pdf|An Efficient Representation for Irradiance Environment Maps}
|
|
167
167
|
*/
|
|
168
168
|
sphericalHarmonicCoefficients: {
|
|
@@ -187,7 +187,7 @@ Object.defineProperties(ImageBasedLighting.prototype, {
|
|
|
187
187
|
* A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
|
|
188
188
|
*
|
|
189
189
|
* @memberof ImageBasedLighting.prototype
|
|
190
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?
|
|
190
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=image-based-lighting|Sandcastle Image Based Lighting Demo}
|
|
191
191
|
* @type {string}
|
|
192
192
|
* @see ImageBasedLighting#sphericalHarmonicCoefficients
|
|
193
193
|
*/
|
|
@@ -13,8 +13,8 @@ import ImageryLayer from "./ImageryLayer.js";
|
|
|
13
13
|
* @constructor
|
|
14
14
|
* @see {@link Scene#imageryLayers} for manipulating imagery layers on the globe.
|
|
15
15
|
* @see {@link Cesium3DTileset#imageryLayers} for manipulating imagery layers on a 3D tileset.
|
|
16
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?
|
|
17
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?
|
|
16
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=imagery-adjustment|Cesium Sandcastle Imagery Adjustment Demo}
|
|
17
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=imagery-layers-manipulation|Cesium Sandcastle Imagery Manipulation Demo}
|
|
18
18
|
*/
|
|
19
19
|
function ImageryLayerCollection() {
|
|
20
20
|
this._layers = [];
|
|
@@ -39,8 +39,8 @@ import Resource from "../Core/Resource.js";
|
|
|
39
39
|
* @see WebMapServiceImageryProvider
|
|
40
40
|
* @see WebMapTileServiceImageryProvider
|
|
41
41
|
*
|
|
42
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?
|
|
43
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?
|
|
42
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=imagery-layers|Cesium Sandcastle Imagery Layers Demo}
|
|
43
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=imagery-layers-manipulation|Cesium Sandcastle Imagery Manipulation Demo}
|
|
44
44
|
*/
|
|
45
45
|
function ImageryProvider() {
|
|
46
46
|
DeveloperError.throwInstantiationError();
|
package/Source/Scene/Label.js
CHANGED
|
@@ -134,7 +134,7 @@ function parseFont(label) {
|
|
|
134
134
|
* @see LabelCollection
|
|
135
135
|
* @see LabelCollection#add
|
|
136
136
|
*
|
|
137
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?
|
|
137
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=labels|Cesium Sandcastle Labels Demo}
|
|
138
138
|
*/
|
|
139
139
|
function Label(options, labelCollection) {
|
|
140
140
|
options = options ?? Frozen.EMPTY_OBJECT;
|
|
@@ -604,7 +604,7 @@ function destroyLabel(labelCollection, label) {
|
|
|
604
604
|
* @see Label
|
|
605
605
|
* @see BillboardCollection
|
|
606
606
|
*
|
|
607
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?
|
|
607
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=labels|Cesium Sandcastle Labels Demo}
|
|
608
608
|
*
|
|
609
609
|
* @example
|
|
610
610
|
* // Create a label collection with two labels
|
package/Source/Scene/Material.js
CHANGED
|
@@ -250,7 +250,7 @@ import WaterMaterial from "../Shaders/Materials/Water.js";
|
|
|
250
250
|
* @exception {DeveloperError} strict: shader source does not use material.
|
|
251
251
|
*
|
|
252
252
|
* @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric wiki page} for a more detailed options of Fabric.
|
|
253
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?
|
|
253
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=materials|Cesium Sandcastle Materials Demo}
|
|
254
254
|
*
|
|
255
255
|
* @example
|
|
256
256
|
* // Create a color material with fromType:
|
|
@@ -29,7 +29,7 @@ import Material from "./Material.js";
|
|
|
29
29
|
* @param {object} [options.renderState] Optional render state to override the default render state.
|
|
30
30
|
*
|
|
31
31
|
* @see {@link https://github.com/CesiumGS/cesium/wiki/Fabric|Fabric}
|
|
32
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?
|
|
32
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?id=materials|Cesium Sandcastle Material Appearance Demo}
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
35
|
* const primitive = new Cesium.Primitive({
|