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.48k stars 3.59k forks source link

Add eraser to the pen tool #5406

Open fsih opened 4 years ago

fsih commented 4 years ago

Be able to change the pen color to eraser

Since you can stamp the stage, this would allow you to implement your own scene transitions like wipes and dissolves between backdrops

fsih commented 4 years ago

/cc @cwillisf (his idea)

adroitwhiz commented 4 years ago

I imagine the most intuitive way to surface this feature (which may be what he had in mind) would be something like this: image

I can think of a few things that should be ironed out if that approach is used:

I can think of a couple alternative APIs but they seem clunkier to me: image image

One advantage of the "pen mode" block would be that it could also include stamping as part of "erase mode" as well, which would allow users to "stamp" costume-shaped holes in the pen layer.

Overall, this feature could prove to be quite powerful--there is currently no way to mask out sprites, and doing so would be quite helpful for a variety of graphics applications. I'd love to see this implemented!

griffpatch commented 4 years ago

I've been after a feature like this for some time :) I also get asked how to do it in Scratch a lot... to which I always say that sadly it is not possible. Would give this a big thumbs up

On Mon, 3 Feb 2020 at 12:12, adroitwhiz notifications@github.com wrote:

I imagine the most intuitive way to surface this feature (which may be what he had in mind) would be something like this: [image: image] https://user-images.githubusercontent.com/25993062/73650816-0ba6d680-4651-11ea-9bd1-71e5c0577061.png

I can think of a few things that should be ironed out if that approach is used:

  • Since "eraser" doesn't make sense in other color inputs (e.g. the input to "touching color"), there will need to be two different color input types: "nullable color" and "non-nullable color" (or possibly pass a "nullable" property to the color input--I haven't checked whether you can do that with scratch-blocks).
  • Within the pen extension, will the pen color be stored as "color or null", or will an "eraser mode" flag be added to the pen state so the color always persists during "eraser mode"?
    • What happens if you call "change pen color/saturation/brightness/transparency" when the pen is in an "eraser" state? (If color persists during "eraser mode", I would lean towards changing it)
    • If you set the pen color to "eraser", is there any way to exit it via the "set pen color/saturation/brightness/transparency" block, or do you need to call "set pen color to [color input]" again?

I can think of a couple alternative APIs but they seem clunkier to me: [image: image] https://user-images.githubusercontent.com/25993062/73652194-5118d300-4654-11ea-80ae-517179238449.png [image: image] https://user-images.githubusercontent.com/25993062/73651952-97216700-4653-11ea-93c9-9a4ad57b4994.png

One advantage of the "pen mode" block would be that it allows for stamping to work in "erase mode" as well, which would allow users to "stamp" costume-shaped holes in the pen layer.

Overall, this feature could prove to be quite powerful--there is currently no way to mask out sprites, and doing so would be quite helpful for a variety of graphics applications. I'd love to see this implemented!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LLK/scratch-gui/issues/5406?email_source=notifications&email_token=ABTM3PRQ7DAHA5BQEY66UZDRBACZDA5CNFSM4KN3PX42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKTTWDQ#issuecomment-581384974, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTM3PTZCZ2NAS7GUWW5QJTRBACZDANCNFSM4KN3PX4Q .