Answer the question
In order to leave comments, you need to log in
Is there some kind of gulp plugin for retinizing images?
Is there any plugin for retinizing images (to create an image with double and triple magnification and adding suffixes)? I just found gulp-responsive , but as far as I understand, you need to set the names of all images there, and then there will be "magic". Is it possible somehow so that it itself creates all the images from the img folder in the size of x2 and x3 and with the suffixes @x2 and @x3?
Answer the question
In order to leave comments, you need to log in
Because the first IF is triggered and that's it, else if means that you need to fulfill the condition if the previous one was fulfilled with false, so the first one was executed, and the last one remained so))
if (pressKey.keyCode == 38)
{
//для этого условия код выполните в одном месте, тут можно проверить есть в аттрибуте style и т.д.
}
else if(pressKey.keyCode == 40)
{
}
Third branch
else if (pressKey.keyCode == 38 && me.attr('style') == 'transform: rotate(-180deg) scale(1, 1)') { // При нажатии клавиши вверх и соответствии стиля
me.animate({rotate : '360deg'}, 500);
}
pressKey.keyCode == 38
) contains a milder condition than the third one. Those. in all cases when the third branch could be executed, the first one is executed, because it is checked before. if (pressKey.keyCode == 38) { // При нажатии клавиши вверх
if (me.attr('style') == 'transform: rotate(-180deg) scale(1, 1)') { // При нажатии клавиши вверх и соответствии стиля
me.animate({rotate : '360deg'}, 500);
} else {
me.attr('src', 'deep_space/me_up.png');
}
}
else if (pressKey.keyCode == 40) { // При нажатии клавиши вниз
me.animate({rotate : '-180deg'}, 500);
me.attr('src', 'deep_space/me_up.png');
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question