@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,138 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.8
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
+ Frozen_default
28
+ } from "./chunk-HEKLTOOR.js";
29
+ import {
30
+ DeveloperError_default
31
+ } from "./chunk-2ZXYLPPT.js";
32
+ import {
33
+ defined_default
34
+ } from "./chunk-PU44PXY2.js";
35
+
36
+ // packages/engine/Source/Core/VertexFormat.js
37
+ function VertexFormat(options) {
38
+ options = options ?? Frozen_default.EMPTY_OBJECT;
39
+ this.position = options.position ?? false;
40
+ this.normal = options.normal ?? false;
41
+ this.st = options.st ?? false;
42
+ this.bitangent = options.bitangent ?? false;
43
+ this.tangent = options.tangent ?? false;
44
+ this.color = options.color ?? false;
45
+ }
46
+ VertexFormat.POSITION_ONLY = Object.freeze(
47
+ new VertexFormat({
48
+ position: true
49
+ })
50
+ );
51
+ VertexFormat.POSITION_AND_NORMAL = Object.freeze(
52
+ new VertexFormat({
53
+ position: true,
54
+ normal: true
55
+ })
56
+ );
57
+ VertexFormat.POSITION_NORMAL_AND_ST = Object.freeze(
58
+ new VertexFormat({
59
+ position: true,
60
+ normal: true,
61
+ st: true
62
+ })
63
+ );
64
+ VertexFormat.POSITION_AND_ST = Object.freeze(
65
+ new VertexFormat({
66
+ position: true,
67
+ st: true
68
+ })
69
+ );
70
+ VertexFormat.POSITION_AND_COLOR = Object.freeze(
71
+ new VertexFormat({
72
+ position: true,
73
+ color: true
74
+ })
75
+ );
76
+ VertexFormat.ALL = Object.freeze(
77
+ new VertexFormat({
78
+ position: true,
79
+ normal: true,
80
+ st: true,
81
+ tangent: true,
82
+ bitangent: true
83
+ })
84
+ );
85
+ VertexFormat.DEFAULT = VertexFormat.POSITION_NORMAL_AND_ST;
86
+ VertexFormat.packedLength = 6;
87
+ VertexFormat.pack = function(value, array, startingIndex) {
88
+ if (!defined_default(value)) {
89
+ throw new DeveloperError_default("value is required");
90
+ }
91
+ if (!defined_default(array)) {
92
+ throw new DeveloperError_default("array is required");
93
+ }
94
+ startingIndex = startingIndex ?? 0;
95
+ array[startingIndex++] = value.position ? 1 : 0;
96
+ array[startingIndex++] = value.normal ? 1 : 0;
97
+ array[startingIndex++] = value.st ? 1 : 0;
98
+ array[startingIndex++] = value.tangent ? 1 : 0;
99
+ array[startingIndex++] = value.bitangent ? 1 : 0;
100
+ array[startingIndex] = value.color ? 1 : 0;
101
+ return array;
102
+ };
103
+ VertexFormat.unpack = function(array, startingIndex, result) {
104
+ if (!defined_default(array)) {
105
+ throw new DeveloperError_default("array is required");
106
+ }
107
+ startingIndex = startingIndex ?? 0;
108
+ if (!defined_default(result)) {
109
+ result = new VertexFormat();
110
+ }
111
+ result.position = array[startingIndex++] === 1;
112
+ result.normal = array[startingIndex++] === 1;
113
+ result.st = array[startingIndex++] === 1;
114
+ result.tangent = array[startingIndex++] === 1;
115
+ result.bitangent = array[startingIndex++] === 1;
116
+ result.color = array[startingIndex] === 1;
117
+ return result;
118
+ };
119
+ VertexFormat.clone = function(vertexFormat, result) {
120
+ if (!defined_default(vertexFormat)) {
121
+ return void 0;
122
+ }
123
+ if (!defined_default(result)) {
124
+ result = new VertexFormat();
125
+ }
126
+ result.position = vertexFormat.position;
127
+ result.normal = vertexFormat.normal;
128
+ result.st = vertexFormat.st;
129
+ result.tangent = vertexFormat.tangent;
130
+ result.bitangent = vertexFormat.bitangent;
131
+ result.color = vertexFormat.color;
132
+ return result;
133
+ };
134
+ var VertexFormat_default = VertexFormat;
135
+
136
+ export {
137
+ VertexFormat_default
138
+ };
@@ -0,0 +1,114 @@
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
+ Cartographic_default,
28
+ Ellipsoid_default
29
+ } from "./chunk-E3NHG3TR.js";
30
+ import {
31
+ Cartesian3_default
32
+ } from "./chunk-6YT2LZ3Z.js";
33
+ import {
34
+ Math_default
35
+ } from "./chunk-OIJH6LAY.js";
36
+ import {
37
+ DeveloperError_default
38
+ } from "./chunk-KQ4ET526.js";
39
+ import {
40
+ defined_default
41
+ } from "./chunk-FYZVCB32.js";
42
+
43
+ // packages/engine/Source/Core/WebMercatorProjection.js
44
+ function WebMercatorProjection(ellipsoid) {
45
+ this._ellipsoid = ellipsoid ?? Ellipsoid_default.WGS84;
46
+ this._semimajorAxis = this._ellipsoid.maximumRadius;
47
+ this._oneOverSemimajorAxis = 1 / this._semimajorAxis;
48
+ }
49
+ Object.defineProperties(WebMercatorProjection.prototype, {
50
+ /**
51
+ * Gets the {@link Ellipsoid}.
52
+ *
53
+ * @memberof WebMercatorProjection.prototype
54
+ *
55
+ * @type {Ellipsoid}
56
+ * @readonly
57
+ */
58
+ ellipsoid: {
59
+ get: function() {
60
+ return this._ellipsoid;
61
+ }
62
+ }
63
+ });
64
+ WebMercatorProjection.mercatorAngleToGeodeticLatitude = function(mercatorAngle) {
65
+ return Math_default.PI_OVER_TWO - 2 * Math.atan(Math.exp(-mercatorAngle));
66
+ };
67
+ WebMercatorProjection.geodeticLatitudeToMercatorAngle = function(latitude) {
68
+ if (latitude > WebMercatorProjection.MaximumLatitude) {
69
+ latitude = WebMercatorProjection.MaximumLatitude;
70
+ } else if (latitude < -WebMercatorProjection.MaximumLatitude) {
71
+ latitude = -WebMercatorProjection.MaximumLatitude;
72
+ }
73
+ const sinLatitude = Math.sin(latitude);
74
+ return 0.5 * Math.log((1 + sinLatitude) / (1 - sinLatitude));
75
+ };
76
+ WebMercatorProjection.MaximumLatitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI);
77
+ WebMercatorProjection.prototype.project = function(cartographic, result) {
78
+ const semimajorAxis = this._semimajorAxis;
79
+ const x = cartographic.longitude * semimajorAxis;
80
+ const y = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
81
+ cartographic.latitude
82
+ ) * semimajorAxis;
83
+ const z = cartographic.height;
84
+ if (!defined_default(result)) {
85
+ return new Cartesian3_default(x, y, z);
86
+ }
87
+ result.x = x;
88
+ result.y = y;
89
+ result.z = z;
90
+ return result;
91
+ };
92
+ WebMercatorProjection.prototype.unproject = function(cartesian, result) {
93
+ if (!defined_default(cartesian)) {
94
+ throw new DeveloperError_default("cartesian is required");
95
+ }
96
+ const oneOverEarthSemimajorAxis = this._oneOverSemimajorAxis;
97
+ const longitude = cartesian.x * oneOverEarthSemimajorAxis;
98
+ const latitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(
99
+ cartesian.y * oneOverEarthSemimajorAxis
100
+ );
101
+ const height = cartesian.z;
102
+ if (!defined_default(result)) {
103
+ return new Cartographic_default(longitude, latitude, height);
104
+ }
105
+ result.longitude = longitude;
106
+ result.latitude = latitude;
107
+ result.height = height;
108
+ return result;
109
+ };
110
+ var WebMercatorProjection_default = WebMercatorProjection;
111
+
112
+ export {
113
+ WebMercatorProjection_default
114
+ };
@@ -0,0 +1,101 @@
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/formatError.js
31
+ function formatError(object) {
32
+ let result;
33
+ const name = object.name;
34
+ const message = object.message;
35
+ if (defined_default(name) && defined_default(message)) {
36
+ result = `${name}: ${message}`;
37
+ } else {
38
+ result = object.toString();
39
+ }
40
+ const stack = object.stack;
41
+ if (defined_default(stack)) {
42
+ result += `
43
+ ${stack}`;
44
+ }
45
+ return result;
46
+ }
47
+ var formatError_default = formatError;
48
+
49
+ // packages/engine/Source/Workers/createTaskProcessorWorker.js
50
+ function createTaskProcessorWorker(workerFunction) {
51
+ async function onMessageHandler({ data }) {
52
+ const transferableObjects = [];
53
+ const responseMessage = {
54
+ id: data.id,
55
+ result: void 0,
56
+ error: void 0
57
+ };
58
+ self.CESIUM_BASE_URL = data.baseUrl;
59
+ try {
60
+ const result = await workerFunction(data.parameters, transferableObjects);
61
+ responseMessage.result = result;
62
+ } catch (error) {
63
+ if (error instanceof Error) {
64
+ responseMessage.error = {
65
+ name: error.name,
66
+ message: error.message,
67
+ stack: error.stack
68
+ };
69
+ } else {
70
+ responseMessage.error = error;
71
+ }
72
+ }
73
+ if (!data.canTransferArrayBuffer) {
74
+ transferableObjects.length = 0;
75
+ }
76
+ try {
77
+ postMessage(responseMessage, transferableObjects);
78
+ } catch (error) {
79
+ responseMessage.result = void 0;
80
+ responseMessage.error = `postMessage failed with error: ${formatError_default(
81
+ error
82
+ )}
83
+ with responseMessage: ${JSON.stringify(responseMessage)}`;
84
+ postMessage(responseMessage);
85
+ }
86
+ }
87
+ function onMessageErrorHandler(event) {
88
+ postMessage({
89
+ id: event.data?.id,
90
+ error: `postMessage failed with error: ${JSON.stringify(event)}`
91
+ });
92
+ }
93
+ self.onmessage = onMessageHandler;
94
+ self.onmessageerror = onMessageErrorHandler;
95
+ return self;
96
+ }
97
+ var createTaskProcessorWorker_default = createTaskProcessorWorker;
98
+
99
+ export {
100
+ createTaskProcessorWorker_default
101
+ };
@@ -0,0 +1,97 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.8
5
+ *
6
+ * Copyright 2011-2022 Cesium Contributors
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ *
20
+ * Columbus View (Pat. Pend.)
21
+ *
22
+ * Portions licensed separately.
23
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
+ */
25
+
26
+ import {
27
+ Math_default
28
+ } from "./chunk-YR3LX3PR.js";
29
+ import {
30
+ Check_default
31
+ } from "./chunk-2ZXYLPPT.js";
32
+ import {
33
+ defined_default
34
+ } from "./chunk-PU44PXY2.js";
35
+
36
+ // packages/engine/Source/Core/arrayRemoveDuplicates.js
37
+ var removeDuplicatesEpsilon = Math_default.EPSILON10;
38
+ function arrayRemoveDuplicates(values, equalsEpsilon, wrapAround, removedIndices) {
39
+ Check_default.defined("equalsEpsilon", equalsEpsilon);
40
+ if (!defined_default(values)) {
41
+ return void 0;
42
+ }
43
+ wrapAround = wrapAround ?? false;
44
+ const storeRemovedIndices = defined_default(removedIndices);
45
+ const length = values.length;
46
+ if (length < 2) {
47
+ return values;
48
+ }
49
+ let i;
50
+ let v0 = values[0];
51
+ let v1;
52
+ let cleanedValues;
53
+ let lastCleanIndex = 0;
54
+ let removedIndexLCI = -1;
55
+ for (i = 1; i < length; ++i) {
56
+ v1 = values[i];
57
+ if (equalsEpsilon(v0, v1, removeDuplicatesEpsilon)) {
58
+ if (!defined_default(cleanedValues)) {
59
+ cleanedValues = values.slice(0, i);
60
+ lastCleanIndex = i - 1;
61
+ removedIndexLCI = 0;
62
+ }
63
+ if (storeRemovedIndices) {
64
+ removedIndices.push(i);
65
+ }
66
+ } else {
67
+ if (defined_default(cleanedValues)) {
68
+ cleanedValues.push(v1);
69
+ lastCleanIndex = i;
70
+ if (storeRemovedIndices) {
71
+ removedIndexLCI = removedIndices.length;
72
+ }
73
+ }
74
+ v0 = v1;
75
+ }
76
+ }
77
+ if (wrapAround && equalsEpsilon(values[0], values[length - 1], removeDuplicatesEpsilon)) {
78
+ if (storeRemovedIndices) {
79
+ if (defined_default(cleanedValues)) {
80
+ removedIndices.splice(removedIndexLCI, 0, lastCleanIndex);
81
+ } else {
82
+ removedIndices.push(length - 1);
83
+ }
84
+ }
85
+ if (defined_default(cleanedValues)) {
86
+ cleanedValues.length -= 1;
87
+ } else {
88
+ cleanedValues = values.slice(0, -1);
89
+ }
90
+ }
91
+ return defined_default(cleanedValues) ? cleanedValues : values;
92
+ }
93
+ var arrayRemoveDuplicates_default = arrayRemoveDuplicates;
94
+
95
+ export {
96
+ arrayRemoveDuplicates_default
97
+ };
@@ -0,0 +1,171 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.8
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-GWLEBUVI.js";
30
+ import {
31
+ Cartesian3_default
32
+ } from "./chunk-HEKLTOOR.js";
33
+ import {
34
+ Math_default
35
+ } from "./chunk-YR3LX3PR.js";
36
+ import {
37
+ Check_default,
38
+ DeveloperError_default
39
+ } from "./chunk-2ZXYLPPT.js";
40
+ import {
41
+ defined_default
42
+ } from "./chunk-PU44PXY2.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
+ };