Try adding "stretch x" and "stretch y" options to the "size" blocks
See original GitHub issueFollowing up on the great work in https://github.com/LLK/scratch-vm/issues/249 on designing and prototyping an effect that scales a sprite on each axis, @carljbowman and I have a new proposal:
It could fit nicely as menu options in the “set size” and “change size” blocks.
This is a better fit than applying it as a graphic effect. Stretching is closely related to size, and it naturally defaults to 100 (for no change), much like size (while graphic effects default to 0 for no effect).
So the proposed blocks would be:
[ Change [size / stretch x / stretch y] by [10] ]
[ Set [size / stretch x / stretch y] to [100] % ]
Issue Analytics
- State:
- Created 6 years ago
- Reactions:11
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Have You Tried: Create a Stretchable Dynamic Block
On the Block Authoring palette, click Actions tab > Stretch. Follow the prompts on the command line: Select parameter: Select the Distance1 ...
Read more >Autocad Tutorial Dynamic Block Stretch In Two Direction
Learn Autodesk Autocad tutorial dynamic block with stretch in two direction by using linear parameter and stretch action, check it out!
Read more >why is the stretch block never coming back? - Discuss Scratch
There is an open GitHub issue “ Try adding “stretch x” and “stretch y” options to the “size” blocks #982” https://github.com/LLK/scratch-vm/ ...
Read more >block-size - CSS: Cascading Style Sheets - MDN Web Docs
A related property is inline-size , which defines the other dimension of the element. Try it. CSS Demo: block-size. Reset. block- ...
Read more >Stretch and scale a CSS image in the background
CSS3 has a nice little attribute called background-size:cover . This scales the image so that the background area is completely covered by the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve wondered in the past if an alternative to “stretch” might be some kind of “aspect ratio” block? – That would avoid confusion that could come about when stretching in both X & Y, as well as its ‘operational overlap’ with the “size” block.
It would also avoid potential confusion over use of “X” and “Y” (i.e. in “stretch X” and “stretch Y”) when a sprite is rotated such that its (original) X axis is no longer coincident with the X axis on screen (I’m assuming that stretching operations would be applied to the costume before rotation…)
What if each corner (of the rectangular field the image occupies) could be independently modeled? This would probably fit better as an extension, but would allow you to do some really color stuff.