@rtzh/engine 0.0.1 → 0.0.3

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 (115) hide show
  1. package/Source/Scene/GltfLoader.js +2 -2
  2. package/Source/Scene/Model/CustomShader.js +2 -2
  3. package/index.js +504 -504
  4. package/package.json +1 -1
  5. package/Build/ThirdParty/Workers/zip-web-worker.js +0 -640
  6. package/Build/Workers/chunk-245NZYCR.js +0 -124
  7. package/Build/Workers/chunk-25BA4527.js +0 -837
  8. package/Build/Workers/chunk-4HXPSZRC.js +0 -1483
  9. package/Build/Workers/chunk-4Z26IS65.js +0 -3514
  10. package/Build/Workers/chunk-55IROWAX.js +0 -139
  11. package/Build/Workers/chunk-56XTN5NJ.js +0 -1800
  12. package/Build/Workers/chunk-5VZISKJF.js +0 -629
  13. package/Build/Workers/chunk-5WAG5YKS.js +0 -368
  14. package/Build/Workers/chunk-66YGZWBI.js +0 -1317
  15. package/Build/Workers/chunk-6H33B6OL.js +0 -37
  16. package/Build/Workers/chunk-6LZBBEA7.js +0 -439
  17. package/Build/Workers/chunk-6XJO625E.js +0 -497
  18. package/Build/Workers/chunk-75UGCVME.js +0 -102
  19. package/Build/Workers/chunk-7B23DD46.js +0 -1054
  20. package/Build/Workers/chunk-7NCJH26L.js +0 -352
  21. package/Build/Workers/chunk-AIW5F22O.js +0 -352
  22. package/Build/Workers/chunk-AL22JVIA.js +0 -256
  23. package/Build/Workers/chunk-AVSQILVI.js +0 -75
  24. package/Build/Workers/chunk-B2VFNYD7.js +0 -280
  25. package/Build/Workers/chunk-BOV6T7FO.js +0 -44
  26. package/Build/Workers/chunk-DP76S3IQ.js +0 -1067
  27. package/Build/Workers/chunk-EDIUN7V3.js +0 -219
  28. package/Build/Workers/chunk-EKMWNF4U.js +0 -55
  29. package/Build/Workers/chunk-ELXGXAYS.js +0 -682
  30. package/Build/Workers/chunk-FVYRV2T6.js +0 -455
  31. package/Build/Workers/chunk-GDIBU55R.js +0 -778
  32. package/Build/Workers/chunk-HAY6YE7M.js +0 -97
  33. package/Build/Workers/chunk-I76SRIKN.js +0 -138
  34. package/Build/Workers/chunk-IELTSYPZ.js +0 -241
  35. package/Build/Workers/chunk-J4MIJCN5.js +0 -171
  36. package/Build/Workers/chunk-JFO3ELF3.js +0 -642
  37. package/Build/Workers/chunk-K4IMD7KH.js +0 -162
  38. package/Build/Workers/chunk-KFMCOG26.js +0 -692
  39. package/Build/Workers/chunk-KH2OWUUA.js +0 -163
  40. package/Build/Workers/chunk-KQIZ7AFF.js +0 -8366
  41. package/Build/Workers/chunk-KVE5EAPO.js +0 -398
  42. package/Build/Workers/chunk-OAOREOSO.js +0 -940
  43. package/Build/Workers/chunk-OFJRMGNX.js +0 -788
  44. package/Build/Workers/chunk-PLLZB3R4.js +0 -198
  45. package/Build/Workers/chunk-POY6ZE32.js +0 -2058
  46. package/Build/Workers/chunk-PV5B2YNB.js +0 -2719
  47. package/Build/Workers/chunk-Q2DXNFYW.js +0 -414
  48. package/Build/Workers/chunk-QWV2DM66.js +0 -1443
  49. package/Build/Workers/chunk-R73BHGGI.js +0 -305
  50. package/Build/Workers/chunk-S3AE3MZZ.js +0 -511
  51. package/Build/Workers/chunk-SBFTVHRW.js +0 -57
  52. package/Build/Workers/chunk-SOR7PD4V.js +0 -114
  53. package/Build/Workers/chunk-TO7TWUET.js +0 -476
  54. package/Build/Workers/chunk-TSAJNE4K.js +0 -101
  55. package/Build/Workers/chunk-TWF4XRZ6.js +0 -73
  56. package/Build/Workers/chunk-UTWLMOPM.js +0 -387
  57. package/Build/Workers/chunk-UYT2PBMV.js +0 -58
  58. package/Build/Workers/chunk-WAS3IHIQ.js +0 -288
  59. package/Build/Workers/chunk-WO5ZNC7S.js +0 -1045
  60. package/Build/Workers/chunk-X65Y2JSA.js +0 -55
  61. package/Build/Workers/chunk-XOVHLPKW.js +0 -299
  62. package/Build/Workers/chunk-YPGJSFOO.js +0 -1460
  63. package/Build/Workers/combineGeometry.js +0 -66
  64. package/Build/Workers/createBoxGeometry.js +0 -58
  65. package/Build/Workers/createBoxOutlineGeometry.js +0 -231
  66. package/Build/Workers/createCircleGeometry.js +0 -201
  67. package/Build/Workers/createCircleOutlineGeometry.js +0 -147
  68. package/Build/Workers/createCoplanarPolygonGeometry.js +0 -505
  69. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +0 -225
  70. package/Build/Workers/createCorridorGeometry.js +0 -1258
  71. package/Build/Workers/createCorridorOutlineGeometry.js +0 -563
  72. package/Build/Workers/createCylinderGeometry.js +0 -60
  73. package/Build/Workers/createCylinderOutlineGeometry.js +0 -231
  74. package/Build/Workers/createEllipseGeometry.js +0 -72
  75. package/Build/Workers/createEllipseOutlineGeometry.js +0 -65
  76. package/Build/Workers/createEllipsoidGeometry.js +0 -59
  77. package/Build/Workers/createEllipsoidOutlineGeometry.js +0 -61
  78. package/Build/Workers/createFrustumGeometry.js +0 -58
  79. package/Build/Workers/createFrustumOutlineGeometry.js +0 -234
  80. package/Build/Workers/createGeometry.js +0 -173
  81. package/Build/Workers/createGroundPolylineGeometry.js +0 -1602
  82. package/Build/Workers/createPlaneGeometry.js +0 -223
  83. package/Build/Workers/createPlaneOutlineGeometry.js +0 -124
  84. package/Build/Workers/createPolygonGeometry.js +0 -1404
  85. package/Build/Workers/createPolygonOutlineGeometry.js +0 -532
  86. package/Build/Workers/createPolylineGeometry.js +0 -491
  87. package/Build/Workers/createPolylineVolumeGeometry.js +0 -374
  88. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +0 -272
  89. package/Build/Workers/createRectangleGeometry.js +0 -1264
  90. package/Build/Workers/createRectangleOutlineGeometry.js +0 -476
  91. package/Build/Workers/createSimplePolylineGeometry.js +0 -397
  92. package/Build/Workers/createSphereGeometry.js +0 -116
  93. package/Build/Workers/createSphereOutlineGeometry.js +0 -116
  94. package/Build/Workers/createTaskProcessorWorker.js +0 -32
  95. package/Build/Workers/createVectorTileClampedPolylines.js +0 -492
  96. package/Build/Workers/createVectorTileGeometries.js +0 -387
  97. package/Build/Workers/createVectorTilePoints.js +0 -114
  98. package/Build/Workers/createVectorTilePolygons.js +0 -386
  99. package/Build/Workers/createVectorTilePolylines.js +0 -262
  100. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +0 -91
  101. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +0 -565
  102. package/Build/Workers/createVerticesFromHeightmap.js +0 -2254
  103. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -499
  104. package/Build/Workers/createWallGeometry.js +0 -487
  105. package/Build/Workers/createWallOutlineGeometry.js +0 -335
  106. package/Build/Workers/decodeDraco.js +0 -369
  107. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +0 -2680
  108. package/Build/Workers/decodeI3S.js +0 -1339
  109. package/Build/Workers/gaussianSplatSorter.js +0 -62
  110. package/Build/Workers/gaussianSplatTextureGenerator.js +0 -68
  111. package/Build/Workers/incrementallyBuildTerrainPicker.js +0 -121
  112. package/Build/Workers/transcodeKTX2.js +0 -3463
  113. package/Build/Workers/transferTypedArrayTest.js +0 -41
  114. package/Build/Workers/upsampleQuantizedTerrainMesh.js +0 -820
  115. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +0 -95
@@ -1,55 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 0.0.1
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/ArcType.js
28
- var ArcType = {
29
- /**
30
- * Straight line that does not conform to the surface of the ellipsoid.
31
- *
32
- * @type {number}
33
- * @constant
34
- */
35
- NONE: 0,
36
- /**
37
- * Follow geodesic path.
38
- *
39
- * @type {number}
40
- * @constant
41
- */
42
- GEODESIC: 1,
43
- /**
44
- * Follow rhumb or loxodrome path.
45
- *
46
- * @type {number}
47
- * @constant
48
- */
49
- RHUMB: 2
50
- };
51
- var ArcType_default = Object.freeze(ArcType);
52
-
53
- export {
54
- ArcType_default
55
- };
@@ -1,299 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 0.0.1
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
- Quaternion_default,
29
- Rectangle_default,
30
- Transforms_default
31
- } from "./chunk-KQIZ7AFF.js";
32
- import {
33
- Matrix4_default
34
- } from "./chunk-POY6ZE32.js";
35
- import {
36
- WebGLConstants_default
37
- } from "./chunk-5VZISKJF.js";
38
- import {
39
- Cartesian2_default,
40
- Cartographic_default
41
- } from "./chunk-YPGJSFOO.js";
42
- import {
43
- Cartesian3_default,
44
- Frozen_default,
45
- Matrix3_default
46
- } from "./chunk-QWV2DM66.js";
47
- import {
48
- Check_default,
49
- DeveloperError_default
50
- } from "./chunk-KH2OWUUA.js";
51
- import {
52
- defined_default
53
- } from "./chunk-AVSQILVI.js";
54
-
55
- // packages/engine/Source/Core/GeometryType.js
56
- var GeometryType = {
57
- NONE: 0,
58
- TRIANGLES: 1,
59
- LINES: 2,
60
- POLYLINES: 3
61
- };
62
- var GeometryType_default = Object.freeze(GeometryType);
63
-
64
- // packages/engine/Source/Core/PrimitiveType.js
65
- var PrimitiveType = {
66
- /**
67
- * Points primitive where each vertex (or index) is a separate point.
68
- *
69
- * @type {number}
70
- * @constant
71
- */
72
- POINTS: WebGLConstants_default.POINTS,
73
- /**
74
- * Lines primitive where each two vertices (or indices) is a line segment. Line segments are not necessarily connected.
75
- *
76
- * @type {number}
77
- * @constant
78
- */
79
- LINES: WebGLConstants_default.LINES,
80
- /**
81
- * Line loop primitive where each vertex (or index) after the first connects a line to
82
- * the previous vertex, and the last vertex implicitly connects to the first.
83
- *
84
- * @type {number}
85
- * @constant
86
- */
87
- LINE_LOOP: WebGLConstants_default.LINE_LOOP,
88
- /**
89
- * Line strip primitive where each vertex (or index) after the first connects a line to the previous vertex.
90
- *
91
- * @type {number}
92
- * @constant
93
- */
94
- LINE_STRIP: WebGLConstants_default.LINE_STRIP,
95
- /**
96
- * Triangles primitive where each three vertices (or indices) is a triangle. Triangles do not necessarily share edges.
97
- *
98
- * @type {number}
99
- * @constant
100
- */
101
- TRIANGLES: WebGLConstants_default.TRIANGLES,
102
- /**
103
- * Triangle strip primitive where each vertex (or index) after the first two connect to
104
- * the previous two vertices forming a triangle. For example, this can be used to model a wall.
105
- *
106
- * @type {number}
107
- * @constant
108
- */
109
- TRIANGLE_STRIP: WebGLConstants_default.TRIANGLE_STRIP,
110
- /**
111
- * Triangle fan primitive where each vertex (or index) after the first two connect to
112
- * the previous vertex and the first vertex forming a triangle. For example, this can be used
113
- * to model a cone or circle.
114
- *
115
- * @type {number}
116
- * @constant
117
- */
118
- TRIANGLE_FAN: WebGLConstants_default.TRIANGLE_FAN
119
- };
120
- PrimitiveType.isLines = function(primitiveType) {
121
- return primitiveType === PrimitiveType.LINES || primitiveType === PrimitiveType.LINE_LOOP || primitiveType === PrimitiveType.LINE_STRIP;
122
- };
123
- PrimitiveType.isTriangles = function(primitiveType) {
124
- return primitiveType === PrimitiveType.TRIANGLES || primitiveType === PrimitiveType.TRIANGLE_STRIP || primitiveType === PrimitiveType.TRIANGLE_FAN;
125
- };
126
- PrimitiveType.validate = function(primitiveType) {
127
- 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;
128
- };
129
- var PrimitiveType_default = Object.freeze(PrimitiveType);
130
-
131
- // packages/engine/Source/Core/Geometry.js
132
- function Geometry(options) {
133
- options = options ?? Frozen_default.EMPTY_OBJECT;
134
- Check_default.typeOf.object("options.attributes", options.attributes);
135
- this.attributes = options.attributes;
136
- this.indices = options.indices;
137
- this.primitiveType = options.primitiveType ?? PrimitiveType_default.TRIANGLES;
138
- this.boundingSphere = options.boundingSphere;
139
- this.geometryType = options.geometryType ?? GeometryType_default.NONE;
140
- this.boundingSphereCV = options.boundingSphereCV;
141
- this.offsetAttribute = options.offsetAttribute;
142
- }
143
- Geometry.computeNumberOfVertices = function(geometry) {
144
- Check_default.typeOf.object("geometry", geometry);
145
- let numberOfVertices = -1;
146
- for (const property in geometry.attributes) {
147
- if (geometry.attributes.hasOwnProperty(property) && defined_default(geometry.attributes[property]) && defined_default(geometry.attributes[property].values)) {
148
- const attribute = geometry.attributes[property];
149
- const num = attribute.values.length / attribute.componentsPerAttribute;
150
- if (numberOfVertices !== num && numberOfVertices !== -1) {
151
- throw new DeveloperError_default(
152
- "All attribute lists must have the same number of attributes."
153
- );
154
- }
155
- numberOfVertices = num;
156
- }
157
- }
158
- return numberOfVertices;
159
- };
160
- var rectangleCenterScratch = new Cartographic_default();
161
- var enuCenterScratch = new Cartesian3_default();
162
- var fixedFrameToEnuScratch = new Matrix4_default();
163
- var boundingRectanglePointsCartographicScratch = [
164
- new Cartographic_default(),
165
- new Cartographic_default(),
166
- new Cartographic_default()
167
- ];
168
- var boundingRectanglePointsEnuScratch = [
169
- new Cartesian2_default(),
170
- new Cartesian2_default(),
171
- new Cartesian2_default()
172
- ];
173
- var points2DScratch = [new Cartesian2_default(), new Cartesian2_default(), new Cartesian2_default()];
174
- var pointEnuScratch = new Cartesian3_default();
175
- var enuRotationScratch = new Quaternion_default();
176
- var enuRotationMatrixScratch = new Matrix4_default();
177
- var rotation2DScratch = new Matrix2_default();
178
- Geometry._textureCoordinateRotationPoints = function(positions, stRotation, ellipsoid, boundingRectangle) {
179
- let i;
180
- const rectangleCenter = Rectangle_default.center(
181
- boundingRectangle,
182
- rectangleCenterScratch
183
- );
184
- const enuCenter = Cartographic_default.toCartesian(
185
- rectangleCenter,
186
- ellipsoid,
187
- enuCenterScratch
188
- );
189
- const enuToFixedFrame = Transforms_default.eastNorthUpToFixedFrame(
190
- enuCenter,
191
- ellipsoid,
192
- fixedFrameToEnuScratch
193
- );
194
- const fixedFrameToEnu = Matrix4_default.inverse(
195
- enuToFixedFrame,
196
- fixedFrameToEnuScratch
197
- );
198
- const boundingPointsEnu = boundingRectanglePointsEnuScratch;
199
- const boundingPointsCarto = boundingRectanglePointsCartographicScratch;
200
- boundingPointsCarto[0].longitude = boundingRectangle.west;
201
- boundingPointsCarto[0].latitude = boundingRectangle.south;
202
- boundingPointsCarto[1].longitude = boundingRectangle.west;
203
- boundingPointsCarto[1].latitude = boundingRectangle.north;
204
- boundingPointsCarto[2].longitude = boundingRectangle.east;
205
- boundingPointsCarto[2].latitude = boundingRectangle.south;
206
- let posEnu = pointEnuScratch;
207
- for (i = 0; i < 3; i++) {
208
- Cartographic_default.toCartesian(boundingPointsCarto[i], ellipsoid, posEnu);
209
- posEnu = Matrix4_default.multiplyByPointAsVector(fixedFrameToEnu, posEnu, posEnu);
210
- boundingPointsEnu[i].x = posEnu.x;
211
- boundingPointsEnu[i].y = posEnu.y;
212
- }
213
- const rotation = Quaternion_default.fromAxisAngle(
214
- Cartesian3_default.UNIT_Z,
215
- -stRotation,
216
- enuRotationScratch
217
- );
218
- const textureMatrix = Matrix3_default.fromQuaternion(
219
- rotation,
220
- enuRotationMatrixScratch
221
- );
222
- const positionsLength = positions.length;
223
- let enuMinX = Number.POSITIVE_INFINITY;
224
- let enuMinY = Number.POSITIVE_INFINITY;
225
- let enuMaxX = Number.NEGATIVE_INFINITY;
226
- let enuMaxY = Number.NEGATIVE_INFINITY;
227
- for (i = 0; i < positionsLength; i++) {
228
- posEnu = Matrix4_default.multiplyByPointAsVector(
229
- fixedFrameToEnu,
230
- positions[i],
231
- posEnu
232
- );
233
- posEnu = Matrix3_default.multiplyByVector(textureMatrix, posEnu, posEnu);
234
- enuMinX = Math.min(enuMinX, posEnu.x);
235
- enuMinY = Math.min(enuMinY, posEnu.y);
236
- enuMaxX = Math.max(enuMaxX, posEnu.x);
237
- enuMaxY = Math.max(enuMaxY, posEnu.y);
238
- }
239
- const toDesiredInComputed = Matrix2_default.fromRotation(
240
- stRotation,
241
- rotation2DScratch
242
- );
243
- const points2D = points2DScratch;
244
- points2D[0].x = enuMinX;
245
- points2D[0].y = enuMinY;
246
- points2D[1].x = enuMinX;
247
- points2D[1].y = enuMaxY;
248
- points2D[2].x = enuMaxX;
249
- points2D[2].y = enuMinY;
250
- const boundingEnuMin = boundingPointsEnu[0];
251
- const boundingPointsWidth = boundingPointsEnu[2].x - boundingEnuMin.x;
252
- const boundingPointsHeight = boundingPointsEnu[1].y - boundingEnuMin.y;
253
- for (i = 0; i < 3; i++) {
254
- const point2D = points2D[i];
255
- Matrix2_default.multiplyByVector(toDesiredInComputed, point2D, point2D);
256
- point2D.x = (point2D.x - boundingEnuMin.x) / boundingPointsWidth;
257
- point2D.y = (point2D.y - boundingEnuMin.y) / boundingPointsHeight;
258
- }
259
- const minXYCorner = points2D[0];
260
- const maxYCorner = points2D[1];
261
- const maxXCorner = points2D[2];
262
- const result = new Array(6);
263
- Cartesian2_default.pack(minXYCorner, result);
264
- Cartesian2_default.pack(maxYCorner, result, 2);
265
- Cartesian2_default.pack(maxXCorner, result, 4);
266
- return result;
267
- };
268
- var Geometry_default = Geometry;
269
-
270
- // packages/engine/Source/Core/GeometryAttribute.js
271
- function GeometryAttribute(options) {
272
- options = options ?? Frozen_default.EMPTY_OBJECT;
273
- if (!defined_default(options.componentDatatype)) {
274
- throw new DeveloperError_default("options.componentDatatype is required.");
275
- }
276
- if (!defined_default(options.componentsPerAttribute)) {
277
- throw new DeveloperError_default("options.componentsPerAttribute is required.");
278
- }
279
- if (options.componentsPerAttribute < 1 || options.componentsPerAttribute > 4) {
280
- throw new DeveloperError_default(
281
- "options.componentsPerAttribute must be between 1 and 4."
282
- );
283
- }
284
- if (!defined_default(options.values)) {
285
- throw new DeveloperError_default("options.values is required.");
286
- }
287
- this.componentDatatype = options.componentDatatype;
288
- this.componentsPerAttribute = options.componentsPerAttribute;
289
- this.normalize = options.normalize ?? false;
290
- this.values = options.values;
291
- }
292
- var GeometryAttribute_default = GeometryAttribute;
293
-
294
- export {
295
- GeometryType_default,
296
- PrimitiveType_default,
297
- Geometry_default,
298
- GeometryAttribute_default
299
- };