Sha256: 57ea30caec874a755433f10d61d711de2fbce33d33bacaac6c3badd6d28a57c2

Contents?: true

Size: 891 Bytes

Versions: 4

Compression:

Stored size: 891 Bytes

Contents

# frozen_string_literal: true

# TODO : clones alteration must be bidirectional, to do so :
# 1 - we may create an atome type 'clone' then add a ' pre_render_clones option' when rendering clones property
# 2 - this pre_render_clones option, will catch alterations and throw it the the original atome
# 3 - we also add a new particle call mirror that holds the particle's list that will reverse intrication

b = box({ color: :red, smooth: 6, id: :the_box })

b.clones([{ left: 300, top: 300, color: :blue, intricate: [:width, :attached,:height ] },
          {left: 600, top: 366, color: :green , intricate: [:left, :height ]}])

wait 1 do
  b.width(190)
end

wait 2 do
  b.height(180)
end

wait 3 do
  b.left(180)
end

grab(:the_box_clone_0).smooth(33)
#
grab(:the_box_clone_1).rotate(33)


wait 5 do
  b.clones.value.each do |clone_found|
    grab(clone_found[:id]).delete(true)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
atome-0.5.3.7.3 vendor/assets/src/medias/rubies/examples/clone.rb
atome-0.5.3.7.2 vendor/assets/src/medias/rubies/examples/clone.rb
atome-0.5.3.4 vendor/assets/src/medias/rubies/examples/clone.rb
atome-0.5.3.2 vendor/assets/src/medias/rubies/examples/clone.rb