question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Try adding "stretch x" and "stretch y" options to the "size" blocks

See original GitHub issue

Following 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:open
  • Created 6 years ago
  • Reactions:11
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
TheLogFathercommented, Apr 3, 2018

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…)

1reaction
ZenithRoguecommented, Mar 26, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found