deeptwins-cesium-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/Workers/chunk-25U3LB43.js +139 -0
- package/Build/Workers/chunk-2GSMCVKA.js +837 -0
- package/Build/Workers/chunk-3G3JCTFQ.js +101 -0
- package/Build/Workers/chunk-3GRIO7U2.js +162 -0
- package/Build/Workers/chunk-3ZQ33WD3.js +455 -0
- package/Build/Workers/chunk-4U7LLSJ4.js +288 -0
- package/Build/Workers/chunk-4ZMC542T.js +55 -0
- package/Build/Workers/chunk-57TENMAK.js +37 -0
- package/Build/Workers/chunk-5JCUBAVN.js +387 -0
- package/Build/Workers/chunk-5MAQRQUK.js +102 -0
- package/Build/Workers/chunk-5XRGC6C7.js +299 -0
- package/Build/Workers/chunk-63UAUZT6.js +414 -0
- package/Build/Workers/chunk-6BUOGRYV.js +2058 -0
- package/Build/Workers/chunk-7D5ZXLGY.js +163 -0
- package/Build/Workers/chunk-7N66TCUJ.js +1800 -0
- package/Build/Workers/chunk-AG6ARNCB.js +682 -0
- package/Build/Workers/chunk-ARXSS5JC.js +788 -0
- package/Build/Workers/chunk-BDVACEHF.js +778 -0
- package/Build/Workers/chunk-BU67FVEG.js +97 -0
- package/Build/Workers/chunk-BYC4YR4M.js +352 -0
- package/Build/Workers/chunk-CH66JW7J.js +629 -0
- package/Build/Workers/chunk-CV2CR5WA.js +114 -0
- package/Build/Workers/chunk-DGMXFRAL.js +1443 -0
- package/Build/Workers/chunk-EDP33VH5.js +1054 -0
- package/Build/Workers/chunk-F7AOI3UD.js +73 -0
- package/Build/Workers/chunk-FKKSB7ZT.js +8366 -0
- package/Build/Workers/chunk-FTK6K2HA.js +1483 -0
- package/Build/Workers/chunk-IUPJ4QGV.js +476 -0
- package/Build/Workers/chunk-K7Z6W3PJ.js +368 -0
- package/Build/Workers/chunk-KBCQ5JGP.js +57 -0
- package/Build/Workers/chunk-KKTCNH5B.js +398 -0
- package/Build/Workers/chunk-LCSOUDEK.js +58 -0
- package/Build/Workers/chunk-LE5B7M4M.js +642 -0
- package/Build/Workers/chunk-LPPTJ7CE.js +511 -0
- package/Build/Workers/chunk-M3CFFEB7.js +280 -0
- package/Build/Workers/chunk-NN52QO5J.js +497 -0
- package/Build/Workers/chunk-NO3BDHBF.js +241 -0
- package/Build/Workers/chunk-O2H3UW6F.js +256 -0
- package/Build/Workers/chunk-OLJ7MBC7.js +439 -0
- package/Build/Workers/chunk-OZMVAGFQ.js +2719 -0
- package/Build/Workers/chunk-P3S5BWX6.js +219 -0
- package/Build/Workers/chunk-PLQPDE4E.js +171 -0
- package/Build/Workers/chunk-PYMMZCF6.js +3514 -0
- package/Build/Workers/chunk-QIK67M72.js +692 -0
- package/Build/Workers/chunk-RDQU66WA.js +124 -0
- package/Build/Workers/chunk-S6YC56IM.js +940 -0
- package/Build/Workers/chunk-S7CL5IXE.js +138 -0
- package/Build/Workers/chunk-SCVFHATG.js +1317 -0
- package/Build/Workers/chunk-V3IFABPY.js +44 -0
- package/Build/Workers/chunk-VKRSYA3C.js +1067 -0
- package/Build/Workers/chunk-VXIA6U3E.js +75 -0
- package/Build/Workers/chunk-WKTTAMO3.js +305 -0
- package/Build/Workers/chunk-WMMHNRGJ.js +198 -0
- package/Build/Workers/chunk-WY6ZUQRU.js +55 -0
- package/Build/Workers/chunk-X33W4QLH.js +958 -0
- package/Build/Workers/chunk-ZB5XJVWP.js +1460 -0
- package/Build/Workers/chunk-ZNQU6MNK.js +352 -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 +22 -22
- 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 +25 -25
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
- package/Build/Workers/createVerticesFromHeightmap.js +22 -22
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
- 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 +5 -5
- 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 +6 -6
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
- package/README.md +1 -1
- package/Source/Scene/DerivedCommand.js +1 -1
- package/Source/Scene/VoxelContent.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +9 -9
- package/package.json +7 -11
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.29
|
|
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 __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
33
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
34
|
+
}) : x)(function(x) {
|
|
35
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
36
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
37
|
+
});
|
|
38
|
+
var __glob = (map) => (path) => {
|
|
39
|
+
var fn = map[path];
|
|
40
|
+
if (fn) return fn();
|
|
41
|
+
throw new Error("Module not found in bundle: " + path);
|
|
42
|
+
};
|
|
43
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
44
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
45
|
+
};
|
|
46
|
+
var __copyProps = (to, from, except, desc) => {
|
|
47
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
48
|
+
for (let key of __getOwnPropNames(from))
|
|
49
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
50
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
51
|
+
}
|
|
52
|
+
return to;
|
|
53
|
+
};
|
|
54
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
55
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
56
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
57
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
58
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
59
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
60
|
+
mod
|
|
61
|
+
));
|
|
62
|
+
|
|
63
|
+
// packages/engine/Source/Core/defined.js
|
|
64
|
+
function defined(value) {
|
|
65
|
+
return value !== void 0 && value !== null;
|
|
66
|
+
}
|
|
67
|
+
var defined_default = defined;
|
|
68
|
+
|
|
69
|
+
export {
|
|
70
|
+
__require,
|
|
71
|
+
__glob,
|
|
72
|
+
__commonJS,
|
|
73
|
+
__toESM,
|
|
74
|
+
defined_default
|
|
75
|
+
};
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.29
|
|
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
|
+
Quaternion_default
|
|
28
|
+
} from "./chunk-FKKSB7ZT.js";
|
|
29
|
+
import {
|
|
30
|
+
Cartesian3_default,
|
|
31
|
+
Matrix3_default
|
|
32
|
+
} from "./chunk-DGMXFRAL.js";
|
|
33
|
+
import {
|
|
34
|
+
Math_default
|
|
35
|
+
} from "./chunk-NN52QO5J.js";
|
|
36
|
+
|
|
37
|
+
// packages/engine/Source/Core/EllipseGeometryLibrary.js
|
|
38
|
+
var EllipseGeometryLibrary = {};
|
|
39
|
+
var rotAxis = new Cartesian3_default();
|
|
40
|
+
var tempVec = new Cartesian3_default();
|
|
41
|
+
var unitQuat = new Quaternion_default();
|
|
42
|
+
var rotMtx = new Matrix3_default();
|
|
43
|
+
function pointOnEllipsoid(theta, rotation, northVec, eastVec, aSqr, ab, bSqr, mag, unitPos, result) {
|
|
44
|
+
const azimuth = theta + rotation;
|
|
45
|
+
Cartesian3_default.multiplyByScalar(eastVec, Math.cos(azimuth), rotAxis);
|
|
46
|
+
Cartesian3_default.multiplyByScalar(northVec, Math.sin(azimuth), tempVec);
|
|
47
|
+
Cartesian3_default.add(rotAxis, tempVec, rotAxis);
|
|
48
|
+
let cosThetaSquared = Math.cos(theta);
|
|
49
|
+
cosThetaSquared = cosThetaSquared * cosThetaSquared;
|
|
50
|
+
let sinThetaSquared = Math.sin(theta);
|
|
51
|
+
sinThetaSquared = sinThetaSquared * sinThetaSquared;
|
|
52
|
+
const radius = ab / Math.sqrt(bSqr * cosThetaSquared + aSqr * sinThetaSquared);
|
|
53
|
+
const angle = radius / mag;
|
|
54
|
+
Quaternion_default.fromAxisAngle(rotAxis, angle, unitQuat);
|
|
55
|
+
Matrix3_default.fromQuaternion(unitQuat, rotMtx);
|
|
56
|
+
Matrix3_default.multiplyByVector(rotMtx, unitPos, result);
|
|
57
|
+
Cartesian3_default.normalize(result, result);
|
|
58
|
+
Cartesian3_default.multiplyByScalar(result, mag, result);
|
|
59
|
+
return result;
|
|
60
|
+
}
|
|
61
|
+
var scratchCartesian1 = new Cartesian3_default();
|
|
62
|
+
var scratchCartesian2 = new Cartesian3_default();
|
|
63
|
+
var scratchCartesian3 = new Cartesian3_default();
|
|
64
|
+
var scratchNormal = new Cartesian3_default();
|
|
65
|
+
EllipseGeometryLibrary.raisePositionsToHeight = function(positions, options, extrude) {
|
|
66
|
+
const ellipsoid = options.ellipsoid;
|
|
67
|
+
const height = options.height;
|
|
68
|
+
const extrudedHeight = options.extrudedHeight;
|
|
69
|
+
const size = extrude ? positions.length / 3 * 2 : positions.length / 3;
|
|
70
|
+
const finalPositions = new Float64Array(size * 3);
|
|
71
|
+
const length = positions.length;
|
|
72
|
+
const bottomOffset = extrude ? length : 0;
|
|
73
|
+
for (let i = 0; i < length; i += 3) {
|
|
74
|
+
const i1 = i + 1;
|
|
75
|
+
const i2 = i + 2;
|
|
76
|
+
const position = Cartesian3_default.fromArray(positions, i, scratchCartesian1);
|
|
77
|
+
ellipsoid.scaleToGeodeticSurface(position, position);
|
|
78
|
+
const extrudedPosition = Cartesian3_default.clone(position, scratchCartesian2);
|
|
79
|
+
const normal = ellipsoid.geodeticSurfaceNormal(position, scratchNormal);
|
|
80
|
+
const scaledNormal = Cartesian3_default.multiplyByScalar(
|
|
81
|
+
normal,
|
|
82
|
+
height,
|
|
83
|
+
scratchCartesian3
|
|
84
|
+
);
|
|
85
|
+
Cartesian3_default.add(position, scaledNormal, position);
|
|
86
|
+
if (extrude) {
|
|
87
|
+
Cartesian3_default.multiplyByScalar(normal, extrudedHeight, scaledNormal);
|
|
88
|
+
Cartesian3_default.add(extrudedPosition, scaledNormal, extrudedPosition);
|
|
89
|
+
finalPositions[i + bottomOffset] = extrudedPosition.x;
|
|
90
|
+
finalPositions[i1 + bottomOffset] = extrudedPosition.y;
|
|
91
|
+
finalPositions[i2 + bottomOffset] = extrudedPosition.z;
|
|
92
|
+
}
|
|
93
|
+
finalPositions[i] = position.x;
|
|
94
|
+
finalPositions[i1] = position.y;
|
|
95
|
+
finalPositions[i2] = position.z;
|
|
96
|
+
}
|
|
97
|
+
return finalPositions;
|
|
98
|
+
};
|
|
99
|
+
var unitPosScratch = new Cartesian3_default();
|
|
100
|
+
var eastVecScratch = new Cartesian3_default();
|
|
101
|
+
var northVecScratch = new Cartesian3_default();
|
|
102
|
+
EllipseGeometryLibrary.computeEllipsePositions = function(options, addFillPositions, addEdgePositions) {
|
|
103
|
+
const semiMinorAxis = options.semiMinorAxis;
|
|
104
|
+
const semiMajorAxis = options.semiMajorAxis;
|
|
105
|
+
const rotation = options.rotation;
|
|
106
|
+
const center = options.center;
|
|
107
|
+
const granularity = options.granularity * 8;
|
|
108
|
+
const aSqr = semiMinorAxis * semiMinorAxis;
|
|
109
|
+
const bSqr = semiMajorAxis * semiMajorAxis;
|
|
110
|
+
const ab = semiMajorAxis * semiMinorAxis;
|
|
111
|
+
const mag = Cartesian3_default.magnitude(center);
|
|
112
|
+
const unitPos = Cartesian3_default.normalize(center, unitPosScratch);
|
|
113
|
+
let eastVec = Cartesian3_default.cross(Cartesian3_default.UNIT_Z, center, eastVecScratch);
|
|
114
|
+
eastVec = Cartesian3_default.normalize(eastVec, eastVec);
|
|
115
|
+
const northVec = Cartesian3_default.cross(unitPos, eastVec, northVecScratch);
|
|
116
|
+
let numPts = 1 + Math.ceil(Math_default.PI_OVER_TWO / granularity);
|
|
117
|
+
const deltaTheta = Math_default.PI_OVER_TWO / (numPts - 1);
|
|
118
|
+
let theta = Math_default.PI_OVER_TWO - numPts * deltaTheta;
|
|
119
|
+
if (theta < 0) {
|
|
120
|
+
numPts -= Math.ceil(Math.abs(theta) / deltaTheta);
|
|
121
|
+
}
|
|
122
|
+
const size = 2 * (numPts * (numPts + 2));
|
|
123
|
+
const positions = addFillPositions ? new Array(size * 3) : void 0;
|
|
124
|
+
let positionIndex = 0;
|
|
125
|
+
let position = scratchCartesian1;
|
|
126
|
+
let reflectedPosition = scratchCartesian2;
|
|
127
|
+
const outerPositionsLength = numPts * 4 * 3;
|
|
128
|
+
let outerRightIndex = outerPositionsLength - 1;
|
|
129
|
+
let outerLeftIndex = 0;
|
|
130
|
+
const outerPositions = addEdgePositions ? new Array(outerPositionsLength) : void 0;
|
|
131
|
+
let i;
|
|
132
|
+
let j;
|
|
133
|
+
let numInterior;
|
|
134
|
+
let t;
|
|
135
|
+
let interiorPosition;
|
|
136
|
+
theta = Math_default.PI_OVER_TWO;
|
|
137
|
+
position = pointOnEllipsoid(
|
|
138
|
+
theta,
|
|
139
|
+
rotation,
|
|
140
|
+
northVec,
|
|
141
|
+
eastVec,
|
|
142
|
+
aSqr,
|
|
143
|
+
ab,
|
|
144
|
+
bSqr,
|
|
145
|
+
mag,
|
|
146
|
+
unitPos,
|
|
147
|
+
position
|
|
148
|
+
);
|
|
149
|
+
if (addFillPositions) {
|
|
150
|
+
positions[positionIndex++] = position.x;
|
|
151
|
+
positions[positionIndex++] = position.y;
|
|
152
|
+
positions[positionIndex++] = position.z;
|
|
153
|
+
}
|
|
154
|
+
if (addEdgePositions) {
|
|
155
|
+
outerPositions[outerRightIndex--] = position.z;
|
|
156
|
+
outerPositions[outerRightIndex--] = position.y;
|
|
157
|
+
outerPositions[outerRightIndex--] = position.x;
|
|
158
|
+
}
|
|
159
|
+
theta = Math_default.PI_OVER_TWO - deltaTheta;
|
|
160
|
+
for (i = 1; i < numPts + 1; ++i) {
|
|
161
|
+
position = pointOnEllipsoid(
|
|
162
|
+
theta,
|
|
163
|
+
rotation,
|
|
164
|
+
northVec,
|
|
165
|
+
eastVec,
|
|
166
|
+
aSqr,
|
|
167
|
+
ab,
|
|
168
|
+
bSqr,
|
|
169
|
+
mag,
|
|
170
|
+
unitPos,
|
|
171
|
+
position
|
|
172
|
+
);
|
|
173
|
+
reflectedPosition = pointOnEllipsoid(
|
|
174
|
+
Math.PI - theta,
|
|
175
|
+
rotation,
|
|
176
|
+
northVec,
|
|
177
|
+
eastVec,
|
|
178
|
+
aSqr,
|
|
179
|
+
ab,
|
|
180
|
+
bSqr,
|
|
181
|
+
mag,
|
|
182
|
+
unitPos,
|
|
183
|
+
reflectedPosition
|
|
184
|
+
);
|
|
185
|
+
if (addFillPositions) {
|
|
186
|
+
positions[positionIndex++] = position.x;
|
|
187
|
+
positions[positionIndex++] = position.y;
|
|
188
|
+
positions[positionIndex++] = position.z;
|
|
189
|
+
numInterior = 2 * i + 2;
|
|
190
|
+
for (j = 1; j < numInterior - 1; ++j) {
|
|
191
|
+
t = j / (numInterior - 1);
|
|
192
|
+
interiorPosition = Cartesian3_default.lerp(
|
|
193
|
+
position,
|
|
194
|
+
reflectedPosition,
|
|
195
|
+
t,
|
|
196
|
+
scratchCartesian3
|
|
197
|
+
);
|
|
198
|
+
positions[positionIndex++] = interiorPosition.x;
|
|
199
|
+
positions[positionIndex++] = interiorPosition.y;
|
|
200
|
+
positions[positionIndex++] = interiorPosition.z;
|
|
201
|
+
}
|
|
202
|
+
positions[positionIndex++] = reflectedPosition.x;
|
|
203
|
+
positions[positionIndex++] = reflectedPosition.y;
|
|
204
|
+
positions[positionIndex++] = reflectedPosition.z;
|
|
205
|
+
}
|
|
206
|
+
if (addEdgePositions) {
|
|
207
|
+
outerPositions[outerRightIndex--] = position.z;
|
|
208
|
+
outerPositions[outerRightIndex--] = position.y;
|
|
209
|
+
outerPositions[outerRightIndex--] = position.x;
|
|
210
|
+
outerPositions[outerLeftIndex++] = reflectedPosition.x;
|
|
211
|
+
outerPositions[outerLeftIndex++] = reflectedPosition.y;
|
|
212
|
+
outerPositions[outerLeftIndex++] = reflectedPosition.z;
|
|
213
|
+
}
|
|
214
|
+
theta = Math_default.PI_OVER_TWO - (i + 1) * deltaTheta;
|
|
215
|
+
}
|
|
216
|
+
for (i = numPts; i > 1; --i) {
|
|
217
|
+
theta = Math_default.PI_OVER_TWO - (i - 1) * deltaTheta;
|
|
218
|
+
position = pointOnEllipsoid(
|
|
219
|
+
-theta,
|
|
220
|
+
rotation,
|
|
221
|
+
northVec,
|
|
222
|
+
eastVec,
|
|
223
|
+
aSqr,
|
|
224
|
+
ab,
|
|
225
|
+
bSqr,
|
|
226
|
+
mag,
|
|
227
|
+
unitPos,
|
|
228
|
+
position
|
|
229
|
+
);
|
|
230
|
+
reflectedPosition = pointOnEllipsoid(
|
|
231
|
+
theta + Math.PI,
|
|
232
|
+
rotation,
|
|
233
|
+
northVec,
|
|
234
|
+
eastVec,
|
|
235
|
+
aSqr,
|
|
236
|
+
ab,
|
|
237
|
+
bSqr,
|
|
238
|
+
mag,
|
|
239
|
+
unitPos,
|
|
240
|
+
reflectedPosition
|
|
241
|
+
);
|
|
242
|
+
if (addFillPositions) {
|
|
243
|
+
positions[positionIndex++] = position.x;
|
|
244
|
+
positions[positionIndex++] = position.y;
|
|
245
|
+
positions[positionIndex++] = position.z;
|
|
246
|
+
numInterior = 2 * (i - 1) + 2;
|
|
247
|
+
for (j = 1; j < numInterior - 1; ++j) {
|
|
248
|
+
t = j / (numInterior - 1);
|
|
249
|
+
interiorPosition = Cartesian3_default.lerp(
|
|
250
|
+
position,
|
|
251
|
+
reflectedPosition,
|
|
252
|
+
t,
|
|
253
|
+
scratchCartesian3
|
|
254
|
+
);
|
|
255
|
+
positions[positionIndex++] = interiorPosition.x;
|
|
256
|
+
positions[positionIndex++] = interiorPosition.y;
|
|
257
|
+
positions[positionIndex++] = interiorPosition.z;
|
|
258
|
+
}
|
|
259
|
+
positions[positionIndex++] = reflectedPosition.x;
|
|
260
|
+
positions[positionIndex++] = reflectedPosition.y;
|
|
261
|
+
positions[positionIndex++] = reflectedPosition.z;
|
|
262
|
+
}
|
|
263
|
+
if (addEdgePositions) {
|
|
264
|
+
outerPositions[outerRightIndex--] = position.z;
|
|
265
|
+
outerPositions[outerRightIndex--] = position.y;
|
|
266
|
+
outerPositions[outerRightIndex--] = position.x;
|
|
267
|
+
outerPositions[outerLeftIndex++] = reflectedPosition.x;
|
|
268
|
+
outerPositions[outerLeftIndex++] = reflectedPosition.y;
|
|
269
|
+
outerPositions[outerLeftIndex++] = reflectedPosition.z;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
theta = Math_default.PI_OVER_TWO;
|
|
273
|
+
position = pointOnEllipsoid(
|
|
274
|
+
-theta,
|
|
275
|
+
rotation,
|
|
276
|
+
northVec,
|
|
277
|
+
eastVec,
|
|
278
|
+
aSqr,
|
|
279
|
+
ab,
|
|
280
|
+
bSqr,
|
|
281
|
+
mag,
|
|
282
|
+
unitPos,
|
|
283
|
+
position
|
|
284
|
+
);
|
|
285
|
+
const r = {};
|
|
286
|
+
if (addFillPositions) {
|
|
287
|
+
positions[positionIndex++] = position.x;
|
|
288
|
+
positions[positionIndex++] = position.y;
|
|
289
|
+
positions[positionIndex++] = position.z;
|
|
290
|
+
r.positions = positions;
|
|
291
|
+
r.numPts = numPts;
|
|
292
|
+
}
|
|
293
|
+
if (addEdgePositions) {
|
|
294
|
+
outerPositions[outerRightIndex--] = position.z;
|
|
295
|
+
outerPositions[outerRightIndex--] = position.y;
|
|
296
|
+
outerPositions[outerRightIndex--] = position.x;
|
|
297
|
+
r.outerPositions = outerPositions;
|
|
298
|
+
}
|
|
299
|
+
return r;
|
|
300
|
+
};
|
|
301
|
+
var EllipseGeometryLibrary_default = EllipseGeometryLibrary;
|
|
302
|
+
|
|
303
|
+
export {
|
|
304
|
+
EllipseGeometryLibrary_default
|
|
305
|
+
};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.29
|
|
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
|
+
PolylinePipeline_default
|
|
28
|
+
} from "./chunk-63UAUZT6.js";
|
|
29
|
+
import {
|
|
30
|
+
arrayRemoveDuplicates_default
|
|
31
|
+
} from "./chunk-BU67FVEG.js";
|
|
32
|
+
import {
|
|
33
|
+
Cartographic_default
|
|
34
|
+
} from "./chunk-ZB5XJVWP.js";
|
|
35
|
+
import {
|
|
36
|
+
Cartesian3_default
|
|
37
|
+
} from "./chunk-DGMXFRAL.js";
|
|
38
|
+
import {
|
|
39
|
+
Math_default
|
|
40
|
+
} from "./chunk-NN52QO5J.js";
|
|
41
|
+
import {
|
|
42
|
+
defined_default
|
|
43
|
+
} from "./chunk-VXIA6U3E.js";
|
|
44
|
+
|
|
45
|
+
// packages/engine/Source/Core/WallGeometryLibrary.js
|
|
46
|
+
var WallGeometryLibrary = {};
|
|
47
|
+
function latLonEquals(c0, c1) {
|
|
48
|
+
return Math_default.equalsEpsilon(c0.latitude, c1.latitude, Math_default.EPSILON10) && Math_default.equalsEpsilon(c0.longitude, c1.longitude, Math_default.EPSILON10);
|
|
49
|
+
}
|
|
50
|
+
var scratchCartographic1 = new Cartographic_default();
|
|
51
|
+
var scratchCartographic2 = new Cartographic_default();
|
|
52
|
+
function removeDuplicates(ellipsoid, positions, topHeights, bottomHeights) {
|
|
53
|
+
positions = arrayRemoveDuplicates_default(positions, Cartesian3_default.equalsEpsilon);
|
|
54
|
+
const length = positions.length;
|
|
55
|
+
if (length < 2) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const hasBottomHeights = defined_default(bottomHeights);
|
|
59
|
+
const hasTopHeights = defined_default(topHeights);
|
|
60
|
+
const cleanedPositions = new Array(length);
|
|
61
|
+
const cleanedTopHeights = new Array(length);
|
|
62
|
+
const cleanedBottomHeights = new Array(length);
|
|
63
|
+
const v0 = positions[0];
|
|
64
|
+
cleanedPositions[0] = v0;
|
|
65
|
+
const c0 = ellipsoid.cartesianToCartographic(v0, scratchCartographic1);
|
|
66
|
+
if (hasTopHeights) {
|
|
67
|
+
c0.height = topHeights[0];
|
|
68
|
+
}
|
|
69
|
+
cleanedTopHeights[0] = c0.height;
|
|
70
|
+
if (hasBottomHeights) {
|
|
71
|
+
cleanedBottomHeights[0] = bottomHeights[0];
|
|
72
|
+
} else {
|
|
73
|
+
cleanedBottomHeights[0] = 0;
|
|
74
|
+
}
|
|
75
|
+
const startTopHeight = cleanedTopHeights[0];
|
|
76
|
+
const startBottomHeight = cleanedBottomHeights[0];
|
|
77
|
+
let hasAllSameHeights = startTopHeight === startBottomHeight;
|
|
78
|
+
let index = 1;
|
|
79
|
+
for (let i = 1; i < length; ++i) {
|
|
80
|
+
const v1 = positions[i];
|
|
81
|
+
const c1 = ellipsoid.cartesianToCartographic(v1, scratchCartographic2);
|
|
82
|
+
if (hasTopHeights) {
|
|
83
|
+
c1.height = topHeights[i];
|
|
84
|
+
}
|
|
85
|
+
hasAllSameHeights = hasAllSameHeights && c1.height === 0;
|
|
86
|
+
if (!latLonEquals(c0, c1)) {
|
|
87
|
+
cleanedPositions[index] = v1;
|
|
88
|
+
cleanedTopHeights[index] = c1.height;
|
|
89
|
+
if (hasBottomHeights) {
|
|
90
|
+
cleanedBottomHeights[index] = bottomHeights[i];
|
|
91
|
+
} else {
|
|
92
|
+
cleanedBottomHeights[index] = 0;
|
|
93
|
+
}
|
|
94
|
+
hasAllSameHeights = hasAllSameHeights && cleanedTopHeights[index] === cleanedBottomHeights[index];
|
|
95
|
+
Cartographic_default.clone(c1, c0);
|
|
96
|
+
++index;
|
|
97
|
+
} else if (c0.height < c1.height) {
|
|
98
|
+
cleanedTopHeights[index - 1] = c1.height;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (hasAllSameHeights || index < 2) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
cleanedPositions.length = index;
|
|
105
|
+
cleanedTopHeights.length = index;
|
|
106
|
+
cleanedBottomHeights.length = index;
|
|
107
|
+
return {
|
|
108
|
+
positions: cleanedPositions,
|
|
109
|
+
topHeights: cleanedTopHeights,
|
|
110
|
+
bottomHeights: cleanedBottomHeights
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
var positionsArrayScratch = new Array(2);
|
|
114
|
+
var heightsArrayScratch = new Array(2);
|
|
115
|
+
var generateArcOptionsScratch = {
|
|
116
|
+
positions: void 0,
|
|
117
|
+
height: void 0,
|
|
118
|
+
granularity: void 0,
|
|
119
|
+
ellipsoid: void 0
|
|
120
|
+
};
|
|
121
|
+
WallGeometryLibrary.computePositions = function(ellipsoid, wallPositions, maximumHeights, minimumHeights, granularity, duplicateCorners) {
|
|
122
|
+
const o = removeDuplicates(
|
|
123
|
+
ellipsoid,
|
|
124
|
+
wallPositions,
|
|
125
|
+
maximumHeights,
|
|
126
|
+
minimumHeights
|
|
127
|
+
);
|
|
128
|
+
if (!defined_default(o)) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
wallPositions = o.positions;
|
|
132
|
+
maximumHeights = o.topHeights;
|
|
133
|
+
minimumHeights = o.bottomHeights;
|
|
134
|
+
const length = wallPositions.length;
|
|
135
|
+
const numCorners = length - 2;
|
|
136
|
+
let topPositions;
|
|
137
|
+
let bottomPositions;
|
|
138
|
+
const minDistance = Math_default.chordLength(
|
|
139
|
+
granularity,
|
|
140
|
+
ellipsoid.maximumRadius
|
|
141
|
+
);
|
|
142
|
+
const generateArcOptions = generateArcOptionsScratch;
|
|
143
|
+
generateArcOptions.minDistance = minDistance;
|
|
144
|
+
generateArcOptions.ellipsoid = ellipsoid;
|
|
145
|
+
if (duplicateCorners) {
|
|
146
|
+
let count = 0;
|
|
147
|
+
let i;
|
|
148
|
+
for (i = 0; i < length - 1; i++) {
|
|
149
|
+
count += PolylinePipeline_default.numberOfPoints(
|
|
150
|
+
wallPositions[i],
|
|
151
|
+
wallPositions[i + 1],
|
|
152
|
+
minDistance
|
|
153
|
+
) + 1;
|
|
154
|
+
}
|
|
155
|
+
topPositions = new Float64Array(count * 3);
|
|
156
|
+
bottomPositions = new Float64Array(count * 3);
|
|
157
|
+
const generateArcPositions = positionsArrayScratch;
|
|
158
|
+
const generateArcHeights = heightsArrayScratch;
|
|
159
|
+
generateArcOptions.positions = generateArcPositions;
|
|
160
|
+
generateArcOptions.height = generateArcHeights;
|
|
161
|
+
let offset = 0;
|
|
162
|
+
for (i = 0; i < length - 1; i++) {
|
|
163
|
+
generateArcPositions[0] = wallPositions[i];
|
|
164
|
+
generateArcPositions[1] = wallPositions[i + 1];
|
|
165
|
+
generateArcHeights[0] = maximumHeights[i];
|
|
166
|
+
generateArcHeights[1] = maximumHeights[i + 1];
|
|
167
|
+
const pos = PolylinePipeline_default.generateArc(generateArcOptions);
|
|
168
|
+
topPositions.set(pos, offset);
|
|
169
|
+
generateArcHeights[0] = minimumHeights[i];
|
|
170
|
+
generateArcHeights[1] = minimumHeights[i + 1];
|
|
171
|
+
bottomPositions.set(
|
|
172
|
+
PolylinePipeline_default.generateArc(generateArcOptions),
|
|
173
|
+
offset
|
|
174
|
+
);
|
|
175
|
+
offset += pos.length;
|
|
176
|
+
}
|
|
177
|
+
} else {
|
|
178
|
+
generateArcOptions.positions = wallPositions;
|
|
179
|
+
generateArcOptions.height = maximumHeights;
|
|
180
|
+
topPositions = new Float64Array(
|
|
181
|
+
PolylinePipeline_default.generateArc(generateArcOptions)
|
|
182
|
+
);
|
|
183
|
+
generateArcOptions.height = minimumHeights;
|
|
184
|
+
bottomPositions = new Float64Array(
|
|
185
|
+
PolylinePipeline_default.generateArc(generateArcOptions)
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
bottomPositions,
|
|
190
|
+
topPositions,
|
|
191
|
+
numCorners
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
var WallGeometryLibrary_default = WallGeometryLibrary;
|
|
195
|
+
|
|
196
|
+
export {
|
|
197
|
+
WallGeometryLibrary_default
|
|
198
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.29
|
|
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
|
+
};
|