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,171 @@
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
+ Cartesian4_default,
28
+ Matrix4_default
29
+ } from "./chunk-P3YNN4UB.js";
30
+ import {
31
+ Cartesian3_default
32
+ } from "./chunk-7ODSCNSY.js";
33
+ import {
34
+ Math_default
35
+ } from "./chunk-VQY5ILOS.js";
36
+ import {
37
+ Check_default,
38
+ DeveloperError_default
39
+ } from "./chunk-27NCQCM4.js";
40
+ import {
41
+ defined_default
42
+ } from "./chunk-D6ESIYSS.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,37 @@
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
+
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
+ };
@@ -0,0 +1,39 @@
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
+
27
+ // packages/engine/Source/Core/defaultValue.js
28
+ function defaultValue(a, b) {
29
+ if (a !== void 0 && a !== null) {
30
+ return a;
31
+ }
32
+ return b;
33
+ }
34
+ defaultValue.EMPTY_OBJECT = Object.freeze({});
35
+ var defaultValue_default = defaultValue;
36
+
37
+ export {
38
+ defaultValue_default
39
+ };
@@ -0,0 +1,102 @@
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
+ Cartesian3_default
28
+ } from "./chunk-7ODSCNSY.js";
29
+ import {
30
+ Check_default
31
+ } from "./chunk-27NCQCM4.js";
32
+ import {
33
+ defined_default
34
+ } from "./chunk-D6ESIYSS.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,300 @@
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
+ Matrix2_default,
28
+ Matrix4_default,
29
+ Quaternion_default,
30
+ Rectangle_default,
31
+ Transforms_default
32
+ } from "./chunk-ALIDMMNJ.js";
33
+ import {
34
+ Cartesian2_default,
35
+ Cartesian3_default,
36
+ Cartographic_default,
37
+ Matrix3_default
38
+ } from "./chunk-LDXSEGOX.js";
39
+ import {
40
+ WebGLConstants_default
41
+ } from "./chunk-22YARAUJ.js";
42
+ import {
43
+ defaultValue_default
44
+ } from "./chunk-QUJ6BNQF.js";
45
+ import {
46
+ Check_default,
47
+ DeveloperError_default
48
+ } from "./chunk-EKUYACAZ.js";
49
+ import {
50
+ defined_default
51
+ } from "./chunk-2PWEYBYR.js";
52
+
53
+ // packages/engine/Source/Core/GeometryType.js
54
+ var GeometryType = {
55
+ NONE: 0,
56
+ TRIANGLES: 1,
57
+ LINES: 2,
58
+ POLYLINES: 3
59
+ };
60
+ var GeometryType_default = Object.freeze(GeometryType);
61
+
62
+ // packages/engine/Source/Core/PrimitiveType.js
63
+ var PrimitiveType = {
64
+ /**
65
+ * Points primitive where each vertex (or index) is a separate point.
66
+ *
67
+ * @type {number}
68
+ * @constant
69
+ */
70
+ POINTS: WebGLConstants_default.POINTS,
71
+ /**
72
+ * Lines primitive where each two vertices (or indices) is a line segment. Line segments are not necessarily connected.
73
+ *
74
+ * @type {number}
75
+ * @constant
76
+ */
77
+ LINES: WebGLConstants_default.LINES,
78
+ /**
79
+ * Line loop primitive where each vertex (or index) after the first connects a line to
80
+ * the previous vertex, and the last vertex implicitly connects to the first.
81
+ *
82
+ * @type {number}
83
+ * @constant
84
+ */
85
+ LINE_LOOP: WebGLConstants_default.LINE_LOOP,
86
+ /**
87
+ * Line strip primitive where each vertex (or index) after the first connects a line to the previous vertex.
88
+ *
89
+ * @type {number}
90
+ * @constant
91
+ */
92
+ LINE_STRIP: WebGLConstants_default.LINE_STRIP,
93
+ /**
94
+ * Triangles primitive where each three vertices (or indices) is a triangle. Triangles do not necessarily share edges.
95
+ *
96
+ * @type {number}
97
+ * @constant
98
+ */
99
+ TRIANGLES: WebGLConstants_default.TRIANGLES,
100
+ /**
101
+ * Triangle strip primitive where each vertex (or index) after the first two connect to
102
+ * the previous two vertices forming a triangle. For example, this can be used to model a wall.
103
+ *
104
+ * @type {number}
105
+ * @constant
106
+ */
107
+ TRIANGLE_STRIP: WebGLConstants_default.TRIANGLE_STRIP,
108
+ /**
109
+ * Triangle fan primitive where each vertex (or index) after the first two connect to
110
+ * the previous vertex and the first vertex forming a triangle. For example, this can be used
111
+ * to model a cone or circle.
112
+ *
113
+ * @type {number}
114
+ * @constant
115
+ */
116
+ TRIANGLE_FAN: WebGLConstants_default.TRIANGLE_FAN
117
+ };
118
+ PrimitiveType.isLines = function(primitiveType) {
119
+ return primitiveType === PrimitiveType.LINES || primitiveType === PrimitiveType.LINE_LOOP || primitiveType === PrimitiveType.LINE_STRIP;
120
+ };
121
+ PrimitiveType.isTriangles = function(primitiveType) {
122
+ return primitiveType === PrimitiveType.TRIANGLES || primitiveType === PrimitiveType.TRIANGLE_STRIP || primitiveType === PrimitiveType.TRIANGLE_FAN;
123
+ };
124
+ PrimitiveType.validate = function(primitiveType) {
125
+ return primitiveType === PrimitiveType.POINTS || primitiveType === PrimitiveType.LINES || primitiveType === PrimitiveType.LINE_LOOP || primitiveType === PrimitiveType.LINE_STRIP || primitiveType === PrimitiveType.TRIANGLES || primitiveType === PrimitiveType.TRIANGLE_STRIP || primitiveType === PrimitiveType.TRIANGLE_FAN;
126
+ };
127
+ var PrimitiveType_default = Object.freeze(PrimitiveType);
128
+
129
+ // packages/engine/Source/Core/Geometry.js
130
+ function Geometry(options) {
131
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
132
+ Check_default.typeOf.object("options.attributes", options.attributes);
133
+ this.attributes = options.attributes;
134
+ this.indices = options.indices;
135
+ this.primitiveType = defaultValue_default(
136
+ options.primitiveType,
137
+ PrimitiveType_default.TRIANGLES
138
+ );
139
+ this.boundingSphere = options.boundingSphere;
140
+ this.geometryType = defaultValue_default(options.geometryType, GeometryType_default.NONE);
141
+ this.boundingSphereCV = options.boundingSphereCV;
142
+ this.offsetAttribute = options.offsetAttribute;
143
+ }
144
+ Geometry.computeNumberOfVertices = function(geometry) {
145
+ Check_default.typeOf.object("geometry", geometry);
146
+ let numberOfVertices = -1;
147
+ for (const property in geometry.attributes) {
148
+ if (geometry.attributes.hasOwnProperty(property) && defined_default(geometry.attributes[property]) && defined_default(geometry.attributes[property].values)) {
149
+ const attribute = geometry.attributes[property];
150
+ const num = attribute.values.length / attribute.componentsPerAttribute;
151
+ if (numberOfVertices !== num && numberOfVertices !== -1) {
152
+ throw new DeveloperError_default(
153
+ "All attribute lists must have the same number of attributes."
154
+ );
155
+ }
156
+ numberOfVertices = num;
157
+ }
158
+ }
159
+ return numberOfVertices;
160
+ };
161
+ var rectangleCenterScratch = new Cartographic_default();
162
+ var enuCenterScratch = new Cartesian3_default();
163
+ var fixedFrameToEnuScratch = new Matrix4_default();
164
+ var boundingRectanglePointsCartographicScratch = [
165
+ new Cartographic_default(),
166
+ new Cartographic_default(),
167
+ new Cartographic_default()
168
+ ];
169
+ var boundingRectanglePointsEnuScratch = [
170
+ new Cartesian2_default(),
171
+ new Cartesian2_default(),
172
+ new Cartesian2_default()
173
+ ];
174
+ var points2DScratch = [new Cartesian2_default(), new Cartesian2_default(), new Cartesian2_default()];
175
+ var pointEnuScratch = new Cartesian3_default();
176
+ var enuRotationScratch = new Quaternion_default();
177
+ var enuRotationMatrixScratch = new Matrix4_default();
178
+ var rotation2DScratch = new Matrix2_default();
179
+ Geometry._textureCoordinateRotationPoints = function(positions, stRotation, ellipsoid, boundingRectangle) {
180
+ let i;
181
+ const rectangleCenter = Rectangle_default.center(
182
+ boundingRectangle,
183
+ rectangleCenterScratch
184
+ );
185
+ const enuCenter = Cartographic_default.toCartesian(
186
+ rectangleCenter,
187
+ ellipsoid,
188
+ enuCenterScratch
189
+ );
190
+ const enuToFixedFrame = Transforms_default.eastNorthUpToFixedFrame(
191
+ enuCenter,
192
+ ellipsoid,
193
+ fixedFrameToEnuScratch
194
+ );
195
+ const fixedFrameToEnu = Matrix4_default.inverse(
196
+ enuToFixedFrame,
197
+ fixedFrameToEnuScratch
198
+ );
199
+ const boundingPointsEnu = boundingRectanglePointsEnuScratch;
200
+ const boundingPointsCarto = boundingRectanglePointsCartographicScratch;
201
+ boundingPointsCarto[0].longitude = boundingRectangle.west;
202
+ boundingPointsCarto[0].latitude = boundingRectangle.south;
203
+ boundingPointsCarto[1].longitude = boundingRectangle.west;
204
+ boundingPointsCarto[1].latitude = boundingRectangle.north;
205
+ boundingPointsCarto[2].longitude = boundingRectangle.east;
206
+ boundingPointsCarto[2].latitude = boundingRectangle.south;
207
+ let posEnu = pointEnuScratch;
208
+ for (i = 0; i < 3; i++) {
209
+ Cartographic_default.toCartesian(boundingPointsCarto[i], ellipsoid, posEnu);
210
+ posEnu = Matrix4_default.multiplyByPointAsVector(fixedFrameToEnu, posEnu, posEnu);
211
+ boundingPointsEnu[i].x = posEnu.x;
212
+ boundingPointsEnu[i].y = posEnu.y;
213
+ }
214
+ const rotation = Quaternion_default.fromAxisAngle(
215
+ Cartesian3_default.UNIT_Z,
216
+ -stRotation,
217
+ enuRotationScratch
218
+ );
219
+ const textureMatrix = Matrix3_default.fromQuaternion(
220
+ rotation,
221
+ enuRotationMatrixScratch
222
+ );
223
+ const positionsLength = positions.length;
224
+ let enuMinX = Number.POSITIVE_INFINITY;
225
+ let enuMinY = Number.POSITIVE_INFINITY;
226
+ let enuMaxX = Number.NEGATIVE_INFINITY;
227
+ let enuMaxY = Number.NEGATIVE_INFINITY;
228
+ for (i = 0; i < positionsLength; i++) {
229
+ posEnu = Matrix4_default.multiplyByPointAsVector(
230
+ fixedFrameToEnu,
231
+ positions[i],
232
+ posEnu
233
+ );
234
+ posEnu = Matrix3_default.multiplyByVector(textureMatrix, posEnu, posEnu);
235
+ enuMinX = Math.min(enuMinX, posEnu.x);
236
+ enuMinY = Math.min(enuMinY, posEnu.y);
237
+ enuMaxX = Math.max(enuMaxX, posEnu.x);
238
+ enuMaxY = Math.max(enuMaxY, posEnu.y);
239
+ }
240
+ const toDesiredInComputed = Matrix2_default.fromRotation(
241
+ stRotation,
242
+ rotation2DScratch
243
+ );
244
+ const points2D = points2DScratch;
245
+ points2D[0].x = enuMinX;
246
+ points2D[0].y = enuMinY;
247
+ points2D[1].x = enuMinX;
248
+ points2D[1].y = enuMaxY;
249
+ points2D[2].x = enuMaxX;
250
+ points2D[2].y = enuMinY;
251
+ const boundingEnuMin = boundingPointsEnu[0];
252
+ const boundingPointsWidth = boundingPointsEnu[2].x - boundingEnuMin.x;
253
+ const boundingPointsHeight = boundingPointsEnu[1].y - boundingEnuMin.y;
254
+ for (i = 0; i < 3; i++) {
255
+ const point2D = points2D[i];
256
+ Matrix2_default.multiplyByVector(toDesiredInComputed, point2D, point2D);
257
+ point2D.x = (point2D.x - boundingEnuMin.x) / boundingPointsWidth;
258
+ point2D.y = (point2D.y - boundingEnuMin.y) / boundingPointsHeight;
259
+ }
260
+ const minXYCorner = points2D[0];
261
+ const maxYCorner = points2D[1];
262
+ const maxXCorner = points2D[2];
263
+ const result = new Array(6);
264
+ Cartesian2_default.pack(minXYCorner, result);
265
+ Cartesian2_default.pack(maxYCorner, result, 2);
266
+ Cartesian2_default.pack(maxXCorner, result, 4);
267
+ return result;
268
+ };
269
+ var Geometry_default = Geometry;
270
+
271
+ // packages/engine/Source/Core/GeometryAttribute.js
272
+ function GeometryAttribute(options) {
273
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
274
+ if (!defined_default(options.componentDatatype)) {
275
+ throw new DeveloperError_default("options.componentDatatype is required.");
276
+ }
277
+ if (!defined_default(options.componentsPerAttribute)) {
278
+ throw new DeveloperError_default("options.componentsPerAttribute is required.");
279
+ }
280
+ if (options.componentsPerAttribute < 1 || options.componentsPerAttribute > 4) {
281
+ throw new DeveloperError_default(
282
+ "options.componentsPerAttribute must be between 1 and 4."
283
+ );
284
+ }
285
+ if (!defined_default(options.values)) {
286
+ throw new DeveloperError_default("options.values is required.");
287
+ }
288
+ this.componentDatatype = options.componentDatatype;
289
+ this.componentsPerAttribute = options.componentsPerAttribute;
290
+ this.normalize = defaultValue_default(options.normalize, false);
291
+ this.values = options.values;
292
+ }
293
+ var GeometryAttribute_default = GeometryAttribute;
294
+
295
+ export {
296
+ GeometryType_default,
297
+ PrimitiveType_default,
298
+ Geometry_default,
299
+ GeometryAttribute_default
300
+ };