Motivation
Currently, getPixelInformation always logs debug information to the console, for example:
getPixelInformation called 0
Array [ 490, 325 ]
Array(4) [ 490, 325, 490, 325 ]
adjusted displayPosition
Array [ 0, 0 ]
actorid 0
This can be noisy in production environments and makes it harder to debug other parts of the application. There is currently no way to disable these logs.
Detailed Description
Add a new verbose option to getPixelInformation that allows enabling or disabling console logging.
- When
verbose: true, the current debug logs are displayed (default behavior could be discussed).
- When
verbose: false, all internal console.log statements are suppressed.
Potential alternatives
- Remove the
console.log statements entirely.
- Replace them with a centralized debug/logger utility.
This option would improve usability in production contexts while still allowing detailed debugging when needed.