feat: StationOverlay 렌더링 최적화 및 스무딩 적용 close #1
- 텍스트(측점/POI) 전 프레임 사전 계산 Map (requestIdleCallback 백그라운드) - 드론 데이터 이동 평균 스무딩 (smoothFrame ±N프레임) - 30fps→60fps 프레임 간 선형 보간 (performance.now() 기반) - EMA(지수이동평균) 표시 위치 스무딩 (α=0.01 기본값) - 글씨 2배 크기, bold, strokeText 테두리, 배경 박스 제거 - 카메라 파라미터 패널에 smooth/EMA α 슬라이더 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
10
shared/package.json
Normal file
10
shared/package.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "@abcvideo/shared",
|
||||
"version": "1.0.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"dev": "tsc --watch"
|
||||
}
|
||||
}
|
||||
1
shared/src/index.ts
Normal file
1
shared/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './types';
|
||||
75
shared/src/types.ts
Normal file
75
shared/src/types.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
// Video source types
|
||||
export type VideoSourceType = 'local' | 'server';
|
||||
|
||||
export type HlsConversionStatus = 'idle' | 'converting' | 'done' | 'error';
|
||||
|
||||
export interface VideoMeta {
|
||||
videoId: string;
|
||||
filename: string;
|
||||
size: number;
|
||||
duration: number;
|
||||
fps: number;
|
||||
width: number;
|
||||
height: number;
|
||||
codec: string;
|
||||
hlsStatus: HlsConversionStatus;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
// Annotation types
|
||||
export type AnnotationType = 'subtitle' | 'memo';
|
||||
|
||||
export interface AnnotationPosition {
|
||||
x: number; // 0-100 percentage
|
||||
y: number; // 0-100 percentage
|
||||
}
|
||||
|
||||
export interface AnnotationSize {
|
||||
width: number; // 0-100 percentage
|
||||
height: number; // 0-100 percentage
|
||||
}
|
||||
|
||||
export interface AnnotationStyle {
|
||||
fontSize?: number;
|
||||
color?: string;
|
||||
backgroundColor?: string;
|
||||
}
|
||||
|
||||
export interface Annotation {
|
||||
id: string;
|
||||
videoId: string;
|
||||
type: AnnotationType;
|
||||
timeStart: number; // seconds (float)
|
||||
timeEnd: number; // seconds (float)
|
||||
text: string;
|
||||
position: AnnotationPosition;
|
||||
size: AnnotationSize;
|
||||
style: AnnotationStyle;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export type CreateAnnotationInput = Omit<Annotation, 'id' | 'createdAt' | 'updatedAt'>;
|
||||
export type UpdateAnnotationInput = Partial<Omit<Annotation, 'id' | 'videoId' | 'createdAt'>>;
|
||||
|
||||
// API response types
|
||||
export interface ApiResponse<T> {
|
||||
data?: T;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface HlsProgressEvent {
|
||||
videoId: string;
|
||||
percent: number;
|
||||
time: number;
|
||||
status: HlsConversionStatus;
|
||||
}
|
||||
|
||||
// Upload types
|
||||
export interface UploadStatus {
|
||||
uploadId: string;
|
||||
filename: string;
|
||||
size: number;
|
||||
uploadedBytes: number;
|
||||
status: 'uploading' | 'complete' | 'error';
|
||||
}
|
||||
14
shared/tsconfig.json
Normal file
14
shared/tsconfig.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "CommonJS",
|
||||
"declaration": true,
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
Reference in New Issue
Block a user