Skip to content

Commit dfa985b

Browse files
committed
feat: add aero coefficients HUD overlay to airfoil canvas
Display α, CL, CD, CM in a compact top-left overlay that updates with morphing animation state. Made-with: Cursor
1 parent 7a665bc commit dfa985b

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

flexfoil-ui/src/components/AirfoilCanvas.tsx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3235,6 +3235,44 @@ export function AirfoilCanvas({ initialViewport }: AirfoilCanvasProps) {
32353235
);
32363236
})()}
32373237

3238+
{/* Aero coefficients HUD */}
3239+
<div
3240+
style={{
3241+
position: 'absolute',
3242+
top: '12px',
3243+
left: '12px',
3244+
zIndex: 10,
3245+
pointerEvents: 'none',
3246+
background: 'var(--bg-secondary, rgba(15,20,35,0.88))',
3247+
backdropFilter: 'blur(10px)',
3248+
padding: '8px 12px',
3249+
borderRadius: '6px',
3250+
border: '1px solid var(--border-color, rgba(255,255,255,0.08))',
3251+
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace',
3252+
fontSize: '11px',
3253+
lineHeight: '1.7',
3254+
color: 'var(--text-primary, #edf2ff)',
3255+
minWidth: '120px',
3256+
}}
3257+
>
3258+
<div style={{ display: 'flex', justifyContent: 'space-between', gap: '12px' }}>
3259+
<span style={{ opacity: 0.5 }}>α</span>
3260+
<span>{displayAlpha.toFixed(2)}°</span>
3261+
</div>
3262+
<div style={{ display: 'flex', justifyContent: 'space-between', gap: '12px' }}>
3263+
<span style={{ opacity: 0.5 }}>C<sub>L</sub></span>
3264+
<span style={{ color: 'var(--accent-primary, #61dafb)' }}>{morphState.cl.toFixed(4)}</span>
3265+
</div>
3266+
<div style={{ display: 'flex', justifyContent: 'space-between', gap: '12px' }}>
3267+
<span style={{ opacity: 0.5 }}>C<sub>D</sub></span>
3268+
<span style={{ color: 'var(--accent-secondary, #f472b6)' }}>{morphState.cd.toFixed(5)}</span>
3269+
</div>
3270+
<div style={{ display: 'flex', justifyContent: 'space-between', gap: '12px' }}>
3271+
<span style={{ opacity: 0.5 }}>C<sub>M</sub></span>
3272+
<span>{morphState.cm.toFixed(4)}</span>
3273+
</div>
3274+
</div>
3275+
32383276
{/* Overlay controls - simplified, full controls in Visualization panel */}
32393277
<div
32403278
style={{

0 commit comments

Comments
 (0)