@cesium/engine 9.2.0 → 10.1.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-GOQEANLM.js → chunk-2GEAGYUY.js} +13 -13
- package/Build/Workers/{chunk-WOYQB5HM.js → chunk-2J3JKXCP.js} +5 -5
- package/Build/Workers/{chunk-IXYFH7DV.js → chunk-3WUV74WM.js} +2 -2
- package/Build/Workers/{chunk-WHDEZSAL.js → chunk-4MSUJ4I7.js} +8 -8
- package/Build/Workers/chunk-4RMIRG6T.js +1800 -0
- package/Build/Workers/{chunk-CVCVMOQA.js → chunk-4VFBBNQ3.js} +1 -1
- package/Build/Workers/{chunk-ZHJDE6JN.js → chunk-4YSNMHZ4.js} +6 -6
- package/Build/Workers/{chunk-YGNQJ4YI.js → chunk-5BLJ5ZM6.js} +5 -5
- package/Build/Workers/{chunk-4RG6WOXH.js → chunk-5KWHSZYL.js} +11 -11
- package/Build/Workers/{chunk-BBBTT36L.js → chunk-5O6JWQ4E.js} +14 -14
- package/Build/Workers/{chunk-GX2BWBN2.js → chunk-65MZOUNU.js} +14 -14
- package/Build/Workers/{chunk-K5F23SZO.js → chunk-6D66DPRV.js} +7 -7
- package/Build/Workers/{chunk-2TRB253J.js → chunk-6OFDHMHR.js} +7 -7
- package/Build/Workers/{chunk-U6MTSO6A.js → chunk-76BYYG7N.js} +424 -449
- package/Build/Workers/{chunk-3PV5HQ2R.js → chunk-A5CODJ4M.js} +6 -6
- package/Build/Workers/{chunk-IF2OX6R4.js → chunk-AA4GZKOT.js} +1 -1
- package/Build/Workers/{chunk-OYP23VAL.js → chunk-ACRTCBN5.js} +11 -11
- package/Build/Workers/chunk-B75IEX2S.js +390 -0
- package/Build/Workers/{chunk-EODIOQ35.js → chunk-BAVI3ZS2.js} +1 -1
- package/Build/Workers/{chunk-CFBGPZU6.js → chunk-BBDZYSZB.js} +10 -10
- package/Build/Workers/{chunk-LZFFO4KB.js → chunk-BGE4QVG7.js} +12 -12
- package/Build/Workers/chunk-BY3E4ONI.js +456 -0
- package/Build/Workers/{chunk-RDR4KVPA.js → chunk-C3Z23UUJ.js} +18 -18
- package/Build/Workers/{chunk-I6CW7ZE5.js → chunk-C45MU4GZ.js} +10 -8
- package/Build/Workers/chunk-CF7P7K7E.js +684 -0
- package/Build/Workers/{chunk-KTZK2UDR.js → chunk-D2U4RI64.js} +7 -7
- package/Build/Workers/{chunk-QZIWFSRM.js → chunk-D4K27X2M.js} +4 -4
- package/Build/Workers/{chunk-UYKG3UFK.js → chunk-DKVHRNFY.js} +5 -5
- package/Build/Workers/{chunk-5OK5JFDP.js → chunk-EB7PNZTK.js} +5 -5
- package/Build/Workers/{chunk-7PFZ4Z7C.js → chunk-ELI4BUOT.js} +11 -9
- package/Build/Workers/chunk-F3NDOSTZ.js +963 -0
- package/Build/Workers/{chunk-3VDHTBY5.js → chunk-FDCLACT5.js} +10 -10
- package/Build/Workers/{chunk-BNT2SNWU.js → chunk-FEVVHITK.js} +4 -4
- package/Build/Workers/{chunk-7HLZRYGD.js → chunk-FOZWUH4T.js} +7 -7
- package/Build/Workers/chunk-FQPSOOPH.js +258 -0
- package/Build/Workers/{chunk-A5CSB5ZE.js → chunk-G5V4GPZE.js} +9 -9
- package/Build/Workers/{chunk-TDIGL45B.js → chunk-GNHZH7HP.js} +1 -1
- package/Build/Workers/{chunk-26NE4LRW.js → chunk-GPJR7MPQ.js} +11 -8
- package/Build/Workers/chunk-GWT64LKY.js +171 -0
- package/Build/Workers/{chunk-PUQR43HZ.js → chunk-HGEEOMSC.js} +6 -6
- package/Build/Workers/{chunk-SC3TBKST.js → chunk-I2RC4XVN.js} +4 -4
- package/Build/Workers/chunk-IUROUBPA.js +300 -0
- package/Build/Workers/{chunk-G7IAO7CW.js → chunk-J7MQUQJY.js} +7 -7
- package/Build/Workers/chunk-JNLWLSTP.js +476 -0
- package/Build/Workers/{chunk-TP4FFUAH.js → chunk-JYQNWIQQ.js} +2 -2
- package/Build/Workers/{chunk-RRUO4QEK.js → chunk-KUN2ZA5X.js} +4 -4
- package/Build/Workers/chunk-KV4EQHK4.js +1477 -0
- package/Build/Workers/chunk-LSSWVB2X.js +138 -0
- package/Build/Workers/{chunk-EJZVBTX4.js → chunk-LXQ5QAEJ.js} +6 -6
- package/Build/Workers/chunk-MBZH7YZ7.js +945 -0
- package/Build/Workers/{chunk-WP3LCUOE.js → chunk-MKXWJTFQ.js} +13 -13
- package/Build/Workers/{chunk-AROLUUGS.js → chunk-MMV6TO3P.js} +2 -2
- package/Build/Workers/{chunk-ETC45PHH.js → chunk-MSKXMXJI.js} +4 -4
- package/Build/Workers/chunk-N4QEHO3U.js +75 -0
- package/Build/Workers/chunk-NVOABL76.js +100 -0
- package/Build/Workers/chunk-OAPA2RTG.js +239 -0
- package/Build/Workers/{chunk-PHT53MCH.js → chunk-OE4MCOC7.js} +13 -13
- package/Build/Workers/chunk-OJF4RTJG.js +634 -0
- package/Build/Workers/{chunk-UICVDDCQ.js → chunk-OOK53QUQ.js} +1 -1
- package/Build/Workers/{chunk-W4OS542B.js → chunk-OOMCT7OL.js} +13 -13
- package/Build/Workers/{chunk-YGTWKLFY.js → chunk-OWGTMVDB.js} +19 -19
- package/Build/Workers/{chunk-GUFV24F4.js → chunk-OXALEQPI.js} +61 -17
- package/Build/Workers/chunk-OXSI7N4C.js +768 -0
- package/Build/Workers/{chunk-26XJDV3D.js → chunk-PNFHVBSF.js} +15 -15
- package/Build/Workers/chunk-POSRARY7.js +834 -0
- package/Build/Workers/{chunk-GX5LMUGZ.js → chunk-PYHLO636.js} +42 -13
- package/Build/Workers/chunk-Q55ECN3Y.js +37 -0
- package/Build/Workers/chunk-QD4KM3GO.js +138 -0
- package/Build/Workers/chunk-QMLTCCYG.js +55 -0
- package/Build/Workers/chunk-QX5XS4LC.js +101 -0
- package/Build/Workers/{chunk-UKJCFXVV.js → chunk-QYQIVZBU.js} +6 -6
- package/Build/Workers/chunk-R3TKLC6E.js +1075 -0
- package/Build/Workers/chunk-R4OIEIPE.js +500 -0
- package/Build/Workers/chunk-R4ZEWO4I.js +122 -0
- package/Build/Workers/chunk-R6B7UCQB.js +44 -0
- package/Build/Workers/chunk-RCK55EDX.js +691 -0
- package/Build/Workers/chunk-RHBWXX7C.js +629 -0
- package/Build/Workers/chunk-RZLZWKFN.js +305 -0
- package/Build/Workers/{chunk-DIVFF6DK.js → chunk-S3PI2KFM.js} +2 -2
- package/Build/Workers/chunk-SAPFXU5X.js +102 -0
- package/Build/Workers/chunk-T6LPN7RI.js +2857 -0
- package/Build/Workers/{chunk-U2LSTOMA.js → chunk-T77JILCU.js} +2 -2
- package/Build/Workers/chunk-TBBFDFCS.js +368 -0
- package/Build/Workers/chunk-TF776XCO.js +1258 -0
- package/Build/Workers/chunk-TGY6H6N6.js +163 -0
- package/Build/Workers/{chunk-RTIT7UDN.js → chunk-TO2PVHKI.js} +2 -2
- package/Build/Workers/chunk-UCIPJSZX.js +398 -0
- package/Build/Workers/chunk-UOEUCKKU.js +59 -0
- package/Build/Workers/chunk-VE7BFUIX.js +39 -0
- package/Build/Workers/chunk-VFBNELXB.js +353 -0
- package/Build/Workers/chunk-VRZ46QZ5.js +781 -0
- package/Build/Workers/chunk-VYWUFRRR.js +1052 -0
- package/Build/Workers/chunk-WVSELU6O.js +2716 -0
- package/Build/Workers/chunk-X23FRWHJ.js +117 -0
- package/Build/Workers/chunk-X2ZQ7RJR.js +287 -0
- package/Build/Workers/chunk-X43SJLQL.js +10364 -0
- package/Build/Workers/chunk-XLTOBCDI.js +220 -0
- package/Build/Workers/chunk-XQI7XZHX.js +196 -0
- package/Build/Workers/chunk-XUOJCLOH.js +511 -0
- package/Build/Workers/chunk-XZZNKIEV.js +157 -0
- package/Build/Workers/chunk-YLYBLJ3Y.js +73 -0
- package/Build/Workers/chunk-ZEE2EIFD.js +430 -0
- package/Build/Workers/chunk-ZIKGV7EL.js +58 -0
- package/Build/Workers/chunk-ZU334IDQ.js +421 -0
- 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 +29 -25
- package/Build/Workers/createCircleOutlineGeometry.js +17 -17
- package/Build/Workers/createCoplanarPolygonGeometry.js +32 -32
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +27 -27
- 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 +24 -24
- package/Build/Workers/createPlaneGeometry.js +14 -14
- package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
- package/Build/Workers/createPolygonGeometry.js +32 -32
- package/Build/Workers/createPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createPolylineGeometry.js +24 -24
- package/Build/Workers/createPolylineVolumeGeometry.js +30 -30
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +26 -26
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +19 -19
- package/Build/Workers/createSimplePolylineGeometry.js +22 -22
- 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 +21 -21
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
- package/Build/Workers/createWallGeometry.js +23 -23
- package/Build/Workers/createWallOutlineGeometry.js +22 -22
- package/Build/Workers/decodeDraco.js +11 -11
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/transcodeKTX2.js +8 -11
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
- package/Source/Core/ApproximateTerrainHeights.js +4 -4
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +12 -8
- package/Source/Core/BoundingRectangle.js +2 -0
- package/Source/Core/BoundingSphere.js +4 -2
- package/Source/Core/Cartesian3.js +13 -10
- package/Source/Core/Cartographic.js +11 -8
- package/Source/Core/CesiumTerrainProvider.js +3 -2
- package/Source/Core/CircleGeometry.js +6 -2
- package/Source/Core/CircleOutlineGeometry.js +1 -1
- package/Source/Core/CoplanarPolygonGeometry.js +3 -3
- package/Source/Core/CorridorGeometry.js +4 -4
- package/Source/Core/CorridorOutlineGeometry.js +2 -2
- package/Source/Core/Credit.js +3 -2
- package/Source/Core/CustomHeightmapTerrainProvider.js +17 -3
- package/Source/Core/EllipseGeometry.js +4 -4
- package/Source/Core/EllipseOutlineGeometry.js +2 -2
- package/Source/Core/Ellipsoid.js +34 -0
- package/Source/Core/EllipsoidGeodesic.js +2 -2
- package/Source/Core/EllipsoidRhumbLine.js +4 -4
- package/Source/Core/EllipsoidTangentPlane.js +3 -3
- package/Source/Core/EllipsoidTerrainProvider.js +3 -3
- package/Source/Core/GeographicProjection.js +4 -3
- package/Source/Core/GeographicTilingScheme.js +3 -3
- package/Source/Core/GeometryPipeline.js +2 -2
- package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -1
- package/Source/Core/GoogleMaps.js +1 -1
- package/Source/Core/GroundPolylineGeometry.js +1 -1
- package/Source/Core/HeightmapTessellator.js +2 -2
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/Occluder.js +3 -3
- package/Source/Core/OrientedBoundingBox.js +2 -2
- package/Source/Core/PolygonGeometry.js +4 -4
- package/Source/Core/PolygonGeometryLibrary.js +1 -1
- package/Source/Core/PolygonOutlineGeometry.js +3 -3
- package/Source/Core/PolygonPipeline.js +2 -2
- package/Source/Core/PolylineGeometry.js +2 -2
- package/Source/Core/PolylinePipeline.js +6 -6
- package/Source/Core/PolylineVolumeGeometry.js +2 -2
- package/Source/Core/PolylineVolumeOutlineGeometry.js +2 -2
- package/Source/Core/Rectangle.js +6 -6
- package/Source/Core/RectangleGeometry.js +6 -6
- package/Source/Core/RectangleGeometryLibrary.js +3 -0
- package/Source/Core/RectangleOutlineGeometry.js +2 -2
- package/Source/Core/Simon1994PlanetaryPositions.js +4 -2
- package/Source/Core/SimplePolylineGeometry.js +2 -2
- package/Source/Core/Stereographic.js +2 -2
- package/Source/Core/Transforms.js +154 -19
- package/Source/Core/VRTheWorldTerrainProvider.js +2 -2
- package/Source/Core/WallGeometry.js +3 -3
- package/Source/Core/WallOutlineGeometry.js +3 -3
- package/Source/Core/WebMercatorTilingScheme.js +3 -3
- package/Source/Core/createWorldTerrainAsync.js +2 -0
- package/Source/DataSources/BillboardGraphics.js +16 -0
- package/Source/DataSources/BillboardVisualizer.js +7 -0
- package/Source/DataSources/BoxGeometryUpdater.js +2 -2
- package/Source/DataSources/CylinderGeometryUpdater.js +2 -2
- package/Source/DataSources/CzmlDataSource.js +8 -8
- package/Source/DataSources/EllipsoidGeometryUpdater.js +3 -3
- package/Source/DataSources/EntityCluster.js +1 -1
- package/Source/DataSources/EntityView.js +2 -2
- package/Source/DataSources/KmlDataSource.js +4 -4
- package/Source/DataSources/ModelVisualizer.js +1 -2
- package/Source/DataSources/PathVisualizer.js +4 -4
- package/Source/DataSources/PointGraphics.js +17 -0
- package/Source/DataSources/PointVisualizer.js +12 -0
- package/Source/DataSources/PolygonGeometryUpdater.js +1 -1
- package/Source/DataSources/PolylineGeometryUpdater.js +3 -2
- package/Source/DataSources/PositionProperty.js +4 -7
- package/Source/DataSources/RectangleGeometryUpdater.js +1 -1
- package/Source/DataSources/ScaledPositionProperty.js +2 -2
- package/Source/DataSources/TerrainOffsetProperty.js +3 -7
- package/Source/DataSources/VelocityOrientationProperty.js +2 -2
- package/Source/DataSources/exportKml.js +2 -2
- package/Source/Renderer/AutomaticUniforms.js +1 -1
- package/Source/Renderer/UniformState.js +6 -12
- package/Source/Scene/ArcGisMapServerImageryProvider.js +2 -2
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +35 -6
- package/Source/Scene/BillboardCollection.js +49 -0
- package/Source/Scene/BingMapsImageryProvider.js +11 -2
- package/Source/Scene/Camera.js +16 -10
- package/Source/Scene/Cesium3DTileset.js +1 -1
- package/Source/Scene/ClippingPolygon.js +2 -2
- package/Source/Scene/ClippingPolygonCollection.js +1 -1
- package/Source/Scene/CreditDisplay.js +94 -104
- package/Source/Scene/Globe.js +16 -13
- package/Source/Scene/GltfLoaderUtil.js +2 -4
- package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +1 -1
- package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +1 -1
- package/Source/Scene/GridImageryProvider.js +2 -2
- package/Source/Scene/ImageBasedLighting.js +2 -2
- package/Source/Scene/ImageryLayerCollection.js +2 -2
- package/Source/Scene/MapboxImageryProvider.js +1 -1
- package/Source/Scene/MapboxStyleImageryProvider.js +1 -1
- package/Source/Scene/MetadataSemantic.js +4 -4
- package/Source/Scene/Model/InstancingPipelineStage.js +3 -3
- package/Source/Scene/Model/MaterialPipelineStage.js +49 -0
- package/Source/Scene/Model/Model.js +8 -5
- package/Source/Scene/Model/ModelSceneGraph.js +1 -1
- package/Source/Scene/Model/SceneMode2DPipelineStage.js +3 -3
- package/Source/Scene/Model/pickModel.js +2 -2
- package/Source/Scene/ModelComponents.js +9 -0
- package/Source/Scene/OctahedralProjectedCubeMap.js +5 -6
- package/Source/Scene/Picking.js +4 -13
- package/Source/Scene/PointPrimitive.js +33 -4
- package/Source/Scene/PointPrimitiveCollection.js +22 -9
- package/Source/Scene/Scene.js +39 -31
- package/Source/Scene/SceneTransforms.js +78 -20
- package/Source/Scene/SceneTransitioner.js +2 -2
- package/Source/Scene/ScreenSpaceCameraController.js +29 -19
- package/Source/Scene/SkyBox.js +26 -0
- package/Source/Scene/Sun.js +1 -1
- 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/ellipsoidTextureCoordinates.glsl +10 -0
- package/Source/Shaders/Builtin/Functions/{ellipsoidWgs84TextureCoordinates.js → ellipsoidTextureCoordinates.js} +3 -3
- package/Source/Shaders/Builtin/Functions/pbrLighting.glsl +40 -39
- package/Source/Shaders/Builtin/Functions/pbrLighting.js +40 -39
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.glsl +1 -1
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.js +1 -1
- package/Source/Shaders/Builtin/Structs/materialInput.glsl +1 -1
- package/Source/Shaders/Builtin/Structs/materialInput.js +1 -1
- package/Source/Shaders/Builtin/Structs/modelMaterial.glsl +2 -0
- package/Source/Shaders/Builtin/Structs/modelMaterial.js +2 -0
- package/Source/Shaders/EllipsoidFS.glsl +1 -1
- package/Source/Shaders/EllipsoidFS.js +1 -1
- package/Source/Shaders/GlobeFS.glsl +2 -2
- package/Source/Shaders/GlobeFS.js +2 -2
- package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +23 -23
- package/Source/Shaders/Model/ImageBasedLightingStageFS.js +23 -23
- package/Source/Shaders/Model/LightingStageFS.glsl +6 -5
- package/Source/Shaders/Model/LightingStageFS.js +6 -5
- package/Source/Shaders/Model/MaterialStageFS.glsl +31 -26
- package/Source/Shaders/Model/MaterialStageFS.js +31 -26
- 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/Widget/CesiumWidget.css +0 -5
- package/Source/Widget/CesiumWidget.js +29 -28
- package/index.d.ts +254 -117
- package/index.js +45 -45
- package/package.json +4 -4
- package/Source/Shaders/Builtin/Functions/ellipsoidWgs84TextureCoordinates.glsl +0 -10
package/Source/Scene/Globe.js
CHANGED
|
@@ -28,6 +28,7 @@ import ImageryLayerCollection from "./ImageryLayerCollection.js";
|
|
|
28
28
|
import QuadtreePrimitive from "./QuadtreePrimitive.js";
|
|
29
29
|
import SceneMode from "./SceneMode.js";
|
|
30
30
|
import ShadowMode from "./ShadowMode.js";
|
|
31
|
+
import CesiumMath from "../Core/Math.js";
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* The globe rendered in the scene, including its terrain ({@link Globe#terrainProvider})
|
|
@@ -36,11 +37,11 @@ import ShadowMode from "./ShadowMode.js";
|
|
|
36
37
|
* @alias Globe
|
|
37
38
|
* @constructor
|
|
38
39
|
*
|
|
39
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
40
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] Determines the size and shape of the
|
|
40
41
|
* globe.
|
|
41
42
|
*/
|
|
42
43
|
function Globe(ellipsoid) {
|
|
43
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
44
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
44
45
|
const terrainProvider = new EllipsoidTerrainProvider({
|
|
45
46
|
ellipsoid: ellipsoid,
|
|
46
47
|
});
|
|
@@ -191,9 +192,9 @@ function Globe(ellipsoid) {
|
|
|
191
192
|
* Enable the ground atmosphere, which is drawn over the globe when viewed from a distance between <code>lightingFadeInDistance</code> and <code>lightingFadeOutDistance</code>.
|
|
192
193
|
*
|
|
193
194
|
* @type {boolean}
|
|
194
|
-
* @default true
|
|
195
|
+
* @default true when using the WGS84 ellipsoid, false otherwise
|
|
195
196
|
*/
|
|
196
|
-
this.showGroundAtmosphere =
|
|
197
|
+
this.showGroundAtmosphere = Ellipsoid.WGS84.equals(ellipsoid);
|
|
197
198
|
|
|
198
199
|
/**
|
|
199
200
|
* The intensity of the light that is used for computing the ground atmosphere color.
|
|
@@ -250,18 +251,19 @@ function Globe(ellipsoid) {
|
|
|
250
251
|
* when <code>enableLighting</code> or <code>showGroundAtmosphere</code> is <code>true</code>.
|
|
251
252
|
*
|
|
252
253
|
* @type {number}
|
|
253
|
-
* @default
|
|
254
|
+
* @default 1/2 * pi * ellipsoid.minimumRadius
|
|
254
255
|
*/
|
|
255
|
-
this.lightingFadeOutDistance =
|
|
256
|
+
this.lightingFadeOutDistance =
|
|
257
|
+
CesiumMath.PI_OVER_TWO * ellipsoid.minimumRadius;
|
|
256
258
|
|
|
257
259
|
/**
|
|
258
260
|
* The distance where lighting resumes. This only takes effect
|
|
259
261
|
* when <code>enableLighting</code> or <code>showGroundAtmosphere</code> is <code>true</code>.
|
|
260
262
|
*
|
|
261
263
|
* @type {number}
|
|
262
|
-
* @default
|
|
264
|
+
* @default pi * ellipsoid.minimumRadius
|
|
263
265
|
*/
|
|
264
|
-
this.lightingFadeInDistance =
|
|
266
|
+
this.lightingFadeInDistance = CesiumMath.PI * ellipsoid.minimumRadius;
|
|
265
267
|
|
|
266
268
|
/**
|
|
267
269
|
* The distance where the darkness of night from the ground atmosphere fades out to a lit ground atmosphere.
|
|
@@ -269,9 +271,9 @@ function Globe(ellipsoid) {
|
|
|
269
271
|
* <code>dynamicAtmosphereLighting</code> are <code>true</code>.
|
|
270
272
|
*
|
|
271
273
|
* @type {number}
|
|
272
|
-
* @default
|
|
274
|
+
* @default 1/2 * pi * ellipsoid.minimumRadius
|
|
273
275
|
*/
|
|
274
|
-
this.nightFadeOutDistance =
|
|
276
|
+
this.nightFadeOutDistance = CesiumMath.PI_OVER_TWO * ellipsoid.minimumRadius;
|
|
275
277
|
|
|
276
278
|
/**
|
|
277
279
|
* The distance where the darkness of night from the ground atmosphere fades in to an unlit ground atmosphere.
|
|
@@ -279,9 +281,10 @@ function Globe(ellipsoid) {
|
|
|
279
281
|
* <code>dynamicAtmosphereLighting</code> are <code>true</code>.
|
|
280
282
|
*
|
|
281
283
|
* @type {number}
|
|
282
|
-
* @default
|
|
284
|
+
* @default 5/2 * pi * ellipsoid.minimumRadius
|
|
283
285
|
*/
|
|
284
|
-
this.nightFadeInDistance =
|
|
286
|
+
this.nightFadeInDistance =
|
|
287
|
+
5.0 * CesiumMath.PI_OVER_TWO * ellipsoid.minimumRadius;
|
|
285
288
|
|
|
286
289
|
/**
|
|
287
290
|
* True if an animated wave effect should be shown in areas of the globe
|
|
@@ -809,7 +812,7 @@ Globe.prototype.pick = function (ray, scene, result) {
|
|
|
809
812
|
if (defined(result) && scene.mode !== SceneMode.SCENE3D) {
|
|
810
813
|
result = Cartesian3.fromElements(result.y, result.z, result.x, result);
|
|
811
814
|
const carto = scene.mapProjection.unproject(result, cartoScratch);
|
|
812
|
-
result =
|
|
815
|
+
result = this._ellipsoid.cartographicToCartesian(carto, result);
|
|
813
816
|
}
|
|
814
817
|
|
|
815
818
|
return result;
|
|
@@ -142,10 +142,7 @@ GltfLoaderUtil.createModelTextureReader = function (options) {
|
|
|
142
142
|
let texCoord = defaultValue(textureInfo.texCoord, 0);
|
|
143
143
|
let transform;
|
|
144
144
|
|
|
145
|
-
const textureTransform =
|
|
146
|
-
textureInfo.extensions,
|
|
147
|
-
defaultValue.EMPTY_OBJECT
|
|
148
|
-
).KHR_texture_transform;
|
|
145
|
+
const textureTransform = textureInfo.extensions?.KHR_texture_transform;
|
|
149
146
|
|
|
150
147
|
if (defined(textureTransform)) {
|
|
151
148
|
texCoord = defaultValue(textureTransform.texCoord, texCoord);
|
|
@@ -177,6 +174,7 @@ GltfLoaderUtil.createModelTextureReader = function (options) {
|
|
|
177
174
|
modelTextureReader.index = textureInfo.index;
|
|
178
175
|
modelTextureReader.texture = texture;
|
|
179
176
|
modelTextureReader.texCoord = texCoord;
|
|
177
|
+
modelTextureReader.scale = textureInfo.scale;
|
|
180
178
|
modelTextureReader.transform = transform;
|
|
181
179
|
modelTextureReader.channels = channels;
|
|
182
180
|
|
|
@@ -45,7 +45,7 @@ GoogleEarthEnterpriseDiscardPolicy.prototype.shouldDiscardImage = function (
|
|
|
45
45
|
*
|
|
46
46
|
* Initialization options for the GoogleEarthEnterpriseImageryProvider constructor
|
|
47
47
|
*
|
|
48
|
-
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the
|
|
48
|
+
* @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
|
|
49
49
|
* @property {TileDiscardPolicy} [tileDiscardPolicy] The policy that determines if a tile
|
|
50
50
|
* is invalid and should be discarded. If this value is not specified, a default
|
|
51
51
|
* is to discard tiles that fail to download.
|
|
@@ -41,7 +41,7 @@ import ImageryProvider from "./ImageryProvider.js";
|
|
|
41
41
|
* @property {TileDiscardPolicy} [tileDiscardPolicy] The policy that determines if a tile
|
|
42
42
|
* is invalid and should be discarded. To ensure that no tiles are discarded, construct and pass
|
|
43
43
|
* a {@link NeverTileDiscardPolicy} for this parameter.
|
|
44
|
-
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the
|
|
44
|
+
* @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
47
|
/**
|
|
@@ -14,9 +14,9 @@ const defaultBackgroundColor = new Color(0.0, 0.5, 0.0, 0.2);
|
|
|
14
14
|
* Initialization options for the GridImageryProvider constructor
|
|
15
15
|
*
|
|
16
16
|
* @property {TilingScheme} [tilingScheme=new GeographicTilingScheme()] The tiling scheme for which to draw tiles.
|
|
17
|
-
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
|
|
17
|
+
* @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If the tilingScheme is specified,
|
|
18
18
|
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
|
|
19
|
-
* parameter is specified, the
|
|
19
|
+
* parameter is specified, the default ellipsoid is used.
|
|
20
20
|
* @property {number} [cells=8] The number of grids cells.
|
|
21
21
|
* @property {Color} [color=Color(1.0, 1.0, 1.0, 0.4)] The color to draw grid lines.
|
|
22
22
|
* @property {Color} [glowColor=Color(0.0, 1.0, 0.0, 0.05)] The color to draw glow for grid lines.
|
|
@@ -186,8 +186,8 @@ Object.defineProperties(ImageBasedLighting.prototype, {
|
|
|
186
186
|
* </p>
|
|
187
187
|
*
|
|
188
188
|
* These values can be obtained by preprocessing the environment map using the <code>cmgen</code> tool of
|
|
189
|
-
* {@link https://github.com/google/filament/releases|Google's Filament project}.
|
|
190
|
-
*
|
|
189
|
+
* {@link https://github.com/google/filament/releases|Google's Filament project}.
|
|
190
|
+
* Be sure to use the <code>--no-mirror</code> option in <code>cmgen</code>.
|
|
191
191
|
*
|
|
192
192
|
* @memberof ImageBasedLighting.prototype
|
|
193
193
|
*
|
|
@@ -436,7 +436,7 @@ ImageryLayerCollection.prototype.pickImageryLayers = function (ray, scene) {
|
|
|
436
436
|
return;
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
-
const pickedLocation = scene.
|
|
439
|
+
const pickedLocation = scene.ellipsoid.cartesianToCartographic(
|
|
440
440
|
pickedPosition
|
|
441
441
|
);
|
|
442
442
|
|
|
@@ -491,7 +491,7 @@ ImageryLayerCollection.prototype.pickImageryLayerFeatures = function (
|
|
|
491
491
|
return;
|
|
492
492
|
}
|
|
493
493
|
|
|
494
|
-
const pickedLocation = scene.
|
|
494
|
+
const pickedLocation = scene.ellipsoid.cartesianToCartographic(
|
|
495
495
|
pickedPosition
|
|
496
496
|
);
|
|
497
497
|
|
|
@@ -19,7 +19,7 @@ const defaultCredit = new Credit(
|
|
|
19
19
|
* @property {string} mapId The Mapbox Map ID.
|
|
20
20
|
* @property {string} accessToken The public access token for the imagery.
|
|
21
21
|
* @property {string} [format='png'] The format of the image request.
|
|
22
|
-
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the
|
|
22
|
+
* @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
|
|
23
23
|
* @property {number} [minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
|
|
24
24
|
* this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
|
|
25
25
|
* to result in rendering problems.
|
|
@@ -21,7 +21,7 @@ const defaultCredit = new Credit(
|
|
|
21
21
|
* @property {string} accessToken The public access token for the imagery.
|
|
22
22
|
* @property {number} [tilesize=512] The size of the image tiles.
|
|
23
23
|
* @property {boolean} [scaleFactor] Determines if tiles are rendered at a @2x scale factor.
|
|
24
|
-
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the
|
|
24
|
+
* @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
|
|
25
25
|
* @property {number} [minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
|
|
26
26
|
* this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
|
|
27
27
|
* to result in rendering problems.
|
|
@@ -65,7 +65,7 @@ const MetadataSemantic = {
|
|
|
65
65
|
*/
|
|
66
66
|
TILE_BOUNDING_SPHERE: "TILE_BOUNDING_SPHERE",
|
|
67
67
|
/**
|
|
68
|
-
* The minimum height of a tile above (or below) the
|
|
68
|
+
* The minimum height of a tile above (or below) the ellipsoid, stored as a <code>FLOAT32</code> or a <code>FLOAT64</code>. This semantic is used to tighten bounding regions implicitly calculated in implicit tiling.
|
|
69
69
|
*
|
|
70
70
|
* @type {string}
|
|
71
71
|
* @constant
|
|
@@ -73,7 +73,7 @@ const MetadataSemantic = {
|
|
|
73
73
|
*/
|
|
74
74
|
TILE_MINIMUM_HEIGHT: "TILE_MINIMUM_HEIGHT",
|
|
75
75
|
/**
|
|
76
|
-
* The maximum height of a tile above (or below) the
|
|
76
|
+
* The maximum height of a tile above (or below) the ellipsoid, stored as a <code>FLOAT32</code> or a <code>FLOAT64</code>. This semantic is used to tighten bounding regions implicitly calculated in implicit tiling.
|
|
77
77
|
*
|
|
78
78
|
* @type {string}
|
|
79
79
|
* @constant
|
|
@@ -123,7 +123,7 @@ const MetadataSemantic = {
|
|
|
123
123
|
*/
|
|
124
124
|
CONTENT_BOUNDING_SPHERE: "CONTENT_BOUNDING_SPHERE",
|
|
125
125
|
/**
|
|
126
|
-
* The minimum height of the content of a tile above (or below) the
|
|
126
|
+
* The minimum height of the content of a tile above (or below) the ellipsoid, stored as a <code>FLOAT32</code> or a <code>FLOAT64</code>
|
|
127
127
|
*
|
|
128
128
|
* @type {string}
|
|
129
129
|
* @constant
|
|
@@ -131,7 +131,7 @@ const MetadataSemantic = {
|
|
|
131
131
|
*/
|
|
132
132
|
CONTENT_MINIMUM_HEIGHT: "CONTENT_MINIMUM_HEIGHT",
|
|
133
133
|
/**
|
|
134
|
-
* The maximum height of the content of a tile above (or below) the
|
|
134
|
+
* The maximum height of the content of a tile above (or below) the ellipsoid, stored as a <code>FLOAT32</code> or a <code>FLOAT64</code>
|
|
135
135
|
*
|
|
136
136
|
* @type {string}
|
|
137
137
|
* @constant
|
|
@@ -276,7 +276,7 @@ function projectPositionTo2D(
|
|
|
276
276
|
projectedPositionScratch
|
|
277
277
|
);
|
|
278
278
|
|
|
279
|
-
result = SceneTransforms.
|
|
279
|
+
result = SceneTransforms.computeActualEllipsoidPosition(
|
|
280
280
|
frameState,
|
|
281
281
|
finalPosition,
|
|
282
282
|
result
|
|
@@ -432,7 +432,7 @@ function computeReferencePoint2D(renderResources, frameState) {
|
|
|
432
432
|
scratchProjectedMin
|
|
433
433
|
);
|
|
434
434
|
|
|
435
|
-
const projectedMin = SceneTransforms.
|
|
435
|
+
const projectedMin = SceneTransforms.computeActualEllipsoidPosition(
|
|
436
436
|
frameState,
|
|
437
437
|
transformedPositionMin,
|
|
438
438
|
transformedPositionMin
|
|
@@ -444,7 +444,7 @@ function computeReferencePoint2D(renderResources, frameState) {
|
|
|
444
444
|
scratchProjectedMax
|
|
445
445
|
);
|
|
446
446
|
|
|
447
|
-
const projectedMax = SceneTransforms.
|
|
447
|
+
const projectedMax = SceneTransforms.computeActualEllipsoidPosition(
|
|
448
448
|
frameState,
|
|
449
449
|
transformedPositionMax,
|
|
450
450
|
transformedPositionMax
|
|
@@ -216,6 +216,44 @@ function processTextureTransform(
|
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
+
/**
|
|
220
|
+
* Process a single texture scale and add it to the shader and uniform map.
|
|
221
|
+
*
|
|
222
|
+
* @param {ShaderBuilder} shaderBuilder The shader builder to modify
|
|
223
|
+
* @param {Object<string, Function>} uniformMap The uniform map to modify.
|
|
224
|
+
* @param {ModelComponents.TextureReader} textureReader The texture to add to the shader
|
|
225
|
+
* @param {string} uniformName The name of the sampler uniform such as <code>u_baseColorTexture</code>
|
|
226
|
+
* @param {string} defineName The name of the texture for use in the defines, minus any prefix or suffix. For example, "BASE_COLOR" or "EMISSIVE"
|
|
227
|
+
*
|
|
228
|
+
* @private
|
|
229
|
+
*/
|
|
230
|
+
function processTextureScale(
|
|
231
|
+
shaderBuilder,
|
|
232
|
+
uniformMap,
|
|
233
|
+
textureReader,
|
|
234
|
+
uniformName,
|
|
235
|
+
defineName
|
|
236
|
+
) {
|
|
237
|
+
// Add a define to enable the texture transformation code in the shader.
|
|
238
|
+
const transformDefine = `HAS_${defineName}_TEXTURE_SCALE`;
|
|
239
|
+
shaderBuilder.addDefine(
|
|
240
|
+
transformDefine,
|
|
241
|
+
undefined,
|
|
242
|
+
ShaderDestination.FRAGMENT
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
// Add a uniform for the transformation matrix
|
|
246
|
+
const scaleUniformName = `${uniformName}Scale`;
|
|
247
|
+
shaderBuilder.addUniform(
|
|
248
|
+
"float",
|
|
249
|
+
scaleUniformName,
|
|
250
|
+
ShaderDestination.FRAGMENT
|
|
251
|
+
);
|
|
252
|
+
uniformMap[scaleUniformName] = function () {
|
|
253
|
+
return textureReader.scale;
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
|
|
219
257
|
/**
|
|
220
258
|
* Process a single texture and add it to the shader and uniform map.
|
|
221
259
|
*
|
|
@@ -274,6 +312,17 @@ function processTexture(
|
|
|
274
312
|
defineName
|
|
275
313
|
);
|
|
276
314
|
}
|
|
315
|
+
|
|
316
|
+
const { scale } = textureReader;
|
|
317
|
+
if (defined(scale) && scale !== 1.0) {
|
|
318
|
+
processTextureScale(
|
|
319
|
+
shaderBuilder,
|
|
320
|
+
uniformMap,
|
|
321
|
+
textureReader,
|
|
322
|
+
uniformName,
|
|
323
|
+
defineName
|
|
324
|
+
);
|
|
325
|
+
}
|
|
277
326
|
}
|
|
278
327
|
|
|
279
328
|
function processMaterialUniforms(
|
|
@@ -2123,8 +2123,7 @@ function updateClamping(model) {
|
|
|
2123
2123
|
return;
|
|
2124
2124
|
}
|
|
2125
2125
|
|
|
2126
|
-
const
|
|
2127
|
-
const ellipsoid = defaultValue(globe?.ellipsoid, Ellipsoid.WGS84);
|
|
2126
|
+
const ellipsoid = defaultValue(scene.ellipsoid, Ellipsoid.default);
|
|
2128
2127
|
|
|
2129
2128
|
// Compute cartographic position so we don't recompute every update
|
|
2130
2129
|
const modelMatrix = model.modelMatrix;
|
|
@@ -2206,7 +2205,7 @@ function updateComputedScale(model, modelMatrix, frameState) {
|
|
|
2206
2205
|
Matrix4.getTranslation(modelMatrix, scratchPosition);
|
|
2207
2206
|
|
|
2208
2207
|
if (model._sceneMode !== SceneMode.SCENE3D) {
|
|
2209
|
-
SceneTransforms.
|
|
2208
|
+
SceneTransforms.computeActualEllipsoidPosition(
|
|
2210
2209
|
frameState,
|
|
2211
2210
|
scratchPosition,
|
|
2212
2211
|
scratchPosition
|
|
@@ -2252,7 +2251,7 @@ function updatePickIds(model) {
|
|
|
2252
2251
|
|
|
2253
2252
|
// Matrix3 is a row-major constructor.
|
|
2254
2253
|
// The same constructor in GLSL will produce the transpose of this.
|
|
2255
|
-
const yUpToZUp = new Matrix3(
|
|
2254
|
+
const yUpToZUp = new Matrix3(1, 0, 0, 0, 0, 1, 0, -1, 0);
|
|
2256
2255
|
|
|
2257
2256
|
function updateReferenceMatrices(model, frameState) {
|
|
2258
2257
|
const modelMatrix = defined(model._clampedModelMatrix)
|
|
@@ -2465,7 +2464,11 @@ function passesDistanceDisplayCondition(model, frameState) {
|
|
|
2465
2464
|
|
|
2466
2465
|
// This will project the position if the scene is in Columbus View,
|
|
2467
2466
|
// but leave the position as-is in 3D mode.
|
|
2468
|
-
SceneTransforms.
|
|
2467
|
+
SceneTransforms.computeActualEllipsoidPosition(
|
|
2468
|
+
frameState,
|
|
2469
|
+
position,
|
|
2470
|
+
position
|
|
2471
|
+
);
|
|
2469
2472
|
|
|
2470
2473
|
distanceSquared = Cartesian3.distanceSquared(
|
|
2471
2474
|
position,
|
|
@@ -351,7 +351,7 @@ function computeModelMatrix2D(sceneGraph, frameState) {
|
|
|
351
351
|
);
|
|
352
352
|
} else {
|
|
353
353
|
const center = sceneGraph.boundingSphere.center;
|
|
354
|
-
const to2D = Transforms.
|
|
354
|
+
const to2D = Transforms.ellipsoidTo2DModelMatrix(
|
|
355
355
|
frameState.mapProjection,
|
|
356
356
|
center,
|
|
357
357
|
sceneGraph._computedModelMatrix2D
|
|
@@ -145,7 +145,7 @@ function computeBoundingSphere2D(renderResources, modelMatrix, frameState) {
|
|
|
145
145
|
scratchProjectedMin
|
|
146
146
|
);
|
|
147
147
|
|
|
148
|
-
const projectedMin = SceneTransforms.
|
|
148
|
+
const projectedMin = SceneTransforms.computeActualEllipsoidPosition(
|
|
149
149
|
frameState,
|
|
150
150
|
transformedPositionMin,
|
|
151
151
|
transformedPositionMin
|
|
@@ -157,7 +157,7 @@ function computeBoundingSphere2D(renderResources, modelMatrix, frameState) {
|
|
|
157
157
|
scratchProjectedMax
|
|
158
158
|
);
|
|
159
159
|
|
|
160
|
-
const projectedMax = SceneTransforms.
|
|
160
|
+
const projectedMax = SceneTransforms.computeActualEllipsoidPosition(
|
|
161
161
|
frameState,
|
|
162
162
|
transformedPositionMax,
|
|
163
163
|
transformedPositionMax
|
|
@@ -244,7 +244,7 @@ function createPositionsTypedArrayFor2D(
|
|
|
244
244
|
initialPosition
|
|
245
245
|
);
|
|
246
246
|
|
|
247
|
-
const projectedPosition = SceneTransforms.
|
|
247
|
+
const projectedPosition = SceneTransforms.computeActualEllipsoidPosition(
|
|
248
248
|
frameState,
|
|
249
249
|
transformedPosition,
|
|
250
250
|
transformedPosition
|
|
@@ -35,7 +35,7 @@ const scratchBoundingSphere = new BoundingSphere();
|
|
|
35
35
|
* @param {FrameState} frameState The frame state.
|
|
36
36
|
* @param {number} [verticalExaggeration=1.0] A scalar used to exaggerate the height of a position relative to the ellipsoid. If the value is 1.0 there will be no effect.
|
|
37
37
|
* @param {number} [relativeHeight=0.0] The ellipsoid height relative to which a position is exaggerated. If the value is 0.0 the position will be exaggerated relative to the ellipsoid surface.
|
|
38
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
38
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to which the exaggerated position is relative.
|
|
39
39
|
* @param {Cartesian3|undefined} [result] The intersection or <code>undefined</code> if none was found.
|
|
40
40
|
* @returns {Cartesian3|undefined} The intersection or <code>undefined</code> if none was found.
|
|
41
41
|
*
|
|
@@ -280,7 +280,7 @@ export default function pickModel(
|
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
283
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
284
284
|
verticalExaggeration = defaultValue(verticalExaggeration, 1.0);
|
|
285
285
|
relativeHeight = defaultValue(relativeHeight, 0.0);
|
|
286
286
|
|
|
@@ -1187,6 +1187,15 @@ function TextureReader() {
|
|
|
1187
1187
|
*/
|
|
1188
1188
|
this.transform = Matrix3.clone(Matrix3.IDENTITY);
|
|
1189
1189
|
|
|
1190
|
+
/**
|
|
1191
|
+
* Scale to apply to texture values.
|
|
1192
|
+
*
|
|
1193
|
+
* @type {number}
|
|
1194
|
+
* @default 1.0
|
|
1195
|
+
* @private
|
|
1196
|
+
*/
|
|
1197
|
+
this.scale = 1.0;
|
|
1198
|
+
|
|
1190
1199
|
/**
|
|
1191
1200
|
* The texture channels to read from. When undefined all channels are read.
|
|
1192
1201
|
*
|
|
@@ -337,11 +337,10 @@ OctahedralProjectedCubeMap.prototype.update = function (frameState) {
|
|
|
337
337
|
},
|
|
338
338
|
});
|
|
339
339
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
this.
|
|
343
|
-
const
|
|
344
|
-
const mipTextures = (this._mipTextures = new Array(length));
|
|
340
|
+
const mipLevels = cubeMapBuffers.length;
|
|
341
|
+
this._maximumMipmapLevel = mipLevels - 1;
|
|
342
|
+
const cubeMaps = (this._cubeMaps = new Array(mipLevels));
|
|
343
|
+
const mipTextures = (this._mipTextures = new Array(mipLevels));
|
|
345
344
|
const originalSize = cubeMapBuffers[0].positiveX.width * 2.0;
|
|
346
345
|
const uniformMap = {
|
|
347
346
|
originalSize: function () {
|
|
@@ -350,7 +349,7 @@ OctahedralProjectedCubeMap.prototype.update = function (frameState) {
|
|
|
350
349
|
};
|
|
351
350
|
|
|
352
351
|
// First we project each cubemap onto a flat octahedron, and write that to a texture.
|
|
353
|
-
for (let i = 0; i <
|
|
352
|
+
for (let i = 0; i < mipLevels; ++i) {
|
|
354
353
|
// Swap +Y/-Y faces since the octahedral projection expects this order.
|
|
355
354
|
const positiveY = cubeMapBuffers[i].positiveY;
|
|
356
355
|
cubeMapBuffers[i].positiveY = cubeMapBuffers[i].negativeY;
|
package/Source/Scene/Picking.js
CHANGED
|
@@ -525,7 +525,7 @@ Picking.prototype.pickPositionWorldCoordinates = function (
|
|
|
525
525
|
uniformState.updateFrustum(frustum);
|
|
526
526
|
}
|
|
527
527
|
|
|
528
|
-
result = SceneTransforms.
|
|
528
|
+
result = SceneTransforms.drawingBufferToWorldCoordinates(
|
|
529
529
|
scene,
|
|
530
530
|
drawingBufferPosition,
|
|
531
531
|
depth,
|
|
@@ -1112,10 +1112,7 @@ const scratchSurfaceRay = new Ray();
|
|
|
1112
1112
|
const scratchCartographic = new Cartographic();
|
|
1113
1113
|
|
|
1114
1114
|
function getRayForSampleHeight(scene, cartographic) {
|
|
1115
|
-
const
|
|
1116
|
-
const ellipsoid = defined(globe)
|
|
1117
|
-
? globe.ellipsoid
|
|
1118
|
-
: scene.mapProjection.ellipsoid;
|
|
1115
|
+
const ellipsoid = scene.ellipsoid;
|
|
1119
1116
|
const height = ApproximateTerrainHeights._defaultMaxTerrainHeight;
|
|
1120
1117
|
const surfaceNormal = ellipsoid.geodeticSurfaceNormalCartographic(
|
|
1121
1118
|
cartographic,
|
|
@@ -1136,10 +1133,7 @@ function getRayForSampleHeight(scene, cartographic) {
|
|
|
1136
1133
|
}
|
|
1137
1134
|
|
|
1138
1135
|
function getRayForClampToHeight(scene, cartesian) {
|
|
1139
|
-
const
|
|
1140
|
-
const ellipsoid = defined(globe)
|
|
1141
|
-
? globe.ellipsoid
|
|
1142
|
-
: scene.mapProjection.ellipsoid;
|
|
1136
|
+
const ellipsoid = scene.ellipsoid;
|
|
1143
1137
|
const cartographic = Cartographic.fromCartesian(
|
|
1144
1138
|
cartesian,
|
|
1145
1139
|
ellipsoid,
|
|
@@ -1149,10 +1143,7 @@ function getRayForClampToHeight(scene, cartesian) {
|
|
|
1149
1143
|
}
|
|
1150
1144
|
|
|
1151
1145
|
function getHeightFromCartesian(scene, cartesian) {
|
|
1152
|
-
const
|
|
1153
|
-
const ellipsoid = defined(globe)
|
|
1154
|
-
? globe.ellipsoid
|
|
1155
|
-
: scene.mapProjection.ellipsoid;
|
|
1146
|
+
const ellipsoid = scene.ellipsoid;
|
|
1156
1147
|
const cartographic = Cartographic.fromCartesian(
|
|
1157
1148
|
cartesian,
|
|
1158
1149
|
ellipsoid,
|
|
@@ -11,6 +11,7 @@ import Matrix4 from "../Core/Matrix4.js";
|
|
|
11
11
|
import NearFarScalar from "../Core/NearFarScalar.js";
|
|
12
12
|
import SceneMode from "./SceneMode.js";
|
|
13
13
|
import SceneTransforms from "./SceneTransforms.js";
|
|
14
|
+
import SplitDirection from "./SplitDirection.js";
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* <div class="notice">
|
|
@@ -117,6 +118,11 @@ function PointPrimitive(options, pointPrimitiveCollection) {
|
|
|
117
118
|
this._pointPrimitiveCollection = pointPrimitiveCollection;
|
|
118
119
|
this._dirty = false;
|
|
119
120
|
this._index = -1; //Used only by PointPrimitiveCollection
|
|
121
|
+
|
|
122
|
+
this._splitDirection = defaultValue(
|
|
123
|
+
options.splitDirection,
|
|
124
|
+
SplitDirection.NONE
|
|
125
|
+
);
|
|
120
126
|
}
|
|
121
127
|
|
|
122
128
|
const SHOW_INDEX = (PointPrimitive.SHOW_INDEX = 0);
|
|
@@ -129,7 +135,8 @@ const SCALE_BY_DISTANCE_INDEX = (PointPrimitive.SCALE_BY_DISTANCE_INDEX = 6);
|
|
|
129
135
|
const TRANSLUCENCY_BY_DISTANCE_INDEX = (PointPrimitive.TRANSLUCENCY_BY_DISTANCE_INDEX = 7);
|
|
130
136
|
const DISTANCE_DISPLAY_CONDITION_INDEX = (PointPrimitive.DISTANCE_DISPLAY_CONDITION_INDEX = 8);
|
|
131
137
|
const DISABLE_DEPTH_DISTANCE_INDEX = (PointPrimitive.DISABLE_DEPTH_DISTANCE_INDEX = 9);
|
|
132
|
-
PointPrimitive.
|
|
138
|
+
const SPLIT_DIRECTION_INDEX = (PointPrimitive.SPLIT_DIRECTION_INDEX = 10);
|
|
139
|
+
PointPrimitive.NUMBER_OF_PROPERTIES = 11;
|
|
133
140
|
|
|
134
141
|
function makeDirty(pointPrimitive, propertyChanged) {
|
|
135
142
|
const pointPrimitiveCollection = pointPrimitive._pointPrimitiveCollection;
|
|
@@ -486,6 +493,24 @@ Object.defineProperties(PointPrimitive.prototype, {
|
|
|
486
493
|
}
|
|
487
494
|
},
|
|
488
495
|
},
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* The {@link SplitDirection} to apply to this point.
|
|
499
|
+
* @memberof PointPrimitive.prototype
|
|
500
|
+
* @type {SplitDirection}
|
|
501
|
+
* @default {@link SplitDirection.NONE}
|
|
502
|
+
*/
|
|
503
|
+
splitDirection: {
|
|
504
|
+
get: function () {
|
|
505
|
+
return this._splitDirection;
|
|
506
|
+
},
|
|
507
|
+
set: function (value) {
|
|
508
|
+
if (this._splitDirection !== value) {
|
|
509
|
+
this._splitDirection = value;
|
|
510
|
+
makeDirty(this, SPLIT_DIRECTION_INDEX);
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
},
|
|
489
514
|
});
|
|
490
515
|
|
|
491
516
|
PointPrimitive.prototype.getPickId = function (context) {
|
|
@@ -520,7 +545,10 @@ PointPrimitive._computeActualPosition = function (
|
|
|
520
545
|
}
|
|
521
546
|
|
|
522
547
|
Matrix4.multiplyByPoint(modelMatrix, position, tempCartesian3);
|
|
523
|
-
return SceneTransforms.
|
|
548
|
+
return SceneTransforms.computeActualEllipsoidPosition(
|
|
549
|
+
frameState,
|
|
550
|
+
tempCartesian3
|
|
551
|
+
);
|
|
524
552
|
};
|
|
525
553
|
|
|
526
554
|
const scratchCartesian4 = new Cartesian4();
|
|
@@ -544,7 +572,7 @@ PointPrimitive._computeScreenSpacePosition = function (
|
|
|
544
572
|
),
|
|
545
573
|
scratchCartesian4
|
|
546
574
|
);
|
|
547
|
-
const positionWC = SceneTransforms.
|
|
575
|
+
const positionWC = SceneTransforms.worldToWindowCoordinates(
|
|
548
576
|
scene,
|
|
549
577
|
positionWorld,
|
|
550
578
|
result
|
|
@@ -657,7 +685,8 @@ PointPrimitive.prototype.equals = function (other) {
|
|
|
657
685
|
this._distanceDisplayCondition,
|
|
658
686
|
other._distanceDisplayCondition
|
|
659
687
|
) &&
|
|
660
|
-
this._disableDepthTestDistance === other._disableDepthTestDistance
|
|
688
|
+
this._disableDepthTestDistance === other._disableDepthTestDistance &&
|
|
689
|
+
this._splitDirection === other._splitDirection)
|
|
661
690
|
);
|
|
662
691
|
};
|
|
663
692
|
|