@cesium/engine 6.2.0 → 8.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/ThirdParty/Workers/z-worker-pako.js +568 -407
- package/Build/Workers/{chunk-RH4N2ONY.js → chunk-23UFSGND.js} +7 -7
- package/Build/Workers/{chunk-HPP4JLNH.js → chunk-2A75IWRS.js} +7 -7
- package/Build/Workers/{chunk-5IRLXUTA.js → chunk-2FRVPMCS.js} +10 -10
- package/Build/Workers/{chunk-ZQRZBHYI.js → chunk-2FWRMUTY.js} +4 -4
- package/Build/Workers/{chunk-Z2SIPUKB.js → chunk-2UPKWTMJ.js} +6 -6
- package/Build/Workers/{chunk-434ZTTFX.js → chunk-34FXV7D7.js} +2 -2
- package/Build/Workers/{chunk-MW3CJYLX.js → chunk-3VAZEH7M.js} +2 -2
- package/Build/Workers/{chunk-HUPNRBWW.js → chunk-4DO5W5XZ.js} +6 -6
- package/Build/Workers/{chunk-PIXK6KHB.js → chunk-4H7PY4U5.js} +2 -2
- package/Build/Workers/{chunk-BP467WX3.js → chunk-5QULIR53.js} +4 -4
- package/Build/Workers/{chunk-R3HUGXBH.js → chunk-7TC63SJW.js} +8 -8
- package/Build/Workers/{chunk-SQVTYRZY.js → chunk-7ZFGPDJA.js} +4 -4
- package/Build/Workers/{chunk-TIXXVKUY.js → chunk-A5DWLWCY.js} +10 -10
- package/Build/Workers/{chunk-CWJQGBWT.js → chunk-BBWDMCVU.js} +1 -1
- package/Build/Workers/{chunk-4KP73B43.js → chunk-BG4UCVXN.js} +3 -3
- package/Build/Workers/{chunk-Y4OJ4B23.js → chunk-BIKA3NRA.js} +5 -5
- package/Build/Workers/{chunk-DR5XZ6K5.js → chunk-BROJAZRZ.js} +13 -13
- package/Build/Workers/{chunk-FWGNCYP6.js → chunk-DDUQAJ4P.js} +7 -7
- package/Build/Workers/{chunk-QRBRVGZC.js → chunk-EERJKOAF.js} +4 -4
- package/Build/Workers/{chunk-52VSIKEA.js → chunk-EG6PTBY2.js} +15 -15
- package/Build/Workers/{chunk-O43GWBSF.js → chunk-EHWHNOEX.js} +1 -1
- package/Build/Workers/{chunk-MN34FIF5.js → chunk-F3YA3Y2Z.js} +1 -1
- package/Build/Workers/{chunk-GF5TNNKP.js → chunk-F4HFJMGM.js} +6 -6
- package/Build/Workers/{chunk-HOT2SNXP.js → chunk-FJKNFAKQ.js} +133 -553
- package/Build/Workers/{chunk-TMPVBFJQ.js → chunk-FNIRWHJB.js} +10 -10
- package/Build/Workers/{chunk-DMCSY5BU.js → chunk-FZRIVR7Y.js} +5 -5
- package/Build/Workers/{chunk-Z4JUBRHP.js → chunk-G43QFN4Q.js} +6 -6
- package/Build/Workers/{chunk-HPH5HSFE.js → chunk-GATZHF3K.js} +2 -2
- package/Build/Workers/{chunk-CSIZ3BGT.js → chunk-GRC2ZTAF.js} +14 -14
- package/Build/Workers/{chunk-NE4JNU6H.js → chunk-HU6N6EXB.js} +10 -10
- package/Build/Workers/{chunk-GVL5I7TC.js → chunk-I46ZRR5W.js} +17 -17
- package/Build/Workers/{chunk-5GDBZTHX.js → chunk-JURN7NPV.js} +17 -17
- package/Build/Workers/{chunk-H5DUXHCV.js → chunk-KKCR2YOP.js} +11 -11
- package/Build/Workers/{chunk-LX6XV4DK.js → chunk-LPR3YNP2.js} +5 -5
- package/Build/Workers/{chunk-HFKSAB5K.js → chunk-M7ERACJJ.js} +13 -13
- package/Build/Workers/{chunk-BUZDZBUH.js → chunk-MDWEGWPA.js} +10 -10
- package/Build/Workers/{chunk-LGJUI2CE.js → chunk-OGXZVPPM.js} +9 -5
- package/Build/Workers/{chunk-PZ2WJWUG.js → chunk-PGSJK77E.js} +6 -6
- package/Build/Workers/{chunk-ARPTYYKS.js → chunk-PPH7OFP3.js} +5 -5
- package/Build/Workers/{chunk-R4OZKBXH.js → chunk-SH5USDPI.js} +6 -6
- package/Build/Workers/{chunk-SV7DDPAC.js → chunk-SOWMRMWA.js} +1 -1
- package/Build/Workers/{chunk-RIDPF7PO.js → chunk-STW2DGFI.js} +2 -2
- package/Build/Workers/{chunk-CDGHUKQ4.js → chunk-T3XIFPYR.js} +13 -13
- package/Build/Workers/chunk-TTUZP4BO.js +501 -0
- package/Build/Workers/{chunk-QTZQZY2C.js → chunk-UEXTBDBE.js} +34 -10
- package/Build/Workers/{chunk-XUTVA4K5.js → chunk-VOXYEYJT.js} +11 -11
- package/Build/Workers/{chunk-AXFRNOVC.js → chunk-X4356LRH.js} +12 -12
- package/Build/Workers/{chunk-5HLGKKG3.js → chunk-XGI5BXZY.js} +2 -2
- package/Build/Workers/{chunk-SNN7WOC2.js → chunk-Y2ME2IJV.js} +13 -13
- package/Build/Workers/{chunk-LGL4P5KL.js → chunk-Y5UQJLYE.js} +6 -6
- package/Build/Workers/{chunk-3PW6ZBN4.js → chunk-YJEBABKH.js} +7 -7
- package/Build/Workers/{chunk-YBKFS53K.js → chunk-YWTJ2B4B.js} +1 -1
- package/Build/Workers/{chunk-5SK36PU4.js → chunk-Z3TIFFGF.js} +7 -7
- package/Build/Workers/{chunk-JGG36SQV.js → chunk-ZT7KWISZ.js} +4 -4
- package/Build/Workers/combineGeometry.js +24 -23
- package/Build/Workers/createBoxGeometry.js +18 -17
- package/Build/Workers/createBoxOutlineGeometry.js +16 -15
- package/Build/Workers/createCircleGeometry.js +26 -25
- package/Build/Workers/createCircleOutlineGeometry.js +19 -18
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -32
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -30
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
- package/Build/Workers/createCylinderGeometry.js +20 -19
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -17
- package/Build/Workers/createEllipseGeometry.js +26 -25
- package/Build/Workers/createEllipseOutlineGeometry.js +19 -18
- package/Build/Workers/createEllipsoidGeometry.js +19 -18
- package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -17
- package/Build/Workers/createFrustumGeometry.js +18 -17
- package/Build/Workers/createFrustumOutlineGeometry.js +18 -17
- package/Build/Workers/createGeometry.js +54 -33
- package/Build/Workers/createGroundPolylineGeometry.js +22 -21
- package/Build/Workers/createPlaneGeometry.js +16 -15
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -14
- package/Build/Workers/createPolygonGeometry.js +32 -166
- package/Build/Workers/createPolygonOutlineGeometry.js +30 -29
- package/Build/Workers/createPolylineGeometry.js +25 -24
- package/Build/Workers/createPolylineVolumeGeometry.js +32 -33
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
- package/Build/Workers/createRectangleGeometry.js +27 -26
- package/Build/Workers/createRectangleOutlineGeometry.js +20 -19
- package/Build/Workers/createSimplePolylineGeometry.js +23 -22
- package/Build/Workers/createSphereGeometry.js +19 -18
- package/Build/Workers/createSphereOutlineGeometry.js +18 -17
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +24 -23
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +22 -21
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -21
- package/Build/Workers/createVerticesFromHeightmap.js +22 -21
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -18
- package/Build/Workers/createWallGeometry.js +24 -23
- package/Build/Workers/createWallOutlineGeometry.js +23 -22
- package/Build/Workers/decodeDraco.js +11 -11
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +601 -92
- package/Build/Workers/transcodeKTX2.js +7 -7
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -21
- package/LICENSE.md +1 -1
- package/Source/Assets/approximateTerrainHeights.json +1 -1
- package/Source/Core/Ellipsoid.js +6 -0
- package/Source/Core/GregorianDate.js +85 -0
- package/Source/Core/HeadingPitchRange.js +2 -2
- package/Source/Core/IntersectionTests.js +6 -3
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/PixelFormat.js +5 -0
- package/Source/Core/PolygonGeometry.js +0 -169
- package/Source/Core/Resource.js +30 -69
- package/Source/Core/Transforms.js +30 -18
- package/Source/Core/createWorldBathymetryAsync.js +45 -0
- package/Source/Core/srgbToLinear.js +32 -0
- package/Source/DataSources/CzmlDataSource.js +51 -23
- package/Source/DataSources/DataSourceDisplay.js +27 -0
- package/Source/DataSources/EllipsoidGeometryUpdater.js +3 -4
- package/Source/DataSources/Entity.js +28 -7
- package/Source/DataSources/EntityCollection.js +1 -2
- package/Source/DataSources/GeometryUpdater.js +1 -2
- package/Source/DataSources/GeometryUpdaterSet.js +114 -0
- package/Source/DataSources/GeometryVisualizer.js +19 -83
- package/Source/DataSources/GroundGeometryUpdater.js +6 -3
- package/Source/DataSources/ModelVisualizer.js +19 -98
- package/Source/DataSources/PolygonGeometryUpdater.js +14 -2
- package/Source/DataSources/PolylineGeometryUpdater.js +9 -8
- package/Source/DataSources/TerrainOffsetProperty.js +15 -23
- package/Source/Renderer/AutomaticUniforms.js +121 -1
- package/Source/Renderer/Context.js +10 -0
- package/Source/Renderer/ContextLimits.js +2 -0
- package/Source/Renderer/UniformState.js +127 -0
- package/Source/Renderer/demodernizeShader.js +4 -1
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Atmosphere.js +127 -0
- package/Source/Scene/Axis.js +12 -7
- package/Source/Scene/Billboard.js +29 -26
- package/Source/Scene/BillboardCollection.js +3 -3
- package/Source/Scene/Camera.js +47 -5
- package/Source/Scene/Cesium3DTile.js +1 -0
- package/Source/Scene/Cesium3DTileContent.js +14 -0
- package/Source/Scene/Cesium3DTileset.js +364 -45
- package/Source/Scene/Cesium3DTilesetBaseTraversal.js +2 -4
- package/Source/Scene/Cesium3DTilesetTraversal.js +4 -0
- package/Source/Scene/Composite3DTileContent.js +42 -0
- package/Source/Scene/DynamicAtmosphereLightingType.js +56 -0
- package/Source/Scene/Empty3DTileContent.js +4 -0
- package/Source/Scene/Fog.js +1 -0
- package/Source/Scene/FrameState.js +14 -1
- package/Source/Scene/Geometry3DTileContent.js +4 -0
- package/Source/Scene/Globe.js +3 -2
- package/Source/Scene/GlobeSurfaceTileProvider.js +3 -1
- package/Source/Scene/GlobeTranslucencyState.js +1 -1
- package/Source/Scene/GltfLoader.js +15 -5
- package/Source/Scene/GltfPipeline/updateVersion.js +69 -68
- package/Source/Scene/HeightReference.js +59 -2
- package/Source/Scene/I3SDataProvider.js +270 -53
- package/Source/Scene/I3SDecoder.js +8 -1
- package/Source/Scene/I3SFeature.js +2 -5
- package/Source/Scene/I3SField.js +136 -31
- package/Source/Scene/I3SGeometry.js +70 -2
- package/Source/Scene/I3SLayer.js +55 -10
- package/Source/Scene/I3SNode.js +175 -18
- package/Source/Scene/I3SStatistics.js +94 -0
- package/Source/Scene/I3SSublayer.js +176 -0
- package/Source/Scene/I3SSymbology.js +337 -0
- package/Source/Scene/Implicit3DTileContent.js +4 -0
- package/Source/Scene/KeyframeNode.js +1 -1
- package/Source/Scene/LabelCollection.js +2 -2
- package/Source/Scene/Model/AtmospherePipelineStage.js +59 -0
- package/Source/Scene/Model/B3dmLoader.js +4 -0
- package/Source/Scene/Model/FeatureIdPipelineStage.js +25 -2
- package/Source/Scene/Model/I3dmLoader.js +4 -0
- package/Source/Scene/Model/InstancingPipelineStage.js +24 -6
- package/Source/Scene/Model/MetadataPipelineStage.js +31 -3
- package/Source/Scene/Model/Model.js +82 -32
- package/Source/Scene/Model/Model3DTileContent.js +31 -0
- package/Source/Scene/Model/ModelAnimationChannel.js +16 -15
- package/Source/Scene/Model/ModelSceneGraph.js +6 -0
- package/Source/Scene/Model/pickModel.js +426 -0
- package/Source/Scene/Multiple3DTileContent.js +42 -0
- package/Source/Scene/PickFramebuffer.js +37 -2
- package/Source/Scene/Picking.js +113 -39
- package/Source/Scene/Primitive.js +6 -2
- package/Source/Scene/QuadtreePrimitive.js +1 -1
- package/Source/Scene/Scene.js +312 -46
- package/Source/Scene/ScreenSpaceCameraController.js +23 -13
- package/Source/Scene/SensorVolumePortionToDisplay.js +69 -0
- package/Source/Scene/SkyAtmosphere.js +5 -6
- package/Source/Scene/SpatialNode.js +12 -19
- package/Source/Scene/StructuralMetadata.js +1 -1
- package/Source/Scene/Terrain.js +49 -0
- package/Source/Scene/TileBoundingS2Cell.js +2 -2
- package/Source/Scene/Tileset3DTileContent.js +4 -0
- package/Source/Scene/Vector3DTileContent.js +4 -0
- package/Source/Scene/VoxelBoxShape.js +76 -0
- package/Source/Scene/VoxelCell.js +273 -0
- package/Source/Scene/VoxelCylinderShape.js +114 -43
- package/Source/Scene/VoxelEllipsoidShape.js +158 -116
- package/Source/Scene/VoxelPrimitive.js +3 -1
- package/Source/Scene/VoxelRenderResources.js +3 -0
- package/Source/Scene/VoxelShape.js +13 -0
- package/Source/Scene/VoxelTraversal.js +76 -54
- package/Source/Scene/buildVoxelDrawCommands.js +23 -0
- package/Source/Scene/createGooglePhotorealistic3DTileset.js +1 -0
- package/Source/Scene/processVoxelProperties.js +2 -0
- package/Source/Shaders/AtmosphereCommon.glsl +3 -11
- package/Source/Shaders/AtmosphereCommon.js +3 -11
- package/Source/Shaders/Builtin/CzmBuiltins.js +12 -0
- package/Source/Shaders/Builtin/Functions/applyHSBShift.glsl +32 -0
- package/Source/Shaders/Builtin/Functions/applyHSBShift.js +34 -0
- package/Source/Shaders/Builtin/Functions/approximateTanh.glsl +10 -0
- package/Source/Shaders/Builtin/Functions/approximateTanh.js +12 -0
- package/Source/Shaders/Builtin/Functions/computeAtmosphereColor.glsl +44 -0
- package/Source/Shaders/Builtin/Functions/computeAtmosphereColor.js +46 -0
- package/Source/Shaders/Builtin/Functions/computeGroundAtmosphereScattering.glsl +30 -0
- package/Source/Shaders/Builtin/Functions/computeGroundAtmosphereScattering.js +32 -0
- package/Source/Shaders/Builtin/Functions/computeScattering.glsl +150 -0
- package/Source/Shaders/Builtin/Functions/computeScattering.js +152 -0
- package/Source/Shaders/Builtin/Functions/getDynamicAtmosphereLightDirection.glsl +22 -0
- package/Source/Shaders/Builtin/Functions/getDynamicAtmosphereLightDirection.js +24 -0
- package/Source/Shaders/Builtin/Functions/translateRelativeToEye.glsl +5 -0
- package/Source/Shaders/Builtin/Functions/translateRelativeToEye.js +5 -0
- package/Source/Shaders/GlobeFS.glsl +16 -25
- package/Source/Shaders/GlobeFS.js +16 -25
- package/Source/Shaders/GlobeVS.glsl +1 -1
- package/Source/Shaders/GlobeVS.js +1 -1
- package/Source/Shaders/Model/AtmosphereStageFS.glsl +111 -0
- package/Source/Shaders/Model/AtmosphereStageFS.js +113 -0
- package/Source/Shaders/Model/AtmosphereStageVS.glsl +12 -0
- package/Source/Shaders/Model/AtmosphereStageVS.js +14 -0
- package/Source/Shaders/Model/GeometryStageFS.glsl +1 -1
- package/Source/Shaders/Model/GeometryStageFS.js +1 -1
- package/Source/Shaders/Model/GeometryStageVS.glsl +4 -4
- package/Source/Shaders/Model/GeometryStageVS.js +4 -4
- package/Source/Shaders/Model/ModelColorStageFS.glsl +1 -1
- package/Source/Shaders/Model/ModelColorStageFS.js +2 -1
- package/Source/Shaders/Model/ModelFS.glsl +4 -0
- package/Source/Shaders/Model/ModelFS.js +4 -0
- package/Source/Shaders/Model/ModelVS.glsl +9 -4
- package/Source/Shaders/Model/ModelVS.js +9 -4
- package/Source/Shaders/SkyAtmosphereCommon.glsl +3 -13
- package/Source/Shaders/SkyAtmosphereCommon.js +3 -13
- package/Source/Shaders/SkyAtmosphereFS.glsl +5 -10
- package/Source/Shaders/SkyAtmosphereFS.js +5 -10
- package/Source/Shaders/SkyAtmosphereVS.glsl +3 -2
- package/Source/Shaders/SkyAtmosphereVS.js +3 -2
- package/Source/Shaders/Voxels/IntersectCylinder.glsl +14 -111
- package/Source/Shaders/Voxels/IntersectCylinder.js +14 -111
- package/Source/Shaders/Voxels/IntersectEllipsoid.glsl +32 -113
- package/Source/Shaders/Voxels/IntersectEllipsoid.js +32 -113
- package/Source/Shaders/Voxels/IntersectLongitude.glsl +102 -0
- package/Source/Shaders/Voxels/IntersectLongitude.js +104 -0
- package/Source/Shaders/Voxels/VoxelFS.glsl +39 -1
- package/Source/Shaders/Voxels/VoxelFS.js +39 -1
- package/Source/Shaders/Voxels/convertUvToCylinder.glsl +19 -37
- package/Source/Shaders/Voxels/convertUvToCylinder.js +19 -37
- package/Source/Shaders/Voxels/convertUvToEllipsoid.glsl +24 -44
- package/Source/Shaders/Voxels/convertUvToEllipsoid.js +24 -44
- package/Source/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/Source/ThirdParty/draco_decoder.wasm +0 -0
- package/Source/Workers/createGeometry.js +40 -11
- package/Source/Workers/decodeI3S.js +720 -94
- package/index.d.ts +574 -71
- package/index.js +217 -196
- package/package.json +3 -3
- package/Build/Workers/chunk-ATB2I7OS.js +0 -55
|
@@ -90,6 +90,7 @@ import VelocityOrientationProperty from "./VelocityOrientationProperty.js";
|
|
|
90
90
|
import VelocityVectorProperty from "./VelocityVectorProperty.js";
|
|
91
91
|
import WallGraphics from "./WallGraphics.js";
|
|
92
92
|
import Cesium3DTilesetGraphics from "./Cesium3DTilesetGraphics.js";
|
|
93
|
+
import SensorVolumePortionToDisplay from "../Scene/SensorVolumePortionToDisplay.js";
|
|
93
94
|
|
|
94
95
|
// A marker type to distinguish CZML properties where we need to end up with a unit vector.
|
|
95
96
|
// The data is still loaded into Cartesian3 objects but they are normalized.
|
|
@@ -576,6 +577,10 @@ function unwrapInterval(type, czmlInterval, sourceUri) {
|
|
|
576
577
|
return unwrapQuaternionInterval(czmlInterval);
|
|
577
578
|
case Rotation:
|
|
578
579
|
return defaultValue(czmlInterval.number, czmlInterval);
|
|
580
|
+
case SensorVolumePortionToDisplay:
|
|
581
|
+
return SensorVolumePortionToDisplay[
|
|
582
|
+
defaultValue(czmlInterval.portionToDisplay, czmlInterval)
|
|
583
|
+
];
|
|
579
584
|
case ShadowMode:
|
|
580
585
|
return ShadowMode[
|
|
581
586
|
defaultValue(
|
|
@@ -598,7 +603,7 @@ function unwrapInterval(type, czmlInterval, sourceUri) {
|
|
|
598
603
|
defaultValue(czmlInterval.verticalOrigin, czmlInterval)
|
|
599
604
|
];
|
|
600
605
|
default:
|
|
601
|
-
throw new RuntimeError(type);
|
|
606
|
+
throw new RuntimeError(`Unknown CzmlDataSource interval type: ${type}`);
|
|
602
607
|
}
|
|
603
608
|
}
|
|
604
609
|
|
|
@@ -5006,31 +5011,54 @@ Object.defineProperties(CzmlDataSource.prototype, {
|
|
|
5006
5011
|
* @type {CzmlDataSource.UpdaterFunction[]}
|
|
5007
5012
|
*/
|
|
5008
5013
|
CzmlDataSource.updaters = [
|
|
5009
|
-
processBillboard,
|
|
5010
|
-
processBox,
|
|
5011
|
-
processCorridor,
|
|
5012
|
-
processCylinder,
|
|
5013
|
-
processEllipse,
|
|
5014
|
-
processEllipsoid,
|
|
5015
|
-
processLabel,
|
|
5016
|
-
processModel,
|
|
5017
|
-
processName,
|
|
5018
|
-
processDescription,
|
|
5019
|
-
processPath,
|
|
5020
|
-
processPoint,
|
|
5021
|
-
processPolygon,
|
|
5022
|
-
processPolyline,
|
|
5023
|
-
processPolylineVolume,
|
|
5024
|
-
processProperties,
|
|
5025
|
-
processRectangle,
|
|
5026
|
-
processPosition,
|
|
5027
|
-
processTileset,
|
|
5028
|
-
processViewFrom,
|
|
5029
|
-
processWall,
|
|
5030
|
-
processOrientation,
|
|
5014
|
+
processBillboard,
|
|
5015
|
+
processBox,
|
|
5016
|
+
processCorridor,
|
|
5017
|
+
processCylinder,
|
|
5018
|
+
processEllipse,
|
|
5019
|
+
processEllipsoid,
|
|
5020
|
+
processLabel,
|
|
5021
|
+
processModel,
|
|
5022
|
+
processName,
|
|
5023
|
+
processDescription,
|
|
5024
|
+
processPath,
|
|
5025
|
+
processPoint,
|
|
5026
|
+
processPolygon,
|
|
5027
|
+
processPolyline,
|
|
5028
|
+
processPolylineVolume,
|
|
5029
|
+
processProperties,
|
|
5030
|
+
processRectangle,
|
|
5031
|
+
processPosition,
|
|
5032
|
+
processTileset,
|
|
5033
|
+
processViewFrom,
|
|
5034
|
+
processWall,
|
|
5035
|
+
processOrientation,
|
|
5031
5036
|
processAvailability,
|
|
5032
5037
|
];
|
|
5033
5038
|
|
|
5039
|
+
/**
|
|
5040
|
+
* Add the provided updater to the list of updaters if not already included
|
|
5041
|
+
* @private
|
|
5042
|
+
* @param {CzmlDataSource.UpdaterFunction} updater
|
|
5043
|
+
*/
|
|
5044
|
+
CzmlDataSource.registerUpdater = function (updater) {
|
|
5045
|
+
if (!CzmlDataSource.updaters.includes(updater)) {
|
|
5046
|
+
CzmlDataSource.updaters.push(updater);
|
|
5047
|
+
}
|
|
5048
|
+
};
|
|
5049
|
+
|
|
5050
|
+
/**
|
|
5051
|
+
* Remove the provided updater from the list of updaters if already included
|
|
5052
|
+
* @private
|
|
5053
|
+
* @param {CzmlDataSource.UpdaterFunction} updater
|
|
5054
|
+
*/
|
|
5055
|
+
CzmlDataSource.unregisterUpdater = function (updater) {
|
|
5056
|
+
if (CzmlDataSource.updaters.includes(updater)) {
|
|
5057
|
+
const index = CzmlDataSource.updaters.indexOf(updater);
|
|
5058
|
+
CzmlDataSource.updaters.splice(index, 1);
|
|
5059
|
+
}
|
|
5060
|
+
};
|
|
5061
|
+
|
|
5034
5062
|
/**
|
|
5035
5063
|
* Processes the provided url or CZML object without clearing any existing data.
|
|
5036
5064
|
*
|
|
@@ -120,6 +120,30 @@ function DataSourceDisplay(options) {
|
|
|
120
120
|
this._ready = false;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
const ExtraVisualizers = [];
|
|
124
|
+
/**
|
|
125
|
+
* Add the provided Visualizer to the default visualizers callback if not already included
|
|
126
|
+
* @private
|
|
127
|
+
* @param {Visualizer} visualizer Visualizer class to add
|
|
128
|
+
*/
|
|
129
|
+
DataSourceDisplay.registerVisualizer = function (visualizer) {
|
|
130
|
+
if (!ExtraVisualizers.includes(visualizer)) {
|
|
131
|
+
ExtraVisualizers.push(visualizer);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Remove the provided Visualizer from the default visualizers callback if it's already included
|
|
137
|
+
* @private
|
|
138
|
+
* @param {Visualizer} visualizer Visualizer class to remove
|
|
139
|
+
*/
|
|
140
|
+
DataSourceDisplay.unregisterVisualizer = function (visualizer) {
|
|
141
|
+
if (ExtraVisualizers.includes(visualizer)) {
|
|
142
|
+
const index = ExtraVisualizers.indexOf(visualizer);
|
|
143
|
+
ExtraVisualizers.splice(index, 1);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
123
147
|
/**
|
|
124
148
|
* Gets or sets the default function which creates an array of visualizers used for visualization.
|
|
125
149
|
* By default, this function uses all standard visualizers.
|
|
@@ -151,6 +175,9 @@ DataSourceDisplay.defaultVisualizersCallback = function (
|
|
|
151
175
|
dataSource._primitives,
|
|
152
176
|
dataSource._groundPrimitives
|
|
153
177
|
),
|
|
178
|
+
...ExtraVisualizers.map(
|
|
179
|
+
(VisualizerClass) => new VisualizerClass(scene, entities)
|
|
180
|
+
),
|
|
154
181
|
];
|
|
155
182
|
};
|
|
156
183
|
|
|
@@ -547,11 +547,10 @@ DynamicEllipsoidGeometryUpdater.prototype.update = function (time) {
|
|
|
547
547
|
options.radii = Cartesian3.clone(in3D ? unitSphere : radii, options.radii);
|
|
548
548
|
if (defined(innerRadii)) {
|
|
549
549
|
if (in3D) {
|
|
550
|
-
const mag = Cartesian3.magnitude(radii);
|
|
551
550
|
options.innerRadii = Cartesian3.fromElements(
|
|
552
|
-
innerRadii.x /
|
|
553
|
-
innerRadii.y /
|
|
554
|
-
innerRadii.z /
|
|
551
|
+
innerRadii.x / radii.x,
|
|
552
|
+
innerRadii.y / radii.y,
|
|
553
|
+
innerRadii.z / radii.z,
|
|
555
554
|
options.innerRadii
|
|
556
555
|
);
|
|
557
556
|
} else {
|
|
@@ -13,7 +13,9 @@ import Quaternion from "../Core/Quaternion.js";
|
|
|
13
13
|
import Transforms from "../Core/Transforms.js";
|
|
14
14
|
import GroundPolylinePrimitive from "../Scene/GroundPolylinePrimitive.js";
|
|
15
15
|
import GroundPrimitive from "../Scene/GroundPrimitive.js";
|
|
16
|
-
import HeightReference
|
|
16
|
+
import HeightReference, {
|
|
17
|
+
isHeightReferenceClamp,
|
|
18
|
+
} from "../Scene/HeightReference.js";
|
|
17
19
|
import BillboardGraphics from "./BillboardGraphics.js";
|
|
18
20
|
import BoxGraphics from "./BoxGraphics.js";
|
|
19
21
|
import ConstantPositionProperty from "./ConstantPositionProperty.js";
|
|
@@ -39,6 +41,8 @@ import WallGraphics from "./WallGraphics.js";
|
|
|
39
41
|
|
|
40
42
|
const cartoScratch = new Cartographic();
|
|
41
43
|
|
|
44
|
+
const ExtraPropertyNames = [];
|
|
45
|
+
|
|
42
46
|
function createConstantPositionProperty(value) {
|
|
43
47
|
return new ConstantPositionProperty(value);
|
|
44
48
|
}
|
|
@@ -71,8 +75,8 @@ function createPropertyTypeDescriptor(name, Type) {
|
|
|
71
75
|
* @property {boolean} [show] A boolean value indicating if the entity and its children are displayed.
|
|
72
76
|
* @property {Property | string} [description] A string Property specifying an HTML description for this entity.
|
|
73
77
|
* @property {PositionProperty | Cartesian3} [position] A Property specifying the entity position.
|
|
74
|
-
* @property {Property} [orientation] A Property specifying the entity orientation.
|
|
75
|
-
* @property {Property} [viewFrom] A suggested initial offset for viewing this object.
|
|
78
|
+
* @property {Property | Quaternion} [orientation=Transforms.eastNorthUpToFixedFrame(position)] A Property specifying the entity orientation in respect to Earth-fixed-Earth-centered (ECEF). If undefined, east-north-up at entity position is used.
|
|
79
|
+
* @property {Property | Cartesian3} [viewFrom] A suggested initial offset for viewing this object.
|
|
76
80
|
* @property {Entity} [parent] A parent entity to associate with this entity.
|
|
77
81
|
* @property {BillboardGraphics | BillboardGraphics.ConstructorOptions} [billboard] A billboard to associate with this entity.
|
|
78
82
|
* @property {BoxGraphics | BoxGraphics.ConstructorOptions} [box] A box to associate with this entity.
|
|
@@ -125,7 +129,7 @@ function Entity(options) {
|
|
|
125
129
|
"corridor",
|
|
126
130
|
"cylinder",
|
|
127
131
|
"description",
|
|
128
|
-
"ellipse",
|
|
132
|
+
"ellipse",
|
|
129
133
|
"ellipsoid",
|
|
130
134
|
"label",
|
|
131
135
|
"model",
|
|
@@ -134,7 +138,7 @@ function Entity(options) {
|
|
|
134
138
|
"path",
|
|
135
139
|
"plane",
|
|
136
140
|
"point",
|
|
137
|
-
"polygon",
|
|
141
|
+
"polygon",
|
|
138
142
|
"polyline",
|
|
139
143
|
"polylineVolume",
|
|
140
144
|
"position",
|
|
@@ -142,6 +146,7 @@ function Entity(options) {
|
|
|
142
146
|
"rectangle",
|
|
143
147
|
"viewFrom",
|
|
144
148
|
"wall",
|
|
149
|
+
...ExtraPropertyNames,
|
|
145
150
|
];
|
|
146
151
|
|
|
147
152
|
this._billboard = undefined;
|
|
@@ -413,7 +418,8 @@ Object.defineProperties(Entity.prototype, {
|
|
|
413
418
|
*/
|
|
414
419
|
tileset: createPropertyTypeDescriptor("tileset", Cesium3DTilesetGraphics),
|
|
415
420
|
/**
|
|
416
|
-
* Gets or sets the orientation.
|
|
421
|
+
* Gets or sets the orientation in respect to Earth-fixed-Earth-centered (ECEF).
|
|
422
|
+
* Defaults to east-north-up at entity position.
|
|
417
423
|
* @memberof Entity.prototype
|
|
418
424
|
* @type {Property|undefined}
|
|
419
425
|
*/
|
|
@@ -491,6 +497,21 @@ Object.defineProperties(Entity.prototype, {
|
|
|
491
497
|
wall: createPropertyTypeDescriptor("wall", WallGraphics),
|
|
492
498
|
});
|
|
493
499
|
|
|
500
|
+
/**
|
|
501
|
+
* Add the specified type and construct the properties for it in the Entity class
|
|
502
|
+
* @private
|
|
503
|
+
* @param {string} propertyName name of the property that controls/accesses this entity type
|
|
504
|
+
* @param {{ constructor: function }} Type The Graphics class to associate with this entity type
|
|
505
|
+
*/
|
|
506
|
+
Entity.registerEntityType = function (propertyName, Type) {
|
|
507
|
+
Object.defineProperties(Entity.prototype, {
|
|
508
|
+
[propertyName]: createPropertyTypeDescriptor(propertyName, Type),
|
|
509
|
+
});
|
|
510
|
+
if (!ExtraPropertyNames.includes(propertyName)) {
|
|
511
|
+
ExtraPropertyNames.push(propertyName);
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
|
|
494
515
|
/**
|
|
495
516
|
* Given a time, returns true if this object should have data during that time.
|
|
496
517
|
*
|
|
@@ -706,7 +727,7 @@ Entity.prototype.computeModelMatrixForHeightReference = function (
|
|
|
706
727
|
}
|
|
707
728
|
|
|
708
729
|
const carto = ellipsoid.cartesianToCartographic(position, cartoScratch);
|
|
709
|
-
if (heightReference
|
|
730
|
+
if (isHeightReferenceClamp(heightReference)) {
|
|
710
731
|
carto.height = heightOffset;
|
|
711
732
|
} else {
|
|
712
733
|
carto.height += heightOffset;
|
|
@@ -5,7 +5,6 @@ import DeveloperError from "../Core/DeveloperError.js";
|
|
|
5
5
|
import Event from "../Core/Event.js";
|
|
6
6
|
import Iso8601 from "../Core/Iso8601.js";
|
|
7
7
|
import JulianDate from "../Core/JulianDate.js";
|
|
8
|
-
import RuntimeError from "../Core/RuntimeError.js";
|
|
9
8
|
import TimeInterval from "../Core/TimeInterval.js";
|
|
10
9
|
import Entity from "./Entity.js";
|
|
11
10
|
|
|
@@ -281,7 +280,7 @@ EntityCollection.prototype.add = function (entity) {
|
|
|
281
280
|
const id = entity.id;
|
|
282
281
|
const entities = this._entities;
|
|
283
282
|
if (entities.contains(id)) {
|
|
284
|
-
throw new
|
|
283
|
+
throw new DeveloperError(
|
|
285
284
|
`An entity with id ${id} already exists in this collection.`
|
|
286
285
|
);
|
|
287
286
|
}
|
|
@@ -233,8 +233,7 @@ Object.defineProperties(GeometryUpdater.prototype, {
|
|
|
233
233
|
},
|
|
234
234
|
/**
|
|
235
235
|
* Gets a value indicating if the geometry is time-varying.
|
|
236
|
-
*
|
|
237
|
-
* returned by GeometryUpdater#createDynamicUpdater.
|
|
236
|
+
*
|
|
238
237
|
* @memberof GeometryUpdater.prototype
|
|
239
238
|
*
|
|
240
239
|
* @type {boolean}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import destroyObject from "../Core/destroyObject.js";
|
|
2
|
+
import Event from "../Core/Event.js";
|
|
3
|
+
import EventHelper from "../Core/EventHelper.js";
|
|
4
|
+
import BoxGeometryUpdater from "./BoxGeometryUpdater.js";
|
|
5
|
+
import CorridorGeometryUpdater from "./CorridorGeometryUpdater.js";
|
|
6
|
+
import CylinderGeometryUpdater from "./CylinderGeometryUpdater.js";
|
|
7
|
+
import EllipseGeometryUpdater from "./EllipseGeometryUpdater.js";
|
|
8
|
+
import EllipsoidGeometryUpdater from "./EllipsoidGeometryUpdater.js";
|
|
9
|
+
import PlaneGeometryUpdater from "./PlaneGeometryUpdater.js";
|
|
10
|
+
import PolygonGeometryUpdater from "./PolygonGeometryUpdater.js";
|
|
11
|
+
import PolylineVolumeGeometryUpdater from "./PolylineVolumeGeometryUpdater.js";
|
|
12
|
+
import RectangleGeometryUpdater from "./RectangleGeometryUpdater.js";
|
|
13
|
+
import WallGeometryUpdater from "./WallGeometryUpdater.js";
|
|
14
|
+
|
|
15
|
+
/** @type {GeometryUpdater[]} */
|
|
16
|
+
const geometryUpdaters = [
|
|
17
|
+
BoxGeometryUpdater,
|
|
18
|
+
CylinderGeometryUpdater,
|
|
19
|
+
CorridorGeometryUpdater,
|
|
20
|
+
EllipseGeometryUpdater,
|
|
21
|
+
EllipsoidGeometryUpdater,
|
|
22
|
+
PlaneGeometryUpdater,
|
|
23
|
+
PolygonGeometryUpdater,
|
|
24
|
+
PolylineVolumeGeometryUpdater,
|
|
25
|
+
RectangleGeometryUpdater,
|
|
26
|
+
WallGeometryUpdater,
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Manages a set of "updater" classes for the {@link GeometryVisualizer} for each entity
|
|
31
|
+
*
|
|
32
|
+
* @private
|
|
33
|
+
* @param {Entity} entity
|
|
34
|
+
* @param {Scene} scene
|
|
35
|
+
*/
|
|
36
|
+
function GeometryUpdaterSet(entity, scene) {
|
|
37
|
+
this.entity = entity;
|
|
38
|
+
this.scene = scene;
|
|
39
|
+
const updaters = new Array(geometryUpdaters.length);
|
|
40
|
+
const geometryChanged = new Event();
|
|
41
|
+
const eventHelper = new EventHelper();
|
|
42
|
+
for (let i = 0; i < updaters.length; i++) {
|
|
43
|
+
const updater = new geometryUpdaters[i](entity, scene);
|
|
44
|
+
eventHelper.add(updater.geometryChanged, (geometry) => {
|
|
45
|
+
geometryChanged.raiseEvent(geometry);
|
|
46
|
+
});
|
|
47
|
+
updaters[i] = updater;
|
|
48
|
+
}
|
|
49
|
+
this.updaters = updaters;
|
|
50
|
+
this.geometryChanged = geometryChanged;
|
|
51
|
+
this.eventHelper = eventHelper;
|
|
52
|
+
|
|
53
|
+
this._removeEntitySubscription = entity.definitionChanged.addEventListener(
|
|
54
|
+
GeometryUpdaterSet.prototype._onEntityPropertyChanged,
|
|
55
|
+
this
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
GeometryUpdaterSet.prototype._onEntityPropertyChanged = function (
|
|
60
|
+
entity,
|
|
61
|
+
propertyName,
|
|
62
|
+
newValue,
|
|
63
|
+
oldValue
|
|
64
|
+
) {
|
|
65
|
+
const updaters = this.updaters;
|
|
66
|
+
for (let i = 0; i < updaters.length; i++) {
|
|
67
|
+
updaters[i]._onEntityPropertyChanged(
|
|
68
|
+
entity,
|
|
69
|
+
propertyName,
|
|
70
|
+
newValue,
|
|
71
|
+
oldValue
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
GeometryUpdaterSet.prototype.forEach = function (callback) {
|
|
77
|
+
const updaters = this.updaters;
|
|
78
|
+
for (let i = 0; i < updaters.length; i++) {
|
|
79
|
+
callback(updaters[i]);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
GeometryUpdaterSet.prototype.destroy = function () {
|
|
84
|
+
this.eventHelper.removeAll();
|
|
85
|
+
const updaters = this.updaters;
|
|
86
|
+
for (let i = 0; i < updaters.length; i++) {
|
|
87
|
+
updaters[i].destroy();
|
|
88
|
+
}
|
|
89
|
+
this._removeEntitySubscription();
|
|
90
|
+
destroyObject(this);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Add the provided updater to the default list of updaters if not already included
|
|
95
|
+
* @param {GeometryUpdater} updater
|
|
96
|
+
*/
|
|
97
|
+
GeometryUpdaterSet.registerUpdater = function (updater) {
|
|
98
|
+
if (!geometryUpdaters.includes(updater)) {
|
|
99
|
+
geometryUpdaters.push(updater);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Remove the provided updater from the default list of updaters if included
|
|
105
|
+
* @param {GeometryUpdater} updater
|
|
106
|
+
*/
|
|
107
|
+
GeometryUpdaterSet.unregisterUpdater = function (updater) {
|
|
108
|
+
if (geometryUpdaters.includes(updater)) {
|
|
109
|
+
const index = geometryUpdaters.indexOf(updater);
|
|
110
|
+
geometryUpdaters.splice(index, 1);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export default GeometryUpdaterSet;
|
|
@@ -4,105 +4,23 @@ import Check from "../Core/Check.js";
|
|
|
4
4
|
import defaultValue from "../Core/defaultValue.js";
|
|
5
5
|
import defined from "../Core/defined.js";
|
|
6
6
|
import destroyObject from "../Core/destroyObject.js";
|
|
7
|
-
import Event from "../Core/Event.js";
|
|
8
|
-
import EventHelper from "../Core/EventHelper.js";
|
|
9
7
|
import ClassificationType from "../Scene/ClassificationType.js";
|
|
10
8
|
import MaterialAppearance from "../Scene/MaterialAppearance.js";
|
|
11
9
|
import PerInstanceColorAppearance from "../Scene/PerInstanceColorAppearance.js";
|
|
12
10
|
import ShadowMode from "../Scene/ShadowMode.js";
|
|
13
11
|
import BoundingSphereState from "./BoundingSphereState.js";
|
|
14
|
-
import BoxGeometryUpdater from "./BoxGeometryUpdater.js";
|
|
15
12
|
import ColorMaterialProperty from "./ColorMaterialProperty.js";
|
|
16
|
-
import CorridorGeometryUpdater from "./CorridorGeometryUpdater.js";
|
|
17
|
-
import CylinderGeometryUpdater from "./CylinderGeometryUpdater.js";
|
|
18
13
|
import DynamicGeometryBatch from "./DynamicGeometryBatch.js";
|
|
19
|
-
import EllipseGeometryUpdater from "./EllipseGeometryUpdater.js";
|
|
20
|
-
import EllipsoidGeometryUpdater from "./EllipsoidGeometryUpdater.js";
|
|
21
14
|
import Entity from "./Entity.js";
|
|
22
|
-
import
|
|
23
|
-
import PolygonGeometryUpdater from "./PolygonGeometryUpdater.js";
|
|
24
|
-
import PolylineVolumeGeometryUpdater from "./PolylineVolumeGeometryUpdater.js";
|
|
25
|
-
import RectangleGeometryUpdater from "./RectangleGeometryUpdater.js";
|
|
15
|
+
import GeometryUpdaterSet from "./GeometryUpdaterSet.js";
|
|
26
16
|
import StaticGeometryColorBatch from "./StaticGeometryColorBatch.js";
|
|
27
17
|
import StaticGeometryPerMaterialBatch from "./StaticGeometryPerMaterialBatch.js";
|
|
28
18
|
import StaticGroundGeometryColorBatch from "./StaticGroundGeometryColorBatch.js";
|
|
29
19
|
import StaticGroundGeometryPerMaterialBatch from "./StaticGroundGeometryPerMaterialBatch.js";
|
|
30
20
|
import StaticOutlineGeometryBatch from "./StaticOutlineGeometryBatch.js";
|
|
31
|
-
import WallGeometryUpdater from "./WallGeometryUpdater.js";
|
|
32
21
|
|
|
33
22
|
const emptyArray = [];
|
|
34
23
|
|
|
35
|
-
const geometryUpdaters = [
|
|
36
|
-
BoxGeometryUpdater,
|
|
37
|
-
CylinderGeometryUpdater,
|
|
38
|
-
CorridorGeometryUpdater,
|
|
39
|
-
EllipseGeometryUpdater,
|
|
40
|
-
EllipsoidGeometryUpdater,
|
|
41
|
-
PlaneGeometryUpdater,
|
|
42
|
-
PolygonGeometryUpdater,
|
|
43
|
-
PolylineVolumeGeometryUpdater,
|
|
44
|
-
RectangleGeometryUpdater,
|
|
45
|
-
WallGeometryUpdater,
|
|
46
|
-
];
|
|
47
|
-
|
|
48
|
-
function GeometryUpdaterSet(entity, scene) {
|
|
49
|
-
this.entity = entity;
|
|
50
|
-
this.scene = scene;
|
|
51
|
-
const updaters = new Array(geometryUpdaters.length);
|
|
52
|
-
const geometryChanged = new Event();
|
|
53
|
-
function raiseEvent(geometry) {
|
|
54
|
-
geometryChanged.raiseEvent(geometry);
|
|
55
|
-
}
|
|
56
|
-
const eventHelper = new EventHelper();
|
|
57
|
-
for (let i = 0; i < updaters.length; i++) {
|
|
58
|
-
const updater = new geometryUpdaters[i](entity, scene);
|
|
59
|
-
eventHelper.add(updater.geometryChanged, raiseEvent);
|
|
60
|
-
updaters[i] = updater;
|
|
61
|
-
}
|
|
62
|
-
this.updaters = updaters;
|
|
63
|
-
this.geometryChanged = geometryChanged;
|
|
64
|
-
this.eventHelper = eventHelper;
|
|
65
|
-
|
|
66
|
-
this._removeEntitySubscription = entity.definitionChanged.addEventListener(
|
|
67
|
-
GeometryUpdaterSet.prototype._onEntityPropertyChanged,
|
|
68
|
-
this
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
GeometryUpdaterSet.prototype._onEntityPropertyChanged = function (
|
|
73
|
-
entity,
|
|
74
|
-
propertyName,
|
|
75
|
-
newValue,
|
|
76
|
-
oldValue
|
|
77
|
-
) {
|
|
78
|
-
const updaters = this.updaters;
|
|
79
|
-
for (let i = 0; i < updaters.length; i++) {
|
|
80
|
-
updaters[i]._onEntityPropertyChanged(
|
|
81
|
-
entity,
|
|
82
|
-
propertyName,
|
|
83
|
-
newValue,
|
|
84
|
-
oldValue
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
GeometryUpdaterSet.prototype.forEach = function (callback) {
|
|
90
|
-
const updaters = this.updaters;
|
|
91
|
-
for (let i = 0; i < updaters.length; i++) {
|
|
92
|
-
callback(updaters[i]);
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
GeometryUpdaterSet.prototype.destroy = function () {
|
|
97
|
-
this.eventHelper.removeAll();
|
|
98
|
-
const updaters = this.updaters;
|
|
99
|
-
for (let i = 0; i < updaters.length; i++) {
|
|
100
|
-
updaters[i].destroy();
|
|
101
|
-
}
|
|
102
|
-
this._removeEntitySubscription();
|
|
103
|
-
destroyObject(this);
|
|
104
|
-
};
|
|
105
|
-
|
|
106
24
|
/**
|
|
107
25
|
* A general purpose visualizer for geometry represented by {@link Primitive} instances.
|
|
108
26
|
* @alias GeometryVisualizer
|
|
@@ -293,6 +211,24 @@ function GeometryVisualizer(
|
|
|
293
211
|
);
|
|
294
212
|
}
|
|
295
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Add the provided updater to the default list of updaters if not already included
|
|
216
|
+
* @private
|
|
217
|
+
* @param {GeometryUpdater} updater
|
|
218
|
+
*/
|
|
219
|
+
GeometryVisualizer.registerUpdater = function (updater) {
|
|
220
|
+
GeometryUpdaterSet.registerUpdater(updater);
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Remove the provided updater from the default list of updaters if included
|
|
225
|
+
* @private
|
|
226
|
+
* @param {GeometryUpdater} updater
|
|
227
|
+
*/
|
|
228
|
+
GeometryVisualizer.unregisterUpdater = function (updater) {
|
|
229
|
+
GeometryUpdaterSet.unregisterUpdater(updater);
|
|
230
|
+
};
|
|
231
|
+
|
|
296
232
|
/**
|
|
297
233
|
* Updates all of the primitives created by this visualizer to match their
|
|
298
234
|
* Entity counterpart at the given time.
|
|
@@ -5,7 +5,9 @@ import DeveloperError from "../Core/DeveloperError.js";
|
|
|
5
5
|
import GeometryOffsetAttribute from "../Core/GeometryOffsetAttribute.js";
|
|
6
6
|
import oneTimeWarning from "../Core/oneTimeWarning.js";
|
|
7
7
|
import GroundPrimitive from "../Scene/GroundPrimitive.js";
|
|
8
|
-
import HeightReference
|
|
8
|
+
import HeightReference, {
|
|
9
|
+
isHeightReferenceClamp,
|
|
10
|
+
} from "../Scene/HeightReference.js";
|
|
9
11
|
import CallbackProperty from "./CallbackProperty.js";
|
|
10
12
|
import ConstantProperty from "./ConstantProperty.js";
|
|
11
13
|
import GeometryUpdater from "./GeometryUpdater.js";
|
|
@@ -164,9 +166,10 @@ GroundGeometryUpdater.getGeometryHeight = function (height, heightReference) {
|
|
|
164
166
|
return;
|
|
165
167
|
}
|
|
166
168
|
|
|
167
|
-
if (heightReference
|
|
169
|
+
if (!isHeightReferenceClamp(heightReference)) {
|
|
168
170
|
return height;
|
|
169
171
|
}
|
|
172
|
+
|
|
170
173
|
return 0.0;
|
|
171
174
|
};
|
|
172
175
|
|
|
@@ -186,7 +189,7 @@ GroundGeometryUpdater.getGeometryExtrudedHeight = function (
|
|
|
186
189
|
}
|
|
187
190
|
return;
|
|
188
191
|
}
|
|
189
|
-
if (extrudedHeightReference
|
|
192
|
+
if (!isHeightReferenceClamp(extrudedHeightReference)) {
|
|
190
193
|
return extrudedHeight;
|
|
191
194
|
}
|
|
192
195
|
|