scratchfoundation / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
BSD 3-Clause "New" or "Revised" License
4.46k stars 3.55k forks source link

Touching Color fuzzy matches in Scratch 2 but not 3 #423

Open orrbernstein opened 7 years ago

orrbernstein commented 7 years ago

Expected Behavior

In Scratch 2, a touching_color block evaluates to true if the color is similar but not identical. Presumably many projects rely on this. https://scratch.mit.edu/projects/164721610/

Actual Behavior

In Scratch 3, the touching_color block evaluates to true iff the color is identical. https://llk.github.io/scratch-gui/#164721610

Steps to Reproduce

The sample project above has two touching-color blocks - one for each of a similar color and an exact color match. In the Scratch 3 UI, you'll need to make both variables visible. Then hit the green flag to see the difference of behavior between Scratch 2 and Scratch 3.

Operating System and Browser

ChromeOS, 58.0.3029.140

Clark-E commented 6 years ago

I found a great post on the form explaining the fuzzy touching in-depth:

https://scratch.mit.edu/discuss/post/3034250/

So, basically, we have to do bitwise operations in order to do fuzzy touching of colors.

Also, I think this is an issue for scratch-vm.