Refactor: Implement SmartCube renderer, improve UI styling, and fix gaps

This commit is contained in:
2026-02-22 04:35:59 +00:00
parent 57abfd6b80
commit b5ddc21662
4168 changed files with 763782 additions and 1008 deletions

43
node_modules/matrix-js/lib/generate.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
'use strict';
function generate(val) {
return {
size: (row, col) => size(val, row, col),
diag: (row, col) => diag(val, row, col)
}
}
function size(val, row, col) {
if (!col) {
col = row;
}
let rows = [];
for (let i = 0; i < row; i++) {
let cols = [];
for (let j = 0; j < col; j++) {
cols[j] = val || Math.random();
}
rows[i] = cols;
}
return rows;
}
function diag(val, row, col) {
if (!col) {
col = row;
}
let rows = [];
for (let i = 0; i < row; i++) {
let cols = [];
for (let j = 0; j < col; j++) {
cols[j] = 0;
}
rows[i] = cols;
if (i < col || row == col) {
rows[i][i] = val || Math.random();
}
}
return rows;
}
module.exports = generate;