- 텍스트(측점/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>
23 lines
966 B
TypeScript
23 lines
966 B
TypeScript
import React from 'react';
|
||
|
||
interface State { hasError: boolean; error?: Error }
|
||
export default class ErrorBoundary extends React.Component<React.PropsWithChildren, State> {
|
||
state: State = { hasError: false };
|
||
static getDerivedStateFromError(error: Error): State { return { hasError: true, error }; }
|
||
render() {
|
||
if (this.state.hasError) return (
|
||
<div className="flex items-center justify-center h-screen bg-gray-950 text-white">
|
||
<div className="text-center p-8 max-w-lg">
|
||
<div className="text-5xl mb-4">⚠️</div>
|
||
<h2 className="text-xl font-bold mb-2">오류가 발생했습니다</h2>
|
||
<p className="text-gray-400 text-sm mb-4">{this.state.error?.message}</p>
|
||
<button onClick={() => this.setState({ hasError: false })} className="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded">
|
||
다시 시도
|
||
</button>
|
||
</div>
|
||
</div>
|
||
);
|
||
return this.props.children;
|
||
}
|
||
}
|