@rtzh/engine 0.0.3 → 0.0.4
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/Build/ThirdParty/Workers/zip-web-worker.js +640 -0
- package/Build/Workers/chunk-245NZYCR.js +124 -0
- package/Build/Workers/chunk-25BA4527.js +837 -0
- package/Build/Workers/chunk-2APW7KRS.js +101 -0
- package/Build/Workers/chunk-2BLQ3B4Q.js +299 -0
- package/Build/Workers/chunk-2CAIFJD5.js +387 -0
- package/Build/Workers/chunk-3K2PK2OU.js +1045 -0
- package/Build/Workers/chunk-3M5CRHSG.js +288 -0
- package/Build/Workers/chunk-4HXPSZRC.js +1483 -0
- package/Build/Workers/chunk-4Z26IS65.js +3514 -0
- package/Build/Workers/chunk-55IROWAX.js +139 -0
- package/Build/Workers/chunk-56XTN5NJ.js +1800 -0
- package/Build/Workers/chunk-5BIQOSBV.js +55 -0
- package/Build/Workers/chunk-5CSRWY7L.js +280 -0
- package/Build/Workers/chunk-5QTPACZQ.js +455 -0
- package/Build/Workers/chunk-5VZISKJF.js +629 -0
- package/Build/Workers/chunk-5WAG5YKS.js +368 -0
- package/Build/Workers/chunk-64W2RXA4.js +219 -0
- package/Build/Workers/chunk-66YGZWBI.js +1317 -0
- package/Build/Workers/chunk-6H33B6OL.js +37 -0
- package/Build/Workers/chunk-6LZBBEA7.js +439 -0
- package/Build/Workers/chunk-6QVMKRJ4.js +3514 -0
- package/Build/Workers/chunk-6XJO625E.js +497 -0
- package/Build/Workers/chunk-75UGCVME.js +102 -0
- package/Build/Workers/chunk-7B23DD46.js +1054 -0
- package/Build/Workers/chunk-7NCJH26L.js +352 -0
- package/Build/Workers/chunk-ACH67MPW.js +1483 -0
- package/Build/Workers/chunk-AIW5F22O.js +352 -0
- package/Build/Workers/chunk-AL22JVIA.js +256 -0
- package/Build/Workers/chunk-AVSQILVI.js +75 -0
- package/Build/Workers/chunk-B2VFNYD7.js +280 -0
- package/Build/Workers/chunk-BJ6WXQOW.js +305 -0
- package/Build/Workers/chunk-BN4WA7LX.js +75 -0
- package/Build/Workers/chunk-BOV6T7FO.js +44 -0
- package/Build/Workers/chunk-BXBGWQ3Z.js +171 -0
- package/Build/Workers/chunk-D7TGILR3.js +1054 -0
- package/Build/Workers/chunk-DBKYAGM6.js +1800 -0
- package/Build/Workers/chunk-DEIMB3B5.js +629 -0
- package/Build/Workers/chunk-DP76S3IQ.js +1067 -0
- package/Build/Workers/chunk-DSBEWMOQ.js +1067 -0
- package/Build/Workers/chunk-E2CARZA7.js +73 -0
- package/Build/Workers/chunk-EDIUN7V3.js +219 -0
- package/Build/Workers/chunk-EISI2CR2.js +2058 -0
- package/Build/Workers/chunk-EKMWNF4U.js +55 -0
- package/Build/Workers/chunk-ELXGXAYS.js +682 -0
- package/Build/Workers/chunk-F5LAPCFC.js +1460 -0
- package/Build/Workers/chunk-FJREGHFG.js +138 -0
- package/Build/Workers/chunk-FVYRV2T6.js +455 -0
- package/Build/Workers/chunk-GDIBU55R.js +778 -0
- package/Build/Workers/chunk-HAWJ7FMN.js +8366 -0
- package/Build/Workers/chunk-HAY6YE7M.js +97 -0
- package/Build/Workers/chunk-HGIGANIQ.js +163 -0
- package/Build/Workers/chunk-HI6X33GO.js +58 -0
- package/Build/Workers/chunk-HU5P7PMU.js +1317 -0
- package/Build/Workers/chunk-I76SRIKN.js +138 -0
- package/Build/Workers/chunk-IDVURFRN.js +241 -0
- package/Build/Workers/chunk-IELTSYPZ.js +241 -0
- package/Build/Workers/chunk-J3FBVUY4.js +37 -0
- package/Build/Workers/chunk-J4MIJCN5.js +171 -0
- package/Build/Workers/chunk-JFO3ELF3.js +642 -0
- package/Build/Workers/chunk-JH27ZGLN.js +352 -0
- package/Build/Workers/chunk-JURLMTV2.js +398 -0
- package/Build/Workers/chunk-K4IMD7KH.js +162 -0
- package/Build/Workers/chunk-KBAGFNQ4.js +139 -0
- package/Build/Workers/chunk-KFMCOG26.js +692 -0
- package/Build/Workers/chunk-KH2OWUUA.js +163 -0
- package/Build/Workers/chunk-KHKSE4WQ.js +778 -0
- package/Build/Workers/chunk-KKYQRQ57.js +368 -0
- package/Build/Workers/chunk-KQIZ7AFF.js +8366 -0
- package/Build/Workers/chunk-KUAWPGSB.js +511 -0
- package/Build/Workers/chunk-KVDSJXRK.js +114 -0
- package/Build/Workers/chunk-KVE5EAPO.js +398 -0
- package/Build/Workers/chunk-KXB3AARU.js +162 -0
- package/Build/Workers/chunk-LN4NMLYY.js +55 -0
- package/Build/Workers/chunk-LPM2FVDN.js +642 -0
- package/Build/Workers/chunk-MLFVICFZ.js +102 -0
- package/Build/Workers/chunk-MQ62ZE2U.js +124 -0
- package/Build/Workers/chunk-NOH3R3YY.js +198 -0
- package/Build/Workers/chunk-OAOREOSO.js +940 -0
- package/Build/Workers/chunk-OFJRMGNX.js +788 -0
- package/Build/Workers/chunk-OOB2KZC6.js +476 -0
- package/Build/Workers/chunk-OVPPHDU7.js +97 -0
- package/Build/Workers/chunk-P7M4VYFT.js +788 -0
- package/Build/Workers/chunk-PHB5MRHM.js +439 -0
- package/Build/Workers/chunk-PLLZB3R4.js +198 -0
- package/Build/Workers/chunk-POY6ZE32.js +2058 -0
- package/Build/Workers/chunk-PV5B2YNB.js +2719 -0
- package/Build/Workers/chunk-Q2DXNFYW.js +414 -0
- package/Build/Workers/chunk-QWV2DM66.js +1443 -0
- package/Build/Workers/chunk-R73BHGGI.js +305 -0
- package/Build/Workers/chunk-S3AE3MZZ.js +511 -0
- package/Build/Workers/chunk-SBFTVHRW.js +57 -0
- package/Build/Workers/chunk-SOR7PD4V.js +114 -0
- package/Build/Workers/chunk-TDI7UQBO.js +57 -0
- package/Build/Workers/chunk-TO7TWUET.js +476 -0
- package/Build/Workers/chunk-TSAJNE4K.js +101 -0
- package/Build/Workers/chunk-TWF4XRZ6.js +73 -0
- package/Build/Workers/chunk-U364CIW4.js +682 -0
- package/Build/Workers/chunk-UOD5YNH3.js +940 -0
- package/Build/Workers/chunk-UTWLMOPM.js +387 -0
- package/Build/Workers/chunk-UUJXSLQ2.js +2719 -0
- package/Build/Workers/chunk-UYT2PBMV.js +58 -0
- package/Build/Workers/chunk-VIYQ56Z7.js +837 -0
- package/Build/Workers/chunk-VR2L2Y4Z.js +1443 -0
- package/Build/Workers/chunk-WAS3IHIQ.js +288 -0
- package/Build/Workers/chunk-WLREXLZ7.js +414 -0
- package/Build/Workers/chunk-WMGESUDW.js +497 -0
- package/Build/Workers/chunk-WO5ZNC7S.js +1045 -0
- package/Build/Workers/chunk-X65Y2JSA.js +55 -0
- package/Build/Workers/chunk-XJKMLTSH.js +692 -0
- package/Build/Workers/chunk-XOVHLPKW.js +299 -0
- package/Build/Workers/chunk-YBVMSCW4.js +352 -0
- package/Build/Workers/chunk-YPGJSFOO.js +1460 -0
- package/Build/Workers/chunk-Z356SW7E.js +256 -0
- package/Build/Workers/chunk-ZV42SJKS.js +44 -0
- package/Build/Workers/combineGeometry.js +66 -0
- package/Build/Workers/createBoxGeometry.js +58 -0
- package/Build/Workers/createBoxOutlineGeometry.js +231 -0
- package/Build/Workers/createCircleGeometry.js +201 -0
- package/Build/Workers/createCircleOutlineGeometry.js +147 -0
- package/Build/Workers/createCoplanarPolygonGeometry.js +505 -0
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +225 -0
- package/Build/Workers/createCorridorGeometry.js +1258 -0
- package/Build/Workers/createCorridorOutlineGeometry.js +563 -0
- package/Build/Workers/createCylinderGeometry.js +60 -0
- package/Build/Workers/createCylinderOutlineGeometry.js +231 -0
- package/Build/Workers/createEllipseGeometry.js +72 -0
- package/Build/Workers/createEllipseOutlineGeometry.js +65 -0
- package/Build/Workers/createEllipsoidGeometry.js +59 -0
- package/Build/Workers/createEllipsoidOutlineGeometry.js +61 -0
- package/Build/Workers/createFrustumGeometry.js +58 -0
- package/Build/Workers/createFrustumOutlineGeometry.js +234 -0
- package/Build/Workers/createGeometry.js +173 -0
- package/Build/Workers/createGroundPolylineGeometry.js +1602 -0
- package/Build/Workers/createPlaneGeometry.js +223 -0
- package/Build/Workers/createPlaneOutlineGeometry.js +124 -0
- package/Build/Workers/createPolygonGeometry.js +1404 -0
- package/Build/Workers/createPolygonOutlineGeometry.js +532 -0
- package/Build/Workers/createPolylineGeometry.js +491 -0
- package/Build/Workers/createPolylineVolumeGeometry.js +374 -0
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +272 -0
- package/Build/Workers/createRectangleGeometry.js +1264 -0
- package/Build/Workers/createRectangleOutlineGeometry.js +476 -0
- package/Build/Workers/createSimplePolylineGeometry.js +397 -0
- package/Build/Workers/createSphereGeometry.js +116 -0
- package/Build/Workers/createSphereOutlineGeometry.js +116 -0
- package/Build/Workers/createTaskProcessorWorker.js +32 -0
- package/Build/Workers/createVectorTileClampedPolylines.js +492 -0
- package/Build/Workers/createVectorTileGeometries.js +387 -0
- package/Build/Workers/createVectorTilePoints.js +114 -0
- package/Build/Workers/createVectorTilePolygons.js +386 -0
- package/Build/Workers/createVectorTilePolylines.js +262 -0
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +91 -0
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +565 -0
- package/Build/Workers/createVerticesFromHeightmap.js +2254 -0
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +499 -0
- package/Build/Workers/createWallGeometry.js +487 -0
- package/Build/Workers/createWallOutlineGeometry.js +335 -0
- package/Build/Workers/decodeDraco.js +369 -0
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +2680 -0
- package/Build/Workers/decodeI3S.js +1339 -0
- package/Build/Workers/gaussianSplatSorter.js +62 -0
- package/Build/Workers/gaussianSplatTextureGenerator.js +68 -0
- package/Build/Workers/incrementallyBuildTerrainPicker.js +121 -0
- package/Build/Workers/transcodeKTX2.js +3463 -0
- package/Build/Workers/transferTypedArrayTest.js +41 -0
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +820 -0
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +95 -0
- package/Source/Scene/GltfLoader.js +2 -2
- package/Source/Scene/Model/I3dmLoader.js +2 -2
- package/index.js +110 -110
- package/package.json +1 -1
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.4
|
|
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
|
+
VertexFormat_default
|
|
28
|
+
} from "./chunk-FJREGHFG.js";
|
|
29
|
+
import {
|
|
30
|
+
GeometryAttributes_default
|
|
31
|
+
} from "./chunk-ZV42SJKS.js";
|
|
32
|
+
import {
|
|
33
|
+
GeometryAttribute_default,
|
|
34
|
+
Geometry_default,
|
|
35
|
+
PrimitiveType_default
|
|
36
|
+
} from "./chunk-2BLQ3B4Q.js";
|
|
37
|
+
import {
|
|
38
|
+
BoundingSphere_default
|
|
39
|
+
} from "./chunk-UOD5YNH3.js";
|
|
40
|
+
import "./chunk-5BIQOSBV.js";
|
|
41
|
+
import "./chunk-HAWJ7FMN.js";
|
|
42
|
+
import "./chunk-EISI2CR2.js";
|
|
43
|
+
import {
|
|
44
|
+
ComponentDatatype_default
|
|
45
|
+
} from "./chunk-Z356SW7E.js";
|
|
46
|
+
import "./chunk-DEIMB3B5.js";
|
|
47
|
+
import "./chunk-HI6X33GO.js";
|
|
48
|
+
import "./chunk-F5LAPCFC.js";
|
|
49
|
+
import {
|
|
50
|
+
Cartesian3_default,
|
|
51
|
+
Frozen_default
|
|
52
|
+
} from "./chunk-VR2L2Y4Z.js";
|
|
53
|
+
import "./chunk-WMGESUDW.js";
|
|
54
|
+
import {
|
|
55
|
+
Check_default
|
|
56
|
+
} from "./chunk-HGIGANIQ.js";
|
|
57
|
+
import {
|
|
58
|
+
defined_default
|
|
59
|
+
} from "./chunk-BN4WA7LX.js";
|
|
60
|
+
|
|
61
|
+
// packages/engine/Source/Core/PlaneGeometry.js
|
|
62
|
+
function PlaneGeometry(options) {
|
|
63
|
+
options = options ?? Frozen_default.EMPTY_OBJECT;
|
|
64
|
+
const vertexFormat = options.vertexFormat ?? VertexFormat_default.DEFAULT;
|
|
65
|
+
this._vertexFormat = vertexFormat;
|
|
66
|
+
this._workerName = "createPlaneGeometry";
|
|
67
|
+
}
|
|
68
|
+
PlaneGeometry.packedLength = VertexFormat_default.packedLength;
|
|
69
|
+
PlaneGeometry.pack = function(value, array, startingIndex) {
|
|
70
|
+
Check_default.typeOf.object("value", value);
|
|
71
|
+
Check_default.defined("array", array);
|
|
72
|
+
startingIndex = startingIndex ?? 0;
|
|
73
|
+
VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
|
|
74
|
+
return array;
|
|
75
|
+
};
|
|
76
|
+
var scratchVertexFormat = new VertexFormat_default();
|
|
77
|
+
var scratchOptions = {
|
|
78
|
+
vertexFormat: scratchVertexFormat
|
|
79
|
+
};
|
|
80
|
+
PlaneGeometry.unpack = function(array, startingIndex, result) {
|
|
81
|
+
Check_default.defined("array", array);
|
|
82
|
+
startingIndex = startingIndex ?? 0;
|
|
83
|
+
const vertexFormat = VertexFormat_default.unpack(
|
|
84
|
+
array,
|
|
85
|
+
startingIndex,
|
|
86
|
+
scratchVertexFormat
|
|
87
|
+
);
|
|
88
|
+
if (!defined_default(result)) {
|
|
89
|
+
return new PlaneGeometry(scratchOptions);
|
|
90
|
+
}
|
|
91
|
+
result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
|
|
92
|
+
return result;
|
|
93
|
+
};
|
|
94
|
+
var min = new Cartesian3_default(-0.5, -0.5, 0);
|
|
95
|
+
var max = new Cartesian3_default(0.5, 0.5, 0);
|
|
96
|
+
PlaneGeometry.createGeometry = function(planeGeometry) {
|
|
97
|
+
const vertexFormat = planeGeometry._vertexFormat;
|
|
98
|
+
const attributes = new GeometryAttributes_default();
|
|
99
|
+
let indices;
|
|
100
|
+
let positions;
|
|
101
|
+
if (vertexFormat.position) {
|
|
102
|
+
positions = new Float64Array(4 * 3);
|
|
103
|
+
positions[0] = min.x;
|
|
104
|
+
positions[1] = min.y;
|
|
105
|
+
positions[2] = 0;
|
|
106
|
+
positions[3] = max.x;
|
|
107
|
+
positions[4] = min.y;
|
|
108
|
+
positions[5] = 0;
|
|
109
|
+
positions[6] = max.x;
|
|
110
|
+
positions[7] = max.y;
|
|
111
|
+
positions[8] = 0;
|
|
112
|
+
positions[9] = min.x;
|
|
113
|
+
positions[10] = max.y;
|
|
114
|
+
positions[11] = 0;
|
|
115
|
+
attributes.position = new GeometryAttribute_default({
|
|
116
|
+
componentDatatype: ComponentDatatype_default.DOUBLE,
|
|
117
|
+
componentsPerAttribute: 3,
|
|
118
|
+
values: positions
|
|
119
|
+
});
|
|
120
|
+
if (vertexFormat.normal) {
|
|
121
|
+
const normals = new Float32Array(4 * 3);
|
|
122
|
+
normals[0] = 0;
|
|
123
|
+
normals[1] = 0;
|
|
124
|
+
normals[2] = 1;
|
|
125
|
+
normals[3] = 0;
|
|
126
|
+
normals[4] = 0;
|
|
127
|
+
normals[5] = 1;
|
|
128
|
+
normals[6] = 0;
|
|
129
|
+
normals[7] = 0;
|
|
130
|
+
normals[8] = 1;
|
|
131
|
+
normals[9] = 0;
|
|
132
|
+
normals[10] = 0;
|
|
133
|
+
normals[11] = 1;
|
|
134
|
+
attributes.normal = new GeometryAttribute_default({
|
|
135
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
136
|
+
componentsPerAttribute: 3,
|
|
137
|
+
values: normals
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
if (vertexFormat.st) {
|
|
141
|
+
const texCoords = new Float32Array(4 * 2);
|
|
142
|
+
texCoords[0] = 0;
|
|
143
|
+
texCoords[1] = 0;
|
|
144
|
+
texCoords[2] = 1;
|
|
145
|
+
texCoords[3] = 0;
|
|
146
|
+
texCoords[4] = 1;
|
|
147
|
+
texCoords[5] = 1;
|
|
148
|
+
texCoords[6] = 0;
|
|
149
|
+
texCoords[7] = 1;
|
|
150
|
+
attributes.st = new GeometryAttribute_default({
|
|
151
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
152
|
+
componentsPerAttribute: 2,
|
|
153
|
+
values: texCoords
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
if (vertexFormat.tangent) {
|
|
157
|
+
const tangents = new Float32Array(4 * 3);
|
|
158
|
+
tangents[0] = 1;
|
|
159
|
+
tangents[1] = 0;
|
|
160
|
+
tangents[2] = 0;
|
|
161
|
+
tangents[3] = 1;
|
|
162
|
+
tangents[4] = 0;
|
|
163
|
+
tangents[5] = 0;
|
|
164
|
+
tangents[6] = 1;
|
|
165
|
+
tangents[7] = 0;
|
|
166
|
+
tangents[8] = 0;
|
|
167
|
+
tangents[9] = 1;
|
|
168
|
+
tangents[10] = 0;
|
|
169
|
+
tangents[11] = 0;
|
|
170
|
+
attributes.tangent = new GeometryAttribute_default({
|
|
171
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
172
|
+
componentsPerAttribute: 3,
|
|
173
|
+
values: tangents
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
if (vertexFormat.bitangent) {
|
|
177
|
+
const bitangents = new Float32Array(4 * 3);
|
|
178
|
+
bitangents[0] = 0;
|
|
179
|
+
bitangents[1] = 1;
|
|
180
|
+
bitangents[2] = 0;
|
|
181
|
+
bitangents[3] = 0;
|
|
182
|
+
bitangents[4] = 1;
|
|
183
|
+
bitangents[5] = 0;
|
|
184
|
+
bitangents[6] = 0;
|
|
185
|
+
bitangents[7] = 1;
|
|
186
|
+
bitangents[8] = 0;
|
|
187
|
+
bitangents[9] = 0;
|
|
188
|
+
bitangents[10] = 1;
|
|
189
|
+
bitangents[11] = 0;
|
|
190
|
+
attributes.bitangent = new GeometryAttribute_default({
|
|
191
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
192
|
+
componentsPerAttribute: 3,
|
|
193
|
+
values: bitangents
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
indices = new Uint16Array(2 * 3);
|
|
197
|
+
indices[0] = 0;
|
|
198
|
+
indices[1] = 1;
|
|
199
|
+
indices[2] = 2;
|
|
200
|
+
indices[3] = 0;
|
|
201
|
+
indices[4] = 2;
|
|
202
|
+
indices[5] = 3;
|
|
203
|
+
}
|
|
204
|
+
return new Geometry_default({
|
|
205
|
+
attributes,
|
|
206
|
+
indices,
|
|
207
|
+
primitiveType: PrimitiveType_default.TRIANGLES,
|
|
208
|
+
boundingSphere: new BoundingSphere_default(Cartesian3_default.ZERO, Math.sqrt(2))
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
var PlaneGeometry_default = PlaneGeometry;
|
|
212
|
+
|
|
213
|
+
// packages/engine/Source/Workers/createPlaneGeometry.js
|
|
214
|
+
function createPlaneGeometry(planeGeometry, offset) {
|
|
215
|
+
if (defined_default(offset)) {
|
|
216
|
+
planeGeometry = PlaneGeometry_default.unpack(planeGeometry, offset);
|
|
217
|
+
}
|
|
218
|
+
return PlaneGeometry_default.createGeometry(planeGeometry);
|
|
219
|
+
}
|
|
220
|
+
var createPlaneGeometry_default = createPlaneGeometry;
|
|
221
|
+
export {
|
|
222
|
+
createPlaneGeometry_default as default
|
|
223
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.4
|
|
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
|
+
GeometryAttributes_default
|
|
28
|
+
} from "./chunk-ZV42SJKS.js";
|
|
29
|
+
import {
|
|
30
|
+
GeometryAttribute_default,
|
|
31
|
+
Geometry_default,
|
|
32
|
+
PrimitiveType_default
|
|
33
|
+
} from "./chunk-2BLQ3B4Q.js";
|
|
34
|
+
import {
|
|
35
|
+
BoundingSphere_default
|
|
36
|
+
} from "./chunk-UOD5YNH3.js";
|
|
37
|
+
import "./chunk-5BIQOSBV.js";
|
|
38
|
+
import "./chunk-HAWJ7FMN.js";
|
|
39
|
+
import "./chunk-EISI2CR2.js";
|
|
40
|
+
import {
|
|
41
|
+
ComponentDatatype_default
|
|
42
|
+
} from "./chunk-Z356SW7E.js";
|
|
43
|
+
import "./chunk-DEIMB3B5.js";
|
|
44
|
+
import "./chunk-HI6X33GO.js";
|
|
45
|
+
import "./chunk-F5LAPCFC.js";
|
|
46
|
+
import {
|
|
47
|
+
Cartesian3_default
|
|
48
|
+
} from "./chunk-VR2L2Y4Z.js";
|
|
49
|
+
import "./chunk-WMGESUDW.js";
|
|
50
|
+
import {
|
|
51
|
+
Check_default
|
|
52
|
+
} from "./chunk-HGIGANIQ.js";
|
|
53
|
+
import {
|
|
54
|
+
defined_default
|
|
55
|
+
} from "./chunk-BN4WA7LX.js";
|
|
56
|
+
|
|
57
|
+
// packages/engine/Source/Core/PlaneOutlineGeometry.js
|
|
58
|
+
function PlaneOutlineGeometry() {
|
|
59
|
+
this._workerName = "createPlaneOutlineGeometry";
|
|
60
|
+
}
|
|
61
|
+
PlaneOutlineGeometry.packedLength = 0;
|
|
62
|
+
PlaneOutlineGeometry.pack = function(value, array) {
|
|
63
|
+
Check_default.defined("value", value);
|
|
64
|
+
Check_default.defined("array", array);
|
|
65
|
+
return array;
|
|
66
|
+
};
|
|
67
|
+
PlaneOutlineGeometry.unpack = function(array, startingIndex, result) {
|
|
68
|
+
Check_default.defined("array", array);
|
|
69
|
+
if (!defined_default(result)) {
|
|
70
|
+
return new PlaneOutlineGeometry();
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
};
|
|
74
|
+
var min = new Cartesian3_default(-0.5, -0.5, 0);
|
|
75
|
+
var max = new Cartesian3_default(0.5, 0.5, 0);
|
|
76
|
+
PlaneOutlineGeometry.createGeometry = function() {
|
|
77
|
+
const attributes = new GeometryAttributes_default();
|
|
78
|
+
const indices = new Uint16Array(4 * 2);
|
|
79
|
+
const positions = new Float64Array(4 * 3);
|
|
80
|
+
positions[0] = min.x;
|
|
81
|
+
positions[1] = min.y;
|
|
82
|
+
positions[2] = min.z;
|
|
83
|
+
positions[3] = max.x;
|
|
84
|
+
positions[4] = min.y;
|
|
85
|
+
positions[5] = min.z;
|
|
86
|
+
positions[6] = max.x;
|
|
87
|
+
positions[7] = max.y;
|
|
88
|
+
positions[8] = min.z;
|
|
89
|
+
positions[9] = min.x;
|
|
90
|
+
positions[10] = max.y;
|
|
91
|
+
positions[11] = min.z;
|
|
92
|
+
attributes.position = new GeometryAttribute_default({
|
|
93
|
+
componentDatatype: ComponentDatatype_default.DOUBLE,
|
|
94
|
+
componentsPerAttribute: 3,
|
|
95
|
+
values: positions
|
|
96
|
+
});
|
|
97
|
+
indices[0] = 0;
|
|
98
|
+
indices[1] = 1;
|
|
99
|
+
indices[2] = 1;
|
|
100
|
+
indices[3] = 2;
|
|
101
|
+
indices[4] = 2;
|
|
102
|
+
indices[5] = 3;
|
|
103
|
+
indices[6] = 3;
|
|
104
|
+
indices[7] = 0;
|
|
105
|
+
return new Geometry_default({
|
|
106
|
+
attributes,
|
|
107
|
+
indices,
|
|
108
|
+
primitiveType: PrimitiveType_default.LINES,
|
|
109
|
+
boundingSphere: new BoundingSphere_default(Cartesian3_default.ZERO, Math.sqrt(2))
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
var PlaneOutlineGeometry_default = PlaneOutlineGeometry;
|
|
113
|
+
|
|
114
|
+
// packages/engine/Source/Workers/createPlaneOutlineGeometry.js
|
|
115
|
+
function createPlaneOutlineGeometry(planeGeometry, offset) {
|
|
116
|
+
if (defined_default(offset)) {
|
|
117
|
+
planeGeometry = PlaneOutlineGeometry_default.unpack(planeGeometry, offset);
|
|
118
|
+
}
|
|
119
|
+
return PlaneOutlineGeometry_default.createGeometry(planeGeometry);
|
|
120
|
+
}
|
|
121
|
+
var createPlaneOutlineGeometry_default = createPlaneOutlineGeometry;
|
|
122
|
+
export {
|
|
123
|
+
createPlaneOutlineGeometry_default as default
|
|
124
|
+
};
|