deeptwins-cesium-engine 0.0.37 → 0.0.39

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.
Files changed (138) hide show
  1. package/Build/ThirdParty/Workers/pako_deflate.min.js +3 -3
  2. package/Build/ThirdParty/Workers/pako_inflate.min.js +3 -3
  3. package/Build/ThirdParty/Workers/zip-web-worker.js +2 -2
  4. package/Build/Workers/chunk-23I6J5G7.js +398 -0
  5. package/Build/Workers/chunk-2AHRUAHP.js +963 -0
  6. package/Build/Workers/chunk-2EXJYRVL.js +1800 -0
  7. package/Build/Workers/chunk-2KZSEMHE.js +368 -0
  8. package/Build/Workers/chunk-3DT7SFPW.js +959 -0
  9. package/Build/Workers/chunk-3HAZZIZN.js +435 -0
  10. package/Build/Workers/chunk-3JNKFBNK.js +287 -0
  11. package/Build/Workers/chunk-4GPYRP3M.js +157 -0
  12. package/Build/Workers/chunk-4HWJCCN5.js +1481 -0
  13. package/Build/Workers/chunk-4UN6DCKS.js +44 -0
  14. package/Build/Workers/chunk-5AS35AVH.js +101 -0
  15. package/Build/Workers/chunk-5QBKODYV.js +239 -0
  16. package/Build/Workers/chunk-7H2S5BNE.js +196 -0
  17. package/Build/Workers/chunk-7NK5LQGE.js +1055 -0
  18. package/Build/Workers/chunk-7USIJNJO.js +456 -0
  19. package/Build/Workers/chunk-A3LZJ465.js +634 -0
  20. package/Build/Workers/chunk-ACV745U5.js +629 -0
  21. package/Build/Workers/chunk-AF7CI434.js +476 -0
  22. package/Build/Workers/chunk-ARYZWDAD.js +157 -0
  23. package/Build/Workers/chunk-BDVR2XOF.js +305 -0
  24. package/Build/Workers/chunk-CBSLDU73.js +1481 -0
  25. package/Build/Workers/chunk-DD3ISUFZ.js +2717 -0
  26. package/Build/Workers/chunk-DIVAQ6AJ.js +196 -0
  27. package/Build/Workers/chunk-E2LXRH4B.js +390 -0
  28. package/Build/Workers/chunk-ESM3ZWV7.js +781 -0
  29. package/Build/Workers/chunk-EZS63EHQ.js +171 -0
  30. package/Build/Workers/chunk-F3HA5JVH.js +435 -0
  31. package/Build/Workers/chunk-FGQQ4BAX.js +684 -0
  32. package/Build/Workers/chunk-FL4PAMOR.js +100 -0
  33. package/Build/Workers/chunk-FXZPZ42H.js +122 -0
  34. package/Build/Workers/chunk-GBACHWVF.js +171 -0
  35. package/Build/Workers/chunk-GKTDHQWC.js +122 -0
  36. package/Build/Workers/chunk-HBSMOYMV.js +37 -0
  37. package/Build/Workers/chunk-HKLYRUUZ.js +691 -0
  38. package/Build/Workers/chunk-HRSYMVJK.js +511 -0
  39. package/Build/Workers/chunk-IE4WZF5B.js +220 -0
  40. package/Build/Workers/chunk-IXVT26OF.js +163 -0
  41. package/Build/Workers/chunk-IYRRJ6HP.js +262 -0
  42. package/Build/Workers/chunk-JGB65JJZ.js +58 -0
  43. package/Build/Workers/chunk-K4MHMSSB.js +1800 -0
  44. package/Build/Workers/chunk-KZZS6JY6.js +300 -0
  45. package/Build/Workers/chunk-LBBJTH3K.js +2717 -0
  46. package/Build/Workers/chunk-LFYSBTBW.js +963 -0
  47. package/Build/Workers/chunk-LHUR7S4A.js +421 -0
  48. package/Build/Workers/chunk-LNRTQ27Z.js +59 -0
  49. package/Build/Workers/chunk-LOR2HRSE.js +1073 -0
  50. package/Build/Workers/chunk-MCMBUNB4.js +10357 -0
  51. package/Build/Workers/chunk-NCVCDYTD.js +1258 -0
  52. package/Build/Workers/chunk-NS3GCKZS.js +102 -0
  53. package/Build/Workers/chunk-OGSJ5ZP6.js +500 -0
  54. package/Build/Workers/chunk-OH3VVE2G.js +758 -0
  55. package/Build/Workers/chunk-OVXKRRSP.js +305 -0
  56. package/Build/Workers/chunk-OYCWKCSH.js +139 -0
  57. package/Build/Workers/chunk-P53ISV4G.js +1258 -0
  58. package/Build/Workers/chunk-P76UBIMX.js +75 -0
  59. package/Build/Workers/chunk-PPJPELR6.js +834 -0
  60. package/Build/Workers/chunk-PXMNRFPM.js +691 -0
  61. package/Build/Workers/chunk-QW5GG3FR.js +59 -0
  62. package/Build/Workers/chunk-RBFNWURH.js +959 -0
  63. package/Build/Workers/chunk-RCW2L6C3.js +1055 -0
  64. package/Build/Workers/chunk-RO6KFQNC.js +287 -0
  65. package/Build/Workers/chunk-RZIOHE7Z.js +239 -0
  66. package/Build/Workers/chunk-S7VB62PT.js +511 -0
  67. package/Build/Workers/chunk-SS4SBY5P.js +421 -0
  68. package/Build/Workers/chunk-TDUWFVEH.js +300 -0
  69. package/Build/Workers/chunk-UBCK7AIW.js +39 -0
  70. package/Build/Workers/chunk-UDSU5OZZ.js +73 -0
  71. package/Build/Workers/chunk-UWBEXOKK.js +115 -0
  72. package/Build/Workers/chunk-VMHJ465B.js +781 -0
  73. package/Build/Workers/chunk-W3SVGQNY.js +353 -0
  74. package/Build/Workers/chunk-WANNP3AY.js +1073 -0
  75. package/Build/Workers/chunk-WJT5PV2Q.js +220 -0
  76. package/Build/Workers/chunk-X2PKPXPZ.js +10357 -0
  77. package/Build/Workers/chunk-XA76JK4A.js +758 -0
  78. package/Build/Workers/chunk-XAI7HXKB.js +476 -0
  79. package/Build/Workers/chunk-XCTF4LFK.js +138 -0
  80. package/Build/Workers/chunk-XQWSES33.js +55 -0
  81. package/Build/Workers/chunk-XUDMEXSI.js +834 -0
  82. package/Build/Workers/chunk-YNTVI3S3.js +390 -0
  83. package/Build/Workers/chunk-YW6GWBRU.js +368 -0
  84. package/Build/Workers/chunk-YZUNRTF3.js +398 -0
  85. package/Build/Workers/chunk-Z26UX5A7.js +684 -0
  86. package/Build/Workers/chunk-ZPEGWBIN.js +2857 -0
  87. package/Build/Workers/combineGeometry.js +22 -22
  88. package/Build/Workers/createBoxGeometry.js +16 -16
  89. package/Build/Workers/createBoxOutlineGeometry.js +14 -14
  90. package/Build/Workers/createCircleGeometry.js +24 -24
  91. package/Build/Workers/createCircleOutlineGeometry.js +17 -17
  92. package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
  93. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
  94. package/Build/Workers/createCorridorGeometry.js +27 -27
  95. package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
  96. package/Build/Workers/createCylinderGeometry.js +18 -18
  97. package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
  98. package/Build/Workers/createEllipseGeometry.js +24 -24
  99. package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
  100. package/Build/Workers/createEllipsoidGeometry.js +17 -17
  101. package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
  102. package/Build/Workers/createFrustumGeometry.js +16 -16
  103. package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
  104. package/Build/Workers/createGeometry.js +22 -22
  105. package/Build/Workers/createGroundPolylineGeometry.js +20 -20
  106. package/Build/Workers/createPlaneGeometry.js +14 -14
  107. package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
  108. package/Build/Workers/createPolygonGeometry.js +30 -30
  109. package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
  110. package/Build/Workers/createPolylineGeometry.js +23 -23
  111. package/Build/Workers/createPolylineVolumeGeometry.js +29 -29
  112. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
  113. package/Build/Workers/createRectangleGeometry.js +25 -25
  114. package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
  115. package/Build/Workers/createSimplePolylineGeometry.js +21 -21
  116. package/Build/Workers/createSphereGeometry.js +17 -17
  117. package/Build/Workers/createSphereOutlineGeometry.js +16 -16
  118. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  119. package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
  120. package/Build/Workers/createVectorTileGeometries.js +22 -22
  121. package/Build/Workers/createVectorTilePoints.js +12 -12
  122. package/Build/Workers/createVectorTilePolygons.js +20 -20
  123. package/Build/Workers/createVectorTilePolylines.js +13 -13
  124. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
  125. package/Build/Workers/createVerticesFromHeightmap.js +26 -26
  126. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
  127. package/Build/Workers/createWallGeometry.js +22 -22
  128. package/Build/Workers/createWallOutlineGeometry.js +21 -21
  129. package/Build/Workers/decodeDraco.js +11 -11
  130. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  131. package/Build/Workers/decodeI3S.js +10 -10
  132. package/Build/Workers/transcodeKTX2.js +62 -54
  133. package/Build/Workers/transferTypedArrayTest.js +1 -1
  134. package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
  135. package/Source/Renderer/TextureAtlas.js +30 -21
  136. package/Source/Scene/BillboardTexture.js +99 -12
  137. package/index.js +46 -46
  138. package/package.json +1 -1
@@ -0,0 +1,100 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.38
5
+ *
6
+ * Copyright 2011-2022 Cesium Contributors
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ *
20
+ * Columbus View (Pat. Pend.)
21
+ *
22
+ * Portions licensed separately.
23
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
+ */
25
+
26
+ import {
27
+ Math_default
28
+ } from "./chunk-OGSJ5ZP6.js";
29
+ import {
30
+ defaultValue_default
31
+ } from "./chunk-UBCK7AIW.js";
32
+ import {
33
+ Check_default
34
+ } from "./chunk-IXVT26OF.js";
35
+ import {
36
+ defined_default
37
+ } from "./chunk-P76UBIMX.js";
38
+
39
+ // packages/engine/Source/Core/arrayRemoveDuplicates.js
40
+ var removeDuplicatesEpsilon = Math_default.EPSILON10;
41
+ function arrayRemoveDuplicates(values, equalsEpsilon, wrapAround, removedIndices) {
42
+ Check_default.defined("equalsEpsilon", equalsEpsilon);
43
+ if (!defined_default(values)) {
44
+ return void 0;
45
+ }
46
+ wrapAround = defaultValue_default(wrapAround, false);
47
+ const storeRemovedIndices = defined_default(removedIndices);
48
+ const length = values.length;
49
+ if (length < 2) {
50
+ return values;
51
+ }
52
+ let i;
53
+ let v0 = values[0];
54
+ let v1;
55
+ let cleanedValues;
56
+ let lastCleanIndex = 0;
57
+ let removedIndexLCI = -1;
58
+ for (i = 1; i < length; ++i) {
59
+ v1 = values[i];
60
+ if (equalsEpsilon(v0, v1, removeDuplicatesEpsilon)) {
61
+ if (!defined_default(cleanedValues)) {
62
+ cleanedValues = values.slice(0, i);
63
+ lastCleanIndex = i - 1;
64
+ removedIndexLCI = 0;
65
+ }
66
+ if (storeRemovedIndices) {
67
+ removedIndices.push(i);
68
+ }
69
+ } else {
70
+ if (defined_default(cleanedValues)) {
71
+ cleanedValues.push(v1);
72
+ lastCleanIndex = i;
73
+ if (storeRemovedIndices) {
74
+ removedIndexLCI = removedIndices.length;
75
+ }
76
+ }
77
+ v0 = v1;
78
+ }
79
+ }
80
+ if (wrapAround && equalsEpsilon(values[0], values[length - 1], removeDuplicatesEpsilon)) {
81
+ if (storeRemovedIndices) {
82
+ if (defined_default(cleanedValues)) {
83
+ removedIndices.splice(removedIndexLCI, 0, lastCleanIndex);
84
+ } else {
85
+ removedIndices.push(length - 1);
86
+ }
87
+ }
88
+ if (defined_default(cleanedValues)) {
89
+ cleanedValues.length -= 1;
90
+ } else {
91
+ cleanedValues = values.slice(0, -1);
92
+ }
93
+ }
94
+ return defined_default(cleanedValues) ? cleanedValues : values;
95
+ }
96
+ var arrayRemoveDuplicates_default = arrayRemoveDuplicates;
97
+
98
+ export {
99
+ arrayRemoveDuplicates_default
100
+ };
@@ -0,0 +1,122 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.37
5
+ *
6
+ * Copyright 2011-2022 Cesium Contributors
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ *
20
+ * Columbus View (Pat. Pend.)
21
+ *
22
+ * Portions licensed separately.
23
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
+ */
25
+
26
+ import {
27
+ OrientedBoundingBox_default
28
+ } from "./chunk-XUDMEXSI.js";
29
+ import {
30
+ Cartesian2_default,
31
+ Cartesian3_default,
32
+ Matrix3_default
33
+ } from "./chunk-O3PMNFMM.js";
34
+ import {
35
+ Check_default
36
+ } from "./chunk-ZQ7S66XP.js";
37
+
38
+ // packages/engine/Source/Core/CoplanarPolygonGeometryLibrary.js
39
+ var CoplanarPolygonGeometryLibrary = {};
40
+ var scratchIntersectionPoint = new Cartesian3_default();
41
+ var scratchXAxis = new Cartesian3_default();
42
+ var scratchYAxis = new Cartesian3_default();
43
+ var scratchZAxis = new Cartesian3_default();
44
+ var obbScratch = new OrientedBoundingBox_default();
45
+ CoplanarPolygonGeometryLibrary.validOutline = function(positions) {
46
+ Check_default.defined("positions", positions);
47
+ const orientedBoundingBox = OrientedBoundingBox_default.fromPoints(
48
+ positions,
49
+ obbScratch
50
+ );
51
+ const halfAxes = orientedBoundingBox.halfAxes;
52
+ const xAxis = Matrix3_default.getColumn(halfAxes, 0, scratchXAxis);
53
+ const yAxis = Matrix3_default.getColumn(halfAxes, 1, scratchYAxis);
54
+ const zAxis = Matrix3_default.getColumn(halfAxes, 2, scratchZAxis);
55
+ const xMag = Cartesian3_default.magnitude(xAxis);
56
+ const yMag = Cartesian3_default.magnitude(yAxis);
57
+ const zMag = Cartesian3_default.magnitude(zAxis);
58
+ return !(xMag === 0 && (yMag === 0 || zMag === 0) || yMag === 0 && zMag === 0);
59
+ };
60
+ CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments = function(positions, centerResult, planeAxis1Result, planeAxis2Result) {
61
+ Check_default.defined("positions", positions);
62
+ Check_default.defined("centerResult", centerResult);
63
+ Check_default.defined("planeAxis1Result", planeAxis1Result);
64
+ Check_default.defined("planeAxis2Result", planeAxis2Result);
65
+ const orientedBoundingBox = OrientedBoundingBox_default.fromPoints(
66
+ positions,
67
+ obbScratch
68
+ );
69
+ const halfAxes = orientedBoundingBox.halfAxes;
70
+ const xAxis = Matrix3_default.getColumn(halfAxes, 0, scratchXAxis);
71
+ const yAxis = Matrix3_default.getColumn(halfAxes, 1, scratchYAxis);
72
+ const zAxis = Matrix3_default.getColumn(halfAxes, 2, scratchZAxis);
73
+ const xMag = Cartesian3_default.magnitude(xAxis);
74
+ const yMag = Cartesian3_default.magnitude(yAxis);
75
+ const zMag = Cartesian3_default.magnitude(zAxis);
76
+ const min = Math.min(xMag, yMag, zMag);
77
+ if (xMag === 0 && (yMag === 0 || zMag === 0) || yMag === 0 && zMag === 0) {
78
+ return false;
79
+ }
80
+ let planeAxis1;
81
+ let planeAxis2;
82
+ if (min === yMag || min === zMag) {
83
+ planeAxis1 = xAxis;
84
+ }
85
+ if (min === xMag) {
86
+ planeAxis1 = yAxis;
87
+ } else if (min === zMag) {
88
+ planeAxis2 = yAxis;
89
+ }
90
+ if (min === xMag || min === yMag) {
91
+ planeAxis2 = zAxis;
92
+ }
93
+ Cartesian3_default.normalize(planeAxis1, planeAxis1Result);
94
+ Cartesian3_default.normalize(planeAxis2, planeAxis2Result);
95
+ Cartesian3_default.clone(orientedBoundingBox.center, centerResult);
96
+ return true;
97
+ };
98
+ function projectTo2D(position, center, axis1, axis2, result) {
99
+ const v = Cartesian3_default.subtract(position, center, scratchIntersectionPoint);
100
+ const x = Cartesian3_default.dot(axis1, v);
101
+ const y = Cartesian3_default.dot(axis2, v);
102
+ return Cartesian2_default.fromElements(x, y, result);
103
+ }
104
+ CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction = function(center, axis1, axis2) {
105
+ return function(positions) {
106
+ const positionResults = new Array(positions.length);
107
+ for (let i = 0; i < positions.length; i++) {
108
+ positionResults[i] = projectTo2D(positions[i], center, axis1, axis2);
109
+ }
110
+ return positionResults;
111
+ };
112
+ };
113
+ CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction = function(center, axis1, axis2) {
114
+ return function(position, result) {
115
+ return projectTo2D(position, center, axis1, axis2, result);
116
+ };
117
+ };
118
+ var CoplanarPolygonGeometryLibrary_default = CoplanarPolygonGeometryLibrary;
119
+
120
+ export {
121
+ CoplanarPolygonGeometryLibrary_default
122
+ };
@@ -0,0 +1,171 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.37
5
+ *
6
+ * Copyright 2011-2022 Cesium Contributors
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ *
20
+ * Columbus View (Pat. Pend.)
21
+ *
22
+ * Portions licensed separately.
23
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
+ */
25
+
26
+ import {
27
+ Cartesian4_default,
28
+ Matrix4_default
29
+ } from "./chunk-X2PKPXPZ.js";
30
+ import {
31
+ Cartesian3_default
32
+ } from "./chunk-O3PMNFMM.js";
33
+ import {
34
+ Math_default
35
+ } from "./chunk-DVR6JMCT.js";
36
+ import {
37
+ Check_default,
38
+ DeveloperError_default
39
+ } from "./chunk-ZQ7S66XP.js";
40
+ import {
41
+ defined_default
42
+ } from "./chunk-5C4JSXR6.js";
43
+
44
+ // packages/engine/Source/Core/Plane.js
45
+ function Plane(normal, distance) {
46
+ Check_default.typeOf.object("normal", normal);
47
+ if (!Math_default.equalsEpsilon(
48
+ Cartesian3_default.magnitude(normal),
49
+ 1,
50
+ Math_default.EPSILON6
51
+ )) {
52
+ throw new DeveloperError_default("normal must be normalized.");
53
+ }
54
+ Check_default.typeOf.number("distance", distance);
55
+ this.normal = Cartesian3_default.clone(normal);
56
+ this.distance = distance;
57
+ }
58
+ Plane.fromPointNormal = function(point, normal, result) {
59
+ Check_default.typeOf.object("point", point);
60
+ Check_default.typeOf.object("normal", normal);
61
+ if (!Math_default.equalsEpsilon(
62
+ Cartesian3_default.magnitude(normal),
63
+ 1,
64
+ Math_default.EPSILON6
65
+ )) {
66
+ throw new DeveloperError_default("normal must be normalized.");
67
+ }
68
+ const distance = -Cartesian3_default.dot(normal, point);
69
+ if (!defined_default(result)) {
70
+ return new Plane(normal, distance);
71
+ }
72
+ Cartesian3_default.clone(normal, result.normal);
73
+ result.distance = distance;
74
+ return result;
75
+ };
76
+ var scratchNormal = new Cartesian3_default();
77
+ Plane.fromCartesian4 = function(coefficients, result) {
78
+ Check_default.typeOf.object("coefficients", coefficients);
79
+ const normal = Cartesian3_default.fromCartesian4(coefficients, scratchNormal);
80
+ const distance = coefficients.w;
81
+ if (!Math_default.equalsEpsilon(
82
+ Cartesian3_default.magnitude(normal),
83
+ 1,
84
+ Math_default.EPSILON6
85
+ )) {
86
+ throw new DeveloperError_default("normal must be normalized.");
87
+ }
88
+ if (!defined_default(result)) {
89
+ return new Plane(normal, distance);
90
+ }
91
+ Cartesian3_default.clone(normal, result.normal);
92
+ result.distance = distance;
93
+ return result;
94
+ };
95
+ Plane.getPointDistance = function(plane, point) {
96
+ Check_default.typeOf.object("plane", plane);
97
+ Check_default.typeOf.object("point", point);
98
+ return Cartesian3_default.dot(plane.normal, point) + plane.distance;
99
+ };
100
+ var scratchCartesian = new Cartesian3_default();
101
+ Plane.projectPointOntoPlane = function(plane, point, result) {
102
+ Check_default.typeOf.object("plane", plane);
103
+ Check_default.typeOf.object("point", point);
104
+ if (!defined_default(result)) {
105
+ result = new Cartesian3_default();
106
+ }
107
+ const pointDistance = Plane.getPointDistance(plane, point);
108
+ const scaledNormal = Cartesian3_default.multiplyByScalar(
109
+ plane.normal,
110
+ pointDistance,
111
+ scratchCartesian
112
+ );
113
+ return Cartesian3_default.subtract(point, scaledNormal, result);
114
+ };
115
+ var scratchInverseTranspose = new Matrix4_default();
116
+ var scratchPlaneCartesian4 = new Cartesian4_default();
117
+ var scratchTransformNormal = new Cartesian3_default();
118
+ Plane.transform = function(plane, transform, result) {
119
+ Check_default.typeOf.object("plane", plane);
120
+ Check_default.typeOf.object("transform", transform);
121
+ const normal = plane.normal;
122
+ const distance = plane.distance;
123
+ const inverseTranspose = Matrix4_default.inverseTranspose(
124
+ transform,
125
+ scratchInverseTranspose
126
+ );
127
+ let planeAsCartesian4 = Cartesian4_default.fromElements(
128
+ normal.x,
129
+ normal.y,
130
+ normal.z,
131
+ distance,
132
+ scratchPlaneCartesian4
133
+ );
134
+ planeAsCartesian4 = Matrix4_default.multiplyByVector(
135
+ inverseTranspose,
136
+ planeAsCartesian4,
137
+ planeAsCartesian4
138
+ );
139
+ const transformedNormal = Cartesian3_default.fromCartesian4(
140
+ planeAsCartesian4,
141
+ scratchTransformNormal
142
+ );
143
+ planeAsCartesian4 = Cartesian4_default.divideByScalar(
144
+ planeAsCartesian4,
145
+ Cartesian3_default.magnitude(transformedNormal),
146
+ planeAsCartesian4
147
+ );
148
+ return Plane.fromCartesian4(planeAsCartesian4, result);
149
+ };
150
+ Plane.clone = function(plane, result) {
151
+ Check_default.typeOf.object("plane", plane);
152
+ if (!defined_default(result)) {
153
+ return new Plane(plane.normal, plane.distance);
154
+ }
155
+ Cartesian3_default.clone(plane.normal, result.normal);
156
+ result.distance = plane.distance;
157
+ return result;
158
+ };
159
+ Plane.equals = function(left, right) {
160
+ Check_default.typeOf.object("left", left);
161
+ Check_default.typeOf.object("right", right);
162
+ return left.distance === right.distance && Cartesian3_default.equals(left.normal, right.normal);
163
+ };
164
+ Plane.ORIGIN_XY_PLANE = Object.freeze(new Plane(Cartesian3_default.UNIT_Z, 0));
165
+ Plane.ORIGIN_YZ_PLANE = Object.freeze(new Plane(Cartesian3_default.UNIT_X, 0));
166
+ Plane.ORIGIN_ZX_PLANE = Object.freeze(new Plane(Cartesian3_default.UNIT_Y, 0));
167
+ var Plane_default = Plane;
168
+
169
+ export {
170
+ Plane_default
171
+ };
@@ -0,0 +1,122 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.38
5
+ *
6
+ * Copyright 2011-2022 Cesium Contributors
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ *
20
+ * Columbus View (Pat. Pend.)
21
+ *
22
+ * Portions licensed separately.
23
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
+ */
25
+
26
+ import {
27
+ OrientedBoundingBox_default
28
+ } from "./chunk-PPJPELR6.js";
29
+ import {
30
+ Cartesian2_default,
31
+ Cartesian3_default,
32
+ Matrix3_default
33
+ } from "./chunk-ZPEGWBIN.js";
34
+ import {
35
+ Check_default
36
+ } from "./chunk-IXVT26OF.js";
37
+
38
+ // packages/engine/Source/Core/CoplanarPolygonGeometryLibrary.js
39
+ var CoplanarPolygonGeometryLibrary = {};
40
+ var scratchIntersectionPoint = new Cartesian3_default();
41
+ var scratchXAxis = new Cartesian3_default();
42
+ var scratchYAxis = new Cartesian3_default();
43
+ var scratchZAxis = new Cartesian3_default();
44
+ var obbScratch = new OrientedBoundingBox_default();
45
+ CoplanarPolygonGeometryLibrary.validOutline = function(positions) {
46
+ Check_default.defined("positions", positions);
47
+ const orientedBoundingBox = OrientedBoundingBox_default.fromPoints(
48
+ positions,
49
+ obbScratch
50
+ );
51
+ const halfAxes = orientedBoundingBox.halfAxes;
52
+ const xAxis = Matrix3_default.getColumn(halfAxes, 0, scratchXAxis);
53
+ const yAxis = Matrix3_default.getColumn(halfAxes, 1, scratchYAxis);
54
+ const zAxis = Matrix3_default.getColumn(halfAxes, 2, scratchZAxis);
55
+ const xMag = Cartesian3_default.magnitude(xAxis);
56
+ const yMag = Cartesian3_default.magnitude(yAxis);
57
+ const zMag = Cartesian3_default.magnitude(zAxis);
58
+ return !(xMag === 0 && (yMag === 0 || zMag === 0) || yMag === 0 && zMag === 0);
59
+ };
60
+ CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments = function(positions, centerResult, planeAxis1Result, planeAxis2Result) {
61
+ Check_default.defined("positions", positions);
62
+ Check_default.defined("centerResult", centerResult);
63
+ Check_default.defined("planeAxis1Result", planeAxis1Result);
64
+ Check_default.defined("planeAxis2Result", planeAxis2Result);
65
+ const orientedBoundingBox = OrientedBoundingBox_default.fromPoints(
66
+ positions,
67
+ obbScratch
68
+ );
69
+ const halfAxes = orientedBoundingBox.halfAxes;
70
+ const xAxis = Matrix3_default.getColumn(halfAxes, 0, scratchXAxis);
71
+ const yAxis = Matrix3_default.getColumn(halfAxes, 1, scratchYAxis);
72
+ const zAxis = Matrix3_default.getColumn(halfAxes, 2, scratchZAxis);
73
+ const xMag = Cartesian3_default.magnitude(xAxis);
74
+ const yMag = Cartesian3_default.magnitude(yAxis);
75
+ const zMag = Cartesian3_default.magnitude(zAxis);
76
+ const min = Math.min(xMag, yMag, zMag);
77
+ if (xMag === 0 && (yMag === 0 || zMag === 0) || yMag === 0 && zMag === 0) {
78
+ return false;
79
+ }
80
+ let planeAxis1;
81
+ let planeAxis2;
82
+ if (min === yMag || min === zMag) {
83
+ planeAxis1 = xAxis;
84
+ }
85
+ if (min === xMag) {
86
+ planeAxis1 = yAxis;
87
+ } else if (min === zMag) {
88
+ planeAxis2 = yAxis;
89
+ }
90
+ if (min === xMag || min === yMag) {
91
+ planeAxis2 = zAxis;
92
+ }
93
+ Cartesian3_default.normalize(planeAxis1, planeAxis1Result);
94
+ Cartesian3_default.normalize(planeAxis2, planeAxis2Result);
95
+ Cartesian3_default.clone(orientedBoundingBox.center, centerResult);
96
+ return true;
97
+ };
98
+ function projectTo2D(position, center, axis1, axis2, result) {
99
+ const v = Cartesian3_default.subtract(position, center, scratchIntersectionPoint);
100
+ const x = Cartesian3_default.dot(axis1, v);
101
+ const y = Cartesian3_default.dot(axis2, v);
102
+ return Cartesian2_default.fromElements(x, y, result);
103
+ }
104
+ CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction = function(center, axis1, axis2) {
105
+ return function(positions) {
106
+ const positionResults = new Array(positions.length);
107
+ for (let i = 0; i < positions.length; i++) {
108
+ positionResults[i] = projectTo2D(positions[i], center, axis1, axis2);
109
+ }
110
+ return positionResults;
111
+ };
112
+ };
113
+ CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction = function(center, axis1, axis2) {
114
+ return function(position, result) {
115
+ return projectTo2D(position, center, axis1, axis2, result);
116
+ };
117
+ };
118
+ var CoplanarPolygonGeometryLibrary_default = CoplanarPolygonGeometryLibrary;
119
+
120
+ export {
121
+ CoplanarPolygonGeometryLibrary_default
122
+ };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.38
5
+ *
6
+ * Copyright 2011-2022 Cesium Contributors
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ *
20
+ * Columbus View (Pat. Pend.)
21
+ *
22
+ * Portions licensed separately.
23
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
+ */
25
+
26
+
27
+ // packages/engine/Source/Core/GeometryOffsetAttribute.js
28
+ var GeometryOffsetAttribute = {
29
+ NONE: 0,
30
+ TOP: 1,
31
+ ALL: 2
32
+ };
33
+ var GeometryOffsetAttribute_default = Object.freeze(GeometryOffsetAttribute);
34
+
35
+ export {
36
+ GeometryOffsetAttribute_default
37
+ };