Skip to content

Commit

Permalink
Update Texture.tsx
Browse files Browse the repository at this point in the history
fix the way we check for availability of opacity.

* edge case: opacity==0 would be considered absent in previous method
  • Loading branch information
vegancat authored Mar 24, 2024
1 parent 9dc1b13 commit 0c54c2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/effects/Texture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Texture = forwardRef<TextureEffect, TextureProps>(function Texture(
const effect = useMemo(() => new TextureEffect({ ...props, texture: t || texture }), [props, t, texture])
const effect = useMemo(() => {
let tEffect = new TextureEffect({ ...props, texture: t || texture });
if (opacity) {
if (typeof opacity === "number") {
tEffect.blendMode.opacity.value = opacity;
}
return tEffect;
Expand Down

0 comments on commit 0c54c2f

Please sign in to comment.