Is it possible to upload an entire HTML/CSS code project on this site for review, rather than just a small code snippet?
I'm currently working on a r/place clone and while my code works fine, it would be interesting to see if someone has better approaches or coding methods to potentially improve it.
Alternatively, is there another platform where I can share a whole project and receive feedback?
Or is it possible to connect with someone privately to discuss about it further?
Code example:
function drawInitialCanvas(canvasData) {
const imageData = new ImageData(newCanvasWidth, newCanvasHeight);
const data = new Uint8ClampedArray(imageData.data.buffer);
for (let y = 0; y < newCanvasHeight; y++) {
for (let x = 0; x < newCanvasWidth; x++) {
const colorObj = canvasData[y][x]; // Zugriff auf das Objekt bei [y][x]
const color = colorObj.color; // Zugriff auf die Farbeigenschaft des Objekts
const rgbValues = color.match(/\d+/g);
const index = (y * newCanvasWidth + x) * 4;
data[index] = parseInt(rgbValues[0]);
data[index + 1] = parseInt(rgbValues[1]);
data[index + 2] = parseInt(rgbValues[2]);
data[index + 3] = 255; // Alpha (255 bedeutet vollständig undurchsichtig)
}
}
newContext.putImageData(imageData, 0, 0);
context.drawImage(newCanvas, newCanvasX, newCanvasY);
hideLoadingOverlay();
}