ow-eengine-power 2.1.7 → 2.1.8
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/dist/OW_EEngine_Power.js +159 -165
- package/dist/OW_EEngine_Power.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/OW_EEngine_Power.js
CHANGED
|
@@ -21895,7 +21895,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
21895
21895
|
material.alpha = outColor.a;
|
|
21896
21896
|
return material;
|
|
21897
21897
|
}
|
|
21898
|
-
`,
|
|
21898
|
+
`, eA = `uniform vec4 color;
|
|
21899
21899
|
uniform vec4 gapColor;
|
|
21900
21900
|
uniform float dashLength;
|
|
21901
21901
|
uniform float dashPattern;
|
|
@@ -21934,7 +21934,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
21934
21934
|
material.alpha = fragColor.a;
|
|
21935
21935
|
return material;
|
|
21936
21936
|
}
|
|
21937
|
-
`,
|
|
21937
|
+
`, tA = `uniform vec4 color;
|
|
21938
21938
|
uniform float glowPower;
|
|
21939
21939
|
uniform float taperPower;
|
|
21940
21940
|
|
|
@@ -21959,7 +21959,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
21959
21959
|
|
|
21960
21960
|
return material;
|
|
21961
21961
|
}
|
|
21962
|
-
`,
|
|
21962
|
+
`, nA = `uniform vec4 color;
|
|
21963
21963
|
uniform vec4 outlineColor;
|
|
21964
21964
|
uniform float outlineWidth;
|
|
21965
21965
|
|
|
@@ -21988,7 +21988,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
21988
21988
|
|
|
21989
21989
|
return material;
|
|
21990
21990
|
}
|
|
21991
|
-
`,
|
|
21991
|
+
`, iA = `uniform vec4 color;
|
|
21992
21992
|
uniform vec4 rimColor;
|
|
21993
21993
|
uniform float width;
|
|
21994
21994
|
|
|
@@ -22009,7 +22009,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
22009
22009
|
|
|
22010
22010
|
return material;
|
|
22011
22011
|
}
|
|
22012
|
-
`,
|
|
22012
|
+
`, sA = `uniform sampler2D image;
|
|
22013
22013
|
|
|
22014
22014
|
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
22015
22015
|
{
|
|
@@ -22020,7 +22020,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
22020
22020
|
material.alpha = rampColor.a;
|
|
22021
22021
|
return material;
|
|
22022
22022
|
}
|
|
22023
|
-
`,
|
|
22023
|
+
`, oA = `uniform vec4 evenColor;
|
|
22024
22024
|
uniform vec4 oddColor;
|
|
22025
22025
|
uniform float offset;
|
|
22026
22026
|
uniform float repeat;
|
|
@@ -22044,7 +22044,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
22044
22044
|
|
|
22045
22045
|
return material;
|
|
22046
22046
|
}
|
|
22047
|
-
`,
|
|
22047
|
+
`, rA = `uniform vec4 waterColor;
|
|
22048
22048
|
uniform vec4 landColor;
|
|
22049
22049
|
|
|
22050
22050
|
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
@@ -22059,7 +22059,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
|
22059
22059
|
|
|
22060
22060
|
return material;
|
|
22061
22061
|
}
|
|
22062
|
-
`,
|
|
22062
|
+
`, aA = `// Thanks for the contribution Jonas
|
|
22063
22063
|
// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog
|
|
22064
22064
|
|
|
22065
22065
|
uniform sampler2D specularMap;
|
|
@@ -22125,7 +22125,7 @@ function ne(e) {
|
|
|
22125
22125
|
), this._magnificationFilter = g(
|
|
22126
22126
|
e.magnificationFilter,
|
|
22127
22127
|
fs.LINEAR
|
|
22128
|
-
), this._strict = void 0, this._template = void 0, this._count = void 0, this._texturePaths = {}, this._loadedImages = [], this._loadedCubeMaps = [], this._textures = {}, this._updateFunctions = [], this._defaultTexture = void 0,
|
|
22128
|
+
), this._strict = void 0, this._template = void 0, this._count = void 0, this._texturePaths = {}, this._loadedImages = [], this._loadedCubeMaps = [], this._textures = {}, this._updateFunctions = [], this._defaultTexture = void 0, cA(e, this), Object.defineProperties(this, {
|
|
22129
22129
|
type: {
|
|
22130
22130
|
value: this.type,
|
|
22131
22131
|
writable: !1
|
|
@@ -22243,7 +22243,7 @@ ne.prototype.destroy = function() {
|
|
|
22243
22243
|
t.hasOwnProperty(n) && t[n].destroy();
|
|
22244
22244
|
return at(this);
|
|
22245
22245
|
};
|
|
22246
|
-
function
|
|
22246
|
+
function cA(e, t) {
|
|
22247
22247
|
e = g(e, g.EMPTY_OBJECT), t._strict = g(e.strict, !1), t._count = g(e.count, 0), t._template = hn(
|
|
22248
22248
|
g(e.fabric, g.EMPTY_OBJECT)
|
|
22249
22249
|
), t._template.uniforms = hn(
|
|
@@ -22257,7 +22257,7 @@ function c2(e, t) {
|
|
|
22257
22257
|
const a = hn(i.fabric, !0);
|
|
22258
22258
|
t._template = fn(t._template, a, !0), n = i.translucent;
|
|
22259
22259
|
}
|
|
22260
|
-
|
|
22260
|
+
uA(t), l(i) || ne._materialCache.addMaterial(t.type, t), pA(t), yA(t), CA(t);
|
|
22261
22261
|
const s = t._translucentFunctions.length === 0 ? !0 : void 0;
|
|
22262
22262
|
if (n = g(n, s), n = g(e.translucent, n), l(n))
|
|
22263
22263
|
if (typeof n == "function") {
|
|
@@ -22285,17 +22285,17 @@ function ll(e, t) {
|
|
|
22285
22285
|
}
|
|
22286
22286
|
throw new C(n);
|
|
22287
22287
|
}
|
|
22288
|
-
function
|
|
22288
|
+
function hA(e, t) {
|
|
22289
22289
|
const n = `fabric: uniforms and materials cannot share the same property '${e}'`;
|
|
22290
22290
|
throw new C(n);
|
|
22291
22291
|
}
|
|
22292
|
-
const
|
|
22292
|
+
const fA = [
|
|
22293
22293
|
"type",
|
|
22294
22294
|
"materials",
|
|
22295
22295
|
"uniforms",
|
|
22296
22296
|
"components",
|
|
22297
22297
|
"source"
|
|
22298
|
-
],
|
|
22298
|
+
], lA = [
|
|
22299
22299
|
"diffuse",
|
|
22300
22300
|
"specular",
|
|
22301
22301
|
"shininess",
|
|
@@ -22303,31 +22303,31 @@ const f2 = [
|
|
|
22303
22303
|
"emission",
|
|
22304
22304
|
"alpha"
|
|
22305
22305
|
];
|
|
22306
|
-
function
|
|
22306
|
+
function uA(e) {
|
|
22307
22307
|
const t = e._template, n = t.uniforms, i = t.materials, s = t.components;
|
|
22308
22308
|
if (l(s) && l(t.source))
|
|
22309
22309
|
throw new C(
|
|
22310
22310
|
"fabric: cannot have source and components in the same template."
|
|
22311
22311
|
);
|
|
22312
|
-
uc(t,
|
|
22312
|
+
uc(t, fA, ll, !0), uc(
|
|
22313
22313
|
s,
|
|
22314
|
-
|
|
22314
|
+
lA,
|
|
22315
22315
|
ll,
|
|
22316
22316
|
!0
|
|
22317
22317
|
);
|
|
22318
22318
|
const a = [];
|
|
22319
22319
|
for (const r in i)
|
|
22320
22320
|
i.hasOwnProperty(r) && a.push(r);
|
|
22321
|
-
uc(n, a,
|
|
22321
|
+
uc(n, a, hA, !1);
|
|
22322
22322
|
}
|
|
22323
|
-
function
|
|
22323
|
+
function dA(e, t) {
|
|
22324
22324
|
const n = t._template.materials;
|
|
22325
22325
|
for (const i in n)
|
|
22326
22326
|
if (n.hasOwnProperty(i) && e.indexOf(i) > -1)
|
|
22327
22327
|
return !0;
|
|
22328
22328
|
return !1;
|
|
22329
22329
|
}
|
|
22330
|
-
function
|
|
22330
|
+
function pA(e) {
|
|
22331
22331
|
const t = e._template.components, n = e._template.source;
|
|
22332
22332
|
if (l(n))
|
|
22333
22333
|
e.shaderSource += `${n}
|
|
@@ -22341,7 +22341,7 @@ function p2(e) {
|
|
|
22341
22341
|
for (const s in t)
|
|
22342
22342
|
if (t.hasOwnProperty(s))
|
|
22343
22343
|
if (s === "diffuse" || s === "emission") {
|
|
22344
|
-
const r = i &&
|
|
22344
|
+
const r = i && dA(t[s], e) ? t[s] : `czm_gammaCorrect(${t[s]})`;
|
|
22345
22345
|
e.shaderSource += `material.${s} = ${r};
|
|
22346
22346
|
`;
|
|
22347
22347
|
} else s === "alpha" ? e.shaderSource += `material.alpha = ${t.alpha};
|
|
@@ -22357,8 +22357,8 @@ const ul = {
|
|
|
22357
22357
|
mat2: ue,
|
|
22358
22358
|
mat3: G,
|
|
22359
22359
|
mat4: V
|
|
22360
|
-
},
|
|
22361
|
-
function
|
|
22360
|
+
}, mA = /\.ktx2$/i;
|
|
22361
|
+
function _A(e) {
|
|
22362
22362
|
let t;
|
|
22363
22363
|
return function(n, i) {
|
|
22364
22364
|
const s = n.uniforms, a = s[e], r = t !== a, f = !l(a) || a === ne.DefaultImageId;
|
|
@@ -22397,7 +22397,7 @@ function _2(e) {
|
|
|
22397
22397
|
if (typeof a == "string" || p) {
|
|
22398
22398
|
const m = p ? a : ae.createIfNeeded(a);
|
|
22399
22399
|
let y;
|
|
22400
|
-
|
|
22400
|
+
mA.test(m.url) ? y = Op(m.url) : y = m.fetchImage(), Promise.resolve(y).then(function(T) {
|
|
22401
22401
|
n._loadedImages.push({
|
|
22402
22402
|
id: e,
|
|
22403
22403
|
image: T
|
|
@@ -22413,7 +22413,7 @@ function _2(e) {
|
|
|
22413
22413
|
}
|
|
22414
22414
|
};
|
|
22415
22415
|
}
|
|
22416
|
-
function
|
|
22416
|
+
function gA(e) {
|
|
22417
22417
|
return function(t, n) {
|
|
22418
22418
|
const i = t.uniforms[e];
|
|
22419
22419
|
if (i instanceof It) {
|
|
@@ -22442,13 +22442,13 @@ function g2(e) {
|
|
|
22442
22442
|
}
|
|
22443
22443
|
};
|
|
22444
22444
|
}
|
|
22445
|
-
function
|
|
22445
|
+
function yA(e) {
|
|
22446
22446
|
const t = e._template.uniforms;
|
|
22447
22447
|
for (const n in t)
|
|
22448
22448
|
t.hasOwnProperty(n) && Yp(e, n);
|
|
22449
22449
|
}
|
|
22450
22450
|
function Yp(e, t) {
|
|
22451
|
-
const n = e._strict, i = e._template.uniforms, s = i[t], a =
|
|
22451
|
+
const n = e._strict, i = e._template.uniforms, s = i[t], a = TA(s);
|
|
22452
22452
|
if (!l(a))
|
|
22453
22453
|
throw new C(
|
|
22454
22454
|
`fabric: uniform '${t}' has invalid type.`
|
|
@@ -22462,7 +22462,7 @@ function Yp(e, t) {
|
|
|
22462
22462
|
} else {
|
|
22463
22463
|
if (a === "sampler2D") {
|
|
22464
22464
|
const h = `${t}Dimensions`;
|
|
22465
|
-
|
|
22465
|
+
wA(e, h) > 0 && (i[h] = {
|
|
22466
22466
|
type: "ivec3",
|
|
22467
22467
|
x: 1,
|
|
22468
22468
|
y: 1
|
|
@@ -22482,11 +22482,11 @@ function Yp(e, t) {
|
|
|
22482
22482
|
if (e.uniforms[t] = s, a === "sampler2D")
|
|
22483
22483
|
e._uniforms[c] = function() {
|
|
22484
22484
|
return e._textures[t];
|
|
22485
|
-
}, e._updateFunctions.push(
|
|
22485
|
+
}, e._updateFunctions.push(_A(t));
|
|
22486
22486
|
else if (a === "samplerCube")
|
|
22487
22487
|
e._uniforms[c] = function() {
|
|
22488
22488
|
return e._textures[t];
|
|
22489
|
-
}, e._updateFunctions.push(
|
|
22489
|
+
}, e._updateFunctions.push(gA(t));
|
|
22490
22490
|
else if (a.indexOf("mat") !== -1) {
|
|
22491
22491
|
const h = new ul[a]();
|
|
22492
22492
|
e._uniforms[c] = function() {
|
|
@@ -22501,7 +22501,7 @@ function Yp(e, t) {
|
|
|
22501
22501
|
};
|
|
22502
22502
|
}
|
|
22503
22503
|
}
|
|
22504
|
-
function
|
|
22504
|
+
function TA(e) {
|
|
22505
22505
|
let t = e.type;
|
|
22506
22506
|
if (!l(t)) {
|
|
22507
22507
|
const n = typeof e;
|
|
@@ -22523,7 +22523,7 @@ function T2(e) {
|
|
|
22523
22523
|
}
|
|
22524
22524
|
return t;
|
|
22525
22525
|
}
|
|
22526
|
-
function
|
|
22526
|
+
function CA(e) {
|
|
22527
22527
|
const t = e._strict, n = e._template.materials;
|
|
22528
22528
|
for (const i in n)
|
|
22529
22529
|
if (n.hasOwnProperty(i)) {
|
|
@@ -22563,7 +22563,7 @@ function zo(e, t, n, i) {
|
|
|
22563
22563
|
}
|
|
22564
22564
|
), s;
|
|
22565
22565
|
}
|
|
22566
|
-
function
|
|
22566
|
+
function wA(e, t, n) {
|
|
22567
22567
|
return zo(e, t, t, n);
|
|
22568
22568
|
}
|
|
22569
22569
|
ne._materialCache = {
|
|
@@ -22728,7 +22728,7 @@ ne._materialCache.addMaterial(ne.StripeType, {
|
|
|
22728
22728
|
offset: 0,
|
|
22729
22729
|
repeat: 5
|
|
22730
22730
|
},
|
|
22731
|
-
source:
|
|
22731
|
+
source: oA
|
|
22732
22732
|
},
|
|
22733
22733
|
translucent: function(e) {
|
|
22734
22734
|
const t = e.uniforms;
|
|
@@ -22782,7 +22782,7 @@ ne._materialCache.addMaterial(ne.WaterType, {
|
|
|
22782
22782
|
specularIntensity: 0.5,
|
|
22783
22783
|
fadeFactor: 1
|
|
22784
22784
|
},
|
|
22785
|
-
source:
|
|
22785
|
+
source: aA
|
|
22786
22786
|
},
|
|
22787
22787
|
translucent: function(e) {
|
|
22788
22788
|
const t = e.uniforms;
|
|
@@ -22798,7 +22798,7 @@ ne._materialCache.addMaterial(ne.RimLightingType, {
|
|
|
22798
22798
|
rimColor: new D(1, 1, 1, 0.4),
|
|
22799
22799
|
width: 0.3
|
|
22800
22800
|
},
|
|
22801
|
-
source:
|
|
22801
|
+
source: iA
|
|
22802
22802
|
},
|
|
22803
22803
|
translucent: function(e) {
|
|
22804
22804
|
const t = e.uniforms;
|
|
@@ -22848,7 +22848,7 @@ ne._materialCache.addMaterial(ne.PolylineDashType, {
|
|
|
22848
22848
|
dashLength: 16,
|
|
22849
22849
|
dashPattern: 255
|
|
22850
22850
|
},
|
|
22851
|
-
source:
|
|
22851
|
+
source: eA
|
|
22852
22852
|
},
|
|
22853
22853
|
translucent: !0
|
|
22854
22854
|
});
|
|
@@ -22861,7 +22861,7 @@ ne._materialCache.addMaterial(ne.PolylineGlowType, {
|
|
|
22861
22861
|
glowPower: 0.25,
|
|
22862
22862
|
taperPower: 1
|
|
22863
22863
|
},
|
|
22864
|
-
source:
|
|
22864
|
+
source: tA
|
|
22865
22865
|
},
|
|
22866
22866
|
translucent: !0
|
|
22867
22867
|
});
|
|
@@ -22874,7 +22874,7 @@ ne._materialCache.addMaterial(ne.PolylineOutlineType, {
|
|
|
22874
22874
|
outlineColor: new D(1, 0, 0, 1),
|
|
22875
22875
|
outlineWidth: 1
|
|
22876
22876
|
},
|
|
22877
|
-
source:
|
|
22877
|
+
source: nA
|
|
22878
22878
|
},
|
|
22879
22879
|
translucent: function(e) {
|
|
22880
22880
|
const t = e.uniforms;
|
|
@@ -22914,7 +22914,7 @@ ne._materialCache.addMaterial(ne.SlopeRampMaterialType, {
|
|
|
22914
22914
|
uniforms: {
|
|
22915
22915
|
image: ne.DefaultImageId
|
|
22916
22916
|
},
|
|
22917
|
-
source:
|
|
22917
|
+
source: sA
|
|
22918
22918
|
},
|
|
22919
22919
|
translucent: !1
|
|
22920
22920
|
});
|
|
@@ -22945,7 +22945,7 @@ ne.WaterMaskType = "WaterMask";
|
|
|
22945
22945
|
ne._materialCache.addMaterial(ne.WaterMaskType, {
|
|
22946
22946
|
fabric: {
|
|
22947
22947
|
type: ne.WaterMaskType,
|
|
22948
|
-
source:
|
|
22948
|
+
source: rA,
|
|
22949
22949
|
uniforms: {
|
|
22950
22950
|
waterColor: new D(1, 1, 1, 1),
|
|
22951
22951
|
landColor: new D(0, 0, 0, 0)
|
|
@@ -22953,7 +22953,7 @@ ne._materialCache.addMaterial(ne.WaterMaskType, {
|
|
|
22953
22953
|
},
|
|
22954
22954
|
translucent: !1
|
|
22955
22955
|
});
|
|
22956
|
-
const
|
|
22956
|
+
const AA = `in vec3 v_positionEC;
|
|
22957
22957
|
in vec3 v_normalEC;
|
|
22958
22958
|
in vec4 v_color;
|
|
22959
22959
|
|
|
@@ -22977,7 +22977,7 @@ void main()
|
|
|
22977
22977
|
|
|
22978
22978
|
out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
|
|
22979
22979
|
}
|
|
22980
|
-
`,
|
|
22980
|
+
`, EA = `in vec3 position3DHigh;
|
|
22981
22981
|
in vec3 position3DLow;
|
|
22982
22982
|
in vec3 normal;
|
|
22983
22983
|
in vec4 color;
|
|
@@ -23003,7 +23003,7 @@ void main()
|
|
|
23003
23003
|
{
|
|
23004
23004
|
out_FragColor = czm_gammaCorrect(v_color);
|
|
23005
23005
|
}
|
|
23006
|
-
`,
|
|
23006
|
+
`, bA = `in vec3 position3DHigh;
|
|
23007
23007
|
in vec3 position3DLow;
|
|
23008
23008
|
in vec4 color;
|
|
23009
23009
|
in float batchId;
|
|
@@ -23021,7 +23021,7 @@ void main()
|
|
|
23021
23021
|
`;
|
|
23022
23022
|
function Kt(e) {
|
|
23023
23023
|
e = g(e, g.EMPTY_OBJECT);
|
|
23024
|
-
const t = g(e.translucent, !0), n = g(e.closed, !1), i = g(e.flat, !1), s = i ?
|
|
23024
|
+
const t = g(e.translucent, !0), n = g(e.closed, !1), i = g(e.flat, !1), s = i ? bA : EA, a = i ? Xp : AA, r = i ? Kt.FLAT_VERTEX_FORMAT : Kt.VERTEX_FORMAT;
|
|
23025
23025
|
this.material = void 0, this.translucent = t, this._vertexShaderSource = g(e.vertexShaderSource, s), this._fragmentShaderSource = g(e.fragmentShaderSource, a), this._renderState = Vt.getDefaultRenderState(
|
|
23026
23026
|
t,
|
|
23027
23027
|
n,
|
|
@@ -23187,9 +23187,9 @@ Object.defineProperties(Gs.prototype, {
|
|
|
23187
23187
|
Gs.prototype.getType = function(e) {
|
|
23188
23188
|
return "Color";
|
|
23189
23189
|
};
|
|
23190
|
-
const
|
|
23190
|
+
const xA = new ee();
|
|
23191
23191
|
Gs.prototype.getValue = function(e, t) {
|
|
23192
|
-
return l(e) || (e = ee.now(
|
|
23192
|
+
return l(e) || (e = ee.now(xA)), l(t) || (t = {}), t.color = ve.getValueOrClonedDefault(
|
|
23193
23193
|
this._color,
|
|
23194
23194
|
e,
|
|
23195
23195
|
D.WHITE,
|
|
@@ -23273,7 +23273,7 @@ ji.prototype.positionToTileXY = function(e, t, n) {
|
|
|
23273
23273
|
let d = (i.north - e.latitude) / f | 0;
|
|
23274
23274
|
return d >= a && (d = a - 1), l(n) ? (n.x = h, n.y = d, n) : new q(h, d);
|
|
23275
23275
|
};
|
|
23276
|
-
const dl = new u(), pl = new u(), ml = new se(), dc = new u(),
|
|
23276
|
+
const dl = new u(), pl = new u(), ml = new se(), dc = new u(), SA = new u(), _l = new te(), IA = new ji(), oo = [
|
|
23277
23277
|
new se(),
|
|
23278
23278
|
new se(),
|
|
23279
23279
|
new se(),
|
|
@@ -23310,7 +23310,7 @@ Ge.getMinimumMaximumHeights = function(e, t) {
|
|
|
23310
23310
|
);
|
|
23311
23311
|
const f = t.scaleToGeodeticSurface(
|
|
23312
23312
|
dc,
|
|
23313
|
-
|
|
23313
|
+
SA
|
|
23314
23314
|
);
|
|
23315
23315
|
if (l(f)) {
|
|
23316
23316
|
const c = u.distance(
|
|
@@ -23378,7 +23378,7 @@ function $p(e) {
|
|
|
23378
23378
|
let f = !1;
|
|
23379
23379
|
for (let c = 0; c < 4; ++c) {
|
|
23380
23380
|
const h = oo[c];
|
|
23381
|
-
if (
|
|
23381
|
+
if (IA.positionToTileXY(h, r, ro), c === 0)
|
|
23382
23382
|
i = ro.x, s = ro.y;
|
|
23383
23383
|
else if (i !== ro.x || s !== ro.y) {
|
|
23384
23384
|
f = !0;
|
|
@@ -23725,7 +23725,7 @@ Me.rayPlane = function(e, t, n) {
|
|
|
23725
23725
|
if (!(f < 0))
|
|
23726
23726
|
return n = u.multiplyByScalar(s, f, n), u.add(i, n, n);
|
|
23727
23727
|
};
|
|
23728
|
-
const
|
|
23728
|
+
const DA = new u(), OA = new u(), Zp = new u(), yl = new u(), Tl = new u();
|
|
23729
23729
|
Me.rayTriangleParametric = function(e, t, n, i, s) {
|
|
23730
23730
|
if (!l(e))
|
|
23731
23731
|
throw new C("ray is required.");
|
|
@@ -23736,7 +23736,7 @@ Me.rayTriangleParametric = function(e, t, n, i, s) {
|
|
|
23736
23736
|
if (!l(i))
|
|
23737
23737
|
throw new C("p2 is required.");
|
|
23738
23738
|
s = g(s, !1);
|
|
23739
|
-
const a = e.origin, r = e.direction, f = u.subtract(n, t,
|
|
23739
|
+
const a = e.origin, r = e.direction, f = u.subtract(n, t, DA), c = u.subtract(i, t, OA), h = u.cross(r, c, Zp), d = u.dot(f, h);
|
|
23740
23740
|
let p, m, y, T, w;
|
|
23741
23741
|
if (s) {
|
|
23742
23742
|
if (d < S.EPSILON6 || (p = u.subtract(a, t, yl), y = u.dot(p, h), y < 0 || y > d) || (m = u.cross(p, f, Tl), T = u.dot(r, m), T < 0 || y + T > d))
|
|
@@ -23763,7 +23763,7 @@ Me.rayTriangle = function(e, t, n, i, s, a) {
|
|
|
23763
23763
|
if (!(!l(r) || r < 0))
|
|
23764
23764
|
return l(a) || (a = new u()), u.multiplyByScalar(e.direction, r, a), u.add(e.origin, a, a);
|
|
23765
23765
|
};
|
|
23766
|
-
const
|
|
23766
|
+
const vA = new qs();
|
|
23767
23767
|
Me.lineSegmentTriangle = function(e, t, n, i, s, a, r) {
|
|
23768
23768
|
if (!l(e))
|
|
23769
23769
|
throw new C("v0 is required.");
|
|
@@ -23775,7 +23775,7 @@ Me.lineSegmentTriangle = function(e, t, n, i, s, a, r) {
|
|
|
23775
23775
|
throw new C("p1 is required.");
|
|
23776
23776
|
if (!l(s))
|
|
23777
23777
|
throw new C("p2 is required.");
|
|
23778
|
-
const f =
|
|
23778
|
+
const f = vA;
|
|
23779
23779
|
u.clone(e, f.origin), u.subtract(t, e, f.direction), u.normalize(f.direction, f.direction);
|
|
23780
23780
|
const c = Me.rayTriangleParametric(
|
|
23781
23781
|
f,
|
|
@@ -23787,7 +23787,7 @@ Me.lineSegmentTriangle = function(e, t, n, i, s, a, r) {
|
|
|
23787
23787
|
if (!(!l(c) || c < 0 || c > u.distance(e, t)))
|
|
23788
23788
|
return l(r) || (r = new u()), u.multiplyByScalar(f.direction, c, r), u.add(f.origin, r, r);
|
|
23789
23789
|
};
|
|
23790
|
-
function
|
|
23790
|
+
function WA(e, t, n, i) {
|
|
23791
23791
|
const s = t * t - 4 * e * n;
|
|
23792
23792
|
if (s < 0)
|
|
23793
23793
|
return;
|
|
@@ -23799,13 +23799,13 @@ function W2(e, t, n, i) {
|
|
|
23799
23799
|
if (a !== 0)
|
|
23800
23800
|
return i.root0 = i.root1 = a, i;
|
|
23801
23801
|
}
|
|
23802
|
-
const
|
|
23802
|
+
const PA = {
|
|
23803
23803
|
root0: 0,
|
|
23804
23804
|
root1: 0
|
|
23805
23805
|
};
|
|
23806
23806
|
function Kp(e, t, n) {
|
|
23807
23807
|
l(n) || (n = new rs());
|
|
23808
|
-
const i = e.origin, s = e.direction, a = t.center, r = t.radius * t.radius, f = u.subtract(i, a, Zp), c = u.dot(s, s), h = 2 * u.dot(s, f), d = u.magnitudeSquared(f) - r, p =
|
|
23808
|
+
const i = e.origin, s = e.direction, a = t.center, r = t.radius * t.radius, f = u.subtract(i, a, Zp), c = u.dot(s, s), h = 2 * u.dot(s, f), d = u.magnitudeSquared(f) - r, p = WA(c, h, d, PA);
|
|
23809
23809
|
if (l(p))
|
|
23810
23810
|
return n.start = p.root0, n.stop = p.root1, n;
|
|
23811
23811
|
}
|
|
@@ -23817,7 +23817,7 @@ Me.raySphere = function(e, t, n) {
|
|
|
23817
23817
|
if (n = Kp(e, t, n), !(!l(n) || n.stop < 0))
|
|
23818
23818
|
return n.start = Math.max(n.start, 0), n;
|
|
23819
23819
|
};
|
|
23820
|
-
const
|
|
23820
|
+
const BA = new qs();
|
|
23821
23821
|
Me.lineSegmentSphere = function(e, t, n, i) {
|
|
23822
23822
|
if (!l(e))
|
|
23823
23823
|
throw new C("p0 is required.");
|
|
@@ -23825,22 +23825,22 @@ Me.lineSegmentSphere = function(e, t, n, i) {
|
|
|
23825
23825
|
throw new C("p1 is required.");
|
|
23826
23826
|
if (!l(n))
|
|
23827
23827
|
throw new C("sphere is required.");
|
|
23828
|
-
const s =
|
|
23828
|
+
const s = BA;
|
|
23829
23829
|
u.clone(e, s.origin);
|
|
23830
23830
|
const a = u.subtract(t, e, s.direction), r = u.magnitude(a);
|
|
23831
23831
|
if (u.normalize(a, a), i = Kp(s, n, i), !(!l(i) || i.stop < 0 || i.start > r))
|
|
23832
23832
|
return i.start = Math.max(i.start, 0), i.stop = Math.min(i.stop, r), i;
|
|
23833
23833
|
};
|
|
23834
|
-
const
|
|
23834
|
+
const RA = new u(), LA = new u();
|
|
23835
23835
|
Me.rayEllipsoid = function(e, t) {
|
|
23836
23836
|
if (!l(e))
|
|
23837
23837
|
throw new C("ray is required.");
|
|
23838
23838
|
if (!l(t))
|
|
23839
23839
|
throw new C("ellipsoid is required.");
|
|
23840
|
-
const n = t.oneOverRadii, i = u.multiplyComponents(n, e.origin,
|
|
23840
|
+
const n = t.oneOverRadii, i = u.multiplyComponents(n, e.origin, RA), s = u.multiplyComponents(
|
|
23841
23841
|
n,
|
|
23842
23842
|
e.direction,
|
|
23843
|
-
|
|
23843
|
+
LA
|
|
23844
23844
|
), a = u.magnitudeSquared(i), r = u.dot(i, s);
|
|
23845
23845
|
let f, c, h, d, p;
|
|
23846
23846
|
if (a > 1) {
|
|
@@ -23922,7 +23922,7 @@ Me.quadraticVectorExpression = function(e, t, n, i, s) {
|
|
|
23922
23922
|
}
|
|
23923
23923
|
return y;
|
|
23924
23924
|
};
|
|
23925
|
-
const mc = new u(), Cl = new u(), wl = new u(), Lr = new u(),
|
|
23925
|
+
const mc = new u(), Cl = new u(), wl = new u(), Lr = new u(), zA = new u(), NA = new G(), FA = new G(), MA = new G(), UA = new G(), kA = new G(), Al = new G(), El = new G(), bl = new u(), VA = new u(), GA = new se();
|
|
23926
23926
|
Me.grazingAltitudeLocation = function(e, t) {
|
|
23927
23927
|
if (!l(e))
|
|
23928
23928
|
throw new C("ray is required.");
|
|
@@ -23943,9 +23943,9 @@ Me.grazingAltitudeLocation = function(e, t) {
|
|
|
23943
23943
|
), h = u.normalize(
|
|
23944
23944
|
u.cross(r, c, wl),
|
|
23945
23945
|
wl
|
|
23946
|
-
), d =
|
|
23946
|
+
), d = NA;
|
|
23947
23947
|
d[0] = r.x, d[1] = r.y, d[2] = r.z, d[3] = c.x, d[4] = c.y, d[5] = c.z, d[6] = h.x, d[7] = h.y, d[8] = h.z;
|
|
23948
|
-
const p = G.transpose(d,
|
|
23948
|
+
const p = G.transpose(d, FA), m = G.fromScale(t.radii, MA), y = G.fromScale(t.oneOverRadii, UA), T = kA;
|
|
23949
23949
|
T[0] = 0, T[1] = -i.z, T[2] = i.y, T[3] = i.z, T[4] = 0, T[5] = -i.x, T[6] = -i.y, T[7] = i.x, T[8] = 0;
|
|
23950
23950
|
const w = G.multiply(
|
|
23951
23951
|
G.multiply(p, y, Al),
|
|
@@ -23955,7 +23955,7 @@ Me.grazingAltitudeLocation = function(e, t) {
|
|
|
23955
23955
|
G.multiply(w, m, El),
|
|
23956
23956
|
d,
|
|
23957
23957
|
El
|
|
23958
|
-
), E = G.multiplyByVector(w, n,
|
|
23958
|
+
), E = G.multiplyByVector(w, n, zA), b = Me.quadraticVectorExpression(
|
|
23959
23959
|
A,
|
|
23960
23960
|
u.negate(E, mc),
|
|
23961
23961
|
0,
|
|
@@ -23965,7 +23965,7 @@ Me.grazingAltitudeLocation = function(e, t) {
|
|
|
23965
23965
|
let I, O;
|
|
23966
23966
|
const B = b.length;
|
|
23967
23967
|
if (B > 0) {
|
|
23968
|
-
let z = u.clone(u.ZERO,
|
|
23968
|
+
let z = u.clone(u.ZERO, VA), F = Number.NEGATIVE_INFINITY;
|
|
23969
23969
|
for (let U = 0; U < B; ++U) {
|
|
23970
23970
|
I = G.multiplyByVector(
|
|
23971
23971
|
m,
|
|
@@ -23980,14 +23980,14 @@ Me.grazingAltitudeLocation = function(e, t) {
|
|
|
23980
23980
|
}
|
|
23981
23981
|
const N = t.cartesianToCartographic(
|
|
23982
23982
|
z,
|
|
23983
|
-
|
|
23983
|
+
GA
|
|
23984
23984
|
);
|
|
23985
23985
|
return F = S.clamp(F, 0, 1), O = u.magnitude(
|
|
23986
23986
|
u.subtract(z, n, Lr)
|
|
23987
23987
|
) * Math.sqrt(1 - F * F), O = s ? -O : O, N.height = O, t.cartographicToCartesian(N, new u());
|
|
23988
23988
|
}
|
|
23989
23989
|
};
|
|
23990
|
-
const
|
|
23990
|
+
const qA = new u();
|
|
23991
23991
|
Me.lineSegmentPlane = function(e, t, n, i) {
|
|
23992
23992
|
if (!l(e))
|
|
23993
23993
|
throw new C("endPoint0 is required.");
|
|
@@ -23999,7 +23999,7 @@ Me.lineSegmentPlane = function(e, t, n, i) {
|
|
|
23999
23999
|
const s = u.subtract(
|
|
24000
24000
|
t,
|
|
24001
24001
|
e,
|
|
24002
|
-
|
|
24002
|
+
qA
|
|
24003
24003
|
), a = n.normal, r = u.dot(a, s);
|
|
24004
24004
|
if (Math.abs(r) < S.EPSILON6)
|
|
24005
24005
|
return;
|
|
@@ -24202,10 +24202,10 @@ Object.defineProperties(oi.prototype, {
|
|
|
24202
24202
|
}
|
|
24203
24203
|
}
|
|
24204
24204
|
});
|
|
24205
|
-
const
|
|
24205
|
+
const HA = new Qt();
|
|
24206
24206
|
oi.fromPoints = function(e, t) {
|
|
24207
24207
|
_.defined("cartesians", e);
|
|
24208
|
-
const n = Qt.fromPoints(e,
|
|
24208
|
+
const n = Qt.fromPoints(e, HA);
|
|
24209
24209
|
return new oi(n.center, t);
|
|
24210
24210
|
};
|
|
24211
24211
|
const Qp = new qs(), xa = new u();
|
|
@@ -24270,10 +24270,10 @@ oi.prototype.projectPointsToNearestOnPlane = function(e, t) {
|
|
|
24270
24270
|
t[i] = this.projectPointToNearestOnPlane(e[i], t[i]);
|
|
24271
24271
|
return t;
|
|
24272
24272
|
};
|
|
24273
|
-
const
|
|
24273
|
+
const jA = new u();
|
|
24274
24274
|
oi.prototype.projectPointOntoEllipsoid = function(e, t) {
|
|
24275
24275
|
_.defined("cartesian", e), l(t) || (t = new u());
|
|
24276
|
-
const n = this._ellipsoid, i = this._origin, s = this._xAxis, a = this._yAxis, r =
|
|
24276
|
+
const n = this._ellipsoid, i = this._origin, s = this._xAxis, a = this._yAxis, r = jA;
|
|
24277
24277
|
return u.multiplyByScalar(s, e.x, r), t = u.add(i, r, t), u.multiplyByScalar(a, e.y, r), u.add(t, r, t), n.scaleToGeocentricSurface(t, t), t;
|
|
24278
24278
|
};
|
|
24279
24279
|
oi.prototype.projectPointsOntoEllipsoid = function(e, t) {
|
|
@@ -24298,7 +24298,7 @@ ze.unpack = function(e, t, n) {
|
|
|
24298
24298
|
n.halfAxes
|
|
24299
24299
|
), n;
|
|
24300
24300
|
};
|
|
24301
|
-
const
|
|
24301
|
+
const YA = new u(), XA = new u(), $A = new u(), ZA = new u(), KA = new u(), QA = new u(), JA = new G(), e2 = {
|
|
24302
24302
|
unitary: new G(),
|
|
24303
24303
|
diagonal: new G()
|
|
24304
24304
|
};
|
|
@@ -24306,31 +24306,31 @@ ze.fromPoints = function(e, t) {
|
|
|
24306
24306
|
if (l(t) || (t = new ze()), !l(e) || e.length === 0)
|
|
24307
24307
|
return t.halfAxes = G.ZERO, t.center = u.ZERO, t;
|
|
24308
24308
|
let n;
|
|
24309
|
-
const i = e.length, s = u.clone(e[0],
|
|
24309
|
+
const i = e.length, s = u.clone(e[0], YA);
|
|
24310
24310
|
for (n = 1; n < i; n++)
|
|
24311
24311
|
u.add(s, e[n], s);
|
|
24312
24312
|
const a = 1 / i;
|
|
24313
24313
|
u.multiplyByScalar(s, a, s);
|
|
24314
24314
|
let r = 0, f = 0, c = 0, h = 0, d = 0, p = 0, m;
|
|
24315
24315
|
for (n = 0; n < i; n++)
|
|
24316
|
-
m = u.subtract(e[n], s,
|
|
24316
|
+
m = u.subtract(e[n], s, XA), r += m.x * m.x, f += m.x * m.y, c += m.x * m.z, h += m.y * m.y, d += m.y * m.z, p += m.z * m.z;
|
|
24317
24317
|
r *= a, f *= a, c *= a, h *= a, d *= a, p *= a;
|
|
24318
|
-
const y =
|
|
24318
|
+
const y = JA;
|
|
24319
24319
|
y[0] = r, y[1] = f, y[2] = c, y[3] = f, y[4] = h, y[5] = d, y[6] = c, y[7] = d, y[8] = p;
|
|
24320
24320
|
const T = G.computeEigenDecomposition(
|
|
24321
24321
|
y,
|
|
24322
|
-
|
|
24322
|
+
e2
|
|
24323
24323
|
), w = G.clone(T.unitary, t.halfAxes);
|
|
24324
|
-
let A = G.getColumn(w, 0,
|
|
24324
|
+
let A = G.getColumn(w, 0, ZA), E = G.getColumn(w, 1, KA), b = G.getColumn(w, 2, QA), I = -Number.MAX_VALUE, O = -Number.MAX_VALUE, B = -Number.MAX_VALUE, z = Number.MAX_VALUE, F = Number.MAX_VALUE, N = Number.MAX_VALUE;
|
|
24325
24325
|
for (n = 0; n < i; n++)
|
|
24326
24326
|
m = e[n], I = Math.max(u.dot(A, m), I), O = Math.max(u.dot(E, m), O), B = Math.max(u.dot(b, m), B), z = Math.min(u.dot(A, m), z), F = Math.min(u.dot(E, m), F), N = Math.min(u.dot(b, m), N);
|
|
24327
24327
|
A = u.multiplyByScalar(A, 0.5 * (z + I), A), E = u.multiplyByScalar(E, 0.5 * (F + O), E), b = u.multiplyByScalar(b, 0.5 * (N + B), b);
|
|
24328
24328
|
const U = u.add(A, E, t.center);
|
|
24329
24329
|
u.add(U, b, U);
|
|
24330
|
-
const M = $
|
|
24330
|
+
const M = $A;
|
|
24331
24331
|
return M.x = I - z, M.y = O - F, M.z = B - N, u.multiplyByScalar(M, 0.5, M), G.multiplyByScale(t.halfAxes, M, t.halfAxes), t;
|
|
24332
24332
|
};
|
|
24333
|
-
const Jp = new u(),
|
|
24333
|
+
const Jp = new u(), t2 = new u();
|
|
24334
24334
|
function xl(e, t, n, i, s, a, r, f, c, h, d) {
|
|
24335
24335
|
if (!l(s) || !l(a) || !l(r) || !l(f) || !l(c) || !l(h))
|
|
24336
24336
|
throw new C(
|
|
@@ -24341,12 +24341,12 @@ function xl(e, t, n, i, s, a, r, f, c, h, d) {
|
|
|
24341
24341
|
G.setColumn(p, 0, t, p), G.setColumn(p, 1, n, p), G.setColumn(p, 2, i, p);
|
|
24342
24342
|
let m = Jp;
|
|
24343
24343
|
m.x = (s + a) / 2, m.y = (r + f) / 2, m.z = (c + h) / 2;
|
|
24344
|
-
const y =
|
|
24344
|
+
const y = t2;
|
|
24345
24345
|
y.x = (a - s) / 2, y.y = (f - r) / 2, y.z = (h - c) / 2;
|
|
24346
24346
|
const T = d.center;
|
|
24347
24347
|
return m = G.multiplyByVector(p, m, m), u.add(e, m, T), G.multiplyByScale(p, y, p), d;
|
|
24348
24348
|
}
|
|
24349
|
-
const Sl = new se(),
|
|
24349
|
+
const Sl = new se(), n2 = new u(), i2 = new se(), s2 = new se(), o2 = new se(), r2 = new se(), a2 = new se(), c2 = new u(), Il = new u(), h2 = new u(), Dl = new u(), f2 = new u(), l2 = new q(), u2 = new q(), d2 = new q(), p2 = new q(), m2 = new q(), _2 = new u(), g2 = new u(), y2 = new u(), T2 = new u(), C2 = new q(), w2 = new u(), A2 = new u(), E2 = new u(), b2 = new Ue(u.UNIT_X, 0);
|
|
24350
24350
|
ze.fromRectangle = function(e, t, n, i, s) {
|
|
24351
24351
|
if (!l(e))
|
|
24352
24352
|
throw new C("rectangle is required");
|
|
@@ -24370,37 +24370,37 @@ ze.fromRectangle = function(e, t, n, i, s) {
|
|
|
24370
24370
|
Sl
|
|
24371
24371
|
), N = i.cartographicToCartesian(
|
|
24372
24372
|
F,
|
|
24373
|
-
|
|
24373
|
+
n2
|
|
24374
24374
|
), U = new oi(N, i);
|
|
24375
24375
|
p = U.plane;
|
|
24376
24376
|
const M = F.longitude, j = e.south < 0 && e.north > 0 ? 0 : F.latitude, Y = se.fromRadians(
|
|
24377
24377
|
M,
|
|
24378
24378
|
e.north,
|
|
24379
24379
|
n,
|
|
24380
|
-
|
|
24380
|
+
i2
|
|
24381
24381
|
), o = se.fromRadians(
|
|
24382
24382
|
e.west,
|
|
24383
24383
|
e.north,
|
|
24384
24384
|
n,
|
|
24385
|
-
|
|
24385
|
+
s2
|
|
24386
24386
|
), x = se.fromRadians(
|
|
24387
24387
|
e.west,
|
|
24388
24388
|
j,
|
|
24389
24389
|
n,
|
|
24390
|
-
|
|
24390
|
+
o2
|
|
24391
24391
|
), P = se.fromRadians(
|
|
24392
24392
|
e.west,
|
|
24393
24393
|
e.south,
|
|
24394
24394
|
n,
|
|
24395
|
-
|
|
24395
|
+
r2
|
|
24396
24396
|
), L = se.fromRadians(
|
|
24397
24397
|
M,
|
|
24398
24398
|
e.south,
|
|
24399
24399
|
n,
|
|
24400
|
-
|
|
24400
|
+
a2
|
|
24401
24401
|
), H = i.cartographicToCartesian(
|
|
24402
24402
|
Y,
|
|
24403
|
-
|
|
24403
|
+
c2
|
|
24404
24404
|
);
|
|
24405
24405
|
let X = i.cartographicToCartesian(
|
|
24406
24406
|
o,
|
|
@@ -24408,7 +24408,7 @@ ze.fromRectangle = function(e, t, n, i, s) {
|
|
|
24408
24408
|
);
|
|
24409
24409
|
const J = i.cartographicToCartesian(
|
|
24410
24410
|
x,
|
|
24411
|
-
|
|
24411
|
+
h2
|
|
24412
24412
|
);
|
|
24413
24413
|
let K = i.cartographicToCartesian(
|
|
24414
24414
|
P,
|
|
@@ -24416,22 +24416,22 @@ ze.fromRectangle = function(e, t, n, i, s) {
|
|
|
24416
24416
|
);
|
|
24417
24417
|
const ce = i.cartographicToCartesian(
|
|
24418
24418
|
L,
|
|
24419
|
-
|
|
24419
|
+
f2
|
|
24420
24420
|
), le = U.projectPointToNearestOnPlane(
|
|
24421
24421
|
H,
|
|
24422
|
-
|
|
24422
|
+
l2
|
|
24423
24423
|
), Ce = U.projectPointToNearestOnPlane(
|
|
24424
24424
|
X,
|
|
24425
|
-
|
|
24425
|
+
u2
|
|
24426
24426
|
), xe = U.projectPointToNearestOnPlane(
|
|
24427
24427
|
J,
|
|
24428
|
-
|
|
24428
|
+
d2
|
|
24429
24429
|
), Ae = U.projectPointToNearestOnPlane(
|
|
24430
24430
|
K,
|
|
24431
|
-
|
|
24431
|
+
p2
|
|
24432
24432
|
), Le = U.projectPointToNearestOnPlane(
|
|
24433
24433
|
ce,
|
|
24434
|
-
|
|
24434
|
+
m2
|
|
24435
24435
|
);
|
|
24436
24436
|
return a = Math.min(
|
|
24437
24437
|
Ce.x,
|
|
@@ -24468,27 +24468,27 @@ ze.fromRectangle = function(e, t, n, i, s) {
|
|
|
24468
24468
|
T,
|
|
24469
24469
|
n,
|
|
24470
24470
|
i,
|
|
24471
|
-
|
|
24471
|
+
_2
|
|
24472
24472
|
);
|
|
24473
24473
|
A.z = 0;
|
|
24474
|
-
const b = Math.abs(A.x) < S.EPSILON10 && Math.abs(A.y) < S.EPSILON10 ? u.UNIT_X : u.normalize(A,
|
|
24474
|
+
const b = Math.abs(A.x) < S.EPSILON10 && Math.abs(A.y) < S.EPSILON10 ? u.UNIT_X : u.normalize(A, g2), I = u.UNIT_Z, O = u.cross(
|
|
24475
24475
|
b,
|
|
24476
24476
|
I,
|
|
24477
|
-
|
|
24477
|
+
y2
|
|
24478
24478
|
);
|
|
24479
|
-
p = Ue.fromPointNormal(A, b,
|
|
24479
|
+
p = Ue.fromPointNormal(A, b, b2);
|
|
24480
24480
|
const B = u.fromRadians(
|
|
24481
24481
|
w + S.PI_OVER_TWO,
|
|
24482
24482
|
T,
|
|
24483
24483
|
n,
|
|
24484
24484
|
i,
|
|
24485
|
-
|
|
24485
|
+
T2
|
|
24486
24486
|
);
|
|
24487
24487
|
r = u.dot(
|
|
24488
24488
|
Ue.projectPointOntoPlane(
|
|
24489
24489
|
p,
|
|
24490
24490
|
B,
|
|
24491
|
-
|
|
24491
|
+
C2
|
|
24492
24492
|
),
|
|
24493
24493
|
O
|
|
24494
24494
|
), a = -r, c = u.fromRadians(
|
|
@@ -24496,20 +24496,20 @@ ze.fromRectangle = function(e, t, n, i, s) {
|
|
|
24496
24496
|
e.north,
|
|
24497
24497
|
y ? t : n,
|
|
24498
24498
|
i,
|
|
24499
|
-
|
|
24499
|
+
w2
|
|
24500
24500
|
).z, f = u.fromRadians(
|
|
24501
24501
|
0,
|
|
24502
24502
|
e.south,
|
|
24503
24503
|
m ? t : n,
|
|
24504
24504
|
i,
|
|
24505
|
-
|
|
24505
|
+
A2
|
|
24506
24506
|
).z;
|
|
24507
24507
|
const z = u.fromRadians(
|
|
24508
24508
|
e.east,
|
|
24509
24509
|
T,
|
|
24510
24510
|
n,
|
|
24511
24511
|
i,
|
|
24512
|
-
|
|
24512
|
+
E2
|
|
24513
24513
|
);
|
|
24514
24514
|
return h = Ue.getPointDistance(p, z), d = 0, xl(
|
|
24515
24515
|
A,
|
|
@@ -24550,7 +24550,7 @@ ze.intersectPlane = function(e, t) {
|
|
|
24550
24550
|
), h = u.dot(i, n) + t.distance;
|
|
24551
24551
|
return h <= -c ? Dt.OUTSIDE : h >= c ? Dt.INSIDE : Dt.INTERSECTING;
|
|
24552
24552
|
};
|
|
24553
|
-
const em = new u(), tm = new u(), nm = new u(),
|
|
24553
|
+
const em = new u(), tm = new u(), nm = new u(), x2 = new u(), Ol = new u(), S2 = new u();
|
|
24554
24554
|
ze.distanceSquaredTo = function(e, t) {
|
|
24555
24555
|
if (!l(e))
|
|
24556
24556
|
throw new C("box is required.");
|
|
@@ -24569,14 +24569,14 @@ ze.distanceSquaredTo = function(e, t) {
|
|
|
24569
24569
|
} else if (y === 2) {
|
|
24570
24570
|
T = s, p ? T = a : m && (T = r);
|
|
24571
24571
|
let O = u.UNIT_Y;
|
|
24572
|
-
O.equalsEpsilon(T, S.EPSILON3) && (O = u.UNIT_X), w = u.cross(T, O,
|
|
24572
|
+
O.equalsEpsilon(T, S.EPSILON3) && (O = u.UNIT_X), w = u.cross(T, O, x2), u.normalize(w, w), A = u.cross(T, w, Ol), u.normalize(A, A), T === s ? (a = w, r = A) : T === a ? (r = w, s = A) : T === r && (s = w, a = A);
|
|
24573
24573
|
} else y === 3 && (s = u.UNIT_X, a = u.UNIT_Y, r = u.UNIT_Z);
|
|
24574
|
-
const E =
|
|
24574
|
+
const E = S2;
|
|
24575
24575
|
E.x = u.dot(n, s), E.y = u.dot(n, a), E.z = u.dot(n, r);
|
|
24576
24576
|
let b = 0, I;
|
|
24577
24577
|
return E.x < -f ? (I = E.x + f, b += I * I) : E.x > f && (I = E.x - f, b += I * I), E.y < -c ? (I = E.y + c, b += I * I) : E.y > c && (I = E.y - c, b += I * I), E.z < -h ? (I = E.z + h, b += I * I) : E.z > h && (I = E.z - h, b += I * I), b;
|
|
24578
24578
|
};
|
|
24579
|
-
const
|
|
24579
|
+
const I2 = new u(), D2 = new u();
|
|
24580
24580
|
ze.computePlaneDistances = function(e, t, n, i) {
|
|
24581
24581
|
if (!l(e))
|
|
24582
24582
|
throw new C("box is required.");
|
|
@@ -24586,13 +24586,13 @@ ze.computePlaneDistances = function(e, t, n, i) {
|
|
|
24586
24586
|
throw new C("direction is required.");
|
|
24587
24587
|
l(i) || (i = new rs());
|
|
24588
24588
|
let s = Number.POSITIVE_INFINITY, a = Number.NEGATIVE_INFINITY;
|
|
24589
|
-
const r = e.center, f = e.halfAxes, c = G.getColumn(f, 0, em), h = G.getColumn(f, 1, tm), d = G.getColumn(f, 2, nm), p = u.add(c, h,
|
|
24589
|
+
const r = e.center, f = e.halfAxes, c = G.getColumn(f, 0, em), h = G.getColumn(f, 1, tm), d = G.getColumn(f, 2, nm), p = u.add(c, h, I2);
|
|
24590
24590
|
u.add(p, d, p), u.add(p, r, p);
|
|
24591
|
-
const m = u.subtract(p, t,
|
|
24591
|
+
const m = u.subtract(p, t, D2);
|
|
24592
24592
|
let y = u.dot(n, m);
|
|
24593
24593
|
return s = Math.min(y, s), a = Math.max(y, a), u.add(r, c, p), u.add(p, h, p), u.subtract(p, d, p), u.subtract(p, t, m), y = u.dot(n, m), s = Math.min(y, s), a = Math.max(y, a), u.add(r, c, p), u.subtract(p, h, p), u.add(p, d, p), u.subtract(p, t, m), y = u.dot(n, m), s = Math.min(y, s), a = Math.max(y, a), u.add(r, c, p), u.subtract(p, h, p), u.subtract(p, d, p), u.subtract(p, t, m), y = u.dot(n, m), s = Math.min(y, s), a = Math.max(y, a), u.subtract(r, c, p), u.add(p, h, p), u.add(p, d, p), u.subtract(p, t, m), y = u.dot(n, m), s = Math.min(y, s), a = Math.max(y, a), u.subtract(r, c, p), u.add(p, h, p), u.subtract(p, d, p), u.subtract(p, t, m), y = u.dot(n, m), s = Math.min(y, s), a = Math.max(y, a), u.subtract(r, c, p), u.subtract(p, h, p), u.add(p, d, p), u.subtract(p, t, m), y = u.dot(n, m), s = Math.min(y, s), a = Math.max(y, a), u.subtract(r, c, p), u.subtract(p, h, p), u.subtract(p, d, p), u.subtract(p, t, m), y = u.dot(n, m), s = Math.min(y, s), a = Math.max(y, a), i.start = s, i.stop = a, i;
|
|
24594
24594
|
};
|
|
24595
|
-
const
|
|
24595
|
+
const O2 = new u(), v2 = new u(), W2 = new u();
|
|
24596
24596
|
ze.computeCorners = function(e, t) {
|
|
24597
24597
|
_.typeOf.object("box", e), l(t) || (t = [
|
|
24598
24598
|
new u(),
|
|
@@ -24604,20 +24604,20 @@ ze.computeCorners = function(e, t) {
|
|
|
24604
24604
|
new u(),
|
|
24605
24605
|
new u()
|
|
24606
24606
|
]);
|
|
24607
|
-
const n = e.center, i = e.halfAxes, s = G.getColumn(i, 0,
|
|
24607
|
+
const n = e.center, i = e.halfAxes, s = G.getColumn(i, 0, O2), a = G.getColumn(i, 1, v2), r = G.getColumn(i, 2, W2);
|
|
24608
24608
|
return u.clone(n, t[0]), u.subtract(t[0], s, t[0]), u.subtract(t[0], a, t[0]), u.subtract(t[0], r, t[0]), u.clone(n, t[1]), u.subtract(t[1], s, t[1]), u.subtract(t[1], a, t[1]), u.add(t[1], r, t[1]), u.clone(n, t[2]), u.subtract(t[2], s, t[2]), u.add(t[2], a, t[2]), u.subtract(t[2], r, t[2]), u.clone(n, t[3]), u.subtract(t[3], s, t[3]), u.add(t[3], a, t[3]), u.add(t[3], r, t[3]), u.clone(n, t[4]), u.add(t[4], s, t[4]), u.subtract(t[4], a, t[4]), u.subtract(t[4], r, t[4]), u.clone(n, t[5]), u.add(t[5], s, t[5]), u.subtract(t[5], a, t[5]), u.add(t[5], r, t[5]), u.clone(n, t[6]), u.add(t[6], s, t[6]), u.add(t[6], a, t[6]), u.subtract(t[6], r, t[6]), u.clone(n, t[7]), u.add(t[7], s, t[7]), u.add(t[7], a, t[7]), u.add(t[7], r, t[7]), t;
|
|
24609
24609
|
};
|
|
24610
|
-
const
|
|
24610
|
+
const P2 = new G();
|
|
24611
24611
|
ze.computeTransformation = function(e, t) {
|
|
24612
24612
|
_.typeOf.object("box", e), l(t) || (t = new V());
|
|
24613
24613
|
const n = e.center, i = G.multiplyByUniformScale(
|
|
24614
24614
|
e.halfAxes,
|
|
24615
24615
|
2,
|
|
24616
|
-
|
|
24616
|
+
P2
|
|
24617
24617
|
);
|
|
24618
24618
|
return V.fromRotationTranslation(i, n, t);
|
|
24619
24619
|
};
|
|
24620
|
-
const
|
|
24620
|
+
const B2 = new te();
|
|
24621
24621
|
ze.isOccluded = function(e, t) {
|
|
24622
24622
|
if (!l(e))
|
|
24623
24623
|
throw new C("box is required.");
|
|
@@ -24625,7 +24625,7 @@ ze.isOccluded = function(e, t) {
|
|
|
24625
24625
|
throw new C("occluder is required.");
|
|
24626
24626
|
const n = te.fromOrientedBoundingBox(
|
|
24627
24627
|
e,
|
|
24628
|
-
|
|
24628
|
+
B2
|
|
24629
24629
|
);
|
|
24630
24630
|
return !t.isBoundingSphereVisible(n);
|
|
24631
24631
|
};
|
|
@@ -24669,11 +24669,11 @@ No.getHeight = function(e, t, n) {
|
|
|
24669
24669
|
throw new C("relativeHeight must be a finite number.");
|
|
24670
24670
|
return (e - n) * t + n;
|
|
24671
24671
|
};
|
|
24672
|
-
const
|
|
24672
|
+
const R2 = new se();
|
|
24673
24673
|
No.getPosition = function(e, t, n, i, s) {
|
|
24674
24674
|
const a = t.cartesianToCartographic(
|
|
24675
24675
|
e,
|
|
24676
|
-
|
|
24676
|
+
R2
|
|
24677
24677
|
);
|
|
24678
24678
|
if (!l(a))
|
|
24679
24679
|
return u.clone(e, s);
|
|
@@ -24690,7 +24690,7 @@ No.getPosition = function(e, t, n, i, s) {
|
|
|
24690
24690
|
s
|
|
24691
24691
|
);
|
|
24692
24692
|
};
|
|
24693
|
-
const
|
|
24693
|
+
const L2 = `in vec3 position3DHigh;
|
|
24694
24694
|
in vec3 position3DLow;
|
|
24695
24695
|
in float batchId;
|
|
24696
24696
|
|
|
@@ -24791,7 +24791,7 @@ void main()
|
|
|
24791
24791
|
|
|
24792
24792
|
gl_Position = czm_depthClamp(czm_modelViewProjectionRelativeToEye * position);
|
|
24793
24793
|
}
|
|
24794
|
-
`,
|
|
24794
|
+
`, z2 = `#ifdef VECTOR_TILE
|
|
24795
24795
|
uniform vec4 u_highlightColor;
|
|
24796
24796
|
#endif
|
|
24797
24797
|
|
|
@@ -24828,7 +24828,7 @@ void main(void)
|
|
|
24828
24828
|
BOTH: 2
|
|
24829
24829
|
};
|
|
24830
24830
|
im.NUMBER_OF_CLASSIFICATION_TYPES = 3;
|
|
24831
|
-
const Si = Object.freeze(im),
|
|
24831
|
+
const Si = Object.freeze(im), N2 = {
|
|
24832
24832
|
/**
|
|
24833
24833
|
* The depth test never passes.
|
|
24834
24834
|
*
|
|
@@ -24885,8 +24885,8 @@ const Si = Object.freeze(im), NA = {
|
|
|
24885
24885
|
* @constant
|
|
24886
24886
|
*/
|
|
24887
24887
|
ALWAYS: R.ALWAYS
|
|
24888
|
-
}, sm = Object.freeze(
|
|
24889
|
-
function
|
|
24888
|
+
}, sm = Object.freeze(N2);
|
|
24889
|
+
function F2(e, t) {
|
|
24890
24890
|
if (!l(e))
|
|
24891
24891
|
throw new C("array is required.");
|
|
24892
24892
|
if (!l(t) || t < 1)
|
|
@@ -24908,7 +24908,7 @@ function vi(e, t, n) {
|
|
|
24908
24908
|
throw new C("numberOfInstances is required");
|
|
24909
24909
|
if (this._attributes = t, this._numberOfInstances = n, t.length === 0)
|
|
24910
24910
|
return;
|
|
24911
|
-
const i =
|
|
24911
|
+
const i = M2(t), s = e.floatingPointTexture, a = i === ye.FLOAT && !s, r = U2(t, a), f = k2(r, t, a), c = Math.floor(
|
|
24912
24912
|
Se.maximumTextureSize / f
|
|
24913
24913
|
), h = Math.min(
|
|
24914
24914
|
n,
|
|
@@ -24942,7 +24942,7 @@ Object.defineProperties(vi.prototype, {
|
|
|
24942
24942
|
}
|
|
24943
24943
|
}
|
|
24944
24944
|
});
|
|
24945
|
-
function
|
|
24945
|
+
function M2(e) {
|
|
24946
24946
|
let t = !1;
|
|
24947
24947
|
const n = e.length;
|
|
24948
24948
|
for (let i = 0; i < n; ++i)
|
|
@@ -24956,7 +24956,7 @@ function om(e, t) {
|
|
|
24956
24956
|
const n = e[t].componentsPerAttribute;
|
|
24957
24957
|
return n === 2 ? q : n === 3 ? u : n === 4 ? Z : Number;
|
|
24958
24958
|
}
|
|
24959
|
-
function
|
|
24959
|
+
function U2(e, t) {
|
|
24960
24960
|
const n = new Array(e.length);
|
|
24961
24961
|
let i = 0;
|
|
24962
24962
|
const s = e.length;
|
|
@@ -24966,12 +24966,12 @@ function UA(e, t) {
|
|
|
24966
24966
|
}
|
|
24967
24967
|
return n;
|
|
24968
24968
|
}
|
|
24969
|
-
function
|
|
24969
|
+
function k2(e, t, n) {
|
|
24970
24970
|
const i = e.length, s = e[i - 1];
|
|
24971
24971
|
return t[i - 1].componentDatatype !== he.UNSIGNED_BYTE && n ? s + 4 : s + 1;
|
|
24972
24972
|
}
|
|
24973
24973
|
const Ao = new Z();
|
|
24974
|
-
function
|
|
24974
|
+
function V2(e, t, n) {
|
|
24975
24975
|
let i = Z.unpack(e, t, Ao);
|
|
24976
24976
|
const s = Z.unpackFloat(i);
|
|
24977
24977
|
i = Z.unpack(e, t + 4, Ao);
|
|
@@ -24982,7 +24982,7 @@ function VA(e, t, n) {
|
|
|
24982
24982
|
const f = Z.unpackFloat(i);
|
|
24983
24983
|
return Z.fromElements(s, a, r, f, n);
|
|
24984
24984
|
}
|
|
24985
|
-
function
|
|
24985
|
+
function G2(e, t, n) {
|
|
24986
24986
|
let i = Z.packFloat(e.x, Ao);
|
|
24987
24987
|
Z.pack(i, t, n), i = Z.packFloat(e.y, i), Z.pack(i, t, n + 4), i = Z.packFloat(e.z, i), Z.pack(i, t, n + 8), i = Z.packFloat(e.w, i), Z.pack(i, t, n + 12);
|
|
24988
24988
|
}
|
|
@@ -24994,7 +24994,7 @@ vi.prototype.getBatchedAttribute = function(e, t, n) {
|
|
|
24994
24994
|
throw new C("attributeIndex is out of range");
|
|
24995
24995
|
const i = this._attributes, s = this._offsets[t], r = 4 * this._stride * e + 4 * s;
|
|
24996
24996
|
let f;
|
|
24997
|
-
this._packFloats && i[t].componentDatatype !== ye.UNSIGNED_BYTE ? f =
|
|
24997
|
+
this._packFloats && i[t].componentDatatype !== ye.UNSIGNED_BYTE ? f = V2(
|
|
24998
24998
|
this._batchValues,
|
|
24999
24999
|
r,
|
|
25000
25000
|
vl
|
|
@@ -25006,13 +25006,13 @@ vi.prototype.getBatchedAttribute = function(e, t, n) {
|
|
|
25006
25006
|
const c = om(i, t);
|
|
25007
25007
|
return l(c.fromCartesian4) ? c.fromCartesian4(f, n) : l(c.clone) ? c.clone(f, n) : f.x;
|
|
25008
25008
|
};
|
|
25009
|
-
const
|
|
25009
|
+
const q2 = [
|
|
25010
25010
|
void 0,
|
|
25011
25011
|
void 0,
|
|
25012
25012
|
new q(),
|
|
25013
25013
|
new u(),
|
|
25014
25014
|
new Z()
|
|
25015
|
-
],
|
|
25015
|
+
], H2 = new Z();
|
|
25016
25016
|
vi.prototype.setBatchedAttribute = function(e, t, n) {
|
|
25017
25017
|
if (e < 0 || e >= this._numberOfInstances)
|
|
25018
25018
|
throw new C("instanceIndex is out of range.");
|
|
@@ -25020,19 +25020,19 @@ vi.prototype.setBatchedAttribute = function(e, t, n) {
|
|
|
25020
25020
|
throw new C("attributeIndex is out of range");
|
|
25021
25021
|
if (!l(n))
|
|
25022
25022
|
throw new C("value is required.");
|
|
25023
|
-
const i = this._attributes, s =
|
|
25023
|
+
const i = this._attributes, s = q2[i[t].componentsPerAttribute], a = this.getBatchedAttribute(
|
|
25024
25024
|
e,
|
|
25025
25025
|
t,
|
|
25026
25026
|
s
|
|
25027
25027
|
), r = om(this._attributes, t);
|
|
25028
25028
|
if (l(r.equals) ? r.equals(a, n) : a === n)
|
|
25029
25029
|
return;
|
|
25030
|
-
const c =
|
|
25030
|
+
const c = H2;
|
|
25031
25031
|
c.x = l(n.x) ? n.x : n, c.y = l(n.y) ? n.y : 0, c.z = l(n.z) ? n.z : 0, c.w = l(n.w) ? n.w : 0;
|
|
25032
25032
|
const h = this._offsets[t], p = 4 * this._stride * e + 4 * h;
|
|
25033
|
-
this._packFloats && i[t].componentDatatype !== ye.UNSIGNED_BYTE ?
|
|
25033
|
+
this._packFloats && i[t].componentDatatype !== ye.UNSIGNED_BYTE ? G2(c, this._batchValues, p) : Z.pack(c, this._batchValues, p), this._batchValuesDirty = !0;
|
|
25034
25034
|
};
|
|
25035
|
-
function
|
|
25035
|
+
function j2(e, t) {
|
|
25036
25036
|
const n = e._textureDimensions;
|
|
25037
25037
|
e._texture = new Nt({
|
|
25038
25038
|
context: t,
|
|
@@ -25044,7 +25044,7 @@ function jA(e, t) {
|
|
|
25044
25044
|
flipY: !1
|
|
25045
25045
|
});
|
|
25046
25046
|
}
|
|
25047
|
-
function
|
|
25047
|
+
function Y2(e) {
|
|
25048
25048
|
const t = e._textureDimensions;
|
|
25049
25049
|
e._texture.copyFrom({
|
|
25050
25050
|
source: {
|
|
@@ -25055,7 +25055,7 @@ function YA(e) {
|
|
|
25055
25055
|
});
|
|
25056
25056
|
}
|
|
25057
25057
|
vi.prototype.update = function(e) {
|
|
25058
|
-
l(this._texture) && !this._batchValuesDirty || this._attributes.length === 0 || (this._batchValuesDirty = !1, l(this._texture) ||
|
|
25058
|
+
l(this._texture) && !this._batchValuesDirty || this._attributes.length === 0 || (this._batchValuesDirty = !1, l(this._texture) || j2(this, e.context), Y2(this));
|
|
25059
25059
|
};
|
|
25060
25060
|
vi.prototype.getUniformMapCallback = function() {
|
|
25061
25061
|
const e = this;
|
|
@@ -25073,7 +25073,7 @@ vi.prototype.getUniformMapCallback = function() {
|
|
|
25073
25073
|
});
|
|
25074
25074
|
};
|
|
25075
25075
|
};
|
|
25076
|
-
function
|
|
25076
|
+
function X2(e) {
|
|
25077
25077
|
const t = e._stride;
|
|
25078
25078
|
return e._textureDimensions.y === 1 ? `uniform vec4 batchTextureStep;
|
|
25079
25079
|
vec2 computeSt(float batchId)
|
|
@@ -25098,14 +25098,14 @@ vec2 computeSt(float batchId)
|
|
|
25098
25098
|
}
|
|
25099
25099
|
`;
|
|
25100
25100
|
}
|
|
25101
|
-
function $
|
|
25101
|
+
function $2(e) {
|
|
25102
25102
|
return e === 1 ? "float" : `vec${e}`;
|
|
25103
25103
|
}
|
|
25104
|
-
function
|
|
25104
|
+
function Z2(e) {
|
|
25105
25105
|
return e === 1 ? ".x" : e === 2 ? ".xy" : e === 3 ? ".xyz" : "";
|
|
25106
25106
|
}
|
|
25107
|
-
function
|
|
25108
|
-
const i = e._attributes[t], s = i.componentsPerAttribute, a = i.functionName, r = $
|
|
25107
|
+
function K2(e, t) {
|
|
25108
|
+
const i = e._attributes[t], s = i.componentsPerAttribute, a = i.functionName, r = $2(s), f = Z2(s), c = e._offsets[t];
|
|
25109
25109
|
let h = `${r} ${a}(float batchId)
|
|
25110
25110
|
{
|
|
25111
25111
|
vec2 st = computeSt(batchId);
|
|
@@ -25132,11 +25132,11 @@ vi.prototype.getVertexShaderCallback = function() {
|
|
|
25132
25132
|
};
|
|
25133
25133
|
let t = `uniform highp sampler2D batchTexture;
|
|
25134
25134
|
`;
|
|
25135
|
-
t += `${
|
|
25135
|
+
t += `${X2(this)}
|
|
25136
25136
|
`;
|
|
25137
25137
|
const n = e.length;
|
|
25138
25138
|
for (let i = 0; i < n; ++i)
|
|
25139
|
-
t +=
|
|
25139
|
+
t += K2(this, i);
|
|
25140
25140
|
return function(i) {
|
|
25141
25141
|
const s = i.indexOf("void main"), a = i.substring(0, s), r = i.substring(s);
|
|
25142
25142
|
return `${a}
|
|
@@ -25277,7 +25277,7 @@ Ve.getGlslType = function(e) {
|
|
|
25277
25277
|
throw new C("attributeType is not a valid value.");
|
|
25278
25278
|
}
|
|
25279
25279
|
};
|
|
25280
|
-
const
|
|
25280
|
+
const Q2 = Object.freeze(Ve), Wl = 1 / 256, Pl = 256, De = {};
|
|
25281
25281
|
De.octEncodeInRange = function(e, t, n) {
|
|
25282
25282
|
_.defined("vector", e), _.defined("result", n);
|
|
25283
25283
|
const i = u.magnitudeSquared(e);
|
|
@@ -25380,7 +25380,7 @@ De.zigZagDeltaDecode = function(e, t, n) {
|
|
|
25380
25380
|
};
|
|
25381
25381
|
De.dequantize = function(e, t, n, i) {
|
|
25382
25382
|
_.defined("typedArray", e), _.defined("componentDatatype", t), _.defined("type", n), _.defined("count", i);
|
|
25383
|
-
const s =
|
|
25383
|
+
const s = Q2.getNumberOfComponents(n);
|
|
25384
25384
|
let a;
|
|
25385
25385
|
switch (t) {
|
|
25386
25386
|
case he.BYTE:
|
|
@@ -25438,7 +25438,7 @@ De.decodeRGB565 = function(e, t) {
|
|
|
25438
25438
|
return t;
|
|
25439
25439
|
};
|
|
25440
25440
|
const Rl = new u(), Ll = new u(), zl = new u();
|
|
25441
|
-
function
|
|
25441
|
+
function J2(e, t, n, i, s) {
|
|
25442
25442
|
_.defined("point", e), _.defined("p0", t), _.defined("p1", n), _.defined("p2", i), l(s) || (s = new u());
|
|
25443
25443
|
let a, r, f, c, h, d, p, m;
|
|
25444
25444
|
if (l(t.z)) {
|
|
@@ -26451,7 +26451,7 @@ const yE = cf(
|
|
|
26451
26451
|
function Ur(e, t, n, i, s, a, r, f, c, h, d, p, m, y, T, w) {
|
|
26452
26452
|
if (!l(a) && !l(r) && !l(f) && !l(c) && !l(h) && y === 0)
|
|
26453
26453
|
return;
|
|
26454
|
-
const A = u.fromArray(s, e * 3, So), E = u.fromArray(s, t * 3, dh), b = u.fromArray(s, n * 3, ph), I =
|
|
26454
|
+
const A = u.fromArray(s, e * 3, So), E = u.fromArray(s, t * 3, dh), b = u.fromArray(s, n * 3, ph), I = J2(i, A, E, b, CE);
|
|
26455
26455
|
if (l(I)) {
|
|
26456
26456
|
if (l(a) && aa(
|
|
26457
26457
|
e,
|
|
@@ -28092,7 +28092,7 @@ function JE(e, t) {
|
|
|
28092
28092
|
for (Vr = new Array(xc), s = 0; s < xc; s++)
|
|
28093
28093
|
Vr[s] = new St("createGeometry");
|
|
28094
28094
|
let d;
|
|
28095
|
-
for (h =
|
|
28095
|
+
for (h = F2(h, xc), s = 0; s < h.length; s++) {
|
|
28096
28096
|
let p = 0;
|
|
28097
28097
|
const m = h[s], y = m.length;
|
|
28098
28098
|
for (a = 0; a < y; ++a)
|
|
@@ -29666,7 +29666,7 @@ ${a} czm_non_compressed_main();
|
|
|
29666
29666
|
}
|
|
29667
29667
|
function Rb(e, t) {
|
|
29668
29668
|
const n = t.context, i = e._primitive;
|
|
29669
|
-
let s =
|
|
29669
|
+
let s = L2;
|
|
29670
29670
|
s = e._primitive._batchTable.getVertexShaderCallback()(
|
|
29671
29671
|
s
|
|
29672
29672
|
), s = Pe._appendDistanceDisplayConditionToShader(i, s), s = Pe._modifyShaderPosition(
|
|
@@ -29682,7 +29682,7 @@ function Rb(e, t) {
|
|
|
29682
29682
|
sources: [s]
|
|
29683
29683
|
});
|
|
29684
29684
|
const h = new Ee({
|
|
29685
|
-
sources: [
|
|
29685
|
+
sources: [z2]
|
|
29686
29686
|
}), d = e._primitive._attributeLocations, p = new kt(
|
|
29687
29687
|
r,
|
|
29688
29688
|
a,
|
|
@@ -45499,16 +45499,10 @@ class UD {
|
|
|
45499
45499
|
}
|
|
45500
45500
|
//单塔仿真加载
|
|
45501
45501
|
loadFZTower() {
|
|
45502
|
-
|
|
45503
|
-
|
|
45504
|
-
|
|
45505
|
-
|
|
45506
|
-
this.connections.forEach((i) => {
|
|
45507
|
-
const s = this.TowerNodes.find((h) => h.id === i.from), a = this.TowerNodes.find((h) => h.id === i.to), r = [], f = new u(s == null ? void 0 : s.x, s == null ? void 0 : s.y, s == null ? void 0 : s.z);
|
|
45508
|
-
r.push(Q(n, f, t)), this.entityCollection2.add(Kr(r[0], (s == null ? void 0 : s.id) + ""));
|
|
45509
|
-
const c = new u(a == null ? void 0 : a.x, a == null ? void 0 : a.y, a == null ? void 0 : a.z);
|
|
45510
|
-
r.push(Q(n, c, t)), this.entityCollection2.add(Kr(r[1], (a == null ? void 0 : a.id) + "")), this.entityCollection2.add(v(r, i.from + "" + i.to, this.TowerFZS.TowerMembersWidth, this.TowerFZS.TowerMemberColor));
|
|
45511
|
-
});
|
|
45502
|
+
this.Keym == "OW_JPS_EEngin_001" && (new He(S.toRadians(this.TowerFZS.RollX), this.TowerFZS.RollY, this.TowerFZS.RollZ), u.fromDegrees(this.TowerFZS.Longitude, this.TowerFZS.Latitude, this.TowerFZS.Altitude), this.connections.forEach((t) => {
|
|
45503
|
+
const n = this.TowerNodes.find((a) => a.id === t.from), i = this.TowerNodes.find((a) => a.id === t.to), s = [];
|
|
45504
|
+
new u(n == null ? void 0 : n.x, n == null ? void 0 : n.y, n == null ? void 0 : n.z), this.entityCollection2.add(Kr(s[0], (n == null ? void 0 : n.id) + "")), new u(i == null ? void 0 : i.x, i == null ? void 0 : i.y, i == null ? void 0 : i.z), this.entityCollection2.add(Kr(s[1], (i == null ? void 0 : i.id) + "")), this.entityCollection2.add(v(s, t.from + "" + t.to, this.TowerFZS.TowerMembersWidth, this.TowerFZS.TowerMemberColor));
|
|
45505
|
+
}));
|
|
45512
45506
|
}
|
|
45513
45507
|
/**
|
|
45514
45508
|
* 加载指定时间步的位移塔架模型
|
|
@@ -6596,4 +6596,4 @@ void main()
|
|
|
6596
6596
|
`},translucent:function(){return!0}})}setLineVisible(t){this.Keym=="OW_JPS_EEngin_001"&&(this.entityCollection2.show=t)}RemoveLineModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.viewer.dataSources.remove(this.dataSource2),this.entityCollection2.show=!1)}}class Fx{constructor(){oe(this,"id","");oe(this,"name","");oe(this,"towerFZinfo","");oe(this,"towerDisFile","");oe(this,"stressFileContent","");oe(this,"TowerMemberColor","#FFFFFF");oe(this,"TowerMembersWidth",2);oe(this,"Longitude",0);oe(this,"Latitude",0);oe(this,"Altitude",0);oe(this,"RollX",0);oe(this,"RollY",90);oe(this,"RollZ",0)}}function Mx(e){debugger;const t=e.split(`
|
|
6597
6597
|
`),n=[],i=[],s=/^\s*(\d+)\s+([\d.-]+)\s+([\d.-]+)\s+([\d.-]+)\s+(-?\d+)/,a=/^\s*(\d+)\s+(\d+)\s+(\d+)\s*(?:#|$)/;for(const r of t){const f=r.trim();if(!f)continue;const c=f.match(s);if(c){n.push({id:parseInt(c[1]),x:parseFloat(c[2]),y:parseFloat(c[3]),z:parseFloat(c[4]),flag:parseInt(c[5])});continue}const h=f.match(a);h&&i.push({from:parseInt(h[1]),to:parseInt(h[2]),type:parseInt(h[3])})}return{TowerNodes:n,connections:i}}function Ux(e){const t=e.split(`
|
|
6598
6598
|
`),n=[];for(const i of t){if(!i.trim())continue;const s=i.trim().split(/\s+/).filter(f=>f!==""),a=parseInt(s[0]);if(isNaN(a))continue;const r=[];for(let f=1;f<s.length;f+=3){const c=parseFloat(s[f]),h=parseFloat(s[f+1]),d=parseFloat(s[f+2]);if(!isNaN(c)&&!isNaN(h)&&!isNaN(d)){const p=Math.floor((f-1)/3)+1;r.push({timeStep:p,x:c,y:h,z:d})}}n.push({nodeId:a,displacements:r})}return n}function B0(e){const t={};return e.forEach(n=>{n.displacements.forEach(i=>{t[i.timeStep]||(t[i.timeStep]=[]),t[i.timeStep].push({nodeId:n.nodeId,...i})})}),t}function kx(e){const t=e.split(`
|
|
6599
|
-
`),n=[];for(const s of t){if(!s.trim())continue;const a=s.match(/^\s*(\d+-\s*\d+)\s+((?:\d+\.\d+\s*)+)/);if(a){const r=a[1].replace(/\s+/g,""),f=a[2].trim().split(/\s+/).map(Number);n.push({elementId:r,stressRatios:f})}}const i=[];if(n.length>0){const s=n[0].stressRatios.length;for(let a=0;a<s;a++){const r={timeIndex:a,elements:[]};for(const f of n){let c="";const h=f.stressRatios[a];h>.01&&h<.02?c="#ffffff":h>.02&&h<.05?c="#d71345":c="#ff0000",r.elements.push({elementId:f.elementId,stressRatio:h,ylbColor:c})}i.push(r)}}return{byElement:n,byTime:i}}class Vx{constructor(t,n,i){oe(this,"viewer");oe(this,"TowerFZS");oe(this,"Keym","");oe(this,"dataSource2");oe(this,"entityCollection2");oe(this,"TowerNodes",[]);oe(this,"connections",[]);oe(this,"displacementData",[]);oe(this,"byElemens",[]);oe(this,"byTimes",[]);oe(this,"_animationInterval",null);this.Keym=i,this.viewer=t,this.TowerFZS=n,this.dataSource2=new Zs(this.TowerFZS.id),this.entityCollection2=this.dataSource2.entities}loadfile(){if(this.Keym!="OW_JPS_EEngin_001")return;const{TowerNodes:t,connections:n}=Mx(this.TowerFZS.towerFZinfo);this.TowerNodes=t,this.connections=n,this.displacementData=Ux(this.TowerFZS.towerDisFile);const{byElement:i,byTime:s}=kx(this.TowerFZS.stressFileContent);this.byElemens=i,this.byTimes=s;debugger}loadFZTower(){
|
|
6599
|
+
`),n=[];for(const s of t){if(!s.trim())continue;const a=s.match(/^\s*(\d+-\s*\d+)\s+((?:\d+\.\d+\s*)+)/);if(a){const r=a[1].replace(/\s+/g,""),f=a[2].trim().split(/\s+/).map(Number);n.push({elementId:r,stressRatios:f})}}const i=[];if(n.length>0){const s=n[0].stressRatios.length;for(let a=0;a<s;a++){const r={timeIndex:a,elements:[]};for(const f of n){let c="";const h=f.stressRatios[a];h>.01&&h<.02?c="#ffffff":h>.02&&h<.05?c="#d71345":c="#ff0000",r.elements.push({elementId:f.elementId,stressRatio:h,ylbColor:c})}i.push(r)}}return{byElement:n,byTime:i}}class Vx{constructor(t,n,i){oe(this,"viewer");oe(this,"TowerFZS");oe(this,"Keym","");oe(this,"dataSource2");oe(this,"entityCollection2");oe(this,"TowerNodes",[]);oe(this,"connections",[]);oe(this,"displacementData",[]);oe(this,"byElemens",[]);oe(this,"byTimes",[]);oe(this,"_animationInterval",null);this.Keym=i,this.viewer=t,this.TowerFZS=n,this.dataSource2=new Zs(this.TowerFZS.id),this.entityCollection2=this.dataSource2.entities}loadfile(){if(this.Keym!="OW_JPS_EEngin_001")return;const{TowerNodes:t,connections:n}=Mx(this.TowerFZS.towerFZinfo);this.TowerNodes=t,this.connections=n,this.displacementData=Ux(this.TowerFZS.towerDisFile);const{byElement:i,byTime:s}=kx(this.TowerFZS.stressFileContent);this.byElemens=i,this.byTimes=s;debugger}loadFZTower(){this.Keym=="OW_JPS_EEngin_001"&&(new He(S.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ),u.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude),this.connections.forEach(t=>{const n=this.TowerNodes.find(a=>a.id===t.from),i=this.TowerNodes.find(a=>a.id===t.to),s=[];new u(n==null?void 0:n.x,n==null?void 0:n.y,n==null?void 0:n.z),this.entityCollection2.add(Pa(s[0],(n==null?void 0:n.id)+"")),new u(i==null?void 0:i.x,i==null?void 0:i.y,i==null?void 0:i.z),this.entityCollection2.add(Pa(s[1],(i==null?void 0:i.id)+"")),this.entityCollection2.add(v(s,t.from+""+t.to,this.TowerFZS.TowerMembersWidth,this.TowerFZS.TowerMemberColor))}))}loadFZDISTower(t){if(this.Keym!=="OW_JPS_EEngin_001")return;const i=B0(this.displacementData)[t],s=this.byTimes.find(f=>f.timeIndex===t);debugger;if(!i){console.warn(`未找到时间步 ${t} 的位移数据`);return}const a=new He(S.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ),r=u.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(f=>{const c=this.TowerNodes.find(I=>I.id===f.from),h=this.TowerNodes.find(I=>I.id===f.to);if(!c||!h){console.warn(`找不到连接 ${f.from}->${f.to} 的节点`);return}debugger;const d=i.find(I=>I.nodeId===f.from),p=i.find(I=>I.nodeId===f.to);if(!d||!p){console.warn(`找不到连接 ${f.from}->${f.to} 的位移数据`);return}const m=new u(c.x-d.x,c.y-d.y,c.z-d.z),T=new u(h.x-p.x,h.y-p.y,h.z-p.z),y=Q(r,m,a);this.entityCollection2.add(Pa(y,f.from+""));const w=Q(r,T,a);this.entityCollection2.add(Pa(w,f.to+""));const A=[y,w],E=`${f.from}_${f.to}`,b=f.from+"-"+f.to;s==null||s.elements.find(I=>I.elementId===b);debugger;this.entityCollection2.add(v(A,E+t,this.TowerFZS.TowerMembersWidth,"#ffffff"))})}loadFZDISTower1(t){if(this.Keym!="OW_JPS_EEngin_001")return;const n=B0(this.displacementData);let i=new He(S.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ);const s=u.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(a=>{const r=this.TowerNodes.find(T=>T.id===a.from),f=n[t].find(T=>T.nodeId===a.from),c=this.TowerNodes.find(T=>T.id===a.to),h=n[t].find(T=>T.nodeId===a.to),d=[],p=new u(r.x-f.x,r.y-f.y,r.z-f.z);d.push(Q(s,p,i));const m=new u(c.x-h.x,c.y-h.y,c.z-h.z);d.push(Q(s,m,i));debugger;this.entityCollection2.add(v(d,a.from+""+a.to,this.TowerFZS.TowerMembersWidth,this.TowerFZS.TowerMemberColor))})}loadAllFZDisTower(){if(this.Keym!=="OW_JPS_EEngin_001")return;if(!this.displacementData||this.displacementData.length===0){console.warn("没有可用的位移数据");return}let t=1;const n=this.displacementData.length;this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null);const i=()=>{if(this.viewer.dataSources.contains(this.dataSource2)&&this.viewer.dataSources.remove(this.dataSource2,!0),t>n){t=1;return}this.dataSource2=new Zs("fztower"),this.entityCollection2=this.dataSource2.entities;try{this.loadFZDISTower(t),this.loadFZModel(),console.log(`正在显示位移帧: ${t}/${n}`),t++}catch(s){console.error("加载位移帧时出错:",s),this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null)}};i(),this._animationInterval=setInterval(i,300)}stopDisplacementAnimation(){this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null)}toggleAnimation(t){t?this.stopDisplacementAnimation():this.loadAllFZDisTower()}loadFZModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.viewer.dataSources.add(this.dataSource2),this.viewer.entities.show)}setFZModelVisible(t){this.Keym=="OW_JPS_EEngin_001"&&(this.entityCollection2.show=t)}RemoveFZModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.viewer.dataSources.remove(this.dataSource2),this.entityCollection2.show=!1)}}st.GUAPoint=Lx,st.InsulatorInfo=zx,st.InsulatorType=Ht,st.LineNum=ar,st.LineType=P0,st.OWEEgineFZManager=Vx,st.OWEEgineManager=Nx,st.PhaseSType=nn,st.TowerFZInfo=Fx,st.TowerInfo=Rx,st.TowerLineInfo=Bx,st.TowerType=$i,st.WairnumType=$,st.drawModel=_s,Object.defineProperty(st,Symbol.toStringTag,{value:"Module"})});
|