Live data from Hacker News

Show HN: Embed a snow effect on your website

embed.im

71–80 of 83 posts

Re: Show HN: Embed a snow effect on your website

#71

Thank you for reminding me that it's time to install xsnow again.

1993, 16.67MHz MIPS R2000 DECStation: Time to run xsnow while I've got these other windows open!

2022, 3.5GHz 6-core Intel Core i5: Nooo! This causes Firefox to use 50% of the CPU!

Re: Show HN: Embed a snow effect on your website

#72
post #34

Please don't use this: it more than doubles CPU usage of Firefox.

Sounds like you have hardware acceleration turned off on firefox.

Possible, but I don't know how to do that and just now tried to find a place to turn it back on and don't see anything under Preferences.

Re: Show HN: Embed a snow effect on your website

#73
post #34

Please don't use this: it more than doubles CPU usage of Firefox.

Does it? It doesn't seem to affect mine at all. Edit: when the tab is focused it looks like it uses just under 4% of CPU in Firefox, and none when it's not focused. I don't know if that means 4% of total machine CPU or 4% of CPU that Firefox is using. https://www.dropbox.com/s/d3fec6znlleulgt/2022-12-12T11-28-4...

On my Macbook Pro running Mohave, Firefox uses 14% CPU for about 50 tabs. When this snow globe thing is running, it uses 36% according to top. These are minimums; it periodically spikes higher.

Re: Show HN: Embed a snow effect on your website

#75

Earlier quoted context omitted.

1997 and 1998 _were_ in the 90s, so the previous post isn't inaccurate…

never said it wasn't- I was trying to more-accurate it

With sincerest apologies for how much of a pedantic prick I'm about to be…

You probably mean more _precise_.

Re: Show HN: Embed a snow effect on your website

#77
post #28

Earlier quoted context omitted.

It has been removed from web standards, but at least today it still works both in Chrome and Safari, I just tested. See for yourself: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ma...

Wow, I never even knew you could scroll upwards or both ways! Works on Firefox too. I tried adding but (thankfully) that didn't work. Blinking Marquees were a big thing.

Blink was removed a long time ago, but you can emulate it easily with CSS animations.

To make it even more irritatingly attention grabbing while trying to read something else, layer the blink (or fade if being slightly more subtle) so it occasionally blinks brighter. Use the "Cicada Principle" to make the blink unpredictable with minimal effort.

Re: Show HN: Embed a snow effect on your website

#78
post #51

Earlier quoted context omitted.

Don't stop there! It will need tiny householders to shovel the snow off when the accumulation is too deep, and for a stretch goal the cascading snow can induce avalanches. With enough feature creep you'll be able to declare version 1.0 complete the same day you hear the first cuckoo of spring.

I wasn't planning quite that much, though I did consider some rules to try make the stuff pile with a little more realism than simple pixel stacking. And if elements vanished, having the accumulation on them re-fall instead of just disappearing (including partially if things shrunk) though that would need a modified model as settled snow would compact and have a higher terminal velocity…

But for true feature creep you need to discard this "planning" (just tell yourself you're deftly avoiding a waterfall approach), and just focus on adding that "one last feature and then I'm done". And then iterate ad infinitum - for example what scale is the height, and for this are you considering just the viewport or the entire page? will you need an atmospheric model to account for lower density at altitude? if it is just the viewport then will scrolling have a consequence, like a sudden wind flurry? will marquee text induce laminar or turbulent flow?

Re: Show HN: Embed a snow effect on your website

#79

I really like it, reminds me of old school internet. I prefer it with ASCII though, try it with an asterix (*) instead of a white orb for that 90's vibe. Just change this line: var embCSS = '.embedim-snow{position: absolute;width: 10px;height: 10px;margin-top:-10px}'; And this line: embHTML += ' * ';

For even more snowflake-like appearance, use unicode chararacters SNOWFLAKE + VARIATION SELECTOR-16 (or just SNOWFLAKE alone).

Re: Show HN: Embed a snow effect on your website

#80

I asked GPT what the source code does, was pretty impressed with the response >This code is a JavaScript program that creates a "snow" animation on a web page. When executed, the code generates a number of white, circular elements (which represent snowflakes) and animates them to move across the page, creating the illusion of snow falling. The snowflakes are given random positions, sizes, and animations to make the e…

What precisely did you enter into GPT? Just the raw source code, or other parts of the website? Which text did you use to ask it for a description? Can you try progressively removing parts of the source code to see what the minimal version is which makes GPT say that the code renders a snow effect?

If you want to try things out it's free to use for now https://chat.openai.com/chat. Just pasting the raw source with no prompt is enough to get that description.
Post reply on HN