atome 0.5.7.0.7 → 0.5.7.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/atome/genesis/particles/property.rb +3 -1
- data/lib/atome/genesis/particles/spatial.rb +13 -3
- data/lib/atome/genesis/particles/utility.rb +16 -8
- data/lib/atome/kernel/universe.rb +2 -1
- data/lib/atome/version.rb +1 -1
- data/lib/molecules/intuition/utillities.rb +18 -5
- data/lib/renderers/html/hierarchy.rb +13 -1
- data/lib/renderers/html/html.rb +24 -5
- data/lib/renderers/html/material.rb +10 -10
- data/lib/renderers/html/property.rb +5 -0
- data/vendor/assets/application/examples/image.rb +1 -2
- data/vendor/assets/application/examples/input.rb +6 -4
- data/vendor/assets/application/examples/list.rb +16 -10
- data/vendor/assets/application/examples/matrix.rb +22 -11
- data/vendor/assets/application/examples/rotate.rb +8 -0
- data/vendor/assets/application/examples/svg_img_to_vector.rb +5 -2
- data/vendor/assets/application/examples/test.rb +57 -584
- data/vendor/assets/application/examples/text_align.rb +3 -0
- data/vendor/assets/application/examples/tools.rb +46 -31
- data/vendor/assets/application/examples/touch.rb +7 -4
- data/vendor/assets/application/examples/vector.rb +0 -3
- data/vendor/assets/src/css/style.css +2 -0
- data/vendor/assets/src/index.html +14 -1
- data/vendor/assets/src/index_opal.html +15 -3
- data/vendor/assets/src/index_server.html +4 -3
- data/vendor/assets/src/index_server_wasm.html +14 -1
- data/vendor/assets/src/index_wasm.html +14 -1
- data/vendor/assets/src/js/third_parties/wavesurfer.min.js +1 -0
- data/vendor/assets/src/medias/images/icons/edit-.svg +1 -1
- data/vendor/assets/src/medias/images/icons/edit.svg +1 -1
- data/vendor/assets/src/medias/images/icons/infos.svg +13 -0
- data/vendor/assets/src/medias/images/icons/mixer.svg +15 -0
- data/vendor/assets/src/medias/images/icons/module.svg +6 -0
- data/vendor/assets/src/medias/images/icons/new.svg +7 -0
- data/vendor/assets/src/medias/images/icons/panel.svg +8 -0
- data/vendor/assets/src/medias/images/icons/play.svg +2 -2
- data/vendor/assets/src/medias/images/icons/save.svg +1 -1
- data/vendor/assets/src/medias/images/icons/sequence.svg +11 -0
- data/vendor/assets/src/medias/images/logos/vie.svg +1 -1
- data/vendor/assets/src/medias/images/shapes/triangle.svg +5 -0
- metadata +12 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a382b0c451af7a259820a14e61aadbf779d0ddba6a67a603ec3940a28d6f252
|
4
|
+
data.tar.gz: a44e9004e18b867645ca3be9681d295997cce04fd7b4c13b8107b546b76e0e2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 956973bed7a67e04f0ec7c2921602b1751afc5281f9869587596be81621eb4cf323f870183ae9dabc5fa9a476f7e67926f8255a65adc6c9daeacdf433dc7c494
|
7
|
+
data.tar.gz: bf54e93e8ab7a82854f6da1a185c2926f7bef89222da5a80b28fedb24a052ec083b2cd6341754116e72f4fb5e10f55d9f67d24df45081d055606b04787a7f7c7
|
@@ -142,6 +142,8 @@ new({ particle: :value }) do |val|
|
|
142
142
|
val
|
143
143
|
end
|
144
144
|
|
145
|
-
new({ particle: :behavior })
|
145
|
+
new({ particle: :behavior, type: :symbol, category: :property })
|
146
146
|
|
147
147
|
new({ particle: :orientation, type: :symbol, category: :property })
|
148
|
+
|
149
|
+
new({ particle: :align , type: :symbol, category: :property })
|
@@ -11,7 +11,17 @@ new({ particle: :position, category: :spatial, type: :int })
|
|
11
11
|
new({ particle: :organise, category: :spatial, type: :string })
|
12
12
|
new({ particle: :spacing, category: :spatial, type: :string })
|
13
13
|
new({ particle: :display, category: :spatial, type: :boolean }) do |params|
|
14
|
-
params = { mode: params } unless params.instance_of? Hash
|
14
|
+
# params = { mode: params } unless params.instance_of? Hash
|
15
|
+
params = case params
|
16
|
+
when true
|
17
|
+
:block
|
18
|
+
when false
|
19
|
+
:none
|
20
|
+
else
|
21
|
+
params
|
22
|
+
|
23
|
+
end
|
24
|
+
params = :none if params == false
|
15
25
|
params
|
16
26
|
end
|
17
27
|
new({ particle: :layout, category: :spatial, type: :int }) do |params|
|
@@ -92,7 +102,7 @@ new({ particle: :center, category: :spatial, type: :hash }) do |params|
|
|
92
102
|
end
|
93
103
|
new ({ particle: :increment, category: :spatial, type: :hash }) do |params|
|
94
104
|
params.each do |particle, value|
|
95
|
-
prev_value=send(particle)
|
96
|
-
send(particle, value+prev_value)
|
105
|
+
prev_value = send(particle)
|
106
|
+
send(particle, value + prev_value)
|
97
107
|
end
|
98
108
|
end
|
@@ -26,8 +26,12 @@ end
|
|
26
26
|
|
27
27
|
new({ particle: :delete, category: :utility, type: :boolean, render: false }) do |params|
|
28
28
|
if params == true
|
29
|
+
|
29
30
|
# We use the tag persistent to exclude color of system object and other default colors
|
30
31
|
unless @tag && (@tag[:persistent] || @tag[:system])
|
32
|
+
# if we are on a matrix we delete cells found & group found
|
33
|
+
cells.delete(true)
|
34
|
+
group.delete(true)
|
31
35
|
# now we detach the atome from it's parent
|
32
36
|
# now we init rendering
|
33
37
|
render(:delete, params)
|
@@ -38,20 +42,25 @@ new({ particle: :delete, category: :utility, type: :boolean, render: false }) do
|
|
38
42
|
parent_found.attached.delete(id_found)
|
39
43
|
end
|
40
44
|
@affect&.each do |affected_atome|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
# Universe.delete(@aid)
|
45
|
+
affected_found = grab(affected_atome)
|
46
|
+
affected_found.apply.delete(id_found)
|
47
|
+
affected_found.refresh
|
48
|
+
end
|
49
|
+
Universe.delete(@aid)
|
47
50
|
end
|
48
51
|
elsif params.instance_of? Hash
|
49
|
-
|
52
|
+
# if we are on a matrix we delete cells found & group found
|
53
|
+
cells.delete(true)
|
54
|
+
group.delete(true)
|
50
55
|
if params[:recursive]
|
51
56
|
unless grab(@id).tag && (grab(@id).tag[:persistent] || grab(@id).tag[:system])
|
52
57
|
attached.each do |atttached_atomes|
|
53
58
|
delete_recursive(atttached_atomes)
|
54
59
|
end
|
60
|
+
# group.each do |el|
|
61
|
+
# delete_recursive(el)
|
62
|
+
# end
|
63
|
+
|
55
64
|
touch(:remove)
|
56
65
|
render(:delete, params)
|
57
66
|
Universe.delete(@id)
|
@@ -68,7 +77,6 @@ new({ particle: :delete, category: :utility, type: :boolean, render: false }) do
|
|
68
77
|
# we check if the params passed is an atome to treat it in a different way
|
69
78
|
puts "write code here : #{apply} , #{attached}"
|
70
79
|
else
|
71
|
-
# alert grab(params).delete(true)
|
72
80
|
send(params, 0) unless params == :id
|
73
81
|
end
|
74
82
|
end
|
@@ -23,6 +23,7 @@ class Universe
|
|
23
23
|
@allow_sync = false # temp server storage sync
|
24
24
|
@connected = false
|
25
25
|
@database_ready = false
|
26
|
+
@tools_root=[]
|
26
27
|
@tools = {}
|
27
28
|
@allow_tool_operations = false
|
28
29
|
@active_tools = []
|
@@ -33,7 +34,7 @@ class Universe
|
|
33
34
|
class << self
|
34
35
|
attr_reader :atomes, :atomes_ids, :renderer_list, :molecule_list, :atome_list, :particle_list, :classes, :counter,
|
35
36
|
:atomes_specificities
|
36
|
-
attr_accessor :connected, :allow_sync, :allow_localstorage, :database_ready, :edit_mode, :tools,
|
37
|
+
attr_accessor :connected, :allow_sync, :allow_localstorage, :database_ready, :edit_mode, :tools,:tools_root,
|
37
38
|
:allow_tool_operations, :active_tools, :atome_preset, :applicable_atomes, :default_selection_style
|
38
39
|
|
39
40
|
def messages
|
data/lib/atome/version.rb
CHANGED
@@ -11,9 +11,12 @@ new(molecule: :input) do |params, bloc|
|
|
11
11
|
limit ||= 15
|
12
12
|
back_col = params.delete(:back)
|
13
13
|
back_col ||= :grey
|
14
|
-
|
15
|
-
|
14
|
+
text_params = params.delete(:text)
|
15
|
+
text_params ||= {}
|
16
16
|
default_text = params.delete(:default)
|
17
|
+
component = params.delete(:component)
|
18
|
+
# component ||= {}
|
19
|
+
|
17
20
|
default_text ||= :input
|
18
21
|
default_parent = if self.instance_of?(Atome)
|
19
22
|
id
|
@@ -29,12 +32,12 @@ new(molecule: :input) do |params, bloc|
|
|
29
32
|
})
|
30
33
|
|
31
34
|
text_input = Atome.new(
|
32
|
-
{ renderers: [:html], type: :text,
|
35
|
+
{ renderers: [:html], type: :text, component: component,
|
33
36
|
data: default_text, left: params[:height] * 20 / 100, top: 0, edit: true, attach: input_back.id, height: params[:height],
|
34
37
|
position: :absolute
|
35
|
-
}
|
38
|
+
}.merge(text_params)
|
36
39
|
)
|
37
|
-
|
40
|
+
# text_input.set()
|
38
41
|
text_input.touch(:down) do
|
39
42
|
input_back.tick(:input)
|
40
43
|
text_input.edit(true)
|
@@ -79,11 +82,13 @@ new(molecule: :input) do |params, bloc|
|
|
79
82
|
input_back.holder(text_input)
|
80
83
|
input_back
|
81
84
|
end
|
85
|
+
|
82
86
|
new(molecule: :list) do |params, _bloc|
|
83
87
|
|
84
88
|
styles_found = params.delete(:styles)
|
85
89
|
element = params.delete(:element)
|
86
90
|
listing = params.delete(:listing)
|
91
|
+
action = params.delete(:action)
|
87
92
|
new_id = params.delete(:id) || identity_generator
|
88
93
|
|
89
94
|
styles_found ||= {
|
@@ -123,7 +128,14 @@ new(molecule: :list) do |params, _bloc|
|
|
123
128
|
listing.each_with_index do |data, index|
|
124
129
|
# let's create the container
|
125
130
|
new_atome = { renderers: renderer_found, attach: list.id }.merge(styles_found).merge({ type: :shape })
|
131
|
+
|
132
|
+
|
126
133
|
el = Atome.new(new_atome)
|
134
|
+
if action
|
135
|
+
el.touch(action[:touch]) do
|
136
|
+
send(action[:method], data)
|
137
|
+
end
|
138
|
+
end
|
127
139
|
el.top((height_found + margin) * index)
|
128
140
|
# now the content
|
129
141
|
Atome.new({ renderers: renderer_found, attach: el.id }.merge(element).merge(data))
|
@@ -131,6 +143,7 @@ new(molecule: :list) do |params, _bloc|
|
|
131
143
|
end
|
132
144
|
list
|
133
145
|
end
|
146
|
+
|
134
147
|
new({ molecule: :slider }) do |params, bloc|
|
135
148
|
|
136
149
|
default_value = params[:value] ||= 0
|
@@ -32,15 +32,27 @@ new({ renderer: :html, method: :apply, type: :string }) do |parent_found, _user_
|
|
32
32
|
html.style("boxShadow", box_shadow)
|
33
33
|
html.style("filter", drop_shadow)
|
34
34
|
when :color
|
35
|
+
|
35
36
|
red = parent_found.red * 255
|
36
37
|
green = parent_found.green * 255
|
37
38
|
blue = parent_found.blue * 255
|
38
39
|
alpha = parent_found.alpha
|
39
|
-
html.style(:backgroundColor, "rgba(#{red}, #{green}, #{blue}, #{alpha})")
|
40
40
|
if type.to_sym ==:border
|
41
41
|
affect.each do |at_found|
|
42
42
|
grab(at_found).html.style(:border, "solid 2px rgba(#{red},#{green},#{blue},#{alpha})")
|
43
43
|
end
|
44
|
+
elsif type.to_sym == :image
|
45
|
+
# alert 'rr'
|
46
|
+
# div[:style][:mixBlendMode] = 'color'
|
47
|
+
# html.style(:mixBlendMode,'color')
|
48
|
+
# html.style(:backgroundColor, "rgba(#{red}, #{green}, #{blue}, #{alpha})")
|
49
|
+
|
50
|
+
# html.image_colorizer("rgba(#{red}, #{green}, #{blue}, #{alpha})")
|
51
|
+
# html.image_colorizer("rgba(#{red}, #{green}, #{blue}, #{alpha})")
|
52
|
+
else
|
53
|
+
html.style(:backgroundColor, "rgba(#{red}, #{green}, #{blue}, #{alpha})")
|
54
|
+
|
55
|
+
|
44
56
|
end
|
45
57
|
when :paint
|
46
58
|
# if when found colors when use it for the gradient , else whe use the colors within the current atome
|
data/lib/renderers/html/html.rb
CHANGED
@@ -505,6 +505,7 @@ STRDELIM
|
|
505
505
|
end
|
506
506
|
end
|
507
507
|
|
508
|
+
|
508
509
|
def transform(property, value = nil)
|
509
510
|
transform_needed = "#{property}(#{value}deg)"
|
510
511
|
@element[:style][:transform] = transform_needed.to_s
|
@@ -577,6 +578,8 @@ STRDELIM
|
|
577
578
|
@element[:style][:"-webkit-backdrop-filter"] = filter_needed
|
578
579
|
end
|
579
580
|
|
581
|
+
|
582
|
+
|
580
583
|
def currentTime(time)
|
581
584
|
@element[:currentTime] = time
|
582
585
|
end
|
@@ -1336,6 +1339,7 @@ STRDELIM
|
|
1336
1339
|
# Table manipulation
|
1337
1340
|
|
1338
1341
|
def table(data)
|
1342
|
+
|
1339
1343
|
table_html = JS.global[:document].createElement('table')
|
1340
1344
|
thead = JS.global[:document].createElement('thead')
|
1341
1345
|
|
@@ -1355,7 +1359,7 @@ STRDELIM
|
|
1355
1359
|
|
1356
1360
|
table_html.appendChild(thead)
|
1357
1361
|
tbody = JS.global[:document].createElement('tbody')
|
1358
|
-
|
1362
|
+
# alert data
|
1359
1363
|
data.each_with_index do |row, row_index|
|
1360
1364
|
tr = JS.global[:document].createElement('tr')
|
1361
1365
|
|
@@ -1385,6 +1389,20 @@ STRDELIM
|
|
1385
1389
|
JS.global[:document].querySelector("##{@id}").appendChild(table_html)
|
1386
1390
|
end
|
1387
1391
|
|
1392
|
+
|
1393
|
+
|
1394
|
+
# Helper function to handle Atome objects
|
1395
|
+
def handle_atome(atome, td_element)
|
1396
|
+
atome.fit(cell_height)
|
1397
|
+
html_element = JS.global[:document].getElementById(atome.id.to_s)
|
1398
|
+
td_element.appendChild(html_element)
|
1399
|
+
html_element[:style][:transformOrigin] = 'top left'
|
1400
|
+
html_element[:style][:position] = 'relative'
|
1401
|
+
atome.top(0)
|
1402
|
+
atome.left(0)
|
1403
|
+
end
|
1404
|
+
|
1405
|
+
|
1388
1406
|
def refresh_table(_params)
|
1389
1407
|
# first we need to extact all atome from the table or they will be deleted by the table refres
|
1390
1408
|
data = @original_atome.data
|
@@ -1422,18 +1440,19 @@ STRDELIM
|
|
1422
1440
|
end
|
1423
1441
|
|
1424
1442
|
def set_td_style(td)
|
1425
|
-
cell_height =
|
1443
|
+
cell_height = @original_atome.component[:height]
|
1444
|
+
cell_width = @original_atome.component[:width]
|
1426
1445
|
td[:style][:border] = '1px solid black'
|
1427
1446
|
td[:style][:backgroundColor] = 'white'
|
1428
1447
|
td[:style][:boxShadow] = '10px 10px 5px #888888'
|
1429
|
-
td[:style][:width] = "#{
|
1430
|
-
td[:style]['min-width'] = "#{
|
1448
|
+
td[:style][:width] = "#{cell_width}px"
|
1449
|
+
td[:style]['min-width'] = "#{cell_width}px"
|
1431
1450
|
td[:style]['max-width'] = "#{cell_height}px"
|
1432
1451
|
td[:style]['min-height'] = "#{cell_height}px"
|
1433
1452
|
td[:style]['max-height'] = "#{cell_height}px"
|
1434
1453
|
td[:style][:height] = "#{cell_height}px"
|
1435
1454
|
td[:style][:overflow] = 'hidden'
|
1436
|
-
{ cell_height: cell_height, cell_width:
|
1455
|
+
{ cell_height: cell_height, cell_width: cell_width }
|
1437
1456
|
end
|
1438
1457
|
|
1439
1458
|
def insert_cell(params)
|
@@ -20,9 +20,11 @@ new({ method: :remove, renderer: :html, type: :string }) do |object_id_to_remove
|
|
20
20
|
when :category
|
21
21
|
html.remove_class(value)
|
22
22
|
else
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
if object_id_to_remove[:all]
|
24
|
+
atome_ids_found = send(object_id_to_remove[:all])
|
25
|
+
atome_ids_found.each do |atome_id|
|
26
|
+
remove(atome_id)
|
27
|
+
end
|
26
28
|
end
|
27
29
|
end
|
28
30
|
end
|
@@ -44,9 +46,7 @@ new({ method: :remove, renderer: :html, type: :string }) do |object_id_to_remove
|
|
44
46
|
html.style("boxShadow", 'none')
|
45
47
|
html.style("filter", 'none')
|
46
48
|
@apply.delete(object_id_to_remove)
|
47
|
-
# apply(@apply)
|
48
49
|
when :border
|
49
|
-
# alert :poipoipoipoipo
|
50
50
|
html.style("border", 'none')
|
51
51
|
html.style("filter", 'none')
|
52
52
|
@apply.delete(object_id_to_remove)
|
@@ -81,20 +81,20 @@ end
|
|
81
81
|
#
|
82
82
|
# html.style(:border, "#{type} #{thickness}px rgba(#{red},#{green},#{blue},#{alpha})")
|
83
83
|
# end
|
84
|
-
new({ method: :thickness, type: :integer, renderer: :html})
|
84
|
+
new({ method: :thickness, type: :integer, renderer: :html })
|
85
85
|
|
86
86
|
# end
|
87
|
-
new({ method: :pattern, type: :integer, renderer: :html})
|
87
|
+
new({ method: :pattern, type: :integer, renderer: :html })
|
88
88
|
|
89
89
|
new({ method: :fill, renderer: :html }) do |params|
|
90
90
|
html.fill(params)
|
91
91
|
end
|
92
92
|
|
93
|
-
new({ method: :opacity, type: :integer, renderer: :html}) do |value|
|
93
|
+
new({ method: :opacity, type: :integer, renderer: :html }) do |value|
|
94
94
|
# html.opacity(value)
|
95
|
-
html.style('opacity',value)
|
95
|
+
html.style('opacity', value)
|
96
96
|
end
|
97
97
|
|
98
98
|
new({ method: :visual, type: :string, renderer: :html, specific: :text }) do |value, _user_proc|
|
99
|
-
|
99
|
+
html.style('fontFamily', value)
|
100
100
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
t = text({ left: 33, top: 33, data: 'data collected', id: :infos })
|
3
|
-
|
4
|
-
inp=
|
3
|
+
b=box({drag: true, id: :titi})
|
4
|
+
inp=b.input({ width: 166,
|
5
5
|
trigger: :up,
|
6
6
|
back: :orange,
|
7
7
|
shadow: {
|
@@ -10,11 +10,13 @@ inp=A.input({ width: 166,
|
|
10
10
|
invert: true,
|
11
11
|
red: 0, green: 0, blue: 0, alpha: 0.9
|
12
12
|
},
|
13
|
-
|
14
|
-
|
13
|
+
component: {size: 8},
|
14
|
+
# attach: :intuition,
|
15
|
+
text: { color: :black , top: 5, left: 6},
|
15
16
|
smooth: 3,
|
16
17
|
left: 66,
|
17
18
|
top: 33,
|
19
|
+
# height: 8,
|
18
20
|
default: 'type here'
|
19
21
|
}) do |val|
|
20
22
|
|
@@ -23,14 +23,15 @@ listing = [
|
|
23
23
|
{ data: :hi },
|
24
24
|
{ data: :ho }
|
25
25
|
]
|
26
|
-
b=box({drag: true})
|
26
|
+
b = box({ drag: true })
|
27
27
|
list_1 = grab(:intuition).list({
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
28
|
+
styles: styles,
|
29
|
+
element: element,
|
30
|
+
listing: listing,
|
31
|
+
left: 33,
|
32
|
+
attach: b.id,
|
33
|
+
action: {touch: :down, method: :my_method }
|
34
|
+
})
|
34
35
|
|
35
36
|
# test2
|
36
37
|
|
@@ -50,22 +51,27 @@ element = { width: 25,
|
|
50
51
|
# left: 10,
|
51
52
|
# top: :center,
|
52
53
|
color: :orange,
|
53
|
-
type: :shape
|
54
|
+
type: :shape
|
55
|
+
}
|
54
56
|
|
55
57
|
listing = [
|
56
58
|
{ smooth: '100%' },
|
57
|
-
{ color: :red },
|
59
|
+
{ color: :red, data: :poilu },
|
58
60
|
{},
|
59
61
|
{},
|
60
62
|
|
61
63
|
{ width: 33 },
|
62
64
|
{},
|
63
65
|
]
|
66
|
+
def my_method(val=nil)
|
67
|
+
alert "so_cool : #{val}"
|
68
|
+
end
|
64
69
|
|
65
70
|
list_2 = A.list({ left: 300,
|
66
71
|
styles: styles,
|
67
72
|
element: element,
|
68
|
-
listing: listing
|
73
|
+
listing: listing,
|
74
|
+
action: {touch: :down, method: :my_method }
|
69
75
|
})
|
70
76
|
wait 1 do
|
71
77
|
list_2.left(list_1.width)
|
@@ -1,18 +1,14 @@
|
|
1
1
|
# # frozen_string_literal: true
|
2
2
|
#
|
3
|
-
matrix_zone = box({ width: 333, height: 333, drag: true, id: :the_box })
|
3
|
+
matrix_zone = box({ width: 333, height: 333, drag: true, id: :the_box, color: {alpha: 0.4} })
|
4
4
|
#
|
5
5
|
# # matrix creation
|
6
6
|
main_matrix = matrix_zone.matrix({ id: :vie_0, rows: 8, columns: 8, spacing: 6, size: '100%' })
|
7
|
-
main_matrix.smooth(
|
7
|
+
main_matrix.smooth(10)
|
8
8
|
main_matrix.color(:red)
|
9
9
|
|
10
|
-
grab(:view).on(:resize) do
|
11
10
|
|
12
|
-
|
13
|
-
#
|
14
|
-
# matrix_to_treat=main_matrix
|
15
|
-
#
|
11
|
+
|
16
12
|
# #######################################################@
|
17
13
|
matrix_to_treat = main_matrix.cells
|
18
14
|
matrix_to_treat.color(:blue)
|
@@ -30,7 +26,7 @@ col_2 = color({ red: 1, id: :red_col })
|
|
30
26
|
wait 3 do
|
31
27
|
matrix_to_treat.paint({ gradient: [col_1.id, col_2.id], direction: :top })
|
32
28
|
end
|
33
|
-
|
29
|
+
#
|
34
30
|
# ###################
|
35
31
|
|
36
32
|
test_cell = grab(:vie_0_2_3)
|
@@ -65,13 +61,28 @@ matrix_to_treat.touch(:down) do |event|
|
|
65
61
|
current_cell.color(:blue)
|
66
62
|
current_cell.selected(true)
|
67
63
|
end
|
68
|
-
|
64
|
+
matrix_to_treat.smooth(9)
|
69
65
|
main_matrix.color(:red)
|
70
|
-
|
66
|
+
matrix_to_treat.color(:yellow)
|
71
67
|
wait 5 do
|
72
68
|
main_matrix.resize_matrix({width: 555, height: 555})
|
73
69
|
end
|
74
70
|
|
71
|
+
wait 7 do
|
72
|
+
main_matrix.display(false)
|
73
|
+
wait 1 do
|
74
|
+
main_matrix.display(true)
|
75
|
+
wait 1 do
|
76
|
+
main_matrix.delete(true)
|
77
|
+
wait 1 do
|
78
|
+
main_matrix = matrix_zone.matrix({ id: :vie_0, rows: 8, columns: 8, spacing: 6, size: '100%' })
|
79
|
+
end
|
80
|
+
end
|
81
|
+
# main_matrix.color(:red)
|
82
|
+
end
|
83
|
+
end
|
75
84
|
|
76
|
-
|
85
|
+
# b=box
|
86
|
+
# b.circle
|
87
|
+
# b.delete(true)
|
77
88
|
|
@@ -1,6 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
grab(:black_matter).image({ path: 'medias/images/icons/color.svg', id: :atomic_logo, width: 33, left: 333 })
|
4
|
-
vector({ width: 333, height: 333, id: :my_placeholder })
|
4
|
+
img=vector({ width: 333, height: 333, id: :my_placeholder })
|
5
5
|
A.fetch_svg({ source: :atomic_logo, target: :my_placeholder })
|
6
|
-
|
6
|
+
wait 2 do
|
7
|
+
img.color(:cyan)
|
8
|
+
end
|
9
|
+
# grab(:atomic_logo).delete(true)
|