Sha256: 72cbf06808c491c05baca37fb21fce8c03a1fd0807beec09c3e74b6acc0a9330

Contents?: true

Size: 1.08 KB

Versions: 3

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

c = circle
# FIXME: bug we creating an object like this c = circle({ red: 1 })
# FIXME: bug we using a color twice or more only the first is colored: c = { red: 1 }; a.color(c),b.color(c)
# Example:
# c={ red: 1 }
# a=circle
# b=box({ left: 300 })
# a.color(c)
# b.color(c)
wait 1 do
  # the most performant way :
  # please note that in this case:  render , id and type params must place in order
  c.color(
    { render: [:html], id: :c319, type: :color,
      red: 1, green: 1, blue: 0.15, alpha: 0.6 }
  )
end

wait 2 do
  # now we overload the color
  c.color({ red: 1 })
end

wait 4 do
  # now the easy way
  c.color(:yellow)
  wait 1 do
    c.color({ green: 1, blue: 0.69, alpha: 1 })
  end
end

wait 5 do
  d=c.color(:red)
  wait 1 do
    d.blue(0)
  end

  wait 2 do
    d.red(1)
  end
end

circle({id: :the_circle})


wait 2 do
  the_col=Atome.new({ color: { renderers: [:browser], id: :c31, type: :color, parents: [], children: [],
                               left: 33, top: 66, red: 0, green: 0.15, blue: 0.7, alpha: 0.6 } })
  the_col.parents([:the_circle])
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
atome-0.5.1.9 vendor/assets/build/medias/rubies/examples/color.rb
atome-0.5.1.4 vendor/assets/build/medias/rubies/examples/color.rb
atome-0.5.1.1 vendor/assets/build/medias/rubies/examples/color.rb