-
-
Save FireyFly/2220603 to your computer and use it in GitHub Desktop.
a guest on Mar 27th, 2012 - pastebin.com/1QSjwaTw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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