Skip to content

Commit 90f35d5

Browse files
committed
Simplify Effect:create_transformation
1 parent e9177af commit 90f35d5

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

TODO.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11

22
## TODO
33

4-
- EffectManagers
5-
- Implement run
6-
- Support some kind of middleware?
74
- Write documentation (readthedocs)
85
- Pyrr / Math
6+
- EffectManagers
97
- Properly verify all settings
108
- Make EffectControllers
119
- TrackSystemEffectController
12-
- SimpleTimeLineEffectController
10+
- SimpleTimeLineEffectManager
1311
- Shaders
1412
- Improve error prints (use actual source from GL so we can see expanded typedefs)
1513
- Core loader support for common formats

demosys/effects/effect.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from demosys import resources
2-
from pyrr import matrix44, Matrix33, Vector3
2+
from pyrr import matrix44, Matrix33, Matrix44, Vector3
33

44

55
def bind_target(func):
@@ -104,11 +104,7 @@ def create_transformation(self, rotation=None, translation=None):
104104
"""Convenient transformation method doing rotations and translation"""
105105
mat = None
106106
if rotation is not None:
107-
x = matrix44.create_from_x_rotation(rotation[0])
108-
y = matrix44.create_from_y_rotation(rotation[1])
109-
z = matrix44.create_from_z_rotation(rotation[2])
110-
mat = matrix44.multiply(x, y)
111-
mat = matrix44.multiply(mat, z)
107+
mat = Matrix44.from_eulers(Vector3(rotation))
112108

113109
if translation is not None:
114110
trans = matrix44.create_from_translation(Vector3(translation))

0 commit comments

Comments
 (0)