MonashAlexandria / snapapps

a visual programming language inspired by Scratch
http://snap.berkeley.edu
2 stars 5 forks source link

Cellular HTML5: images get fuzzy when growing or shrinking #66

Closed mciotola closed 9 years ago

mciotola commented 9 years ago

Cellular HTML5:

Images get fuzzy when growing or shrinking (see tool bar).

cellular_html5_grow-shrink-tools

I can live with this, but I have a hunch Bernd will object. For instance, this original palm:

palmtree2

becomes the following (large, small, individual large). Perhaps there is an anti-aliasing setting that can be changed? screen shot 2015-05-18 at 8 49 43 pm cellular_html5_fuzzy_enlargedtrees

cellular_html5_fuzzy_reduced_trees

Craxic commented 9 years ago

Hi Mark,

This is the functionality of the grow and shrink buttons. It simply scales the image up or down by a small percentage each time the button is pressed. You can expect the image to become very blurry.

Please use the set scale block if possible.

Matt.

aidanlane commented 9 years ago

Yep, that makes sense from an image editing experience.

The desktop version had a 'resize this sprite' on the agent's context menu. Does the web version have an analogue?

mciotola commented 9 years ago

I think part of the problem is that I have to click the shrink button in the HTML5 version about 25 times to get the same reduction as clicking it roughly about 5 times in the desktop version. So in the HTML5 version, the image will be about 5 times fuzzier than in the desktop version.

Matt, I will try the set scale block tomorrow.

mciotola commented 9 years ago

Matt,

Where do I find the "Set Scale" block? That would be very useful, say, if I could automatically resize a costume to fit in a single cell, or a single cell vertically, etc.

I did find the "set size to __%" is that what you meant? Although it does not seem to resize with reference to cell size, it does seem to preserve image crispness, which is also very helpful. cellular_html5

Craxic commented 9 years ago

Hi Mark,

You'll need to use the set size block to set the size of all of the sprites. Images are resized relative to their original image size, 100% being 1:1.

Note that if you adjust the number of cells showing on the stage, the sprites will resize themselves appropriately.

I will see what I can do about creating a block to scale the sprite to cell size.

Matt.

Craxic commented 9 years ago

Hey Mark,

I've added a new block called "scale to cell size" under "looks" in commit b312dbc.

Thanks, Matt.

mciotola commented 9 years ago

Thanks! I'll try it out.

On Tue, Jun 23, 2015 at 11:54 PM, Craxic notifications@github.com wrote:

Hey Mark,

I've added a new block called "scale to cell size" under "looks" in commit 83866f0 https://github.com/aidanlane/snapapps/commit/83866f0e8754827e5fc3fd004c35261f980459e1 .

Thanks, Matt.

— Reply to this email directly or view it on GitHub https://github.com/aidanlane/snapapps/issues/66#issuecomment-114752150.

Craxic commented 9 years ago

Hey Mark,

If you want me to make some more blocks for you (I think that's what you wanted to talk about right?), just add an issue and I'll get to it.

Matt.