@rtzh/engine 0.0.6 → 0.0.8

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 (177) hide show
  1. package/Build/Workers/chunk-2UNHFFAZ.js +352 -0
  2. package/Build/Workers/chunk-2Y2KA6PM.js +387 -0
  3. package/Build/Workers/chunk-2ZXYLPPT.js +163 -0
  4. package/Build/Workers/chunk-32ZGDYJY.js +3514 -0
  5. package/Build/Workers/chunk-3WT5VKYM.js +101 -0
  6. package/Build/Workers/chunk-4IXXMXPJ.js +682 -0
  7. package/Build/Workers/chunk-52UUGJQ6.js +288 -0
  8. package/Build/Workers/chunk-54LZ6OUD.js +1067 -0
  9. package/Build/Workers/chunk-565HBO3F.js +352 -0
  10. package/Build/Workers/chunk-5L3PEFKO.js +629 -0
  11. package/Build/Workers/chunk-5RMI6LFO.js +692 -0
  12. package/Build/Workers/chunk-5VDZEVQX.js +788 -0
  13. package/Build/Workers/chunk-5VWFNSLF.js +44 -0
  14. package/Build/Workers/chunk-5ZMMQ7HE.js +37 -0
  15. package/Build/Workers/chunk-6BIU5AL4.js +692 -0
  16. package/Build/Workers/chunk-6KA3AJM6.js +455 -0
  17. package/Build/Workers/chunk-6MYDYE24.js +280 -0
  18. package/Build/Workers/chunk-6RUDXAFC.js +2719 -0
  19. package/Build/Workers/chunk-6YSUD2OH.js +219 -0
  20. package/Build/Workers/chunk-6YT2LZ3Z.js +1443 -0
  21. package/Build/Workers/chunk-73EGVDOC.js +398 -0
  22. package/Build/Workers/chunk-7BOVULMD.js +44 -0
  23. package/Build/Workers/chunk-7KOMCIWI.js +8366 -0
  24. package/Build/Workers/chunk-APOATHFZ.js +138 -0
  25. package/Build/Workers/chunk-AVNHAFMV.js +114 -0
  26. package/Build/Workers/chunk-AWMYTHW4.js +101 -0
  27. package/Build/Workers/chunk-BJHSYHOQ.js +97 -0
  28. package/Build/Workers/chunk-BM6ZG63T.js +171 -0
  29. package/Build/Workers/chunk-C3G2NDXM.js +162 -0
  30. package/Build/Workers/chunk-E3NHG3TR.js +1460 -0
  31. package/Build/Workers/chunk-EDVAQGDJ.js +2719 -0
  32. package/Build/Workers/chunk-EFHDO3L2.js +102 -0
  33. package/Build/Workers/chunk-EPVJ5OOH.js +8366 -0
  34. package/Build/Workers/chunk-EWDHM5NC.js +37 -0
  35. package/Build/Workers/chunk-F4Q3VOCC.js +1317 -0
  36. package/Build/Workers/chunk-FCSN7XOU.js +55 -0
  37. package/Build/Workers/chunk-FD62YGTB.js +219 -0
  38. package/Build/Workers/chunk-FHM3HFYM.js +1045 -0
  39. package/Build/Workers/chunk-FNI64UKI.js +57 -0
  40. package/Build/Workers/chunk-FRUZKVBP.js +352 -0
  41. package/Build/Workers/chunk-FYW5UQ24.js +837 -0
  42. package/Build/Workers/chunk-FYZVCB32.js +75 -0
  43. package/Build/Workers/chunk-GAQXLBFJ.js +1483 -0
  44. package/Build/Workers/chunk-GEH53ULL.js +299 -0
  45. package/Build/Workers/chunk-GLA2PT5T.js +476 -0
  46. package/Build/Workers/chunk-GWLEBUVI.js +2058 -0
  47. package/Build/Workers/chunk-GYIGOBV2.js +439 -0
  48. package/Build/Workers/chunk-H2MM7FMU.js +1054 -0
  49. package/Build/Workers/chunk-H33FCT5U.js +940 -0
  50. package/Build/Workers/chunk-HBL3QZ2L.js +642 -0
  51. package/Build/Workers/chunk-HEKLTOOR.js +1443 -0
  52. package/Build/Workers/chunk-I5JHYEIE.js +241 -0
  53. package/Build/Workers/chunk-IC2JHDCI.js +114 -0
  54. package/Build/Workers/chunk-IEEHNZ36.js +241 -0
  55. package/Build/Workers/chunk-IRG63TBY.js +55 -0
  56. package/Build/Workers/chunk-IY53MZW2.js +58 -0
  57. package/Build/Workers/chunk-J2CUNLQP.js +940 -0
  58. package/Build/Workers/chunk-J766O3PA.js +256 -0
  59. package/Build/Workers/chunk-JWEZXKBE.js +73 -0
  60. package/Build/Workers/chunk-KFOT2YV5.js +138 -0
  61. package/Build/Workers/chunk-KGQGZ7PF.js +778 -0
  62. package/Build/Workers/chunk-KMZXZUA7.js +1460 -0
  63. package/Build/Workers/chunk-KOVKY3HB.js +198 -0
  64. package/Build/Workers/chunk-KQ4ET526.js +163 -0
  65. package/Build/Workers/chunk-L2QIVAZV.js +3514 -0
  66. package/Build/Workers/chunk-LGMONS4O.js +1317 -0
  67. package/Build/Workers/chunk-LJHG4PJQ.js +305 -0
  68. package/Build/Workers/chunk-LNS36LUZ.js +2058 -0
  69. package/Build/Workers/chunk-LUUEGFLT.js +305 -0
  70. package/Build/Workers/chunk-LW2VGHDM.js +1800 -0
  71. package/Build/Workers/chunk-LXM2ZC4V.js +288 -0
  72. package/Build/Workers/chunk-LXMLERGC.js +1067 -0
  73. package/Build/Workers/chunk-MEFWVMG6.js +788 -0
  74. package/Build/Workers/chunk-MJVNNURF.js +368 -0
  75. package/Build/Workers/chunk-NJEG7WRW.js +387 -0
  76. package/Build/Workers/chunk-O224ZEA5.js +58 -0
  77. package/Build/Workers/chunk-O5ICO3AS.js +682 -0
  78. package/Build/Workers/chunk-O6T3T3V3.js +97 -0
  79. package/Build/Workers/chunk-OFTWEOW2.js +1483 -0
  80. package/Build/Workers/chunk-OIJH6LAY.js +497 -0
  81. package/Build/Workers/chunk-OJFVD5ZS.js +778 -0
  82. package/Build/Workers/chunk-OJNPKCEL.js +73 -0
  83. package/Build/Workers/chunk-PQLZOYZE.js +642 -0
  84. package/Build/Workers/chunk-PU44PXY2.js +75 -0
  85. package/Build/Workers/chunk-Q36VXWGP.js +57 -0
  86. package/Build/Workers/chunk-Q4XPVYXJ.js +476 -0
  87. package/Build/Workers/chunk-QGXE4VZ3.js +55 -0
  88. package/Build/Workers/chunk-QIEHP7O4.js +280 -0
  89. package/Build/Workers/chunk-RJVB3K2X.js +511 -0
  90. package/Build/Workers/chunk-RORZNBGJ.js +299 -0
  91. package/Build/Workers/chunk-RRBGLANL.js +55 -0
  92. package/Build/Workers/chunk-SBR7MW44.js +139 -0
  93. package/Build/Workers/chunk-SKXE77AM.js +139 -0
  94. package/Build/Workers/chunk-T4LDJBKR.js +124 -0
  95. package/Build/Workers/chunk-TQ63SH2Z.js +352 -0
  96. package/Build/Workers/chunk-U77FLUQF.js +368 -0
  97. package/Build/Workers/chunk-UIYQEJ5H.js +1054 -0
  98. package/Build/Workers/chunk-UJ72JOGF.js +511 -0
  99. package/Build/Workers/chunk-UY7I27VQ.js +1800 -0
  100. package/Build/Workers/chunk-VVKDT4J7.js +837 -0
  101. package/Build/Workers/chunk-VXDOONLH.js +162 -0
  102. package/Build/Workers/chunk-WLIQ26XU.js +455 -0
  103. package/Build/Workers/chunk-WOEPS2UA.js +171 -0
  104. package/Build/Workers/chunk-XEB4GEXW.js +629 -0
  105. package/Build/Workers/chunk-XKBR7TJB.js +398 -0
  106. package/Build/Workers/chunk-XYRT4RDI.js +1045 -0
  107. package/Build/Workers/chunk-XZINQPR6.js +124 -0
  108. package/Build/Workers/chunk-YLKTSY65.js +414 -0
  109. package/Build/Workers/chunk-YLSZYTTO.js +102 -0
  110. package/Build/Workers/chunk-YQXKIGXX.js +414 -0
  111. package/Build/Workers/chunk-YR3LX3PR.js +497 -0
  112. package/Build/Workers/chunk-ZBRVFEGF.js +256 -0
  113. package/Build/Workers/chunk-ZCPCQJBX.js +198 -0
  114. package/Build/Workers/chunk-ZS7KQSEM.js +439 -0
  115. package/Build/Workers/combineGeometry.js +24 -24
  116. package/Build/Workers/createBoxGeometry.js +18 -18
  117. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  118. package/Build/Workers/createCircleGeometry.js +26 -26
  119. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  120. package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
  121. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  122. package/Build/Workers/createCorridorGeometry.js +29 -29
  123. package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
  124. package/Build/Workers/createCylinderGeometry.js +20 -20
  125. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  126. package/Build/Workers/createEllipseGeometry.js +26 -26
  127. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  128. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  129. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  130. package/Build/Workers/createFrustumGeometry.js +18 -18
  131. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  132. package/Build/Workers/createGeometry.js +24 -24
  133. package/Build/Workers/createGroundPolylineGeometry.js +22 -22
  134. package/Build/Workers/createPlaneGeometry.js +16 -16
  135. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  136. package/Build/Workers/createPolygonGeometry.js +32 -32
  137. package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
  138. package/Build/Workers/createPolylineGeometry.js +25 -25
  139. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  140. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  141. package/Build/Workers/createRectangleGeometry.js +27 -27
  142. package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
  143. package/Build/Workers/createSimplePolylineGeometry.js +23 -23
  144. package/Build/Workers/createSphereGeometry.js +19 -19
  145. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  146. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  147. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  148. package/Build/Workers/createVectorTileGeometries.js +24 -24
  149. package/Build/Workers/createVectorTilePoints.js +13 -13
  150. package/Build/Workers/createVectorTilePolygons.js +22 -22
  151. package/Build/Workers/createVectorTilePolylines.js +14 -14
  152. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
  153. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
  154. package/Build/Workers/createVerticesFromHeightmap.js +22 -22
  155. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
  156. package/Build/Workers/createWallGeometry.js +24 -24
  157. package/Build/Workers/createWallOutlineGeometry.js +23 -23
  158. package/Build/Workers/decodeDraco.js +10 -10
  159. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  160. package/Build/Workers/decodeI3S.js +10 -10
  161. package/Build/Workers/gaussianSplatSorter.js +4 -4
  162. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  163. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  164. package/Build/Workers/transcodeKTX2.js +6 -6
  165. package/Build/Workers/transferTypedArrayTest.js +1 -1
  166. package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
  167. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  168. package/Source/Scene/Cesium3DTileset.js +36 -0
  169. package/Source/Scene/Model/BarycentricWireframePipelineStage.js +89 -30
  170. package/Source/Scene/Model/Model.js +46 -7
  171. package/Source/Scene/Model/Model3DTileContent.js +17 -5
  172. package/Source/Shaders/Model/ModelFS.glsl +34 -3
  173. package/Source/Shaders/Model/ModelFS.js +34 -3
  174. package/Source/Shaders/Model/ModelVS.glsl +4 -0
  175. package/Source/Shaders/Model/ModelVS.js +4 -0
  176. package/index.js +101 -101
  177. package/package.json +1 -1
@@ -0,0 +1,198 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.7
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
+ PolylinePipeline_default
28
+ } from "./chunk-YQXKIGXX.js";
29
+ import {
30
+ arrayRemoveDuplicates_default
31
+ } from "./chunk-O6T3T3V3.js";
32
+ import {
33
+ Cartographic_default
34
+ } from "./chunk-E3NHG3TR.js";
35
+ import {
36
+ Cartesian3_default
37
+ } from "./chunk-6YT2LZ3Z.js";
38
+ import {
39
+ Math_default
40
+ } from "./chunk-OIJH6LAY.js";
41
+ import {
42
+ defined_default
43
+ } from "./chunk-FYZVCB32.js";
44
+
45
+ // packages/engine/Source/Core/WallGeometryLibrary.js
46
+ var WallGeometryLibrary = {};
47
+ function latLonEquals(c0, c1) {
48
+ return Math_default.equalsEpsilon(c0.latitude, c1.latitude, Math_default.EPSILON10) && Math_default.equalsEpsilon(c0.longitude, c1.longitude, Math_default.EPSILON10);
49
+ }
50
+ var scratchCartographic1 = new Cartographic_default();
51
+ var scratchCartographic2 = new Cartographic_default();
52
+ function removeDuplicates(ellipsoid, positions, topHeights, bottomHeights) {
53
+ positions = arrayRemoveDuplicates_default(positions, Cartesian3_default.equalsEpsilon);
54
+ const length = positions.length;
55
+ if (length < 2) {
56
+ return;
57
+ }
58
+ const hasBottomHeights = defined_default(bottomHeights);
59
+ const hasTopHeights = defined_default(topHeights);
60
+ const cleanedPositions = new Array(length);
61
+ const cleanedTopHeights = new Array(length);
62
+ const cleanedBottomHeights = new Array(length);
63
+ const v0 = positions[0];
64
+ cleanedPositions[0] = v0;
65
+ const c0 = ellipsoid.cartesianToCartographic(v0, scratchCartographic1);
66
+ if (hasTopHeights) {
67
+ c0.height = topHeights[0];
68
+ }
69
+ cleanedTopHeights[0] = c0.height;
70
+ if (hasBottomHeights) {
71
+ cleanedBottomHeights[0] = bottomHeights[0];
72
+ } else {
73
+ cleanedBottomHeights[0] = 0;
74
+ }
75
+ const startTopHeight = cleanedTopHeights[0];
76
+ const startBottomHeight = cleanedBottomHeights[0];
77
+ let hasAllSameHeights = startTopHeight === startBottomHeight;
78
+ let index = 1;
79
+ for (let i = 1; i < length; ++i) {
80
+ const v1 = positions[i];
81
+ const c1 = ellipsoid.cartesianToCartographic(v1, scratchCartographic2);
82
+ if (hasTopHeights) {
83
+ c1.height = topHeights[i];
84
+ }
85
+ hasAllSameHeights = hasAllSameHeights && c1.height === 0;
86
+ if (!latLonEquals(c0, c1)) {
87
+ cleanedPositions[index] = v1;
88
+ cleanedTopHeights[index] = c1.height;
89
+ if (hasBottomHeights) {
90
+ cleanedBottomHeights[index] = bottomHeights[i];
91
+ } else {
92
+ cleanedBottomHeights[index] = 0;
93
+ }
94
+ hasAllSameHeights = hasAllSameHeights && cleanedTopHeights[index] === cleanedBottomHeights[index];
95
+ Cartographic_default.clone(c1, c0);
96
+ ++index;
97
+ } else if (c0.height < c1.height) {
98
+ cleanedTopHeights[index - 1] = c1.height;
99
+ }
100
+ }
101
+ if (hasAllSameHeights || index < 2) {
102
+ return;
103
+ }
104
+ cleanedPositions.length = index;
105
+ cleanedTopHeights.length = index;
106
+ cleanedBottomHeights.length = index;
107
+ return {
108
+ positions: cleanedPositions,
109
+ topHeights: cleanedTopHeights,
110
+ bottomHeights: cleanedBottomHeights
111
+ };
112
+ }
113
+ var positionsArrayScratch = new Array(2);
114
+ var heightsArrayScratch = new Array(2);
115
+ var generateArcOptionsScratch = {
116
+ positions: void 0,
117
+ height: void 0,
118
+ granularity: void 0,
119
+ ellipsoid: void 0
120
+ };
121
+ WallGeometryLibrary.computePositions = function(ellipsoid, wallPositions, maximumHeights, minimumHeights, granularity, duplicateCorners) {
122
+ const o = removeDuplicates(
123
+ ellipsoid,
124
+ wallPositions,
125
+ maximumHeights,
126
+ minimumHeights
127
+ );
128
+ if (!defined_default(o)) {
129
+ return;
130
+ }
131
+ wallPositions = o.positions;
132
+ maximumHeights = o.topHeights;
133
+ minimumHeights = o.bottomHeights;
134
+ const length = wallPositions.length;
135
+ const numCorners = length - 2;
136
+ let topPositions;
137
+ let bottomPositions;
138
+ const minDistance = Math_default.chordLength(
139
+ granularity,
140
+ ellipsoid.maximumRadius
141
+ );
142
+ const generateArcOptions = generateArcOptionsScratch;
143
+ generateArcOptions.minDistance = minDistance;
144
+ generateArcOptions.ellipsoid = ellipsoid;
145
+ if (duplicateCorners) {
146
+ let count = 0;
147
+ let i;
148
+ for (i = 0; i < length - 1; i++) {
149
+ count += PolylinePipeline_default.numberOfPoints(
150
+ wallPositions[i],
151
+ wallPositions[i + 1],
152
+ minDistance
153
+ ) + 1;
154
+ }
155
+ topPositions = new Float64Array(count * 3);
156
+ bottomPositions = new Float64Array(count * 3);
157
+ const generateArcPositions = positionsArrayScratch;
158
+ const generateArcHeights = heightsArrayScratch;
159
+ generateArcOptions.positions = generateArcPositions;
160
+ generateArcOptions.height = generateArcHeights;
161
+ let offset = 0;
162
+ for (i = 0; i < length - 1; i++) {
163
+ generateArcPositions[0] = wallPositions[i];
164
+ generateArcPositions[1] = wallPositions[i + 1];
165
+ generateArcHeights[0] = maximumHeights[i];
166
+ generateArcHeights[1] = maximumHeights[i + 1];
167
+ const pos = PolylinePipeline_default.generateArc(generateArcOptions);
168
+ topPositions.set(pos, offset);
169
+ generateArcHeights[0] = minimumHeights[i];
170
+ generateArcHeights[1] = minimumHeights[i + 1];
171
+ bottomPositions.set(
172
+ PolylinePipeline_default.generateArc(generateArcOptions),
173
+ offset
174
+ );
175
+ offset += pos.length;
176
+ }
177
+ } else {
178
+ generateArcOptions.positions = wallPositions;
179
+ generateArcOptions.height = maximumHeights;
180
+ topPositions = new Float64Array(
181
+ PolylinePipeline_default.generateArc(generateArcOptions)
182
+ );
183
+ generateArcOptions.height = minimumHeights;
184
+ bottomPositions = new Float64Array(
185
+ PolylinePipeline_default.generateArc(generateArcOptions)
186
+ );
187
+ }
188
+ return {
189
+ bottomPositions,
190
+ topPositions,
191
+ numCorners
192
+ };
193
+ };
194
+ var WallGeometryLibrary_default = WallGeometryLibrary;
195
+
196
+ export {
197
+ WallGeometryLibrary_default
198
+ };
@@ -0,0 +1,163 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.7
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-FYZVCB32.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
+ };