From e6129d5fba274b6fb724b2255fddf6d6da87d77a Mon Sep 17 00:00:00 2001 From: Aditya kumar <134756409+Adityacode-hub@users.noreply.github.com> Date: Thu, 30 Oct 2025 04:54:38 +0000 Subject: [PATCH] Add documentation comment to getPixelData function --- js/blocks/SensorsBlocks.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/blocks/SensorsBlocks.js b/js/blocks/SensorsBlocks.js index b24b174849..9fbadc0a84 100644 --- a/js/blocks/SensorsBlocks.js +++ b/js/blocks/SensorsBlocks.js @@ -732,6 +732,10 @@ function setupSensorsBlocks(activity) { * @returns {Uint8ClampedArray} - The RGBA values of the pixel. * @throws {Error} - If the canvas context is unavailable. */ + /** + * Gets pixel color data from the main drawing canvas at specified coordinates. + * Currently only works with turtle-drawn content on overlayCanvas. + */ getPixelData(x, y) { const canvas = docById("overlayCanvas"); const ctx = canvas?.getContext("2d");