Created
May 15, 2016 21:28
-
-
Save awinogradov/ab25b04e4abd6149e0bb90806612c987 to your computer and use it in GitHub Desktop.
Protein Dynamics ease example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const goods = [ | |
{ title: 'Мопед', color: '#05668D' }, | |
{ title: 'Велик', color: '#028090' }, | |
{ title: 'Тачила', color: '#00A896' }, | |
{ title: 'Водокачка', color: '#02C39A' }, | |
{ title: 'Платье', color: '#F0F3BD' }, | |
{ title: 'Штора', color: '#AEF6C7' }, | |
{ title: 'Люстра', color: '#5B8266' }, | |
{ title: 'Пес', color: '#294936' } | |
]; | |
const origin = Screen.layer('Group'); | |
goods.forEach((good, i) => { | |
Screen.layer('title').text(good.title); | |
Screen.layer('image').style({ fill: good.color }); | |
let newGood = origin.clone(); | |
newGood.attr({ | |
transform: `translate(10 ${i * 120})`, | |
filter: svg.filter( | |
Snap.filter.shadow(2, 2, 4, 'rgba(0, 0, 0, 0.3)') | |
) | |
}); | |
newGood.click(() => { Screen.goTo('About'); }); | |
origin.after(newGood); | |
}); | |
origin.remove(); | |
origin.remove() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment