Skip to content

Commit

Permalink
fix: invTransform NPE due to #1011
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovilia committed Jan 23, 2024
1 parent a9ffe73 commit 935a0b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/Transformable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ class Transformable {
let m = this.transform;
if (parent && parent.transform) {
// Get local transform and decompose them to position, scale, rotation
parent.invTransform = parent.invTransform || matrix.create();
matrix.mul(tmpTransform, parent.invTransform, m);
m = tmpTransform;
}
Expand Down

0 comments on commit 935a0b9

Please sign in to comment.