Sha256: e3cfff3f12984fea3d048556a2d875b24a4ebad095377a090492bf1a9ec82292
Contents?: true
Size: 458 Bytes
Versions: 10
Compression:
Stored size: 458 Bytes
Contents
# A millisecond is 1/1000 of a second. # Processing keeps track of the number of milliseconds a program has run. # By modifying this number with the modulo(%) operator, # different patterns in time are created. attr_reader :scale def setup size 640, 360 no_stroke @scale = width/10 end def draw scale.times do |i| color_mode RGB, (i + 1) * scale * 10 fill millis % ((i + 1) * scale * 10) rect i * scale, 0, scale, height end end
Version data entries
10 entries across 10 versions & 1 rubygems