Sha256: 6d52eb7da46596bed3f5fec21849912d516e8ffe7437bae83673de4c199d6d53

Contents?: true

Size: 1.31 KB

Versions: 1

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

1 entries across 1 versions & 1 rubygems

Version Path
atome-0.5.2.8 vendor/assets/src/medias/rubies/examples/_2_solve.rb