Sha256: 4e755717c0dc126fe4f53b124ed85e63e0daf771f372b1bd92f2b4c4251ea4b9

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 KB

Contents

# frozen_string_literal: true

# Text in object
a=Atome.new(code: { type: :code, renderers: [:headless], parents: [], children: [] }) do  |params_found|
  puts "the param is #{params_found}"
end
a.run(:super)
c=element do |params_found|
  puts "you want me to print:  #{params_found}"
  text({ data: :hello })
end

c.run('it works')

# object in object

a = box({ width: 333, height: 333, id: :the_boxy })
a.color(:red)
b = a.box({ width: 33, height: 33, id: :the_box, drag: true })
b.color(:black)

# color doesn't work
circle({ id: :circle_123, color: :cyan, left: 233 })


# big performance problem plus params as left is not interpreted

i = 0
while i < 16
  b = box({ width: 33, height: 33 })
  b.parents([:the_grid])
  b.color(:red)
  b.left((33 + 10) * i)
  i += 1
  # b.drag(true)
end


# .color (return the color itself instead of the box ) and .red retrun itself too so it's impossible to set green and blue
# another problem : when steeing .red it reset the whole color object and remove green an blue components
box({id: :mybox})
grab(:my_box).smooth(6).color(:black).red(0.6).green(0.6).blue(0.6)

# color can't be changed easily

b=box
b.color.red(1)

# box in box doesn't work( incorrect node tree error)
b=box({id: :mybox, width: 666, height: 555})

b.box()

# atome i, atome using preset doesn't work

b=box
c=b.box
c.left(200)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
atome-0.5.2.7 vendor/assets/build/medias/rubies/examples/_2_solve.rb
atome-0.5.2.5 vendor/assets/build/medias/rubies/examples/_2_solve.rb