atome 0.5.7.3.5 → 0.5.7.3.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1 -1
  3. data/documentation/deep learning/architecture.txt +4 -4
  4. data/documentation/deep learning/basic_infos.txt +2 -2
  5. data/documentation/deep learning/example_of_users_code.rb +43 -43
  6. data/documentation/installation/buiding_atome.md +2 -2
  7. data/lib/atome/atome.rb +1 -1
  8. data/lib/atome/extensions/atome.rb +28 -19
  9. data/lib/atome/genesis/atomes.rb +1 -1
  10. data/lib/atome/genesis/genesis.rb +19 -19
  11. data/lib/atome/genesis/particles/geometry.rb +3 -3
  12. data/lib/atome/genesis/particles/hierarchy.rb +56 -21
  13. data/lib/atome/genesis/particles/material.rb +13 -1
  14. data/lib/atome/genesis/particles/property.rb +27 -0
  15. data/lib/atome/genesis/particles/utility.rb +199 -91
  16. data/lib/atome/genesis/sparkle.rb +1 -1
  17. data/lib/atome/kernel/black_matter.rb +3 -0
  18. data/lib/atome/utilities/utilities.rb +19 -8
  19. data/lib/atome/version.rb +2 -1
  20. data/lib/molecules/intuition/tools.rb +30 -30
  21. data/lib/molecules/intuition/utilities.rb +272 -109
  22. data/lib/platform_specific/opal/extensions/object.rb +1 -1
  23. data/lib/renderers/html/html.rb +26 -1
  24. data/vendor/assets/application/examples/account.rb +35 -0
  25. data/vendor/assets/application/examples/actor&role.rb +23 -0
  26. data/vendor/assets/application/examples/animation.rb +1 -1
  27. data/vendor/assets/application/examples/applications.rb +121 -0
  28. data/vendor/assets/application/examples/atome.rb +1 -1
  29. data/vendor/assets/application/examples/attach.rb +7 -7
  30. data/vendor/assets/application/examples/attached.rb +13 -15
  31. data/vendor/assets/application/examples/basic_understanding.rb +1 -1
  32. data/vendor/assets/application/examples/buttons.rb +47 -0
  33. data/vendor/assets/application/examples/clear.rb +12 -12
  34. data/vendor/assets/application/examples/clones&monitoring.rb +1 -1
  35. data/vendor/assets/application/examples/delete.rb +19 -14
  36. data/vendor/assets/application/examples/detach.rb +8 -0
  37. data/vendor/assets/application/examples/dig.rb +1 -1
  38. data/vendor/assets/application/examples/display.rb +6 -6
  39. data/vendor/assets/application/examples/drag.rb +1 -1
  40. data/vendor/assets/application/examples/duplicate.rb +6 -6
  41. data/vendor/assets/application/examples/exchange.rb +17 -0
  42. data/vendor/assets/application/examples/generator_and_build.rb +3 -3
  43. data/vendor/assets/application/examples/hierarchy.rb +5 -5
  44. data/vendor/assets/application/examples/layout.rb +1 -1
  45. data/vendor/assets/application/examples/preset.rb +3 -3
  46. data/vendor/assets/application/examples/scheduler.rb +0 -1
  47. data/vendor/assets/application/examples/selected.rb +1 -1
  48. data/vendor/assets/application/examples/shapes.rb +1 -1
  49. data/vendor/assets/application/examples/size.rb +1 -1
  50. data/vendor/assets/application/examples/test.rb +0 -320
  51. data/vendor/assets/application/examples/tools.rb +136 -192
  52. data/vendor/assets/application/examples/unfasten.rb +17 -0
  53. data/vendor/assets/server/atome_server.rb +1 -0
  54. data/vendor/assets/server/eDen.rb +68 -71
  55. data/vendor/assets/src/index_server_wasm.html +4 -0
  56. data/vendor/assets/src/js/atome/specific/wasm.js +22 -4
  57. data/vendor/assets/src/js/third_parties/three.min.js +1 -1
  58. data/vendor/assets/src/medias/fonts/Roboto/LICENSE.txt +1 -1
  59. data/vendor/assets/src/medias/fonts/Roboto_Slab/LICENSE.txt +1 -1
  60. metadata +9 -2
@@ -0,0 +1,35 @@
1
+ # # frozen_string_literal: true
2
+ b=box
3
+
4
+ b.touch(:down) do
5
+ A.message({ action: :authentication, data: { table: :user, particles: { email: 'tre@tre.tre', password: 'poipoi' } } }) do |response|
6
+ alert "=> #{response}"
7
+ end
8
+ end
9
+
10
+ #
11
+ #
12
+ # # # 1 login attempt
13
+
14
+ wait 1 do
15
+ A.message({ action: :authentication, data: { table: :user, particles: { email: 'tre@tre.tre', password: 'poipoi' } } }) do |response|
16
+ alert "=> #{response}"
17
+ end
18
+ wait 1 do
19
+ A.message({ action: :authentication, data: { table: :user, particles: { email: 'tre@tre.tre', password: 'poipoi' } } }) do |response|
20
+ alert "=> #{response}"
21
+ end
22
+ end
23
+ end
24
+ #
25
+ # 2 account creation attempt
26
+ # wait 1 do
27
+ # A.message({ action: :account_creation, data: { email: 'tre@tre.tre', password: 'poipoi', user_id: 'Nico' } }) do |response|
28
+ # puts response
29
+ # end
30
+ #
31
+ # end
32
+
33
+ # string=hello
34
+ #
35
+ # puts JS.global.sha256(string.to_s)
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ bbb = box({left: 66})
4
+ ccc = bbb.circle(id: :the_circle)
5
+
6
+ bbb.role(:first)
7
+ bbb.role(:second)
8
+ bbb.delete(:left)
9
+ bbb.delete(:role)
10
+
11
+ bbb.role(:fourth)
12
+ bbb.role(:five)
13
+ bbb.role({ remove: :last })
14
+
15
+ bbb.actor({ the_circle: :buttons })
16
+ bbb.actor({ the_circle: :dummy })
17
+ bbb.actor({ the_circle: :menu })
18
+
19
+ bbb.actor({ remove: { the_circle: :dummy } })
20
+
21
+ puts "1 ===> #{bbb.role}"
22
+ puts "2 ===> #{bbb.actor}"
23
+ puts "3 ===> #{ccc.role}"
@@ -10,7 +10,7 @@
10
10
  # red: 0, green: 0, blue: 0, alpha: 1
11
11
  # })
12
12
  #
13
- # Atome.new(animation: { renderers: [:browser], id: :the_animation1, type: :animation, attach: [],attached: []})
13
+ # Atome.new(animation: { renderers: [:browser], id: :the_animation1, type: :animation, attach: [],fasten: []})
14
14
  # aa = animation({
15
15
  # targets: %i[my_box the_circle],
16
16
  # begin: {
@@ -0,0 +1,121 @@
1
+ # frozen_string_literal: true
2
+
3
+ a = application({
4
+ id: :arp,
5
+ margin: 3,
6
+ # circle: { id: :test, color: :red },
7
+ # menu: { width: 220, height: 33, depth: 333, color: :black },
8
+ })
9
+
10
+ page1_code = lambda do |back|
11
+ alert :kooly
12
+ end
13
+
14
+ verif = lambda do
15
+ b = box({ id: :ty, left: 90, top: 90 })
16
+ b.touch(true) do
17
+ alert grab(:mod_1).touch
18
+ end
19
+
20
+ # a=grab('page2').circle({id: :heu, color: :black})
21
+ # a.color(:red)
22
+ # alert 'ok'
23
+ end
24
+
25
+ page1 = {
26
+ id: :page1,
27
+ color: :cyan,
28
+ name: :accueil,
29
+ footer: { color: :green, height: 22 },
30
+ header: { color: :yellow },
31
+ left_side_bar: { color: :yellowgreen },
32
+ right_side_bar: { color: :blue },
33
+ # box: { id: :mod_1, touch: {tap: true, code: page1_code} }
34
+ }
35
+
36
+ color({ id: :titi, red: 1 })
37
+ page2 = { id: :page2,
38
+ color: :white,
39
+ menu: false,
40
+ run: verif,
41
+ box: { id: :mod_1, left: 333, top: 123, touch: { down: true, code: page1_code } }
42
+
43
+ }
44
+
45
+
46
+
47
+ page0 = { id: :page0,
48
+ color: :purple,
49
+
50
+ }
51
+ a.page(page0)
52
+ a.page(page1)
53
+ a.page(page2)
54
+ a.page({ id: :page3,
55
+ color: :red,
56
+ # run: verif,
57
+ # box: { id: :mod_1,left: 333, touch: {tap: :down, code: page1_code} }
58
+ })
59
+ # wait 1 do
60
+ # a.page(page2)
61
+ # wait 1 do
62
+ # a.page(page1)
63
+ # puts 'second load'
64
+ # wait 5 do
65
+ # a.page(page3)
66
+ # wait 5 do
67
+ # a.page(page2)
68
+ # puts 'third load'
69
+ # end
70
+ # end
71
+ # end
72
+ # end
73
+ # c=grab(:page1).circle({left: 99})
74
+ # c.touch(true) do
75
+ # alert grab(:mod_1).inspect
76
+ # end
77
+
78
+ # wait 1 do
79
+ # a.page(page2)
80
+ # end
81
+ # wait 2 do
82
+ # a.page(page1)
83
+ # end
84
+ #
85
+ # wait 3 do
86
+ # a.page(page2)
87
+ # end
88
+ #
89
+ # # wait 5 do
90
+ # # a.page(page0)
91
+ # # end
92
+ # #
93
+ # # wait 6 do
94
+ # # a.page(page1)
95
+ # # end
96
+
97
+ # wait 4 do
98
+ # cc=box
99
+ # cc.touch(true) do
100
+ # alert grab(:heu).inspect
101
+ # end
102
+ # end
103
+
104
+ # a=lambda do |_val|
105
+ # grab(:testing).color(:red)
106
+ # wait 1 do
107
+ # grab(:testing).delete({recursive: true})
108
+ # end
109
+ # end
110
+ #
111
+ # c=circle
112
+ # c.touch(true) do
113
+ # b=box({id: :testing, left: 99})
114
+ # b.touch({ tap: true , code: a})
115
+ # end
116
+ # wait 1 do
117
+ a.show(:page1)
118
+ # # alert :kool
119
+ # end
120
+
121
+
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Atome.new( { renderers: [:html], attach: :view,id: :my_test_box, type: :shape, apply: [:shape_color],
4
- left: 120, top: 0, width: 100, smooth: 15, height: 100, overflow: :visible, attached: [], center: true
4
+ left: 120, top: 0, width: 100, smooth: 15, height: 100, overflow: :visible, fasten: [], center: true
5
5
  })
@@ -2,14 +2,14 @@
2
2
 
3
3
  # Here is the attach explanation and example
4
4
  # the attach method in atome is both a getter and a setter
5
- # attach and attached particles serve the same purpose but just in the opposite direction
5
+ # attach and fasten particles serve the same purpose but just in the opposite direction
6
6
  # please note that atome.attach([:atome_id]) means that atome will be the parent of the atome with the id :atome_id
7
- # to sum up : attach and attached are both setter and getter :
7
+ # to sum up : attach and fasten are both setter and getter :
8
8
  # a.attach(b.ib) will attach the current object to the IDs passed in the params. The current atome will be the child of the the atomes width IDS passed in the the params,
9
9
  # a.attach(b.ib) means (insert 'b' into 'a') or a is parent b is child
10
10
 
11
- # while a.attached(b.id) (insert 'a' into 'b')is the opposite to attached it will attach IDs passed in the params to the current atome. The current atome will be the parent of of the the atomes width IDS passed in the the params
12
- # a.attached(b.ib) means (insert 'a' into 'b') or a is child b is parent
11
+ # while a.fasten(b.id) (insert 'a' into 'b')is the opposite to fasten it will attach IDs passed in the params to the current atome. The current atome will be the parent of of the the atomes width IDS passed in the the params
12
+ # a.fasten(b.ib) means (insert 'a' into 'b') or a is child b is parent
13
13
 
14
14
  # atome.attach([:atome_id]) means that atome will be the child of the atome with the id :atome_id
15
15
  # Here is how to use it as a setter :
@@ -27,8 +27,8 @@ box({ id: :my_test_box })
27
27
  wait 1 do
28
28
  b.attach(:c_12)
29
29
  # Here is how to use it as a getter :
30
- # to retrieve witch atomes b315 is attached to to the atome c_12 just type
30
+ # to retrieve witch atomes b315 is fasten to to the atome c_12 just type
31
31
  puts b.attach # => [:c_12]
32
- # to retrieve atome attached to the atome c_12 just type tha other method
33
- puts c.attached #=> [:b_1]
32
+ # to retrieve atome fasten to the atome c_12 just type tha other method
33
+ puts c.fasten #=> [:b_1]
34
34
  end
@@ -1,15 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Here is the fasten explanation and example :
3
4
 
4
- # Here is the attached explanation and example :
5
-
6
- # the attached method in atome is both a getter and a setter
7
- # attach and attached particles serve the same purpose but just in the opposite direction
5
+ # the fasten method in atome is both a getter and a setter
6
+ # attach and fasten particles serve the same purpose but just in the opposite direction
8
7
  # please note that atome.attach([:atome_id]) means that atome will be the parent of the atome with the id :atome_id
9
- # to sum up : attach and attached are both setter and getter :
8
+ # to sum up : attach and fasten are both setter and getter :
10
9
  # attach will attach the current object to the IDs passed in the params. The current atome will be the child of the the atomes width IDS passed in the the params,
11
- # while attached is the opposite to attached it will attach IDs passed in the params to the current atome. The current atome will be the parent of of the the atomes width IDS passed in the the params
12
-
10
+ # while fasten is the opposite to fasten it will attach IDs passed in the params to the current atome. The current atome will be the parent of of the the atomes width IDS passed in the the params
13
11
 
14
12
  # Here is how to use it as a setter :
15
13
  grab(:black_matter).color({ red: 1, green: 0.6, blue: 0.6, id: :active_color })
@@ -19,23 +17,23 @@ b = box({ left: 99, drag: true, id: :the_box })
19
17
  wait 1 do
20
18
  b.apply([:active_color])
21
19
  end
22
- c = circle({ left: 333, id: :the_circle })
20
+ c = circle({ left: 333, id: :the_circle, drag: true })
23
21
  wait 1 do
24
22
 
25
23
  puts "before: -------"
26
- puts "c.attach #{c.attach}"
27
- puts "b.attached : #{b.attached}"
24
+ puts "c.attach #{c.attach}"
25
+ puts "b.fasten : #{b.fasten}"
28
26
  puts "b.color : #{b.color}"
29
27
  puts "c.color : #{c.color}"
30
28
  c.apply(:inactive_color)
31
- b.attached([c.id])
29
+ b.fasten([c.id])
32
30
  puts "After: -------"
33
31
 
34
32
  # Here is how to use it as a getter :
35
- # to retrieve witch atomes b315 is attached to to the atome c_12 just type
36
- puts "c.attach #{c.attach}" # => [:the_box]
37
- # to retrieve atome attached to the atome c_12 just type tha other method
38
- puts "b.attached : #{b.attached}" #=> [:the_circle]
33
+ # to retrieve witch atomes b315 is fasten to to the atome c_12 just type
34
+ puts "c.attach #{c.attach}" # => [:the_box]
35
+ # to retrieve atome fasten to the atome c_12 just type tha other method
36
+ puts "b.fasten : #{b.fasten}" #=> [:the_circle]
39
37
  puts "b.color : #{b.color}"
40
38
  puts "c.color : #{c.color}"
41
39
  end
@@ -49,6 +49,6 @@ a.apply([:box_color])
49
49
  wait 2 do
50
50
  # a bit less efficient and a bit more processor intensive solution is to use the box preset, that render a box too
51
51
  b=box
52
- # we can add a color atome onto the new atome my_shape. as stated before for some atome types such as color, shadows ,the relation between the two atomes won't be attach and attached but apply and affect instead the atome color with the particle red onto the
52
+ # we can add a color atome onto the new atome my_shape. as stated before for some atome types such as color, shadows ,the relation between the two atomes won't be attach and fasten but apply and affect instead the atome color with the particle red onto the
53
53
  b.color(:red)
54
54
  end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+
4
+
5
+ ############
6
+
7
+ box({ id: :the_box, drag: true, color: { alpha: 2 } })
8
+
9
+ menu1_code = lambda do
10
+ puts :menu1_code
11
+ end
12
+ menu2_code = lambda do
13
+ puts :menu2
14
+ end
15
+
16
+ but = buttons({
17
+ id: :menu1,
18
+ attach: :the_box,
19
+ inactive: { text: { color: :gray }, width: 66, height: 12, spacing: 3, disposition: :horizontal,
20
+ color: :orange, margin: { left: 33, top: 12 } },
21
+ active: { text: { color: :white, shadow: {} }, color: :blue, shadow: {} },
22
+ item_1: {
23
+ text: :acceuil,
24
+ code: menu1_code
25
+ },
26
+ item_2: {
27
+ text: :page_2,
28
+ code: menu2_code
29
+
30
+ },
31
+ item_3: {
32
+ text: :page_3,
33
+ code: lambda { puts :item_3_touched }
34
+ },
35
+ })
36
+
37
+ c = text({ top: 99, left: 99, data: 'add a button' })
38
+
39
+ c.touch(:down) do
40
+ but.add_button(new_button: {
41
+ text: :button1,
42
+ code: lambda { puts :button1_touched }
43
+ })
44
+ end
45
+
46
+
47
+ # TODO: remove menu_item ,reset_menu, reorder, delete
@@ -18,56 +18,56 @@ end
18
18
 
19
19
 
20
20
  #Atome.new(
21
- # { renderers: [], id: :eDen, type: :element, tag: { system: true }, attach: [], attached: [] }
21
+ # { renderers: [], id: :eDen, type: :element, tag: { system: true }, attach: [], fasten: [] }
22
22
  # )
23
23
  # Atome.new(
24
24
  # { renderers: [], id: :user_view, type: :element, tag: { system: true },
25
- # attach: [:eDen], attached: [] }
25
+ # attach: [:eDen], fasten: [] }
26
26
  # )
27
27
  #
28
28
  # # color creation
29
29
  # Atome.new(
30
30
  # { renderers: default_render, id: :view_color, type: :color, tag: ({ system: true, persistent: true }),
31
- # red: 0.15, green: 0.15, blue: 0.15, alpha: 1, top: 12, left: 12, diffusion: :linear, attach: [], attached: [] }
31
+ # red: 0.15, green: 0.15, blue: 0.15, alpha: 1, top: 12, left: 12, diffusion: :linear, attach: [], fasten: [] }
32
32
  # )
33
33
  #
34
34
  # Atome.new(
35
35
  # { renderers: default_render, id: :shape_color, type: :color, tag: ({ system: true, persistent: true }),
36
- # red: 0.4, green: 0.4, blue: 0.4, alpha: 1, attach: [], attached: [] }
36
+ # red: 0.4, green: 0.4, blue: 0.4, alpha: 1, attach: [], fasten: [] }
37
37
  # )
38
38
  #
39
39
  # Atome.new(
40
40
  # { renderers: default_render, id: :box_color, type: :color, tag: ({ system: true, persistent: true }),
41
- # red: 0.5, green: 0.5, blue: 0.5, alpha: 1, attach: [], attached: [] }
41
+ # red: 0.5, green: 0.5, blue: 0.5, alpha: 1, attach: [], fasten: [] }
42
42
  # )
43
43
  #
44
44
  # Atome.new(
45
45
  # { renderers: default_render, id: :invisible_color, type: :color, tag: ({ system: true, persistent: true }),
46
- # red: 0, green: 0, blue: 0, alpha: 1, attach: [], attached: [] }
46
+ # red: 0, green: 0, blue: 0, alpha: 1, attach: [], fasten: [] }
47
47
  # )
48
48
  #
49
49
  # Atome.new(
50
50
  # { renderers: default_render, id: :text_color, type: :color, tag: ({ system: true, persistent: true }),
51
- # red: 0.9, green: 0.9, blue: 0.9, alpha: 1, attach: [], attached: [] }
51
+ # red: 0.9, green: 0.9, blue: 0.9, alpha: 1, attach: [], fasten: [] }
52
52
  # )
53
53
  #
54
54
  # Atome.new(
55
55
  # { renderers: default_render, id: :circle_color, type: :color, tag: ({ system: true, persistent: true }),
56
- # red: 0.6, green: 0.6, blue: 0.6, alpha: 1, attach: [], attached: [] }
56
+ # red: 0.6, green: 0.6, blue: 0.6, alpha: 1, attach: [], fasten: [] }
57
57
  # )
58
58
  #
59
59
  # # system object creation
60
60
  # # the black_matter is used to store un materialized atomes
61
61
  # Atome.new(
62
62
  # { renderers: default_render, id: :black_matter, type: :shape, attach: [:user_view],apply: [],
63
- # left: 0, right: 0, top: 0, bottom: 0, width: 0, height: 0, overflow: :hidden, tag: { system: true }, attached: []
63
+ # left: 0, right: 0, top: 0, bottom: 0, width: 0, height: 0, overflow: :hidden, tag: { system: true }, fasten: []
64
64
  # })
65
65
  #
66
66
  # # view port
67
67
  # Atome.new(
68
68
  # { renderers: default_render, id: :view, type: :shape, attach: [:user_view], apply: [:view_color],
69
69
  # tag: { system: true },
70
- # attached: [], left: 0, right: 0, top: 0, bottom: 0, width: :auto, height: :auto, overflow: :auto,
70
+ # fasten: [], left: 0, right: 0, top: 0, bottom: 0, width: :auto, height: :auto, overflow: :auto,
71
71
  # }
72
72
  #
73
73
  # )
@@ -75,7 +75,7 @@ end
75
75
  # # unreal port, hold system object and tools
76
76
  # Atome.new(
77
77
  # { renderers: default_render, id: :intuition, type: :shape, attach: [:user_view], tag: { system: true },
78
- # left: 0, top: 0, width: 0, height: 0, overflow: :visible, attached: [],apply: []
78
+ # left: 0, top: 0, width: 0, height: 0, overflow: :visible, fasten: [],apply: []
79
79
  # }
80
80
  # )
81
81
  #
@@ -92,5 +92,5 @@ end
92
92
  # Universe.current_machine = machine_id
93
93
  # # the constant A is used to access alla atomes methods
94
94
  # A = Atome.new(
95
- # { renderers: default_render, id: :atome, type: :element, tag: { system: true }, attach: [], attached: [] }
95
+ # { renderers: default_render, id: :atome, type: :element, tag: { system: true }, attach: [], fasten: [] }
96
96
  # )
@@ -51,7 +51,7 @@ wait 1 do
51
51
  end
52
52
 
53
53
  # TODO : make multi parents works
54
- # TODO : make it works for event like touch , also attach and attached
54
+ # TODO : make it works for event like touch , also attach and fasten
55
55
  # wait 2 do
56
56
  # col = color({ id: :col1, red: 1, blue: 1 })
57
57
  # Atome.monitoring([col], [:red, :blue], [:variable1, :variable2])
@@ -1,7 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- b = box()
4
- b.text('click me')
3
+ b = box({left: 99, top: 99})
4
+ b.text({ data: 'click me' })
5
+
6
+ # wait 5 do
7
+ # b.delete(:left)
8
+ # puts 'o'
9
+ # end
5
10
  orange=''
6
11
  b.touch(true) do
7
12
 
@@ -20,18 +25,17 @@ b.touch(true) do
20
25
  c.delete(:left)
21
26
  wait 0.5 do
22
27
  # orange.color(:pink)
23
- c.delete(:blur)
28
+ c.delete(:blur)
24
29
  end
25
30
  end
26
31
 
27
32
  c.touch(:down) do
28
- puts '1?'
29
33
  grab(:circling).delete({ recursive: true }) if grab(:circling)
30
34
  end
31
35
  # alert orange.apply
32
- wait 4 do
33
- grab(:circling).delete({ recursive: true })if grab(:circling)
34
- end
36
+ # wait 4 do
37
+ # grab(:circling).delete({ recursive: true })if grab(:circling)
38
+ # end
35
39
  end
36
40
 
37
41
 
@@ -52,10 +56,10 @@ end
52
56
  # #
53
57
  # wait 3 do
54
58
  #
55
- # b.shape.each do |attached_atome_id|
56
- # attached_atome_id.left(333)
59
+ # b.shape.each do |fasten_atome_id|
60
+ # fasten_atome_id.left(333)
57
61
  # wait 2 do
58
- # attached_atome_id.delete(true)
62
+ # fasten_atome_id.delete(true)
59
63
  # end
60
64
  # end
61
65
  #
@@ -77,14 +81,14 @@ end
77
81
  #
78
82
  # # alert "before creation : #{bb}"
79
83
  # bb.touch(true) do
80
- # bb.box({attached: col.id, id: :attached_box})
84
+ # bb.box({fasten: col.id, id: :fasten_box})
81
85
  # c=bb.circle(({ id: :circle_1 }))
82
86
  # c.text({id: :text_1, data: :hello})
83
87
  # bb.text(:good)
84
88
  # # alert "after creation : #{bb}"
85
89
  # wait 1 do
86
- # bb.physical.each do |attached_atome_id|
87
- # bb.delete({id: attached_atome_id, recursive: true})
90
+ # bb.physical.each do |fasten_atome_id|
91
+ # bb.delete({id: fasten_atome_id, recursive: true})
88
92
  # end
89
93
  #
90
94
  # # wait 1 do
@@ -98,7 +102,7 @@ end
98
102
  # puts Universe.user_atomes
99
103
  # puts Universe.system_atomes
100
104
 
101
- # physical_found=["text_0","attached_box","circle_1","attached_box","circle_1"]
105
+ # physical_found=["text_0","fasten_box","circle_1","fasten_box","circle_1"]
102
106
  # clean_physical=physical_found.uniq
103
107
  # alert clean_physical
104
108
 
@@ -108,3 +112,4 @@ end
108
112
  # b.attach(c.id)
109
113
  # alert b
110
114
  # alert c
115
+
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ b = box({ drag: true, id: :the_b })
4
+ c = b.circle({ left: 99, id: :the_c })
5
+ d = b.text({ data: :hello, left: 44, top: 44, id: :the_t })
6
+ c.touch(:down) do
7
+ c.detach(b.id)
8
+ end
@@ -9,5 +9,5 @@ b.box
9
9
 
10
10
 
11
11
  atome_founds = c.dig
12
- puts "dig allow to retrieve all attached atomes recursively,
12
+ puts "dig allow to retrieve all fasten atomes recursively,
13
13
  it return a table of ID including the ID of the parent (here : :the_circle) :\n#{atome_founds}"
@@ -230,8 +230,8 @@ def duplicate(ids)
230
230
 
231
231
  atome_passed=grab(id_passed)
232
232
  # atome_passed.particles.delete(:left)
233
- # we remove attached
234
- particle_to_remove=[:id, :broadcast, :history,:callback, :html_object, :store_allow,:attached]
233
+ # we remove fasten
234
+ particle_to_remove=[:id, :broadcast, :history,:callback, :html_object, :store_allow,:fasten]
235
235
  particles_found=atome_passed.particles.dup
236
236
  particles_found.delete_if { |key, value| particle_to_remove.include?(key) }
237
237
  particles_found[:id]=identity_generator(particles_found[:type])
@@ -252,8 +252,8 @@ def duplicate(ids)
252
252
  wait 2 do
253
253
  nw_atome.left(333)
254
254
  end
255
- # Atome.new({"renderers"=>["html"], "id"=>nil, "type"=>"shape", "attach"=>["view"], "tag"=>{}, "attached"=>["text_15"], "unit"=>{}, "collected"=>{}, "width"=>99, "height"=>99, "apply"=>["box_color"], "left"=>100, "top"=>100, "clones"=>[], "preset"=>{"box"=>{"width"=>99, "height"=>99, "apply"=>["box_color"], "left"=>100, "top"=>100, "clones"=>[]}}, "touch"=>{"tap"=>true}, "touch_code"=>{"touch"=>:jhjh}})
256
- # Atome.new({"renderers"=>["html"], "id"=>:jgjhg, "type"=>"shape", "attach"=>["view"], "tag"=>{}, "attached"=>["text_15"], "unit"=>{}, "collected"=>{}, "width"=>99, "height"=>99, "apply"=>["box_color"], "left"=>100, "top"=>100, "clones"=>[], "preset"=>{"box"=>{"width"=>99, "height"=>99, "apply"=>["box_color"], "left"=>100, "top"=>100, "clones"=>[]}}, "touch"=>{"tap"=>true}, "touch_code"=>{"touch"=>:jhjh}})
255
+ # Atome.new({"renderers"=>["html"], "id"=>nil, "type"=>"shape", "attach"=>["view"], "tag"=>{}, "fasten"=>["text_15"], "unit"=>{}, "collected"=>{}, "width"=>99, "height"=>99, "apply"=>["box_color"], "left"=>100, "top"=>100, "clones"=>[], "preset"=>{"box"=>{"width"=>99, "height"=>99, "apply"=>["box_color"], "left"=>100, "top"=>100, "clones"=>[]}}, "touch"=>{"tap"=>true}, "touch_code"=>{"touch"=>:jhjh}})
256
+ # Atome.new({"renderers"=>["html"], "id"=>:jgjhg, "type"=>"shape", "attach"=>["view"], "tag"=>{}, "fasten"=>["text_15"], "unit"=>{}, "collected"=>{}, "width"=>99, "height"=>99, "apply"=>["box_color"], "left"=>100, "top"=>100, "clones"=>[], "preset"=>{"box"=>{"width"=>99, "height"=>99, "apply"=>["box_color"], "left"=>100, "top"=>100, "clones"=>[]}}, "touch"=>{"tap"=>true}, "touch_code"=>{"touch"=>:jhjh}})
257
257
  end
258
258
  end
259
259
 
@@ -263,14 +263,14 @@ c.text(:hello)
263
263
  b.touch(true) do
264
264
  puts @id
265
265
  end
266
- b.clones([{ left: 300, top: 300, color: :blue, entangled: [:width, :attached, :height] },
266
+ b.clones([{ left: 300, top: 300, color: :blue, entangled: [:width, :fasten, :height] },
267
267
  { left: 600, top: 366, color: :green, entangled: [:left, :height] }])
268
268
 
269
269
  # duplicate([b.id])
270
270
 
271
271
 
272
272
  # Atome.new( { renderers: [:html], attach: [:view],id: :my_test_box, type: :shape, apply: [:shape_color],
273
- # left: 120, top: 0, width: 100, smooth: 15, height: 100, overflow: :visible, attached: [], center: true
273
+ # left: 120, top: 0, width: 100, smooth: 15, height: 100, overflow: :visible, fasten: [], center: true
274
274
  # })
275
275
  # model={shape}
276
276
 
@@ -7,7 +7,7 @@ clone = ""
7
7
  b.drag(:start) do
8
8
  b.color(:black)
9
9
  b.height(123)
10
- # beware you must use grab(:view) else it'll be attached to the context, that means to 'b' in this case
10
+ # beware you must use grab(:view) else it'll be fasten to the context, that means to 'b' in this case
11
11
  clone = grab(:view).circle({ color: :white, left: b.left, top: b.top, depth: 3 })
12
12
  end
13
13
 
@@ -10,8 +10,8 @@
10
10
  # new_atome_id = "#{@id}_copy_#{copy_number}"
11
11
  # new_atome = Atome.new({ type: @type, renderers: @renderers, id: new_atome_id })
12
12
  #
13
- # attached_atomes = []
14
- # attached_found = attached.dup
13
+ # fasten_atomes = []
14
+ # fasten_found = fasten.dup
15
15
  # particles_found = instance_variables.dup
16
16
  #
17
17
  # particles_found.delete(:@history)
@@ -20,14 +20,14 @@
20
20
  # particles_found.delete(:@touch_code)
21
21
  # # touch_code=instance_variable_get('@touch_code')
22
22
  # particles_found.delete(:@html)
23
- # particles_found.delete(:@attached)
23
+ # particles_found.delete(:@fasten)
24
24
  # particles_found.delete(:@id)
25
25
  # params[:id] = new_atome_id
26
- # attached_found.each do |child_id_found|
26
+ # fasten_found.each do |child_id_found|
27
27
  # child_found = grab(child_id_found)
28
28
  # if child_found
29
29
  # new_child = child_found.duplicate({})
30
- # attached_atomes << new_child.id
30
+ # fasten_atomes << new_child.id
31
31
  # end
32
32
  # end
33
33
  # particles_found.each do |particle_found|
@@ -36,7 +36,7 @@
36
36
  # new_atome.set(particle_name => particle_content)
37
37
  # # new_atome.instance_variable_set('@touch_code',touch_code)
38
38
  # end
39
- # params[:attached] = attached_atomes
39
+ # params[:fasten] = fasten_atomes
40
40
  #
41
41
  # if params.instance_of? Hash
42
42
  # params.each do |k, v|
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ b = box({ width: 200, height: 200, color: :white })
4
+
5
+ a = b.box({ color: :green, left: 33, id: :box, shadow: {
6
+ id: :menu_active_shade,
7
+ left: 9,
8
+ top: -3,
9
+ blur: 10,
10
+ invert: false,
11
+ red: 0,
12
+ green: 0,
13
+ blue: 0,
14
+ alpha: 1 } })
15
+ wait 2 do
16
+ a.exchange({ color: :red, top: 33})
17
+ end
@@ -7,9 +7,9 @@ grab(:bundler_1).color(:blue)
7
7
 
8
8
 
9
9
  # Atome.new(
10
- # { renderers: [:html], id: :atomix, type: :element, tag: { system: true }, attach: [], attached: [] }
10
+ # { renderers: [:html], id: :atomix, type: :element, tag: { system: true }, attach: [], fasten: [] }
11
11
  # )
12
12
  #
13
13
  #
14
- # {:id=>:eDen, :type=>:element, :renderers=>[], :tag=>{:system=>true}, :attach=>[], :attached=>[]}
15
- # {:renderers=>[], :id=>:eDen, :type=>:element, :tag=>{:system=>true}, :attach=>[], :attached=>[]}
14
+ # {:id=>:eDen, :type=>:element, :renderers=>[], :tag=>{:system=>true}, :attach=>[], :fasten=>[]}
15
+ # {:renderers=>[], :id=>:eDen, :type=>:element, :tag=>{:system=>true}, :attach=>[], :fasten=>[]}