@cesium/engine 10.0.0 → 11.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-AA4GZKOT.js → chunk-2EDC3QGH.js} +1 -1
- package/Build/Workers/{chunk-DKVHRNFY.js → chunk-2MKRG7L7.js} +5 -5
- package/Build/Workers/{chunk-X23FRWHJ.js → chunk-2RZYNSMR.js} +6 -6
- package/Build/Workers/{chunk-TO2PVHKI.js → chunk-4NBRIKB3.js} +2 -2
- package/Build/Workers/{chunk-GRAT5GE7.js → chunk-4TK5YR6Q.js} +5 -5
- package/Build/Workers/{chunk-XD445VDH.js → chunk-54VC7SCM.js} +7 -7
- package/Build/Workers/{chunk-G3YR53LY.js → chunk-5IY5BXCT.js} +13 -13
- package/Build/Workers/{chunk-O3JCMSS3.js → chunk-6FFGOENI.js} +54 -7
- package/Build/Workers/{chunk-7XGC6YB2.js → chunk-6PJIHPQB.js} +13 -13
- package/Build/Workers/{chunk-GR3CDLCP.js → chunk-6ZREIBKS.js} +7 -7
- package/Build/Workers/{chunk-4MSUJ4I7.js → chunk-AI3O7UN2.js} +6 -6
- package/Build/Workers/{chunk-COYFZ5VA.js → chunk-AS7P4BHI.js} +6 -6
- package/Build/Workers/{chunk-JYAHOGGL.js → chunk-AUM45VEG.js} +16 -15
- package/Build/Workers/{chunk-BDFNKFOE.js → chunk-BBO6BGLC.js} +13 -13
- package/Build/Workers/{chunk-AVI4IUWC.js → chunk-BH5ZEN4I.js} +10 -10
- package/Build/Workers/{chunk-4BAE4PWO.js → chunk-BJ3WF5RW.js} +6 -6
- package/Build/Workers/{chunk-Q55ECN3Y.js → chunk-BUOFSNFW.js} +1 -1
- package/Build/Workers/{chunk-QX5XS4LC.js → chunk-BZXF3GNX.js} +2 -2
- package/Build/Workers/{chunk-PYHLO636.js → chunk-DJXXI7UF.js} +5 -5
- package/Build/Workers/{chunk-LCLJJ2MZ.js → chunk-DVAIU7A4.js} +17 -17
- package/Build/Workers/{chunk-SYCPRK3D.js → chunk-FJT3ERV7.js} +9 -9
- package/Build/Workers/{chunk-L6RTJ3RE.js → chunk-GOHDOWU5.js} +14 -14
- package/Build/Workers/{chunk-MSKXMXJI.js → chunk-HA6TZ3XT.js} +4 -4
- package/Build/Workers/{chunk-PCP4YQST.js → chunk-HBZSCVZC.js} +11 -11
- package/Build/Workers/{chunk-5S7OLEPK.js → chunk-HC7RYWPZ.js} +12 -12
- package/Build/Workers/{chunk-VE7BFUIX.js → chunk-HFMJM3SX.js} +1 -1
- package/Build/Workers/{chunk-OOK53QUQ.js → chunk-HFPMX5L2.js} +1 -1
- package/Build/Workers/{chunk-VFBNELXB.js → chunk-HO2NTC7I.js} +6 -6
- package/Build/Workers/{chunk-DOXCPOG4.js → chunk-HZPMWR4H.js} +7 -7
- package/Build/Workers/{chunk-I2RC4XVN.js → chunk-IBG5FVXC.js} +4 -4
- package/Build/Workers/{chunk-LEABCTLP.js → chunk-IXLNNST6.js} +4 -4
- package/Build/Workers/{chunk-4YSNMHZ4.js → chunk-JYUCC5NV.js} +6 -6
- package/Build/Workers/{chunk-BCL4PHHT.js → chunk-KFW4UNQH.js} +10 -10
- package/Build/Workers/{chunk-R6B7UCQB.js → chunk-KKAEXHDY.js} +2 -2
- package/Build/Workers/{chunk-BJF5LOWE.js → chunk-L6FARMF6.js} +7 -7
- package/Build/Workers/{chunk-C2CGMAIU.js → chunk-N3BIL6WA.js} +13 -13
- package/Build/Workers/{chunk-STBBMQGG.js → chunk-O5SSW3B3.js} +6 -6
- package/Build/Workers/{chunk-S3PI2KFM.js → chunk-OC4MYPVW.js} +2 -2
- package/Build/Workers/{chunk-MDHQR3ZS.js → chunk-OOA6GXKD.js} +7 -7
- package/Build/Workers/{chunk-AD5HBJ2F.js → chunk-OSCHEWSG.js} +7 -7
- package/Build/Workers/{chunk-NTXTUNEF.js → chunk-QGT2GMOK.js} +4 -4
- package/Build/Workers/{chunk-VO3ACQB2.js → chunk-RFQYEYAL.js} +17 -17
- package/Build/Workers/{chunk-KUN2ZA5X.js → chunk-RJF5ZP76.js} +4 -4
- package/Build/Workers/{chunk-QD4KM3GO.js → chunk-SIZXFNJY.js} +6 -5
- package/Build/Workers/{chunk-FXIHSF7O.js → chunk-SRZJCF7G.js} +9 -9
- package/Build/Workers/{chunk-T77JILCU.js → chunk-T4MB73MC.js} +2 -2
- package/Build/Workers/{chunk-3WUV74WM.js → chunk-TTI2SUWJ.js} +2 -2
- package/Build/Workers/{chunk-QMLTCCYG.js → chunk-VHJ5ESXF.js} +1 -1
- package/Build/Workers/{chunk-2J3JKXCP.js → chunk-VSFFJGTA.js} +9 -5
- package/Build/Workers/{chunk-DGS5QNIO.js → chunk-WQRXRDCZ.js} +11 -11
- package/Build/Workers/{chunk-OORVMGDU.js → chunk-WXDGOYTT.js} +12 -7
- package/Build/Workers/{chunk-RJYML24O.js → chunk-XLCZE6DD.js} +423 -448
- 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 +29 -29
- 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 +24 -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 +28 -5
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/transcodeKTX2.js +20 -22
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
- package/Source/Core/CompressedTextureBuffer.js +11 -0
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/KTX2Transcoder.js +9 -16
- package/Source/Core/PixelFormat.js +1 -15
- package/Source/Core/Simon1994PlanetaryPositions.js +2 -1
- package/Source/Core/Transforms.js +137 -2
- package/Source/DataSources/BillboardGraphics.js +16 -0
- package/Source/DataSources/BillboardVisualizer.js +7 -0
- package/Source/DataSources/CallbackProperty.js +8 -2
- package/Source/DataSources/CheckerboardMaterialProperty.js +7 -1
- package/Source/DataSources/ColorMaterialProperty.js +7 -1
- package/Source/DataSources/CompositeMaterialProperty.js +5 -4
- package/Source/DataSources/CompositePositionProperty.js +7 -1
- package/Source/DataSources/CompositeProperty.js +5 -5
- package/Source/DataSources/ConstantPositionProperty.js +7 -1
- package/Source/DataSources/Entity.js +1 -1
- package/Source/DataSources/GridMaterialProperty.js +7 -1
- package/Source/DataSources/ImageMaterialProperty.js +8 -1
- package/Source/DataSources/MaterialProperty.js +7 -1
- package/Source/DataSources/NodeTransformationProperty.js +7 -1
- package/Source/DataSources/PathVisualizer.js +4 -4
- package/Source/DataSources/PointGraphics.js +17 -0
- package/Source/DataSources/PointVisualizer.js +12 -0
- package/Source/DataSources/PolylineArrowMaterialProperty.js +7 -1
- package/Source/DataSources/PolylineDashMaterialProperty.js +7 -1
- package/Source/DataSources/PolylineGlowMaterialProperty.js +7 -1
- package/Source/DataSources/PolylineOutlineMaterialProperty.js +7 -1
- package/Source/DataSources/PositionProperty.js +5 -8
- package/Source/DataSources/PositionPropertyArray.js +7 -1
- package/Source/DataSources/Property.js +1 -1
- package/Source/DataSources/PropertyArray.js +5 -5
- package/Source/DataSources/PropertyBag.js +5 -4
- package/Source/DataSources/ReferenceProperty.js +7 -1
- package/Source/DataSources/SampledPositionProperty.js +7 -1
- package/Source/DataSources/SampledProperty.js +6 -4
- package/Source/DataSources/ScaledPositionProperty.js +6 -0
- package/Source/DataSources/StripeMaterialProperty.js +7 -1
- package/Source/DataSources/TerrainOffsetProperty.js +9 -0
- package/Source/DataSources/TimeIntervalCollectionPositionProperty.js +7 -1
- package/Source/DataSources/TimeIntervalCollectionProperty.js +5 -5
- package/Source/DataSources/VelocityOrientationProperty.js +6 -1
- package/Source/DataSources/VelocityVectorProperty.js +3 -5
- package/Source/Renderer/AutomaticUniforms.js +3 -18
- package/Source/Renderer/Context.js +15 -0
- package/Source/Renderer/CubeMap.js +326 -348
- package/Source/Renderer/CubeMapFace.js +26 -48
- package/Source/Renderer/PixelDatatype.js +23 -0
- package/Source/Renderer/Sampler.js +7 -13
- package/Source/Renderer/ShaderProgram.js +7 -0
- package/Source/Renderer/Texture.js +396 -332
- package/Source/Renderer/UniformState.js +8 -33
- package/Source/Renderer/demodernizeShader.js +2 -0
- package/Source/Renderer/loadCubeMap.js +3 -8
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +29 -2
- package/Source/Scene/BillboardCollection.js +49 -0
- package/Source/Scene/BingMapsImageryProvider.js +10 -1
- package/Source/Scene/CameraEventAggregator.js +49 -5
- package/Source/Scene/Globe.js +1 -1
- package/Source/Scene/GlobeSurfaceShaderSet.js +29 -24
- package/Source/Scene/GlobeSurfaceTileProvider.js +5 -3
- package/Source/Scene/ImageBasedLighting.js +36 -36
- package/Source/Scene/Label.js +2 -2
- package/Source/Scene/Material.js +24 -2
- package/Source/Scene/Model/ImageBasedLightingPipelineStage.js +7 -15
- package/Source/Scene/Model/Model.js +1 -1
- package/Source/Scene/PointPrimitive.js +28 -2
- package/Source/Scene/PointPrimitiveCollection.js +22 -9
- package/Source/Scene/PostProcessStageCollection.js +45 -15
- package/Source/Scene/PostProcessStageLibrary.js +26 -0
- package/Source/Scene/Scene.js +20 -22
- package/Source/Scene/SceneTransforms.js +0 -62
- package/Source/Scene/ScreenSpaceCameraController.js +11 -4
- package/Source/Scene/SkyBox.js +13 -19
- package/Source/Scene/SpecularEnvironmentCubeMap.js +240 -0
- package/Source/Scene/Tonemapper.js +35 -23
- package/Source/Scene/VoxelPrimitive.js +0 -29
- package/Source/Scene/VoxelRenderResources.js +0 -3
- package/Source/Shaders/BillboardCollectionFS.glsl +4 -0
- package/Source/Shaders/BillboardCollectionFS.js +4 -0
- package/Source/Shaders/BillboardCollectionVS.glsl +3 -1
- package/Source/Shaders/BillboardCollectionVS.js +3 -1
- package/Source/Shaders/BrdfLutGeneratorFS.glsl +30 -13
- package/Source/Shaders/BrdfLutGeneratorFS.js +30 -13
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -2
- package/Source/Shaders/Builtin/Functions/pbrLighting.glsl +42 -41
- package/Source/Shaders/Builtin/Functions/pbrLighting.js +42 -41
- package/Source/Shaders/Builtin/Functions/pbrNeutralTonemapping.glsl +23 -0
- package/Source/Shaders/Builtin/Functions/pbrNeutralTonemapping.js +25 -0
- package/Source/Shaders/Builtin/Functions/textureCube.glsl +21 -2
- package/Source/Shaders/Builtin/Functions/textureCube.js +21 -2
- package/Source/Shaders/Builtin/Structs/materialInput.glsl +2 -0
- package/Source/Shaders/Builtin/Structs/materialInput.js +2 -0
- package/Source/Shaders/GlobeFS.glsl +10 -4
- package/Source/Shaders/GlobeFS.js +10 -4
- package/Source/Shaders/Materials/WaterMaskMaterial.glsl +15 -0
- package/Source/Shaders/Materials/WaterMaskMaterial.js +17 -0
- package/Source/Shaders/Model/AtmosphereStageFS.glsl +1 -1
- package/Source/Shaders/Model/AtmosphereStageFS.js +1 -1
- package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +57 -46
- package/Source/Shaders/Model/ImageBasedLightingStageFS.js +57 -46
- package/Source/Shaders/Model/LightingStageFS.glsl +8 -7
- package/Source/Shaders/Model/LightingStageFS.js +8 -7
- package/Source/Shaders/Model/MaterialStageFS.glsl +10 -14
- package/Source/Shaders/Model/MaterialStageFS.js +10 -14
- package/Source/Shaders/PointPrimitiveCollectionFS.glsl +4 -0
- package/Source/Shaders/PointPrimitiveCollectionFS.js +4 -0
- package/Source/Shaders/PointPrimitiveCollectionVS.glsl +9 -7
- package/Source/Shaders/PointPrimitiveCollectionVS.js +9 -7
- package/Source/Shaders/PostProcessStages/AcesTonemappingStage.glsl +4 -0
- package/Source/Shaders/PostProcessStages/AcesTonemappingStage.js +4 -0
- package/Source/Shaders/PostProcessStages/FilmicTonemapping.glsl +4 -0
- package/Source/Shaders/PostProcessStages/FilmicTonemapping.js +4 -0
- package/Source/Shaders/PostProcessStages/ModifiedReinhardTonemapping.glsl +4 -0
- package/Source/Shaders/PostProcessStages/ModifiedReinhardTonemapping.js +4 -0
- package/Source/Shaders/PostProcessStages/PbrNeutralTonemapping.glsl +25 -0
- package/Source/Shaders/PostProcessStages/PbrNeutralTonemapping.js +27 -0
- package/Source/Shaders/PostProcessStages/ReinhardTonemapping.glsl +4 -0
- package/Source/Shaders/PostProcessStages/ReinhardTonemapping.js +4 -0
- package/Source/Shaders/SkyAtmosphereFS.glsl +1 -1
- package/Source/Shaders/SkyAtmosphereFS.js +1 -1
- package/Source/Widget/CesiumWidget.js +1 -1
- package/index.d.ts +191 -106
- package/index.js +133 -134
- package/package.json +4 -4
- package/Source/Scene/OctahedralProjectedCubeMap.js +0 -445
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.glsl +0 -78
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.js +0 -80
- package/Source/Shaders/OctahedralProjectionAtlasFS.glsl +0 -89
- package/Source/Shaders/OctahedralProjectionAtlasFS.js +0 -91
- package/Source/Shaders/OctahedralProjectionFS.glsl +0 -14
- package/Source/Shaders/OctahedralProjectionFS.js +0 -16
- package/Source/Shaders/OctahedralProjectionVS.glsl +0 -10
- package/Source/Shaders/OctahedralProjectionVS.js +0 -12
|
@@ -538,6 +538,35 @@ const wgs84WRPrecessing = 7.2921158553e-5;
|
|
|
538
538
|
const twoPiOverSecondsInDay = CesiumMath.TWO_PI / 86400.0;
|
|
539
539
|
let dateInUtc = new JulianDate();
|
|
540
540
|
|
|
541
|
+
/**
|
|
542
|
+
* The default function to compute a rotation matrix to transform a point or vector from the International Celestial
|
|
543
|
+
* Reference Frame (GCRF/ICRF) inertial frame axes to the central body, typically Earth, fixed frame axis at a given
|
|
544
|
+
* time for use in lighting and transformation from inertial reference frames. This function may return undefined if
|
|
545
|
+
* the data necessary to do the transformation is not yet loaded.
|
|
546
|
+
*
|
|
547
|
+
* @param {JulianDate} date The time at which to compute the rotation matrix.
|
|
548
|
+
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
|
|
549
|
+
* not specified, a new instance is created and returned.
|
|
550
|
+
* @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the
|
|
551
|
+
* transformation is not yet loaded.
|
|
552
|
+
*
|
|
553
|
+
* @example
|
|
554
|
+
* // Set the default ICRF to fixed transformation to that of the Moon.
|
|
555
|
+
* Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;
|
|
556
|
+
*
|
|
557
|
+
* @see Transforms.computeIcrfToFixedMatrix
|
|
558
|
+
* @see Transforms.computeTemeToPseudoFixedMatrix
|
|
559
|
+
* @see Transforms.computeIcrfToMoonFixedMatrix
|
|
560
|
+
*/
|
|
561
|
+
Transforms.computeIcrfToCentralBodyFixedMatrix = function (date, result) {
|
|
562
|
+
let transformMatrix = Transforms.computeIcrfToFixedMatrix(date, result);
|
|
563
|
+
if (!defined(transformMatrix)) {
|
|
564
|
+
transformMatrix = Transforms.computeTemeToPseudoFixedMatrix(date, result);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
return transformMatrix;
|
|
568
|
+
};
|
|
569
|
+
|
|
541
570
|
/**
|
|
542
571
|
* Computes a rotation matrix to transform a point or vector from True Equator Mean Equinox (TEME) axes to the
|
|
543
572
|
* pseudo-fixed axes at a given time. This method treats the UT1 time standard as equivalent to UTC.
|
|
@@ -691,7 +720,7 @@ Transforms.preloadIcrfFixed = function (timeInterval) {
|
|
|
691
720
|
* @param {JulianDate} date The time at which to compute the rotation matrix.
|
|
692
721
|
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
|
|
693
722
|
* not specified, a new instance is created and returned.
|
|
694
|
-
* @returns {Matrix3} The rotation matrix, or undefined if the data necessary to do the
|
|
723
|
+
* @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the
|
|
695
724
|
* transformation is not yet loaded.
|
|
696
725
|
*
|
|
697
726
|
*
|
|
@@ -726,6 +755,112 @@ Transforms.computeIcrfToFixedMatrix = function (date, result) {
|
|
|
726
755
|
return Matrix3.transpose(fixedToIcrfMtx, result);
|
|
727
756
|
};
|
|
728
757
|
|
|
758
|
+
const TdtMinusTai = 32.184;
|
|
759
|
+
const J2000d = 2451545;
|
|
760
|
+
const scratchHpr = new HeadingPitchRoll();
|
|
761
|
+
const scratchRotationMatrix = new Matrix3();
|
|
762
|
+
const dateScratch = new JulianDate();
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Computes a rotation matrix to transform a point or vector from the Moon-Fixed frame axes
|
|
766
|
+
* to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes
|
|
767
|
+
* at a given time.
|
|
768
|
+
*
|
|
769
|
+
* @param {JulianDate} date The time at which to compute the rotation matrix.
|
|
770
|
+
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
|
|
771
|
+
* not specified, a new instance is created and returned.
|
|
772
|
+
* @returns {Matrix3} The rotation matrix.
|
|
773
|
+
*
|
|
774
|
+
* @example
|
|
775
|
+
* // Transform a point from the Fixed axes to the ICRF axes.
|
|
776
|
+
* const now = Cesium.JulianDate.now();
|
|
777
|
+
* const pointInFixed = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
|
|
778
|
+
* const fixedToIcrf = Cesium.Transforms.computeMoonFixedToIcrfMatrix(now);
|
|
779
|
+
* let pointInInertial = new Cesium.Cartesian3();
|
|
780
|
+
* if (Cesium.defined(fixedToIcrf)) {
|
|
781
|
+
* pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed, pointInInertial);
|
|
782
|
+
* }
|
|
783
|
+
*/
|
|
784
|
+
Transforms.computeMoonFixedToIcrfMatrix = function (date, result) {
|
|
785
|
+
//>>includeStart('debug', pragmas.debug);
|
|
786
|
+
if (!defined(date)) {
|
|
787
|
+
throw new DeveloperError("date is required.");
|
|
788
|
+
}
|
|
789
|
+
//>>includeEnd('debug');
|
|
790
|
+
|
|
791
|
+
if (!defined(result)) {
|
|
792
|
+
result = new Matrix3();
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
// Converts TAI to TT
|
|
796
|
+
const secondsTT = JulianDate.addSeconds(date, TdtMinusTai, dateScratch);
|
|
797
|
+
|
|
798
|
+
// Converts TT to TDB, interval in days since the standard epoch
|
|
799
|
+
const d = JulianDate.totalDays(secondsTT) - J2000d;
|
|
800
|
+
|
|
801
|
+
// Compute the approximate rotation, using https://articles.adsabs.harvard.edu//full/1980CeMec..22..205D/0000209.000.html
|
|
802
|
+
const e1 = CesiumMath.toRadians(12.112) - CesiumMath.toRadians(0.052992) * d;
|
|
803
|
+
const e2 = CesiumMath.toRadians(24.224) - CesiumMath.toRadians(0.105984) * d;
|
|
804
|
+
const e3 = CesiumMath.toRadians(227.645) + CesiumMath.toRadians(13.012) * d;
|
|
805
|
+
const e4 =
|
|
806
|
+
CesiumMath.toRadians(261.105) + CesiumMath.toRadians(13.340716) * d;
|
|
807
|
+
const e5 = CesiumMath.toRadians(358.0) + CesiumMath.toRadians(0.9856) * d;
|
|
808
|
+
|
|
809
|
+
scratchHpr.pitch =
|
|
810
|
+
CesiumMath.toRadians(270.0 - 90) -
|
|
811
|
+
CesiumMath.toRadians(3.878) * Math.sin(e1) -
|
|
812
|
+
CesiumMath.toRadians(0.12) * Math.sin(e2) +
|
|
813
|
+
CesiumMath.toRadians(0.07) * Math.sin(e3) -
|
|
814
|
+
CesiumMath.toRadians(0.017) * Math.sin(e4);
|
|
815
|
+
scratchHpr.roll =
|
|
816
|
+
CesiumMath.toRadians(66.53 - 90) +
|
|
817
|
+
CesiumMath.toRadians(1.543) * Math.cos(e1) +
|
|
818
|
+
CesiumMath.toRadians(0.24) * Math.cos(e2) -
|
|
819
|
+
CesiumMath.toRadians(0.028) * Math.cos(e3) +
|
|
820
|
+
CesiumMath.toRadians(0.007) * Math.cos(e4);
|
|
821
|
+
scratchHpr.heading =
|
|
822
|
+
CesiumMath.toRadians(244.375 - 90) +
|
|
823
|
+
CesiumMath.toRadians(13.17635831) * d +
|
|
824
|
+
CesiumMath.toRadians(3.558) * Math.sin(e1) +
|
|
825
|
+
CesiumMath.toRadians(0.121) * Math.sin(e2) -
|
|
826
|
+
CesiumMath.toRadians(0.064) * Math.sin(e3) +
|
|
827
|
+
CesiumMath.toRadians(0.016) * Math.sin(e4) +
|
|
828
|
+
CesiumMath.toRadians(0.025) * Math.sin(e5);
|
|
829
|
+
return Matrix3.fromHeadingPitchRoll(scratchHpr, scratchRotationMatrix);
|
|
830
|
+
};
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Computes a rotation matrix to transform a point or vector from the International Celestial
|
|
834
|
+
* Reference Frame (GCRF/ICRF) inertial frame axes to the Moon-Fixed frame axes
|
|
835
|
+
* at a given time.
|
|
836
|
+
*
|
|
837
|
+
* @param {JulianDate} date The time at which to compute the rotation matrix.
|
|
838
|
+
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
|
|
839
|
+
* not specified, a new instance is created and returned.
|
|
840
|
+
* @returns {Matrix3} The rotation matrix.
|
|
841
|
+
*
|
|
842
|
+
* @example
|
|
843
|
+
* // Set the default ICRF to fixed transformation to that of the Moon.
|
|
844
|
+
* Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;
|
|
845
|
+
*/
|
|
846
|
+
Transforms.computeIcrfToMoonFixedMatrix = function (date, result) {
|
|
847
|
+
//>>includeStart('debug', pragmas.debug);
|
|
848
|
+
if (!defined(date)) {
|
|
849
|
+
throw new DeveloperError("date is required.");
|
|
850
|
+
}
|
|
851
|
+
//>>includeEnd('debug');
|
|
852
|
+
if (!defined(result)) {
|
|
853
|
+
result = new Matrix3();
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
const fixedToIcrfMtx = Transforms.computeMoonFixedToIcrfMatrix(date, result);
|
|
857
|
+
if (!defined(fixedToIcrfMtx)) {
|
|
858
|
+
return undefined;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
return Matrix3.transpose(fixedToIcrfMtx, result);
|
|
862
|
+
};
|
|
863
|
+
|
|
729
864
|
const xysScratch = new Iau2006XysSample(0.0, 0.0, 0.0);
|
|
730
865
|
const eopScratch = new EarthOrientationParametersSample(
|
|
731
866
|
0.0,
|
|
@@ -747,7 +882,7 @@ const rotation2Scratch = new Matrix3();
|
|
|
747
882
|
* @param {JulianDate} date The time at which to compute the rotation matrix.
|
|
748
883
|
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
|
|
749
884
|
* not specified, a new instance is created and returned.
|
|
750
|
-
* @returns {Matrix3} The rotation matrix, or undefined if the data necessary to do the
|
|
885
|
+
* @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the
|
|
751
886
|
* transformation is not yet loaded.
|
|
752
887
|
*
|
|
753
888
|
*
|
|
@@ -29,6 +29,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
|
|
|
29
29
|
* @property {Property | BoundingRectangle} [imageSubRegion] A Property specifying a {@link BoundingRectangle} that defines a sub-region of the image to use for the billboard, rather than the entire image, measured in pixels from the bottom-left.
|
|
30
30
|
* @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this billboard will be displayed.
|
|
31
31
|
* @property {Property | number} [disableDepthTestDistance] A Property specifying the distance from the camera at which to disable the depth test to.
|
|
32
|
+
* @property {Property | SplitDirection} [splitDirection] A Property specifying the {@link SplitDirection} of the billboard.
|
|
32
33
|
*/
|
|
33
34
|
|
|
34
35
|
/**
|
|
@@ -89,6 +90,8 @@ function BillboardGraphics(options) {
|
|
|
89
90
|
this._distanceDisplayConditionSubscription = undefined;
|
|
90
91
|
this._disableDepthTestDistance = undefined;
|
|
91
92
|
this._disableDepthTestDistanceSubscription = undefined;
|
|
93
|
+
this._splitDirection = undefined;
|
|
94
|
+
this._splitDirectionSubscription = undefined;
|
|
92
95
|
|
|
93
96
|
this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT));
|
|
94
97
|
}
|
|
@@ -330,6 +333,14 @@ Object.defineProperties(BillboardGraphics.prototype, {
|
|
|
330
333
|
disableDepthTestDistance: createPropertyDescriptor(
|
|
331
334
|
"disableDepthTestDistance"
|
|
332
335
|
),
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Gets or sets the Property specifying the {@link SplitDirection} of this billboard.
|
|
339
|
+
* @memberof BillboardGraphics.prototype
|
|
340
|
+
* @type {Property|undefined}
|
|
341
|
+
* @default SplitDirection.NONE
|
|
342
|
+
*/
|
|
343
|
+
splitDirection: createPropertyDescriptor("splitDirection"),
|
|
333
344
|
});
|
|
334
345
|
|
|
335
346
|
/**
|
|
@@ -362,6 +373,7 @@ BillboardGraphics.prototype.clone = function (result) {
|
|
|
362
373
|
result.imageSubRegion = this._imageSubRegion;
|
|
363
374
|
result.distanceDisplayCondition = this._distanceDisplayCondition;
|
|
364
375
|
result.disableDepthTestDistance = this._disableDepthTestDistance;
|
|
376
|
+
result.splitDirection = this._splitDirection;
|
|
365
377
|
return result;
|
|
366
378
|
};
|
|
367
379
|
|
|
@@ -425,5 +437,9 @@ BillboardGraphics.prototype.merge = function (source) {
|
|
|
425
437
|
this._disableDepthTestDistance,
|
|
426
438
|
source.disableDepthTestDistance
|
|
427
439
|
);
|
|
440
|
+
this.splitDirection = defaultValue(
|
|
441
|
+
this.splitDirection,
|
|
442
|
+
source.splitDirection
|
|
443
|
+
);
|
|
428
444
|
};
|
|
429
445
|
export default BillboardGraphics;
|
|
@@ -13,6 +13,7 @@ import HorizontalOrigin from "../Scene/HorizontalOrigin.js";
|
|
|
13
13
|
import VerticalOrigin from "../Scene/VerticalOrigin.js";
|
|
14
14
|
import BoundingSphereState from "./BoundingSphereState.js";
|
|
15
15
|
import Property from "./Property.js";
|
|
16
|
+
import SplitDirection from "../Scene/SplitDirection.js";
|
|
16
17
|
|
|
17
18
|
const defaultColor = Color.WHITE;
|
|
18
19
|
const defaultEyeOffset = Cartesian3.ZERO;
|
|
@@ -24,6 +25,7 @@ const defaultAlignedAxis = Cartesian3.ZERO;
|
|
|
24
25
|
const defaultHorizontalOrigin = HorizontalOrigin.CENTER;
|
|
25
26
|
const defaultVerticalOrigin = VerticalOrigin.CENTER;
|
|
26
27
|
const defaultSizeInMeters = false;
|
|
28
|
+
const defaultSplitDirection = SplitDirection.NONE;
|
|
27
29
|
|
|
28
30
|
const positionScratch = new Cartesian3();
|
|
29
31
|
const colorScratch = new Color();
|
|
@@ -219,6 +221,11 @@ BillboardVisualizer.prototype.update = function (time) {
|
|
|
219
221
|
billboardGraphics._disableDepthTestDistance,
|
|
220
222
|
time
|
|
221
223
|
);
|
|
224
|
+
billboard.splitDirection = Property.getValueOrDefault(
|
|
225
|
+
billboardGraphics._splitDirection,
|
|
226
|
+
time,
|
|
227
|
+
defaultSplitDirection
|
|
228
|
+
);
|
|
222
229
|
|
|
223
230
|
const subRegion = Property.getValueOrUndefined(
|
|
224
231
|
billboardGraphics._imageSubRegion,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import defined from "../Core/defined.js";
|
|
2
2
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
3
3
|
import Event from "../Core/Event.js";
|
|
4
|
+
import JulianDate from "../Core/JulianDate.js";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* A {@link Property} whose value is lazily evaluated by a callback function.
|
|
@@ -46,14 +47,19 @@ Object.defineProperties(CallbackProperty.prototype, {
|
|
|
46
47
|
},
|
|
47
48
|
});
|
|
48
49
|
|
|
50
|
+
const timeScratch = new JulianDate();
|
|
51
|
+
|
|
49
52
|
/**
|
|
50
53
|
* Gets the value of the property.
|
|
51
54
|
*
|
|
52
|
-
* @param {JulianDate} time The time for which to retrieve the value.
|
|
55
|
+
* @param {JulianDate} [time=JulianDate.now()] The time for which to retrieve the value. If omitted, the current system time is used.
|
|
53
56
|
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
|
|
54
57
|
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied or is unsupported.
|
|
55
58
|
*/
|
|
56
59
|
CallbackProperty.prototype.getValue = function (time, result) {
|
|
60
|
+
if (!defined(time)) {
|
|
61
|
+
time = JulianDate.now(timeScratch);
|
|
62
|
+
}
|
|
57
63
|
return this._callback(time, result);
|
|
58
64
|
};
|
|
59
65
|
|
|
@@ -104,7 +110,7 @@ CallbackProperty.prototype.equals = function (other) {
|
|
|
104
110
|
* A function that returns the value of the property.
|
|
105
111
|
* @callback CallbackProperty.Callback
|
|
106
112
|
*
|
|
107
|
-
* @param {JulianDate} time The time for which to retrieve the value.
|
|
113
|
+
* @param {JulianDate} [time=JulianDate.now()] The time for which to retrieve the value. If omitted, the current system time is used.
|
|
108
114
|
* @param {object} [result] The object to store the value into. If omitted, the function must create and return a new instance.
|
|
109
115
|
* @returns {object} The modified result parameter, or a new instance if the result parameter was not supplied or is unsupported.
|
|
110
116
|
*/
|
|
@@ -3,6 +3,7 @@ import Color from "../Core/Color.js";
|
|
|
3
3
|
import defaultValue from "../Core/defaultValue.js";
|
|
4
4
|
import defined from "../Core/defined.js";
|
|
5
5
|
import Event from "../Core/Event.js";
|
|
6
|
+
import JulianDate from "../Core/JulianDate.js";
|
|
6
7
|
import createPropertyDescriptor from "./createPropertyDescriptor.js";
|
|
7
8
|
import Property from "./Property.js";
|
|
8
9
|
|
|
@@ -105,14 +106,19 @@ CheckerboardMaterialProperty.prototype.getType = function (time) {
|
|
|
105
106
|
return "Checkerboard";
|
|
106
107
|
};
|
|
107
108
|
|
|
109
|
+
const timeScratch = new JulianDate();
|
|
110
|
+
|
|
108
111
|
/**
|
|
109
112
|
* Gets the value of the property at the provided time.
|
|
110
113
|
*
|
|
111
|
-
* @param {JulianDate} time The time for which to retrieve the value.
|
|
114
|
+
* @param {JulianDate} [time=JulianDate.now()] The time for which to retrieve the value. If omitted, the current system time is used.
|
|
112
115
|
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
|
|
113
116
|
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
|
|
114
117
|
*/
|
|
115
118
|
CheckerboardMaterialProperty.prototype.getValue = function (time, result) {
|
|
119
|
+
if (!defined(time)) {
|
|
120
|
+
time = JulianDate.now(timeScratch);
|
|
121
|
+
}
|
|
116
122
|
if (!defined(result)) {
|
|
117
123
|
result = {};
|
|
118
124
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Color from "../Core/Color.js";
|
|
2
2
|
import defined from "../Core/defined.js";
|
|
3
3
|
import Event from "../Core/Event.js";
|
|
4
|
+
import JulianDate from "../Core/JulianDate.js";
|
|
4
5
|
import createPropertyDescriptor from "./createPropertyDescriptor.js";
|
|
5
6
|
import Property from "./Property.js";
|
|
6
7
|
|
|
@@ -69,14 +70,19 @@ ColorMaterialProperty.prototype.getType = function (time) {
|
|
|
69
70
|
return "Color";
|
|
70
71
|
};
|
|
71
72
|
|
|
73
|
+
const timeScratch = new JulianDate();
|
|
74
|
+
|
|
72
75
|
/**
|
|
73
76
|
* Gets the value of the property at the provided time.
|
|
74
77
|
*
|
|
75
|
-
* @param {JulianDate} time The time for which to retrieve the value.
|
|
78
|
+
* @param {JulianDate} [time=JulianDate.now()] The time for which to retrieve the value. If omitted, the current system time is used.
|
|
76
79
|
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
|
|
77
80
|
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
|
|
78
81
|
*/
|
|
79
82
|
ColorMaterialProperty.prototype.getValue = function (time, result) {
|
|
83
|
+
if (!defined(time)) {
|
|
84
|
+
time = JulianDate.now(timeScratch);
|
|
85
|
+
}
|
|
80
86
|
if (!defined(result)) {
|
|
81
87
|
result = {};
|
|
82
88
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import defined from "../Core/defined.js";
|
|
2
2
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
3
3
|
import Event from "../Core/Event.js";
|
|
4
|
+
import JulianDate from "../Core/JulianDate.js";
|
|
4
5
|
import CompositeProperty from "./CompositeProperty.js";
|
|
5
6
|
import Property from "./Property.js";
|
|
6
7
|
|
|
@@ -82,19 +83,19 @@ CompositeMaterialProperty.prototype.getType = function (time) {
|
|
|
82
83
|
return undefined;
|
|
83
84
|
};
|
|
84
85
|
|
|
86
|
+
const timeScratch = new JulianDate();
|
|
87
|
+
|
|
85
88
|
/**
|
|
86
89
|
* Gets the value of the property at the provided time.
|
|
87
90
|
*
|
|
88
|
-
* @param {JulianDate} time The time for which to retrieve the value.
|
|
91
|
+
* @param {JulianDate} [time=JulianDate.now()] The time for which to retrieve the value. If omitted, the current system time is used.
|
|
89
92
|
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
|
|
90
93
|
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
|
|
91
94
|
*/
|
|
92
95
|
CompositeMaterialProperty.prototype.getValue = function (time, result) {
|
|
93
|
-
//>>includeStart('debug', pragmas.debug);
|
|
94
96
|
if (!defined(time)) {
|
|
95
|
-
|
|
97
|
+
time = JulianDate.now(timeScratch);
|
|
96
98
|
}
|
|
97
|
-
//>>includeEnd('debug');
|
|
98
99
|
|
|
99
100
|
const innerProperty = this._composite._intervals.findDataForIntervalContainingDate(
|
|
100
101
|
time
|
|
@@ -2,6 +2,7 @@ import defaultValue from "../Core/defaultValue.js";
|
|
|
2
2
|
import defined from "../Core/defined.js";
|
|
3
3
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
4
4
|
import Event from "../Core/Event.js";
|
|
5
|
+
import JulianDate from "../Core/JulianDate.js";
|
|
5
6
|
import ReferenceFrame from "../Core/ReferenceFrame.js";
|
|
6
7
|
import CompositeProperty from "./CompositeProperty.js";
|
|
7
8
|
import Property from "./Property.js";
|
|
@@ -82,14 +83,19 @@ Object.defineProperties(CompositePositionProperty.prototype, {
|
|
|
82
83
|
},
|
|
83
84
|
});
|
|
84
85
|
|
|
86
|
+
const timeScratch = new JulianDate();
|
|
87
|
+
|
|
85
88
|
/**
|
|
86
89
|
* Gets the value of the property at the provided time in the fixed frame.
|
|
87
90
|
*
|
|
88
|
-
* @param {JulianDate} time The time for which to retrieve the value.
|
|
91
|
+
* @param {JulianDate} [time=JulianDate.now()] The time for which to retrieve the value. If omitted, the current system time is used.
|
|
89
92
|
* @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned.
|
|
90
93
|
* @returns {Cartesian3 | undefined} The modified result parameter or a new instance if the result parameter was not supplied.
|
|
91
94
|
*/
|
|
92
95
|
CompositePositionProperty.prototype.getValue = function (time, result) {
|
|
96
|
+
if (!defined(time)) {
|
|
97
|
+
time = JulianDate.now(timeScratch);
|
|
98
|
+
}
|
|
93
99
|
return this.getValueInReferenceFrame(time, ReferenceFrame.FIXED, result);
|
|
94
100
|
};
|
|
95
101
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import defined from "../Core/defined.js";
|
|
2
|
-
import DeveloperError from "../Core/DeveloperError.js";
|
|
3
2
|
import Event from "../Core/Event.js";
|
|
4
3
|
import EventHelper from "../Core/EventHelper.js";
|
|
4
|
+
import JulianDate from "../Core/JulianDate.js";
|
|
5
5
|
import TimeIntervalCollection from "../Core/TimeIntervalCollection.js";
|
|
6
6
|
import Property from "./Property.js";
|
|
7
7
|
|
|
@@ -103,19 +103,19 @@ Object.defineProperties(CompositeProperty.prototype, {
|
|
|
103
103
|
},
|
|
104
104
|
});
|
|
105
105
|
|
|
106
|
+
const timeScratch = new JulianDate();
|
|
107
|
+
|
|
106
108
|
/**
|
|
107
109
|
* Gets the value of the property at the provided time.
|
|
108
110
|
*
|
|
109
|
-
* @param {JulianDate} time The time for which to retrieve the value.
|
|
111
|
+
* @param {JulianDate} [time=JulianDate.now()] The time for which to retrieve the value. If omitted, the current system time is used.
|
|
110
112
|
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
|
|
111
113
|
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
|
|
112
114
|
*/
|
|
113
115
|
CompositeProperty.prototype.getValue = function (time, result) {
|
|
114
|
-
//>>includeStart('debug', pragmas.debug);
|
|
115
116
|
if (!defined(time)) {
|
|
116
|
-
|
|
117
|
+
time = JulianDate.now(timeScratch);
|
|
117
118
|
}
|
|
118
|
-
//>>includeEnd('debug');
|
|
119
119
|
|
|
120
120
|
const innerProperty = this._intervals.findDataForIntervalContainingDate(time);
|
|
121
121
|
if (defined(innerProperty)) {
|
|
@@ -3,6 +3,7 @@ import defaultValue from "../Core/defaultValue.js";
|
|
|
3
3
|
import defined from "../Core/defined.js";
|
|
4
4
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
5
5
|
import Event from "../Core/Event.js";
|
|
6
|
+
import JulianDate from "../Core/JulianDate.js";
|
|
6
7
|
import ReferenceFrame from "../Core/ReferenceFrame.js";
|
|
7
8
|
import PositionProperty from "./PositionProperty.js";
|
|
8
9
|
|
|
@@ -65,14 +66,19 @@ Object.defineProperties(ConstantPositionProperty.prototype, {
|
|
|
65
66
|
},
|
|
66
67
|
});
|
|
67
68
|
|
|
69
|
+
const timeScratch = new JulianDate();
|
|
70
|
+
|
|
68
71
|
/**
|
|
69
72
|
* Gets the value of the property at the provided time in the fixed frame.
|
|
70
73
|
*
|
|
71
|
-
* @param {JulianDate} time The time for which to retrieve the value.
|
|
74
|
+
* @param {JulianDate} [time=JulianDate.now()] The time for which to retrieve the value. If omitted, the current system time is used.
|
|
72
75
|
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
|
|
73
76
|
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
|
|
74
77
|
*/
|
|
75
78
|
ConstantPositionProperty.prototype.getValue = function (time, result) {
|
|
79
|
+
if (!defined(time)) {
|
|
80
|
+
time = JulianDate.now(timeScratch);
|
|
81
|
+
}
|
|
76
82
|
return this.getValueInReferenceFrame(time, ReferenceFrame.FIXED, result);
|
|
77
83
|
};
|
|
78
84
|
|
|
@@ -74,7 +74,7 @@ function createPropertyTypeDescriptor(name, Type) {
|
|
|
74
74
|
* @property {TimeIntervalCollection} [availability] The availability, if any, associated with this object.
|
|
75
75
|
* @property {boolean} [show] A boolean value indicating if the entity and its children are displayed.
|
|
76
76
|
* @property {Property | string} [description] A string Property specifying an HTML description for this entity.
|
|
77
|
-
* @property {PositionProperty | Cartesian3} [position] A Property specifying the entity position.
|
|
77
|
+
* @property {PositionProperty | Cartesian3 | CallbackProperty} [position] A Property specifying the entity position.
|
|
78
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
79
|
* @property {Property | Cartesian3} [viewFrom] A suggested initial offset for viewing this object.
|
|
80
80
|
* @property {Entity} [parent] A parent entity to associate with this entity.
|
|
@@ -3,6 +3,7 @@ import Color from "../Core/Color.js";
|
|
|
3
3
|
import defaultValue from "../Core/defaultValue.js";
|
|
4
4
|
import defined from "../Core/defined.js";
|
|
5
5
|
import Event from "../Core/Event.js";
|
|
6
|
+
import JulianDate from "../Core/JulianDate.js";
|
|
6
7
|
import createPropertyDescriptor from "./createPropertyDescriptor.js";
|
|
7
8
|
import Property from "./Property.js";
|
|
8
9
|
|
|
@@ -134,14 +135,19 @@ GridMaterialProperty.prototype.getType = function (time) {
|
|
|
134
135
|
return "Grid";
|
|
135
136
|
};
|
|
136
137
|
|
|
138
|
+
const timeScratch = new JulianDate();
|
|
139
|
+
|
|
137
140
|
/**
|
|
138
141
|
* Gets the value of the property at the provided time.
|
|
139
142
|
*
|
|
140
|
-
* @param {JulianDate} time The time for which to retrieve the value.
|
|
143
|
+
* @param {JulianDate} [time=JulianDate.now()] The time for which to retrieve the value. If omitted, the current system time is used.
|
|
141
144
|
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
|
|
142
145
|
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
|
|
143
146
|
*/
|
|
144
147
|
GridMaterialProperty.prototype.getValue = function (time, result) {
|
|
148
|
+
if (!defined(time)) {
|
|
149
|
+
time = JulianDate.now(timeScratch);
|
|
150
|
+
}
|
|
145
151
|
if (!defined(result)) {
|
|
146
152
|
result = {};
|
|
147
153
|
}
|
|
@@ -3,6 +3,7 @@ import Color from "../Core/Color.js";
|
|
|
3
3
|
import defaultValue from "../Core/defaultValue.js";
|
|
4
4
|
import defined from "../Core/defined.js";
|
|
5
5
|
import Event from "../Core/Event.js";
|
|
6
|
+
import JulianDate from "../Core/JulianDate.js";
|
|
6
7
|
import createPropertyDescriptor from "./createPropertyDescriptor.js";
|
|
7
8
|
import Property from "./Property.js";
|
|
8
9
|
|
|
@@ -114,14 +115,20 @@ ImageMaterialProperty.prototype.getType = function (time) {
|
|
|
114
115
|
return "Image";
|
|
115
116
|
};
|
|
116
117
|
|
|
118
|
+
const timeScratch = new JulianDate();
|
|
119
|
+
|
|
117
120
|
/**
|
|
118
121
|
* Gets the value of the property at the provided time.
|
|
119
122
|
*
|
|
120
|
-
* @param {JulianDate} time The time for which to retrieve the value.
|
|
123
|
+
* @param {JulianDate} [time=JulianDate.now()] The time for which to retrieve the value. If omitted, the current system time is used.
|
|
121
124
|
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
|
|
122
125
|
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
|
|
123
126
|
*/
|
|
124
127
|
ImageMaterialProperty.prototype.getValue = function (time, result) {
|
|
128
|
+
if (!defined(time)) {
|
|
129
|
+
time = JulianDate.now(timeScratch);
|
|
130
|
+
}
|
|
131
|
+
|
|
125
132
|
if (!defined(result)) {
|
|
126
133
|
result = {};
|
|
127
134
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Color from "../Core/Color.js";
|
|
2
2
|
import defined from "../Core/defined.js";
|
|
3
3
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
4
|
+
import JulianDate from "../Core/JulianDate.js";
|
|
4
5
|
import Material from "../Scene/Material.js";
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -62,7 +63,7 @@ MaterialProperty.prototype.getType = DeveloperError.throwInstantiationError;
|
|
|
62
63
|
* Gets the value of the property at the provided time.
|
|
63
64
|
* @function
|
|
64
65
|
*
|
|
65
|
-
* @param {JulianDate} time The time for which to retrieve the value.
|
|
66
|
+
* @param {JulianDate} [time=JulianDate.now()] The time for which to retrieve the value. If omitted, the current system time is used.
|
|
66
67
|
* @param {object} [result] The object to store the value into, if omitted, a new instance is created and returned.
|
|
67
68
|
* @returns {object} The modified result parameter or a new instance if the result parameter was not supplied.
|
|
68
69
|
*/
|
|
@@ -78,11 +79,16 @@ MaterialProperty.prototype.getValue = DeveloperError.throwInstantiationError;
|
|
|
78
79
|
*/
|
|
79
80
|
MaterialProperty.prototype.equals = DeveloperError.throwInstantiationError;
|
|
80
81
|
|
|
82
|
+
const timeScratch = new JulianDate();
|
|
83
|
+
|
|
81
84
|
/**
|
|
82
85
|
* @private
|
|
83
86
|
*/
|
|
84
87
|
MaterialProperty.getValue = function (time, materialProperty, material) {
|
|
85
88
|
let type;
|
|
89
|
+
if (!defined(time)) {
|
|
90
|
+
time = JulianDate.now(timeScratch);
|
|
91
|
+
}
|
|
86
92
|
|
|
87
93
|
if (defined(materialProperty)) {
|
|
88
94
|
type = materialProperty.getType(time);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import defaultValue from "../Core/defaultValue.js";
|
|
2
2
|
import defined from "../Core/defined.js";
|
|
3
3
|
import Event from "../Core/Event.js";
|
|
4
|
+
import JulianDate from "../Core/JulianDate.js";
|
|
4
5
|
import TranslationRotationScale from "../Core/TranslationRotationScale.js";
|
|
5
6
|
import createPropertyDescriptor from "./createPropertyDescriptor.js";
|
|
6
7
|
import Property from "./Property.js";
|
|
@@ -92,14 +93,19 @@ Object.defineProperties(NodeTransformationProperty.prototype, {
|
|
|
92
93
|
scale: createPropertyDescriptor("scale"),
|
|
93
94
|
});
|
|
94
95
|
|
|
96
|
+
const timeScratch = new JulianDate();
|
|
97
|
+
|
|
95
98
|
/**
|
|
96
99
|
* Gets the value of the property at the provided time.
|
|
97
100
|
*
|
|
98
|
-
* @param {JulianDate} time The time for which to retrieve the value.
|
|
101
|
+
* @param {JulianDate} [time=JulianDate.now()] The time for which to retrieve the value. If omitted, the current system time is used.
|
|
99
102
|
* @param {TranslationRotationScale} [result] The object to store the value into, if omitted, a new instance is created and returned.
|
|
100
103
|
* @returns {TranslationRotationScale} The modified result parameter or a new instance if the result parameter was not supplied.
|
|
101
104
|
*/
|
|
102
105
|
NodeTransformationProperty.prototype.getValue = function (time, result) {
|
|
106
|
+
if (!defined(time)) {
|
|
107
|
+
time = JulianDate.now(timeScratch);
|
|
108
|
+
}
|
|
103
109
|
if (!defined(result)) {
|
|
104
110
|
result = new TranslationRotationScale();
|
|
105
111
|
}
|
|
@@ -430,10 +430,10 @@ function PolylineUpdater(scene, referenceFrame) {
|
|
|
430
430
|
|
|
431
431
|
PolylineUpdater.prototype.update = function (time) {
|
|
432
432
|
if (this._referenceFrame === ReferenceFrame.INERTIAL) {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
433
|
+
const toFixed = Transforms.computeIcrfToCentralBodyFixedMatrix(
|
|
434
|
+
time,
|
|
435
|
+
toFixedScratch
|
|
436
|
+
);
|
|
437
437
|
Matrix4.fromRotationTranslation(
|
|
438
438
|
toFixed,
|
|
439
439
|
Cartesian3.ZERO,
|
|
@@ -19,6 +19,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
|
|
|
19
19
|
* @property {Property | NearFarScalar} [translucencyByDistance] A {@link NearFarScalar} Property used to set translucency based on distance from the camera.
|
|
20
20
|
* @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this point will be displayed.
|
|
21
21
|
* @property {Property | number} [disableDepthTestDistance] A Property specifying the distance from the camera at which to disable the depth test to.
|
|
22
|
+
* @property {Property | SplitDirection} [splitDirection] A Property specifying the {@link SplitDirection} split to apply to this point.
|
|
22
23
|
*/
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -51,6 +52,8 @@ function PointGraphics(options) {
|
|
|
51
52
|
this._distanceDisplayConditionSubscription = undefined;
|
|
52
53
|
this._disableDepthTestDistance = undefined;
|
|
53
54
|
this._disableDepthTestDistanceSubscription = undefined;
|
|
55
|
+
this._splitDirection = undefined;
|
|
56
|
+
this._splitDirectionSubscription = undefined;
|
|
54
57
|
|
|
55
58
|
this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT));
|
|
56
59
|
}
|
|
@@ -154,6 +157,14 @@ Object.defineProperties(PointGraphics.prototype, {
|
|
|
154
157
|
disableDepthTestDistance: createPropertyDescriptor(
|
|
155
158
|
"disableDepthTestDistance"
|
|
156
159
|
),
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Gets or sets the Property specifying the {@link SplitDirection} of this point.
|
|
163
|
+
* @memberof PointGraphics.prototype
|
|
164
|
+
* @type {Property|undefined}
|
|
165
|
+
* @default SplitDirection.NONE
|
|
166
|
+
*/
|
|
167
|
+
splitDirection: createPropertyDescriptor("splitDirection"),
|
|
157
168
|
});
|
|
158
169
|
|
|
159
170
|
/**
|
|
@@ -176,6 +187,7 @@ PointGraphics.prototype.clone = function (result) {
|
|
|
176
187
|
result.translucencyByDistance = this._translucencyByDistance;
|
|
177
188
|
result.distanceDisplayCondition = this.distanceDisplayCondition;
|
|
178
189
|
result.disableDepthTestDistance = this.disableDepthTestDistance;
|
|
190
|
+
result.splitDirection = this.splitDirection;
|
|
179
191
|
return result;
|
|
180
192
|
};
|
|
181
193
|
|
|
@@ -217,5 +229,10 @@ PointGraphics.prototype.merge = function (source) {
|
|
|
217
229
|
this.disableDepthTestDistance,
|
|
218
230
|
source.disableDepthTestDistance
|
|
219
231
|
);
|
|
232
|
+
|
|
233
|
+
this.splitDirection = defaultValue(
|
|
234
|
+
this.splitDirection,
|
|
235
|
+
source.splitDirection
|
|
236
|
+
);
|
|
220
237
|
};
|
|
221
238
|
export default PointGraphics;
|