<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <style>
  div{
    color:#ffffff;
  }
  </style>
<script>
function Sneg(args){
  this.count = args.count || 100;
  this.time = args.time || 100;
  this.weigth = args.weigth || 0.1;
  this.resist = args.resist || 2;
  this.maxForce = args.force || 0.5;
  //погода, содержит силу и направление ветра
  this.weather = {
    force: this.maxForce,
    //угол направления
    dest: Math.random()*Math.PI*2,
    getForces: function(){
      return {
        x: Math.cos(this.dest) * this.force,
        y: Math.sin(this.dest) * this.force
      };
    }
  };
  this.getDims = function(){
    return {
      x: window.innerWidth / 2.0,
      y: window.innerHeight / 2.0
    };
  }
  var Snejinka = function(parent){
    this.reset = function(){
      this.speed = {x:Math.random(),y:Math.random()} ;
      var d = parent.getDims();
      this.point =  {
        x: Math.random()*d.x*2 - d.x,
        y: Math.random()*d.y*2 - d.y
      };
    }
    this.move = function(p){
      var d = parent.getDims();
      this.node.style.top = d.y - p.y;
      this.node.style.left = d.x + p.x;
    }
    this.repaint = function(){
      var p = this.point;
      var w = parent.weather.getForces();
      var v = this.speed;
      v.x = v.x + ( w.x * this.resist );
      p.x = p.x + v.x ;
      v.y = v.y + (w.y * this.resist - this.weigth / this.resist);
      p.y = p.y + v.y ;
      this.move(this.point);
      var d = parent.getDims();
      if((v.y > 0 && (d.y - p.y) <= 0) || (v.y < 0 && (d.y + p.y) <= 0)){
        p.y = -p.y;
      }
      if((v.x > 0 && (d.x - p.x) <= 0) || (v.x < 0 && (d.x + p.x) <= 0)){
        p.x = -p.x;
      }
    }
    //параметры
    //вес
    this.weigth = Math.random()*parent.weigth;
    //парусность (воздушное сопротивление 8) )
    this.resist = Math.random()*parent.resist;
    // скорость
    this.reset();
    this.node = document.createElement("div");
    this.node.appendChild(document.createTextNode("*"));
    this.node.style.position = "fixed";
    document.body.appendChild(this.node);
    this.move(this.point);
  }
  this.snows = new Array();//массив снежинок, каждая имеет две координаты
  //инициализация
  for(var i = 0; i < this.count; i++){
    this.snows[i] = new Snejinka(this);
  }
  this._repaint = function(){
    for(var i = 0; i < this.count; i++){
      this.snows[i].repaint();
    }
  }
  var refresh = function(_this){
    //TODO изменение ветра
    var w = _this.weather;
    w.force +=((w.force > _this.maxForce)?-1:1)*(Math.random()*w.force);
    w.dest += Math.PI/2 - Math.random()*Math.PI/4;
    if(w.dest > Math.PI*2){
      w.dest -= Math.PI*2;
    }
    _this._repaint();
  }
  this.run = function(){
    setInterval(refresh, this.time, this);
  }
}
function init(){
  var sneg = new Sneg({
    count:500
  });
  sneg.run();
}
</script>
</head>
<body bgcolor="#000000" onload="init()">
  <div id="snow" style="width:90%;height:90%; margin:5%;border:#ffffff solid 1px">
  </div>
</body>
</html>
Сабж.
ps, Это тонкий намек…









