Scratch-vm: Add "stretch" graphic effect

Created on 8 Oct 2016  路  19Comments  路  Source: LLK/scratch-vm

This would be really easy to implement cause it would just be changing the scale when rendering and adding a few blocks. (For Example Of Base Code See #261)

Mockup

capture

capture2

feature request

Most helpful comment

I noticed that to be able to implement stretch blocks using this method was actually quite easy as all the work required is already done in scratch-render. So here is a branch with working 'scalex & scaley' blocks.

https://github.com/griffpatch/scratch-vm/tree/stretch

Running from this branch, try loading project: #185360912

I implemented a scalex & scaley graphics effect using the existing scale array that is used for flipping non rotating left right sprites. The functionality maintains the ability to use left right flipping sprites also and will still maintain their scalex & y proportions.

With these blocks we can now have rotating sprites that can face both ways without an extra costume, plus we can 'squish' and 'squeeze' sprites too :) - I guess we'd want to place a bound on the min / max size as we do with the 'size' block?

Anyhow, as you can see, it's a pretty simply change. All that needs doing to is to add the effect types to the effect block drop down?

Any thoughts? I didn't create a PR as this was only a feature request in the backlog and not flagged as urgent or necessarily even going to be considered. However, here it is :)

Griffpatch

All 19 comments

Should I make A PR on scratch-blocks that adds the blocks?

@TheBrokenRail We can't take any PRs that add new feature-related blocks at this time without significant design discussion first.

Any Discussion or updates about design and stuff?

I added a mockup!

Comments, Questions, Design Questions, What do you think of my mockup (really just a fork of scratch-blocks)?

Any Comments?

Does it stretch the whole x or the whole y up and down or just the top of the image or the bottom of the image... If that makes sense?

Also, I think the mockup looks great and is understandable but could it be considered a motion block?

The Whole Axis Stretches and I don't think it would be a motion block because it doesn't change position or rotation and it is a cosmetic effect

@tmickel

You could even consider this an effects block named squeeze that multiplies the width. 100% being normal relative to current size, 50% being half width and 100% height still. The only reason for doing it like this is to try to reduce the number of new scratch blocks ;). You still want it to apply 'before' the rotation.

Maybe that's a silly idea... You wouldn't want the width to be reset when doing a reset all effects?

It actually is not that bad, it would make things simpler to understand for new scratchers and you would think logically if a reset all effects block was used the sprite would return to normal and instead of stretch x/y reporters you could add graphics effects reporters which could be useful for other effects as well.


From: griffpatch notifications@github.com
Sent: Saturday, January 14, 2017 7:39 AM
To: LLK/scratch-vm
Cc: TheBrokenRail; Mention
Subject: Re: [LLK/scratch-vm] [Feature Request] Stretch Blocks (#249)

Maybe that's a silly idea... You wouldn't want the width to be reset when doing a reset all effects?

-
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/LLK/scratch-vm/issues/249#issuecomment-272631683, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQqzII3Vhqs530LqcfF9QeGIq8k-kA0sks5rSOw3gaJpZM4KR0tw.

Concept 2

capture

I noticed that to be able to implement stretch blocks using this method was actually quite easy as all the work required is already done in scratch-render. So here is a branch with working 'scalex & scaley' blocks.

https://github.com/griffpatch/scratch-vm/tree/stretch

Running from this branch, try loading project: #185360912

I implemented a scalex & scaley graphics effect using the existing scale array that is used for flipping non rotating left right sprites. The functionality maintains the ability to use left right flipping sprites also and will still maintain their scalex & y proportions.

With these blocks we can now have rotating sprites that can face both ways without an extra costume, plus we can 'squish' and 'squeeze' sprites too :) - I guess we'd want to place a bound on the min / max size as we do with the 'size' block?

Anyhow, as you can see, it's a pretty simply change. All that needs doing to is to add the effect types to the effect block drop down?

Any thoughts? I didn't create a PR as this was only a feature request in the backlog and not flagged as urgent or necessarily even going to be considered. However, here it is :)

Griffpatch

Any Updates?

Any News?

@TheBrokenRail We'll evaluate this and many other feature requests over the coming months. Please do not bump old requests.

Was this page helpful?
0 / 5 - 0 ratings