Konva – HTML5 canvas coin spin effect

This is something I made for fun when I was learning about Konva tweens and animation, and posted as a self-answered question on StackOverflow.

The coin spin effect is done by scaling the X axis of the circle from 1 to 0 to 1 in a loop. The human brain is defeated by the simple process of changing something on the ‘coin’ as it ‘spins’. In this case I show the text when the coin is on cycle-1 of the scaling, then remove it on cycle-2. It would be as simple to change the color or use different text, or use a photo.

Thanks for reading.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: