|
@@ -5544,6 +5544,7 @@ var BABYLON;
|
|
|
this._actionManager.dispose();
|
|
|
this._actionManager = null;
|
|
|
}
|
|
|
+ this.owner.scene.stopAnimation(this);
|
|
|
// If there's a parent, remove this object from its parent list
|
|
|
if (this._parent) {
|
|
|
if (this instanceof BABYLON.Group2D) {
|
|
@@ -7337,11 +7338,6 @@ var BABYLON;
|
|
|
if (positionOffset === void 0) { positionOffset = null; }
|
|
|
var t = this._globalTransform.multiply(this.renderGroup.invGlobalTransform); // Compute the transformation into the renderGroup's space
|
|
|
var rgScale = this._areSomeFlagsSet(BABYLON.SmartPropertyPrim.flagDontInheritParentScale) ? RenderablePrim2D_1._uV : this.renderGroup.actualScale; // We still need to apply the scale of the renderGroup to our rendering, so get it.
|
|
|
- if (!this.applyActualScaleOnTransform() || rgScale.x !== 1 || rgScale.y !== 1) {
|
|
|
- t.decompose(RenderablePrim2D_1._s, RenderablePrim2D_1._r, RenderablePrim2D_1._t);
|
|
|
- t = BABYLON.Matrix.Compose((!this.applyActualScaleOnTransform() ? RenderablePrim2D_1._uV3.divide(new BABYLON.Vector3(rgScale.x, rgScale.y, 1)) : RenderablePrim2D_1._s), RenderablePrim2D_1._r, RenderablePrim2D_1._t);
|
|
|
- }
|
|
|
- //let rgScale = (this._areSomeFlagsSet(SmartPropertyPrim.flagDontInheritParentScale) || !this.applyActualScaleOnTransform()) ? RenderablePrim2D._uV : this.renderGroup.actualScale; // We still need to apply the scale of the renderGroup to our rendering, so get it.
|
|
|
var size = this.renderGroup.viewportSize;
|
|
|
var zBias = this.actualZOffset;
|
|
|
var offX = 0;
|
|
@@ -7360,8 +7356,18 @@ var BABYLON;
|
|
|
var w = size.width;
|
|
|
var h = size.height;
|
|
|
var invZBias = 1 / zBias;
|
|
|
- var tx = new BABYLON.Vector4(t.m[0] * 2 / w, t.m[4] * 2 / w, 0 /*t.m[8]*/, ((t.m[12] + offX) * 2 / w) - 1);
|
|
|
- var ty = new BABYLON.Vector4(t.m[1] * 2 / h, t.m[5] * 2 / h, 0 /*t.m[9]*/, ((t.m[13] + offY) * 2 / h) - 1);
|
|
|
+ var tx = new BABYLON.Vector4(t.m[0] * rgScale.x * 2 / w, t.m[4] * 2 / w, 0 /*t.m[8]*/, ((t.m[12] + offX) * rgScale.x * 2 / w) - 1);
|
|
|
+ var ty = new BABYLON.Vector4(t.m[1] * 2 / h, t.m[5] * rgScale.y * 2 / h, 0 /*t.m[9]*/, ((t.m[13] + offY) * rgScale.y * 2 / h) - 1);
|
|
|
+ if (!this.applyActualScaleOnTransform()) {
|
|
|
+ t.m[0] = tx.x, t.m[4] = tx.y, t.m[12] = tx.w;
|
|
|
+ t.m[1] = ty.x, t.m[5] = ty.y, t.m[13] = ty.w;
|
|
|
+ var las = this.actualScale;
|
|
|
+ t.decompose(RenderablePrim2D_1._s, RenderablePrim2D_1._r, RenderablePrim2D_1._t);
|
|
|
+ var scale = new BABYLON.Vector3(RenderablePrim2D_1._s.x / las.x, RenderablePrim2D_1._s.y / las.y, 1);
|
|
|
+ t = BABYLON.Matrix.Compose(scale, RenderablePrim2D_1._r, RenderablePrim2D_1._t);
|
|
|
+ tx = new BABYLON.Vector4(t.m[0], t.m[4], 0, t.m[12]);
|
|
|
+ ty = new BABYLON.Vector4(t.m[1], t.m[5], 0, t.m[13]);
|
|
|
+ }
|
|
|
part.transformX = tx;
|
|
|
part.transformY = ty;
|
|
|
part.opacity = this.actualOpacity;
|