Skip to content

Commit c5b78e5

Browse files
committed
Re-add effect transform check
1 parent 44380e9 commit c5b78e5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Drawable.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ const getLocalPosition = (drawable, vec) => {
4242
// localPosition matches that transformation.
4343
localPosition[0] = 0.5 - (((v0 * m[0]) + (v1 * m[4]) + m[12]) / d);
4444
localPosition[1] = (((v0 * m[1]) + (v1 * m[5]) + m[13]) / d) + 0.5;
45-
if (drawable.enabledEffects !== 0) EffectTransform.transformPoint(drawable, localPosition, localPosition);
45+
// Apply texture effect transform if the localPosition is within the drawable's space,
46+
// and any effects are currently active.
47+
if (drawable.enabledEffects !== 0 &&
48+
(localPosition[0] >= 0 && localPosition[0] < 1) &&
49+
(localPosition[1] >= 0 && localPosition[1] < 1)) {
50+
51+
EffectTransform.transformPoint(drawable, localPosition, localPosition);
52+
}
4653
return localPosition;
4754
};
4855

0 commit comments

Comments
 (0)