Giter VIP home page Giter VIP logo

Comments (1)

corradio avatar corradio commented on July 2, 2024

Check out http://www.ventusky.com
Their code looks like this:

for (var a = n.Hh, c = n.Ih, e = n.Te, d = n.qf, w = 512 * (1 << Q), h = n.b.length * b, g = [], f = 1; f < n.b.fe.length; f++)
                g.push(l.round(n.Ad.length / n.b.fe.length * f));
            var F = n.context;
            F.globalCompositeOperation = "destination-in";
            F.globalAlpha = l.pow(n.b.Rd, b);
            F.fillRect(0, 0, G, I);
            F.globalCompositeOperation = "source-over";
            F.globalAlpha = 1;
            F.beginPath();
            F.lineWidth = n.b.fe[0];
            for (var k = 0; k < n.Ad.length; k += 1) {
                var m = n.Ad[k];
                0 >= m.gd && n.Oi(m, n.b.ii);
                var f = 1E6 + l.round(m.x)
                  , p = 2E6 + l.round(m.y)
                  , f = n.cache[f] || (n.cache[f] = (l.round(m.x) + J) / w % 1 * e)
                  , C = n.cache[p] || (n.cache[p] = Ka * l.atan(l.exp(((l.round(m.y) + K) / w * 2 - 1) * l.PI)) * d)
                  , r = f % 1
                  , N = C % 1
                  , f = f | 0
                  , C = (C | 0) * e
                  , p = ia.sf(r, N, a[C + f], a[C + f + 1], a[C + e + f], a[C + e + f + 1]) - 127
                  , f = ia.sf(r, N, c[C + f], c[C + f + 1], c[C + e + f], c[C + e + f + 1]) - 127;
                F.moveTo(m.x, m.y);
                m.x += p * h;
                m.y -= f * h;
                F.lineTo(m.x, m.y);
                for (f = g.length - 1; 0 <= f; f--)
                    k == g[f] && (F.stroke(),
                    F.beginPath(),
                    F.lineWidth = n.b.fe[f + 1]);
                m.gd -= b;
                if (m.x < 0 - ma || m.x >= G + ma || m.y < 0 - ma || m.y >= I + ma)
                    m.gd = 0
            }
            F.stroke()

from electricitymaps-contrib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.