adding text

This commit is contained in:
dylan
2023-04-29 20:07:06 -07:00
parent 078b7806dd
commit 1781ae3bba
2 changed files with 292 additions and 10 deletions

View File

@ -115,8 +115,8 @@ const px = (x: number, y: number) => {
const palette: Array<[number, number, number, number]> = [
[0, 0, 0, 0],
[0, 0, 0, 1],
[1, 1, 1, 1],
[0, 0, 0, 1],
[1, 0, 0, 1],
[1, 1, 0, 1],
[0, 1, 0, 1],
@ -138,8 +138,10 @@ const allPixelColors = new Float32Array(
)
export const setPixelColor = (x: number, y: number, color: number) => {
const col = c(color);
allPixelColors.set(col, 4*6*(128*y+x));
if (color !== 0) {
const col = c(color);
allPixelColors.set(col, 4*6*(128*y+x));
}
}
export const setPixelsInRect = (x: number, y: number, w: number, pixels: Array<number>) => {