hi guys, am trying to make a simple easing loop animation. For this, I need pass a obj scrope with propreties. So, i pass the TransformStatic scope. How i can perform correctly and update skew, scale, and rotation.
hi guys, am trying to make a simple easing loop animation.
For this, I need pass a obj scrope with propreties.
So, i pass the TransformStatic scope.
How i can perform correctly and update skew, scale, and rotation.
Rotation seem to always reset my transform!, maybe am not understand correctly how this work.
thank for help
i have found an tempory alternative for now, i have modify the update of my EASE animation system.
The problem is that I have to point to 2d properties. ( this[props][props2] )
and this not good for performance in the update.
ideally I would like a suggestion to manage everything in TransformStatic.
So for now instead pass TransformStatic, i pass the PIXI.SPRITE, and use props
this.rotation,..
this.x, ...
this.alpha..
this.skew.x ..(2D deep mode for udpate)
this.scale.x ..(2D deep mode for udpate)
but what i need to do its something like this .
PHP:
// from scope TransformStatic
this._cx = newValur;
this._cy = newValur;
this._sy = newValur;
this._rotation = newValur; // not work when upd localID!?
this._localID++; // this seem to update all transform but not the rotation
// so
this.rotation = newValur;
//!!! ho, rotation reset all data transform!! why and how fixe this
this its the update easing, see at // its 2d PIXI DEEP PROPRETY
PHP:
for(var prop in this._valuesEnd) {
if(typeof this._valuesEnd[prop]==='number'){
var start = this._valuesStart[prop];
var end = this._valuesEnd[prop];
this._valueSetCallback(this._object, prop, start + (end - start) * progress);
}else{ // its 2d PIXI DEEP PROPRETY
for(var prop2D in this._valuesEnd[prop]) {
var start = this._valuesStart[prop][prop2D];
var end = this._valuesEnd[prop][prop2D];
this._valueSetCallback(this._object[prop], prop2D, start + (end - start) * progress);
}
}
}
i need to find a way to use all _props in the transformatic
[scale,skew,rotation] and the localID++ for update, but without reset data, for avoid use
2D deep object.
it is not urgent because my alternative works, but at the expense of a loss of optimization.
thank
https://github.com/pixijs/pixi.js/blob/dev/src/core/display/TransformStatic.js#L177