Skip to content

Instantly share code, notes, and snippets.

@firelizzard18
Created November 26, 2015 03:49
Show Gist options
  • Save firelizzard18/f47d383c1327f352ff5e to your computer and use it in GitHub Desktop.
Save firelizzard18/f47d383c1327f352ff5e to your computer and use it in GitHub Desktop.
XKCD 1608 Goggles and Position Tracker
ze.goggles()
var p = $('<div style="position: fixed; left: 0; top: 0; background: black; color: white">')
p.appendTo("body")
var oldOnTick = explorer.opts.onTick
explorer.opts.onTick = function (s) { p.text(Math.floor(s.pos.x) + ", " + Math.floor(s.pos.y)); return oldOnTick.apply(this, arguments) }
Sign up for free
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment