Jump to content

Snow


wohali

Recommended Posts

Posted

This is the support thread for the Snow plugin.

 

The Snow plugin adds a festive, wintry touch to any IPS4 website with configurable JavaScript-driven snow.

Features:

  1. Snow that gently falls and gathers, with wind speed and direction determined by the mouse X position.
  2. Settings provided include:
    1. Number of snow particles on screen and active ("falling") at any time
    2. Configurable Animation tick rate
    3. Snow Color (with color picker)
    4. Snow by default is in the header, but can be configured to be in any HTML element ID, or within the document body.
    5. Snow "floor" can be set in pixels (the absolute pixel value at which the snow stops falling or sticks)
    6. Stickiness of snow (does it stick to the bottom of the window/element or not?)
    7. Twinkle effect - snow fades in and out as it goes down the screen
    8. Optional support for mobile devices (will be cruel to their CPU and battery!)

Enjoy what is perhaps the second most useless plugin ever developed for IPS4! :D

Original BSD-licensed code for snowstorm provided by Scott Schiller (2007).

WARNING: Will slow down browsers. As the JavaScript implementing this functionality is not mine, only critical IPS-breaking issues will be fixed. What you see is what you get, take it or leave it.

Known issues:

  • When targeting document.body (leave target parameter blank), the IPS main content blocks the snow effect, leaving the snow only in the header and the side margins of the page. Scrolling to the bottom of the page can result in an "infinite scroll" situation. As a result the default target is the header block only.

 

Posted (edited)

Installed it, but the snow is coming out black even though it's set as FFFFFF in the settings.

 

UPDATE: Enabling 'Enable snow twinkle effect?' turned the snow white. =)

Edited by Koby
Posted (edited)

Weird. What browser are you using? I have twinkle off and the colour set to DFBFFF and it shows up as that colour in Mozilla, Chrome and IE11 (all on Windows 7 SP1 64-bit) here.

Edited by wohali
Posted (edited)

Known issue and I don't know how to fix it, it's not my JavaScript. All I did was wrap it up into an IPS plugin. I will try and take a look, but I can't promise anything...

That's why the default is snow in the header only. I might just force that to be the only option since I can't fix the known issue.

Edited by wohali
Posted
11 hours ago, qiu shanlong said:

http://prntscr.com/9al7sk

Please fix this bug, the page scroll just keeps increasing at the footer.

This is not a bug with the plugin, it is something in the actual javascript file as in you need to put an end limit to the distance the snow goes down.

If you leave it at default, it carries on falling forever & that is why your page keeps getting longer forever.

 

I put this on my site a few weeks ago when I did a Christmas skin & because of this, I had to change it.

With a forum, you cannot really specify the length as it changes on differnet pages, so I put it that it snows on the header image only...

header.thumb.jpg.1c996dbcee1be737c2545a5

So you can see it settling at the bottom of the header.

It also stopped the distraction of snow going across the topics & posts, so in the long run, I thought it was the best idea.

 

So, to stop it at a certain point, you need to add this in the script...

   snowStorm.flakeBottom = 198; // stops at botton of header

Just change the number to where you want it to stop.

Posted (edited)
12 hours ago, Greg W said:

So, to stop it at a certain point, you need to add this in the script...


   snowStorm.flakeBottom = 198; // stops at botton of header

Just change the number to where you want it to stop.

By default, in my plugin version, the snow targets the header div only. The poster qiu used an option I provide to retarget the document.body instead. If the poster had left it at the default, then the snow would stay within the header and would never scroll past that. No pixel-specific limit is required.

That said, I provide plugin setting options for the flakeBottom number as well as the ability to reselect the div section. No need to edit your skin or the script directly! :lol:

Edited by wohali
Posted (edited)

Thank you for making this for 4.x :) Great work!

Could i ask you to add option for how much snow it keeps on bottom? If i remember right, in the .js file there was option for it when i used this in some project.

I think it was these two options:

  this.snowStick = true;          // Whether or not snow should "stick" at the bottom. When off, will never collect.
  this.useMeltEffect = true;      // When recycling fallen snow (or rarely, when falling), have it "melt" and fade out if browser supports it

I would like it to pile up some amount of snow before removing it.

Thanks a lot again :thumbsup:

Edited by Mr.Jake
Found those options i would like to have
Posted

Hi there,

snowStick is set to true by default; I can look at adding a way to turn it off if you want. I'll also look at adding the useMeltEffect option.

What you want to do is increase the Max Active Snowflakes setting, which should increase how much snow piles up at the bottom. In short, if I understand the code correctly, Max Active Snowflakes - Max Snowflakes  = Snowflakes in the pile at the bottom of the header/body.

Posted
6 hours ago, wohali said:

Hi there,

snowStick is set to true by default; I can look at adding a way to turn it off if you want. I'll also look at adding the useMeltEffect option.

What you want to do is increase the Max Active Snowflakes setting, which should increase how much snow piles up at the bottom. In short, if I understand the code correctly, Max Active Snowflakes - Max Snowflakes  = Snowflakes in the pile at the bottom of the header/body.

Ah it is on then. Maybe they just melt too fast even i've set max flakes to 500. Have to max them out more then, but would really appreciate if you could add the option to turn melt off :)

2 hours ago, tAPir said:

Anyone know how to change the character to an asterix please?

That option is also in the .js file. But i don't even know where plugins puts all files :D so tell me if some of you are wiser than me :p 

this.snowCharacter = '•';  // • = bullet, · is square on some systems etc.

 

Posted
3 hours ago, Greg W said:

 

In the original js setup, you can set...


snowStorm.snowCharacter = '*';

 

I couldn't find the js but your post gave me a clue to put this in the xml file and reinstall:

snowStorm.snowCharacter = \'*\';

Thank you :)

Posted

New version 1.1.0 uploaded. Changelog:

Quote

ACP settings added for HTML entity (default •), useMeltEffect, flakeWidth and flakeHeight. (Try setting the flake HTML entity to ❄ and increase flake W/H!)

Improved fix for scroll bug when targeting document.body.

Improved ability to target document.body if desired (use document.body rather than leave option blank).

 

  • 10 months later...
Posted
6 hours ago, Michael R said:

Any update for 2016?

The add-on is stable. Is there any sort of functionality you'd like to see added?

 

52 minutes ago, EmpireKickass said:

Is there away to control on what theme that I want to have the snow on?

I have three themes and only wanted on one of them!!!

Good question. Let me look into feasibility. I don't know if I can retrieve the names of all of the installed themes, and/or check which theme is active at the time of page render, but I'll give it a go.

Posted
1 hour ago, wohali said:

The add-on is stable. Is there any sort of functionality you'd like to see added?

 

Good question. Let me look into feasibility. I don't know if I can retrieve the names of all of the installed themes, and/or check which theme is active at the time of page render, but I'll give it a go.

Can the user turn it off for them personally? Can it be on or off for mobile?

Posted
2 hours ago, wohali said:

The add-on is stable. Is there any sort of functionality you'd like to see added?

 

Good question. Let me look into feasibility. I don't know if I can retrieve the names of all of the installed themes, and/or check which theme is active at the time of page render, but I'll give it a go.

Reasons since I have two Ipsfocus themes that already have that option built in and the others don't have that option, So I need to able to have your plugin snow on for the default and not for the ipsfocus themes    

  • 1 month later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...