tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

bug652054.js (1354B)


      1 var M4x4 = {};
      2 M4x4.mul = function M4x4_mul(a, b, r) {
      3    a11 = a[0]
      4    a21 = a[1]
      5    a31 = a[2]
      6    a12 = a[4]
      7    a22 = a[5]
      8    a32 = a[6]
      9    a13 = a[8]
     10    a23 = a[9]
     11    a33 = a[10]
     12    a14 = a[12]
     13    a24 = a[13]
     14    a34 = a[14]
     15    b[3]
     16    b[4]
     17    b13 = b[8]
     18    b23 = b[9]
     19    b33 = b[10]
     20    b43 = b[11]
     21    r[8] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43
     22    r[9] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43
     23    r[10] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43
     24    return r;
     25 };
     26 M4x4.scale3 = function M4x4_scale3(x, y, z, m) {
     27    m[0] *= x;
     28    m[3] *= x;
     29    m[4] *= y;
     30    m[11] *= z;
     31 };
     32 M4x4.makeLookAt = function M4x4_makeLookAt() {
     33    tm1 = new Float32Array(16);
     34    tm2 = new Float32Array(16);
     35    r = new Float32Array(16)
     36    return M4x4.mul(tm1, tm2, r);
     37 };
     38 var jellyfish = {};
     39 jellyfish.order = [];
     40 function jellyfishInstance() {}
     41 jellyfishInstance.prototype.drawShadow = function () {
     42    pMatrix = M4x4.makeLookAt();
     43    M4x4.mul(M4x4.makeLookAt(), pMatrix, pMatrix);
     44    M4x4.scale3(6, 180, 0, pMatrix);
     45 }
     46 function drawScene() {
     47    jellyfish.order.push([0, 0])
     48    jellyfish[0] = new jellyfishInstance()
     49    for (var i = 0, j = 0; i < jellyfish.count, j < 30; ++j) {
     50        jellyfish.order[i][0]
     51        jellyfish[0].drawShadow();
     52    }
     53 }
     54 drawScene();