diff --git a/local-plugins/wwv-plugin-iss/index.ts b/local-plugins/wwv-plugin-iss/index.ts new file mode 100644 index 00000000..f5d87704 --- /dev/null +++ b/local-plugins/wwv-plugin-iss/index.ts @@ -0,0 +1,45 @@ +import type { + WorldPlugin, PluginContext, GeoEntity, + CesiumEntityOptions, TimeRange, LayerConfig, PluginCategory +} from "@worldwideview/wwv-plugin-sdk"; +import { Satellite } from "lucide-react"; +import pkg from "./package.json"; + +export default class IssPlugin implements WorldPlugin { + id = "iss"; + name = "ISS Tracker"; + description = "Real-time International Space Station tracking"; + icon = Satellite; + category: PluginCategory = "space"; + version = pkg.version; + + async initialize(ctx: PluginContext): Promise {} + + destroy(): void {} + + async fetch(timeRange: TimeRange): Promise { + return []; // WS-only plugin + } + + getPollingInterval(): number { + return 0; // WS-only + } + + getLayerConfig(): LayerConfig { + return { + color: "#ffffff", + clusterEnabled: false, + maxEntities: 1, + }; + } + + renderEntity(entity: GeoEntity): CesiumEntityOptions { + return { + type: "point", + color: "#ffffff", + size: 10, + outlineColor: "#3b82f6", + outlineWidth: 2, + }; + } +} diff --git a/local-plugins/wwv-plugin-iss/package.json b/local-plugins/wwv-plugin-iss/package.json new file mode 100644 index 00000000..fb9e471f --- /dev/null +++ b/local-plugins/wwv-plugin-iss/package.json @@ -0,0 +1,21 @@ +{ + "name": "@worldwideview/wwv-plugin-iss", + "version": "1.0.0", + "description": "Real-time International Space Station tracking", + "main": "index.ts", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "@worldwideview/wwv-plugin-sdk": "workspace:*" + }, + "worldwideview": { + "pluginId": "iss", + "name": "ISS Tracker", + "description": "Real-time International Space Station tracking", + "icon": "Satellite", + "category": "space", + "streamUrl": "wss://dataenginev2.worldwideview.dev/stream", + "author": "WWV Community" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b4b135c6..eb37cf23 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -353,6 +353,12 @@ importers: specifier: ^1.4.10 version: 1.5.0(react@19.2.6) + local-plugins/wwv-plugin-iss: + dependencies: + '@worldwideview/wwv-plugin-sdk': + specifier: workspace:* + version: link:../../packages/wwv-plugin-sdk + local-plugins/wwv-plugin-maritime: dependencies: '@worldwideview/wwv-plugin-sdk': @@ -390,7 +396,7 @@ importers: specifier: ^1.0.0 version: 1.6.1(@types/node@20.19.41)(jsdom@28.1.0)(lightningcss@1.32.0)(terser@5.47.1) - local-plugins/wwv-plugin-testplugin: + local-plugins/wwv-plugin-test-plugin: dependencies: '@worldwideview/wwv-plugin-sdk': specifier: workspace:*