Skip to content

Instantly share code, notes, and snippets.

@rileydutton
Created April 30, 2013 14:22
Show Gist options
  • Save rileydutton/5489058 to your computer and use it in GitHub Desktop.
Save rileydutton/5489058 to your computer and use it in GitHub Desktop.
//The light is closing in on you...
on("change:token", function(obj, prev) {
//Only do this if we actually moved.
if(obj.get("left") == prev["left"] && obj.get("top") == prev["top"]) return;
obj.set({
light_radius: Math.floor(obj.get("light_radius") * 0.90)
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment