Skip to content

Instantly share code, notes, and snippets.

@enjalot
Last active August 29, 2015 14:24
Show Gist options
  • Save enjalot/39d6b1d06df0979915c2 to your computer and use it in GitHub Desktop.
Save enjalot/39d6b1d06df0979915c2 to your computer and use it in GitHub Desktop.
streetview carosel
{"description":"streetview carosel","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":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"ajax-caching":true,"thumbnail":"http://i.imgur.com/9dPGvG7.png"}
var width = 640;
var height = 640;
var url = "https://maps.googleapis.com/maps/api/streetview?location=37.80390,-122.29441&size=" + width + "x" + height + "&heading=";
var div = d3.select("#display");
var img = div.append("img")
var i = 0;
tributary.run = function (g, t) {
i = Math.floor(t*18) * 20
console.log(i)
img
.attr("src", url + i)
}
tributary.loop_type = "period"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment