Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions js/blocks/SensorsBlocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down