Sha256: 477617f201250ab3544b9ee67ccb2bcba0e0221992c3571f514f2496b80ede4a

Contents?: true

Size: 999 Bytes

Versions: 27

Compression:

Stored size: 999 Bytes

Contents

# frozen_string_literal: true

b = box

16.times do |index|
  width_found = b.width
  b.duplicate({ left: b.left + index * (width_found + 45), top: 0, category: :matrix })
end


Universe.user_atomes.each do |atome_id|
  atome_found = grab(atome_id)
  if atome_found.type == :shape
    atome_found.color(:orange)
    atome_found.smooth(200)
    atome_found.top(200)
  end
end

random_found =Universe.user_atomes.sample(7)
random_found.each do |atome_id|
  atome_found = grab(atome_id)
  if atome_found.type == :shape
    atome_found.top(rand(600))
    atome_found.width(rand(120))
    atome_found.height(rand(120))
    atome_found.smooth(rand(120))
    atome_found.color(:red)
  end
end

random_found =Universe.user_atomes.sample(9)
random_found.each do |atome_id|
  atome_found = grab(atome_id)
  if atome_found.type == :shape
    atome_found.left(rand(700))
    atome_found.width(rand(120))
    atome_found.height(rand(120))
    atome_found.smooth(rand(120))
    atome_found.color(:blue)
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
atome-0.5.6.2.5 vendor/assets/application/examples/random.rb
atome-0.5.6.2.4 vendor/assets/application/examples/random.rb
atome-0.5.6.2.3 vendor/assets/application/examples/random.rb
atome-0.5.6.2.1 vendor/assets/application/examples/random.rb
atome-0.5.6.2.0 vendor/assets/application/examples/random.rb
atome-0.5.6.1.9 vendor/assets/application/examples/random.rb
atome-0.5.6.1.4 vendor/assets/application/examples/random.rb
atome-0.5.6.1.1 vendor/assets/application/examples/random.rb
atome-0.5.6.1.0 vendor/assets/application/examples/random.rb
atome-0.5.6.0.4 vendor/assets/application/examples/random.rb
atome-0.5.6.0.3 vendor/assets/application/examples/random.rb
atome-0.5.6.0.2 vendor/assets/application/examples/random.rb
atome-0.5.5.9.1 vendor/assets/application/examples/random.rb
atome-0.5.5.8.7 vendor/assets/application/examples/random.rb
atome-0.5.5.8.5 vendor/assets/application/examples/random.rb
atome-0.5.5.8.1 vendor/assets/application/examples/random.rb
atome-0.5.5.7.7 vendor/assets/application/examples/random.rb
atome-0.5.5.7.5 vendor/assets/application/examples/random.rb
atome-0.5.5.7.3 vendor/assets/application/examples/random.rb
atome-0.5.5.7.1 vendor/assets/application/examples/random.rb