Skip to content

Instantly share code, notes, and snippets.

@bfgeek
Created September 7, 2016 21:14
Show Gist options
  • Save bfgeek/bbf98f6d45b4e17a4df558eb9f061be6 to your computer and use it in GitHub Desktop.
Save bfgeek/bbf98f6d45b4e17a4df558eb9f061be6 to your computer and use it in GitHub Desktop.
registerAnimator('foo', class {
static elements = {
scroller: {
isRoot: true;
scrollInput: true;
},
parallax: {
outputProperties: ['transform']
}
}
});
.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