Skip to content

Commit

Permalink
Re-add effect transform check
Browse files Browse the repository at this point in the history
  • Loading branch information
adroitwhiz committed May 11, 2020
1 parent 4b7257d commit 05a2e00
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Drawable.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ const getLocalPosition = (drawable, vec) => {
// localPosition matches that transformation.
localPosition[0] = 0.5 - (((v0 * m[0]) + (v1 * m[4]) + m[12]) / d);
localPosition[1] = (((v0 * m[1]) + (v1 * m[5]) + m[13]) / d) + 0.5;
if (drawable.enabledEffects !== 0) EffectTransform.transformPoint(drawable, localPosition, localPosition);
// Apply texture effect transform if the localPosition is within the drawable's space,
// and any effects are currently active.
if (drawable.enabledEffects !== 0 &&
(localPosition[0] >= 0 && localPosition[0] < 1) &&
(localPosition[1] >= 0 && localPosition[1] < 1)) {

EffectTransform.transformPoint(drawable, localPosition, localPosition);
}
return localPosition;
};

Expand Down

0 comments on commit 05a2e00

Please sign in to comment.