MCPcopy Create free account
hub / github.com/TheCSir/TerminalStart / createColumn

Function createColumn

src/utils/matrixUtils.ts:19–32  ·  view source on GitHub ↗
(rows: number, trailMultiplier: number)

Source from the content-addressed store, hash-verified

17 * @param trailMultiplier Multiplier for trail length based on fade setting
18 */
19export function createColumn(rows: number, trailMultiplier: number): MatrixColumn {
20 const cells: MatrixCell[] = [];
21 for (let r = 0; r < rows; r++) {
22 cells.push({ val: ' ', isHead: false });
23 }
24
25 return {
26 cells,
27 head: 0,
28 spaceRemaining: Math.floor(Math.random() * rows) + 1,
29 lengthRemaining: Math.floor((Math.random() * (rows - 3) + 3) * trailMultiplier),
30 updateSpeed: Math.floor(Math.random() * 3) + 1
31 };
32}
33
34/**
35 * Updates a MatrixColumn by shifting (moving head) and inserting new characters.

Callers 2

initMatrixFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected