Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shans/ff599f930aa04932175a52895ff3fae9 to your computer and use it in GitHub Desktop.
Save shans/ff599f930aa04932175a52895ff3fae9 to your computer and use it in GitHub Desktop.
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