How do rotate by point in Bitmap? I need rotate hande by left down corner.
tweenjs, easeljs
THX.
On
You can use the regX and regY properties of the Bitmap object to change the offset of the registration point of it.
For purposes of your question: If you want to use the left down corner, the coordinates you need to specify are (0, imgHeight), where imgHeight is the height of your image used to create your Bitmap.
hand.regX = 0;
hand.regY = imgHeight;
In the case of the value for the regY property, you can assign it manually, or you can also use the getTransformedBounds() method to get the height.
var handRect = hand.getTransformedBounds();
hand.regY = handRect.height;
Rotation uses the registration point (top-left for Bitmaps by default), but you can also set
regXandregYto change where the origin of the element is.