Skip to content

Instantly share code, notes, and snippets.

Created March 27, 2012 21:38
Show Gist options
  • Save anonymous/2220577 to your computer and use it in GitHub Desktop.
Save anonymous/2220577 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});
$('#rotateLeft').click(function() {
rotate -= 0.05;
updateTransformation();
});
$('#rotateRight').click(function() {
rotate += 0.05;
updateTransformation();
});
$('#translateLeft').click(function() {
translationX -= 5;
updateTransformation();
});
$('#translateRight').click(function() {
translationX += 5;
updateTransformation();
});
$('#translateUp').click(function() {
translationY -= 5;
updateTransformation();
});
$('#translateDown').click(function() {
translationY += 5;
updateTransformation();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment