deeptwins-cesium-engine 0.0.39 → 0.0.41

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 (157) hide show
  1. package/Build/Workers/chunk-22YARAUJ.js +629 -0
  2. package/Build/Workers/chunk-27NCQCM4.js +163 -0
  3. package/Build/Workers/chunk-2HVM4MOI.js +220 -0
  4. package/Build/Workers/chunk-2PWEYBYR.js +75 -0
  5. package/Build/Workers/chunk-2UUDETVF.js +101 -0
  6. package/Build/Workers/chunk-2ZI2BRKI.js +37 -0
  7. package/Build/Workers/chunk-32DGBF6Y.js +959 -0
  8. package/Build/Workers/chunk-3CTY2CGO.js +220 -0
  9. package/Build/Workers/chunk-3Q6HPHTH.js +684 -0
  10. package/Build/Workers/chunk-4LE3SGQH.js +634 -0
  11. package/Build/Workers/chunk-4UQOXHJT.js +421 -0
  12. package/Build/Workers/chunk-5IBSBFAA.js +287 -0
  13. package/Build/Workers/chunk-5ZELPLWF.js +58 -0
  14. package/Build/Workers/chunk-666ITZYK.js +1073 -0
  15. package/Build/Workers/chunk-6IFCG35V.js +390 -0
  16. package/Build/Workers/chunk-6LFOGNRP.js +1800 -0
  17. package/Build/Workers/chunk-6QHSHP53.js +1258 -0
  18. package/Build/Workers/chunk-6XIAYRGW.js +1055 -0
  19. package/Build/Workers/chunk-73EDFMPB.js +1073 -0
  20. package/Build/Workers/chunk-76TOSCCT.js +629 -0
  21. package/Build/Workers/chunk-7ODSCNSY.js +2857 -0
  22. package/Build/Workers/chunk-ALIDMMNJ.js +10357 -0
  23. package/Build/Workers/chunk-AXTXYHVG.js +59 -0
  24. package/Build/Workers/chunk-B3DSUDQQ.js +101 -0
  25. package/Build/Workers/chunk-B7R4KLQV.js +959 -0
  26. package/Build/Workers/chunk-BR5MKJPV.js +963 -0
  27. package/Build/Workers/chunk-BSQAU7IM.js +138 -0
  28. package/Build/Workers/chunk-C2ACDJD5.js +58 -0
  29. package/Build/Workers/chunk-CET7MMFD.js +1055 -0
  30. package/Build/Workers/chunk-CZUIRW4F.js +44 -0
  31. package/Build/Workers/chunk-D6ESIYSS.js +75 -0
  32. package/Build/Workers/chunk-DGWWFN6L.js +102 -0
  33. package/Build/Workers/chunk-DPZEBUVY.js +122 -0
  34. package/Build/Workers/chunk-EKUYACAZ.js +163 -0
  35. package/Build/Workers/chunk-EOQHBUGL.js +239 -0
  36. package/Build/Workers/chunk-ETQJFLBY.js +435 -0
  37. package/Build/Workers/chunk-EZKONOBC.js +300 -0
  38. package/Build/Workers/chunk-GXRKKREQ.js +2717 -0
  39. package/Build/Workers/chunk-HDJDQBU6.js +758 -0
  40. package/Build/Workers/chunk-HOO3H5M5.js +171 -0
  41. package/Build/Workers/chunk-IOE6TIOI.js +39 -0
  42. package/Build/Workers/chunk-JRFRSSGD.js +1800 -0
  43. package/Build/Workers/chunk-JUI6MY3E.js +435 -0
  44. package/Build/Workers/chunk-JV7ZLA3D.js +398 -0
  45. package/Build/Workers/chunk-KM5VHFRK.js +100 -0
  46. package/Build/Workers/chunk-KMDXAR34.js +1481 -0
  47. package/Build/Workers/chunk-KZDZFG2L.js +157 -0
  48. package/Build/Workers/chunk-L5A2N2AG.js +262 -0
  49. package/Build/Workers/chunk-LDXSEGOX.js +2857 -0
  50. package/Build/Workers/chunk-LSUSXL5L.js +353 -0
  51. package/Build/Workers/chunk-LYJFG66W.js +196 -0
  52. package/Build/Workers/chunk-ME5FR5CS.js +511 -0
  53. package/Build/Workers/chunk-MNCDXIX2.js +691 -0
  54. package/Build/Workers/chunk-N2UJHZ4W.js +368 -0
  55. package/Build/Workers/chunk-NZU4VBYI.js +834 -0
  56. package/Build/Workers/chunk-O2ZGG4HX.js +59 -0
  57. package/Build/Workers/chunk-O7JXDDHF.js +758 -0
  58. package/Build/Workers/chunk-OHM3HXGW.js +781 -0
  59. package/Build/Workers/chunk-OUFXKPAP.js +115 -0
  60. package/Build/Workers/chunk-OY2Z6SFD.js +100 -0
  61. package/Build/Workers/chunk-P3YNN4UB.js +10357 -0
  62. package/Build/Workers/chunk-PA4JZFFM.js +353 -0
  63. package/Build/Workers/chunk-PBS2UPII.js +122 -0
  64. package/Build/Workers/chunk-QFSPETA6.js +834 -0
  65. package/Build/Workers/chunk-QSO4DE6J.js +171 -0
  66. package/Build/Workers/chunk-QSTX55K5.js +37 -0
  67. package/Build/Workers/chunk-QUJ6BNQF.js +39 -0
  68. package/Build/Workers/chunk-QXWEMH73.js +102 -0
  69. package/Build/Workers/chunk-ROPEB47Y.js +300 -0
  70. package/Build/Workers/chunk-S3RIIJID.js +781 -0
  71. package/Build/Workers/chunk-SPS2I45W.js +73 -0
  72. package/Build/Workers/chunk-SUSQ3MVC.js +684 -0
  73. package/Build/Workers/chunk-TA7O77R5.js +368 -0
  74. package/Build/Workers/chunk-TBJBVKDE.js +262 -0
  75. package/Build/Workers/chunk-TJAONFQM.js +44 -0
  76. package/Build/Workers/chunk-TJNJ6CLS.js +239 -0
  77. package/Build/Workers/chunk-TMW7OQZD.js +476 -0
  78. package/Build/Workers/chunk-U4SUBL6L.js +390 -0
  79. package/Build/Workers/chunk-U6RITS73.js +456 -0
  80. package/Build/Workers/chunk-UHPBZJQF.js +2717 -0
  81. package/Build/Workers/chunk-UHS2YM44.js +115 -0
  82. package/Build/Workers/chunk-UHYBTCZW.js +305 -0
  83. package/Build/Workers/chunk-UN3RMNI2.js +500 -0
  84. package/Build/Workers/chunk-UYS2HZVM.js +421 -0
  85. package/Build/Workers/chunk-VGP546UW.js +1481 -0
  86. package/Build/Workers/chunk-VQY5ILOS.js +500 -0
  87. package/Build/Workers/chunk-VSEDVQN7.js +305 -0
  88. package/Build/Workers/chunk-VVDHEEL6.js +55 -0
  89. package/Build/Workers/chunk-VZSNLUE3.js +287 -0
  90. package/Build/Workers/chunk-W4BJBHPZ.js +456 -0
  91. package/Build/Workers/chunk-W7KOAHR2.js +691 -0
  92. package/Build/Workers/chunk-WCYXXO6P.js +139 -0
  93. package/Build/Workers/chunk-WGHS4HMU.js +55 -0
  94. package/Build/Workers/chunk-XV4SYFDP.js +138 -0
  95. package/Build/Workers/chunk-XX7RETEX.js +1258 -0
  96. package/Build/Workers/chunk-XYFT3BAX.js +196 -0
  97. package/Build/Workers/chunk-XYMJZUFF.js +476 -0
  98. package/Build/Workers/chunk-YCU6WHSN.js +963 -0
  99. package/Build/Workers/chunk-YTCJWLQC.js +73 -0
  100. package/Build/Workers/chunk-YWEX5QFW.js +398 -0
  101. package/Build/Workers/chunk-Z2WOKKJM.js +511 -0
  102. package/Build/Workers/chunk-ZEFV3C42.js +634 -0
  103. package/Build/Workers/chunk-ZYUOPFWQ.js +139 -0
  104. package/Build/Workers/chunk-ZYYPIDBI.js +157 -0
  105. package/Build/Workers/combineGeometry.js +22 -22
  106. package/Build/Workers/createBoxGeometry.js +16 -16
  107. package/Build/Workers/createBoxOutlineGeometry.js +14 -14
  108. package/Build/Workers/createCircleGeometry.js +24 -24
  109. package/Build/Workers/createCircleOutlineGeometry.js +17 -17
  110. package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
  111. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
  112. package/Build/Workers/createCorridorGeometry.js +27 -27
  113. package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
  114. package/Build/Workers/createCylinderGeometry.js +18 -18
  115. package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
  116. package/Build/Workers/createEllipseGeometry.js +24 -24
  117. package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
  118. package/Build/Workers/createEllipsoidGeometry.js +17 -17
  119. package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
  120. package/Build/Workers/createFrustumGeometry.js +16 -16
  121. package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
  122. package/Build/Workers/createGeometry.js +22 -22
  123. package/Build/Workers/createGroundPolylineGeometry.js +20 -20
  124. package/Build/Workers/createPlaneGeometry.js +14 -14
  125. package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
  126. package/Build/Workers/createPolygonGeometry.js +30 -30
  127. package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
  128. package/Build/Workers/createPolylineGeometry.js +23 -23
  129. package/Build/Workers/createPolylineVolumeGeometry.js +29 -29
  130. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
  131. package/Build/Workers/createRectangleGeometry.js +25 -25
  132. package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
  133. package/Build/Workers/createSimplePolylineGeometry.js +21 -21
  134. package/Build/Workers/createSphereGeometry.js +17 -17
  135. package/Build/Workers/createSphereOutlineGeometry.js +16 -16
  136. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  137. package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
  138. package/Build/Workers/createVectorTileGeometries.js +22 -22
  139. package/Build/Workers/createVectorTilePoints.js +12 -12
  140. package/Build/Workers/createVectorTilePolygons.js +20 -20
  141. package/Build/Workers/createVectorTilePolylines.js +13 -13
  142. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
  143. package/Build/Workers/createVerticesFromHeightmap.js +20 -20
  144. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
  145. package/Build/Workers/createWallGeometry.js +22 -22
  146. package/Build/Workers/createWallOutlineGeometry.js +21 -21
  147. package/Build/Workers/decodeDraco.js +11 -11
  148. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  149. package/Build/Workers/decodeI3S.js +10 -10
  150. package/Build/Workers/transcodeKTX2.js +7 -7
  151. package/Build/Workers/transferTypedArrayTest.js +1 -1
  152. package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
  153. package/Source/Renderer/TextureAtlas.js +28 -1
  154. package/Source/Scene/Billboard.js +22 -0
  155. package/Source/Scene/BillboardTexture.js +95 -3
  156. package/index.js +53 -53
  157. package/package.json +1 -1
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.40
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
+ defaultValue_default
28
+ } from "./chunk-IOE6TIOI.js";
29
+
30
+ // packages/engine/Source/Core/GeometryAttributes.js
31
+ function GeometryAttributes(options) {
32
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
33
+ this.position = options.position;
34
+ this.normal = options.normal;
35
+ this.st = options.st;
36
+ this.bitangent = options.bitangent;
37
+ this.tangent = options.tangent;
38
+ this.color = options.color;
39
+ }
40
+ var GeometryAttributes_default = GeometryAttributes;
41
+
42
+ export {
43
+ GeometryAttributes_default
44
+ };
@@ -0,0 +1,75 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.40
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
+ var __create = Object.create;
27
+ var __defProp = Object.defineProperty;
28
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
29
+ var __getOwnPropNames = Object.getOwnPropertyNames;
30
+ var __getProtoOf = Object.getPrototypeOf;
31
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
32
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
33
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
34
+ }) : x)(function(x) {
35
+ if (typeof require !== "undefined") return require.apply(this, arguments);
36
+ throw Error('Dynamic require of "' + x + '" is not supported');
37
+ });
38
+ var __glob = (map) => (path) => {
39
+ var fn = map[path];
40
+ if (fn) return fn();
41
+ throw new Error("Module not found in bundle: " + path);
42
+ };
43
+ var __commonJS = (cb, mod) => function __require2() {
44
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
45
+ };
46
+ var __copyProps = (to, from, except, desc) => {
47
+ if (from && typeof from === "object" || typeof from === "function") {
48
+ for (let key of __getOwnPropNames(from))
49
+ if (!__hasOwnProp.call(to, key) && key !== except)
50
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
51
+ }
52
+ return to;
53
+ };
54
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
55
+ // If the importer is in node compatibility mode or this is not an ESM
56
+ // file that has been converted to a CommonJS file using a Babel-
57
+ // compatible transform (i.e. "__esModule" has not been set), then set
58
+ // "default" to the CommonJS "module.exports" for node compatibility.
59
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
60
+ mod
61
+ ));
62
+
63
+ // packages/engine/Source/Core/defined.js
64
+ function defined(value) {
65
+ return value !== void 0 && value !== null;
66
+ }
67
+ var defined_default = defined;
68
+
69
+ export {
70
+ __require,
71
+ __glob,
72
+ __commonJS,
73
+ __toESM,
74
+ defined_default
75
+ };
@@ -0,0 +1,102 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.39
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
+ Cartesian3_default
28
+ } from "./chunk-LDXSEGOX.js";
29
+ import {
30
+ Check_default
31
+ } from "./chunk-EKUYACAZ.js";
32
+ import {
33
+ defined_default
34
+ } from "./chunk-2PWEYBYR.js";
35
+
36
+ // packages/engine/Source/Core/EncodedCartesian3.js
37
+ function EncodedCartesian3() {
38
+ this.high = Cartesian3_default.clone(Cartesian3_default.ZERO);
39
+ this.low = Cartesian3_default.clone(Cartesian3_default.ZERO);
40
+ }
41
+ EncodedCartesian3.encode = function(value, result) {
42
+ Check_default.typeOf.number("value", value);
43
+ if (!defined_default(result)) {
44
+ result = {
45
+ high: 0,
46
+ low: 0
47
+ };
48
+ }
49
+ let doubleHigh;
50
+ if (value >= 0) {
51
+ doubleHigh = Math.floor(value / 65536) * 65536;
52
+ result.high = doubleHigh;
53
+ result.low = value - doubleHigh;
54
+ } else {
55
+ doubleHigh = Math.floor(-value / 65536) * 65536;
56
+ result.high = -doubleHigh;
57
+ result.low = value + doubleHigh;
58
+ }
59
+ return result;
60
+ };
61
+ var scratchEncode = {
62
+ high: 0,
63
+ low: 0
64
+ };
65
+ EncodedCartesian3.fromCartesian = function(cartesian, result) {
66
+ Check_default.typeOf.object("cartesian", cartesian);
67
+ if (!defined_default(result)) {
68
+ result = new EncodedCartesian3();
69
+ }
70
+ const high = result.high;
71
+ const low = result.low;
72
+ EncodedCartesian3.encode(cartesian.x, scratchEncode);
73
+ high.x = scratchEncode.high;
74
+ low.x = scratchEncode.low;
75
+ EncodedCartesian3.encode(cartesian.y, scratchEncode);
76
+ high.y = scratchEncode.high;
77
+ low.y = scratchEncode.low;
78
+ EncodedCartesian3.encode(cartesian.z, scratchEncode);
79
+ high.z = scratchEncode.high;
80
+ low.z = scratchEncode.low;
81
+ return result;
82
+ };
83
+ var encodedP = new EncodedCartesian3();
84
+ EncodedCartesian3.writeElements = function(cartesian, cartesianArray, index) {
85
+ Check_default.defined("cartesianArray", cartesianArray);
86
+ Check_default.typeOf.number("index", index);
87
+ Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
88
+ EncodedCartesian3.fromCartesian(cartesian, encodedP);
89
+ const high = encodedP.high;
90
+ const low = encodedP.low;
91
+ cartesianArray[index] = high.x;
92
+ cartesianArray[index + 1] = high.y;
93
+ cartesianArray[index + 2] = high.z;
94
+ cartesianArray[index + 3] = low.x;
95
+ cartesianArray[index + 4] = low.y;
96
+ cartesianArray[index + 5] = low.z;
97
+ };
98
+ var EncodedCartesian3_default = EncodedCartesian3;
99
+
100
+ export {
101
+ EncodedCartesian3_default
102
+ };
@@ -0,0 +1,122 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.39
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-NZU4VBYI.js";
29
+ import {
30
+ Cartesian2_default,
31
+ Cartesian3_default,
32
+ Matrix3_default
33
+ } from "./chunk-LDXSEGOX.js";
34
+ import {
35
+ Check_default
36
+ } from "./chunk-EKUYACAZ.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,163 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.39
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
+ defined_default
28
+ } from "./chunk-2PWEYBYR.js";
29
+
30
+ // packages/engine/Source/Core/DeveloperError.js
31
+ function DeveloperError(message) {
32
+ this.name = "DeveloperError";
33
+ this.message = message;
34
+ let stack;
35
+ try {
36
+ throw new Error();
37
+ } catch (e) {
38
+ stack = e.stack;
39
+ }
40
+ this.stack = stack;
41
+ }
42
+ if (defined_default(Object.create)) {
43
+ DeveloperError.prototype = Object.create(Error.prototype);
44
+ DeveloperError.prototype.constructor = DeveloperError;
45
+ }
46
+ DeveloperError.prototype.toString = function() {
47
+ let str = `${this.name}: ${this.message}`;
48
+ if (defined_default(this.stack)) {
49
+ str += `
50
+ ${this.stack.toString()}`;
51
+ }
52
+ return str;
53
+ };
54
+ DeveloperError.throwInstantiationError = function() {
55
+ throw new DeveloperError(
56
+ "This function defines an interface and should not be called directly."
57
+ );
58
+ };
59
+ var DeveloperError_default = DeveloperError;
60
+
61
+ // packages/engine/Source/Core/Check.js
62
+ var Check = {};
63
+ Check.typeOf = {};
64
+ function getUndefinedErrorMessage(name) {
65
+ return `${name} is required, actual value was undefined`;
66
+ }
67
+ function getFailedTypeErrorMessage(actual, expected, name) {
68
+ return `Expected ${name} to be typeof ${expected}, actual typeof was ${actual}`;
69
+ }
70
+ Check.defined = function(name, test) {
71
+ if (!defined_default(test)) {
72
+ throw new DeveloperError_default(getUndefinedErrorMessage(name));
73
+ }
74
+ };
75
+ Check.typeOf.func = function(name, test) {
76
+ if (typeof test !== "function") {
77
+ throw new DeveloperError_default(
78
+ getFailedTypeErrorMessage(typeof test, "function", name)
79
+ );
80
+ }
81
+ };
82
+ Check.typeOf.string = function(name, test) {
83
+ if (typeof test !== "string") {
84
+ throw new DeveloperError_default(
85
+ getFailedTypeErrorMessage(typeof test, "string", name)
86
+ );
87
+ }
88
+ };
89
+ Check.typeOf.number = function(name, test) {
90
+ if (typeof test !== "number") {
91
+ throw new DeveloperError_default(
92
+ getFailedTypeErrorMessage(typeof test, "number", name)
93
+ );
94
+ }
95
+ };
96
+ Check.typeOf.number.lessThan = function(name, test, limit) {
97
+ Check.typeOf.number(name, test);
98
+ if (test >= limit) {
99
+ throw new DeveloperError_default(
100
+ `Expected ${name} to be less than ${limit}, actual value was ${test}`
101
+ );
102
+ }
103
+ };
104
+ Check.typeOf.number.lessThanOrEquals = function(name, test, limit) {
105
+ Check.typeOf.number(name, test);
106
+ if (test > limit) {
107
+ throw new DeveloperError_default(
108
+ `Expected ${name} to be less than or equal to ${limit}, actual value was ${test}`
109
+ );
110
+ }
111
+ };
112
+ Check.typeOf.number.greaterThan = function(name, test, limit) {
113
+ Check.typeOf.number(name, test);
114
+ if (test <= limit) {
115
+ throw new DeveloperError_default(
116
+ `Expected ${name} to be greater than ${limit}, actual value was ${test}`
117
+ );
118
+ }
119
+ };
120
+ Check.typeOf.number.greaterThanOrEquals = function(name, test, limit) {
121
+ Check.typeOf.number(name, test);
122
+ if (test < limit) {
123
+ throw new DeveloperError_default(
124
+ `Expected ${name} to be greater than or equal to ${limit}, actual value was ${test}`
125
+ );
126
+ }
127
+ };
128
+ Check.typeOf.object = function(name, test) {
129
+ if (typeof test !== "object") {
130
+ throw new DeveloperError_default(
131
+ getFailedTypeErrorMessage(typeof test, "object", name)
132
+ );
133
+ }
134
+ };
135
+ Check.typeOf.bool = function(name, test) {
136
+ if (typeof test !== "boolean") {
137
+ throw new DeveloperError_default(
138
+ getFailedTypeErrorMessage(typeof test, "boolean", name)
139
+ );
140
+ }
141
+ };
142
+ Check.typeOf.bigint = function(name, test) {
143
+ if (typeof test !== "bigint") {
144
+ throw new DeveloperError_default(
145
+ getFailedTypeErrorMessage(typeof test, "bigint", name)
146
+ );
147
+ }
148
+ };
149
+ Check.typeOf.number.equals = function(name1, name2, test1, test2) {
150
+ Check.typeOf.number(name1, test1);
151
+ Check.typeOf.number(name2, test2);
152
+ if (test1 !== test2) {
153
+ throw new DeveloperError_default(
154
+ `${name1} must be equal to ${name2}, the actual values are ${test1} and ${test2}`
155
+ );
156
+ }
157
+ };
158
+ var Check_default = Check;
159
+
160
+ export {
161
+ DeveloperError_default,
162
+ Check_default
163
+ };