Advertisement
Guest User

Hormold

a guest
Aug 1st, 2010
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var agent = navigator.userAgent;
  2. var index = agent.indexOf("OS ");
  3.  
  4. function goto_faq() {
  5.     if (!String(window.location).match(/faq/)) {
  6.         window.location = "faq.html"
  7.     }
  8.     model = null
  9. }
  10. if (index == -1) {
  11.     goto_faq()
  12. }
  13. firmware = agent.slice(index + "OS ".length);
  14. firmware = firmware.slice(0, firmware.indexOf(" "));
  15. firmware = firmware.replace(/_/g, ".");
  16. if (agent.indexOf("iPad") != -1) {
  17.     model = "iPad1,1"
  18. } else {
  19.     if (agent.indexOf("iPod") != -1) {
  20.         var ssi = getSunSpiderInterval();
  21.         window.location = "#" + ssi;
  22.         if (ssi > 1625) {
  23.             model = "iPod1,1"
  24.         } else {
  25.             if (ssi >= (firmware.indexOf("4.0") != -1 ? 800 : 1000)) {
  26.                 model = "iPod2,1"
  27.             } else {
  28.                 model = "iPod3,1"
  29.             }
  30.         }
  31.     } else {
  32.         if (agent.indexOf("iPhone") != -1) {
  33.             if (window.devicePixelRatio == 2) {
  34.                 model = "iPhone3,1"
  35.             } else {
  36.                 var ssi = getSunSpiderInterval();
  37.                 window.location = "#" + ssi;
  38.                 if (ssi >= (firmware.indexOf("4.0") != -1 ? 1100 : 1600)) {
  39.                     model = "iPhone1,x"
  40.                 } else {
  41.                     model = "iPhone2,1"
  42.                 }
  43.             }
  44.         } else {
  45.             goto_faq()
  46.         }
  47.     }
  48. }
  49. function get_page() {
  50.     return model == null ? null : ("/_/" + model + "_" + firmware + ".pdf")
  51. }
  52. window.page = get_page();
  53. if (window.page.indexOf("iPod3,1_3") != -1) {
  54.     alert("Warning: This version is known to crash.  You can try it, but you might have better luck if you upgrade to 4.0 first.")
  55. }
  56. var valid = ["3.1.2", "3.1.3", "3.2", "3.2.1", "4.0", "4.0.1"];
  57. var vmismatch = 0;
  58. if (valid.indexOf(firmware) == -1) {
  59.     vmismatch = parseInt(firmware.substring(0, 1)) <= 3 ? -1 : 1
  60. } else {
  61.     if (window.page != null) {
  62.         _ = new Image(window.page)
  63.     }
  64. }
  65. function arm_version() {
  66.     var c = device_type();
  67.     var b = device_firmware();
  68.     var a = _sunSpiderInterval;
  69.     var d = 7;
  70.     if (c == "ipod") {
  71.         if (b.indexOf("4.0") != -1) {
  72.             if (a > 800) {
  73.                 d = 6
  74.             } else {
  75.                 d = 7
  76.             }
  77.         } else {
  78.             if (a > 1250) {
  79.                 d = 6
  80.             } else {
  81.                 arm_versions = 7
  82.             }
  83.         }
  84.     } else {
  85.         if (c == "iphone") {
  86.             if (b.indexOf("4.0") != -1) {
  87.                 if (a >= 1100) {
  88.                     d = 6
  89.                 } else {
  90.                     d = 7
  91.                 }
  92.             } else {
  93.                 if (a > 1625) {
  94.                     d = 6
  95.                 } else {
  96.                     d = 7
  97.                 }
  98.             }
  99.         } else {
  100.             if (c == "ipad") {
  101.                 d = 7
  102.             }
  103.         }
  104.     }
  105.     return d
  106. }
  107. function armv6_faster() {
  108.     var a = _sunSpiderInterval;
  109.     if (a > 1625) {
  110.         return false
  111.     }
  112.     return true
  113. }
  114. function device_is_iphone() {
  115.     var a = navigator.userAgent;
  116.     return a.indexOf("iPhone OS") != -1 || a.indexOf("OS 3_2") != -1
  117. }
  118. function device_type() {
  119.     var b = navigator.userAgent;
  120.     var a = "unknown";
  121.     if (device_is_iphone()) {
  122.         if (b.indexOf("iPad") != -1) {
  123.             a = "ipad"
  124.         } else {
  125.             if (b.indexOf("iPod") != -1) {
  126.                 a = "ipod"
  127.             } else {
  128.                 if (b.indexOf("iPhone") != -1) {
  129.                     a = "iphone"
  130.                 }
  131.             }
  132.         }
  133.     }
  134.     return a
  135. }
  136. function device_firmware() {
  137.     var c = navigator.userAgent;
  138.     var b = "unknown";
  139.     if (device_is_iphone()) {
  140.         var a = c.indexOf("OS ") + "OS ".length;
  141.         b = c.slice(a);
  142.         b = b.slice(0, b.indexOf(" "));
  143.         b = b.replace(/_/g, ".")
  144.     }
  145.     return b
  146. }
  147. function device_model() {
  148.     var a = device_type();
  149.     if (a == "ipad") {
  150.         return "iPad1,1"
  151.     } else {
  152.         if (a == "iphone") {
  153.             if (window.devicePixelRatio == 2) {
  154.                 return "iPhone3,1"
  155.             } else {
  156.                 if (arm_version() == 7) {
  157.                     return "iPhone2,1"
  158.                 } else {
  159.                     return "iPhone1,x"
  160.                 }
  161.             }
  162.         } else {
  163.             if (a == "ipod") {
  164.                 if (arm_version() == 7) {
  165.                     return "iPod3,1"
  166.                 } else {
  167.                     if (armv6_faster()) {
  168.                         return "iPod2,1"
  169.                     } else {
  170.                         return "iPod1,1"
  171.                     }
  172.                 }
  173.             }
  174.         }
  175.     }
  176.     return "unknown"
  177. }
  178. var df = device_firmware();
  179. var valid = ["3.1.2", "3.1.3", "3.2", "3.2.1", "4.0", "4.0.1"];
  180. var vmismatch = 0;
  181. if (valid.indexOf(df) == -1) {
  182.     vmismatch = parseInt(df.substring(0, 1)) <= 3 ? -1 : 1
  183. } else {
  184.     page_for_device = "/_/" + device_model() + "_" + df + ".pdf";
  185.     new Image(page_for_device)
  186. }
  187. var step;
  188. var unlock4 = document.getElementById("unlock_text");
  189. var unlock1 = document.getElementById("unlock1");
  190. var ival = null;
  191.  
  192. function get_gradient(k) {
  193.     var j = -10000;
  194.     var a = -10000;
  195.     var d = "-webkit-gradient(linear, left bottom, right bottom, ";
  196.     var l = "";
  197.     var e = false;
  198.     for (var c = 0; c < k.length; c += 2) {
  199.         var f = k[c];
  200.         var b = k[c + 1];
  201.         if (!e && f >= 0) {
  202.             var h = (b * (0 - last_pos) - a * (0 - f)) / (f - last_pos);
  203.             d += "from(rgba(0,0,0," + h + ")), ";
  204.             e = true
  205.         }
  206.         if (e) {
  207.             if (f >= 1) {
  208.                 var g = (b * (1 - last_pos) - a * (1 - f)) / (f - last_pos);
  209.                 d += "to(rgba(0,0,0," + g + "))";
  210.                 d += l;
  211.                 break
  212.             }
  213.             l += ", color-stop(" + f + ", rgba(0,0,0," + b + "))"
  214.         }
  215.         last_pos = f;
  216.         a = b
  217.     }
  218.     return d + ")"
  219. }
  220. function turn_on() {
  221.     if (ival) {
  222.         return
  223.     }
  224.     step = -0.15;
  225.     ival = setInterval(window.stepp = function () {
  226.         step = (step + 0.05) % 1.55;
  227.         var c = step - 0.15;
  228.         var d = step;
  229.         var e = c - 0.2;
  230.         var a = d + 0.2;
  231.         var b = get_gradient([-1000, 0.5, e, 0.5, c, 0.9, d, 0.9, a, 0.5, 1000, 0.5]);
  232.         unlock4.style.WebkitMaskImage = b
  233.     }, 50)
  234. }
  235. function turn_off() {
  236.     if (!ival) {
  237.         return
  238.     }
  239.     clearInterval(ival);
  240.     ival = null;
  241.     unlock4.style.WebkitMaskImage = ""
  242. }
  243. var left = 0;
  244.  
  245. function set_left(a) {
  246.     left = a;
  247.     slider.style.left = a + "px";
  248.     unlock4.style.opacity = 1 - (left / 40)
  249. }
  250. var startX = null,
  251.     startLeft, maxLeft;
  252. slider.ontouchstart = function (a) {
  253.     startX = a.targetTouches[0].clientX;
  254.     startLeft = left;
  255.     turn_off();
  256.     slider.style.WebkitTransitionProperty = "";
  257.     slider.style.WebkitTransitionDuration = "0s";
  258.     unlock4.style.WebkitTransitionProperty = "";
  259.     unlock4.style.WebkitTransitionDuration = "0s";
  260.     maxLeft = slider.parentNode.clientWidth - slider.clientWidth - 5;
  261.     return false
  262. };
  263. slider.ontouchmove = function (b) {
  264.     var a = b.targetTouches[0].clientX - startX;
  265.     if (a < 0) {
  266.         a = 0
  267.     } else {
  268.         if (a >= maxLeft) {
  269.             a = maxLeft
  270.         }
  271.     }
  272.     set_left(a + startLeft)
  273. };
  274. window.ontouchend = function () {
  275.     if (startX == null) {
  276.         return
  277.     }
  278.     startX = null;
  279.     if (maxLeft - left < 15) {
  280.         jailbreak();
  281.         return false
  282.     }
  283.     turn_on();
  284.     unlock4.style.WebkitTransitionProperty = "opacity";
  285.     unlock4.style.WebkitTransitionDuration = "0.5s";
  286.     var a = left;
  287.     set_left(0);
  288.     slider.style.WebkitTransform = "translateX(" + a + "px)";
  289.     setTimeout(function () {
  290.         slider.style.WebkitTransitionProperty = "-webkit-transform";
  291.         slider.style.WebkitTransitionDuration = "0.5s";
  292.         slider.style.WebkitTransform = "translateX(0px)"
  293.     }, 0);
  294.     return false
  295. };
  296. set_left(0);
  297. turn_on();
  298. var onetext = '<div class="ttitle ttop">Oops...</div><div class="ttext">It looks like the installer crashed last time you tried to jailbreak. :(</div><div class="ttext">It might work if you try again.</div>';
  299. var twotext = '<div class="ttitle ttop">It worked!</div><div class="ttext">Tap the <b>Cydia</b> icon to get started with your jailbreak.</div><div class="ttext">(If you restored from a backup, you might be seeing this even though you\'re not jailbroken yet.)</div>';
  300. var toooldtext = '<div class="ttitle ttop">JailbreakMe</div><div class="ttext">Version too old.  You need to upgrade using iTunes before you can use this site.</div>';
  301. var toonewtext = '<div class="ttitle ttop">Welp.</div><div class="ttext">Version too new.  You need to downgrade before you can use this site, which is probably impossible.</div>';
  302.  
  303. function add_animations(a) {
  304.     a.style.webkitTransitionProperty = "-webkit-transform, opacity";
  305.     a.style.webkitTransitionDuration = "0.4s, 0.4s"
  306. }
  307. function get_progress() {
  308.     var f = 0;
  309.     var b = 0;
  310.     var e = document.cookie.match(/progress=[0-9]_[0-9\.]+/g);
  311.     if (e) {
  312.         for (var d = 0; d < e.length; d++) {
  313.             var a = e[d];
  314.             var c = parseInt(a.substring(11));
  315.             if (c > f) {
  316.                 f = c;
  317.                 b = parseInt(a.substring(9, 10))
  318.             }
  319.         }
  320.     }
  321.     return b
  322. }
  323. var my_progress = 0;
  324. window.onload = function () {
  325.     if (vmismatch == -1) {
  326.         document.getElementById("texts").innerHTML = toooldtext;
  327.         return
  328.     } else {
  329.         if (vmismatch == 1) {
  330.             document.getElementById("texts").innerHTML = toonewtext;
  331.             return
  332.         }
  333.     }
  334.     var a = get_progress();
  335.     if (a == 1) {
  336.         document.getElementById("texts").innerHTML = onetext
  337.     } else {
  338.         if (a == 2) {
  339.             document.getElementById("texts").innerHTML = twotext
  340.         }
  341.     }
  342. };
  343.  
  344. function jailbreak() {
  345.     var b = document.getElementsByClassName("middle_wrapper")[0];
  346.     add_animations(b);
  347.     b.style.opacity = "0";
  348.     var c = document.getElementsByClassName("tool_bar")[0];
  349.     add_animations(c);
  350.     c.style.opacity = "0";
  351.     c.style.webkitTransform = "translateY(96px)";
  352.     var a = document.getElementsByClassName("top_bar")[0];
  353.     add_animations(a);
  354.     a.style.opacity = "0";
  355.     a.style.webkitTransform = "translateY(-96px)";
  356.     jailbreak_real()
  357. }
  358. function jailbreak_real() {
  359.     document.cookie = "progress=1_" + (new Date().getTime() / 1000) + ";domain=jailbreakme.com;path=/;expires=Sat, 01 Feb 2020 05:00:00 GMT";
  360.     if (!window.page) {
  361.         alert("There was no page... " + navigator.userAgent)
  362.     }
  363.     var a = document.createElement("iframe");
  364.     a.setAttribute("src", page);
  365.     a.style.position = "absolute";
  366.     a.style.opacity = "0.000001";
  367.     a.style.width = "100px";
  368.     a.style.height = "100px";
  369.     a.style.zIndex = "-9999";
  370.     document.body.appendChild(a);
  371.     pival = setInterval(function () {
  372.         var b = get_progress();
  373.         if (b == 2) {
  374.             clearInterval(pival);
  375.             window.location = "faq.html"
  376.         } else {
  377.             if (b == 3) {
  378.                 clearInterval(pival);
  379.                 window.location = window.location
  380.             }
  381.         }
  382.     }, 500)
  383. }
  384. var old = window.orientation;
  385.  
  386. function ooc(a) {
  387.     if (old != window.orientation) {
  388.         window.scrollTo(0, 1)
  389.     }
  390.     old = window.orientation
  391. }
  392. function loaded() {
  393.     setTimeout(function () {
  394.         window.scrollTo(0, 1)
  395.     }, 10)
  396. }
  397. window.addEventListener("load", function (a) {
  398.     loaded();
  399.     setInterval(ooc, 100)
  400. }, false);
  401. window.addEventListener("onorientationchange", ooc, false);
  402. document.addEventListener("touchmove", function (a) {
  403.     a.preventDefault()
  404. }, false);
  405. var _sunSpiderInterval = 0;
  406.  
  407. function getSunSpiderInterval() {
  408.     if (_sunSpiderInterval) {
  409.         return _sunSpiderInterval
  410.     }
  411.     var d = new Date,
  412.         g = [],
  413.         r = [],
  414.         m = [],
  415.         l = [],
  416.         v = {},
  417.         x = {},
  418.         t, p = {};
  419.     p.Width = 300;
  420.     p.Height = 300;
  421.  
  422.     function n(L, J) {
  423.         var I = L.V[0],
  424.             K = J.V[0],
  425.             H = L.V[1],
  426.             G = J.V[1],
  427.             F = Math.abs(K - I),
  428.             E = Math.abs(G - H),
  429.             A = I,
  430.             i = H,
  431.             C, D, B;
  432.         if (K >= I) {
  433.             K = I = 1
  434.         } else {
  435.             K = I = -1
  436.         }
  437.         if (G >= H) {
  438.             G = H = 1
  439.         } else {
  440.             G = H = -1
  441.         }
  442.         if (F >= E) {
  443.             G = I = 0;
  444.             C = F;
  445.             D = F / 2;
  446.             B = E;
  447.             F = F
  448.         } else {
  449.             H = K = 0;
  450.             C = E;
  451.             D = E / 2;
  452.             B = F;
  453.             F = E
  454.         }
  455.         F = Math.round(g.LastPx + F);
  456.         for (E = g.LastPx; E < F; E++) {
  457.             D += B;
  458.             if (D >= C) {
  459.                 D -= C;
  460.                 A += I;
  461.                 i += H
  462.             }
  463.             A += K;
  464.             i += G
  465.         }
  466.         g.LastPx = F
  467.     }
  468.     function q(i, B) {
  469.         var A = [];
  470.         A[0] = i[1] * B[2] - i[2] * B[1];
  471.         A[1] = i[2] * B[0] - i[0] * B[2];
  472.         A[2] = i[0] * B[1] - i[1] * B[0];
  473.         return A
  474.     }
  475.     function b(A, E, D) {
  476.         for (var i = [], C = [], B = 0; B < 3; B++) {
  477.             i[B] = A[B] - E[B];
  478.             C[B] = D[B] - E[B]
  479.         }
  480.         i = q(i, C);
  481.         A = Math.sqrt(i[0] * i[0] + i[1] * i[1] + i[2] * i[2]);
  482.         for (B = 0; B < 3; B++) {
  483.             i[B] /= A
  484.         }
  485.         i[3] = 1;
  486.         return i
  487.     }
  488.     function f(i, B, A) {
  489.         this.V = [i, B, A, 1]
  490.     }
  491.     function e(A, D) {
  492.         for (var C = [
  493.             [],
  494.             [],
  495.             [],
  496.             []
  497.         ], i = 0, B = 0; i < 4; i++) {
  498.             for (B = 0; B < 4; B++) {
  499.                 C[i][B] = A[i][0] * D[0][B] + A[i][1] * D[1][B] + A[i][2] * D[2][B] + A[i][3] * D[3][B]
  500.             }
  501.         }
  502.         return C
  503.     }
  504.     function j(A, C) {
  505.         for (var B = [], i = 0; i < 4; i++) {
  506.             B[i] = A[i][0] * C[0] + A[i][1] * C[1] + A[i][2] * C[2] + A[i][3] * C[3]
  507.         }
  508.         return B
  509.     }
  510.     function k(A, C) {
  511.         for (var B = [], i = 0; i < 3; i++) {
  512.             B[i] = A[i][0] * C[0] + A[i][1] * C[1] + A[i][2] * C[2]
  513.         }
  514.         return B
  515.     }
  516.     function h(A, D) {
  517.         for (var C = [
  518.             [],
  519.             [],
  520.             [],
  521.             []
  522.         ], i = 0, B = 0; i < 4; i++) {
  523.             for (B = 0; B < 4; B++) {
  524.                 C[i][B] = A[i][B] + D[i][B]
  525.             }
  526.         }
  527.         return C
  528.     }
  529.     function o(A, C, B, i) {
  530.         return e([
  531.             [1, 0, 0, C],
  532.             [0, 1, 0, B],
  533.             [0, 0, 1, i],
  534.             [0, 0, 0, 1]
  535.         ], A)
  536.     }
  537.     function a(A, C) {
  538.         var B = C;
  539.         B *= Math.PI / 180;
  540.         var i = Math.cos(B);
  541.         B = Math.sin(B);
  542.         return e([
  543.             [1, 0, 0, 0],
  544.             [0, i, -B, 0],
  545.             [0, B, i, 0],
  546.             [0, 0, 0, 1]
  547.         ], A)
  548.     }
  549.     function z(A, C) {
  550.         var B = C;
  551.         B *= Math.PI / 180;
  552.         var i = Math.cos(B);
  553.         B = Math.sin(B);
  554.         return e([
  555.             [i, 0, B, 0],
  556.             [0, 1, 0, 0],
  557.             [-B, 0, i, 0],
  558.             [0, 0, 0, 1]
  559.         ], A)
  560.     }
  561.     function w(A, C) {
  562.         var B = C;
  563.         B *= Math.PI / 180;
  564.         var i = Math.cos(B);
  565.         B = Math.sin(B);
  566.         return e([
  567.             [i, -B, 0, 0],
  568.             [B, i, 0, 0],
  569.             [0, 0, 1, 0],
  570.             [0, 0, 0, 1]
  571.         ], A)
  572.     }
  573.     function u() {
  574.         var i = [],
  575.             A = 5;
  576.         for (g.LastPx = 0; A > -1; A--) {
  577.             i[A] = k(m, g.Normal[A])
  578.         }
  579.         if (i[0][2] < 0) {
  580.             if (!g.Line[0]) {
  581.                 n(g[0], g[1]);
  582.                 g.Line[0] = true
  583.             }
  584.             if (!g.Line[1]) {
  585.                 n(g[1], g[2]);
  586.                 g.Line[1] = true
  587.             }
  588.             if (!g.Line[2]) {
  589.                 n(g[2], g[3]);
  590.                 g.Line[2] = true
  591.             }
  592.             if (!g.Line[3]) {
  593.                 n(g[3], g[0]);
  594.                 g.Line[3] = true
  595.             }
  596.         }
  597.         if (i[1][2] < 0) {
  598.             if (!g.Line[2]) {
  599.                 n(g[3], g[2]);
  600.                 g.Line[2] = true
  601.             }
  602.             if (!g.Line[9]) {
  603.                 n(g[2], g[6]);
  604.                 g.Line[9] = true
  605.             }
  606.             if (!g.Line[6]) {
  607.                 n(g[6], g[7]);
  608.                 g.Line[6] = true
  609.             }
  610.             if (!g.Line[10]) {
  611.                 n(g[7], g[3]);
  612.                 g.Line[10] = true
  613.             }
  614.         }
  615.         if (i[2][2] < 0) {
  616.             if (!g.Line[4]) {
  617.                 n(g[4], g[5]);
  618.                 g.Line[4] = true
  619.             }
  620.             if (!g.Line[5]) {
  621.                 n(g[5], g[6]);
  622.                 g.Line[5] = true
  623.             }
  624.             if (!g.Line[6]) {
  625.                 n(g[6], g[7]);
  626.                 g.Line[6] = true
  627.             }
  628.             if (!g.Line[7]) {
  629.                 n(g[7], g[4]);
  630.                 g.Line[7] = true
  631.             }
  632.         }
  633.         if (i[3][2] < 0) {
  634.             if (!g.Line[4]) {
  635.                 n(g[4], g[5]);
  636.                 g.Line[4] = true
  637.             }
  638.             if (!g.Line[8]) {
  639.                 n(g[5], g[1]);
  640.                 g.Line[8] = true
  641.             }
  642.             if (!g.Line[0]) {
  643.                 n(g[1], g[0]);
  644.                 g.Line[0] = true
  645.             }
  646.             if (!g.Line[11]) {
  647.                 n(g[0], g[4]);
  648.                 g.Line[11] = true
  649.             }
  650.         }
  651.         if (i[4][2] < 0) {
  652.             if (!g.Line[11]) {
  653.                 n(g[4], g[0]);
  654.                 g.Line[11] = true
  655.             }
  656.             if (!g.Line[3]) {
  657.                 n(g[0], g[3]);
  658.                 g.Line[3] = true
  659.             }
  660.             if (!g.Line[10]) {
  661.                 n(g[3], g[7]);
  662.                 g.Line[10] = true
  663.             }
  664.             if (!g.Line[7]) {
  665.                 n(g[7], g[4]);
  666.                 g.Line[7] = true
  667.             }
  668.         }
  669.         if (i[5][2] < 0) {
  670.             if (!g.Line[8]) {
  671.                 n(g[1], g[5]);
  672.                 g.Line[8] = true
  673.             }
  674.             if (!g.Line[5]) {
  675.                 n(g[5], g[6]);
  676.                 g.Line[5] = true
  677.             }
  678.             if (!g.Line[9]) {
  679.                 n(g[6], g[2]);
  680.                 g.Line[9] = true
  681.             }
  682.             if (!g.Line[1]) {
  683.                 n(g[2], g[1]);
  684.                 g.Line[1] = true
  685.             }
  686.         }
  687.         g.Line = [false, false, false, false, false, false, false, false, false, false, false, false];
  688.         g.LastPx = 0
  689.     }
  690.     function c() {
  691.         if (!(x.LoopCount > x.LoopMax)) {
  692.             for (var i = String(x.LoopCount); i.length < 3;) {
  693.                 i = "0" + i
  694.             }
  695.             r = o(l, -g[8].V[0], -g[8].V[1], -g[8].V[2]);
  696.             r = a(r, 1);
  697.             r = z(r, 3);
  698.             r = w(r, 5);
  699.             r = o(r, g[8].V[0], g[8].V[1], g[8].V[2]);
  700.             m = e(r, m);
  701.             for (i = 8; i > -1; i--) {
  702.                 g[i].V = j(r, g[i].V)
  703.             }
  704.             u();
  705.             x.LoopCount++;
  706.             c()
  707.         }
  708.     }
  709.     function y(i) {
  710.         v.V = [150, 150, 20, 1];
  711.         x.LoopCount = 0;
  712.         x.LoopMax = 50;
  713.         x.TimeMax = 0;
  714.         x.TimeAvg = 0;
  715.         x.TimeMin = 0;
  716.         x.TimeTemp = 0;
  717.         x.TimeTotal = 0;
  718.         x.Init = false;
  719.         r = [
  720.             [1, 0, 0, 0],
  721.             [0, 1, 0, 0],
  722.             [0, 0, 1, 0],
  723.             [0, 0, 0, 1]
  724.         ];
  725.         m = [
  726.             [1, 0, 0, 0],
  727.             [0, 1, 0, 0],
  728.             [0, 0, 1, 0],
  729.             [0, 0, 0, 1]
  730.         ];
  731.         l = [
  732.             [1, 0, 0, 0],
  733.             [0, 1, 0, 0],
  734.             [0, 0, 1, 0],
  735.             [0, 0, 0, 1]
  736.         ];
  737.         g[0] = new f(-i, -i, i);
  738.         g[1] = new f(-i, i, i);
  739.         g[2] = new f(i, i, i);
  740.         g[3] = new f(i, -i, i);
  741.         g[4] = new f(-i, -i, -i);
  742.         g[5] = new f(-i, i, -i);
  743.         g[6] = new f(i, i, -i);
  744.         g[7] = new f(i, -i, -i);
  745.         g[8] = new f(0, 0, 0);
  746.         g.Edge = [
  747.             [0, 1, 2],
  748.             [3, 2, 6],
  749.             [7, 6, 5],
  750.             [4, 5, 1],
  751.             [4, 0, 3],
  752.             [1, 5, 6]
  753.         ];
  754.         g.Normal = [];
  755.         for (var A = 0; A < g.Edge.length; A++) {
  756.             g.Normal[A] = b(g[g.Edge[A][0]].V, g[g.Edge[A][1]].V, g[g.Edge[A][2]].V)
  757.         }
  758.         g.Line = [false, false, false, false, false, false, false, false, false, false, false, false];
  759.         g.NumPx = 18 * i;
  760.         for (A = 0; A < g.NumPx; A++) {
  761.             f(0, 0, 0)
  762.         }
  763.         r = o(r, v.V[0], v.V[1], v.V[2]);
  764.         m = e(r, m);
  765.         for (A = 0; A < 9; A++) {
  766.             g[A].V = j(r, g[A].V)
  767.         }
  768.         u();
  769.         x.Init = true;
  770.         c()
  771.     }
  772.     for (var s = 20; s <= 160; s *= 2) {
  773.         y(s)
  774.     }
  775.     p = LoopTime = x = v = l = m = r = g = null;
  776.     return _sunSpiderInterval = new Date - d
  777. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement