summaryrefslogtreecommitdiff
path: root/apps/web/src/effects/motion.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/src/effects/motion.ts')
-rw-r--r--apps/web/src/effects/motion.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/web/src/effects/motion.ts b/apps/web/src/effects/motion.ts
index ab51002a..8734d343 100644
--- a/apps/web/src/effects/motion.ts
+++ b/apps/web/src/effects/motion.ts
@@ -94,6 +94,7 @@ export function applyMotionEffects({
let scale = 1;
let translateX = 0;
let translateY = 0;
+ let rotate = 0;
for (const effect of motionEffects) {
const definition = effectsRegistry.get(effect.type);
@@ -117,6 +118,7 @@ export function applyMotionEffects({
scale *= offset.scale;
translateX += offset.translateX;
translateY += offset.translateY;
+ rotate += offset.rotate ?? 0;
}
return {
@@ -126,6 +128,6 @@ export function applyMotionEffects({
x: baseTransform.position.x + translateX * canvasWidth,
y: baseTransform.position.y + translateY * canvasHeight,
},
- rotate: baseTransform.rotate,
+ rotate: baseTransform.rotate + rotate,
};
}