File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,14 @@ const getLocalPosition = (drawable, vec) => {
42
42
// localPosition matches that transformation.
43
43
localPosition [ 0 ] = 0.5 - ( ( ( v0 * m [ 0 ] ) + ( v1 * m [ 4 ] ) + m [ 12 ] ) / d ) ;
44
44
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
+ }
46
53
return localPosition ;
47
54
} ;
48
55
You can’t perform that action at this time.
0 commit comments