Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Parallax background!

  • Loading branch information...
commit c89d208b0a9372a6c4e59456b21b40933974fa23 1 parent 0efd395
@pda authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  asc.rb
View
3  asc.rb
@@ -74,7 +74,8 @@ def set x, y, char
@pixels[x][y] = char
end
def get x, y
- @pixels[x][y] || " "
+ n = (233.1 - 1.1 * Math.sin((x + Time.new.to_f * 10) / 5 + y / 5)).to_i
+ @pixels[x][y] || "\033[48;5;#{n}m \033[0m"
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.