feat: 删除 OrbPro 相关文件和依赖,清理代码库
Some checks failed
/ build-and-deploy-to-vercel (push) Successful in 2m59s
/ lint-build-and-check (push) Successful in 4m5s
/ surge (push) Successful in 2m34s
/ playwright (push) Failing after 5m1s

This commit is contained in:
严浩
2025-03-31 15:15:54 +08:00
parent aea90d1f0d
commit b16c038be9
9 changed files with 0 additions and 324 deletions

View File

@ -64,7 +64,6 @@
"lucide-vue-next": "^0.485.0",
"mitt": "^3.0.1",
"nprogress": "^0.2.0",
"orbpro": "^1.126.0",
"page-stack-vue3": "^2.5.6",
"pinia": "^3.0.1",
"pinia-plugin-persistedstate": "^4.2.0",

9
pnpm-lock.yaml generated
View File

@ -79,9 +79,6 @@ importers:
nprogress:
specifier: ^0.2.0
version: 0.2.0
orbpro:
specifier: ^1.126.0
version: 1.126.0
page-stack-vue3:
specifier: ^2.5.6
version: 2.5.6(vue-router@4.5.0(vue@3.5.13(typescript@5.8.2)))(vue@3.5.13(typescript@5.8.2))
@ -3537,10 +3534,6 @@ packages:
resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}
engines: {node: '>= 0.8.0'}
orbpro@1.126.0:
resolution: {integrity: sha512-qmv+LEXOii2EOwJqEQXj8H3d33Fac/clJ4QGLNbZUymtpQDMQ0wExRlSIe71lZccIEiM3B7TG2eFHg620INvdg==}
engines: {node: '>=18.18.0'}
oxc-resolver@4.2.0:
resolution: {integrity: sha512-x9bzmn1rQRu2cRT6dC6qOCKyStDVubXsf5H3UloUG/UFjzufmNu8DHTxafYDaSlA9Y+rorD+EnmF7sWSaFdd7g==}
@ -8190,8 +8183,6 @@ snapshots:
type-check: 0.4.0
word-wrap: 1.2.5
orbpro@1.126.0: {}
oxc-resolver@4.2.0:
optionalDependencies:
'@oxc-resolver/binding-darwin-arm64': 4.2.0

View File

@ -1,60 +0,0 @@
<script setup lang="ts">
import { DynamicTimeline, Viewer } from 'orbpro';
import 'orbpro/style/widgets.css';
import { demoOrbitGeneration } from './fns';
let viewer: Viewer;
onMounted(() => {
viewer = new Viewer('cesiumContainer', {
animation: true, // 是否创建动画小部件
animationContainer: !true,
// globe: false, // 地球
baseLayerPicker: true,
bottomContainer: document.createElement('p'), // The DOM element or ID that will contain the bottomContainer. If not specified, the bottomContainer is added to the widget itself.
fullscreenButton: !true, // 全屏按钮
geocoder: true, // = IonGeocodeProviderType.DEFAULT] - 在使用Geocoder小部件进行搜索时使用的地理编码服务或服务。如果设置为false则不会创建Geocoder小部件。
homeButton: true, // Home按钮
infoBox: true, // InfoBox小部件。
navigationHelpButton: !true, // 是否显示导航帮助按钮
orderIndependentTranslucency: false, // 顺序无关透明度
projectionPicker: !true, // 投影选择器
requestRenderMode: !true, // 如果为真渲染帧将仅在场景内部发生变化时需要时发生。启用此功能可以减少应用程序的CPU/GPU使用率并在移动设备上节省更多电量但在此模式下需要使用{@link Scene#requestRender}显式渲染新帧。在API的其他部分对场景进行更改后在许多情况下都需要这样做。请参阅{@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|使用显式渲染提高性能}。
sceneModePicker: true, // 是否显示场景模式选择器(2D/3D切换)
selectionIndicator: true,
shadows: true, // Determines if shadows are cast by light sources.
showRenderLoopErrors: true, // 如果为真当发生渲染循环错误时此小部件将自动向用户显示包含错误的HTML面板。
timeline: !true, // If set to false, the Timeline widget will not be created.
timelineContainer: true,
});
viewer.scene.debugShowFramesPerSecond = true;
new DynamicTimeline(viewer.timeline.container, viewer);
// @ts-expect-error Open console to debug app
globalThis.viewer = viewer;
/* if ($__DEV__) */ demoOrbitGeneration(viewer);
});
</script>
<template>
<div class="h-full flex flex-col gap-2">
<div class="shrink-0">
<Button @click="demoOrbitGeneration(viewer)">轨道生成</Button>
</div>
<div id="cesiumContainer" class="flex-1" />
</div>
<!--
{#if $selectedEntity}
<SelectionWidget {viewer} />
{/if}
-->
</template>
<style>
#cesiumContainer {
width: 100%;
}
</style>

View File

@ -1,57 +0,0 @@
/**
* Initialization options for the Viewer constructor
* @property [animation = true] - If set to false, the Animation widget will not be created.
* @property [baseLayerPicker = true] - If set to false, the BaseLayerPicker widget will not be created.
* @property [fullscreenButton = true] - If set to false, the FullscreenButton widget will not be created.
* @property [vrButton = false] - If set to true, the VRButton widget will be created.
* @property [geocoder = IonGeocodeProviderType.DEFAULT] - The geocoding service or services to use when searching with the Geocoder widget. If set to false, the Geocoder widget will not be created.
* @property [homeButton = true] - If set to false, the HomeButton widget will not be created.
* @property [infoBox = true] - If set to false, the InfoBox widget will not be created.
* @property [sceneModePicker = true] - If set to false, the SceneModePicker widget will not be created.
* @property [selectionIndicator = true] - If set to false, the SelectionIndicator widget will not be created.
* @property [timeline = true] - If set to false, the Timeline widget will not be created.
* @property [navigationHelpButton = true] - If set to false, the navigation help button will not be created.
* @property [navigationInstructionsInitiallyVisible = true] - True if the navigation instructions should initially be visible, or false if the should not be shown until the user explicitly clicks the button.
* @property [scene3DOnly = false] - When <code>true</code>, each geometry instance will only be rendered in 3D to save GPU memory.
* @property [shouldAnimate = false] - <code>true</code> if the clock should attempt to advance simulation time by default, <code>false</code> otherwise. This option takes precedence over setting {@link Viewer#clockViewModel}.
* @property [clockViewModel = new ClockViewModel(clock)] - The clock view model to use to control current time.
* @property [selectedImageryProviderViewModel] - The view model for the current base imagery layer, if not supplied the first available base layer is used. This value is only valid if `baseLayerPicker` is set to true.
* @property [imageryProviderViewModels = createDefaultImageryProviderViewModels()] - The array of ProviderViewModels to be selectable from the BaseLayerPicker. This value is only valid if `baseLayerPicker` is set to true.
* @property [selectedTerrainProviderViewModel] - The view model for the current base terrain layer, if not supplied the first available base layer is used. This value is only valid if `baseLayerPicker` is set to true.
* @property [terrainProviderViewModels = createDefaultTerrainProviderViewModels()] - The array of ProviderViewModels to be selectable from the BaseLayerPicker. This value is only valid if `baseLayerPicker` is set to true.
* @property [baseLayer = ImageryLayer.fromWorldImagery()] - The bottommost imagery layer applied to the globe. If set to <code>false</code>, no imagery provider will be added. This value is only valid if `baseLayerPicker` is set to false. Cannot be used when `globe` is set to false.
* @property [ellipsoid = Ellipsoid.default] - The default ellipsoid.
* @property [terrainProvider = new EllipsoidTerrainProvider()] - The terrain provider to use
* @property [terrain] - A terrain object which handles asynchronous terrain provider. Can only specify if options.terrainProvider is undefined.
* @property [skyBox] - The skybox used to render the stars. When <code>undefined</code> and the WGS84 ellipsoid used, the default stars are used. If set to <code>false</code>, no skyBox, Sun, or Moon will be added.
* @property [skyAtmosphere] - Blue sky, and the glow around the Earth's limb. Enabled when the WGS84 ellipsoid used. Set to <code>false</code> to turn it off.
* @property [fullscreenElement = document.body] - The element or id to be placed into fullscreen mode when the full screen button is pressed.
* @property [useDefaultRenderLoop = true] - True if this widget should control the render loop, false otherwise.
* @property [targetFrameRate] - The target frame rate when using the default render loop.
* @property [showRenderLoopErrors = true] - If true, this widget will automatically display an HTML panel to the user containing the error, if a render loop error occurs.
* @property [useBrowserRecommendedResolution = true] - If true, render at the browser's recommended resolution and ignore <code>window.devicePixelRatio</code>.
* @property [automaticallyTrackDataSourceClocks = true] - If true, this widget will automatically track the clock settings of newly added DataSources, updating if the DataSource's clock changes. Set this to false if you want to configure the clock independently.
* @property [contextOptions] - Context and WebGL creation properties passed to {@link Scene}.
* @property [sceneMode = SceneMode.SCENE3D] - The initial scene mode.
* @property [mapProjection = new GeographicProjection(options.ellipsoid)] - The map projection to use in 2D and Columbus View modes.
* @property [globe = new Globe(options.ellipsoid)] - The globe to use in the scene. If set to <code>false</code>, no globe will be added and the sky atmosphere will be hidden by default.
* @property [orderIndependentTranslucency = true] - If true and the configuration supports it, use order independent translucency.
* @property [creditContainer] - The DOM element or ID that will contain the {@link CreditDisplay}. If not specified, the credits are added to the bottom of the widget itself.
* @property [creditViewport] - The DOM element or ID that will contain the credit pop up created by the {@link CreditDisplay}. If not specified, it will appear over the widget itself.
* @property [dataSources = new DataSourceCollection()] - The collection of data sources visualized by the widget. If this parameter is provided,
* the instance is assumed to be owned by the caller and will not be destroyed when the viewer is destroyed.
* @property [shadows = false] - Determines if shadows are cast by light sources.
* @property [terrainShadows = ShadowMode.RECEIVE_ONLY] - Determines if the terrain casts or receives shadows from light sources.
* @property [mapMode2D = MapMode2D.INFINITE_SCROLL] - Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction.
* @property [projectionPicker = false] - If set to true, the ProjectionPicker widget will be created.
* @property [blurActiveElementOnCanvasFocus = true] - If true, the active element will blur when the viewer's canvas is clicked. Setting this to false is useful for cases when the canvas is clicked only for retrieving position or an entity data without actually meaning to set the canvas to be the active element.
* @property [requestRenderMode = false] - If true, rendering a frame will only occur when needed as determined by changes within the scene. Enabling reduces the CPU/GPU usage of your application and uses less battery on mobile, but requires using {@link Scene#requestRender} to render a new frame explicitly in this mode. This will be necessary in many cases after making changes to the scene in other parts of the API. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
* @property [maximumRenderTimeChange = 0.0] - If requestRenderMode is true, this value defines the maximum change in simulation time allowed before a render is requested. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
* @property [depthPlaneEllipsoidOffset = 0.0] - Adjust the DepthPlane to address rendering artefacts below ellipsoid zero elevation.
* @property [msaaSamples = 1] - If provided, this value controls the rate of multisample antialiasing. Typical multisampling rates are 2, 4, and sometimes 8 samples per pixel. Higher sampling rates of MSAA may impact performance in exchange for improved visual quality. This value only applies to WebGL2 contexts that support multisample render targets.
* @property [animationContainer = false] - If provided, will include the animationContainer without the widget.
* @property [timelineContainer = false] - If provided, will include the timelineContainer without the widget.
* @property [bottomContainer] - The DOM element or ID that will contain the bottomContainer. If not specified, the bottomContainer is added to the widget itself.
*/
export {};

View File

@ -1 +0,0 @@
- https://github.com/DigitalArsenal/SDA-TAP-LAB/deployments

View File

@ -1,150 +0,0 @@
import { PromiseConfirmationService } from '@/utils';
import {
Cartesian2,
Cartesian3,
Color,
MakeBillboardLabel,
NearFarScalar,
SpaceCatalogDataSource,
SpaceEntity,
VerticalOrigin,
type Viewer,
viewerReferenceFrameMixin,
} from 'orbpro';
declare global {
interface Window {
spaceCatalog: SpaceCatalogDataSource;
}
}
export async function demoOrbitGeneration(viewer: Viewer) {
// @ts-expect-error globalThis
globalThis.spaceCatalog = new SpaceCatalogDataSource({ name: 'celestrak' });
viewer.extend(viewerReferenceFrameMixin);
viewer.referenceFrame = 1;
// https://spacedatastandards.org/#/standards?search=OMM
const ISS = new SpaceEntity({
id: '25544',
label: {
backgroundColor: new Color(0.1, 0.1, 0.1, 0.9),
font: `1rem Helvetica`,
pixelOffset: new Cartesian2(10, 0),
pixelOffsetScaleByDistance: new NearFarScalar(1.5e2, 3, 1.5e7, 0.5),
scaleByDistance: new NearFarScalar(1.5e2, 1.5, 13e7, 0),
show: false,
showBackground: true,
},
name: 'ISS',
point: {
pixelSize: 1,
},
viewFrom: new Cartesian3(-1_678_500.749_350_715_4, -17_680_994.634_034_64, 24_667_690.486_357_275),
});
ISS.position.loadOMM({
/* CCSDS OMM版本 */ ARG_OF_PERICENTER: 149.2285,
/* 创建日期(ISO 8601 UTC格式) */ BSTAR: 0.000_282_17,
/* 创建者 */ CCSDS_OMM_VERS: 0,
/* 卫星名称 */ CENTER_NAME: null,
/* 国际标识符(YYYY-NNNAAA) */ CLASSIFICATION_TYPE: 'U',
/* 中心名称(例如:EARTH, MARS) */ COMMENT: null,
/* 参考坐标系 */ COV_REFERENCE_FRAME: 23,
/* 参考坐标系历元(ISO 8601 UTC格式) */ CREATION_DATE: null,
/* 时间系统[M, UTC] */ CX_DOT_X: 0,
/* 平均元素理论 */ CX_DOT_X_DOT: 0,
/* 注释 */ CX_DOT_Y: 0,
/* 平均开普勒根数的历元(ISO 8601 UTC格式) */ CX_DOT_Z: 0,
/* 半长轴(km) */ CX_X: 0,
/* 平均运动(圈/天) */ CY_DOT_X: 0,
/* 偏心率(无量纲) */ CY_DOT_X_DOT: 0,
/* 轨道倾角(度) */ CY_DOT_Y: 0,
/* 升交点赤经(度) */ CY_DOT_Y_DOT: 0,
/* 近地点幅角(度) */ CY_DOT_Z: 0,
/* 平近点角(度) */ CY_X: 0,
/* 引力常数(km³/s²) */ CY_Y: 0,
/* 质量(kg) */ CZ_DOT_X: 0,
/* 太阳辐射面积(m²) */ CZ_DOT_X_DOT: 0,
/* 太阳辐射压系数(无量纲) */ CZ_DOT_Y: 0,
/* 大气阻力面积(m²) */ CZ_DOT_Y_DOT: 0,
/* 大气阻力系数(无量纲) */ CZ_DOT_Z: 0,
/* 星历类型(SGP,SGP4等) */ CZ_DOT_Z_DOT: 0,
/* 分类类型,默认'U' */ CZ_X: 0,
/* NORAD编号 */ CZ_Y: 0,
/* 根数组编号 */ CZ_Z: 0,
/* 历元时的圈次 */ DRAG_AREA: 0,
/* 气阻系数(1/地球半径) */ DRAG_COEFF: 0,
/* 平均运动一阶导数(圈/天²) */ ECCENTRICITY: 0.000_334_9,
/* 平均运动二阶导数(圈/天³) */ ELEMENT_SET_NO: 999,
/* 协方差矩阵参考坐标系 */ EPHEMERIS_TYPE: 0,
/* --- 位置/速度协方差矩阵(6x6下三角) --- */
/* 位置协方差矩阵元素(km²) */ EPOCH: '2024-05-08T19:52:52.426848',
/* 位置协方差矩阵元素(km²) */ GM: 0,
/* 位置协方差矩阵元素(km²) */ INCLINATION: 51.6355,
/* 位置协方差矩阵元素(km²) */ MASS: 0,
/* 位置协方差矩阵元素(km²) */ MEAN_ANOMALY: 210.8902,
/* 位置协方差矩阵元素(km²) */ MEAN_ELEMENT_THEORY: 0,
/* 速度-位置协方差矩阵元素(km²/s) */ MEAN_MOTION: 15.510_256_15,
/* 速度-位置协方差矩阵元素(km²/s) */ MEAN_MOTION_DDOT: 0,
/* 速度-位置协方差矩阵元素(km²/s) */ MEAN_MOTION_DOT: 0.000_162_75,
/* 速度协方差矩阵元素(km²/s²) */ NORAD_CAT_ID: 25_544,
/* 速度-位置协方差矩阵元素(km²/s) */ OBJECT_ID: '1998-067A',
/* 速度-位置协方差矩阵元素(km²/s) */ OBJECT_NAME: 'ISS (ZARYA)',
/* 速度-位置协方差矩阵元素(km²/s) */ ORIGINATOR: null,
/* 速度协方差矩阵元素(km²/s²) */ RA_OF_ASC_NODE: 150.5366,
/* 速度协方差矩阵元素(km²/s²) */ REFERENCE_FRAME: 2,
/* 速度-位置协方差矩阵元素(km²/s) */ REFERENCE_FRAME_EPOCH: null,
/* 速度-位置协方差矩阵元素(km²/s) */ REV_AT_EPOCH: 45_244,
/* 速度-位置协方差矩阵元素(km²/s) */ SEMI_MAJOR_AXIS: 0,
/* 速度协方差矩阵元素(km²/s²) */ SOLAR_RAD_AREA: 0,
/* 速度协方差矩阵元素(km²/s²) */ SOLAR_RAD_COEFF: 0,
/* 速度协方差矩阵元素(km²/s²) */ TIME_SYSTEM: 11,
/* --- 用户自定义字段 --- */
/* 用户自定义BIP-0044类型 */ USER_DEFINED_BIP_0044_TYPE: 0,
/* 用户自定义对象标识符 */ USER_DEFINED_EARTH_MODEL: null,
/* 用户自定义地球模型 */ USER_DEFINED_EPOCH_TIMESTAMP: 0,
/* 用户自定义历元时间戳 */ USER_DEFINED_MICROSECONDS: 0,
/* 用户自定义微秒数 */ USER_DEFINED_OBJECT_DESIGNATOR: null,
});
ISS.point!.pixelSize = 10 as any;
ISS.point!.color = Color.WHITE as any;
MakeBillboardLabel({
entity: ISS,
fontSize: 36,
text: 'ISS-text',
verticalOrigin: VerticalOrigin.CENTER,
});
const issDataSource = new SpaceCatalogDataSource({ name: 'issSource' });
Object.assign(globalThis, { issDataSource });
issDataSource.entities.add(ISS); // FIXME: add后有问题。
await viewer.dataSources.add(issDataSource);
// await new Promise((_r) => setTimeout(_r, 1000));
// viewer.camera.flyTo({
// destination: ISS.position.getValue(viewer.clock.currentTime)!,
// orientation: {
// heading: 0.0,
// pitch: -Math.PI / 2,
// roll: 0.0,
// },
// duration: 2,
// });
viewer.extend(viewerReferenceFrameMixin);
viewer.referenceFrame = 1;
const shshowOrbitow = await PromiseConfirmationService({ message: '要显示轨道吗?' });
ISS.showOrbit({ show: shshowOrbitow });
const showCoverage = await PromiseConfirmationService({ message: '要显示覆盖区吗?' });
ISS.showCoverage({ show: showCoverage });
// /* let dynamicTimeline = */ new DynamicTimeline(viewer.timeline.container, viewer);
const track = await PromiseConfirmationService({ message: '要追踪卫星吗?' });
if (track) viewer.trackedEntity = ISS;
}

View File

@ -1 +0,0 @@
export * from './demo.ts';

View File

@ -1,44 +0,0 @@
<script setup lang="ts">
import CesiumViewer from './CesiumViewer.vue';
const $datatableShow = ref(false);
// @ts-expect-error https://digitalarsenal.io/Widgets/InfoBox/InfoBoxDescription.css
globalThis.CESIUM_BASE_URL = 'https://digitalarsenal.io/';
</script>
<template>
<div class="relative w-full h-full SAT">
<div id="container" class="absolute w-full h-full select-none">
<div class="viewer" :style="$datatableShow ? 'height:70%' : 'height: 100%'">
<CesiumViewer />
</div>
<div
:class="[$datatableShow ? 'visible' : 'hidden', 'datatable absolute w-full b-0 l-0']"
:style="{
height: $datatableShow ? '30%' : '0',
overflow: 'hidden',
transition: 'height 0.3s ease',
}"
>
<!-- <DataTable /> -->
</div>
</div>
</div>
</template>
<style>
.layout-main {
display: flex;
flex-direction: column;
}
.layout-main .SAT {
flex: 1;
}
</style>
<!--
<style scoped>
#container {
background-color: pink;
}
</style> -->

1
typed-router.d.ts vendored
View File

@ -33,7 +33,6 @@ declare module 'vue-router/auto-routes' {
'PkgsUsageI18n': RouteRecordInfo<'PkgsUsageI18n', '/PkgsUsage/I18n', Record<never, never>, Record<never, never>>,
'PkgsUsageTsEnumUtil': RouteRecordInfo<'PkgsUsageTsEnumUtil', '/PkgsUsage/ts-enum-util', Record<never, never>, Record<never, never>>,
'SatelliteCesium': RouteRecordInfo<'SatelliteCesium', '/Satellite/Cesium', Record<never, never>, Record<never, never>>,
'SatelliteOrbPro': RouteRecordInfo<'SatelliteOrbPro', '/Satellite/OrbPro', Record<never, never>, Record<never, never>>,
'UIComponentsAntdV': RouteRecordInfo<'UIComponentsAntdV', '/UI-components/AntdV', Record<never, never>, Record<never, never>>,
'UIComponentsComponents': RouteRecordInfo<'UIComponentsComponents', '/UI-components/Components', Record<never, never>, Record<never, never>>,
'UIComponentsInfiniteLoading': RouteRecordInfo<'UIComponentsInfiniteLoading', '/UI-components/infinite-loading', Record<never, never>, Record<never, never>>,