1
0
mirror of synced 2025-02-17 19:19:19 +01:00

Separate TX/TY and TZ set tracking because this is how the SWF loader assigns it. This seems to fix some animations using 3D perspective.

This commit is contained in:
Jennifer Taylor 2021-08-03 20:34:06 +00:00
parent b9b85bf146
commit 62b77b850c

View File

@ -158,7 +158,8 @@ class Matrix:
self.a43 = a43
self.__scale_set = True
self.__rotate_set = True
self.__translate_set = True
self.__translate_xy_set = True
self.__translate_z_set = True
@staticmethod
def identity() -> "Matrix":
@ -170,7 +171,8 @@ class Matrix:
)
new.__scale_set = False
new.__rotate_set = False
new.__translate_set = False
new.__translate_xy_set = False
new.__translate_z_set = False
return new
@staticmethod
@ -255,9 +257,10 @@ class Matrix:
if other.__rotate_set:
new.b = other.b
new.c = other.c
if other.__translate_set:
if other.__translate_xy_set:
new.tx = other.tx
new.ty = other.ty
if other.__translate_z_set:
new.tz = other.tz
return new
@ -316,7 +319,7 @@ class Matrix:
@tx.setter
def tx(self, val: float) -> None:
self.__translate_set = True
self.__translate_xy_set = True
self.a41 = val
@property
@ -325,7 +328,7 @@ class Matrix:
@ty.setter
def ty(self, val: float) -> None:
self.__translate_set = True
self.__translate_xy_set = True
self.a42 = val
@property
@ -334,7 +337,7 @@ class Matrix:
@tz.setter
def tz(self, val: float) -> None:
self.__translate_set = True
self.__translate_z_set = True
self.a43 = val
def multiply_point(self, point: Point) -> Point: