Forked from bfgeek/gist:bbf98f6d45b4e17a4df558eb9f061be6
Last active
September 7, 2016 21:38
-
-
Save shans/ff599f930aa04932175a52895ff3fae9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
registerAnimator('throwaway-name', class { | |
static elements = { | |
scroller: { | |
isRoot: true; | |
scrollInput: true; | |
name: 'foo-scroller'; | |
}, | |
parallax: { | |
outputProperties: ['transform'] | |
name: 'foo-parallax'; | |
} | |
} | |
}); | |
.scroller { | |
animator: foo-scroller; | |
} | |
.child { | |
animator: foo-parallax; | |
} | |
<body> | |
<div class="scroller"> <!-- first instance for this subtree. --> | |
<div class="child"></div> | |
</div> | |
<div class="scroller"> <!-- second instance for this subtree. --> | |
<div class="child"></div> | |
</div> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment