Skip to content

Instantly share code, notes, and snippets.

@musaulker
Created August 29, 2010 09:43
Show Gist options
  • Save musaulker/556154 to your computer and use it in GitHub Desktop.
Save musaulker/556154 to your computer and use it in GitHub Desktop.
// Titanium Create3DMatrix Sample
var button = Titanium.UI.createButton({
title:'Animate Me',
width:300,
height:40,
top:10
});
button.addEventListener('click', function(){
var t = Titanium.UI.create3DMatrix();
t = t.rotate(200, 0, 1.0, 1.0);
t = t.scale(3.0, 1.0, 1.5);
t = t.translate(20, -50, 170);
t.m34 = 1.0/-2000;
button.animate({
transform:t,
duration:1000,
autoreverse:true
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment