Skip to content

Commit e6129d5

Browse files
Add documentation comment to getPixelData function
1 parent 5742a6e commit e6129d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

js/blocks/SensorsBlocks.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,10 @@ function setupSensorsBlocks(activity) {
732732
* @returns {Uint8ClampedArray} - The RGBA values of the pixel.
733733
* @throws {Error} - If the canvas context is unavailable.
734734
*/
735+
/**
736+
* Gets pixel color data from the main drawing canvas at specified coordinates.
737+
* Currently only works with turtle-drawn content on overlayCanvas.
738+
*/
735739
getPixelData(x, y) {
736740
const canvas = docById("overlayCanvas");
737741
const ctx = canvas?.getContext("2d");

0 commit comments

Comments
 (0)