I’m experiencing some issues with the openfl.geom.matrix3D.
If I were to create a bitmap and set it’s bitmapdata to some asset and I add it to stage, I would get this:
And now I’d like to change it’s perspective like this:
I pass this simple code:
var w = bitmap.width; var h = bitmap.height; matrix3d.appendTranslation( -w*0.5, -h*0.5, 0); matrix3d.appendRotation( -55, Vector3D.X_AXIS); matrix3d.appendTranslation(w*0.5, h*0.5, 0); bitmap.transform.matrix3D = matrix3d;
I get the results that I wanted.
All good so far, I compile to flash and it’s another good day!
BUT, I have a feeling that flash won’t be around for a while, but not biggies I can quickly compile to html5.
Obviously it’s not the way I wanted it to be and I’m probably missing something. The questions is, what am I missing?
Bonus question: Can I do this without matrix3D, maybe just matrix?