@cesium/engine 7.0.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/Workers/{chunk-MY3VNFGQ.js → chunk-23UFSGND.js} +7 -7
- package/Build/Workers/{chunk-IQBYFRVW.js → chunk-2A75IWRS.js} +7 -7
- package/Build/Workers/{chunk-VRGFV2UO.js → chunk-2FRVPMCS.js} +10 -10
- package/Build/Workers/{chunk-46UD5ABS.js → chunk-2FWRMUTY.js} +4 -4
- package/Build/Workers/{chunk-DTAIXKTO.js → chunk-2UPKWTMJ.js} +6 -6
- package/Build/Workers/{chunk-6VJVYK2V.js → chunk-34FXV7D7.js} +2 -2
- package/Build/Workers/{chunk-ODW7WYM4.js → chunk-3VAZEH7M.js} +2 -2
- package/Build/Workers/{chunk-U2VCRRQW.js → chunk-4DO5W5XZ.js} +6 -6
- package/Build/Workers/{chunk-VK3EJHWI.js → chunk-4H7PY4U5.js} +2 -2
- package/Build/Workers/{chunk-RV7ZYPFT.js → chunk-5QULIR53.js} +4 -4
- package/Build/Workers/{chunk-JY5YEZFA.js → chunk-7TC63SJW.js} +8 -8
- package/Build/Workers/{chunk-JJ4VBOQ3.js → chunk-7ZFGPDJA.js} +4 -4
- package/Build/Workers/{chunk-FP6GYBFX.js → chunk-A5DWLWCY.js} +10 -10
- package/Build/Workers/{chunk-5M3U6ZMA.js → chunk-BBWDMCVU.js} +1 -1
- package/Build/Workers/{chunk-WZU2YLWG.js → chunk-BG4UCVXN.js} +3 -3
- package/Build/Workers/{chunk-5WQ523AW.js → chunk-BIKA3NRA.js} +5 -5
- package/Build/Workers/{chunk-PTQQUQC3.js → chunk-BROJAZRZ.js} +13 -13
- package/Build/Workers/{chunk-YUCVWAY6.js → chunk-DDUQAJ4P.js} +7 -7
- package/Build/Workers/{chunk-2HJWSU7B.js → chunk-EERJKOAF.js} +4 -4
- package/Build/Workers/{chunk-LZGHD6NY.js → chunk-EG6PTBY2.js} +15 -15
- package/Build/Workers/{chunk-IX2JCCNM.js → chunk-EHWHNOEX.js} +1 -1
- package/Build/Workers/{chunk-NKPBIX7F.js → chunk-F3YA3Y2Z.js} +1 -1
- package/Build/Workers/{chunk-L2ZN645J.js → chunk-F4HFJMGM.js} +6 -6
- package/Build/Workers/{chunk-F6SE42BK.js → chunk-FJKNFAKQ.js} +15 -472
- package/Build/Workers/{chunk-PNBGBETF.js → chunk-FNIRWHJB.js} +10 -10
- package/Build/Workers/{chunk-RAEV7K66.js → chunk-FZRIVR7Y.js} +5 -5
- package/Build/Workers/{chunk-AIPU2VSX.js → chunk-G43QFN4Q.js} +6 -6
- package/Build/Workers/{chunk-ZUA2UUNV.js → chunk-GATZHF3K.js} +2 -2
- package/Build/Workers/{chunk-ZK5JOS3D.js → chunk-GRC2ZTAF.js} +14 -14
- package/Build/Workers/{chunk-5YLJ77FF.js → chunk-HU6N6EXB.js} +10 -10
- package/Build/Workers/{chunk-4EBHOMFX.js → chunk-I46ZRR5W.js} +17 -17
- package/Build/Workers/{chunk-LZ7JIV3K.js → chunk-JURN7NPV.js} +17 -17
- package/Build/Workers/{chunk-JCNXK6EL.js → chunk-KKCR2YOP.js} +11 -11
- package/Build/Workers/{chunk-S6SKF6DT.js → chunk-LPR3YNP2.js} +5 -5
- package/Build/Workers/{chunk-UDO6BFSF.js → chunk-M7ERACJJ.js} +13 -13
- package/Build/Workers/{chunk-BZP4T2JJ.js → chunk-MDWEGWPA.js} +10 -10
- package/Build/Workers/{chunk-72SANQJV.js → chunk-OGXZVPPM.js} +9 -5
- package/Build/Workers/{chunk-AR5DNBJ4.js → chunk-PGSJK77E.js} +6 -6
- package/Build/Workers/{chunk-GEJTYLCO.js → chunk-PPH7OFP3.js} +5 -5
- package/Build/Workers/{chunk-OVLG3FRS.js → chunk-SH5USDPI.js} +6 -6
- package/Build/Workers/{chunk-6HZQPRUS.js → chunk-SOWMRMWA.js} +1 -1
- package/Build/Workers/{chunk-JXDC723O.js → chunk-STW2DGFI.js} +2 -2
- package/Build/Workers/{chunk-5HDYHG3F.js → chunk-T3XIFPYR.js} +13 -13
- package/Build/Workers/chunk-TTUZP4BO.js +501 -0
- package/Build/Workers/{chunk-7XEAYGZK.js → chunk-UEXTBDBE.js} +10 -10
- package/Build/Workers/{chunk-GV56Q4LU.js → chunk-VOXYEYJT.js} +11 -11
- package/Build/Workers/{chunk-NY3K4IM3.js → chunk-X4356LRH.js} +12 -12
- package/Build/Workers/{chunk-S4MAZ3SS.js → chunk-XGI5BXZY.js} +2 -2
- package/Build/Workers/{chunk-UAEW6HKG.js → chunk-Y2ME2IJV.js} +13 -13
- package/Build/Workers/{chunk-XWXM2O2R.js → chunk-Y5UQJLYE.js} +6 -6
- package/Build/Workers/{chunk-QZAD5O7I.js → chunk-YJEBABKH.js} +7 -7
- package/Build/Workers/{chunk-UGK3FCDY.js → chunk-YWTJ2B4B.js} +1 -1
- package/Build/Workers/{chunk-R5X4OQT4.js → chunk-Z3TIFFGF.js} +7 -7
- package/Build/Workers/{chunk-WBQCVXR3.js → chunk-ZT7KWISZ.js} +4 -4
- package/Build/Workers/combineGeometry.js +24 -23
- package/Build/Workers/createBoxGeometry.js +18 -17
- package/Build/Workers/createBoxOutlineGeometry.js +16 -15
- package/Build/Workers/createCircleGeometry.js +26 -25
- package/Build/Workers/createCircleOutlineGeometry.js +19 -18
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -32
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -30
- package/Build/Workers/createCorridorGeometry.js +29 -28
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -27
- package/Build/Workers/createCylinderGeometry.js +20 -19
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -17
- package/Build/Workers/createEllipseGeometry.js +26 -25
- package/Build/Workers/createEllipseOutlineGeometry.js +19 -18
- package/Build/Workers/createEllipsoidGeometry.js +19 -18
- package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -17
- package/Build/Workers/createFrustumGeometry.js +18 -17
- package/Build/Workers/createFrustumOutlineGeometry.js +18 -17
- package/Build/Workers/createGeometry.js +54 -33
- package/Build/Workers/createGroundPolylineGeometry.js +22 -21
- package/Build/Workers/createPlaneGeometry.js +16 -15
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -14
- package/Build/Workers/createPolygonGeometry.js +32 -31
- package/Build/Workers/createPolygonOutlineGeometry.js +30 -29
- package/Build/Workers/createPolylineGeometry.js +25 -24
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -30
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -26
- package/Build/Workers/createRectangleGeometry.js +27 -26
- package/Build/Workers/createRectangleOutlineGeometry.js +20 -19
- package/Build/Workers/createSimplePolylineGeometry.js +23 -22
- package/Build/Workers/createSphereGeometry.js +19 -18
- package/Build/Workers/createSphereOutlineGeometry.js +18 -17
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +24 -23
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +22 -21
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -21
- package/Build/Workers/createVerticesFromHeightmap.js +22 -21
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -18
- package/Build/Workers/createWallGeometry.js +24 -23
- package/Build/Workers/createWallOutlineGeometry.js +23 -22
- package/Build/Workers/decodeDraco.js +11 -11
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +601 -92
- package/Build/Workers/transcodeKTX2.js +7 -7
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -21
- package/Source/Core/Ellipsoid.js +6 -0
- package/Source/Core/IntersectionTests.js +6 -3
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/PixelFormat.js +5 -0
- package/Source/Core/Transforms.js +3 -0
- package/Source/Core/srgbToLinear.js +32 -0
- package/Source/DataSources/CzmlDataSource.js +51 -23
- package/Source/DataSources/DataSourceDisplay.js +27 -0
- package/Source/DataSources/Entity.js +20 -2
- package/Source/DataSources/GeometryUpdaterSet.js +114 -0
- package/Source/DataSources/GeometryVisualizer.js +19 -83
- package/Source/Renderer/Context.js +10 -0
- package/Source/Renderer/ContextLimits.js +2 -0
- package/Source/Renderer/demodernizeShader.js +4 -1
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Axis.js +12 -7
- package/Source/Scene/Camera.js +46 -4
- package/Source/Scene/Cesium3DTileset.js +44 -6
- package/Source/Scene/Cesium3DTilesetBaseTraversal.js +2 -4
- package/Source/Scene/FrameState.js +5 -0
- package/Source/Scene/GlobeTranslucencyState.js +1 -1
- package/Source/Scene/GltfPipeline/updateVersion.js +69 -68
- package/Source/Scene/I3SDataProvider.js +270 -53
- package/Source/Scene/I3SDecoder.js +8 -1
- package/Source/Scene/I3SFeature.js +2 -5
- package/Source/Scene/I3SField.js +136 -31
- package/Source/Scene/I3SGeometry.js +70 -2
- package/Source/Scene/I3SLayer.js +55 -10
- package/Source/Scene/I3SNode.js +175 -18
- package/Source/Scene/I3SStatistics.js +94 -0
- package/Source/Scene/I3SSublayer.js +176 -0
- package/Source/Scene/I3SSymbology.js +337 -0
- package/Source/Scene/KeyframeNode.js +1 -1
- package/Source/Scene/Model/pickModel.js +25 -7
- package/Source/Scene/PickFramebuffer.js +37 -2
- package/Source/Scene/Picking.js +113 -39
- package/Source/Scene/Primitive.js +6 -2
- package/Source/Scene/Scene.js +126 -42
- package/Source/Scene/ScreenSpaceCameraController.js +21 -7
- package/Source/Scene/SensorVolumePortionToDisplay.js +69 -0
- package/Source/Scene/SpatialNode.js +12 -19
- package/Source/Scene/StructuralMetadata.js +1 -1
- package/Source/Scene/VoxelBoxShape.js +76 -0
- package/Source/Scene/VoxelCell.js +273 -0
- package/Source/Scene/VoxelCylinderShape.js +114 -43
- package/Source/Scene/VoxelEllipsoidShape.js +158 -116
- package/Source/Scene/VoxelPrimitive.js +3 -1
- package/Source/Scene/VoxelRenderResources.js +3 -0
- package/Source/Scene/VoxelShape.js +13 -0
- package/Source/Scene/VoxelTraversal.js +76 -54
- package/Source/Scene/buildVoxelDrawCommands.js +23 -0
- package/Source/Scene/createGooglePhotorealistic3DTileset.js +1 -0
- package/Source/Scene/processVoxelProperties.js +2 -0
- package/Source/Shaders/Voxels/IntersectCylinder.glsl +14 -111
- package/Source/Shaders/Voxels/IntersectCylinder.js +14 -111
- package/Source/Shaders/Voxels/IntersectEllipsoid.glsl +32 -113
- package/Source/Shaders/Voxels/IntersectEllipsoid.js +32 -113
- package/Source/Shaders/Voxels/IntersectLongitude.glsl +102 -0
- package/Source/Shaders/Voxels/IntersectLongitude.js +104 -0
- package/Source/Shaders/Voxels/VoxelFS.glsl +39 -1
- package/Source/Shaders/Voxels/VoxelFS.js +39 -1
- package/Source/Shaders/Voxels/convertUvToCylinder.glsl +19 -37
- package/Source/Shaders/Voxels/convertUvToCylinder.js +19 -37
- package/Source/Shaders/Voxels/convertUvToEllipsoid.glsl +24 -44
- package/Source/Shaders/Voxels/convertUvToEllipsoid.js +24 -44
- package/Source/Workers/createGeometry.js +40 -11
- package/Source/Workers/decodeI3S.js +720 -94
- package/index.d.ts +296 -11
- package/index.js +102 -94
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.115
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -25,25 +25,25 @@
|
|
|
25
25
|
|
|
26
26
|
import {
|
|
27
27
|
createTaskProcessorWorker_default
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-3VAZEH7M.js";
|
|
29
29
|
import {
|
|
30
30
|
WebGLConstants_default
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-SOWMRMWA.js";
|
|
32
32
|
import {
|
|
33
33
|
RuntimeError_default
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-STW2DGFI.js";
|
|
35
35
|
import {
|
|
36
36
|
defaultValue_default
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-BBWDMCVU.js";
|
|
38
38
|
import {
|
|
39
39
|
Check_default
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-XGI5BXZY.js";
|
|
41
41
|
import {
|
|
42
42
|
__commonJS,
|
|
43
43
|
__require,
|
|
44
44
|
__toESM,
|
|
45
45
|
defined_default
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-YWTJ2B4B.js";
|
|
47
47
|
|
|
48
48
|
// packages/engine/Source/ThirdParty/Workers/basis_transcoder.js
|
|
49
49
|
var require_basis_transcoder = __commonJS({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.115
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -26,50 +26,51 @@
|
|
|
26
26
|
import {
|
|
27
27
|
EllipsoidalOccluder_default,
|
|
28
28
|
TerrainEncoding_default
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-HU6N6EXB.js";
|
|
30
30
|
import {
|
|
31
31
|
createTaskProcessorWorker_default
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-3VAZEH7M.js";
|
|
33
33
|
import {
|
|
34
34
|
OrientedBoundingBox_default
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-A5DWLWCY.js";
|
|
36
36
|
import {
|
|
37
37
|
AttributeCompression_default
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-Z3TIFFGF.js";
|
|
39
|
+
import "./chunk-FNIRWHJB.js";
|
|
40
|
+
import "./chunk-G43QFN4Q.js";
|
|
41
|
+
import "./chunk-2FRVPMCS.js";
|
|
42
|
+
import "./chunk-Y5UQJLYE.js";
|
|
43
43
|
import {
|
|
44
44
|
IndexDatatype_default
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-LPR3YNP2.js";
|
|
46
46
|
import {
|
|
47
47
|
BoundingSphere_default
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-FJKNFAKQ.js";
|
|
49
|
+
import "./chunk-TTUZP4BO.js";
|
|
50
|
+
import "./chunk-BG4UCVXN.js";
|
|
50
51
|
import {
|
|
51
52
|
Rectangle_default
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import "./chunk-
|
|
53
|
+
} from "./chunk-YJEBABKH.js";
|
|
54
|
+
import "./chunk-PPH7OFP3.js";
|
|
54
55
|
import {
|
|
55
56
|
Cartesian2_default,
|
|
56
57
|
Cartesian3_default,
|
|
57
58
|
Cartographic_default,
|
|
58
59
|
Ellipsoid_default
|
|
59
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-OGXZVPPM.js";
|
|
60
61
|
import {
|
|
61
62
|
Math_default
|
|
62
|
-
} from "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-
|
|
63
|
+
} from "./chunk-5QULIR53.js";
|
|
64
|
+
import "./chunk-SOWMRMWA.js";
|
|
65
|
+
import "./chunk-STW2DGFI.js";
|
|
66
|
+
import "./chunk-BBWDMCVU.js";
|
|
66
67
|
import {
|
|
67
68
|
Check_default,
|
|
68
69
|
DeveloperError_default
|
|
69
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-XGI5BXZY.js";
|
|
70
71
|
import {
|
|
71
72
|
defined_default
|
|
72
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-YWTJ2B4B.js";
|
|
73
74
|
|
|
74
75
|
// packages/engine/Source/Core/Intersections2D.js
|
|
75
76
|
var Intersections2D = {};
|
package/Source/Core/Ellipsoid.js
CHANGED
|
@@ -363,6 +363,12 @@ Ellipsoid.prototype.geodeticSurfaceNormalCartographic = function (
|
|
|
363
363
|
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided, or undefined if a normal cannot be found.
|
|
364
364
|
*/
|
|
365
365
|
Ellipsoid.prototype.geodeticSurfaceNormal = function (cartesian, result) {
|
|
366
|
+
//>>includeStart('debug', pragmas.debug);
|
|
367
|
+
Check.typeOf.object("cartesian", cartesian);
|
|
368
|
+
if (isNaN(cartesian.x) || isNaN(cartesian.y) || isNaN(cartesian.z)) {
|
|
369
|
+
throw new DeveloperError("cartesian has a NaN component");
|
|
370
|
+
}
|
|
371
|
+
//>>includeEnd('debug');
|
|
366
372
|
if (
|
|
367
373
|
Cartesian3.equalsEpsilon(cartesian, Cartesian3.ZERO, CesiumMath.EPSILON14)
|
|
368
374
|
) {
|
|
@@ -508,7 +508,10 @@ function addWithCancellationCheck(left, right, tolerance) {
|
|
|
508
508
|
return difference;
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
-
|
|
511
|
+
/**
|
|
512
|
+
* @private
|
|
513
|
+
*/
|
|
514
|
+
IntersectionTests.quadraticVectorExpression = function (A, b, c, x, w) {
|
|
512
515
|
const xSquared = x * x;
|
|
513
516
|
const wSquared = w * w;
|
|
514
517
|
|
|
@@ -634,7 +637,7 @@ function quadraticVectorExpression(A, b, c, x, w) {
|
|
|
634
637
|
}
|
|
635
638
|
|
|
636
639
|
return solutions;
|
|
637
|
-
}
|
|
640
|
+
};
|
|
638
641
|
|
|
639
642
|
const firstAxisScratch = new Cartesian3();
|
|
640
643
|
const secondAxisScratch = new Cartesian3();
|
|
@@ -740,7 +743,7 @@ IntersectionTests.grazingAltitudeLocation = function (ray, ellipsoid) {
|
|
|
740
743
|
const b = Matrix3.multiplyByVector(temp, position, bCart);
|
|
741
744
|
|
|
742
745
|
// Solve for the solutions to the expression in standard form:
|
|
743
|
-
const solutions = quadraticVectorExpression(
|
|
746
|
+
const solutions = IntersectionTests.quadraticVectorExpression(
|
|
744
747
|
A,
|
|
745
748
|
Cartesian3.negate(b, firstAxisScratch),
|
|
746
749
|
0.0,
|
package/Source/Core/Ion.js
CHANGED
|
@@ -4,7 +4,7 @@ import Resource from "./Resource.js";
|
|
|
4
4
|
|
|
5
5
|
let defaultTokenCredit;
|
|
6
6
|
const defaultAccessToken =
|
|
7
|
-
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
7
|
+
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2MThmZGJiNi1kMDRlLTQ4ZGMtYjU0Ny0yNTljMjM1NzliN2MiLCJpZCI6MjU5LCJpYXQiOjE3MDkzMDQzNjZ9.7gsbNN-OaPZJ7QwMDB2vdF2geQDd8lMBAEK77_5Qol4";
|
|
8
8
|
/**
|
|
9
9
|
* Default settings for accessing the Cesium ion API.
|
|
10
10
|
*
|
|
@@ -402,6 +402,11 @@ PixelFormat.alignmentInBytes = function (pixelFormat, pixelDatatype, width) {
|
|
|
402
402
|
|
|
403
403
|
/**
|
|
404
404
|
* @private
|
|
405
|
+
* @param {PixelFormat} pixelFormat The pixel format.
|
|
406
|
+
* @param {PixelDatatype} pixelDatatype The pixel datatype.
|
|
407
|
+
* @param {Number} width The width of the texture.
|
|
408
|
+
* @param {Number} height The height of the texture.
|
|
409
|
+
* @returns {TypedArray} The typed array.
|
|
405
410
|
*/
|
|
406
411
|
PixelFormat.createTypedArray = function (
|
|
407
412
|
pixelFormat,
|
|
@@ -127,6 +127,9 @@ Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
|
|
|
127
127
|
if (!defined(origin)) {
|
|
128
128
|
throw new DeveloperError("origin is required.");
|
|
129
129
|
}
|
|
130
|
+
if (isNaN(origin.x) || isNaN(origin.y) || isNaN(origin.z)) {
|
|
131
|
+
throw new DeveloperError("origin has a NaN component");
|
|
132
|
+
}
|
|
130
133
|
//>>includeEnd('debug');
|
|
131
134
|
if (!defined(result)) {
|
|
132
135
|
result = new Matrix4();
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import Check from "./Check.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Converts the value from sRGB color space to linear color space.
|
|
5
|
+
*
|
|
6
|
+
* @function
|
|
7
|
+
*
|
|
8
|
+
* @param {number} value The color value in sRGB color space.
|
|
9
|
+
* @returns {number} Returns the color value in linear color space.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const srgbColor = [0.5, 0.5, 0.5];
|
|
13
|
+
* const linearColor = srgbColor.map(function (c) {
|
|
14
|
+
* return Cesium.srgbToLinear(c);
|
|
15
|
+
* });
|
|
16
|
+
*/
|
|
17
|
+
function srgbToLinear(value) {
|
|
18
|
+
//>>includeStart('debug', pragmas.debug);
|
|
19
|
+
Check.defined("value", value);
|
|
20
|
+
//>>includeEnd('debug');
|
|
21
|
+
|
|
22
|
+
if (value <= 0.04045) {
|
|
23
|
+
// eslint-disable-next-line no-loss-of-precision
|
|
24
|
+
return value * 0.07739938080495356037151702786378;
|
|
25
|
+
}
|
|
26
|
+
return Math.pow(
|
|
27
|
+
// eslint-disable-next-line no-loss-of-precision
|
|
28
|
+
(value + 0.055) * 0.94786729857819905213270142180095,
|
|
29
|
+
2.4
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
export default srgbToLinear;
|
|
@@ -90,6 +90,7 @@ import VelocityOrientationProperty from "./VelocityOrientationProperty.js";
|
|
|
90
90
|
import VelocityVectorProperty from "./VelocityVectorProperty.js";
|
|
91
91
|
import WallGraphics from "./WallGraphics.js";
|
|
92
92
|
import Cesium3DTilesetGraphics from "./Cesium3DTilesetGraphics.js";
|
|
93
|
+
import SensorVolumePortionToDisplay from "../Scene/SensorVolumePortionToDisplay.js";
|
|
93
94
|
|
|
94
95
|
// A marker type to distinguish CZML properties where we need to end up with a unit vector.
|
|
95
96
|
// The data is still loaded into Cartesian3 objects but they are normalized.
|
|
@@ -576,6 +577,10 @@ function unwrapInterval(type, czmlInterval, sourceUri) {
|
|
|
576
577
|
return unwrapQuaternionInterval(czmlInterval);
|
|
577
578
|
case Rotation:
|
|
578
579
|
return defaultValue(czmlInterval.number, czmlInterval);
|
|
580
|
+
case SensorVolumePortionToDisplay:
|
|
581
|
+
return SensorVolumePortionToDisplay[
|
|
582
|
+
defaultValue(czmlInterval.portionToDisplay, czmlInterval)
|
|
583
|
+
];
|
|
579
584
|
case ShadowMode:
|
|
580
585
|
return ShadowMode[
|
|
581
586
|
defaultValue(
|
|
@@ -598,7 +603,7 @@ function unwrapInterval(type, czmlInterval, sourceUri) {
|
|
|
598
603
|
defaultValue(czmlInterval.verticalOrigin, czmlInterval)
|
|
599
604
|
];
|
|
600
605
|
default:
|
|
601
|
-
throw new RuntimeError(type);
|
|
606
|
+
throw new RuntimeError(`Unknown CzmlDataSource interval type: ${type}`);
|
|
602
607
|
}
|
|
603
608
|
}
|
|
604
609
|
|
|
@@ -5006,31 +5011,54 @@ Object.defineProperties(CzmlDataSource.prototype, {
|
|
|
5006
5011
|
* @type {CzmlDataSource.UpdaterFunction[]}
|
|
5007
5012
|
*/
|
|
5008
5013
|
CzmlDataSource.updaters = [
|
|
5009
|
-
processBillboard,
|
|
5010
|
-
processBox,
|
|
5011
|
-
processCorridor,
|
|
5012
|
-
processCylinder,
|
|
5013
|
-
processEllipse,
|
|
5014
|
-
processEllipsoid,
|
|
5015
|
-
processLabel,
|
|
5016
|
-
processModel,
|
|
5017
|
-
processName,
|
|
5018
|
-
processDescription,
|
|
5019
|
-
processPath,
|
|
5020
|
-
processPoint,
|
|
5021
|
-
processPolygon,
|
|
5022
|
-
processPolyline,
|
|
5023
|
-
processPolylineVolume,
|
|
5024
|
-
processProperties,
|
|
5025
|
-
processRectangle,
|
|
5026
|
-
processPosition,
|
|
5027
|
-
processTileset,
|
|
5028
|
-
processViewFrom,
|
|
5029
|
-
processWall,
|
|
5030
|
-
processOrientation,
|
|
5014
|
+
processBillboard,
|
|
5015
|
+
processBox,
|
|
5016
|
+
processCorridor,
|
|
5017
|
+
processCylinder,
|
|
5018
|
+
processEllipse,
|
|
5019
|
+
processEllipsoid,
|
|
5020
|
+
processLabel,
|
|
5021
|
+
processModel,
|
|
5022
|
+
processName,
|
|
5023
|
+
processDescription,
|
|
5024
|
+
processPath,
|
|
5025
|
+
processPoint,
|
|
5026
|
+
processPolygon,
|
|
5027
|
+
processPolyline,
|
|
5028
|
+
processPolylineVolume,
|
|
5029
|
+
processProperties,
|
|
5030
|
+
processRectangle,
|
|
5031
|
+
processPosition,
|
|
5032
|
+
processTileset,
|
|
5033
|
+
processViewFrom,
|
|
5034
|
+
processWall,
|
|
5035
|
+
processOrientation,
|
|
5031
5036
|
processAvailability,
|
|
5032
5037
|
];
|
|
5033
5038
|
|
|
5039
|
+
/**
|
|
5040
|
+
* Add the provided updater to the list of updaters if not already included
|
|
5041
|
+
* @private
|
|
5042
|
+
* @param {CzmlDataSource.UpdaterFunction} updater
|
|
5043
|
+
*/
|
|
5044
|
+
CzmlDataSource.registerUpdater = function (updater) {
|
|
5045
|
+
if (!CzmlDataSource.updaters.includes(updater)) {
|
|
5046
|
+
CzmlDataSource.updaters.push(updater);
|
|
5047
|
+
}
|
|
5048
|
+
};
|
|
5049
|
+
|
|
5050
|
+
/**
|
|
5051
|
+
* Remove the provided updater from the list of updaters if already included
|
|
5052
|
+
* @private
|
|
5053
|
+
* @param {CzmlDataSource.UpdaterFunction} updater
|
|
5054
|
+
*/
|
|
5055
|
+
CzmlDataSource.unregisterUpdater = function (updater) {
|
|
5056
|
+
if (CzmlDataSource.updaters.includes(updater)) {
|
|
5057
|
+
const index = CzmlDataSource.updaters.indexOf(updater);
|
|
5058
|
+
CzmlDataSource.updaters.splice(index, 1);
|
|
5059
|
+
}
|
|
5060
|
+
};
|
|
5061
|
+
|
|
5034
5062
|
/**
|
|
5035
5063
|
* Processes the provided url or CZML object without clearing any existing data.
|
|
5036
5064
|
*
|
|
@@ -120,6 +120,30 @@ function DataSourceDisplay(options) {
|
|
|
120
120
|
this._ready = false;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
const ExtraVisualizers = [];
|
|
124
|
+
/**
|
|
125
|
+
* Add the provided Visualizer to the default visualizers callback if not already included
|
|
126
|
+
* @private
|
|
127
|
+
* @param {Visualizer} visualizer Visualizer class to add
|
|
128
|
+
*/
|
|
129
|
+
DataSourceDisplay.registerVisualizer = function (visualizer) {
|
|
130
|
+
if (!ExtraVisualizers.includes(visualizer)) {
|
|
131
|
+
ExtraVisualizers.push(visualizer);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Remove the provided Visualizer from the default visualizers callback if it's already included
|
|
137
|
+
* @private
|
|
138
|
+
* @param {Visualizer} visualizer Visualizer class to remove
|
|
139
|
+
*/
|
|
140
|
+
DataSourceDisplay.unregisterVisualizer = function (visualizer) {
|
|
141
|
+
if (ExtraVisualizers.includes(visualizer)) {
|
|
142
|
+
const index = ExtraVisualizers.indexOf(visualizer);
|
|
143
|
+
ExtraVisualizers.splice(index, 1);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
|
|
123
147
|
/**
|
|
124
148
|
* Gets or sets the default function which creates an array of visualizers used for visualization.
|
|
125
149
|
* By default, this function uses all standard visualizers.
|
|
@@ -151,6 +175,9 @@ DataSourceDisplay.defaultVisualizersCallback = function (
|
|
|
151
175
|
dataSource._primitives,
|
|
152
176
|
dataSource._groundPrimitives
|
|
153
177
|
),
|
|
178
|
+
...ExtraVisualizers.map(
|
|
179
|
+
(VisualizerClass) => new VisualizerClass(scene, entities)
|
|
180
|
+
),
|
|
154
181
|
];
|
|
155
182
|
};
|
|
156
183
|
|
|
@@ -41,6 +41,8 @@ import WallGraphics from "./WallGraphics.js";
|
|
|
41
41
|
|
|
42
42
|
const cartoScratch = new Cartographic();
|
|
43
43
|
|
|
44
|
+
const ExtraPropertyNames = [];
|
|
45
|
+
|
|
44
46
|
function createConstantPositionProperty(value) {
|
|
45
47
|
return new ConstantPositionProperty(value);
|
|
46
48
|
}
|
|
@@ -127,7 +129,7 @@ function Entity(options) {
|
|
|
127
129
|
"corridor",
|
|
128
130
|
"cylinder",
|
|
129
131
|
"description",
|
|
130
|
-
"ellipse",
|
|
132
|
+
"ellipse",
|
|
131
133
|
"ellipsoid",
|
|
132
134
|
"label",
|
|
133
135
|
"model",
|
|
@@ -136,7 +138,7 @@ function Entity(options) {
|
|
|
136
138
|
"path",
|
|
137
139
|
"plane",
|
|
138
140
|
"point",
|
|
139
|
-
"polygon",
|
|
141
|
+
"polygon",
|
|
140
142
|
"polyline",
|
|
141
143
|
"polylineVolume",
|
|
142
144
|
"position",
|
|
@@ -144,6 +146,7 @@ function Entity(options) {
|
|
|
144
146
|
"rectangle",
|
|
145
147
|
"viewFrom",
|
|
146
148
|
"wall",
|
|
149
|
+
...ExtraPropertyNames,
|
|
147
150
|
];
|
|
148
151
|
|
|
149
152
|
this._billboard = undefined;
|
|
@@ -494,6 +497,21 @@ Object.defineProperties(Entity.prototype, {
|
|
|
494
497
|
wall: createPropertyTypeDescriptor("wall", WallGraphics),
|
|
495
498
|
});
|
|
496
499
|
|
|
500
|
+
/**
|
|
501
|
+
* Add the specified type and construct the properties for it in the Entity class
|
|
502
|
+
* @private
|
|
503
|
+
* @param {string} propertyName name of the property that controls/accesses this entity type
|
|
504
|
+
* @param {{ constructor: function }} Type The Graphics class to associate with this entity type
|
|
505
|
+
*/
|
|
506
|
+
Entity.registerEntityType = function (propertyName, Type) {
|
|
507
|
+
Object.defineProperties(Entity.prototype, {
|
|
508
|
+
[propertyName]: createPropertyTypeDescriptor(propertyName, Type),
|
|
509
|
+
});
|
|
510
|
+
if (!ExtraPropertyNames.includes(propertyName)) {
|
|
511
|
+
ExtraPropertyNames.push(propertyName);
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
|
|
497
515
|
/**
|
|
498
516
|
* Given a time, returns true if this object should have data during that time.
|
|
499
517
|
*
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import destroyObject from "../Core/destroyObject.js";
|
|
2
|
+
import Event from "../Core/Event.js";
|
|
3
|
+
import EventHelper from "../Core/EventHelper.js";
|
|
4
|
+
import BoxGeometryUpdater from "./BoxGeometryUpdater.js";
|
|
5
|
+
import CorridorGeometryUpdater from "./CorridorGeometryUpdater.js";
|
|
6
|
+
import CylinderGeometryUpdater from "./CylinderGeometryUpdater.js";
|
|
7
|
+
import EllipseGeometryUpdater from "./EllipseGeometryUpdater.js";
|
|
8
|
+
import EllipsoidGeometryUpdater from "./EllipsoidGeometryUpdater.js";
|
|
9
|
+
import PlaneGeometryUpdater from "./PlaneGeometryUpdater.js";
|
|
10
|
+
import PolygonGeometryUpdater from "./PolygonGeometryUpdater.js";
|
|
11
|
+
import PolylineVolumeGeometryUpdater from "./PolylineVolumeGeometryUpdater.js";
|
|
12
|
+
import RectangleGeometryUpdater from "./RectangleGeometryUpdater.js";
|
|
13
|
+
import WallGeometryUpdater from "./WallGeometryUpdater.js";
|
|
14
|
+
|
|
15
|
+
/** @type {GeometryUpdater[]} */
|
|
16
|
+
const geometryUpdaters = [
|
|
17
|
+
BoxGeometryUpdater,
|
|
18
|
+
CylinderGeometryUpdater,
|
|
19
|
+
CorridorGeometryUpdater,
|
|
20
|
+
EllipseGeometryUpdater,
|
|
21
|
+
EllipsoidGeometryUpdater,
|
|
22
|
+
PlaneGeometryUpdater,
|
|
23
|
+
PolygonGeometryUpdater,
|
|
24
|
+
PolylineVolumeGeometryUpdater,
|
|
25
|
+
RectangleGeometryUpdater,
|
|
26
|
+
WallGeometryUpdater,
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Manages a set of "updater" classes for the {@link GeometryVisualizer} for each entity
|
|
31
|
+
*
|
|
32
|
+
* @private
|
|
33
|
+
* @param {Entity} entity
|
|
34
|
+
* @param {Scene} scene
|
|
35
|
+
*/
|
|
36
|
+
function GeometryUpdaterSet(entity, scene) {
|
|
37
|
+
this.entity = entity;
|
|
38
|
+
this.scene = scene;
|
|
39
|
+
const updaters = new Array(geometryUpdaters.length);
|
|
40
|
+
const geometryChanged = new Event();
|
|
41
|
+
const eventHelper = new EventHelper();
|
|
42
|
+
for (let i = 0; i < updaters.length; i++) {
|
|
43
|
+
const updater = new geometryUpdaters[i](entity, scene);
|
|
44
|
+
eventHelper.add(updater.geometryChanged, (geometry) => {
|
|
45
|
+
geometryChanged.raiseEvent(geometry);
|
|
46
|
+
});
|
|
47
|
+
updaters[i] = updater;
|
|
48
|
+
}
|
|
49
|
+
this.updaters = updaters;
|
|
50
|
+
this.geometryChanged = geometryChanged;
|
|
51
|
+
this.eventHelper = eventHelper;
|
|
52
|
+
|
|
53
|
+
this._removeEntitySubscription = entity.definitionChanged.addEventListener(
|
|
54
|
+
GeometryUpdaterSet.prototype._onEntityPropertyChanged,
|
|
55
|
+
this
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
GeometryUpdaterSet.prototype._onEntityPropertyChanged = function (
|
|
60
|
+
entity,
|
|
61
|
+
propertyName,
|
|
62
|
+
newValue,
|
|
63
|
+
oldValue
|
|
64
|
+
) {
|
|
65
|
+
const updaters = this.updaters;
|
|
66
|
+
for (let i = 0; i < updaters.length; i++) {
|
|
67
|
+
updaters[i]._onEntityPropertyChanged(
|
|
68
|
+
entity,
|
|
69
|
+
propertyName,
|
|
70
|
+
newValue,
|
|
71
|
+
oldValue
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
GeometryUpdaterSet.prototype.forEach = function (callback) {
|
|
77
|
+
const updaters = this.updaters;
|
|
78
|
+
for (let i = 0; i < updaters.length; i++) {
|
|
79
|
+
callback(updaters[i]);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
GeometryUpdaterSet.prototype.destroy = function () {
|
|
84
|
+
this.eventHelper.removeAll();
|
|
85
|
+
const updaters = this.updaters;
|
|
86
|
+
for (let i = 0; i < updaters.length; i++) {
|
|
87
|
+
updaters[i].destroy();
|
|
88
|
+
}
|
|
89
|
+
this._removeEntitySubscription();
|
|
90
|
+
destroyObject(this);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Add the provided updater to the default list of updaters if not already included
|
|
95
|
+
* @param {GeometryUpdater} updater
|
|
96
|
+
*/
|
|
97
|
+
GeometryUpdaterSet.registerUpdater = function (updater) {
|
|
98
|
+
if (!geometryUpdaters.includes(updater)) {
|
|
99
|
+
geometryUpdaters.push(updater);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Remove the provided updater from the default list of updaters if included
|
|
105
|
+
* @param {GeometryUpdater} updater
|
|
106
|
+
*/
|
|
107
|
+
GeometryUpdaterSet.unregisterUpdater = function (updater) {
|
|
108
|
+
if (geometryUpdaters.includes(updater)) {
|
|
109
|
+
const index = geometryUpdaters.indexOf(updater);
|
|
110
|
+
geometryUpdaters.splice(index, 1);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export default GeometryUpdaterSet;
|