goat1000 / TagCanvas

HTML5 canvas-based tag cloud
240 stars 81 forks source link

How to swap image when the tag is active? #17

Closed Ragul184 closed 8 months ago

Ragul184 commented 2 years ago

Hi team, You put an update for the TagCanvas that when we hover any tag in the canvas, it will swap the image with the another altImage when we set altImage: true. But it is not working for me or I didn't know whether I did it in a right way or not.

image

How to do this?

goat1000 commented 2 years ago

Enable the altImage option and add a second image in the tag element:

<a href="page.html"> <!-- a tag element -->
   <img src="image1.png"> <!-- main image -->
   <img src="image2.png"> <!-- alt image -->
</a>
Ragul184 commented 2 years ago

Yeah thanks team. I tried it and it is perfectly working. I have another doubt to ask how to achieve this kind of animation using TagCanvas?

julian-sanmartino-google-chrome-2021-10-07-07-33-15-trim_m3LVyEs5_5Qzq

How to do this type animation using this TagCanvas team? If there is a way, kindly let me know about this design!

And this design is inspired from Julián Sanmartino's Website!

wangweizm commented 9 months ago

是的,谢谢团队。我尝试了一下,效果很好。我还有一个疑问想问如何使用TagCanvas实现这种动画?

朱利安-圣马蒂诺-google-chrome-2021-10-07-07-33-15-trim_m3LVyEs5_5Qzq 朱利安-圣马蒂诺-google-chrome-2021-10-07-07-33-15-trim_m3LVyEs5_5Qzq

如何使用 TagCanvas 团队制作这种类型的动画?如果有办法,请告诉我这个设计!

而这个设计的灵感来自于Julián Sanmartino的网站!

May I ask how to achieve this?

goat1000 commented 8 months ago

The linked website is not using TagCanvas, it appears to be moving HTML elements around.