@jorgmoritz/gis-manager 0.1.39 → 0.1.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/dist/index.cjs +28 -69
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +28 -70
- package/dist/index.js.map +1 -1
- package/dist/vue/index.cjs +25 -68
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.js +25 -68
- package/dist/vue/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2473,5 +2473,6 @@ declare class PathSafetyChecker {
|
|
|
2473
2473
|
declare const placeholder: {
|
|
2474
2474
|
ready: boolean;
|
|
2475
2475
|
};
|
|
2476
|
+
declare const droneModelUrl: string;
|
|
2476
2477
|
|
|
2477
|
-
export { type AltitudeMode, CZMLManager, type CameraDestinationInput, CameraEventBus, type CameraFOVChangeEvent, CameraFOVController, type CameraFlyOptions, type CameraInitOptions, CameraManager, type CameraOrientation, type CameraPoseChangeEvent, type CameraSetViewOptions, type CameraView, type CesiumAssetsOptions, type ConvertedWaylineData, type ConvertedWaypointData, type CursorPoseChangeEvent, type CzmlExportOptions, type CzmlImportOptions, type EditingChange, Emitter, type FOVChangeEvent, type FOVControllerOptions, type FlightPathPreviewController, FlightSimulator, type FlightSimulatorController, type FlightSimulatorOptions, type FlightSimulatorState, type FlightSimulatorStateChangeEvent, type FlyToOptions, FrustumPyramid, type FrustumPyramidOptions, type FrustumShapeChangeEvent, type ImageryOptions, type ImageryProviderKind, type InitOptions, type LayerEvents, type LayerHandle, LayerManager, type LayerType, type Listener, type LonLatHeight, type Orientation, type PathEditingSaveResult, type PathOptions, type PathSafetyCheckOptions, type PathSafetyCheckResult, PathSafetyChecker, type PathToSinoflyOptions, type PhotoBillboardItem, type PhotoBillboardLayerOptions, type PhotoBillboardResult, type PointCloudPickResult, type PointCloudPickSession, PointCloudPicker, type PointCloudPickerOptions, type PolygonDrawingOptions, type PolygonEditingSession, PolygonEditor, type PreviousViewChange, type QuickEditOptions, type RenderFlightPathOptions, type RenderFlightPathPreviewOptions, SceneManager, type SceneOptions, type SegmentSafetyResult, type SelectionChange, type SelectionResult, type SelectionSession, Selector, type ShapeLineProps, type ShapePointProps, type ShapePolygonProps, type SinoflyAdapterOptions, type SinoflyWaylineData, type SinoflyWaypointInfo, StateManager, type TerrainKind, type TerrainOptions, type Toggle2D3DContext, type Toggle2D3DOptions, type VersionInfo, assertCesiumAssetsConfigured, calculateAbsoluteHeight, calculateRelativeHeight, configureCesiumAssets, configureCesiumIonToken, convertPathToSinofly, convertSinoflyWayline, convertSinoflyWaylines, ensureCesiumIonToken, getCesiumBaseUrl, getCesiumIonToken, globalCameraEventBus, globalState, placeholder, queryTerrainHeightAsync, queryTerrainHeightSync, queryTerrainHeights, renderFlightPath, renderFlightPathPreview, toggle2D3D, version, versionInfo };
|
|
2478
|
+
export { type AltitudeMode, CZMLManager, type CameraDestinationInput, CameraEventBus, type CameraFOVChangeEvent, CameraFOVController, type CameraFlyOptions, type CameraInitOptions, CameraManager, type CameraOrientation, type CameraPoseChangeEvent, type CameraSetViewOptions, type CameraView, type CesiumAssetsOptions, type ConvertedWaylineData, type ConvertedWaypointData, type CursorPoseChangeEvent, type CzmlExportOptions, type CzmlImportOptions, type EditingChange, Emitter, type FOVChangeEvent, type FOVControllerOptions, type FlightPathPreviewController, FlightSimulator, type FlightSimulatorController, type FlightSimulatorOptions, type FlightSimulatorState, type FlightSimulatorStateChangeEvent, type FlyToOptions, FrustumPyramid, type FrustumPyramidOptions, type FrustumShapeChangeEvent, type ImageryOptions, type ImageryProviderKind, type InitOptions, type LayerEvents, type LayerHandle, LayerManager, type LayerType, type Listener, type LonLatHeight, type Orientation, type PathEditingSaveResult, type PathOptions, type PathSafetyCheckOptions, type PathSafetyCheckResult, PathSafetyChecker, type PathToSinoflyOptions, type PhotoBillboardItem, type PhotoBillboardLayerOptions, type PhotoBillboardResult, type PointCloudPickResult, type PointCloudPickSession, PointCloudPicker, type PointCloudPickerOptions, type PolygonDrawingOptions, type PolygonEditingSession, PolygonEditor, type PreviousViewChange, type QuickEditOptions, type RenderFlightPathOptions, type RenderFlightPathPreviewOptions, SceneManager, type SceneOptions, type SegmentSafetyResult, type SelectionChange, type SelectionResult, type SelectionSession, Selector, type ShapeLineProps, type ShapePointProps, type ShapePolygonProps, type SinoflyAdapterOptions, type SinoflyWaylineData, type SinoflyWaypointInfo, StateManager, type TerrainKind, type TerrainOptions, type Toggle2D3DContext, type Toggle2D3DOptions, type VersionInfo, assertCesiumAssetsConfigured, calculateAbsoluteHeight, calculateRelativeHeight, configureCesiumAssets, configureCesiumIonToken, convertPathToSinofly, convertSinoflyWayline, convertSinoflyWaylines, droneModelUrl, ensureCesiumIonToken, getCesiumBaseUrl, getCesiumIonToken, globalCameraEventBus, globalState, placeholder, queryTerrainHeightAsync, queryTerrainHeightSync, queryTerrainHeights, renderFlightPath, renderFlightPathPreview, toggle2D3D, version, versionInfo };
|
package/dist/index.d.ts
CHANGED
|
@@ -2473,5 +2473,6 @@ declare class PathSafetyChecker {
|
|
|
2473
2473
|
declare const placeholder: {
|
|
2474
2474
|
ready: boolean;
|
|
2475
2475
|
};
|
|
2476
|
+
declare const droneModelUrl: string;
|
|
2476
2477
|
|
|
2477
|
-
export { type AltitudeMode, CZMLManager, type CameraDestinationInput, CameraEventBus, type CameraFOVChangeEvent, CameraFOVController, type CameraFlyOptions, type CameraInitOptions, CameraManager, type CameraOrientation, type CameraPoseChangeEvent, type CameraSetViewOptions, type CameraView, type CesiumAssetsOptions, type ConvertedWaylineData, type ConvertedWaypointData, type CursorPoseChangeEvent, type CzmlExportOptions, type CzmlImportOptions, type EditingChange, Emitter, type FOVChangeEvent, type FOVControllerOptions, type FlightPathPreviewController, FlightSimulator, type FlightSimulatorController, type FlightSimulatorOptions, type FlightSimulatorState, type FlightSimulatorStateChangeEvent, type FlyToOptions, FrustumPyramid, type FrustumPyramidOptions, type FrustumShapeChangeEvent, type ImageryOptions, type ImageryProviderKind, type InitOptions, type LayerEvents, type LayerHandle, LayerManager, type LayerType, type Listener, type LonLatHeight, type Orientation, type PathEditingSaveResult, type PathOptions, type PathSafetyCheckOptions, type PathSafetyCheckResult, PathSafetyChecker, type PathToSinoflyOptions, type PhotoBillboardItem, type PhotoBillboardLayerOptions, type PhotoBillboardResult, type PointCloudPickResult, type PointCloudPickSession, PointCloudPicker, type PointCloudPickerOptions, type PolygonDrawingOptions, type PolygonEditingSession, PolygonEditor, type PreviousViewChange, type QuickEditOptions, type RenderFlightPathOptions, type RenderFlightPathPreviewOptions, SceneManager, type SceneOptions, type SegmentSafetyResult, type SelectionChange, type SelectionResult, type SelectionSession, Selector, type ShapeLineProps, type ShapePointProps, type ShapePolygonProps, type SinoflyAdapterOptions, type SinoflyWaylineData, type SinoflyWaypointInfo, StateManager, type TerrainKind, type TerrainOptions, type Toggle2D3DContext, type Toggle2D3DOptions, type VersionInfo, assertCesiumAssetsConfigured, calculateAbsoluteHeight, calculateRelativeHeight, configureCesiumAssets, configureCesiumIonToken, convertPathToSinofly, convertSinoflyWayline, convertSinoflyWaylines, ensureCesiumIonToken, getCesiumBaseUrl, getCesiumIonToken, globalCameraEventBus, globalState, placeholder, queryTerrainHeightAsync, queryTerrainHeightSync, queryTerrainHeights, renderFlightPath, renderFlightPathPreview, toggle2D3D, version, versionInfo };
|
|
2478
|
+
export { type AltitudeMode, CZMLManager, type CameraDestinationInput, CameraEventBus, type CameraFOVChangeEvent, CameraFOVController, type CameraFlyOptions, type CameraInitOptions, CameraManager, type CameraOrientation, type CameraPoseChangeEvent, type CameraSetViewOptions, type CameraView, type CesiumAssetsOptions, type ConvertedWaylineData, type ConvertedWaypointData, type CursorPoseChangeEvent, type CzmlExportOptions, type CzmlImportOptions, type EditingChange, Emitter, type FOVChangeEvent, type FOVControllerOptions, type FlightPathPreviewController, FlightSimulator, type FlightSimulatorController, type FlightSimulatorOptions, type FlightSimulatorState, type FlightSimulatorStateChangeEvent, type FlyToOptions, FrustumPyramid, type FrustumPyramidOptions, type FrustumShapeChangeEvent, type ImageryOptions, type ImageryProviderKind, type InitOptions, type LayerEvents, type LayerHandle, LayerManager, type LayerType, type Listener, type LonLatHeight, type Orientation, type PathEditingSaveResult, type PathOptions, type PathSafetyCheckOptions, type PathSafetyCheckResult, PathSafetyChecker, type PathToSinoflyOptions, type PhotoBillboardItem, type PhotoBillboardLayerOptions, type PhotoBillboardResult, type PointCloudPickResult, type PointCloudPickSession, PointCloudPicker, type PointCloudPickerOptions, type PolygonDrawingOptions, type PolygonEditingSession, PolygonEditor, type PreviousViewChange, type QuickEditOptions, type RenderFlightPathOptions, type RenderFlightPathPreviewOptions, SceneManager, type SceneOptions, type SegmentSafetyResult, type SelectionChange, type SelectionResult, type SelectionSession, Selector, type ShapeLineProps, type ShapePointProps, type ShapePolygonProps, type SinoflyAdapterOptions, type SinoflyWaylineData, type SinoflyWaypointInfo, StateManager, type TerrainKind, type TerrainOptions, type Toggle2D3DContext, type Toggle2D3DOptions, type VersionInfo, assertCesiumAssetsConfigured, calculateAbsoluteHeight, calculateRelativeHeight, configureCesiumAssets, configureCesiumIonToken, convertPathToSinofly, convertSinoflyWayline, convertSinoflyWaylines, droneModelUrl, ensureCesiumIonToken, getCesiumBaseUrl, getCesiumIonToken, globalCameraEventBus, globalState, placeholder, queryTerrainHeightAsync, queryTerrainHeightSync, queryTerrainHeights, renderFlightPath, renderFlightPathPreview, toggle2D3D, version, versionInfo };
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
11
11
|
// package.json
|
|
12
12
|
var package_default = {
|
|
13
13
|
name: "@jorgmoritz/gis-manager",
|
|
14
|
-
version: "0.1.
|
|
14
|
+
version: "0.1.40"};
|
|
15
15
|
|
|
16
16
|
// src/utils/version.ts
|
|
17
17
|
var version = package_default.version;
|
|
@@ -1551,6 +1551,11 @@ var HeightMarker = class {
|
|
|
1551
1551
|
}
|
|
1552
1552
|
};
|
|
1553
1553
|
|
|
1554
|
+
// src/core/path-manager/constants.ts
|
|
1555
|
+
var DEFAULT_FOV = 172;
|
|
1556
|
+
var SENSOR_WIDTH = 36;
|
|
1557
|
+
var FOCAL_LENGTH_PRESETS = [112, 56, 14, 7, 3, 1];
|
|
1558
|
+
|
|
1554
1559
|
// src/core/path-manager/CameraFOVController.ts
|
|
1555
1560
|
var CameraFOVController = class {
|
|
1556
1561
|
constructor(opts = {}) {
|
|
@@ -1582,8 +1587,8 @@ var CameraFOVController = class {
|
|
|
1582
1587
|
this.updateDisplay();
|
|
1583
1588
|
this.emitChange();
|
|
1584
1589
|
});
|
|
1585
|
-
this.sensorWidth = opts.sensorWidth ??
|
|
1586
|
-
this.focalLengthPresets = opts.focalLengthPresets ??
|
|
1590
|
+
this.sensorWidth = opts.sensorWidth ?? SENSOR_WIDTH;
|
|
1591
|
+
this.focalLengthPresets = opts.focalLengthPresets ?? FOCAL_LENGTH_PRESETS;
|
|
1587
1592
|
if (opts.minFOV === void 0 || opts.maxFOV === void 0) {
|
|
1588
1593
|
const minFocalLength = Math.min(...this.focalLengthPresets);
|
|
1589
1594
|
const maxFocalLength = Math.max(...this.focalLengthPresets);
|
|
@@ -1593,7 +1598,7 @@ var CameraFOVController = class {
|
|
|
1593
1598
|
this.minFOV = opts.minFOV;
|
|
1594
1599
|
this.maxFOV = opts.maxFOV;
|
|
1595
1600
|
}
|
|
1596
|
-
this.currentFOV = opts.initialFOV ??
|
|
1601
|
+
this.currentFOV = opts.initialFOV ?? DEFAULT_FOV;
|
|
1597
1602
|
this.useGlobalEventBus = opts.useGlobalEventBus ?? true;
|
|
1598
1603
|
this.createUI();
|
|
1599
1604
|
this.setupExternalFOVListener();
|
|
@@ -1952,8 +1957,6 @@ var PathPreview = class {
|
|
|
1952
1957
|
// Lightweight overlay viewer
|
|
1953
1958
|
__publicField(this, "containerEl");
|
|
1954
1959
|
// Container for the overlay viewer
|
|
1955
|
-
__publicField(this, "footprintEntity");
|
|
1956
|
-
// Entity for ground footprint polygon
|
|
1957
1960
|
__publicField(this, "destroyed", false);
|
|
1958
1961
|
// Track if the instance has been destroyed
|
|
1959
1962
|
__publicField(this, "fovController");
|
|
@@ -1965,7 +1968,7 @@ var PathPreview = class {
|
|
|
1965
1968
|
__publicField(this, "toggleBtn");
|
|
1966
1969
|
/** 已加载的 3D Tiles 实例(预览窗口独立的) */
|
|
1967
1970
|
__publicField(this, "tilesets", /* @__PURE__ */ new Map());
|
|
1968
|
-
this.currentFOV = opts.fov ??
|
|
1971
|
+
this.currentFOV = opts.fov ?? DEFAULT_FOV;
|
|
1969
1972
|
this.ensureViewer();
|
|
1970
1973
|
this.ensureFOVController();
|
|
1971
1974
|
}
|
|
@@ -2430,28 +2433,6 @@ var PathPreview = class {
|
|
|
2430
2433
|
console.warn("[PathPreview] Failed to update FOV:", e);
|
|
2431
2434
|
}
|
|
2432
2435
|
}
|
|
2433
|
-
// private ensureFootprint(): void {
|
|
2434
|
-
// const C: any = this.CesiumNS as any;
|
|
2435
|
-
// if (this.footprintEntity) return;
|
|
2436
|
-
// this.footprintEntity = (this.layer.entities as any).add({
|
|
2437
|
-
// polygon: {
|
|
2438
|
-
// // Only show when we have at least 3 ground hit points
|
|
2439
|
-
// show: new C.CallbackProperty(() => (this._footprintPositions?.length ?? 0) >= 3, false),
|
|
2440
|
-
// hierarchy: new C.CallbackProperty(() => {
|
|
2441
|
-
// const arr = this._footprintPositions;
|
|
2442
|
-
// return arr && arr.length >= 3 ? arr.slice() : undefined;
|
|
2443
|
-
// }, false),
|
|
2444
|
-
// material: C.Color.CYAN.withAlpha(0.18),
|
|
2445
|
-
// outline: true,
|
|
2446
|
-
// outlineColor: C.Color.CYAN.withAlpha(0.7),
|
|
2447
|
-
// outlineWidth: 1,
|
|
2448
|
-
// // Use per-position heights from globe intersections to avoid terrain-ground primitive path
|
|
2449
|
-
// perPositionHeight: true,
|
|
2450
|
-
// },
|
|
2451
|
-
// properties: { _type: 'preview-footprint' },
|
|
2452
|
-
// });
|
|
2453
|
-
// }
|
|
2454
|
-
// private _footprintPositions: any[] | undefined;
|
|
2455
2436
|
/**
|
|
2456
2437
|
* Set the camera pose and field of view for the overlay viewer.
|
|
2457
2438
|
* @param cartesian cartesian position
|
|
@@ -2471,29 +2452,6 @@ var PathPreview = class {
|
|
|
2471
2452
|
orientation: { heading: h, pitch: p, roll: r }
|
|
2472
2453
|
});
|
|
2473
2454
|
}
|
|
2474
|
-
// // Recompute footprint using overlay scene
|
|
2475
|
-
// try {
|
|
2476
|
-
// const scene: any = v.scene;
|
|
2477
|
-
// const w = scene?.canvas?.width ?? 256;
|
|
2478
|
-
// const hgt = scene?.canvas?.height ?? 144;
|
|
2479
|
-
// const corners = [
|
|
2480
|
-
// new C.Cartesian2(2, 2),
|
|
2481
|
-
// new C.Cartesian2(w - 2, 2),
|
|
2482
|
-
// new C.Cartesian2(w - 2, hgt - 2),
|
|
2483
|
-
// new C.Cartesian2(2, hgt - 2),
|
|
2484
|
-
// ];
|
|
2485
|
-
// const pts: any[] = [];
|
|
2486
|
-
// for (const c of corners) {
|
|
2487
|
-
// const ray = v.camera.getPickRay(c);
|
|
2488
|
-
// if (!ray) continue;
|
|
2489
|
-
// const hit = scene.globe?.pick?.(ray, scene);
|
|
2490
|
-
// if (hit) pts.push(hit);
|
|
2491
|
-
// }
|
|
2492
|
-
// // this._footprintPositions = pts.length >= 3 ? pts : undefined;
|
|
2493
|
-
// v.scene?.requestRender?.();
|
|
2494
|
-
// (this.mainViewer.scene as any)?.requestRender?.();
|
|
2495
|
-
// } catch {}
|
|
2496
|
-
// }
|
|
2497
2455
|
/**
|
|
2498
2456
|
* 设置 FOV(如果启用了 FOV 控制器)
|
|
2499
2457
|
*/
|
|
@@ -2560,7 +2518,6 @@ var PathPreview = class {
|
|
|
2560
2518
|
} catch {
|
|
2561
2519
|
}
|
|
2562
2520
|
this.fovController = void 0;
|
|
2563
|
-
this.footprintEntity = void 0;
|
|
2564
2521
|
try {
|
|
2565
2522
|
this.toggleBtn?.remove();
|
|
2566
2523
|
} catch {
|
|
@@ -2619,7 +2576,7 @@ var FrustumPyramid = class {
|
|
|
2619
2576
|
*/
|
|
2620
2577
|
computeFrustumGeometry(apex, headingDeg, pitchDeg, rollDeg, fovDeg, length) {
|
|
2621
2578
|
const C = this.CesiumNS;
|
|
2622
|
-
const fov = Math.max(1, Math.min(120, fovDeg ?? this.opts.fov ??
|
|
2579
|
+
const fov = Math.max(1, Math.min(120, fovDeg ?? this.opts.fov ?? DEFAULT_FOV));
|
|
2623
2580
|
const aspectRatio = this.opts.aspectRatio ?? 4 / 3;
|
|
2624
2581
|
const halfFovH = C.Math.toRadians(fov / 2);
|
|
2625
2582
|
const halfWidth = Math.tan(halfFovH) * length;
|
|
@@ -2798,7 +2755,7 @@ var FrustumPyramid = class {
|
|
|
2798
2755
|
const lakeFill = (this.opts.fillColor ?? C.Color.fromCssColorString("#1e90ff")).withAlpha(alpha);
|
|
2799
2756
|
const width = this.opts.width ?? 3;
|
|
2800
2757
|
this.ensureEntities(lakeEdge, width, lakeFill);
|
|
2801
|
-
const effectiveFov = Math.max(1, Math.min(120, fovDeg ?? this.opts.fov ??
|
|
2758
|
+
const effectiveFov = Math.max(1, Math.min(120, fovDeg ?? this.opts.fov ?? DEFAULT_FOV));
|
|
2802
2759
|
const aspectRatio = this.opts.aspectRatio ?? 4 / 3;
|
|
2803
2760
|
this.logAnglesIfChanged(effectiveFov, aspectRatio, headingDeg, pitchDeg);
|
|
2804
2761
|
const { apex: apexPos, corners, baseCenter } = this.computeFrustumGeometry(
|
|
@@ -3002,7 +2959,7 @@ var AirplaneCursor = class {
|
|
|
3002
2959
|
this.step = opts.stepMeters ?? 2;
|
|
3003
2960
|
this.angleStep = opts.angleStepDeg ?? 1;
|
|
3004
2961
|
this.fastFactor = opts.fastFactor ?? 5;
|
|
3005
|
-
this.currentFOV = opts.fovDeg ??
|
|
2962
|
+
this.currentFOV = opts.fovDeg ?? DEFAULT_FOV;
|
|
3006
2963
|
this.ensureEntity(opts.color ?? C.Color.CYAN.withAlpha(0.9));
|
|
3007
2964
|
this.attachKeyboard(opts);
|
|
3008
2965
|
this.setupFOVListener();
|
|
@@ -3280,8 +3237,8 @@ var AirplaneCursor = class {
|
|
|
3280
3237
|
this.viewer.dataSources.add(layer);
|
|
3281
3238
|
}
|
|
3282
3239
|
this.frustum = new FrustumPyramid(this.CesiumNS, layer, {
|
|
3283
|
-
fov: this.opts.fovDeg ??
|
|
3284
|
-
//
|
|
3240
|
+
fov: this.opts.fovDeg ?? DEFAULT_FOV,
|
|
3241
|
+
// 使用统一的默认 FOV
|
|
3285
3242
|
length: 80,
|
|
3286
3243
|
color: this.opts.color,
|
|
3287
3244
|
fillAlpha: 0.25,
|
|
@@ -3290,8 +3247,8 @@ var AirplaneCursor = class {
|
|
|
3290
3247
|
logAngles: false,
|
|
3291
3248
|
logThrottleMs: 300
|
|
3292
3249
|
});
|
|
3293
|
-
const frustumFovScale = 0.
|
|
3294
|
-
const frustumLengthScale = 0.
|
|
3250
|
+
const frustumFovScale = 0.5;
|
|
3251
|
+
const frustumLengthScale = 0.2;
|
|
3295
3252
|
this.frustum.showAtDynamic(
|
|
3296
3253
|
() => this.pose.position,
|
|
3297
3254
|
() => this.pose.heading,
|
|
@@ -5376,11 +5333,11 @@ function startPathEditing(CesiumNS, viewer, entityOrId, options) {
|
|
|
5376
5333
|
const fArr = getArr("_vertexFov");
|
|
5377
5334
|
pitches[i] = typeof pArr?.[i] === "number" ? pArr[i] : -10;
|
|
5378
5335
|
rolls[i] = typeof rArr?.[i] === "number" ? rArr[i] : 0;
|
|
5379
|
-
fovs[i] = typeof fArr?.[i] === "number" ? fArr[i] :
|
|
5336
|
+
fovs[i] = typeof fArr?.[i] === "number" ? fArr[i] : DEFAULT_FOV;
|
|
5380
5337
|
} catch {
|
|
5381
5338
|
pitches[i] = -10;
|
|
5382
5339
|
rolls[i] = 0;
|
|
5383
|
-
fovs[i] =
|
|
5340
|
+
fovs[i] = DEFAULT_FOV;
|
|
5384
5341
|
}
|
|
5385
5342
|
}
|
|
5386
5343
|
entity.polyline.positions = new C.CallbackProperty(() => positions.slice(), false);
|
|
@@ -5409,7 +5366,7 @@ function startPathEditing(CesiumNS, viewer, entityOrId, options) {
|
|
|
5409
5366
|
headings[activeIndex] ?? 0,
|
|
5410
5367
|
pitches[activeIndex] ?? -10,
|
|
5411
5368
|
0,
|
|
5412
|
-
fovs[activeIndex] ??
|
|
5369
|
+
fovs[activeIndex] ?? DEFAULT_FOV
|
|
5413
5370
|
);
|
|
5414
5371
|
}
|
|
5415
5372
|
} catch {
|
|
@@ -5585,13 +5542,13 @@ function startPathEditing(CesiumNS, viewer, entityOrId, options) {
|
|
|
5585
5542
|
}
|
|
5586
5543
|
},
|
|
5587
5544
|
// frustumLengthFactor: options?.preview?.lengthFactor ?? 0.3,
|
|
5588
|
-
fovDeg: options?.preview?.fov ??
|
|
5545
|
+
fovDeg: options?.preview?.fov ?? DEFAULT_FOV
|
|
5589
5546
|
});
|
|
5590
5547
|
if (options?.preview?.enabled !== false && airplaneCursor) {
|
|
5591
5548
|
preview = new PathPreview(CesiumNS, viewer, {
|
|
5592
5549
|
container: options?.preview?.container,
|
|
5593
5550
|
showFootprint: options?.preview?.showFootprint ?? false,
|
|
5594
|
-
fov: options?.preview?.fov ??
|
|
5551
|
+
fov: options?.preview?.fov ?? DEFAULT_FOV,
|
|
5595
5552
|
pitch: options?.preview?.pitch ?? -10,
|
|
5596
5553
|
roll: options?.preview?.roll ?? 0
|
|
5597
5554
|
});
|
|
@@ -5603,7 +5560,7 @@ function startPathEditing(CesiumNS, viewer, entityOrId, options) {
|
|
|
5603
5560
|
initialPose.heading,
|
|
5604
5561
|
initialPose.pitch,
|
|
5605
5562
|
initialPose.roll,
|
|
5606
|
-
options?.preview?.fov ??
|
|
5563
|
+
options?.preview?.fov ?? DEFAULT_FOV
|
|
5607
5564
|
);
|
|
5608
5565
|
} catch {
|
|
5609
5566
|
console.warn("PathEditing: failed to set initial preview pose");
|
|
@@ -5861,7 +5818,7 @@ function startPathEditing(CesiumNS, viewer, entityOrId, options) {
|
|
|
5861
5818
|
heading: headings[index] ?? 0,
|
|
5862
5819
|
pitch: pitches[index] ?? 0,
|
|
5863
5820
|
roll: rolls[index] ?? 0,
|
|
5864
|
-
fov: fovs[index] ??
|
|
5821
|
+
fov: fovs[index] ?? DEFAULT_FOV
|
|
5865
5822
|
};
|
|
5866
5823
|
const totalVertices = positions.length;
|
|
5867
5824
|
const totalVisibleVertices = totalVertices;
|
|
@@ -5935,7 +5892,7 @@ function startPathEditing(CesiumNS, viewer, entityOrId, options) {
|
|
|
5935
5892
|
heading: headings[index] ?? 0,
|
|
5936
5893
|
pitch: pitches[index] ?? -10,
|
|
5937
5894
|
roll: rolls[index] ?? 0,
|
|
5938
|
-
fov: fovs[index] ??
|
|
5895
|
+
fov: fovs[index] ?? DEFAULT_FOV,
|
|
5939
5896
|
index,
|
|
5940
5897
|
distance: calculatePathDistance(CesiumNS, positions, index),
|
|
5941
5898
|
ellipsoidHeight,
|
|
@@ -6405,7 +6362,7 @@ function startPathDrawing(CesiumNS, viewer, options, onComplete) {
|
|
|
6405
6362
|
try {
|
|
6406
6363
|
const auto = options?.autoStartEditing;
|
|
6407
6364
|
const editOptions = {
|
|
6408
|
-
//
|
|
6365
|
+
// 默认使用自由编辑模式(快速编辑和自由编辑互斥)
|
|
6409
6366
|
quickEdit: false
|
|
6410
6367
|
};
|
|
6411
6368
|
if (typeof auto === "object" && auto.preview) {
|
|
@@ -11873,7 +11830,8 @@ var PathSafetyChecker = class {
|
|
|
11873
11830
|
|
|
11874
11831
|
// src/index.ts
|
|
11875
11832
|
var placeholder = { ready: true };
|
|
11833
|
+
var droneModelUrl = wurenji_default;
|
|
11876
11834
|
|
|
11877
|
-
export { CZMLManager, CameraEventBus, CameraFOVController, CameraManager, Emitter, FlightSimulator, FrustumPyramid, LayerManager, PathSafetyChecker, PointCloudPicker, PolygonEditor, SceneManager, Selector, StateManager, assertCesiumAssetsConfigured, calculateAbsoluteHeight, calculateRelativeHeight, configureCesiumAssets, configureCesiumIonToken, convertPathToSinofly, convertSinoflyWayline, convertSinoflyWaylines, ensureCesiumIonToken, getCesiumBaseUrl, getCesiumIonToken, globalCameraEventBus, globalState, placeholder, queryTerrainHeightAsync, queryTerrainHeightSync, queryTerrainHeights, renderFlightPath, renderFlightPathPreview, toggle2D3D, version, versionInfo };
|
|
11835
|
+
export { CZMLManager, CameraEventBus, CameraFOVController, CameraManager, Emitter, FlightSimulator, FrustumPyramid, LayerManager, PathSafetyChecker, PointCloudPicker, PolygonEditor, SceneManager, Selector, StateManager, assertCesiumAssetsConfigured, calculateAbsoluteHeight, calculateRelativeHeight, configureCesiumAssets, configureCesiumIonToken, convertPathToSinofly, convertSinoflyWayline, convertSinoflyWaylines, droneModelUrl, ensureCesiumIonToken, getCesiumBaseUrl, getCesiumIonToken, globalCameraEventBus, globalState, placeholder, queryTerrainHeightAsync, queryTerrainHeightSync, queryTerrainHeights, renderFlightPath, renderFlightPathPreview, toggle2D3D, version, versionInfo };
|
|
11878
11836
|
//# sourceMappingURL=index.js.map
|
|
11879
11837
|
//# sourceMappingURL=index.js.map
|