"use client"; /** * InsolationCard — lower-grid «Инсоляционная матрица» preview card. Renders a * LIVE compact autorotating 3D massing model (a hands-off mini version of the * «Открыть 3D» drawer) instead of the old abstract SVG cube, fed by the REAL * parcel area (geometry) + НСПД КСИТ (max_far). «Открыть 3D» opens the * insolation drawer (3D massing + shadow module). */ import styles from "@/app/site-finder/analysis/[cad]/ptica/ptica.module.css"; import type { ParcelAnalysis } from "@/types/site-finder"; import { coerceFloat } from "@/components/site-finder/analysis/nspd-regulation"; import { parcelAreaM2 } from "@/components/site-finder/ptica/ptica-adapt"; import { MassingViewer } from "@/components/site-finder/ptica/massing/MassingViewer"; import type { DrawerKey } from "@/components/site-finder/ptica/drawers/drawer-keys"; interface Props { analysis: ParcelAnalysis; onOpenDrawer: (key: DrawerKey) => void; } export function InsolationCard({ analysis, onOpenDrawer }: Props) { const areaM2 = parcelAreaM2(analysis) ?? undefined; // max_far arrives as a string on the wire — coerce before passing to the 3D viewer. const maxFar = coerceFloat(analysis.nspd_zoning?.max_far) ?? undefined; const farIsReal = maxFar != null; return (
Тени по времени суток — в 3D-модуле массы застройки.