This commit is contained in:
Anton Lavrenov 2020-05-06 11:53:36 -05:00
parent 1d5ed8eb39
commit 1a32dc8eb1
2 changed files with 47 additions and 1365 deletions

1393
konva.js

File diff suppressed because it is too large Load Diff

View File

@ -361,25 +361,6 @@ export class Transform {
return result;
}
qrDecompose() {
var angle = Math.atan2(this.m[1], this.m[0]),
denom = Math.pow(this.m[0], 2) + Math.pow(this.m[1], 2),
scaleX = Math.sqrt(denom),
scaleY = (this.m[0] * this.m[3] - this.m[2] * this.m[1]) / scaleX,
skewX = Math.atan2(this.m[0] * this.m[2] + this.m[1] * this.m[3], denom);
const rotation = Util._getRotation(angle);
return {
rotation,
scaleX: scaleX,
scaleY: scaleY,
skewX: skewX / (Math.PI / 180),
skewY: 0,
x: this.m[4],
y: this.m[5]
};
}
}
// CONSTANTS