|
@@ -7337,9 +7337,9 @@ var BABYLON;
|
|
if (positionOffset === void 0) { positionOffset = null; }
|
|
if (positionOffset === void 0) { positionOffset = null; }
|
|
var t = this._globalTransform.multiply(this.renderGroup.invGlobalTransform); // Compute the transformation into the renderGroup's space
|
|
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.
|
|
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()) {
|
|
|
|
|
|
+ if (!this.applyActualScaleOnTransform() || rgScale.x !== 1 || rgScale.y !== 1) {
|
|
t.decompose(RenderablePrim2D_1._s, RenderablePrim2D_1._r, RenderablePrim2D_1._t);
|
|
t.decompose(RenderablePrim2D_1._s, RenderablePrim2D_1._r, RenderablePrim2D_1._t);
|
|
- t = BABYLON.Matrix.Compose(RenderablePrim2D_1._uV3, 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.
|
|
//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 size = this.renderGroup.viewportSize;
|
|
@@ -7360,8 +7360,8 @@ var BABYLON;
|
|
var w = size.width;
|
|
var w = size.width;
|
|
var h = size.height;
|
|
var h = size.height;
|
|
var invZBias = 1 / zBias;
|
|
var invZBias = 1 / zBias;
|
|
- 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);
|
|
|
|
|
|
+ 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);
|
|
part.transformX = tx;
|
|
part.transformX = tx;
|
|
part.transformY = ty;
|
|
part.transformY = ty;
|
|
part.opacity = this.actualOpacity;
|
|
part.opacity = this.actualOpacity;
|