feat: colorize Directional Processing Gabor patches with 6 color families#114
Conversation
acrosman
left a comment
There was a problem hiding this comment.
Fix noted linting errors. Make sure not to add new ones during the next set of changes.
The feedback color flashes are too short, they need to be more distinct between rounds. They also need to be red (correct) or green (failure).
Add another two colors to the collection, yellow and teal.
Done in 527b3d4:
Note: automated review flagged the red-for-correct / green-for-failure convention as non-standard UX — flagging it here in case you'd like to reconsider, but the code reflects your explicit request. |
acrosman
left a comment
There was a problem hiding this comment.
In addition to the inline note, we also need to change the flash behavior a bit more.
After the feedback flash, switch the current color family background color and add a very short pause (let's try 1/10th of second).
|
|
||
| /** Duration (ms) of the green/red flash overlay on the canvas stage. */ | ||
| const FEEDBACK_FLASH_MS = 250; | ||
| const FEEDBACK_FLASH_MS = 600; |
|
@copilot complete the work described in this message. |
Done in the latest commit:
|
The Directional Processing game used greyscale Gabor patches. This replaces them with 6 colorful families (Blue, Purple, Orange, Grey, Yellow, Teal), randomly selected at game start and switched after every trial's feedback flash. The mask color tracks the midpoint of the active family to avoid perceptual pop-out on transitions.
gabor.jsCOLOR_FAMILIES— 6 high-contrast endpoint pairs: Blue(0,30,130)→(130,210,255), Purple(60,0,130)→(220,130,255), Orange(130,40,0)→(255,200,70), Grey(20,20,20)→(235,235,235), Yellow(70,40,0)→(255,240,100), Teal(0,55,60)→(80,230,220)pickColorFamily()— returns a random entry fromCOLOR_FAMILIEScomputeGaborPixels— newcolorFamilyoption; when set, interpolates each pixel between the family's dark/bright endpoints instead of black→white. Greyscale path preserved whencolorFamilyisnulldrawMask— new optionalcolorFamilyparam; fills with the family's RGB midpoint to match the Gabor DC levelindex.js_colorFamilymodule-level state, initialized viapickColorFamily()onstart(), cleared onreset()colorFamilyforwarded to bothdrawGaboranddrawMaskFEEDBACK_FLASH_MS= 250 ms)drawMask, and a 100 ms pause (POST_FLASH_PAUSE_MS) is held before the next trial begins — giving a clear visual break between rounds