class Particle attr_accessor :x, :y def initialize(x, y) @x, @y = x, y end end
@points = []
Run: ruby sketch.rb Draw. Experiment. Break things. Repeat. ruby sketch
svg.rect(x: 0, y: 0, width: '100%', height: '100%', fill: '#111') class Particle attr_accessor :x, :y def initialize(x, y)
class Particle attr_accessor :x, :y def initialize(x, y) @x, @y = x, y end end
@points = []
Run: ruby sketch.rb Draw. Experiment. Break things. Repeat.
svg.rect(x: 0, y: 0, width: '100%', height: '100%', fill: '#111')