home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Puzzle / crazycube.swf / scripts / __Packages / com / Node.as < prev    next >
Encoding:
Text File  |  2006-06-13  |  745 b   |  35 lines

  1. class com.Node
  2. {
  3.    var $x;
  4.    var $y;
  5.    var $z;
  6.    var sx;
  7.    var sy;
  8.    function Node(a, b, c)
  9.    {
  10.       this.$x = !a ? 0 : a;
  11.       this.$y = !b ? 0 : b;
  12.       this.$z = !c ? 0 : c;
  13.       this.sx = this.$x;
  14.       this.sy = this.$y;
  15.    }
  16.    function rotate(m, f, dim)
  17.    {
  18.       var _loc3_ = this.$z * m.cya - this.$x * m.sya;
  19.       var _loc5_ = this.$z * m.sya + this.$x * m.cya;
  20.       var _loc6_ = this.$y * m.sxa + _loc3_ * m.cxa;
  21.       var _loc7_ = this.$y * m.cxa - _loc3_ * m.sxa;
  22.       var _loc4_ = f / (f + _loc6_) * dim;
  23.       this.sx = _loc5_ * _loc4_;
  24.       this.sy = _loc7_ * _loc4_;
  25.    }
  26.    function get x()
  27.    {
  28.       return this.sx;
  29.    }
  30.    function get y()
  31.    {
  32.       return this.sy;
  33.    }
  34. }
  35.