Skip to content

Instantly share code, notes, and snippets.

@enjalot
Created April 24, 2013 22:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enjalot/5456242 to your computer and use it in GitHub Desktop.
Save enjalot/5456242 to your computer and use it in GitHub Desktop.
video o.O
{"description":"video o.O","endpoint":"","display":"div","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":true,"loop":true,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/3CIzBy0.png"}
tributary.loopType = "pingpong";
tributary.duration = 4000;
tributary.init = function(g) {
var video = "http://archive.org/download/electricsheep-flock-244-72500-1/00244%3D72501%3D72109%3D72111.mp4"
var vid = g.append("video")
.attr({
src: video
})
.style({
opacity: 0.5
}).node()
vid.loop = true
vid.playbackRate = Math.abs(1.8)
vid.play()
}
tributary.run = function(g,t) {
var vid = g.select("video").node()
var speed = 0.5 + t * 2;
vid.playbackRate = Math.abs(speed);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment