tank movement (without collision)

This commit is contained in:
Vinzenz Schroeter 2024-04-07 17:17:11 +02:00
commit 54b840da3e

View file

@ -20,8 +20,6 @@ function drawPixelsToCanvas(pixels: Uint8Array, canvas: HTMLCanvasElement) {
const imageData = drawContext.getImageData(0, 0, canvas.width, canvas.height, {colorSpace: 'srgb'});
const data = imageData.data;
console.log('draw', {width: canvas.width, height: canvas.height, dataLength: data.byteLength});
for (let y = 0; y < canvas.height; y++) {
const rowStartPixelIndex = y * pixelsPerRow;
for (let x = 0; x < canvas.width; x++) {