@rtzh/engine 0.0.2 → 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.
- package/Source/Scene/GltfLoader.js +2 -2
- package/package.json +1 -1
- package/Build/ThirdParty/Workers/zip-web-worker.js +0 -640
- package/Build/Workers/chunk-245NZYCR.js +0 -124
- package/Build/Workers/chunk-25BA4527.js +0 -837
- package/Build/Workers/chunk-4HXPSZRC.js +0 -1483
- package/Build/Workers/chunk-4Z26IS65.js +0 -3514
- package/Build/Workers/chunk-55IROWAX.js +0 -139
- package/Build/Workers/chunk-56XTN5NJ.js +0 -1800
- package/Build/Workers/chunk-5VZISKJF.js +0 -629
- package/Build/Workers/chunk-5WAG5YKS.js +0 -368
- package/Build/Workers/chunk-66YGZWBI.js +0 -1317
- package/Build/Workers/chunk-6H33B6OL.js +0 -37
- package/Build/Workers/chunk-6LZBBEA7.js +0 -439
- package/Build/Workers/chunk-6XJO625E.js +0 -497
- package/Build/Workers/chunk-75UGCVME.js +0 -102
- package/Build/Workers/chunk-7B23DD46.js +0 -1054
- package/Build/Workers/chunk-7NCJH26L.js +0 -352
- package/Build/Workers/chunk-AIW5F22O.js +0 -352
- package/Build/Workers/chunk-AL22JVIA.js +0 -256
- package/Build/Workers/chunk-AVSQILVI.js +0 -75
- package/Build/Workers/chunk-B2VFNYD7.js +0 -280
- package/Build/Workers/chunk-BOV6T7FO.js +0 -44
- package/Build/Workers/chunk-DP76S3IQ.js +0 -1067
- package/Build/Workers/chunk-EDIUN7V3.js +0 -219
- package/Build/Workers/chunk-EKMWNF4U.js +0 -55
- package/Build/Workers/chunk-ELXGXAYS.js +0 -682
- package/Build/Workers/chunk-FVYRV2T6.js +0 -455
- package/Build/Workers/chunk-GDIBU55R.js +0 -778
- package/Build/Workers/chunk-HAY6YE7M.js +0 -97
- package/Build/Workers/chunk-I76SRIKN.js +0 -138
- package/Build/Workers/chunk-IELTSYPZ.js +0 -241
- package/Build/Workers/chunk-J4MIJCN5.js +0 -171
- package/Build/Workers/chunk-JFO3ELF3.js +0 -642
- package/Build/Workers/chunk-K4IMD7KH.js +0 -162
- package/Build/Workers/chunk-KFMCOG26.js +0 -692
- package/Build/Workers/chunk-KH2OWUUA.js +0 -163
- package/Build/Workers/chunk-KQIZ7AFF.js +0 -8366
- package/Build/Workers/chunk-KVE5EAPO.js +0 -398
- package/Build/Workers/chunk-OAOREOSO.js +0 -940
- package/Build/Workers/chunk-OFJRMGNX.js +0 -788
- package/Build/Workers/chunk-PLLZB3R4.js +0 -198
- package/Build/Workers/chunk-POY6ZE32.js +0 -2058
- package/Build/Workers/chunk-PV5B2YNB.js +0 -2719
- package/Build/Workers/chunk-Q2DXNFYW.js +0 -414
- package/Build/Workers/chunk-QWV2DM66.js +0 -1443
- package/Build/Workers/chunk-R73BHGGI.js +0 -305
- package/Build/Workers/chunk-S3AE3MZZ.js +0 -511
- package/Build/Workers/chunk-SBFTVHRW.js +0 -57
- package/Build/Workers/chunk-SOR7PD4V.js +0 -114
- package/Build/Workers/chunk-TO7TWUET.js +0 -476
- package/Build/Workers/chunk-TSAJNE4K.js +0 -101
- package/Build/Workers/chunk-TWF4XRZ6.js +0 -73
- package/Build/Workers/chunk-UTWLMOPM.js +0 -387
- package/Build/Workers/chunk-UYT2PBMV.js +0 -58
- package/Build/Workers/chunk-WAS3IHIQ.js +0 -288
- package/Build/Workers/chunk-WO5ZNC7S.js +0 -1045
- package/Build/Workers/chunk-X65Y2JSA.js +0 -55
- package/Build/Workers/chunk-XOVHLPKW.js +0 -299
- package/Build/Workers/chunk-YPGJSFOO.js +0 -1460
- package/Build/Workers/combineGeometry.js +0 -66
- package/Build/Workers/createBoxGeometry.js +0 -58
- package/Build/Workers/createBoxOutlineGeometry.js +0 -231
- package/Build/Workers/createCircleGeometry.js +0 -201
- package/Build/Workers/createCircleOutlineGeometry.js +0 -147
- package/Build/Workers/createCoplanarPolygonGeometry.js +0 -505
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +0 -225
- package/Build/Workers/createCorridorGeometry.js +0 -1258
- package/Build/Workers/createCorridorOutlineGeometry.js +0 -563
- package/Build/Workers/createCylinderGeometry.js +0 -60
- package/Build/Workers/createCylinderOutlineGeometry.js +0 -231
- package/Build/Workers/createEllipseGeometry.js +0 -72
- package/Build/Workers/createEllipseOutlineGeometry.js +0 -65
- package/Build/Workers/createEllipsoidGeometry.js +0 -59
- package/Build/Workers/createEllipsoidOutlineGeometry.js +0 -61
- package/Build/Workers/createFrustumGeometry.js +0 -58
- package/Build/Workers/createFrustumOutlineGeometry.js +0 -234
- package/Build/Workers/createGeometry.js +0 -173
- package/Build/Workers/createGroundPolylineGeometry.js +0 -1602
- package/Build/Workers/createPlaneGeometry.js +0 -223
- package/Build/Workers/createPlaneOutlineGeometry.js +0 -124
- package/Build/Workers/createPolygonGeometry.js +0 -1404
- package/Build/Workers/createPolygonOutlineGeometry.js +0 -532
- package/Build/Workers/createPolylineGeometry.js +0 -491
- package/Build/Workers/createPolylineVolumeGeometry.js +0 -374
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +0 -272
- package/Build/Workers/createRectangleGeometry.js +0 -1264
- package/Build/Workers/createRectangleOutlineGeometry.js +0 -476
- package/Build/Workers/createSimplePolylineGeometry.js +0 -397
- package/Build/Workers/createSphereGeometry.js +0 -116
- package/Build/Workers/createSphereOutlineGeometry.js +0 -116
- package/Build/Workers/createTaskProcessorWorker.js +0 -32
- package/Build/Workers/createVectorTileClampedPolylines.js +0 -492
- package/Build/Workers/createVectorTileGeometries.js +0 -387
- package/Build/Workers/createVectorTilePoints.js +0 -114
- package/Build/Workers/createVectorTilePolygons.js +0 -386
- package/Build/Workers/createVectorTilePolylines.js +0 -262
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +0 -91
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +0 -565
- package/Build/Workers/createVerticesFromHeightmap.js +0 -2254
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -499
- package/Build/Workers/createWallGeometry.js +0 -487
- package/Build/Workers/createWallOutlineGeometry.js +0 -335
- package/Build/Workers/decodeDraco.js +0 -369
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +0 -2680
- package/Build/Workers/decodeI3S.js +0 -1339
- package/Build/Workers/gaussianSplatSorter.js +0 -62
- package/Build/Workers/gaussianSplatTextureGenerator.js +0 -68
- package/Build/Workers/incrementallyBuildTerrainPicker.js +0 -121
- package/Build/Workers/transcodeKTX2.js +0 -3463
- package/Build/Workers/transferTypedArrayTest.js +0 -41
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +0 -820
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +0 -95
|
@@ -1,225 +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
|
-
CoplanarPolygonGeometryLibrary_default
|
|
28
|
-
} from "./chunk-245NZYCR.js";
|
|
29
|
-
import "./chunk-25BA4527.js";
|
|
30
|
-
import {
|
|
31
|
-
PolygonGeometryLibrary_default
|
|
32
|
-
} from "./chunk-7B23DD46.js";
|
|
33
|
-
import "./chunk-X65Y2JSA.js";
|
|
34
|
-
import {
|
|
35
|
-
GeometryInstance_default
|
|
36
|
-
} from "./chunk-SBFTVHRW.js";
|
|
37
|
-
import {
|
|
38
|
-
GeometryPipeline_default
|
|
39
|
-
} from "./chunk-PV5B2YNB.js";
|
|
40
|
-
import "./chunk-6LZBBEA7.js";
|
|
41
|
-
import "./chunk-75UGCVME.js";
|
|
42
|
-
import "./chunk-WAS3IHIQ.js";
|
|
43
|
-
import "./chunk-K4IMD7KH.js";
|
|
44
|
-
import "./chunk-WO5ZNC7S.js";
|
|
45
|
-
import {
|
|
46
|
-
arrayRemoveDuplicates_default
|
|
47
|
-
} from "./chunk-HAY6YE7M.js";
|
|
48
|
-
import "./chunk-FVYRV2T6.js";
|
|
49
|
-
import "./chunk-66YGZWBI.js";
|
|
50
|
-
import "./chunk-J4MIJCN5.js";
|
|
51
|
-
import {
|
|
52
|
-
IndexDatatype_default
|
|
53
|
-
} from "./chunk-55IROWAX.js";
|
|
54
|
-
import {
|
|
55
|
-
GeometryAttributes_default
|
|
56
|
-
} from "./chunk-BOV6T7FO.js";
|
|
57
|
-
import {
|
|
58
|
-
GeometryAttribute_default,
|
|
59
|
-
Geometry_default,
|
|
60
|
-
PrimitiveType_default
|
|
61
|
-
} from "./chunk-XOVHLPKW.js";
|
|
62
|
-
import {
|
|
63
|
-
BoundingSphere_default
|
|
64
|
-
} from "./chunk-OAOREOSO.js";
|
|
65
|
-
import "./chunk-EKMWNF4U.js";
|
|
66
|
-
import "./chunk-KQIZ7AFF.js";
|
|
67
|
-
import "./chunk-POY6ZE32.js";
|
|
68
|
-
import {
|
|
69
|
-
ComponentDatatype_default
|
|
70
|
-
} from "./chunk-AL22JVIA.js";
|
|
71
|
-
import "./chunk-5VZISKJF.js";
|
|
72
|
-
import "./chunk-UYT2PBMV.js";
|
|
73
|
-
import {
|
|
74
|
-
Ellipsoid_default
|
|
75
|
-
} from "./chunk-YPGJSFOO.js";
|
|
76
|
-
import {
|
|
77
|
-
Cartesian3_default,
|
|
78
|
-
Frozen_default
|
|
79
|
-
} from "./chunk-QWV2DM66.js";
|
|
80
|
-
import "./chunk-6XJO625E.js";
|
|
81
|
-
import {
|
|
82
|
-
Check_default
|
|
83
|
-
} from "./chunk-KH2OWUUA.js";
|
|
84
|
-
import {
|
|
85
|
-
defined_default
|
|
86
|
-
} from "./chunk-AVSQILVI.js";
|
|
87
|
-
|
|
88
|
-
// packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js
|
|
89
|
-
function createGeometryFromPositions(positions) {
|
|
90
|
-
const length = positions.length;
|
|
91
|
-
const flatPositions = new Float64Array(length * 3);
|
|
92
|
-
const indices = IndexDatatype_default.createTypedArray(length, length * 2);
|
|
93
|
-
let positionIndex = 0;
|
|
94
|
-
let index = 0;
|
|
95
|
-
for (let i = 0; i < length; i++) {
|
|
96
|
-
const position = positions[i];
|
|
97
|
-
flatPositions[positionIndex++] = position.x;
|
|
98
|
-
flatPositions[positionIndex++] = position.y;
|
|
99
|
-
flatPositions[positionIndex++] = position.z;
|
|
100
|
-
indices[index++] = i;
|
|
101
|
-
indices[index++] = (i + 1) % length;
|
|
102
|
-
}
|
|
103
|
-
const attributes = new GeometryAttributes_default({
|
|
104
|
-
position: new GeometryAttribute_default({
|
|
105
|
-
componentDatatype: ComponentDatatype_default.DOUBLE,
|
|
106
|
-
componentsPerAttribute: 3,
|
|
107
|
-
values: flatPositions
|
|
108
|
-
})
|
|
109
|
-
});
|
|
110
|
-
return new Geometry_default({
|
|
111
|
-
attributes,
|
|
112
|
-
indices,
|
|
113
|
-
primitiveType: PrimitiveType_default.LINES
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
function CoplanarPolygonOutlineGeometry(options) {
|
|
117
|
-
options = options ?? Frozen_default.EMPTY_OBJECT;
|
|
118
|
-
const polygonHierarchy = options.polygonHierarchy;
|
|
119
|
-
Check_default.defined("options.polygonHierarchy", polygonHierarchy);
|
|
120
|
-
this._polygonHierarchy = polygonHierarchy;
|
|
121
|
-
this._workerName = "createCoplanarPolygonOutlineGeometry";
|
|
122
|
-
this.packedLength = PolygonGeometryLibrary_default.computeHierarchyPackedLength(
|
|
123
|
-
polygonHierarchy,
|
|
124
|
-
Cartesian3_default
|
|
125
|
-
) + 1;
|
|
126
|
-
}
|
|
127
|
-
CoplanarPolygonOutlineGeometry.fromPositions = function(options) {
|
|
128
|
-
options = options ?? Frozen_default.EMPTY_OBJECT;
|
|
129
|
-
Check_default.defined("options.positions", options.positions);
|
|
130
|
-
const newOptions = {
|
|
131
|
-
polygonHierarchy: {
|
|
132
|
-
positions: options.positions
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
return new CoplanarPolygonOutlineGeometry(newOptions);
|
|
136
|
-
};
|
|
137
|
-
CoplanarPolygonOutlineGeometry.pack = function(value, array, startingIndex) {
|
|
138
|
-
Check_default.typeOf.object("value", value);
|
|
139
|
-
Check_default.defined("array", array);
|
|
140
|
-
startingIndex = startingIndex ?? 0;
|
|
141
|
-
startingIndex = PolygonGeometryLibrary_default.packPolygonHierarchy(
|
|
142
|
-
value._polygonHierarchy,
|
|
143
|
-
array,
|
|
144
|
-
startingIndex,
|
|
145
|
-
Cartesian3_default
|
|
146
|
-
);
|
|
147
|
-
array[startingIndex] = value.packedLength;
|
|
148
|
-
return array;
|
|
149
|
-
};
|
|
150
|
-
var scratchOptions = {
|
|
151
|
-
polygonHierarchy: {}
|
|
152
|
-
};
|
|
153
|
-
CoplanarPolygonOutlineGeometry.unpack = function(array, startingIndex, result) {
|
|
154
|
-
Check_default.defined("array", array);
|
|
155
|
-
startingIndex = startingIndex ?? 0;
|
|
156
|
-
const polygonHierarchy = PolygonGeometryLibrary_default.unpackPolygonHierarchy(
|
|
157
|
-
array,
|
|
158
|
-
startingIndex,
|
|
159
|
-
Cartesian3_default
|
|
160
|
-
);
|
|
161
|
-
startingIndex = polygonHierarchy.startingIndex;
|
|
162
|
-
delete polygonHierarchy.startingIndex;
|
|
163
|
-
const packedLength = array[startingIndex];
|
|
164
|
-
if (!defined_default(result)) {
|
|
165
|
-
result = new CoplanarPolygonOutlineGeometry(scratchOptions);
|
|
166
|
-
}
|
|
167
|
-
result._polygonHierarchy = polygonHierarchy;
|
|
168
|
-
result.packedLength = packedLength;
|
|
169
|
-
return result;
|
|
170
|
-
};
|
|
171
|
-
CoplanarPolygonOutlineGeometry.createGeometry = function(polygonGeometry) {
|
|
172
|
-
const polygonHierarchy = polygonGeometry._polygonHierarchy;
|
|
173
|
-
let outerPositions = polygonHierarchy.positions;
|
|
174
|
-
outerPositions = arrayRemoveDuplicates_default(
|
|
175
|
-
outerPositions,
|
|
176
|
-
Cartesian3_default.equalsEpsilon,
|
|
177
|
-
true
|
|
178
|
-
);
|
|
179
|
-
if (outerPositions.length < 3) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
const isValid = CoplanarPolygonGeometryLibrary_default.validOutline(outerPositions);
|
|
183
|
-
if (!isValid) {
|
|
184
|
-
return void 0;
|
|
185
|
-
}
|
|
186
|
-
const polygons = PolygonGeometryLibrary_default.polygonOutlinesFromHierarchy(
|
|
187
|
-
polygonHierarchy,
|
|
188
|
-
false
|
|
189
|
-
);
|
|
190
|
-
if (polygons.length === 0) {
|
|
191
|
-
return void 0;
|
|
192
|
-
}
|
|
193
|
-
const geometries = [];
|
|
194
|
-
for (let i = 0; i < polygons.length; i++) {
|
|
195
|
-
const geometryInstance = new GeometryInstance_default({
|
|
196
|
-
geometry: createGeometryFromPositions(polygons[i])
|
|
197
|
-
});
|
|
198
|
-
geometries.push(geometryInstance);
|
|
199
|
-
}
|
|
200
|
-
const geometry = GeometryPipeline_default.combineInstances(geometries)[0];
|
|
201
|
-
const boundingSphere = BoundingSphere_default.fromPoints(polygonHierarchy.positions);
|
|
202
|
-
return new Geometry_default({
|
|
203
|
-
attributes: geometry.attributes,
|
|
204
|
-
indices: geometry.indices,
|
|
205
|
-
primitiveType: geometry.primitiveType,
|
|
206
|
-
boundingSphere
|
|
207
|
-
});
|
|
208
|
-
};
|
|
209
|
-
var CoplanarPolygonOutlineGeometry_default = CoplanarPolygonOutlineGeometry;
|
|
210
|
-
|
|
211
|
-
// packages/engine/Source/Workers/createCoplanarPolygonOutlineGeometry.js
|
|
212
|
-
function createCoplanarPolygonOutlineGeometry(polygonGeometry, offset) {
|
|
213
|
-
if (defined_default(offset)) {
|
|
214
|
-
polygonGeometry = CoplanarPolygonOutlineGeometry_default.unpack(
|
|
215
|
-
polygonGeometry,
|
|
216
|
-
offset
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
polygonGeometry._ellipsoid = Ellipsoid_default.clone(polygonGeometry._ellipsoid);
|
|
220
|
-
return CoplanarPolygonOutlineGeometry_default.createGeometry(polygonGeometry);
|
|
221
|
-
}
|
|
222
|
-
var createCoplanarPolygonOutlineGeometry_default = createCoplanarPolygonOutlineGeometry;
|
|
223
|
-
export {
|
|
224
|
-
createCoplanarPolygonOutlineGeometry_default as default
|
|
225
|
-
};
|