Return to Starling Playback Library
pivot points, how are they used?
3 posts
• Page 1 of 1
pivot points, how are they used?
I noticed the starling library is reading a pivot point displacement inside BinGAFAssetConfigConverter.as
For what is this used, I have to zero in all pivots it because it's causing issues in my app.
How do you influence this values from within Adobe Animate?
- Code: Select all
pivot = new Point(this._bytes.readFloat(), this._bytes.readFloat());
For what is this used, I have to zero in all pivots it because it's causing issues in my app.
How do you influence this values from within Adobe Animate?
-
Gigi Marzullo - Posts: 20
- Joined: March 10th, 2017, 4:42 pm
Re: pivot points, how are they used?
I always bang into this problem, with some sort of random PivotMatrix set, I wonder what determines this and how can center stuff in the IDE in order to have this PivotMatrix centered at 0,0.
I noticed that I get this tx, ty pivot values when I set a filter in the IDE, any clue?
I noticed that I get this tx, ty pivot values when I set a filter in the IDE, any clue?
-
Gigi Marzullo - Posts: 20
- Joined: March 10th, 2017, 4:42 pm
Re: pivot points, how are they used?
If there is a movieclip without any effects (filters) it will be converted with standard rules and will have a standard pivotPoint in the [0,1] range.
Let’s take a different movieclip with the following parameters as an example.
Height=100, width=120, pivotPoint=[0.5,0.5] and imagine it has the blur filter applied to it with blurX=20, blurY=20.
To process this movieclip the initial pivotPoint values will be transformed into relative values of object bounds, in other words pivot=[0.5,0.5] will become pivot=[50,60]. And then offsets of both axes will be added to these values like this 50+~20 and 60+~20.
So in the end we’re getting pivotPoint=[~70,~80] which may seem odd if you're not aware of the internal settings of our Converter which I just described.
All of this is necessary because when conversion happens some of the objects may have transparent backgrounds and in order for them to be cropped properly on the Converter side the pivotPoint is recalculated to mantain a precise copy of the initial object. And that’s basically the logic behind all GAF transformations for object reconstruction.
I hope that helps.
Thank you.
Let’s take a different movieclip with the following parameters as an example.
Height=100, width=120, pivotPoint=[0.5,0.5] and imagine it has the blur filter applied to it with blurX=20, blurY=20.
To process this movieclip the initial pivotPoint values will be transformed into relative values of object bounds, in other words pivot=[0.5,0.5] will become pivot=[50,60]. And then offsets of both axes will be added to these values like this 50+~20 and 60+~20.
So in the end we’re getting pivotPoint=[~70,~80] which may seem odd if you're not aware of the internal settings of our Converter which I just described.
All of this is necessary because when conversion happens some of the objects may have transparent backgrounds and in order for them to be cropped properly on the Converter side the pivotPoint is recalculated to mantain a precise copy of the initial object. And that’s basically the logic behind all GAF transformations for object reconstruction.
I hope that helps.
Thank you.
-
Sergey Ionov - Posts: 14
- Joined: May 23rd, 2016, 4:14 am
3 posts
• Page 1 of 1
Return to Starling Playback Library
Who is online
Users browsing this forum: No registered users and 1 guest