deeptwins-cesium-engine 0.0.39 → 0.0.40
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-22YARAUJ.js +629 -0
- package/Build/Workers/chunk-2HVM4MOI.js +220 -0
- package/Build/Workers/chunk-2PWEYBYR.js +75 -0
- package/Build/Workers/chunk-2ZI2BRKI.js +37 -0
- package/Build/Workers/chunk-3Q6HPHTH.js +684 -0
- package/Build/Workers/chunk-4LE3SGQH.js +634 -0
- package/Build/Workers/chunk-5IBSBFAA.js +287 -0
- package/Build/Workers/chunk-5ZELPLWF.js +58 -0
- package/Build/Workers/chunk-73EDFMPB.js +1073 -0
- package/Build/Workers/chunk-ALIDMMNJ.js +10357 -0
- package/Build/Workers/chunk-AXTXYHVG.js +59 -0
- package/Build/Workers/chunk-B3DSUDQQ.js +101 -0
- package/Build/Workers/chunk-B7R4KLQV.js +959 -0
- package/Build/Workers/chunk-CET7MMFD.js +1055 -0
- package/Build/Workers/chunk-DGWWFN6L.js +102 -0
- package/Build/Workers/chunk-DPZEBUVY.js +122 -0
- package/Build/Workers/chunk-EKUYACAZ.js +163 -0
- package/Build/Workers/chunk-ETQJFLBY.js +435 -0
- package/Build/Workers/chunk-HDJDQBU6.js +758 -0
- package/Build/Workers/chunk-HOO3H5M5.js +171 -0
- package/Build/Workers/chunk-JRFRSSGD.js +1800 -0
- package/Build/Workers/chunk-KMDXAR34.js +1481 -0
- package/Build/Workers/chunk-KZDZFG2L.js +157 -0
- package/Build/Workers/chunk-LDXSEGOX.js +2857 -0
- package/Build/Workers/chunk-LYJFG66W.js +196 -0
- package/Build/Workers/chunk-N2UJHZ4W.js +368 -0
- package/Build/Workers/chunk-NZU4VBYI.js +834 -0
- package/Build/Workers/chunk-OY2Z6SFD.js +100 -0
- package/Build/Workers/chunk-PA4JZFFM.js +353 -0
- package/Build/Workers/chunk-QUJ6BNQF.js +39 -0
- package/Build/Workers/chunk-ROPEB47Y.js +300 -0
- package/Build/Workers/chunk-S3RIIJID.js +781 -0
- package/Build/Workers/chunk-SPS2I45W.js +73 -0
- package/Build/Workers/chunk-TBJBVKDE.js +262 -0
- package/Build/Workers/chunk-TJAONFQM.js +44 -0
- package/Build/Workers/chunk-TJNJ6CLS.js +239 -0
- package/Build/Workers/chunk-U4SUBL6L.js +390 -0
- package/Build/Workers/chunk-U6RITS73.js +456 -0
- package/Build/Workers/chunk-UHPBZJQF.js +2717 -0
- package/Build/Workers/chunk-UHS2YM44.js +115 -0
- package/Build/Workers/chunk-UN3RMNI2.js +500 -0
- package/Build/Workers/chunk-UYS2HZVM.js +421 -0
- package/Build/Workers/chunk-VSEDVQN7.js +305 -0
- package/Build/Workers/chunk-W7KOAHR2.js +691 -0
- package/Build/Workers/chunk-WGHS4HMU.js +55 -0
- package/Build/Workers/chunk-XV4SYFDP.js +138 -0
- package/Build/Workers/chunk-XX7RETEX.js +1258 -0
- package/Build/Workers/chunk-XYMJZUFF.js +476 -0
- package/Build/Workers/chunk-YCU6WHSN.js +963 -0
- package/Build/Workers/chunk-YWEX5QFW.js +398 -0
- package/Build/Workers/chunk-Z2WOKKJM.js +511 -0
- package/Build/Workers/chunk-ZYUOPFWQ.js +139 -0
- package/Build/Workers/combineGeometry.js +22 -22
- package/Build/Workers/createBoxGeometry.js +16 -16
- package/Build/Workers/createBoxOutlineGeometry.js +14 -14
- package/Build/Workers/createCircleGeometry.js +24 -24
- package/Build/Workers/createCircleOutlineGeometry.js +17 -17
- package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createCorridorGeometry.js +27 -27
- package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
- package/Build/Workers/createCylinderGeometry.js +18 -18
- package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
- package/Build/Workers/createEllipseGeometry.js +24 -24
- package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
- package/Build/Workers/createEllipsoidGeometry.js +17 -17
- package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
- package/Build/Workers/createFrustumGeometry.js +16 -16
- package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
- package/Build/Workers/createGeometry.js +22 -22
- package/Build/Workers/createGroundPolylineGeometry.js +20 -20
- package/Build/Workers/createPlaneGeometry.js +14 -14
- package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
- package/Build/Workers/createPolygonGeometry.js +30 -30
- package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
- package/Build/Workers/createPolylineGeometry.js +23 -23
- package/Build/Workers/createPolylineVolumeGeometry.js +29 -29
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
- package/Build/Workers/createRectangleGeometry.js +25 -25
- package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
- package/Build/Workers/createSimplePolylineGeometry.js +21 -21
- package/Build/Workers/createSphereGeometry.js +17 -17
- package/Build/Workers/createSphereOutlineGeometry.js +16 -16
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
- package/Build/Workers/createVectorTileGeometries.js +22 -22
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +20 -20
- package/Build/Workers/createVectorTilePolylines.js +13 -13
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
- package/Build/Workers/createVerticesFromHeightmap.js +20 -20
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
- package/Build/Workers/createWallGeometry.js +22 -22
- package/Build/Workers/createWallOutlineGeometry.js +21 -21
- package/Build/Workers/decodeDraco.js +11 -11
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/transcodeKTX2.js +7 -7
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
- package/Source/Scene/Billboard.js +22 -0
- package/Source/Scene/BillboardTexture.js +92 -2
- package/index.js +97 -97
- package/package.json +1 -1
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.39
|
|
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
|
+
Cartesian4_default,
|
|
28
|
+
Matrix4_default
|
|
29
|
+
} from "./chunk-ALIDMMNJ.js";
|
|
30
|
+
import {
|
|
31
|
+
Cartesian3_default
|
|
32
|
+
} from "./chunk-LDXSEGOX.js";
|
|
33
|
+
import {
|
|
34
|
+
Math_default
|
|
35
|
+
} from "./chunk-UN3RMNI2.js";
|
|
36
|
+
import {
|
|
37
|
+
Check_default,
|
|
38
|
+
DeveloperError_default
|
|
39
|
+
} from "./chunk-EKUYACAZ.js";
|
|
40
|
+
import {
|
|
41
|
+
defined_default
|
|
42
|
+
} from "./chunk-2PWEYBYR.js";
|
|
43
|
+
|
|
44
|
+
// packages/engine/Source/Core/Plane.js
|
|
45
|
+
function Plane(normal, distance) {
|
|
46
|
+
Check_default.typeOf.object("normal", normal);
|
|
47
|
+
if (!Math_default.equalsEpsilon(
|
|
48
|
+
Cartesian3_default.magnitude(normal),
|
|
49
|
+
1,
|
|
50
|
+
Math_default.EPSILON6
|
|
51
|
+
)) {
|
|
52
|
+
throw new DeveloperError_default("normal must be normalized.");
|
|
53
|
+
}
|
|
54
|
+
Check_default.typeOf.number("distance", distance);
|
|
55
|
+
this.normal = Cartesian3_default.clone(normal);
|
|
56
|
+
this.distance = distance;
|
|
57
|
+
}
|
|
58
|
+
Plane.fromPointNormal = function(point, normal, result) {
|
|
59
|
+
Check_default.typeOf.object("point", point);
|
|
60
|
+
Check_default.typeOf.object("normal", normal);
|
|
61
|
+
if (!Math_default.equalsEpsilon(
|
|
62
|
+
Cartesian3_default.magnitude(normal),
|
|
63
|
+
1,
|
|
64
|
+
Math_default.EPSILON6
|
|
65
|
+
)) {
|
|
66
|
+
throw new DeveloperError_default("normal must be normalized.");
|
|
67
|
+
}
|
|
68
|
+
const distance = -Cartesian3_default.dot(normal, point);
|
|
69
|
+
if (!defined_default(result)) {
|
|
70
|
+
return new Plane(normal, distance);
|
|
71
|
+
}
|
|
72
|
+
Cartesian3_default.clone(normal, result.normal);
|
|
73
|
+
result.distance = distance;
|
|
74
|
+
return result;
|
|
75
|
+
};
|
|
76
|
+
var scratchNormal = new Cartesian3_default();
|
|
77
|
+
Plane.fromCartesian4 = function(coefficients, result) {
|
|
78
|
+
Check_default.typeOf.object("coefficients", coefficients);
|
|
79
|
+
const normal = Cartesian3_default.fromCartesian4(coefficients, scratchNormal);
|
|
80
|
+
const distance = coefficients.w;
|
|
81
|
+
if (!Math_default.equalsEpsilon(
|
|
82
|
+
Cartesian3_default.magnitude(normal),
|
|
83
|
+
1,
|
|
84
|
+
Math_default.EPSILON6
|
|
85
|
+
)) {
|
|
86
|
+
throw new DeveloperError_default("normal must be normalized.");
|
|
87
|
+
}
|
|
88
|
+
if (!defined_default(result)) {
|
|
89
|
+
return new Plane(normal, distance);
|
|
90
|
+
}
|
|
91
|
+
Cartesian3_default.clone(normal, result.normal);
|
|
92
|
+
result.distance = distance;
|
|
93
|
+
return result;
|
|
94
|
+
};
|
|
95
|
+
Plane.getPointDistance = function(plane, point) {
|
|
96
|
+
Check_default.typeOf.object("plane", plane);
|
|
97
|
+
Check_default.typeOf.object("point", point);
|
|
98
|
+
return Cartesian3_default.dot(plane.normal, point) + plane.distance;
|
|
99
|
+
};
|
|
100
|
+
var scratchCartesian = new Cartesian3_default();
|
|
101
|
+
Plane.projectPointOntoPlane = function(plane, point, result) {
|
|
102
|
+
Check_default.typeOf.object("plane", plane);
|
|
103
|
+
Check_default.typeOf.object("point", point);
|
|
104
|
+
if (!defined_default(result)) {
|
|
105
|
+
result = new Cartesian3_default();
|
|
106
|
+
}
|
|
107
|
+
const pointDistance = Plane.getPointDistance(plane, point);
|
|
108
|
+
const scaledNormal = Cartesian3_default.multiplyByScalar(
|
|
109
|
+
plane.normal,
|
|
110
|
+
pointDistance,
|
|
111
|
+
scratchCartesian
|
|
112
|
+
);
|
|
113
|
+
return Cartesian3_default.subtract(point, scaledNormal, result);
|
|
114
|
+
};
|
|
115
|
+
var scratchInverseTranspose = new Matrix4_default();
|
|
116
|
+
var scratchPlaneCartesian4 = new Cartesian4_default();
|
|
117
|
+
var scratchTransformNormal = new Cartesian3_default();
|
|
118
|
+
Plane.transform = function(plane, transform, result) {
|
|
119
|
+
Check_default.typeOf.object("plane", plane);
|
|
120
|
+
Check_default.typeOf.object("transform", transform);
|
|
121
|
+
const normal = plane.normal;
|
|
122
|
+
const distance = plane.distance;
|
|
123
|
+
const inverseTranspose = Matrix4_default.inverseTranspose(
|
|
124
|
+
transform,
|
|
125
|
+
scratchInverseTranspose
|
|
126
|
+
);
|
|
127
|
+
let planeAsCartesian4 = Cartesian4_default.fromElements(
|
|
128
|
+
normal.x,
|
|
129
|
+
normal.y,
|
|
130
|
+
normal.z,
|
|
131
|
+
distance,
|
|
132
|
+
scratchPlaneCartesian4
|
|
133
|
+
);
|
|
134
|
+
planeAsCartesian4 = Matrix4_default.multiplyByVector(
|
|
135
|
+
inverseTranspose,
|
|
136
|
+
planeAsCartesian4,
|
|
137
|
+
planeAsCartesian4
|
|
138
|
+
);
|
|
139
|
+
const transformedNormal = Cartesian3_default.fromCartesian4(
|
|
140
|
+
planeAsCartesian4,
|
|
141
|
+
scratchTransformNormal
|
|
142
|
+
);
|
|
143
|
+
planeAsCartesian4 = Cartesian4_default.divideByScalar(
|
|
144
|
+
planeAsCartesian4,
|
|
145
|
+
Cartesian3_default.magnitude(transformedNormal),
|
|
146
|
+
planeAsCartesian4
|
|
147
|
+
);
|
|
148
|
+
return Plane.fromCartesian4(planeAsCartesian4, result);
|
|
149
|
+
};
|
|
150
|
+
Plane.clone = function(plane, result) {
|
|
151
|
+
Check_default.typeOf.object("plane", plane);
|
|
152
|
+
if (!defined_default(result)) {
|
|
153
|
+
return new Plane(plane.normal, plane.distance);
|
|
154
|
+
}
|
|
155
|
+
Cartesian3_default.clone(plane.normal, result.normal);
|
|
156
|
+
result.distance = plane.distance;
|
|
157
|
+
return result;
|
|
158
|
+
};
|
|
159
|
+
Plane.equals = function(left, right) {
|
|
160
|
+
Check_default.typeOf.object("left", left);
|
|
161
|
+
Check_default.typeOf.object("right", right);
|
|
162
|
+
return left.distance === right.distance && Cartesian3_default.equals(left.normal, right.normal);
|
|
163
|
+
};
|
|
164
|
+
Plane.ORIGIN_XY_PLANE = Object.freeze(new Plane(Cartesian3_default.UNIT_Z, 0));
|
|
165
|
+
Plane.ORIGIN_YZ_PLANE = Object.freeze(new Plane(Cartesian3_default.UNIT_X, 0));
|
|
166
|
+
Plane.ORIGIN_ZX_PLANE = Object.freeze(new Plane(Cartesian3_default.UNIT_Y, 0));
|
|
167
|
+
var Plane_default = Plane;
|
|
168
|
+
|
|
169
|
+
export {
|
|
170
|
+
Plane_default
|
|
171
|
+
};
|