mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 03:51:45 +00:00
bugfix: implementation details
This commit is contained in:
parent
6fe5690a6b
commit
84fb7963d8
@ -105,7 +105,7 @@
|
|||||||
|
|
||||||
// Clear simulated matrix
|
// Clear simulated matrix
|
||||||
function clearMatrix() {
|
function clearMatrix() {
|
||||||
matrix.grid?.forEach((y) => y.forEach((x) => (x.color = '000000')));
|
matrix?.grid?.forEach((y) => y.forEach((x) => (x.color = '000000')));
|
||||||
}
|
}
|
||||||
|
|
||||||
function colorSelect(formData: FormData) {
|
function colorSelect(formData: FormData) {
|
||||||
@ -189,7 +189,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// System variables
|
// System variables
|
||||||
let scaleBind = 3;
|
let scaleBind = 4;
|
||||||
let mousePressed = false;
|
let mousePressed = false;
|
||||||
let gamepad: Gamepad | null = null;
|
let gamepad: Gamepad | null = null;
|
||||||
let matrix: Matrix;
|
let matrix: Matrix;
|
||||||
@ -226,8 +226,9 @@
|
|||||||
|
|
||||||
matrix = initializeMatrix();
|
matrix = initializeMatrix();
|
||||||
matrix.scale = {
|
matrix.scale = {
|
||||||
factor: 3,
|
factor: 4,
|
||||||
padding: 0.1875 * (192 / width) * 3
|
// 0.1875 (made up padding) * 192 (height when it was made up) * 4 (scaling when it was made up)
|
||||||
|
padding: 144 / matrix.width
|
||||||
};
|
};
|
||||||
matrix.grid = createGridArray(matrix);
|
matrix.grid = createGridArray(matrix);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user