Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    Help to junior learner

    Your Feedback and Suggestions
    2
    3
    459
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sajadwindy
      last edited by

      hi every body
      i am a junior frontend learner and im learning js
      i read top and enterprise front web pages everyday to improve my coding skill and also reading and refactoring.
      one of that sites is windy, king of hearts.
      this is is really good in weather map against other websites. so i tried to read the source code but i got the source is compiled and so hard to read, Although i read about 70% of it and it really help me to understand code even when it is compiled.
      while i was reading the source codes
      a piece of code attract me but i couldn't really understand it so i want to ask windy that would you please send me just these few lines of code?
      please.
      wish you the best.

      David PolášekD 1 Reply Last reply Reply Quote 0
      • David PolášekD
        David Polášek Administrator @sajadwindy
        last edited by

        Hello @sajadwindy

        Thank you, I appreciate your work. Unfortunately, we cannot send you any part of the code which is not public.

        Good luck with your learning. All the best, David

        David Polášek (Windy.com)

        S 1 Reply Last reply Reply Quote 1
        • S
          sajadwindy @David Polášek
          last edited by sajadwindy

          @David-Polášek-3
          Thank you for your response,
          But i need just about 10 lines of index.js,
          it's public but it is not easy to read
          just this:

          tilesReady: function(e, t, i) {
                      var r = this
                        , s = function(t, o) {
                          var s = o + r.offsetY >> r.shift
                            , a = s >> 8
                            , l = s - (a << 8)
                            , c = (o + r.offsetY) % r.trans
                            , d = t + r.offsetX >> r.shift
                            , u = d >> 8
                            , h = d - (u << 8)
                            , f = (t + r.offsetX) % r.trans
                            , p = r.trans
                            , m = e && e[a] && e[a][u];
                          if (!m)
                              return console.warn("interpolator: Undefined dTile"),
                              NaN;
                          var v = m.data;
                          if (!v)
                              return console.warn("interpolator: Undefined dTile.data"),
                              NaN;
                          var g = r.offset + h + (l << 8) + l << 2;
                          if (i.PNGtransparency && n.testPNGtransparency(v, g))
                              return NaN;
                          if (i.JPGtransparency && n.testJPGtransparency(v, g))
                              return NaN;
                          var w = v[g]
                            , y = v[g + 4]
                            , b = v[g + 1]
                            , T = v[g + 5]
                            , S = v[g + 2]
                            , E = v[g + 6]
                            , _ = v[g += 1028]
                            , L = v[g + 4]
                            , A = v[g + 1]
                            , P = v[g + 5]
                            , C = v[g + 2]
                            , M = v[g + 6]
                            , O = (p - c) * (p - f)
                            , R = (p - c) * f
                            , x = c * (p - f)
                            , D = f * c
                            , I = p * p
                            , N = (w * O + y * R + _ * x + L * D) / I
                            , W = i.interpolateNearestG ? n.interpolateNearest(null, 0, b, T, A, P, O, R, x, D) : (b * O + T * R + A * x + P * D) / I
                            , k = (S * O + E * R + C * x + M * D) / I;
                          return [m.decodeR(N), m.decodeG(W), m.decodeB(k)]
          
          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
          NodeBB & contributors, OSM & contributors, HERE maps
          Terms of Use     Privacy Policy