Skip to content

Instantly share code, notes, and snippets.

@FireyFly
Forked from anonymous/1QSjwaTw
Created March 27, 2012 21:41
Show Gist options
  • Save FireyFly/2220603 to your computer and use it in GitHub Desktop.
Save FireyFly/2220603 to your computer and use it in GitHub Desktop.
a guest on Mar 27th, 2012 - pastebin.com/1QSjwaTw
my best solution so far: changing the updateTransformation function to take the transformation as an argument and then change the variable... something like updateTransformation({'rotate':-0.05});
function getTransformerCallback(delta) {
return function() {
delta.rotate && (rotate += delta.rotate)
delta.translateX && (translateX += delta.translateX)
delta.translateY && (translateY += delta.translateY)
updateTransformation()
}
}
$('#rotateLeft').click(getTransformerCallback({ rotate:-0.0.5 }))
// etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment