|
1 | 1 | import { cn } from '@sim/emcn' |
2 | 2 | import { |
| 3 | + createIsoLineProps, |
3 | 4 | ISO_FILL_HIGH, |
4 | 5 | ISO_FILL_LOW, |
5 | 6 | ISO_FILL_MID, |
6 | 7 | ISO_FILL_PULSE_LOW, |
7 | 8 | ISO_STROKE as ISO_STROKE_BASE, |
8 | | -} from '@/app/(landing)/components/mothership/components/iso-marks/iso-illustration-style' |
| 9 | +} from '@/components/iso/iso-illustration-style' |
9 | 10 |
|
10 | 11 | const COS_30 = Math.cos(Math.PI / 6) |
11 | 12 |
|
@@ -70,7 +71,10 @@ const SLABS: Box[] = [0, 90, 180].map((offset) => ({ |
70 | 71 | const ISO_STROKE = `color-mix(in srgb, ${ISO_STROKE_BASE} 55%, var(--border-1))` |
71 | 72 | /** Darker than any outer face — the bore's wall turns away from the light. */ |
72 | 73 | const ISO_FILL_BORE = ISO_FILL_PULSE_LOW |
73 | | -const ISO_LINE_STROKE_WIDTH = 1.9 |
| 74 | +const KNOWLEDGE_STROKE_WIDTH = 1.9 |
| 75 | + |
| 76 | +/** Matches the other three resource graphics, so the set centres as one collection. */ |
| 77 | +const MARK_HEIGHT = 148 |
74 | 78 |
|
75 | 79 | /** |
76 | 80 | * Maps flat artwork into the plane of the front volume's cover. |
@@ -140,13 +144,12 @@ const VIEW_BOX = `${MIN_X.toFixed(2)} ${MIN_Y.toFixed(2)} ${(MAX_X - MIN_X).toFi |
140 | 144 | const STACK_FADE = |
141 | 145 | '[-webkit-mask-image:linear-gradient(to_right,#000_56%,transparent_100%),linear-gradient(to_bottom,transparent_0%,#000_40%)] [mask-image:linear-gradient(to_right,#000_56%,transparent_100%),linear-gradient(to_bottom,transparent_0%,#000_40%)] [-webkit-mask-composite:source-in] [mask-composite:intersect]' |
142 | 146 |
|
143 | | -const LINE_PROPS = { |
144 | | - fill: 'none' as const, |
145 | | - stroke: ISO_STROKE, |
146 | | - strokeWidth: ISO_LINE_STROKE_WIDTH, |
147 | | - strokeLinecap: 'round' as const, |
148 | | - strokeLinejoin: 'round' as const, |
149 | | -} |
| 147 | +/** Shared iso contour recipe at this mark's own weight; spread onto both paths and circles. */ |
| 148 | +const LINE_PROPS = createIsoLineProps<SVGPathElement & SVGCircleElement>( |
| 149 | + undefined, |
| 150 | + ISO_STROKE, |
| 151 | + KNOWLEDGE_STROKE_WIDTH |
| 152 | +) |
150 | 153 |
|
151 | 154 | /** |
152 | 155 | * Down the hole: the near mouth is floored with the wall tone, then the far mouth |
@@ -178,24 +181,20 @@ function BoreInterior() { |
178 | 181 | ) |
179 | 182 | } |
180 | 183 |
|
181 | | -interface KnowledgeIsoMarkProps { |
182 | | - height?: number |
183 | | -} |
184 | | - |
185 | 184 | /** |
186 | 185 | * Isometric knowledge-base mark on the landing page's iso-illustration recipe. |
187 | 186 | * |
188 | 187 | * Geometry is authored in a large unit space so the shared stroke constant lands |
189 | 188 | * as a hairline once the mark is scaled to empty-state size — as it does on the |
190 | 189 | * landing marks, which draw 3.2 into a ~526-unit viewBox. |
191 | 190 | */ |
192 | | -export function KnowledgeIsoMark({ height = 148 }: KnowledgeIsoMarkProps) { |
193 | | - const width = height * ((MAX_X - MIN_X) / (MAX_Y - MIN_Y)) |
| 191 | +export function KnowledgeIsoMark() { |
| 192 | + const width = MARK_HEIGHT * ((MAX_X - MIN_X) / (MAX_Y - MIN_Y)) |
194 | 193 | return ( |
195 | 194 | <svg |
196 | 195 | viewBox={VIEW_BOX} |
197 | 196 | width={width} |
198 | | - height={height} |
| 197 | + height={MARK_HEIGHT} |
199 | 198 | fill='none' |
200 | 199 | aria-hidden='true' |
201 | 200 | focusable='false' |
|
0 commit comments