Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ripple Effect #111

Open
harshkanjariya opened this issue Dec 16, 2020 · 1 comment
Open

Ripple Effect #111

harshkanjariya opened this issue Dec 16, 2020 · 1 comment

Comments

@harshkanjariya
Copy link

ripple effect not working i have tried many times but not showing any animation.

@cmy82
Copy link

cmy82 commented May 6, 2022

The order of the drawing is wrong in onDraw of SpotlightView, you have to flip the shape and effect draw like this:

if (currentTarget != null && currentShapeAnimator != null) {
      currentTarget.shape.draw(
          canvas = canvas,
          point = currentTarget.anchor,
          value = currentShapeAnimator.animatedValue as Float,
          paint = shapePaint
      )
    }

    if (currentTarget != null && currentEffectAnimator != null && currentShapeAnimator != null && !currentShapeAnimator.isRunning) {
      currentTarget.effect.draw(
          canvas = canvas,
          point = currentTarget.anchor,
          value = currentEffectAnimator.animatedValue as Float,
          paint = effectPaint
      )
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants