MagicSketch / MagicMirror

The Sketch 3 Plugin for Perspective Transformation for Artboards
http://magicmirror.design
490 stars 39 forks source link

Don't maintain proportions #10

Open jarisanders opened 9 years ago

jarisanders commented 9 years ago

Thank you so much for the plugin, it's worth every penny! I'm currently working on a project where I'm re-using 1 single image on a bunch of other places at different sizes. There's one thing that would make this even better for me, which is being able to switch between the 'perspective mode' and a new 'regular mirror' mode which does nothing more than use the source artboard as a fill layer and behaves exactly the same as any other rectangle layer with an image but without the hassle of having to choose an image. I hope I'm making any sense.

Currently the mirror adjusts the proportions which is perfect when using it for 3D presentations etc. but sometimes the only thing you need is to update a layer's fill image without touching the proportions.

screen shot 2015-08-23 at 1 29 00 pm

Artboard on top is source. Layer bottom left is the result the plugin currently creates. Layer on bottom right is the result I'm looking for.

jamztang commented 9 years ago

@jarisanders I find that to be useful as well. So just to gain a bit more insight, what would be the preferred way for you to specify the "mode"?

jarisanders commented 9 years ago

I've been thinking about that as well, I think one of the most efficient ways would be by adding a specific character to the name of the layer. So the artboard name would be 'sketch' the layer name with regular mode 'sketch' but the version with "non-perspective scaling" would be something like 'sketch*'.

Running a different plugin would not work because I don't want all the mirrored layers to behave in the same way.

jamztang commented 9 years ago

I am thinking something pretty similar. In iOS development there's a UIViewContentMode property to the views:

enum UIViewContentMode : Int {
    case ScaleToFill
    case ScaleAspectFit
    case ScaleAspectFill
    case Redraw
    case Center
    case Top
    case Bottom
    case Left
    case Right
    case TopLeft
    case TopRight
    case BottomLeft
    case BottomRight
}

how about we mark the views like this: layer .aspectfill or layer .center

jarisanders commented 9 years ago

Genius, sounds perfect to me! This way it would be really easy to switch quickly between the different types. Would save me a load of time :+1:

jamztang commented 9 years ago

Awesome discussion, let me add into the road map!