bruce-cesium 6.1.6 → 6.1.7
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/bruce-cesium.es5.js +28 -18
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +27 -17
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/tileset-render-engine.js +26 -16
- package/dist/lib/rendering/tileset-render-engine.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +2 -2
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -16835,11 +16835,12 @@
|
|
|
16835
16835
|
}
|
|
16836
16836
|
TilesetRenderEngine.OnTilesetReady = OnTilesetReady;
|
|
16837
16837
|
function ApplyPosition(params) {
|
|
16838
|
-
var _a;
|
|
16838
|
+
var _a, _b;
|
|
16839
16839
|
const cTileset = params.cTileset;
|
|
16840
16840
|
const root = cTileset.root;
|
|
16841
16841
|
const position = params.position;
|
|
16842
|
-
|
|
16842
|
+
const ucsTransform = ((_a = position.ucs) === null || _a === void 0 ? void 0 : _a.transform) || {};
|
|
16843
|
+
let location = ((_b = position.ucs) === null || _b === void 0 ? void 0 : _b.location) ? position.ucs.location : position.location;
|
|
16843
16844
|
let transform = position.transform;
|
|
16844
16845
|
transform = {
|
|
16845
16846
|
heading: 0,
|
|
@@ -16852,24 +16853,33 @@
|
|
|
16852
16853
|
...transform
|
|
16853
16854
|
};
|
|
16854
16855
|
transform.scale = EnsureNumber(transform.scale);
|
|
16855
|
-
|
|
16856
|
-
|
|
16857
|
-
|
|
16858
|
-
// If we're in model-space we'll just go at 0,0 lat/lon and no h/p/r from the coords.
|
|
16856
|
+
// In model-space we focus on the UCS.
|
|
16857
|
+
// There's no location as we center the view around it.
|
|
16858
|
+
// TODO: although we should render the model relative to the UCS.
|
|
16859
16859
|
if (params.modelSpace) {
|
|
16860
16860
|
location = null;
|
|
16861
16861
|
transform = {
|
|
16862
|
-
heading: 0,
|
|
16863
|
-
pitch: 0,
|
|
16864
|
-
roll: 0,
|
|
16865
|
-
scale: EnsureNumber(
|
|
16866
|
-
x: 0,
|
|
16867
|
-
y: 0,
|
|
16868
|
-
z: 0
|
|
16862
|
+
heading: EnsureNumber(ucsTransform.heading, 0),
|
|
16863
|
+
pitch: EnsureNumber(ucsTransform.pitch, 0),
|
|
16864
|
+
roll: EnsureNumber(ucsTransform.roll, 0),
|
|
16865
|
+
scale: EnsureNumber(ucsTransform.scale, 1),
|
|
16866
|
+
x: EnsureNumber(ucsTransform.x, 0),
|
|
16867
|
+
y: EnsureNumber(ucsTransform.y, 0),
|
|
16868
|
+
z: EnsureNumber(ucsTransform.z, 0)
|
|
16869
16869
|
};
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16870
|
+
}
|
|
16871
|
+
// If not in model-space then scale/add UCS transform to the entity transform.
|
|
16872
|
+
else {
|
|
16873
|
+
transform.scale *= EnsureNumber(ucsTransform.scale, 1);
|
|
16874
|
+
transform.heading += EnsureNumber(ucsTransform.heading, 0);
|
|
16875
|
+
transform.pitch += EnsureNumber(ucsTransform.pitch, 0);
|
|
16876
|
+
transform.roll += EnsureNumber(ucsTransform.roll, 0);
|
|
16877
|
+
transform.x += EnsureNumber(ucsTransform.x, 0);
|
|
16878
|
+
transform.y += EnsureNumber(ucsTransform.y, 0);
|
|
16879
|
+
transform.z += EnsureNumber(ucsTransform.z, 0);
|
|
16880
|
+
}
|
|
16881
|
+
if (transform.scale <= 0) {
|
|
16882
|
+
transform.scale = 0.000001;
|
|
16873
16883
|
}
|
|
16874
16884
|
/**
|
|
16875
16885
|
* Very cursed.
|
|
@@ -33652,7 +33662,7 @@
|
|
|
33652
33662
|
}
|
|
33653
33663
|
}
|
|
33654
33664
|
|
|
33655
|
-
const VERSION = "6.1.
|
|
33665
|
+
const VERSION = "6.1.7";
|
|
33656
33666
|
|
|
33657
33667
|
exports.VERSION = VERSION;
|
|
33658
33668
|
exports.isOutlineChanged = isOutlineChanged;
|