@hztxi/cesium-engine 25.0.0 → 25.0.2
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/Workers/chunk-24H74D3Q.js +102 -0
- package/Build/Workers/chunk-27UNFKLP.js +78 -0
- package/Build/Workers/chunk-2NIRC5FH.js +398 -0
- package/Build/Workers/chunk-2YHL3RU5.js +162 -0
- package/Build/Workers/chunk-327KDYY5.js +241 -0
- package/Build/Workers/chunk-36Y4HYYW.js +1067 -0
- package/Build/Workers/chunk-3EB75M2K.js +2342 -0
- package/Build/Workers/chunk-3HGZ7PIQ.js +1483 -0
- package/Build/Workers/chunk-3S3R4BCY.js +280 -0
- package/Build/Workers/chunk-3TK6563P.js +9230 -0
- package/Build/Workers/chunk-4A34KHP2.js +138 -0
- package/Build/Workers/chunk-4B3I4BQ3.js +454 -0
- package/Build/Workers/chunk-4GKVVYGC.js +124 -0
- package/Build/Workers/chunk-4NOKV4XU.js +301 -0
- package/Build/Workers/chunk-4VMEH443.js +754 -0
- package/Build/Workers/chunk-4VO5KZVX.js +693 -0
- package/Build/Workers/chunk-53ITLB2Q.js +288 -0
- package/Build/Workers/chunk-5523YTNX.js +352 -0
- package/Build/Workers/chunk-562MM6RC.js +682 -0
- package/Build/Workers/chunk-5BQXC3BP.js +837 -0
- package/Build/Workers/chunk-5DHF2GEC.js +497 -0
- package/Build/Workers/chunk-5EN3SEJC.js +44 -0
- package/Build/Workers/chunk-5NSH64L5.js +368 -0
- package/Build/Workers/chunk-5RSLOB22.js +511 -0
- package/Build/Workers/chunk-5SLGYIPO.js +454 -0
- package/Build/Workers/chunk-65RILO72.js +76 -0
- package/Build/Workers/chunk-6A74XDJV.js +1054 -0
- package/Build/Workers/chunk-6CAFY3E7.js +280 -0
- package/Build/Workers/chunk-6IWHUZUQ.js +959 -0
- package/Build/Workers/chunk-6JM3OV5P.js +163 -0
- package/Build/Workers/chunk-6ROOPL5F.js +455 -0
- package/Build/Workers/chunk-6SQMSSOR.js +352 -0
- package/Build/Workers/chunk-6SZK4XE5.js +1800 -0
- package/Build/Workers/chunk-6V5GAERI.js +288 -0
- package/Build/Workers/chunk-6XE6USHI.js +280 -0
- package/Build/Workers/chunk-6YMLC7BS.js +1067 -0
- package/Build/Workers/chunk-7BWPTYVV.js +1992 -0
- package/Build/Workers/chunk-7QXAVVZH.js +9230 -0
- package/Build/Workers/chunk-7SUI2JKP.js +162 -0
- package/Build/Workers/chunk-A4AIHOC7.js +476 -0
- package/Build/Workers/chunk-AFBRALW3.js +3620 -0
- package/Build/Workers/chunk-AGANEUZR.js +305 -0
- package/Build/Workers/chunk-AIA3JN4E.js +171 -0
- package/Build/Workers/chunk-AJ4TSZQD.js +352 -0
- package/Build/Workers/chunk-AMW7Q4HY.js +78 -0
- package/Build/Workers/chunk-ANB53XEA.js +198 -0
- package/Build/Workers/chunk-APAN2W5B.js +630 -0
- package/Build/Workers/chunk-AWP7JHXS.js +58 -0
- package/Build/Workers/chunk-AXAP4UXD.js +973 -0
- package/Build/Workers/chunk-B2MY5ZT4.js +241 -0
- package/Build/Workers/chunk-BUS2WCDM.js +1067 -0
- package/Build/Workers/chunk-BVOP4FBU.js +778 -0
- package/Build/Workers/chunk-CCSHJCGX.js +56 -0
- package/Build/Workers/chunk-CUJKQD6C.js +1287 -0
- package/Build/Workers/chunk-D6XIXIZN.js +57 -0
- package/Build/Workers/chunk-DOJQOYSZ.js +1344 -0
- package/Build/Workers/chunk-DSOWTJU3.js +3201 -0
- package/Build/Workers/chunk-DWNGALVJ.js +147 -0
- package/Build/Workers/chunk-E4SAHWMA.js +1992 -0
- package/Build/Workers/chunk-EJES53XD.js +147 -0
- package/Build/Workers/chunk-FEMEGP72.js +97 -0
- package/Build/Workers/chunk-FPUTHLEQ.js +73 -0
- package/Build/Workers/chunk-FSGWPS5K.js +102 -0
- package/Build/Workers/chunk-FVGN2Y5F.js +414 -0
- package/Build/Workers/chunk-FYOTKGMD.js +38 -0
- package/Build/Workers/chunk-FYOU33DL.js +454 -0
- package/Build/Workers/chunk-FZQTWCZX.js +138 -0
- package/Build/Workers/chunk-G7QZ6W7K.js +56 -0
- package/Build/Workers/chunk-GBYWJNH6.js +455 -0
- package/Build/Workers/chunk-H62GX37Y.js +414 -0
- package/Build/Workers/chunk-HA42BW2W.js +73 -0
- package/Build/Workers/chunk-HGDGYWXB.js +368 -0
- package/Build/Workers/chunk-HLCNW67V.js +162 -0
- package/Build/Workers/chunk-HM6KRMLB.js +682 -0
- package/Build/Workers/chunk-HOOAYVKT.js +754 -0
- package/Build/Workers/chunk-HPRR2MW2.js +9230 -0
- package/Build/Workers/chunk-HVIAU36M.js +124 -0
- package/Build/Workers/chunk-I6PQQIM5.js +257 -0
- package/Build/Workers/chunk-JHL6DEKL.js +1287 -0
- package/Build/Workers/chunk-K3SIFA6H.js +352 -0
- package/Build/Workers/chunk-KFRGYJLT.js +171 -0
- package/Build/Workers/chunk-KGNDVO6V.js +497 -0
- package/Build/Workers/chunk-KIRR4SHO.js +38 -0
- package/Build/Workers/chunk-KKXT553B.js +2719 -0
- package/Build/Workers/chunk-KM3TU6SW.js +101 -0
- package/Build/Workers/chunk-KTHM63AY.js +837 -0
- package/Build/Workers/chunk-LANT2AAI.js +398 -0
- package/Build/Workers/chunk-LC2DM3UY.js +352 -0
- package/Build/Workers/chunk-LDTDF3GI.js +511 -0
- package/Build/Workers/chunk-LFVZBOFT.js +140 -0
- package/Build/Workers/chunk-LPWXXHTU.js +2342 -0
- package/Build/Workers/chunk-LU6LZORF.js +3620 -0
- package/Build/Workers/chunk-LZI4ZK6U.js +97 -0
- package/Build/Workers/chunk-M3YCBXY6.js +97 -0
- package/Build/Workers/chunk-M6XP5U6F.js +959 -0
- package/Build/Workers/chunk-MG54QB2S.js +1287 -0
- package/Build/Workers/chunk-MNKWZJLE.js +754 -0
- package/Build/Workers/chunk-MR7LJQY3.js +1344 -0
- package/Build/Workers/chunk-MVCGWYYA.js +693 -0
- package/Build/Workers/chunk-N4ECLSTH.js +163 -0
- package/Build/Workers/chunk-N52ZLKZ3.js +73 -0
- package/Build/Workers/chunk-N54RGG53.js +398 -0
- package/Build/Workers/chunk-NG6PINOD.js +973 -0
- package/Build/Workers/chunk-NO4VBMKQ.js +387 -0
- package/Build/Workers/chunk-NOOOB6XR.js +76 -0
- package/Build/Workers/chunk-NRIECATP.js +124 -0
- package/Build/Workers/chunk-NSTJ4RH4.js +198 -0
- package/Build/Workers/chunk-NW27SGND.js +2719 -0
- package/Build/Workers/chunk-O7JC67VX.js +1483 -0
- package/Build/Workers/chunk-OGSPRAJN.js +414 -0
- package/Build/Workers/chunk-OI6UMRBT.js +368 -0
- package/Build/Workers/chunk-OJMOQSS5.js +387 -0
- package/Build/Workers/chunk-P2DEQUE6.js +301 -0
- package/Build/Workers/chunk-PAO4TRRA.js +497 -0
- package/Build/Workers/chunk-PEK6L3A2.js +102 -0
- package/Build/Workers/chunk-PLMDKE2G.js +57 -0
- package/Build/Workers/chunk-Q2MV7V3J.js +1344 -0
- package/Build/Workers/chunk-Q3JUKGCA.js +305 -0
- package/Build/Workers/chunk-Q56GS53F.js +455 -0
- package/Build/Workers/chunk-R3E7ZNXL.js +44 -0
- package/Build/Workers/chunk-RGNURFR5.js +1992 -0
- package/Build/Workers/chunk-RHVCL4BF.js +3620 -0
- package/Build/Workers/chunk-S2SZ2HYA.js +101 -0
- package/Build/Workers/chunk-S7NAPXAR.js +305 -0
- package/Build/Workers/chunk-SAFIA66W.js +140 -0
- package/Build/Workers/chunk-SLZBHAWM.js +837 -0
- package/Build/Workers/chunk-SOD6C4T2.js +682 -0
- package/Build/Workers/chunk-SOMBAQ6X.js +3201 -0
- package/Build/Workers/chunk-SOOUWXOJ.js +198 -0
- package/Build/Workers/chunk-SSNBEN3T.js +3201 -0
- package/Build/Workers/chunk-SZONDGD2.js +778 -0
- package/Build/Workers/chunk-TT3NOX52.js +257 -0
- package/Build/Workers/chunk-TT6EXCGT.js +387 -0
- package/Build/Workers/chunk-UA3ZQQGQ.js +352 -0
- package/Build/Workers/chunk-UOXL2W6I.js +1800 -0
- package/Build/Workers/chunk-UQABUNQP.js +301 -0
- package/Build/Workers/chunk-UUN6ELAF.js +476 -0
- package/Build/Workers/chunk-UZ7FDKAX.js +1054 -0
- package/Build/Workers/chunk-VAYNR45Y.js +219 -0
- package/Build/Workers/chunk-VDJVNJXW.js +2342 -0
- package/Build/Workers/chunk-VG4FKBIJ.js +140 -0
- package/Build/Workers/chunk-VU2OEFZS.js +511 -0
- package/Build/Workers/chunk-VYTIQ2Y2.js +630 -0
- package/Build/Workers/chunk-W5MRHFMR.js +288 -0
- package/Build/Workers/chunk-WA2OK3VI.js +76 -0
- package/Build/Workers/chunk-WHJCVALR.js +241 -0
- package/Build/Workers/chunk-WKB3ASRI.js +973 -0
- package/Build/Workers/chunk-WLDDKODU.js +44 -0
- package/Build/Workers/chunk-WMSNHJUP.js +476 -0
- package/Build/Workers/chunk-WWOR75YX.js +778 -0
- package/Build/Workers/chunk-X4A7LVKE.js +219 -0
- package/Build/Workers/chunk-XFMCNWLM.js +2719 -0
- package/Build/Workers/chunk-XGU44EOV.js +219 -0
- package/Build/Workers/chunk-XIIIDBAK.js +171 -0
- package/Build/Workers/chunk-XLMFFASL.js +1483 -0
- package/Build/Workers/chunk-XNSQLK46.js +138 -0
- package/Build/Workers/chunk-Y2TJP7FF.js +959 -0
- package/Build/Workers/chunk-Y7LAUPYL.js +1054 -0
- package/Build/Workers/chunk-YMIPCEQ6.js +1800 -0
- package/Build/Workers/chunk-YQVAKERA.js +57 -0
- package/Build/Workers/chunk-YWXQX4RS.js +147 -0
- package/Build/Workers/chunk-YZTJZDOY.js +693 -0
- package/Build/Workers/chunk-ZOMW6KCQ.js +56 -0
- package/Build/Workers/chunk-ZY636MPN.js +58 -0
- package/Build/Workers/chunk-ZZIFOLD3.js +56 -0
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +16 -16
- package/Build/Workers/createCircleGeometry.js +26 -26
- package/Build/Workers/createCircleOutlineGeometry.js +19 -19
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
- package/Build/Workers/createEllipseGeometry.js +26 -26
- package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
- package/Build/Workers/createEllipsoidGeometry.js +19 -19
- package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
- package/Build/Workers/createFrustumGeometry.js +18 -18
- package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
- package/Build/Workers/createGeometry.js +24 -24
- package/Build/Workers/createGroundPolylineGeometry.js +23 -23
- package/Build/Workers/createPlaneGeometry.js +16 -16
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
- package/Build/Workers/createPolygonGeometry.js +32 -32
- package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createPolylineGeometry.js +25 -25
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
- package/Build/Workers/createSimplePolylineGeometry.js +23 -23
- package/Build/Workers/createSphereGeometry.js +19 -19
- package/Build/Workers/createSphereOutlineGeometry.js +18 -18
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +24 -24
- package/Build/Workers/createVectorTilePoints.js +13 -13
- package/Build/Workers/createVectorTilePolygons.js +22 -22
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +26 -26
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +23 -23
- package/Build/Workers/createVerticesFromHeightmap.js +25 -25
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +21 -21
- package/Build/Workers/createWallGeometry.js +24 -24
- package/Build/Workers/createWallOutlineGeometry.js +23 -23
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +29 -29
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/gaussianSplatSorter.js +4 -4
- package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
- package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
- package/Build/Workers/transcodeKTX2.js +7 -7
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +23 -23
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +26 -26
- package/Source/DataSources/DynamicGeometryUpdater.js +1 -0
- package/Source/DataSources/GeometryVisualizer.js +5 -0
- package/Source/DataSources/PolylineGeometryUpdater.js +65 -15
- package/Source/DataSources/PolylineVisualizer.js +3 -0
- package/Source/DataSources/StaticGeometryPerMaterialBatch.js +17 -0
- package/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js +11 -0
- package/Source/Renderer/Context.js +28 -0
- package/Source/Scene/GroundPolylinePrimitive.js +64 -19
- package/Source/Scene/Material.js +51 -7
- package/Source/Scene/Primitive.js +21 -2
- package/Source/ThirdParty/zip-module.wasm +0 -0
- package/index.js +307 -307
- package/package.json +10 -10
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.141.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
|
+
Cartesian3_default
|
|
28
|
+
} from "./chunk-LPWXXHTU.js";
|
|
29
|
+
import {
|
|
30
|
+
Check_default
|
|
31
|
+
} from "./chunk-6JM3OV5P.js";
|
|
32
|
+
import {
|
|
33
|
+
defined_default
|
|
34
|
+
} from "./chunk-AMW7Q4HY.js";
|
|
35
|
+
|
|
36
|
+
// packages/engine/Source/Core/EncodedCartesian3.js
|
|
37
|
+
function EncodedCartesian3() {
|
|
38
|
+
this.high = Cartesian3_default.clone(Cartesian3_default.ZERO);
|
|
39
|
+
this.low = Cartesian3_default.clone(Cartesian3_default.ZERO);
|
|
40
|
+
}
|
|
41
|
+
EncodedCartesian3.encode = function(value, result) {
|
|
42
|
+
Check_default.typeOf.number("value", value);
|
|
43
|
+
if (!defined_default(result)) {
|
|
44
|
+
result = {
|
|
45
|
+
high: 0,
|
|
46
|
+
low: 0
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
let doubleHigh;
|
|
50
|
+
if (value >= 0) {
|
|
51
|
+
doubleHigh = Math.floor(value / 65536) * 65536;
|
|
52
|
+
result.high = doubleHigh;
|
|
53
|
+
result.low = value - doubleHigh;
|
|
54
|
+
} else {
|
|
55
|
+
doubleHigh = Math.floor(-value / 65536) * 65536;
|
|
56
|
+
result.high = -doubleHigh;
|
|
57
|
+
result.low = value + doubleHigh;
|
|
58
|
+
}
|
|
59
|
+
return result;
|
|
60
|
+
};
|
|
61
|
+
var scratchEncode = {
|
|
62
|
+
high: 0,
|
|
63
|
+
low: 0
|
|
64
|
+
};
|
|
65
|
+
EncodedCartesian3.fromCartesian = function(cartesian, result) {
|
|
66
|
+
Check_default.typeOf.object("cartesian", cartesian);
|
|
67
|
+
if (!defined_default(result)) {
|
|
68
|
+
result = new EncodedCartesian3();
|
|
69
|
+
}
|
|
70
|
+
const high = result.high;
|
|
71
|
+
const low = result.low;
|
|
72
|
+
EncodedCartesian3.encode(cartesian.x, scratchEncode);
|
|
73
|
+
high.x = scratchEncode.high;
|
|
74
|
+
low.x = scratchEncode.low;
|
|
75
|
+
EncodedCartesian3.encode(cartesian.y, scratchEncode);
|
|
76
|
+
high.y = scratchEncode.high;
|
|
77
|
+
low.y = scratchEncode.low;
|
|
78
|
+
EncodedCartesian3.encode(cartesian.z, scratchEncode);
|
|
79
|
+
high.z = scratchEncode.high;
|
|
80
|
+
low.z = scratchEncode.low;
|
|
81
|
+
return result;
|
|
82
|
+
};
|
|
83
|
+
var encodedP = new EncodedCartesian3();
|
|
84
|
+
EncodedCartesian3.writeElements = function(cartesian, cartesianArray, index) {
|
|
85
|
+
Check_default.defined("cartesianArray", cartesianArray);
|
|
86
|
+
Check_default.typeOf.number("index", index);
|
|
87
|
+
Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
|
|
88
|
+
EncodedCartesian3.fromCartesian(cartesian, encodedP);
|
|
89
|
+
const high = encodedP.high;
|
|
90
|
+
const low = encodedP.low;
|
|
91
|
+
cartesianArray[index] = high.x;
|
|
92
|
+
cartesianArray[index + 1] = high.y;
|
|
93
|
+
cartesianArray[index + 2] = high.z;
|
|
94
|
+
cartesianArray[index + 3] = low.x;
|
|
95
|
+
cartesianArray[index + 4] = low.y;
|
|
96
|
+
cartesianArray[index + 5] = low.z;
|
|
97
|
+
};
|
|
98
|
+
var EncodedCartesian3_default = EncodedCartesian3;
|
|
99
|
+
|
|
100
|
+
export {
|
|
101
|
+
EncodedCartesian3_default
|
|
102
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.141.2
|
|
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
|
+
var __create = Object.create;
|
|
27
|
+
var __defProp = Object.defineProperty;
|
|
28
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
29
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
30
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
31
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
32
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
33
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
34
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
35
|
+
}) : x)(function(x) {
|
|
36
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
37
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
38
|
+
});
|
|
39
|
+
var __glob = (map) => (path) => {
|
|
40
|
+
var fn = map[path];
|
|
41
|
+
if (fn) return fn();
|
|
42
|
+
throw new Error("Module not found in bundle: " + path);
|
|
43
|
+
};
|
|
44
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
45
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
46
|
+
};
|
|
47
|
+
var __copyProps = (to, from, except, desc) => {
|
|
48
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
49
|
+
for (let key of __getOwnPropNames(from))
|
|
50
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
51
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
52
|
+
}
|
|
53
|
+
return to;
|
|
54
|
+
};
|
|
55
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
56
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
57
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
58
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
59
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
60
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
61
|
+
mod
|
|
62
|
+
));
|
|
63
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
64
|
+
|
|
65
|
+
// packages/engine/Source/Core/defined.js
|
|
66
|
+
function defined(value) {
|
|
67
|
+
return value !== void 0 && value !== null;
|
|
68
|
+
}
|
|
69
|
+
var defined_default = defined;
|
|
70
|
+
|
|
71
|
+
export {
|
|
72
|
+
__require,
|
|
73
|
+
__glob,
|
|
74
|
+
__commonJS,
|
|
75
|
+
__toESM,
|
|
76
|
+
__publicField,
|
|
77
|
+
defined_default
|
|
78
|
+
};
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.141.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
|
+
CylinderGeometryLibrary_default
|
|
28
|
+
} from "./chunk-HA42BW2W.js";
|
|
29
|
+
import {
|
|
30
|
+
GeometryOffsetAttribute_default
|
|
31
|
+
} from "./chunk-KIRR4SHO.js";
|
|
32
|
+
import {
|
|
33
|
+
VertexFormat_default
|
|
34
|
+
} from "./chunk-FZQTWCZX.js";
|
|
35
|
+
import {
|
|
36
|
+
IndexDatatype_default
|
|
37
|
+
} from "./chunk-SAFIA66W.js";
|
|
38
|
+
import {
|
|
39
|
+
GeometryAttributes_default
|
|
40
|
+
} from "./chunk-R3E7ZNXL.js";
|
|
41
|
+
import {
|
|
42
|
+
GeometryAttribute_default,
|
|
43
|
+
Geometry_default,
|
|
44
|
+
PrimitiveType_default
|
|
45
|
+
} from "./chunk-UQABUNQP.js";
|
|
46
|
+
import {
|
|
47
|
+
BoundingSphere_default
|
|
48
|
+
} from "./chunk-CUJKQD6C.js";
|
|
49
|
+
import {
|
|
50
|
+
ComponentDatatype_default
|
|
51
|
+
} from "./chunk-I6PQQIM5.js";
|
|
52
|
+
import {
|
|
53
|
+
Cartesian2_default
|
|
54
|
+
} from "./chunk-E4SAHWMA.js";
|
|
55
|
+
import {
|
|
56
|
+
Cartesian3_default,
|
|
57
|
+
Frozen_default
|
|
58
|
+
} from "./chunk-3EB75M2K.js";
|
|
59
|
+
import {
|
|
60
|
+
Math_default
|
|
61
|
+
} from "./chunk-5DHF2GEC.js";
|
|
62
|
+
import {
|
|
63
|
+
DeveloperError_default
|
|
64
|
+
} from "./chunk-6JM3OV5P.js";
|
|
65
|
+
import {
|
|
66
|
+
defined_default
|
|
67
|
+
} from "./chunk-AMW7Q4HY.js";
|
|
68
|
+
|
|
69
|
+
// packages/engine/Source/Core/CylinderGeometry.js
|
|
70
|
+
var radiusScratch = new Cartesian2_default();
|
|
71
|
+
var normalScratch = new Cartesian3_default();
|
|
72
|
+
var bitangentScratch = new Cartesian3_default();
|
|
73
|
+
var tangentScratch = new Cartesian3_default();
|
|
74
|
+
var positionScratch = new Cartesian3_default();
|
|
75
|
+
function CylinderGeometry(options) {
|
|
76
|
+
options = options ?? Frozen_default.EMPTY_OBJECT;
|
|
77
|
+
const length = options.length;
|
|
78
|
+
const topRadius = options.topRadius;
|
|
79
|
+
const bottomRadius = options.bottomRadius;
|
|
80
|
+
const vertexFormat = options.vertexFormat ?? VertexFormat_default.DEFAULT;
|
|
81
|
+
const slices = options.slices ?? 128;
|
|
82
|
+
if (!defined_default(length)) {
|
|
83
|
+
throw new DeveloperError_default("options.length must be defined.");
|
|
84
|
+
}
|
|
85
|
+
if (!defined_default(topRadius)) {
|
|
86
|
+
throw new DeveloperError_default("options.topRadius must be defined.");
|
|
87
|
+
}
|
|
88
|
+
if (!defined_default(bottomRadius)) {
|
|
89
|
+
throw new DeveloperError_default("options.bottomRadius must be defined.");
|
|
90
|
+
}
|
|
91
|
+
if (slices < 3) {
|
|
92
|
+
throw new DeveloperError_default(
|
|
93
|
+
"options.slices must be greater than or equal to 3."
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
if (defined_default(options.offsetAttribute) && options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
|
|
97
|
+
throw new DeveloperError_default(
|
|
98
|
+
"GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry."
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
this._length = length;
|
|
102
|
+
this._topRadius = topRadius;
|
|
103
|
+
this._bottomRadius = bottomRadius;
|
|
104
|
+
this._vertexFormat = VertexFormat_default.clone(vertexFormat);
|
|
105
|
+
this._slices = slices;
|
|
106
|
+
this._offsetAttribute = options.offsetAttribute;
|
|
107
|
+
this._workerName = "createCylinderGeometry";
|
|
108
|
+
}
|
|
109
|
+
CylinderGeometry.packedLength = VertexFormat_default.packedLength + 5;
|
|
110
|
+
CylinderGeometry.pack = function(value, array, startingIndex) {
|
|
111
|
+
if (!defined_default(value)) {
|
|
112
|
+
throw new DeveloperError_default("value is required");
|
|
113
|
+
}
|
|
114
|
+
if (!defined_default(array)) {
|
|
115
|
+
throw new DeveloperError_default("array is required");
|
|
116
|
+
}
|
|
117
|
+
startingIndex = startingIndex ?? 0;
|
|
118
|
+
VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
|
|
119
|
+
startingIndex += VertexFormat_default.packedLength;
|
|
120
|
+
array[startingIndex++] = value._length;
|
|
121
|
+
array[startingIndex++] = value._topRadius;
|
|
122
|
+
array[startingIndex++] = value._bottomRadius;
|
|
123
|
+
array[startingIndex++] = value._slices;
|
|
124
|
+
array[startingIndex] = value._offsetAttribute ?? -1;
|
|
125
|
+
return array;
|
|
126
|
+
};
|
|
127
|
+
var scratchVertexFormat = new VertexFormat_default();
|
|
128
|
+
var scratchOptions = {
|
|
129
|
+
vertexFormat: scratchVertexFormat,
|
|
130
|
+
length: void 0,
|
|
131
|
+
topRadius: void 0,
|
|
132
|
+
bottomRadius: void 0,
|
|
133
|
+
slices: void 0,
|
|
134
|
+
offsetAttribute: void 0
|
|
135
|
+
};
|
|
136
|
+
CylinderGeometry.unpack = function(array, startingIndex, result) {
|
|
137
|
+
if (!defined_default(array)) {
|
|
138
|
+
throw new DeveloperError_default("array is required");
|
|
139
|
+
}
|
|
140
|
+
startingIndex = startingIndex ?? 0;
|
|
141
|
+
const vertexFormat = VertexFormat_default.unpack(
|
|
142
|
+
array,
|
|
143
|
+
startingIndex,
|
|
144
|
+
scratchVertexFormat
|
|
145
|
+
);
|
|
146
|
+
startingIndex += VertexFormat_default.packedLength;
|
|
147
|
+
const length = array[startingIndex++];
|
|
148
|
+
const topRadius = array[startingIndex++];
|
|
149
|
+
const bottomRadius = array[startingIndex++];
|
|
150
|
+
const slices = array[startingIndex++];
|
|
151
|
+
const offsetAttribute = array[startingIndex];
|
|
152
|
+
if (!defined_default(result)) {
|
|
153
|
+
scratchOptions.length = length;
|
|
154
|
+
scratchOptions.topRadius = topRadius;
|
|
155
|
+
scratchOptions.bottomRadius = bottomRadius;
|
|
156
|
+
scratchOptions.slices = slices;
|
|
157
|
+
scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
|
158
|
+
return new CylinderGeometry(scratchOptions);
|
|
159
|
+
}
|
|
160
|
+
result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
|
|
161
|
+
result._length = length;
|
|
162
|
+
result._topRadius = topRadius;
|
|
163
|
+
result._bottomRadius = bottomRadius;
|
|
164
|
+
result._slices = slices;
|
|
165
|
+
result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
|
166
|
+
return result;
|
|
167
|
+
};
|
|
168
|
+
CylinderGeometry.createGeometry = function(cylinderGeometry) {
|
|
169
|
+
let length = cylinderGeometry._length;
|
|
170
|
+
const topRadius = cylinderGeometry._topRadius;
|
|
171
|
+
const bottomRadius = cylinderGeometry._bottomRadius;
|
|
172
|
+
const vertexFormat = cylinderGeometry._vertexFormat;
|
|
173
|
+
const slices = cylinderGeometry._slices;
|
|
174
|
+
if (length <= 0 || topRadius < 0 || bottomRadius < 0 || topRadius === 0 && bottomRadius === 0) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const twoSlices = slices + slices;
|
|
178
|
+
const threeSlices = slices + twoSlices;
|
|
179
|
+
const numVertices = twoSlices + twoSlices;
|
|
180
|
+
const positions = CylinderGeometryLibrary_default.computePositions(
|
|
181
|
+
length,
|
|
182
|
+
topRadius,
|
|
183
|
+
bottomRadius,
|
|
184
|
+
slices,
|
|
185
|
+
true
|
|
186
|
+
);
|
|
187
|
+
const st = vertexFormat.st ? new Float32Array(numVertices * 2) : void 0;
|
|
188
|
+
const normals = vertexFormat.normal ? new Float32Array(numVertices * 3) : void 0;
|
|
189
|
+
const tangents = vertexFormat.tangent ? new Float32Array(numVertices * 3) : void 0;
|
|
190
|
+
const bitangents = vertexFormat.bitangent ? new Float32Array(numVertices * 3) : void 0;
|
|
191
|
+
let i;
|
|
192
|
+
const computeNormal = vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent;
|
|
193
|
+
if (computeNormal) {
|
|
194
|
+
const computeTangent = vertexFormat.tangent || vertexFormat.bitangent;
|
|
195
|
+
let normalIndex = 0;
|
|
196
|
+
let tangentIndex = 0;
|
|
197
|
+
let bitangentIndex = 0;
|
|
198
|
+
const theta = Math.atan2(bottomRadius - topRadius, length);
|
|
199
|
+
const normal = normalScratch;
|
|
200
|
+
normal.z = Math.sin(theta);
|
|
201
|
+
const normalScale = Math.cos(theta);
|
|
202
|
+
let tangent = tangentScratch;
|
|
203
|
+
let bitangent = bitangentScratch;
|
|
204
|
+
for (i = 0; i < slices; i++) {
|
|
205
|
+
const angle = i / slices * Math_default.TWO_PI;
|
|
206
|
+
const x = normalScale * Math.cos(angle);
|
|
207
|
+
const y = normalScale * Math.sin(angle);
|
|
208
|
+
if (computeNormal) {
|
|
209
|
+
normal.x = x;
|
|
210
|
+
normal.y = y;
|
|
211
|
+
if (computeTangent) {
|
|
212
|
+
tangent = Cartesian3_default.normalize(
|
|
213
|
+
Cartesian3_default.cross(Cartesian3_default.UNIT_Z, normal, tangent),
|
|
214
|
+
tangent
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
if (vertexFormat.normal) {
|
|
218
|
+
normals[normalIndex++] = normal.x;
|
|
219
|
+
normals[normalIndex++] = normal.y;
|
|
220
|
+
normals[normalIndex++] = normal.z;
|
|
221
|
+
normals[normalIndex++] = normal.x;
|
|
222
|
+
normals[normalIndex++] = normal.y;
|
|
223
|
+
normals[normalIndex++] = normal.z;
|
|
224
|
+
}
|
|
225
|
+
if (vertexFormat.tangent) {
|
|
226
|
+
tangents[tangentIndex++] = tangent.x;
|
|
227
|
+
tangents[tangentIndex++] = tangent.y;
|
|
228
|
+
tangents[tangentIndex++] = tangent.z;
|
|
229
|
+
tangents[tangentIndex++] = tangent.x;
|
|
230
|
+
tangents[tangentIndex++] = tangent.y;
|
|
231
|
+
tangents[tangentIndex++] = tangent.z;
|
|
232
|
+
}
|
|
233
|
+
if (vertexFormat.bitangent) {
|
|
234
|
+
bitangent = Cartesian3_default.normalize(
|
|
235
|
+
Cartesian3_default.cross(normal, tangent, bitangent),
|
|
236
|
+
bitangent
|
|
237
|
+
);
|
|
238
|
+
bitangents[bitangentIndex++] = bitangent.x;
|
|
239
|
+
bitangents[bitangentIndex++] = bitangent.y;
|
|
240
|
+
bitangents[bitangentIndex++] = bitangent.z;
|
|
241
|
+
bitangents[bitangentIndex++] = bitangent.x;
|
|
242
|
+
bitangents[bitangentIndex++] = bitangent.y;
|
|
243
|
+
bitangents[bitangentIndex++] = bitangent.z;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
for (i = 0; i < slices; i++) {
|
|
248
|
+
if (vertexFormat.normal) {
|
|
249
|
+
normals[normalIndex++] = 0;
|
|
250
|
+
normals[normalIndex++] = 0;
|
|
251
|
+
normals[normalIndex++] = -1;
|
|
252
|
+
}
|
|
253
|
+
if (vertexFormat.tangent) {
|
|
254
|
+
tangents[tangentIndex++] = 1;
|
|
255
|
+
tangents[tangentIndex++] = 0;
|
|
256
|
+
tangents[tangentIndex++] = 0;
|
|
257
|
+
}
|
|
258
|
+
if (vertexFormat.bitangent) {
|
|
259
|
+
bitangents[bitangentIndex++] = 0;
|
|
260
|
+
bitangents[bitangentIndex++] = -1;
|
|
261
|
+
bitangents[bitangentIndex++] = 0;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
for (i = 0; i < slices; i++) {
|
|
265
|
+
if (vertexFormat.normal) {
|
|
266
|
+
normals[normalIndex++] = 0;
|
|
267
|
+
normals[normalIndex++] = 0;
|
|
268
|
+
normals[normalIndex++] = 1;
|
|
269
|
+
}
|
|
270
|
+
if (vertexFormat.tangent) {
|
|
271
|
+
tangents[tangentIndex++] = 1;
|
|
272
|
+
tangents[tangentIndex++] = 0;
|
|
273
|
+
tangents[tangentIndex++] = 0;
|
|
274
|
+
}
|
|
275
|
+
if (vertexFormat.bitangent) {
|
|
276
|
+
bitangents[bitangentIndex++] = 0;
|
|
277
|
+
bitangents[bitangentIndex++] = 1;
|
|
278
|
+
bitangents[bitangentIndex++] = 0;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
const numIndices = 12 * slices - 12;
|
|
283
|
+
const indices = IndexDatatype_default.createTypedArray(numVertices, numIndices);
|
|
284
|
+
let index = 0;
|
|
285
|
+
let j = 0;
|
|
286
|
+
for (i = 0; i < slices - 1; i++) {
|
|
287
|
+
indices[index++] = j;
|
|
288
|
+
indices[index++] = j + 2;
|
|
289
|
+
indices[index++] = j + 3;
|
|
290
|
+
indices[index++] = j;
|
|
291
|
+
indices[index++] = j + 3;
|
|
292
|
+
indices[index++] = j + 1;
|
|
293
|
+
j += 2;
|
|
294
|
+
}
|
|
295
|
+
indices[index++] = twoSlices - 2;
|
|
296
|
+
indices[index++] = 0;
|
|
297
|
+
indices[index++] = 1;
|
|
298
|
+
indices[index++] = twoSlices - 2;
|
|
299
|
+
indices[index++] = 1;
|
|
300
|
+
indices[index++] = twoSlices - 1;
|
|
301
|
+
for (i = 1; i < slices - 1; i++) {
|
|
302
|
+
indices[index++] = twoSlices + i + 1;
|
|
303
|
+
indices[index++] = twoSlices + i;
|
|
304
|
+
indices[index++] = twoSlices;
|
|
305
|
+
}
|
|
306
|
+
for (i = 1; i < slices - 1; i++) {
|
|
307
|
+
indices[index++] = threeSlices;
|
|
308
|
+
indices[index++] = threeSlices + i;
|
|
309
|
+
indices[index++] = threeSlices + i + 1;
|
|
310
|
+
}
|
|
311
|
+
let textureCoordIndex = 0;
|
|
312
|
+
if (vertexFormat.st) {
|
|
313
|
+
const rad = Math.max(topRadius, bottomRadius);
|
|
314
|
+
for (i = 0; i < numVertices; i++) {
|
|
315
|
+
const position = Cartesian3_default.fromArray(positions, i * 3, positionScratch);
|
|
316
|
+
st[textureCoordIndex++] = (position.x + rad) / (2 * rad);
|
|
317
|
+
st[textureCoordIndex++] = (position.y + rad) / (2 * rad);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
const attributes = new GeometryAttributes_default();
|
|
321
|
+
if (vertexFormat.position) {
|
|
322
|
+
attributes.position = new GeometryAttribute_default({
|
|
323
|
+
componentDatatype: ComponentDatatype_default.DOUBLE,
|
|
324
|
+
componentsPerAttribute: 3,
|
|
325
|
+
values: positions
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
if (vertexFormat.normal) {
|
|
329
|
+
attributes.normal = new GeometryAttribute_default({
|
|
330
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
331
|
+
componentsPerAttribute: 3,
|
|
332
|
+
values: normals
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
if (vertexFormat.tangent) {
|
|
336
|
+
attributes.tangent = new GeometryAttribute_default({
|
|
337
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
338
|
+
componentsPerAttribute: 3,
|
|
339
|
+
values: tangents
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
if (vertexFormat.bitangent) {
|
|
343
|
+
attributes.bitangent = new GeometryAttribute_default({
|
|
344
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
345
|
+
componentsPerAttribute: 3,
|
|
346
|
+
values: bitangents
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
if (vertexFormat.st) {
|
|
350
|
+
attributes.st = new GeometryAttribute_default({
|
|
351
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
|
352
|
+
componentsPerAttribute: 2,
|
|
353
|
+
values: st
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
radiusScratch.x = length * 0.5;
|
|
357
|
+
radiusScratch.y = Math.max(bottomRadius, topRadius);
|
|
358
|
+
const boundingSphere = new BoundingSphere_default(
|
|
359
|
+
Cartesian3_default.ZERO,
|
|
360
|
+
Cartesian2_default.magnitude(radiusScratch)
|
|
361
|
+
);
|
|
362
|
+
if (defined_default(cylinderGeometry._offsetAttribute)) {
|
|
363
|
+
length = positions.length;
|
|
364
|
+
const offsetValue = cylinderGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
|
|
365
|
+
const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
|
|
366
|
+
attributes.applyOffset = new GeometryAttribute_default({
|
|
367
|
+
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
|
368
|
+
componentsPerAttribute: 1,
|
|
369
|
+
values: applyOffset
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
return new Geometry_default({
|
|
373
|
+
attributes,
|
|
374
|
+
indices,
|
|
375
|
+
primitiveType: PrimitiveType_default.TRIANGLES,
|
|
376
|
+
boundingSphere,
|
|
377
|
+
offsetAttribute: cylinderGeometry._offsetAttribute
|
|
378
|
+
});
|
|
379
|
+
};
|
|
380
|
+
var unitCylinderGeometry;
|
|
381
|
+
CylinderGeometry.getUnitCylinder = function() {
|
|
382
|
+
if (!defined_default(unitCylinderGeometry)) {
|
|
383
|
+
unitCylinderGeometry = CylinderGeometry.createGeometry(
|
|
384
|
+
new CylinderGeometry({
|
|
385
|
+
topRadius: 1,
|
|
386
|
+
bottomRadius: 1,
|
|
387
|
+
length: 1,
|
|
388
|
+
vertexFormat: VertexFormat_default.POSITION_ONLY
|
|
389
|
+
})
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
return unitCylinderGeometry;
|
|
393
|
+
};
|
|
394
|
+
var CylinderGeometry_default = CylinderGeometry;
|
|
395
|
+
|
|
396
|
+
export {
|
|
397
|
+
CylinderGeometry_default
|
|
398
|
+
};
|