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,220 @@
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
+ GeographicProjection_default,
28
+ Intersect_default
29
+ } from "./chunk-LFYSBTBW.js";
30
+ import {
31
+ Rectangle_default
32
+ } from "./chunk-X2PKPXPZ.js";
33
+ import {
34
+ Cartesian2_default,
35
+ Cartographic_default,
36
+ Ellipsoid_default
37
+ } from "./chunk-O3PMNFMM.js";
38
+ import {
39
+ defaultValue_default
40
+ } from "./chunk-XATYJMDJ.js";
41
+ import {
42
+ Check_default
43
+ } from "./chunk-ZQ7S66XP.js";
44
+ import {
45
+ defined_default
46
+ } from "./chunk-5C4JSXR6.js";
47
+
48
+ // packages/engine/Source/Core/BoundingRectangle.js
49
+ function BoundingRectangle(x, y, width, height) {
50
+ this.x = defaultValue_default(x, 0);
51
+ this.y = defaultValue_default(y, 0);
52
+ this.width = defaultValue_default(width, 0);
53
+ this.height = defaultValue_default(height, 0);
54
+ }
55
+ BoundingRectangle.packedLength = 4;
56
+ BoundingRectangle.pack = function(value, array, startingIndex) {
57
+ Check_default.typeOf.object("value", value);
58
+ Check_default.defined("array", array);
59
+ startingIndex = defaultValue_default(startingIndex, 0);
60
+ array[startingIndex++] = value.x;
61
+ array[startingIndex++] = value.y;
62
+ array[startingIndex++] = value.width;
63
+ array[startingIndex] = value.height;
64
+ return array;
65
+ };
66
+ BoundingRectangle.unpack = function(array, startingIndex, result) {
67
+ Check_default.defined("array", array);
68
+ startingIndex = defaultValue_default(startingIndex, 0);
69
+ if (!defined_default(result)) {
70
+ result = new BoundingRectangle();
71
+ }
72
+ result.x = array[startingIndex++];
73
+ result.y = array[startingIndex++];
74
+ result.width = array[startingIndex++];
75
+ result.height = array[startingIndex];
76
+ return result;
77
+ };
78
+ BoundingRectangle.fromPoints = function(positions, result) {
79
+ if (!defined_default(result)) {
80
+ result = new BoundingRectangle();
81
+ }
82
+ if (!defined_default(positions) || positions.length === 0) {
83
+ result.x = 0;
84
+ result.y = 0;
85
+ result.width = 0;
86
+ result.height = 0;
87
+ return result;
88
+ }
89
+ const length = positions.length;
90
+ let minimumX = positions[0].x;
91
+ let minimumY = positions[0].y;
92
+ let maximumX = positions[0].x;
93
+ let maximumY = positions[0].y;
94
+ for (let i = 1; i < length; i++) {
95
+ const p = positions[i];
96
+ const x = p.x;
97
+ const y = p.y;
98
+ minimumX = Math.min(x, minimumX);
99
+ maximumX = Math.max(x, maximumX);
100
+ minimumY = Math.min(y, minimumY);
101
+ maximumY = Math.max(y, maximumY);
102
+ }
103
+ result.x = minimumX;
104
+ result.y = minimumY;
105
+ result.width = maximumX - minimumX;
106
+ result.height = maximumY - minimumY;
107
+ return result;
108
+ };
109
+ var defaultProjection = new GeographicProjection_default();
110
+ var fromRectangleLowerLeft = new Cartographic_default();
111
+ var fromRectangleUpperRight = new Cartographic_default();
112
+ BoundingRectangle.fromRectangle = function(rectangle, projection, result) {
113
+ if (!defined_default(result)) {
114
+ result = new BoundingRectangle();
115
+ }
116
+ if (!defined_default(rectangle)) {
117
+ result.x = 0;
118
+ result.y = 0;
119
+ result.width = 0;
120
+ result.height = 0;
121
+ return result;
122
+ }
123
+ defaultProjection._ellipsoid = Ellipsoid_default.default;
124
+ projection = defaultValue_default(projection, defaultProjection);
125
+ const lowerLeft = projection.project(
126
+ Rectangle_default.southwest(rectangle, fromRectangleLowerLeft)
127
+ );
128
+ const upperRight = projection.project(
129
+ Rectangle_default.northeast(rectangle, fromRectangleUpperRight)
130
+ );
131
+ Cartesian2_default.subtract(upperRight, lowerLeft, upperRight);
132
+ result.x = lowerLeft.x;
133
+ result.y = lowerLeft.y;
134
+ result.width = upperRight.x;
135
+ result.height = upperRight.y;
136
+ return result;
137
+ };
138
+ BoundingRectangle.clone = function(rectangle, result) {
139
+ if (!defined_default(rectangle)) {
140
+ return void 0;
141
+ }
142
+ if (!defined_default(result)) {
143
+ return new BoundingRectangle(
144
+ rectangle.x,
145
+ rectangle.y,
146
+ rectangle.width,
147
+ rectangle.height
148
+ );
149
+ }
150
+ result.x = rectangle.x;
151
+ result.y = rectangle.y;
152
+ result.width = rectangle.width;
153
+ result.height = rectangle.height;
154
+ return result;
155
+ };
156
+ BoundingRectangle.union = function(left, right, result) {
157
+ Check_default.typeOf.object("left", left);
158
+ Check_default.typeOf.object("right", right);
159
+ if (!defined_default(result)) {
160
+ result = new BoundingRectangle();
161
+ }
162
+ const lowerLeftX = Math.min(left.x, right.x);
163
+ const lowerLeftY = Math.min(left.y, right.y);
164
+ const upperRightX = Math.max(left.x + left.width, right.x + right.width);
165
+ const upperRightY = Math.max(left.y + left.height, right.y + right.height);
166
+ result.x = lowerLeftX;
167
+ result.y = lowerLeftY;
168
+ result.width = upperRightX - lowerLeftX;
169
+ result.height = upperRightY - lowerLeftY;
170
+ return result;
171
+ };
172
+ BoundingRectangle.expand = function(rectangle, point, result) {
173
+ Check_default.typeOf.object("rectangle", rectangle);
174
+ Check_default.typeOf.object("point", point);
175
+ result = BoundingRectangle.clone(rectangle, result);
176
+ const width = point.x - result.x;
177
+ const height = point.y - result.y;
178
+ if (width > result.width) {
179
+ result.width = width;
180
+ } else if (width < 0) {
181
+ result.width -= width;
182
+ result.x = point.x;
183
+ }
184
+ if (height > result.height) {
185
+ result.height = height;
186
+ } else if (height < 0) {
187
+ result.height -= height;
188
+ result.y = point.y;
189
+ }
190
+ return result;
191
+ };
192
+ BoundingRectangle.intersect = function(left, right) {
193
+ Check_default.typeOf.object("left", left);
194
+ Check_default.typeOf.object("right", right);
195
+ const leftX = left.x;
196
+ const leftY = left.y;
197
+ const rightX = right.x;
198
+ const rightY = right.y;
199
+ if (!(leftX > rightX + right.width || leftX + left.width < rightX || leftY + left.height < rightY || leftY > rightY + right.height)) {
200
+ return Intersect_default.INTERSECTING;
201
+ }
202
+ return Intersect_default.OUTSIDE;
203
+ };
204
+ BoundingRectangle.equals = function(left, right) {
205
+ return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y && left.width === right.width && left.height === right.height;
206
+ };
207
+ BoundingRectangle.prototype.clone = function(result) {
208
+ return BoundingRectangle.clone(this, result);
209
+ };
210
+ BoundingRectangle.prototype.intersect = function(right) {
211
+ return BoundingRectangle.intersect(this, right);
212
+ };
213
+ BoundingRectangle.prototype.equals = function(right) {
214
+ return BoundingRectangle.equals(this, right);
215
+ };
216
+ var BoundingRectangle_default = BoundingRectangle;
217
+
218
+ export {
219
+ BoundingRectangle_default
220
+ };
@@ -0,0 +1,163 @@
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
+ defined_default
28
+ } from "./chunk-P76UBIMX.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
+ };
@@ -0,0 +1,262 @@
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
+ WebGLConstants_default
28
+ } from "./chunk-ACV745U5.js";
29
+ import {
30
+ defaultValue_default
31
+ } from "./chunk-UBCK7AIW.js";
32
+ import {
33
+ DeveloperError_default
34
+ } from "./chunk-IXVT26OF.js";
35
+ import {
36
+ defined_default
37
+ } from "./chunk-P76UBIMX.js";
38
+
39
+ // packages/engine/Source/Core/ComponentDatatype.js
40
+ var ComponentDatatype = {
41
+ /**
42
+ * 8-bit signed byte corresponding to <code>gl.BYTE</code> and the type
43
+ * of an element in <code>Int8Array</code>.
44
+ *
45
+ * @type {number}
46
+ * @constant
47
+ */
48
+ BYTE: WebGLConstants_default.BYTE,
49
+ /**
50
+ * 8-bit unsigned byte corresponding to <code>UNSIGNED_BYTE</code> and the type
51
+ * of an element in <code>Uint8Array</code>.
52
+ *
53
+ * @type {number}
54
+ * @constant
55
+ */
56
+ UNSIGNED_BYTE: WebGLConstants_default.UNSIGNED_BYTE,
57
+ /**
58
+ * 16-bit signed short corresponding to <code>SHORT</code> and the type
59
+ * of an element in <code>Int16Array</code>.
60
+ *
61
+ * @type {number}
62
+ * @constant
63
+ */
64
+ SHORT: WebGLConstants_default.SHORT,
65
+ /**
66
+ * 16-bit unsigned short corresponding to <code>UNSIGNED_SHORT</code> and the type
67
+ * of an element in <code>Uint16Array</code>.
68
+ *
69
+ * @type {number}
70
+ * @constant
71
+ */
72
+ UNSIGNED_SHORT: WebGLConstants_default.UNSIGNED_SHORT,
73
+ /**
74
+ * 32-bit signed int corresponding to <code>INT</code> and the type
75
+ * of an element in <code>Int32Array</code>.
76
+ *
77
+ * @memberOf ComponentDatatype
78
+ *
79
+ * @type {number}
80
+ * @constant
81
+ */
82
+ INT: WebGLConstants_default.INT,
83
+ /**
84
+ * 32-bit unsigned int corresponding to <code>UNSIGNED_INT</code> and the type
85
+ * of an element in <code>Uint32Array</code>.
86
+ *
87
+ * @memberOf ComponentDatatype
88
+ *
89
+ * @type {number}
90
+ * @constant
91
+ */
92
+ UNSIGNED_INT: WebGLConstants_default.UNSIGNED_INT,
93
+ /**
94
+ * 32-bit floating-point corresponding to <code>FLOAT</code> and the type
95
+ * of an element in <code>Float32Array</code>.
96
+ *
97
+ * @type {number}
98
+ * @constant
99
+ */
100
+ FLOAT: WebGLConstants_default.FLOAT,
101
+ /**
102
+ * 64-bit floating-point corresponding to <code>gl.DOUBLE</code> (in Desktop OpenGL;
103
+ * this is not supported in WebGL, and is emulated in Cesium via {@link GeometryPipeline.encodeAttribute})
104
+ * and the type of an element in <code>Float64Array</code>.
105
+ *
106
+ * @memberOf ComponentDatatype
107
+ *
108
+ * @type {number}
109
+ * @constant
110
+ * @default 0x140A
111
+ */
112
+ DOUBLE: WebGLConstants_default.DOUBLE
113
+ };
114
+ ComponentDatatype.getSizeInBytes = function(componentDatatype) {
115
+ if (!defined_default(componentDatatype)) {
116
+ throw new DeveloperError_default("value is required.");
117
+ }
118
+ switch (componentDatatype) {
119
+ case ComponentDatatype.BYTE:
120
+ return Int8Array.BYTES_PER_ELEMENT;
121
+ case ComponentDatatype.UNSIGNED_BYTE:
122
+ return Uint8Array.BYTES_PER_ELEMENT;
123
+ case ComponentDatatype.SHORT:
124
+ return Int16Array.BYTES_PER_ELEMENT;
125
+ case ComponentDatatype.UNSIGNED_SHORT:
126
+ return Uint16Array.BYTES_PER_ELEMENT;
127
+ case ComponentDatatype.INT:
128
+ return Int32Array.BYTES_PER_ELEMENT;
129
+ case ComponentDatatype.UNSIGNED_INT:
130
+ return Uint32Array.BYTES_PER_ELEMENT;
131
+ case ComponentDatatype.FLOAT:
132
+ return Float32Array.BYTES_PER_ELEMENT;
133
+ case ComponentDatatype.DOUBLE:
134
+ return Float64Array.BYTES_PER_ELEMENT;
135
+ //>>includeStart('debug', pragmas.debug);
136
+ default:
137
+ throw new DeveloperError_default("componentDatatype is not a valid value.");
138
+ }
139
+ };
140
+ ComponentDatatype.fromTypedArray = function(array) {
141
+ if (array instanceof Int8Array) {
142
+ return ComponentDatatype.BYTE;
143
+ }
144
+ if (array instanceof Uint8Array) {
145
+ return ComponentDatatype.UNSIGNED_BYTE;
146
+ }
147
+ if (array instanceof Int16Array) {
148
+ return ComponentDatatype.SHORT;
149
+ }
150
+ if (array instanceof Uint16Array) {
151
+ return ComponentDatatype.UNSIGNED_SHORT;
152
+ }
153
+ if (array instanceof Int32Array) {
154
+ return ComponentDatatype.INT;
155
+ }
156
+ if (array instanceof Uint32Array) {
157
+ return ComponentDatatype.UNSIGNED_INT;
158
+ }
159
+ if (array instanceof Float32Array) {
160
+ return ComponentDatatype.FLOAT;
161
+ }
162
+ if (array instanceof Float64Array) {
163
+ return ComponentDatatype.DOUBLE;
164
+ }
165
+ throw new DeveloperError_default(
166
+ "array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array."
167
+ );
168
+ };
169
+ ComponentDatatype.validate = function(componentDatatype) {
170
+ return defined_default(componentDatatype) && (componentDatatype === ComponentDatatype.BYTE || componentDatatype === ComponentDatatype.UNSIGNED_BYTE || componentDatatype === ComponentDatatype.SHORT || componentDatatype === ComponentDatatype.UNSIGNED_SHORT || componentDatatype === ComponentDatatype.INT || componentDatatype === ComponentDatatype.UNSIGNED_INT || componentDatatype === ComponentDatatype.FLOAT || componentDatatype === ComponentDatatype.DOUBLE);
171
+ };
172
+ ComponentDatatype.createTypedArray = function(componentDatatype, valuesOrLength) {
173
+ if (!defined_default(componentDatatype)) {
174
+ throw new DeveloperError_default("componentDatatype is required.");
175
+ }
176
+ if (!defined_default(valuesOrLength)) {
177
+ throw new DeveloperError_default("valuesOrLength is required.");
178
+ }
179
+ switch (componentDatatype) {
180
+ case ComponentDatatype.BYTE:
181
+ return new Int8Array(valuesOrLength);
182
+ case ComponentDatatype.UNSIGNED_BYTE:
183
+ return new Uint8Array(valuesOrLength);
184
+ case ComponentDatatype.SHORT:
185
+ return new Int16Array(valuesOrLength);
186
+ case ComponentDatatype.UNSIGNED_SHORT:
187
+ return new Uint16Array(valuesOrLength);
188
+ case ComponentDatatype.INT:
189
+ return new Int32Array(valuesOrLength);
190
+ case ComponentDatatype.UNSIGNED_INT:
191
+ return new Uint32Array(valuesOrLength);
192
+ case ComponentDatatype.FLOAT:
193
+ return new Float32Array(valuesOrLength);
194
+ case ComponentDatatype.DOUBLE:
195
+ return new Float64Array(valuesOrLength);
196
+ //>>includeStart('debug', pragmas.debug);
197
+ default:
198
+ throw new DeveloperError_default("componentDatatype is not a valid value.");
199
+ }
200
+ };
201
+ ComponentDatatype.createArrayBufferView = function(componentDatatype, buffer, byteOffset, length) {
202
+ if (!defined_default(componentDatatype)) {
203
+ throw new DeveloperError_default("componentDatatype is required.");
204
+ }
205
+ if (!defined_default(buffer)) {
206
+ throw new DeveloperError_default("buffer is required.");
207
+ }
208
+ byteOffset = defaultValue_default(byteOffset, 0);
209
+ length = defaultValue_default(
210
+ length,
211
+ (buffer.byteLength - byteOffset) / ComponentDatatype.getSizeInBytes(componentDatatype)
212
+ );
213
+ switch (componentDatatype) {
214
+ case ComponentDatatype.BYTE:
215
+ return new Int8Array(buffer, byteOffset, length);
216
+ case ComponentDatatype.UNSIGNED_BYTE:
217
+ return new Uint8Array(buffer, byteOffset, length);
218
+ case ComponentDatatype.SHORT:
219
+ return new Int16Array(buffer, byteOffset, length);
220
+ case ComponentDatatype.UNSIGNED_SHORT:
221
+ return new Uint16Array(buffer, byteOffset, length);
222
+ case ComponentDatatype.INT:
223
+ return new Int32Array(buffer, byteOffset, length);
224
+ case ComponentDatatype.UNSIGNED_INT:
225
+ return new Uint32Array(buffer, byteOffset, length);
226
+ case ComponentDatatype.FLOAT:
227
+ return new Float32Array(buffer, byteOffset, length);
228
+ case ComponentDatatype.DOUBLE:
229
+ return new Float64Array(buffer, byteOffset, length);
230
+ //>>includeStart('debug', pragmas.debug);
231
+ default:
232
+ throw new DeveloperError_default("componentDatatype is not a valid value.");
233
+ }
234
+ };
235
+ ComponentDatatype.fromName = function(name) {
236
+ switch (name) {
237
+ case "BYTE":
238
+ return ComponentDatatype.BYTE;
239
+ case "UNSIGNED_BYTE":
240
+ return ComponentDatatype.UNSIGNED_BYTE;
241
+ case "SHORT":
242
+ return ComponentDatatype.SHORT;
243
+ case "UNSIGNED_SHORT":
244
+ return ComponentDatatype.UNSIGNED_SHORT;
245
+ case "INT":
246
+ return ComponentDatatype.INT;
247
+ case "UNSIGNED_INT":
248
+ return ComponentDatatype.UNSIGNED_INT;
249
+ case "FLOAT":
250
+ return ComponentDatatype.FLOAT;
251
+ case "DOUBLE":
252
+ return ComponentDatatype.DOUBLE;
253
+ //>>includeStart('debug', pragmas.debug);
254
+ default:
255
+ throw new DeveloperError_default("name is not a valid value.");
256
+ }
257
+ };
258
+ var ComponentDatatype_default = Object.freeze(ComponentDatatype);
259
+
260
+ export {
261
+ ComponentDatatype_default
262
+ };
@@ -0,0 +1,58 @@
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
+ defined_default
28
+ } from "./chunk-P76UBIMX.js";
29
+
30
+ // packages/engine/Source/Core/RuntimeError.js
31
+ function RuntimeError(message) {
32
+ this.name = "RuntimeError";
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
+ RuntimeError.prototype = Object.create(Error.prototype);
44
+ RuntimeError.prototype.constructor = RuntimeError;
45
+ }
46
+ RuntimeError.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
+ var RuntimeError_default = RuntimeError;
55
+
56
+ export {
57
+ RuntimeError_default
58
+ };