File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,6 +134,14 @@ export function computeTowers(
134134 ? `TODAY: ${ day . date } : ${ day . contributionCount } contributions`
135135 : `${ day . date } : ${ day . contributionCount } contributions` ;
136136
137+ // Isometric projection: Maps 2D grid coordinates (i, j) to a 3D isometric screen space.
138+ // - Origin: (300, 120) anchors the grid layout on the SVG canvas.
139+ // - Indices: 'i' represents the week/column index; 'j' represents the day/row index.
140+ // - Geometry:
141+ // * (i - j) * 16 handles the horizontal shift. Increasing 'i' moves right; increasing 'j' moves left.
142+ // * (i + j) * 9 handles the vertical depth. Both indices move the tile downward.
143+ // - Constants: 16 and 9 represent half-widths and half-heights of the diamond tiles,
144+ // maintaining a clean ~2:1 aspect ratio for isometric perspective.
137145 towers . push ( {
138146 x : 300 + ( i - j ) * 16 ,
139147 y : 120 + ( i + j ) * 9 ,
You can’t perform that action at this time.
0 commit comments