日期:2014-05-16 浏览次数:20377 次
/*
?? DHTML PNG Snowstorm! OO-style Jascript-based Snow effect
?? --------------------
?? Version 1.0.20110101
?? Dependencies: GIF/PNG images (0 through 4.gif/png)
?? Code by STAGE - http://www.stage.my
?? --------------------
?? Description:
?
?? Initializes after body onload() by default (via addEventHandler() call at bottom.)
?
?? Properties:
?
?? usePNG
?? ---------------
?? Enables PNG images if supported ("false" falls back to GIF)
?
?? flakeTypes
?? ---------------
?? Sets the range of flake images to use (eg. a value of 5
?? will use images ranging from 0.png to 4.png.)
?
?? flakesMax
?? ---------------
?? Sets the maximum number of snowflakes that can exist on
?? the screen at any given time.
??
?? flakesMaxActive
?? ---------------
?? Sets the limit of "falling" snowflakes (ie. moving, thus
?? considered to be "active".)
?
?? vMax
?? ---------------
?? Defines the maximum X and Y velocities for the storm.
?? A range up to this value is selected at random.
?
?? flakeWidth
?? ---------------
?? The width (in pixels) of each snowflake image.
?
?? flakeHeight
?? ---------------
?? Height (pixels) of each snowflake image.
??
?? flakeBottom
?? ---------------
?? Limits the "bottom" coordinate of the snow.
?? snowStick
?? ---------------
?? Allows the snow to "stick" to the bottom of the window.
?? When off, snow will never sit at the bottom.
?
?? snowCollect
?? ---------------
?? Enables snow to pile up (slowly) at bottom of window.
?? Can be very CPU/resource-intensive over time.
?? Also requires snowStick = true.
?? followMouse
?? ---------------
?? Allow the mouse to affect the "wind", left-to-right.
*/