-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pen Colors repeat each 101 numbers rather than each 100 numbers #2273
Comments
I checked out Scratch-Minion's project ( https://scratch.mit.edu/projects/327014325 ) and verified this. If you continuously increment pen color by 101, it's always red. If you use 100, the color cycles through the rainbow. |
The current 3.0 behavior also appears to be inconsistent with Scratch 2.0. Note that from 2.0 to 3.0, we changed the pen color range size from 200 to 100; still, you can see that continually incrementing by 200 used to keep the color red: So in 2.0, the period size for pen colors to cycle back to equivalent values was 200 -- not 201. But currently in 3.0, the period size is 101. Seems like we should change 3.0 to use a period size of 100. |
Looking into Its current code is:
I think that's more understandable by rewriting it like this: (note I'm not proposing this change, just understanding it)
I think this is built around the assumption that if you kept incrementing n by 1, you'd want E.g.: If you're using If you're using And if you're using Whereas if we instead did this:
...then: If you're using If you're using And if you're using |
One more thing: I see a similar effect with the legacy block 'set pen color to (number)' - which should only exist in projects that were migrated from Scratch 2.0 to 3.0, not in new Scratch 3.0 projects. Colors cycle at a period of 202 instead of 200. |
Expected Behavior
Pen colors 0, 100, 200, 300 ... should all be red.
Actual Behavior
Instead, pen colors 0, 101, 202, 303 ... are red.
Full explanation (by Scratch-Minion) can be found in the Scratch forum:
https://scratch.mit.edu/discuss/topic/369220/
Steps to Reproduce
Draw a line with a pen color of 5000. Notice it is not red.
Demonstrated in this project (by Scratch-Minion):
https://scratch.mit.edu/projects/327014325
Operating System and Browser
Windows NT 10.0, Chrome 76.0.3809.132
The text was updated successfully, but these errors were encountered: