Created
January 13, 2011 21:14
-
-
Save Nutrox/778619 to your computer and use it in GitHub Desktop.
AS3 - Isometric matrix transformation.
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
const DEGRAD:Number = Math.PI / 180; | |
var iso:Matrix = new Matrix(); | |
iso.rotate( -45 * DEGRAD ); // rotate anti-clockwise by 45 degrees | |
iso.scale( 1.0, 0.5 ); // scale vertically by 50% | |
iso.translate( 100, 100 ); // set position if needed | |
displayObject.transform.matrix = iso; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment