From cce4aa578511bb69887e77ef906a8de9bf845156 Mon Sep 17 00:00:00 2001 From: Village_Water Date: Mon, 25 Nov 2024 00:43:04 +0900 Subject: [PATCH 1/3] feat: add wasm file --- src/wasm/uam_control_system_wasm.d.ts | 72 +++ src/wasm/uam_control_system_wasm.js | 438 ++++++++++++++++++ src/wasm/uam_control_system_wasm_bg.wasm | Bin 0 -> 25603 bytes src/wasm/uam_control_system_wasm_bg.wasm.d.ts | 12 + 4 files changed, 522 insertions(+) create mode 100644 src/wasm/uam_control_system_wasm.d.ts create mode 100644 src/wasm/uam_control_system_wasm.js create mode 100644 src/wasm/uam_control_system_wasm_bg.wasm create mode 100644 src/wasm/uam_control_system_wasm_bg.wasm.d.ts diff --git a/src/wasm/uam_control_system_wasm.d.ts b/src/wasm/uam_control_system_wasm.d.ts new file mode 100644 index 0000000..09e5fe1 --- /dev/null +++ b/src/wasm/uam_control_system_wasm.d.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +export class UAM { + free(): void; + /** + * @param {number} lat + * @param {number} lon + * @param {number} alt + * @param {number} vx + * @param {number} vy + * @param {number} vz + * @returns {UAM} + */ + static new(lat: number, lon: number, alt: number, vx: number, vy: number, vz: number): UAM; + /** + * @param {UAM} other + * @returns {number | undefined} + */ + predict_collision(other: UAM): number | undefined; +} +export class UAMs { + free(): void; + /** + * @returns {UAMs} + */ + static new(): UAMs; + /** + * @param {UAM} uam + */ + add(uam: UAM): void; + /** + * @returns {any} + */ + predict_collisions(): any; +} + +export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; + +export interface InitOutput { + readonly memory: WebAssembly.Memory; + readonly __wbg_uam_free: (a: number, b: number) => void; + readonly __wbg_uams_free: (a: number, b: number) => void; + readonly uam_new: (a: number, b: number, c: number, d: number, e: number, f: number) => number; + readonly uam_predict_collision: (a: number, b: number, c: number) => void; + readonly uams_new: () => number; + readonly uams_add: (a: number, b: number) => void; + readonly uams_predict_collisions: (a: number) => number; + readonly __wbindgen_malloc: (a: number, b: number) => number; + readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; + readonly __wbindgen_add_to_stack_pointer: (a: number) => number; +} + +export type SyncInitInput = BufferSource | WebAssembly.Module; +/** +* Instantiates the given `module`, which can either be bytes or +* a precompiled `WebAssembly.Module`. +* +* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated. +* +* @returns {InitOutput} +*/ +export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput; + +/** +* If `module_or_path` is {RequestInfo} or {URL}, makes a request and +* for everything else, calls `WebAssembly.instantiate` directly. +* +* @param {{ module_or_path: InitInput | Promise }} module_or_path - Passing `InitInput` directly is deprecated. +* +* @returns {Promise} +*/ +export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise } | InitInput | Promise): Promise; diff --git a/src/wasm/uam_control_system_wasm.js b/src/wasm/uam_control_system_wasm.js new file mode 100644 index 0000000..398511f --- /dev/null +++ b/src/wasm/uam_control_system_wasm.js @@ -0,0 +1,438 @@ +let wasm; + +const heap = new Array(128).fill(undefined); + +heap.push(undefined, null, true, false); + +function getObject(idx) { return heap[idx]; } + +let heap_next = heap.length; + +function dropObject(idx) { + if (idx < 132) return; + heap[idx] = heap_next; + heap_next = idx; +} + +function takeObject(idx) { + const ret = getObject(idx); + dropObject(idx); + return ret; +} + +function addHeapObject(obj) { + if (heap_next === heap.length) heap.push(heap.length + 1); + const idx = heap_next; + heap_next = heap[idx]; + + heap[idx] = obj; + return idx; +} + +const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); + +if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; + +let cachedUint8ArrayMemory0 = null; + +function getUint8ArrayMemory0() { + if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { + cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); + } + return cachedUint8ArrayMemory0; +} + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); +} + +function debugString(val) { + // primitive types + const type = typeof val; + if (type == 'number' || type == 'boolean' || val == null) { + return `${val}`; + } + if (type == 'string') { + return `"${val}"`; + } + if (type == 'symbol') { + const description = val.description; + if (description == null) { + return 'Symbol'; + } else { + return `Symbol(${description})`; + } + } + if (type == 'function') { + const name = val.name; + if (typeof name == 'string' && name.length > 0) { + return `Function(${name})`; + } else { + return 'Function'; + } + } + // objects + if (Array.isArray(val)) { + const length = val.length; + let debug = '['; + if (length > 0) { + debug += debugString(val[0]); + } + for(let i = 1; i < length; i++) { + debug += ', ' + debugString(val[i]); + } + debug += ']'; + return debug; + } + // Test for built-in + const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); + let className; + if (builtInMatches.length > 1) { + className = builtInMatches[1]; + } else { + // Failed to match the standard '[object ClassName]' + return toString.call(val); + } + if (className == 'Object') { + // we're a user defined class or Object + // JSON.stringify avoids problems with cycles, and is generally much + // easier than looping through ownProperties of `val`. + try { + return 'Object(' + JSON.stringify(val) + ')'; + } catch (_) { + return 'Object'; + } + } + // errors + if (val instanceof Error) { + return `${val.name}: ${val.message}\n${val.stack}`; + } + // TODO we could test for more things here, like `Set`s and `Map`s. + return className; +} + +let WASM_VECTOR_LEN = 0; + +const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } ); + +const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' + ? function (arg, view) { + return cachedTextEncoder.encodeInto(arg, view); +} + : function (arg, view) { + const buf = cachedTextEncoder.encode(arg); + view.set(buf); + return { + read: arg.length, + written: buf.length + }; +}); + +function passStringToWasm0(arg, malloc, realloc) { + + if (realloc === undefined) { + const buf = cachedTextEncoder.encode(arg); + const ptr = malloc(buf.length, 1) >>> 0; + getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); + WASM_VECTOR_LEN = buf.length; + return ptr; + } + + let len = arg.length; + let ptr = malloc(len, 1) >>> 0; + + const mem = getUint8ArrayMemory0(); + + let offset = 0; + + for (; offset < len; offset++) { + const code = arg.charCodeAt(offset); + if (code > 0x7F) break; + mem[ptr + offset] = code; + } + + if (offset !== len) { + if (offset !== 0) { + arg = arg.slice(offset); + } + ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; + const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); + const ret = encodeString(arg, view); + + offset += ret.written; + ptr = realloc(ptr, len, offset, 1) >>> 0; + } + + WASM_VECTOR_LEN = offset; + return ptr; +} + +let cachedDataViewMemory0 = null; + +function getDataViewMemory0() { + if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { + cachedDataViewMemory0 = new DataView(wasm.memory.buffer); + } + return cachedDataViewMemory0; +} + +function _assertClass(instance, klass) { + if (!(instance instanceof klass)) { + throw new Error(`expected instance of ${klass.name}`); + } + return instance.ptr; +} + +const UAMFinalization = (typeof FinalizationRegistry === 'undefined') + ? { register: () => {}, unregister: () => {} } + : new FinalizationRegistry(ptr => wasm.__wbg_uam_free(ptr >>> 0, 1)); + +export class UAM { + + static __wrap(ptr) { + ptr = ptr >>> 0; + const obj = Object.create(UAM.prototype); + obj.__wbg_ptr = ptr; + UAMFinalization.register(obj, obj.__wbg_ptr, obj); + return obj; + } + + __destroy_into_raw() { + const ptr = this.__wbg_ptr; + this.__wbg_ptr = 0; + UAMFinalization.unregister(this); + return ptr; + } + + free() { + const ptr = this.__destroy_into_raw(); + wasm.__wbg_uam_free(ptr, 0); + } + /** + * @param {number} lat + * @param {number} lon + * @param {number} alt + * @param {number} vx + * @param {number} vy + * @param {number} vz + * @returns {UAM} + */ + static new(lat, lon, alt, vx, vy, vz) { + const ret = wasm.uam_new(lat, lon, alt, vx, vy, vz); + return UAM.__wrap(ret); + } + /** + * @param {UAM} other + * @returns {number | undefined} + */ + predict_collision(other) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + _assertClass(other, UAM); + wasm.uam_predict_collision(retptr, this.__wbg_ptr, other.__wbg_ptr); + var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); + var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true); + return r0 === 0 ? undefined : r2; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } +} + +const UAMsFinalization = (typeof FinalizationRegistry === 'undefined') + ? { register: () => {}, unregister: () => {} } + : new FinalizationRegistry(ptr => wasm.__wbg_uams_free(ptr >>> 0, 1)); + +export class UAMs { + + static __wrap(ptr) { + ptr = ptr >>> 0; + const obj = Object.create(UAMs.prototype); + obj.__wbg_ptr = ptr; + UAMsFinalization.register(obj, obj.__wbg_ptr, obj); + return obj; + } + + __destroy_into_raw() { + const ptr = this.__wbg_ptr; + this.__wbg_ptr = 0; + UAMsFinalization.unregister(this); + return ptr; + } + + free() { + const ptr = this.__destroy_into_raw(); + wasm.__wbg_uams_free(ptr, 0); + } + /** + * @returns {UAMs} + */ + static new() { + const ret = wasm.uams_new(); + return UAMs.__wrap(ret); + } + /** + * @param {UAM} uam + */ + add(uam) { + _assertClass(uam, UAM); + var ptr0 = uam.__destroy_into_raw(); + wasm.uams_add(this.__wbg_ptr, ptr0); + } + /** + * @returns {any} + */ + predict_collisions() { + const ret = wasm.uams_predict_collisions(this.__wbg_ptr); + return takeObject(ret); + } +} + +async function __wbg_load(module, imports) { + if (typeof Response === 'function' && module instanceof Response) { + if (typeof WebAssembly.instantiateStreaming === 'function') { + try { + return await WebAssembly.instantiateStreaming(module, imports); + + } catch (e) { + if (module.headers.get('Content-Type') != 'application/wasm') { + console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); + + } else { + throw e; + } + } + } + + const bytes = await module.arrayBuffer(); + return await WebAssembly.instantiate(bytes, imports); + + } else { + const instance = await WebAssembly.instantiate(module, imports); + + if (instance instanceof WebAssembly.Instance) { + return { instance, module }; + + } else { + return instance; + } + } +} + +function __wbg_get_imports() { + const imports = {}; + imports.wbg = {}; + imports.wbg.__wbindgen_object_drop_ref = function(arg0) { + takeObject(arg0); + }; + imports.wbg.__wbindgen_number_new = function(arg0) { + const ret = arg0; + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_object_clone_ref = function(arg0) { + const ret = getObject(arg0); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_string_new = function(arg0, arg1) { + const ret = getStringFromWasm0(arg0, arg1); + return addHeapObject(ret); + }; + imports.wbg.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) { + getObject(arg0)[takeObject(arg1)] = takeObject(arg2); + }; + imports.wbg.__wbg_new_034f913e7636e987 = function() { + const ret = new Array(); + return addHeapObject(ret); + }; + imports.wbg.__wbg_new_e69b5f66fda8f13c = function() { + const ret = new Object(); + return addHeapObject(ret); + }; + imports.wbg.__wbg_set_425e70f7c64ac962 = function(arg0, arg1, arg2) { + getObject(arg0)[arg1 >>> 0] = takeObject(arg2); + }; + imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { + const ret = debugString(getObject(arg1)); + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); + getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); + }; + imports.wbg.__wbindgen_throw = function(arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); + }; + + return imports; +} + +function __wbg_init_memory(imports, memory) { + +} + +function __wbg_finalize_init(instance, module) { + wasm = instance.exports; + __wbg_init.__wbindgen_wasm_module = module; + cachedDataViewMemory0 = null; + cachedUint8ArrayMemory0 = null; + + + + return wasm; +} + +function initSync(module) { + if (wasm !== undefined) return wasm; + + + if (typeof module !== 'undefined') { + if (Object.getPrototypeOf(module) === Object.prototype) { + ({module} = module) + } else { + console.warn('using deprecated parameters for `initSync()`; pass a single object instead') + } + } + + const imports = __wbg_get_imports(); + + __wbg_init_memory(imports); + + if (!(module instanceof WebAssembly.Module)) { + module = new WebAssembly.Module(module); + } + + const instance = new WebAssembly.Instance(module, imports); + + return __wbg_finalize_init(instance, module); +} + +async function __wbg_init(module_or_path) { + if (wasm !== undefined) return wasm; + + + if (typeof module_or_path !== 'undefined') { + if (Object.getPrototypeOf(module_or_path) === Object.prototype) { + ({module_or_path} = module_or_path) + } else { + console.warn('using deprecated parameters for the initialization function; pass a single object instead') + } + } + + if (typeof module_or_path === 'undefined') { + module_or_path = new URL('uam_control_system_wasm_bg.wasm', import.meta.url); + } + const imports = __wbg_get_imports(); + + if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) { + module_or_path = fetch(module_or_path); + } + + __wbg_init_memory(imports); + + const { instance, module } = await __wbg_load(await module_or_path, imports); + + return __wbg_finalize_init(instance, module); +} + +export { initSync }; +export default __wbg_init; diff --git a/src/wasm/uam_control_system_wasm_bg.wasm b/src/wasm/uam_control_system_wasm_bg.wasm new file mode 100644 index 0000000000000000000000000000000000000000..c36b4f1e257ee14e273904b14d1301754295ef41 GIT binary patch literal 25603 zcmb`QdyE~|ec#W_+}G~CyS${9(uzw-=Z+|wib!eS55}=MjP;-uT29ae{lfsY++9+< zyCS&{E+t3SQnG9-vC^o8iaJ4>h_X>DY22!SQz)(5Y*D#T3pr5%Cou{e6%w~`3&&AV zCskV|>gW4AGk5PUsVGQGVeibG=kI-fzu!4CaK4o!NKtFHQ3wL;M~QB zPc5vRJhyPk^{H;Ct1j<6w{-s8g7q%%?7h0Sa`xOA>+L#IpEFi_(=#Ju3saM0lM6G`Q?9zB!NTOssfp8*lc(orr%#WJ&24L- zDaJ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LvFqWBCZ31SES*0!yR>>oZT0M#bB7lmS^K}4 C%51{` literal 0 HcmV?d00001 diff --git a/src/wasm/uam_control_system_wasm_bg.wasm.d.ts b/src/wasm/uam_control_system_wasm_bg.wasm.d.ts new file mode 100644 index 0000000..628adde --- /dev/null +++ b/src/wasm/uam_control_system_wasm_bg.wasm.d.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +export const memory: WebAssembly.Memory; +export function __wbg_uam_free(a: number, b: number): void; +export function __wbg_uams_free(a: number, b: number): void; +export function uam_new(a: number, b: number, c: number, d: number, e: number, f: number): number; +export function uam_predict_collision(a: number, b: number, c: number): void; +export function uams_new(): number; +export function uams_add(a: number, b: number): void; +export function uams_predict_collisions(a: number): number; +export function __wbindgen_malloc(a: number, b: number): number; +export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number; +export function __wbindgen_add_to_stack_pointer(a: number): number; From 4555043bfad06a8ae6700e04b3e73c7d6729e4e0 Mon Sep 17 00:00:00 2001 From: Village_Water Date: Sun, 8 Dec 2024 18:41:01 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20ui=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 86 +++++++++++++++++++++++++++--------- src/viewer/PathInfoPanel.tsx | 10 ++--- src/viewer/UCSInfopanel.tsx | 4 +- src/viewer/UCSViewer.tsx | 1 - 4 files changed, 68 insertions(+), 33 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 1e69068..a2ae937 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,3 +1,4 @@ +import { useState } from 'react'; import { useUamInstanceStore } from './uam/uamInstance'; import UCSViewer from './viewer/UCSViewer'; import styled from 'styled-components'; @@ -6,41 +7,82 @@ import UCSInfoPanel from './viewer/UCSInfopanel'; import PathInfoPanel from './viewer/PathInfoPanel'; import { pathCoordinates } from './path/pathCoordinates'; -const AppContainer = styled.div` - display: flex; - flex-direction: column; /* 세로로 배치 */ - height: 100vh; -`; - const ViewerSection = styled.div` display: flex; flex: 1; /* 화면의 나머지 공간 차지 */ overflow: hidden; /* 필요 시 넘치는 내용 숨김 */ `; -const PathInfoContainer = styled.div` - height: 20vh; /* 하단에 고정된 높이 */ - width: 100%; /* 가로 전체 */ - background-color: #1e1e1e; +const MenuSection = styled.div` + display: flex; + flex-direction: column; +`; + +const InfoPanelSection = styled.div` + display: flex; + flex: 1; +`; + +const ButtonSection = styled.div` + display: flex; + height: 3rem; + justify-content: space-evenly; + align-items: center; + width: 100%; +`; + +interface StyledButtonProps + extends Omit, '$active'> { + $active: boolean; +} + +const StyledButton = styled.button` + display: flex; + flex: 1; /* 버튼이 섹션 전체를 고르게 차지 */ + height: 3rem; + justify-content: center; + align-items: center; + border-radius: 1.25rem 1.25rem 0rem 0rem; + border-top: 2px solid rgba(255, 255, 255, 0.5); + background-color: ${(props) => + props.$active ? '#1e1e1e' : 'black'}; /* 활성 상태에 따른 색상 변경 */ + color: white; /* 텍스트 색상 변경 */ `; export default function App() { const { uamInstances } = useUamInstanceStore(); + const [activePanel, setActivePanel] = useState('UCS'); // UCS 또는 Path return ( - - {/* Viewer와 InfoPanel */} - - - - - - {/* PathInfoPanel */} - - - - + {/* Viewer와 InfoPanel */} + + + + + setActivePanel('UCS')} + > + UAM 정보 + + setActivePanel('Path')} + > + 경로 + + + + {activePanel === 'UCS' && ( + + )} + {activePanel === 'Path' && ( + + )} + + + ); } diff --git a/src/viewer/PathInfoPanel.tsx b/src/viewer/PathInfoPanel.tsx index 66d346b..d1742d3 100644 --- a/src/viewer/PathInfoPanel.tsx +++ b/src/viewer/PathInfoPanel.tsx @@ -3,7 +3,7 @@ import styled from 'styled-components'; import { useState } from 'react'; const InfoPanel = styled.div` - width: 100%; /* 가로 전체 */ + width: 21rem; /* 가로 전체 */ background-color: #1e1e1e; font-family: Arial, sans-serif; color: #fff; @@ -15,8 +15,6 @@ const InfoPanel = styled.div` const PathList = styled.ul` list-style: none; padding: 0; - margin: 1rem 0 0 0; - border-top: 1px solid #333; `; const PathItem = styled.li<{ $isSelected: boolean }>` @@ -80,9 +78,7 @@ const PathInfoPanel: React.FC = ({ pathCount }) => { textAlign: 'center', margin: '1rem 0', }} - > - 경로 목록 - + > {Array.from({ length: pathCount }, (_, i) => ( = ({ pathCount }) => { onClick={() => handlePathClick(i)} $isSelected={visiblePaths.includes(i)} > - {i} 번 노선 + Route {i + 1} ))} diff --git a/src/viewer/UCSInfopanel.tsx b/src/viewer/UCSInfopanel.tsx index e721db4..4327a19 100644 --- a/src/viewer/UCSInfopanel.tsx +++ b/src/viewer/UCSInfopanel.tsx @@ -119,9 +119,7 @@ const UCSInfoPanel: React.FC = ({ uamInstances }) => { textAlign: 'center', margin: '1rem 0', }} - > - 현재 비행중인 UAM - + > {uamInstances.map((uamId) => { const uam = uamData.find((data) => data.id === uamId); diff --git a/src/viewer/UCSViewer.tsx b/src/viewer/UCSViewer.tsx index bb24da8..8cffd95 100644 --- a/src/viewer/UCSViewer.tsx +++ b/src/viewer/UCSViewer.tsx @@ -56,7 +56,6 @@ export default function UCSViewer() { - From 574cb4d2eff4faca8448e1ce36cd1741685bef71 Mon Sep 17 00:00:00 2001 From: Village_Water Date: Mon, 9 Dec 2024 01:55:27 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20UI=20=EC=B6=94=EA=B0=80=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/path/PathController.tsx | 2 +- src/uam/UamEntity.tsx | 11 ++++++++--- src/viewer/PathInfoPanel.tsx | 11 +++++++++++ src/viewer/UCSInfopanel.tsx | 3 +++ 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/path/PathController.tsx b/src/path/PathController.tsx index f71e4b2..225e5a7 100644 --- a/src/path/PathController.tsx +++ b/src/path/PathController.tsx @@ -1,4 +1,4 @@ -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; import PathEntity from './PathEntity'; import { pathCoordinates } from './pathCoordinates'; import { Color } from 'cesium'; diff --git a/src/uam/UamEntity.tsx b/src/uam/UamEntity.tsx index 0aa6817..1f76c42 100644 --- a/src/uam/UamEntity.tsx +++ b/src/uam/UamEntity.tsx @@ -4,6 +4,7 @@ import { JulianDate, Resource, SampledPositionProperty, + VelocityOrientationProperty, } from 'cesium'; import { useEffect, useState } from 'react'; import { Entity, ModelGraphics } from 'resium'; @@ -59,15 +60,19 @@ const UamEntity: React.FC = ({ id }: UamProp) => { useEffect(() => { const loadModelUri = async () => { - const uri = await IonResource.fromAssetId(2852225); + const uri = await IonResource.fromAssetId(2808773); setModelUri(uri); }; loadModelUri(); }, []); return ( - - {modelUri && } + + {modelUri && } ); }; diff --git a/src/viewer/PathInfoPanel.tsx b/src/viewer/PathInfoPanel.tsx index d1742d3..baf9b62 100644 --- a/src/viewer/PathInfoPanel.tsx +++ b/src/viewer/PathInfoPanel.tsx @@ -20,6 +20,7 @@ const PathList = styled.ul` const PathItem = styled.li<{ $isSelected: boolean }>` padding: 0.5rem 1rem; cursor: pointer; + border: white; background-color: ${({ $isSelected }) => $isSelected ? '#555' : 'transparent'}; color: ${({ $isSelected }) => ($isSelected ? '#fff' : '#ccc')}; @@ -80,6 +81,16 @@ const PathInfoPanel: React.FC = ({ pathCount }) => { }} > + { + for (let index = 0; index < pathCount; index++) { + handlePathClick(index); + } + }} + $isSelected={false} + > + Route 전체 조회 + {Array.from({ length: pathCount }, (_, i) => ( = ({ uamInstances }) => { 위치: {uam.buildingName || '위치 정보를 불러오는 중...'}
고도: {uam.altitude.toFixed(1)} m
+
+ 속력 {CesiumMath.randomBetween(35, 39).toFixed(2)}km/h +
) : (
위치 정보를 불러오는 중...