I am making an animated x-mas card and would like to add an effect on top of an image background. Is it possible to add falling snow? I guess that could be accomplished with the Physics engine, but that could become a bit too heavy.
So now I found this jquery example: https://github.com/loktar00/JQuery-Snowfall
I’m trying to get this to work inside of Hype, but no luck so far.
The desciption says:
Theres a few ways to call the snow you could do it the following way by directly passing the selector,
snowFall.snow(document.getElementsByTagName("body"), {options});
or you could save the selector results to a variable, and then call it
var elements = document.getElementsByClassName('yourclass');
snowFall.snow(elements, {options});
If anyone can give me a few hints how to apply thhis code it would be awesome. Many thanks!
I may have misunderstood your intention, but an animated gif with transparency will be transparent everywhere except for the falling snow. So just by placing it on top of any scene, you will get falling snow effect. It is perhaps a more convenient method.
JS / JQ is best, but one can certainly loop a PNG on a separate channel. I did a four seasons animation a while back that doubled the animation - smaller and slower on one channel for the background, with the foreground version being larger, faster and blurred. It provided depth plus it emphasized the midground.
This is going back over a year, but using suggestions here, I was able to implement snowfall.js into this short test. The problem is that I can’t get it to target any other element other than body. I don’t want the snow over the whole page, just within the enclosed div. Changing to script to:
Sorry, left off Name in my post, but yes, have done that. Still does not work. Did you try with the attached example? Can’t get it to target anything other than body.