Skip to content

Instantly share code, notes, and snippets.

@munshkr
Last active December 29, 2022 20:20
Show Gist options
  • Save munshkr/a4c280240bfd07a9819c1218d3952571 to your computer and use it in GitHub Desktop.
Save munshkr/a4c280240bfd07a9819c1218d3952571 to your computer and use it in GitHub Desktop.
an example using an attached image as source #hydra
var img = document.createElement('img');
img.crossOrigin = "anonymous";
img.src = 'https://pbs.twimg.com/media/EAbCHCoXYAAsLwO?format=jpg&name=large';
img.onload = function() {
// use dynamic: true for videos
s0.init({ src: img, dynamic: false });
src(s0)
.scrollX(0, 0.01)
.kaleid([2,3,4,5,6].fast(2))
.out();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment