9 votes

Dissecting A Dweet: Ring Weave ~ a 140 byte javascript animation

6 comments

  1. KilledByAPixel
    Link
    Hello, I just finished up my 4th blog post talking about one of my tiny javascript programs. Here's the javascript code with a few small improvements... c.width|=c.style.background="#CDF"...

    Hello, I just finished up my 4th blog post talking about one of my tiny javascript programs.

    Here's the javascript code with a few small improvements...

    c.width|=c.style.background="#CDF"
    for(j=3e3;a=j--/159;x.arc(960,540,430+60*S(j/477+a*4)*(S(a-t)/2+.5)**9,a,a))x.lineWidth=29
    x.stroke()
    
    3 votes
  2. [2]
    gpl
    Link
    Thanks for posting these, I love reading the breakdown since the dweet itself is usually incomprehensibly complex (then again, I don't know javascript). I love tinycode challenges, they really...

    Thanks for posting these, I love reading the breakdown since the dweet itself is usually incomprehensibly complex (then again, I don't know javascript). I love tinycode challenges, they really force you to learn the ins and outs of a language so that you can squeeze extra functionality out of each character/byte.

    3 votes
    1. KilledByAPixel
      Link Parent
      Thanks, I have learned so much about javascript from doing these. Though it's not proper style I think it's a really fun way to learn.

      Thanks, I have learned so much about javascript from doing these. Though it's not proper style I think it's a really fun way to learn.

      1 vote
  3. [2]
    Wes
    Link
    I keep seeing the word "dweet" but it's never defined. I assume it's a JS snippet that can be embedded in a tweet?

    I keep seeing the word "dweet" but it's never defined. I assume it's a JS snippet that can be embedded in a tweet?

    1 vote
    1. KilledByAPixel
      Link Parent
      It is a term used by the website dwitter where people post 140 character javascript demos: https://www.dwitter.net/ I think it is derived from demo + tweet, a demo that fits in a tweet.

      It is a term used by the website dwitter where people post 140 character javascript demos: https://www.dwitter.net/

      I think it is derived from demo + tweet, a demo that fits in a tweet.

      5 votes
  4. andre
    Link
    This was great to read, thanks for sharing!

    This was great to read, thanks for sharing!

    1 vote