Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main v1.0 #8

Merged
merged 44 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a070366
cesium react setting
Village-GG-Water Sep 20, 2024
d2b99f3
feat: default view setting
Village-GG-Water Oct 3, 2024
9925446
feat: Uam and UamController
Village-GG-Water Oct 7, 2024
20fc5b8
fix: Uam Entity의 availability attribute 제거
Village-GG-Water Oct 12, 2024
02ba42f
feat: Uam 구조 변경
Village-GG-Water Oct 12, 2024
60cdd74
feat: UamContorller 구조 변경
Village-GG-Water Oct 12, 2024
bcd1967
Merge branch 'feature/uamEntity' into develop
Village-GG-Water Oct 12, 2024
fff99ad
feat: Uam and UamController
Village-GG-Water Oct 7, 2024
6e60c6e
fix: Uam Entity의 availability attribute 제거
Village-GG-Water Oct 12, 2024
9e607b2
feat: Uam 구조 변경
Village-GG-Water Oct 12, 2024
bb3e288
feat: UamContorller 구조 변경
Village-GG-Water Oct 12, 2024
97451f2
fix: test path -> random으로 변경
Village-GG-Water Nov 1, 2024
6ef6c63
feat: 3dmap tileset 설정
Village-GG-Water Nov 3, 2024
ca8c5bb
feat: set uam model
Village-GG-Water Nov 7, 2024
019572c
chore: uam color 항목 제거
Village-GG-Water Nov 7, 2024
515f25d
feat: Uam 상태 zustand로 관리하도록 변경
Village-GG-Water Nov 8, 2024
9b71e6a
feat: 기본적인 ui 추가
Village-GG-Water Nov 8, 2024
d4d66ca
feat: 기본 ui 조정
Village-GG-Water Nov 17, 2024
5762820
fix: uam controll 조정
Village-GG-Water Nov 17, 2024
ec656bd
fix: infopanel 변경
Village-GG-Water Nov 17, 2024
053f65b
Merge branch 'feature/ui' into develop
Village-GG-Water Nov 17, 2024
e341801
Merge branch 'develop' into develop
Village-GG-Water Nov 17, 2024
c8935d6
Revert "Merge branch 'develop' into develop"
Village-GG-Water Nov 17, 2024
b816c16
Merge pull request #6 from Village-GG-Water/develop
Village-GG-Water Nov 17, 2024
a6e303d
feat: add Path
Village-GG-Water Nov 17, 2024
a196385
fix: isSelected prop 문제 해결
Village-GG-Water Nov 17, 2024
1adf12d
chore: uam sample data change
Village-GG-Water Nov 20, 2024
e025d8c
feat: add Path Info view
Village-GG-Water Nov 20, 2024
7a94514
feat: add Path Info to app
Village-GG-Water Nov 20, 2024
de93c32
feat: uam entity api 요청 코드 추가
Village-GG-Water Nov 21, 2024
46b7cd9
feat: Uam Controller api 요청 추가
Village-GG-Water Nov 21, 2024
9e1e231
feat path api로 로딩 추가
Village-GG-Water Nov 21, 2024
206c00d
chore: uam model 변경 및 path 크기 조절
Village-GG-Water Nov 21, 2024
e749057
feat: add Path
Village-GG-Water Nov 17, 2024
2c94068
fix: isSelected prop 문제 해결
Village-GG-Water Nov 17, 2024
174bc2b
chore: uam sample data change
Village-GG-Water Nov 20, 2024
20f7e98
feat: add Path Info view
Village-GG-Water Nov 20, 2024
74f6401
feat: add Path Info to app
Village-GG-Water Nov 20, 2024
88ae6ba
feat: uam entity api 요청 코드 추가
Village-GG-Water Nov 21, 2024
94482f1
feat: Uam Controller api 요청 추가
Village-GG-Water Nov 21, 2024
25942c0
feat path api로 로딩 추가
Village-GG-Water Nov 21, 2024
5d7a542
chore: uam model 변경 및 path 크기 조절
Village-GG-Water Nov 21, 2024
849c142
Merge branch 'main' into develop
Village-GG-Water Nov 23, 2024
81c12cf
Merge pull request #9 from Village-GG-Water/develop
Village-GG-Water Nov 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh', 'import', 'prefer-arrow'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/naming-convention': [
'error',
{
selector: [
'variableLike',
'classProperty',
'objectLiteralProperty',
'typeProperty',
'classMethod',
'objectLiteralMethod',
'typeMethod',
'accessor',
],
format: ['camelCase'],
leadingUnderscore: 'allow',
},
{
selector: ['variable'],
types: ['function'],
format: ['camelCase', 'PascalCase'],
leadingUnderscore: 'allow',
},
{
selector: ['variable'],
modifiers: ['global'],
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
},
{
selector: [
'classProperty',
'objectLiteralProperty',
'typeProperty',
'classMethod',
'objectLiteralMethod',
'typeMethod',
'accessor',
'enumMember',
],
format: null,
modifiers: ['requiresQuotes'],
},
],
},
};
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?

.env
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"trailingComma": "all"
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>UAM control system</title>
</head>
<body>
<div id="root"></div>
Expand Down
17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,29 @@
"preview": "vite preview"
},
"dependencies": {
"axios": "^1.7.7",
"cesium": "^1.121.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"resium": "^1.18.2",
"styled-components": "^6.1.13",
"zustand": "^5.0.1"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^9.9.0",
"eslint": "^9.10.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9",
"globals": "^15.9.0",
"prettier": "^3.3.3",
"typescript": "^5.5.3",
"typescript-eslint": "^8.0.1",
"vite": "^5.4.1"
}
"vite": "^5.4.1",
"vite-plugin-cesium": "^1.2.23"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
42 changes: 0 additions & 42 deletions src/App.css

This file was deleted.

73 changes: 42 additions & 31 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,46 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'
import { useUamInstanceStore } from './uam/uamInstance';

Check failure on line 1 in src/App.tsx

View workflow job for this annotation

GitHub Actions / build (20.x)

Cannot find module './uam/uamInstance' or its corresponding type declarations.
import UCSViewer from './viewer/UCSViewer';
import styled from 'styled-components';
import { ViewerProvider } from './viewer/ViewerContext';
import UCSInfoPanel from './viewer/UCSInfopanel';
import PathInfoPanel from './viewer/PathInfoPanel';
import { pathCoordinates } from './path/pathCoordinates';

function App() {
const [count, setCount] = useState(0)
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;
`;

export default function App() {
const { uamInstances } = useUamInstanceStore();

return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.tsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
</>
)
}
<ViewerProvider>
<AppContainer>
{/* Viewer와 InfoPanel */}
<ViewerSection>
<UCSViewer />
<UCSInfoPanel uamInstances={uamInstances} />
</ViewerSection>

export default App
{/* PathInfoPanel */}
<PathInfoContainer>
<PathInfoPanel pathCount={pathCoordinates.length} />
</PathInfoContainer>
</AppContainer>
</ViewerProvider>
);
}
1 change: 0 additions & 1 deletion src/assets/react.svg

This file was deleted.

68 changes: 0 additions & 68 deletions src/index.css

This file was deleted.

9 changes: 4 additions & 5 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import App from './App.tsx'
import './index.css'
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import App from './App.tsx';

createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
)
);
35 changes: 35 additions & 0 deletions src/path/PathController.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React, { useMemo } from 'react';
import PathEntity from './PathEntity';
import { pathCoordinates } from './pathCoordinates';
import { Color } from 'cesium';

const getRandomColor = () => {
return Color.fromRandom({ alpha: 0.5 });
};

const PathController: React.FC = () => {
// useMemo를 사용하여 pathCoordinates에 스타일 적용
const pathsWithStyles = useMemo(() => {
return pathCoordinates.map((path) => ({
...path,
color: getRandomColor(),
radius: 20, // 반지름을 50미터로 설정
}));
}, []); // pathCoordinates가 변경되지 않는다고 가정

return (
<>
{pathsWithStyles.map((path, index) => (
<PathEntity
key={index}
id={index}
positions={path.positions}
color={path.color}
radius={path.radius}
/>
))}
</>
);
};

export default PathController;
Loading
Loading