@cesium/engine 1.0.0 → 1.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/{AttributeCompression-4589338a.js → AttributeCompression-b646d393.js} +1 -1
- package/Build/Workers/{AxisAlignedBoundingBox-bfb1234f.js → AxisAlignedBoundingBox-a4321399.js} +1 -1
- package/Build/Workers/{BoundingRectangle-7ffc2153.js → BoundingRectangle-80d8801f.js} +1 -1
- package/Build/Workers/{BoxGeometry-93f344a3.js → BoxGeometry-33c10a4f.js} +1 -1
- package/Build/Workers/{Color-0c5aaf47.js → Color-1bf9a6e0.js} +1 -1
- package/Build/Workers/{CoplanarPolygonGeometryLibrary-6597982a.js → CoplanarPolygonGeometryLibrary-5c5b981b.js} +1 -1
- package/Build/Workers/{CorridorGeometryLibrary-2119580e.js → CorridorGeometryLibrary-7cbae7a0.js} +1 -1
- package/Build/Workers/{CylinderGeometry-f9503c6d.js → CylinderGeometry-42740df0.js} +1 -1
- package/Build/Workers/{EllipseGeometry-fedf72d5.js → EllipseGeometry-49a3ac21.js} +1 -1
- package/Build/Workers/{EllipseGeometryLibrary-4ea68687.js → EllipseGeometryLibrary-b891b2f8.js} +1 -1
- package/Build/Workers/{EllipseOutlineGeometry-e2ae6a35.js → EllipseOutlineGeometry-fbd72e07.js} +1 -1
- package/Build/Workers/{EllipsoidGeodesic-16de63ea.js → EllipsoidGeodesic-98c62a56.js} +1 -1
- package/Build/Workers/{EllipsoidGeometry-95c0330e.js → EllipsoidGeometry-a351dba8.js} +1 -1
- package/Build/Workers/{EllipsoidOutlineGeometry-d6d2ceec.js → EllipsoidOutlineGeometry-3e8779bf.js} +1 -1
- package/Build/Workers/{EllipsoidRhumbLine-ae5e65e0.js → EllipsoidRhumbLine-19756602.js} +1 -1
- package/Build/Workers/{EllipsoidTangentPlane-bfc674bf.js → EllipsoidTangentPlane-cfb50678.js} +1 -1
- package/Build/Workers/{EncodedCartesian3-f473ea18.js → EncodedCartesian3-81f70735.js} +1 -1
- package/Build/Workers/{FrustumGeometry-3bf2e4eb.js → FrustumGeometry-c5754412.js} +1 -1
- package/Build/Workers/{GeometryAttribute-df5f473e.js → GeometryAttribute-0bfd05e8.js} +1 -1
- package/Build/Workers/{GeometryInstance-aa75b4cf.js → GeometryInstance-451dc1cd.js} +1 -1
- package/Build/Workers/{GeometryPipeline-f0e46c42.js → GeometryPipeline-0166905d.js} +1 -1
- package/Build/Workers/{IntersectionTests-9de29d51.js → IntersectionTests-a93d3de9.js} +1 -1
- package/Build/Workers/{Matrix2-ce637455.js → Matrix2-13178034.js} +4 -2
- package/Build/Workers/{Matrix3-4f4df527.js → Matrix3-315394f6.js} +2 -1
- package/Build/Workers/{OrientedBoundingBox-d3ff3d4d.js → OrientedBoundingBox-b450cb61.js} +5 -5
- package/Build/Workers/{Plane-b81241c2.js → Plane-900aa728.js} +1 -1
- package/Build/Workers/{PolygonGeometryLibrary-6f4937bb.js → PolygonGeometryLibrary-f918ac26.js} +1 -1
- package/Build/Workers/PolygonPipeline-f59a8f0a.js +1345 -0
- package/Build/Workers/{PolylinePipeline-2e2b015c.js → PolylinePipeline-d8e6bd9b.js} +1 -1
- package/Build/Workers/{PolylineVolumeGeometryLibrary-7ee1d449.js → PolylineVolumeGeometryLibrary-125d2edf.js} +1 -1
- package/Build/Workers/{PrimitivePipeline-a9b7aae0.js → PrimitivePipeline-0d7b5ed4.js} +1 -1
- package/Build/Workers/{RectangleGeometryLibrary-9aa6c8f6.js → RectangleGeometryLibrary-0768db63.js} +1 -1
- package/Build/Workers/{TerrainEncoding-b52dcfc5.js → TerrainEncoding-06470d7f.js} +1 -1
- package/Build/Workers/{Transforms-2f755df8.js → Transforms-26539bce.js} +97 -83
- package/Build/Workers/{WallGeometryLibrary-ab19a93d.js → WallGeometryLibrary-6167b0fc.js} +1 -1
- package/Build/Workers/{WebMercatorProjection-9f25de49.js → WebMercatorProjection-13a90d41.js} +1 -1
- package/Build/Workers/cesiumWorkerBootstrapper.js +25 -1
- package/Build/Workers/combineGeometry.js +1 -1
- package/Build/Workers/createBoxGeometry.js +1 -1
- package/Build/Workers/createBoxOutlineGeometry.js +1 -1
- package/Build/Workers/createCircleGeometry.js +1 -1
- package/Build/Workers/createCircleOutlineGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createCorridorGeometry.js +1 -1
- package/Build/Workers/createCorridorOutlineGeometry.js +1 -1
- package/Build/Workers/createCylinderGeometry.js +1 -1
- package/Build/Workers/createCylinderOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipseGeometry.js +1 -1
- package/Build/Workers/createEllipseOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipsoidGeometry.js +1 -1
- package/Build/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/Build/Workers/createFrustumGeometry.js +1 -1
- package/Build/Workers/createFrustumOutlineGeometry.js +1 -1
- package/Build/Workers/createGeometry.js +1 -1
- package/Build/Workers/createGroundPolylineGeometry.js +1 -1
- package/Build/Workers/createPlaneGeometry.js +1 -1
- package/Build/Workers/createPlaneOutlineGeometry.js +1 -1
- package/Build/Workers/createPolygonGeometry.js +1 -1
- package/Build/Workers/createPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createPolylineGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/Build/Workers/createRectangleGeometry.js +1 -1
- package/Build/Workers/createRectangleOutlineGeometry.js +1 -1
- package/Build/Workers/createSimplePolylineGeometry.js +1 -1
- package/Build/Workers/createSphereGeometry.js +1 -1
- package/Build/Workers/createSphereOutlineGeometry.js +1 -1
- package/Build/Workers/createVectorTileClampedPolylines.js +1 -1
- package/Build/Workers/createVectorTileGeometries.js +1 -1
- package/Build/Workers/createVectorTilePoints.js +1 -1
- package/Build/Workers/createVectorTilePolygons.js +1 -1
- package/Build/Workers/createVectorTilePolylines.js +1 -1
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/Build/Workers/createVerticesFromHeightmap.js +7 -3
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
- package/Build/Workers/createWallGeometry.js +1 -1
- package/Build/Workers/createWallOutlineGeometry.js +1 -1
- package/Build/Workers/decodeI3S.js +1 -1
- package/Build/Workers/package.js +25 -1
- package/Build/Workers/transferTypedArrayTest.js +25 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/Source/Core/EarthOrientationParameters.js +67 -63
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/Matrix2.js +2 -1
- package/Source/Core/Matrix3.js +2 -1
- package/Source/Core/Matrix4.js +1 -0
- package/Source/Core/OrientedBoundingBox.js +4 -4
- package/Source/Core/S2Cell.js +3 -3
- package/Source/Core/Transforms.js +3 -7
- package/Source/DataSources/GpxDataSource.js +4 -6
- package/Source/DataSources/KmlDataSource.js +3 -5
- package/Source/Renderer/Context.js +27 -9
- package/Source/Renderer/Pass.js +3 -2
- package/Source/Scene/Cesium3DTileContentType.js +19 -0
- package/Source/Scene/Cesium3DTilesVoxelProvider.js +482 -0
- package/Source/Scene/Cesium3DTilesetMetadata.js +2 -2
- package/Source/Scene/ContentMetadata.js +2 -2
- package/Source/Scene/DerivedCommand.js +7 -0
- package/Source/Scene/Expression.js +1 -1
- package/Source/Scene/Globe.js +10 -0
- package/Source/Scene/GlobeSurfaceTileProvider.js +7 -0
- package/Source/Scene/GltfImageLoader.js +1 -1
- package/Source/Scene/GltfVertexBufferLoader.js +10 -2
- package/Source/Scene/GroupMetadata.js +2 -2
- package/Source/Scene/ImplicitMetadataView.js +2 -2
- package/Source/Scene/ImplicitSubtreeCache.js +127 -0
- package/Source/Scene/ImplicitSubtreeMetadata.js +2 -2
- package/Source/Scene/ImplicitTileset.js +3 -2
- package/Source/Scene/KeyframeNode.js +47 -0
- package/Source/Scene/Megatexture.js +490 -0
- package/Source/Scene/MetadataClass.js +60 -25
- package/Source/Scene/MetadataClassProperty.js +132 -68
- package/Source/Scene/MetadataComponentType.js +78 -57
- package/Source/Scene/MetadataEnum.js +59 -23
- package/Source/Scene/MetadataEnumValue.js +49 -15
- package/Source/Scene/MetadataSchema.js +53 -24
- package/Source/Scene/MetadataSchemaLoader.js +2 -2
- package/Source/Scene/MetadataTableProperty.js +2 -2
- package/Source/Scene/MetadataType.js +6 -14
- package/Source/Scene/Model/GeoJsonLoader.js +1 -1
- package/Source/Scene/Model/Model.js +2 -3
- package/Source/Scene/Model/buildDrawCommand.js +19 -11
- package/Source/Scene/PointCloud.js +1 -1
- package/Source/Scene/PropertyAttribute.js +2 -2
- package/Source/Scene/PropertyAttributeProperty.js +2 -2
- package/Source/Scene/PropertyTable.js +2 -2
- package/Source/Scene/PropertyTexture.js +2 -2
- package/Source/Scene/PropertyTextureProperty.js +2 -2
- package/Source/Scene/ResourceCache.js +9 -1
- package/Source/Scene/ResourceCacheKey.js +9 -1
- package/Source/Scene/Scene.js +17 -0
- package/Source/Scene/SpatialNode.js +375 -0
- package/Source/Scene/StructuralMetadata.js +2 -2
- package/Source/Scene/TileMetadata.js +2 -2
- package/Source/Scene/TilesetMetadata.js +2 -2
- package/Source/Scene/VoxelBoxShape.js +527 -0
- package/Source/Scene/VoxelContent.js +169 -0
- package/Source/Scene/VoxelCylinderShape.js +937 -0
- package/Source/Scene/VoxelEllipsoidShape.js +937 -0
- package/Source/Scene/VoxelPrimitive.js +1919 -0
- package/Source/Scene/VoxelProvider.js +255 -0
- package/Source/Scene/VoxelRenderResources.js +224 -0
- package/Source/Scene/VoxelShape.js +152 -0
- package/Source/Scene/VoxelShapeType.js +105 -0
- package/Source/Scene/VoxelTraversal.js +1144 -0
- package/Source/Scene/buildVoxelDrawCommands.js +116 -0
- package/Source/Scene/parseBatchTable.js +18 -2
- package/Source/Scene/preprocess3DTileContent.js +8 -0
- package/Source/Scene/processVoxelProperties.js +455 -0
- package/Source/Shaders/BillboardCollectionVS.glsl +1 -1
- package/Source/Shaders/BillboardCollectionVS.js +1 -1
- package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.glsl +9 -0
- package/Source/Shaders/Builtin/Constants/passVoxels.js +11 -0
- package/Source/Shaders/Builtin/CzmBuiltins.js +17 -15
- package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.glsl +55 -43
- package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.js +55 -43
- package/Source/Shaders/GlobeFS.glsl +2 -1
- package/Source/Shaders/GlobeFS.js +2 -1
- package/Source/Shaders/PointPrimitiveCollectionVS.glsl +5 -2
- package/Source/Shaders/PointPrimitiveCollectionVS.js +5 -2
- package/Source/Shaders/Voxels/IntersectBox.glsl +79 -0
- package/Source/Shaders/Voxels/IntersectBox.js +81 -0
- package/Source/Shaders/Voxels/IntersectClippingPlanes.glsl +70 -0
- package/Source/Shaders/Voxels/IntersectClippingPlanes.js +72 -0
- package/Source/Shaders/Voxels/IntersectCylinder.glsl +273 -0
- package/Source/Shaders/Voxels/IntersectCylinder.js +275 -0
- package/Source/Shaders/Voxels/IntersectDepth.glsl +23 -0
- package/Source/Shaders/Voxels/IntersectDepth.js +25 -0
- package/Source/Shaders/Voxels/IntersectEllipsoid.glsl +337 -0
- package/Source/Shaders/Voxels/IntersectEllipsoid.js +339 -0
- package/Source/Shaders/Voxels/Intersection.glsl +54 -0
- package/Source/Shaders/Voxels/Intersection.js +56 -0
- package/Source/Shaders/Voxels/IntersectionUtils.glsl +151 -0
- package/Source/Shaders/Voxels/IntersectionUtils.js +153 -0
- package/Source/Shaders/Voxels/Megatexture.glsl +136 -0
- package/Source/Shaders/Voxels/Megatexture.js +138 -0
- package/Source/Shaders/Voxels/Octree.glsl +221 -0
- package/Source/Shaders/Voxels/Octree.js +223 -0
- package/Source/Shaders/Voxels/VoxelFS.glsl +150 -0
- package/Source/Shaders/Voxels/VoxelFS.js +152 -0
- package/Source/Shaders/Voxels/VoxelVS.glsl +11 -0
- package/Source/Shaders/Voxels/VoxelVS.js +13 -0
- package/Source/Shaders/Voxels/convertUvToBox.glsl +16 -0
- package/Source/Shaders/Voxels/convertUvToBox.js +18 -0
- package/Source/Shaders/Voxels/convertUvToCylinder.glsl +79 -0
- package/Source/Shaders/Voxels/convertUvToCylinder.js +81 -0
- package/Source/Shaders/Voxels/convertUvToEllipsoid.glsl +133 -0
- package/Source/Shaders/Voxels/convertUvToEllipsoid.js +135 -0
- package/Source/ThirdParty/Workers/z-worker-pako.js +0 -0
- package/index.d.ts +3124 -2287
- package/index.js +1117 -1085
- package/package.json +3 -4
- package/Build/Workers/PolygonPipeline-774a8aaf.js +0 -1341
package/Source/Core/Matrix2.js
CHANGED
|
@@ -613,6 +613,7 @@ const scaleScratch4 = new Cartesian2();
|
|
|
613
613
|
*
|
|
614
614
|
* @param {Matrix2} matrix The matrix.
|
|
615
615
|
* @param {Matrix2} rotation The rotation matrix.
|
|
616
|
+
* @param {Matrix2} result The object onto which to store the result.
|
|
616
617
|
* @returns {Matrix2} The modified result parameter.
|
|
617
618
|
*
|
|
618
619
|
* @see Matrix2.fromRotation
|
|
@@ -782,7 +783,7 @@ Matrix2.multiplyByScalar = function (matrix, scalar, result) {
|
|
|
782
783
|
* Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.
|
|
783
784
|
*
|
|
784
785
|
* @param {Matrix2} matrix The matrix on the left-hand side.
|
|
785
|
-
* @param {
|
|
786
|
+
* @param {Cartesian2} scale The non-uniform scale on the right-hand side.
|
|
786
787
|
* @param {Matrix2} result The object onto which to store the result.
|
|
787
788
|
* @returns {Matrix2} The modified result parameter.
|
|
788
789
|
*
|
package/Source/Core/Matrix3.js
CHANGED
|
@@ -974,6 +974,7 @@ const scaleScratch4 = new Cartesian3();
|
|
|
974
974
|
*
|
|
975
975
|
* @param {Matrix3} matrix The matrix.
|
|
976
976
|
* @param {Matrix3} rotation The rotation matrix.
|
|
977
|
+
* @param {Matrix3} result The object onto which to store the result.
|
|
977
978
|
* @returns {Matrix3} The modified result parameter.
|
|
978
979
|
*
|
|
979
980
|
* @see Matrix3.getRotation
|
|
@@ -1193,7 +1194,7 @@ Matrix3.multiplyByScalar = function (matrix, scalar, result) {
|
|
|
1193
1194
|
* Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.
|
|
1194
1195
|
*
|
|
1195
1196
|
* @param {Matrix3} matrix The matrix on the left-hand side.
|
|
1196
|
-
* @param {
|
|
1197
|
+
* @param {Cartesian3} scale The non-uniform scale on the right-hand side.
|
|
1197
1198
|
* @param {Matrix3} result The object onto which to store the result.
|
|
1198
1199
|
* @returns {Matrix3} The modified result parameter.
|
|
1199
1200
|
*
|
package/Source/Core/Matrix4.js
CHANGED
|
@@ -1633,6 +1633,7 @@ const scaleScratch4 = new Cartesian3();
|
|
|
1633
1633
|
*
|
|
1634
1634
|
* @param {Matrix4} matrix The matrix.
|
|
1635
1635
|
* @param {Matrix3} rotation The rotation matrix.
|
|
1636
|
+
* @param {Matrix4} result The object onto which to store the result.
|
|
1636
1637
|
* @returns {Matrix4} The modified result parameter.
|
|
1637
1638
|
*
|
|
1638
1639
|
* @see Matrix4.fromRotation
|
|
@@ -18,13 +18,13 @@ import Rectangle from "./Rectangle.js";
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Creates an instance of an OrientedBoundingBox.
|
|
21
|
-
* An OrientedBoundingBox of some object is a closed and convex cuboid. It can provide a tighter bounding volume than {@link BoundingSphere} or {@link AxisAlignedBoundingBox} in many cases.
|
|
21
|
+
* An OrientedBoundingBox of some object is a closed and convex rectangular cuboid. It can provide a tighter bounding volume than {@link BoundingSphere} or {@link AxisAlignedBoundingBox} in many cases.
|
|
22
22
|
* @alias OrientedBoundingBox
|
|
23
23
|
* @constructor
|
|
24
24
|
*
|
|
25
25
|
* @param {Cartesian3} [center=Cartesian3.ZERO] The center of the box.
|
|
26
26
|
* @param {Matrix3} [halfAxes=Matrix3.ZERO] The three orthogonal half-axes of the bounding box.
|
|
27
|
-
* Equivalently, the transformation matrix, to rotate and scale a
|
|
27
|
+
* Equivalently, the transformation matrix, to rotate and scale a 1x1x1
|
|
28
28
|
* cube centered at the origin.
|
|
29
29
|
*
|
|
30
30
|
*
|
|
@@ -334,7 +334,7 @@ const scratchPlane = new Plane(Cartesian3.UNIT_X, 0.0);
|
|
|
334
334
|
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
|
|
335
335
|
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if none was provided.
|
|
336
336
|
*
|
|
337
|
-
* @exception {DeveloperError} rectangle.width must be between 0 and pi.
|
|
337
|
+
* @exception {DeveloperError} rectangle.width must be between 0 and 2 * pi.
|
|
338
338
|
* @exception {DeveloperError} rectangle.height must be between 0 and pi.
|
|
339
339
|
* @exception {DeveloperError} ellipsoid must be an ellipsoid of revolution (<code>radii.x == radii.y</code>)
|
|
340
340
|
*/
|
|
@@ -350,7 +350,7 @@ OrientedBoundingBox.fromRectangle = function (
|
|
|
350
350
|
throw new DeveloperError("rectangle is required");
|
|
351
351
|
}
|
|
352
352
|
if (rectangle.width < 0.0 || rectangle.width > CesiumMath.TWO_PI) {
|
|
353
|
-
throw new DeveloperError("Rectangle width must be between 0 and 2*pi");
|
|
353
|
+
throw new DeveloperError("Rectangle width must be between 0 and 2 * pi");
|
|
354
354
|
}
|
|
355
355
|
if (rectangle.height < 0.0 || rectangle.height > CesiumMath.PI) {
|
|
356
356
|
throw new DeveloperError("Rectangle height must be between 0 and pi");
|
package/Source/Core/S2Cell.js
CHANGED
|
@@ -264,7 +264,7 @@ S2Cell.getIdFromToken = function (token) {
|
|
|
264
264
|
* Converts a 64-bit S2 cell ID to an S2 cell token.
|
|
265
265
|
*
|
|
266
266
|
* @param {BigInt} [cellId] The S2 cell ID.
|
|
267
|
-
* @returns {
|
|
267
|
+
* @returns {string} Returns hexadecimal representation of an S2CellId.
|
|
268
268
|
* @private
|
|
269
269
|
*/
|
|
270
270
|
S2Cell.getTokenFromId = function (cellId) {
|
|
@@ -378,7 +378,7 @@ S2Cell.prototype.getParentAtLevel = function (level) {
|
|
|
378
378
|
* Get center of the S2 cell.
|
|
379
379
|
*
|
|
380
380
|
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid.
|
|
381
|
-
* @returns {
|
|
381
|
+
* @returns {Cartesian3} The position of center of the S2 cell.
|
|
382
382
|
* @private
|
|
383
383
|
*/
|
|
384
384
|
S2Cell.prototype.getCenter = function (ellipsoid) {
|
|
@@ -400,7 +400,7 @@ S2Cell.prototype.getCenter = function (ellipsoid) {
|
|
|
400
400
|
*
|
|
401
401
|
* @param {Number} index An integer index of the vertex. Must be in the range [0-3].
|
|
402
402
|
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid.
|
|
403
|
-
* @returns {
|
|
403
|
+
* @returns {Cartesian3} The position of the vertex of the S2 cell.
|
|
404
404
|
* @private
|
|
405
405
|
*/
|
|
406
406
|
S2Cell.prototype.getVertex = function (index, ellipsoid) {
|
|
@@ -659,9 +659,8 @@ const j2000ttDays = 2451545.0;
|
|
|
659
659
|
*
|
|
660
660
|
* @example
|
|
661
661
|
* const interval = new Cesium.TimeInterval(...);
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
* });
|
|
662
|
+
* await Cesium.Transforms.preloadIcrfFixed(interval));
|
|
663
|
+
* // the data is now loaded
|
|
665
664
|
*
|
|
666
665
|
* @see Transforms.computeIcrfToFixedMatrix
|
|
667
666
|
* @see Transforms.computeFixedToIcrfMatrix
|
|
@@ -672,15 +671,12 @@ Transforms.preloadIcrfFixed = function (timeInterval) {
|
|
|
672
671
|
const stopDayTT = timeInterval.stop.dayNumber;
|
|
673
672
|
const stopSecondTT = timeInterval.stop.secondsOfDay + ttMinusTai;
|
|
674
673
|
|
|
675
|
-
|
|
674
|
+
return Transforms.iau2006XysData.preload(
|
|
676
675
|
startDayTT,
|
|
677
676
|
startSecondTT,
|
|
678
677
|
stopDayTT,
|
|
679
678
|
stopSecondTT
|
|
680
679
|
);
|
|
681
|
-
const eopPromise = Transforms.earthOrientationParameters.getPromiseToLoad();
|
|
682
|
-
|
|
683
|
-
return Promise.all([xysPromise, eopPromise]);
|
|
684
680
|
};
|
|
685
681
|
|
|
686
682
|
/**
|
|
@@ -41,11 +41,9 @@ const autolinker = new Autolinker({
|
|
|
41
41
|
stripPrefix: false,
|
|
42
42
|
email: false,
|
|
43
43
|
replaceFn: function (linker, match) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
44
|
+
//Prevent matching of non-explicit urls.
|
|
45
|
+
//i.e. foo.id won't match but http://foo.id will
|
|
46
|
+
return match.urlMatchType === "scheme" || match.urlMatchType === "www";
|
|
49
47
|
},
|
|
50
48
|
});
|
|
51
49
|
|
|
@@ -754,7 +752,7 @@ function GpxDataSource() {
|
|
|
754
752
|
this._error = new Event();
|
|
755
753
|
this._loading = new Event();
|
|
756
754
|
this._clock = undefined;
|
|
757
|
-
this._entityCollection = new EntityCollection();
|
|
755
|
+
this._entityCollection = new EntityCollection(this);
|
|
758
756
|
this._entityCluster = new EntityCluster();
|
|
759
757
|
this._name = undefined;
|
|
760
758
|
this._version = undefined;
|
|
@@ -143,11 +143,9 @@ const autolinker = new Autolinker({
|
|
|
143
143
|
stripPrefix: false,
|
|
144
144
|
email: false,
|
|
145
145
|
replaceFn: function (match) {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
return false;
|
|
150
|
-
}
|
|
146
|
+
//Prevent matching of non-explicit urls.
|
|
147
|
+
//i.e. foo.id won't match but http://foo.id will
|
|
148
|
+
return match.urlMatchType === "scheme" || match.urlMatchType === "www";
|
|
151
149
|
},
|
|
152
150
|
});
|
|
153
151
|
|
|
@@ -4,6 +4,7 @@ import ComponentDatatype from "../Core/ComponentDatatype.js";
|
|
|
4
4
|
import createGuid from "../Core/createGuid.js";
|
|
5
5
|
import defaultValue from "../Core/defaultValue.js";
|
|
6
6
|
import defined from "../Core/defined.js";
|
|
7
|
+
import deprecationWarning from "../Core/deprecationWarning.js";
|
|
7
8
|
import destroyObject from "../Core/destroyObject.js";
|
|
8
9
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
9
10
|
import Geometry from "../Core/Geometry.js";
|
|
@@ -42,9 +43,18 @@ function Context(canvas, options) {
|
|
|
42
43
|
Check.defined("canvas", canvas);
|
|
43
44
|
//>>includeEnd('debug');
|
|
44
45
|
|
|
46
|
+
let requestWebgl2 = false;
|
|
47
|
+
if (defined(options) && defined(options.requestWebgl2)) {
|
|
48
|
+
requestWebgl2 = options.requestWebgl2;
|
|
49
|
+
Context._deprecationWarning(
|
|
50
|
+
"ContextOptions.requestWebgl2",
|
|
51
|
+
"Cesium.requestWebgl2 was deprecated in CesiumJS 1.101 and will be removed in 1.102. Use Cesium.requestWebgl1 to request a WebGL1 or WebGL2 context."
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
45
55
|
const {
|
|
46
56
|
getWebGLStub,
|
|
47
|
-
|
|
57
|
+
requestWebgl1 = !requestWebgl2,
|
|
48
58
|
webgl: webglOptions = {},
|
|
49
59
|
allowTextureFilterAnisotropic = true,
|
|
50
60
|
} = defaultValue(options, {});
|
|
@@ -59,7 +69,7 @@ function Context(canvas, options) {
|
|
|
59
69
|
|
|
60
70
|
const glContext = defined(getWebGLStub)
|
|
61
71
|
? getWebGLStub(canvas, webglOptions)
|
|
62
|
-
: getWebGLContext(canvas, webglOptions,
|
|
72
|
+
: getWebGLContext(canvas, webglOptions, requestWebgl1);
|
|
63
73
|
|
|
64
74
|
// Get context type. instanceof will throw if WebGL2 is not supported
|
|
65
75
|
const webgl2 =
|
|
@@ -367,7 +377,7 @@ function Context(canvas, options) {
|
|
|
367
377
|
*/
|
|
368
378
|
this.options = {
|
|
369
379
|
getWebGLStub: getWebGLStub,
|
|
370
|
-
|
|
380
|
+
requestWebgl1: requestWebgl1,
|
|
371
381
|
webgl: webglOptions,
|
|
372
382
|
allowTextureFilterAnisotropic: allowTextureFilterAnisotropic,
|
|
373
383
|
};
|
|
@@ -397,7 +407,7 @@ function Context(canvas, options) {
|
|
|
397
407
|
* especially for horizon views.
|
|
398
408
|
* </p>
|
|
399
409
|
*
|
|
400
|
-
* @property {Boolean} [
|
|
410
|
+
* @property {Boolean} [requestWebgl1 = true] If true and the browser supports it, use a WebGL 1 rendering context
|
|
401
411
|
* @property {Boolean} [allowTextureFilterAnisotropic=true] If true, use anisotropic filtering during texture sampling
|
|
402
412
|
* @property {WebGLOptions} [webgl] WebGL options to be passed on to canvas.getContext
|
|
403
413
|
* @property {Function} [getWebGLStub] A function to create a WebGL stub for testing
|
|
@@ -407,19 +417,23 @@ function Context(canvas, options) {
|
|
|
407
417
|
* @private
|
|
408
418
|
* @param {HTMLCanvasElement} canvas The canvas element to which the context will be associated
|
|
409
419
|
* @param {WebGLOptions} webglOptions WebGL options to be passed on to HTMLCanvasElement.getContext()
|
|
410
|
-
* @param {Boolean}
|
|
420
|
+
* @param {Boolean} requestWebgl1 Whether to request a WebGLRenderingContext or a WebGL2RenderingContext.
|
|
411
421
|
* @returns {WebGLRenderingContext|WebGL2RenderingContext}
|
|
412
422
|
*/
|
|
413
|
-
function getWebGLContext(canvas, webglOptions,
|
|
423
|
+
function getWebGLContext(canvas, webglOptions, requestWebgl1) {
|
|
414
424
|
if (typeof WebGLRenderingContext === "undefined") {
|
|
415
425
|
throw new RuntimeError(
|
|
416
426
|
"The browser does not support WebGL. Visit http://get.webgl.org."
|
|
417
427
|
);
|
|
418
428
|
}
|
|
419
429
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
430
|
+
// Ensure that WebGL 2 is supported when it is requested. Otherwise, fall back to WebGL 1.
|
|
431
|
+
const webgl2Supported = typeof WebGL2RenderingContext !== "undefined";
|
|
432
|
+
if (!requestWebgl1 && !webgl2Supported) {
|
|
433
|
+
requestWebgl1 = true;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
const contextType = requestWebgl1 ? "webgl" : "webgl2";
|
|
423
437
|
const glContext = canvas.getContext(contextType, webglOptions);
|
|
424
438
|
|
|
425
439
|
if (!defined(glContext)) {
|
|
@@ -1633,4 +1647,8 @@ Context.prototype.destroy = function () {
|
|
|
1633
1647
|
|
|
1634
1648
|
return destroyObject(this);
|
|
1635
1649
|
};
|
|
1650
|
+
|
|
1651
|
+
// Used for specs.
|
|
1652
|
+
Context._deprecationWarning = deprecationWarning;
|
|
1653
|
+
|
|
1636
1654
|
export default Context;
|
package/Source/Renderer/Pass.js
CHANGED
|
@@ -132,6 +132,24 @@ const Cesium3DTileContentType = {
|
|
|
132
132
|
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
|
|
133
133
|
*/
|
|
134
134
|
GEOJSON: "geoJson",
|
|
135
|
+
/**
|
|
136
|
+
* Binary voxel content for <code>3DTILES_content_voxels</code> extension.
|
|
137
|
+
*
|
|
138
|
+
* @type {String}
|
|
139
|
+
* @constant
|
|
140
|
+
* @private
|
|
141
|
+
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
|
|
142
|
+
*/
|
|
143
|
+
VOXEL_BINARY: "voxl",
|
|
144
|
+
/**
|
|
145
|
+
* Binary voxel content for <code>3DTILES_content_voxels</code> extension.
|
|
146
|
+
*
|
|
147
|
+
* @type {String}
|
|
148
|
+
* @constant
|
|
149
|
+
* @private
|
|
150
|
+
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
|
|
151
|
+
*/
|
|
152
|
+
VOXEL_JSON: "voxelJson",
|
|
135
153
|
};
|
|
136
154
|
|
|
137
155
|
/**
|
|
@@ -150,6 +168,7 @@ Cesium3DTileContentType.isBinaryFormat = function (contentType) {
|
|
|
150
168
|
case Cesium3DTileContentType.VECTOR:
|
|
151
169
|
case Cesium3DTileContentType.GEOMETRY:
|
|
152
170
|
case Cesium3DTileContentType.IMPLICIT_SUBTREE:
|
|
171
|
+
case Cesium3DTileContentType.VOXEL_BINARY:
|
|
153
172
|
case Cesium3DTileContentType.GLTF_BINARY:
|
|
154
173
|
return true;
|
|
155
174
|
default:
|