atome 0.5.7.3.6 → 0.5.7.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) 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 +24 -56
  8. data/lib/atome/extensions/atome.rb +31 -77
  9. data/lib/atome/extensions/sha.rb +7 -7
  10. data/lib/atome/genesis/atomes.rb +1 -1
  11. data/lib/atome/genesis/genesis.rb +6 -95
  12. data/lib/atome/genesis/particles/communication.rb +1 -1
  13. data/lib/atome/genesis/particles/event.rb +0 -8
  14. data/lib/atome/genesis/particles/geometry.rb +3 -4
  15. data/lib/atome/genesis/particles/hierarchy.rb +28 -27
  16. data/lib/atome/genesis/particles/identity.rb +0 -30
  17. data/lib/atome/genesis/particles/material.rb +13 -12
  18. data/lib/atome/genesis/particles/property.rb +41 -16
  19. data/lib/atome/genesis/particles/security.rb +0 -45
  20. data/lib/atome/genesis/particles/utility.rb +77 -137
  21. data/lib/atome/genesis/sparkle.rb +3 -12
  22. data/lib/atome/kernel/black_matter.rb +2 -0
  23. data/lib/atome/kernel/universe.rb +5 -45
  24. data/lib/atome/presets/atome.rb +0 -22
  25. data/lib/atome/utilities/utilities.rb +19 -8
  26. data/lib/atome/version.rb +2 -1
  27. data/lib/molecules/init.rb +0 -14
  28. data/lib/molecules/intuition/tools.rb +24 -43
  29. data/lib/molecules/intuition/utilities.rb +261 -135
  30. data/lib/platform_specific/opal/atome_opal_extensions.rb +0 -1
  31. data/lib/platform_specific/opal/extensions/color.rb +0 -5
  32. data/lib/platform_specific/opal/extensions/geolocation.rb +5 -5
  33. data/lib/platform_specific/opal/extensions/object.rb +1 -1
  34. data/lib/platform_specific/opal/extensions/ping.rb +11 -20
  35. data/lib/renderers/html/effect.rb +0 -11
  36. data/lib/renderers/html/event.rb +0 -7
  37. data/lib/renderers/html/geometry.rb +0 -31
  38. data/lib/renderers/html/html.rb +32 -128
  39. data/lib/renderers/html/material.rb +0 -22
  40. data/lib/renderers/html/spatial.rb +0 -9
  41. data/lib/renderers/html/utility.rb +5 -8
  42. data/lib/renderers/renderer.rb +0 -1
  43. data/vendor/assets/application/examples/account.rb +35 -0
  44. data/vendor/assets/application/examples/actor&role.rb +23 -0
  45. data/vendor/assets/application/examples/animation.rb +1 -1
  46. data/vendor/assets/application/examples/applications.rb +26 -77
  47. data/vendor/assets/application/examples/atome.rb +1 -1
  48. data/vendor/assets/application/examples/attach.rb +7 -7
  49. data/vendor/assets/application/examples/attached.rb +13 -15
  50. data/vendor/assets/application/examples/basic_understanding.rb +1 -1
  51. data/vendor/assets/application/examples/buttons.rb +48 -0
  52. data/vendor/assets/application/examples/clear.rb +12 -12
  53. data/vendor/assets/application/examples/clones&monitoring.rb +1 -1
  54. data/vendor/assets/application/examples/delete.rb +19 -14
  55. data/vendor/assets/application/examples/detach.rb +8 -0
  56. data/vendor/assets/application/examples/dig.rb +1 -1
  57. data/vendor/assets/application/examples/display.rb +6 -6
  58. data/vendor/assets/application/examples/drag.rb +1 -1
  59. data/vendor/assets/application/examples/duplicate.rb +6 -6
  60. data/vendor/assets/application/examples/exchange.rb +17 -0
  61. data/vendor/assets/application/examples/generator_and_build.rb +3 -3
  62. data/vendor/assets/application/examples/hierarchy.rb +5 -5
  63. data/vendor/assets/application/examples/layout.rb +1 -1
  64. data/vendor/assets/application/examples/preset.rb +3 -3
  65. data/vendor/assets/application/examples/selected.rb +1 -1
  66. data/vendor/assets/application/examples/shapes.rb +1 -1
  67. data/vendor/assets/application/examples/size.rb +1 -1
  68. data/vendor/assets/application/examples/test.rb +0 -320
  69. data/vendor/assets/application/examples/tools.rb +136 -192
  70. data/vendor/assets/application/examples/unfasten.rb +23 -0
  71. data/vendor/assets/application/index.rb +1 -1
  72. data/vendor/assets/server/atome_server.rb +1 -0
  73. data/vendor/assets/server/capture.rb +0 -1
  74. data/vendor/assets/server/database.rb +0 -1
  75. data/vendor/assets/server/eDen.rb +16 -94
  76. data/vendor/assets/src/index_server_wasm.html +1 -0
  77. data/vendor/assets/src/index_wasm.html +0 -6
  78. data/vendor/assets/src/js/atome/specific/wasm.js +22 -4
  79. data/vendor/assets/src/js/third_parties/three.min.js +1 -1
  80. data/vendor/assets/src/medias/fonts/Roboto/LICENSE.txt +1 -1
  81. data/vendor/assets/src/medias/fonts/Roboto_Slab/LICENSE.txt +1 -1
  82. metadata +8 -6
  83. data/lib/molecules/_deprecated_examples/site.rb +0 -34
  84. data/lib/molecules/intuition/_deprecated_inputs.rb +0 -111
  85. data/lib/molecules/intuition/_deprecated_toolbox.rb +0 -282
  86. data/lib/platform_specific/opal/extensions/sha.rb +0 -25
@@ -35,7 +35,7 @@
35
35
 
36
36
  "Work" shall mean the work of authorship, whether in Source or
37
37
  Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
38
+ copyright notice that is included in or fasten to the work
39
39
  (an example is provided in the Appendix below).
40
40
 
41
41
  "Derivative Works" shall mean any work, whether in Source or Object
@@ -35,7 +35,7 @@
35
35
 
36
36
  "Work" shall mean the work of authorship, whether in Source or
37
37
  Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
38
+ copyright notice that is included in or fasten to the work
39
39
  (an example is provided in the Appendix below).
40
40
 
41
41
  "Derivative Works" shall mean any work, whether in Source or Object
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7.3.6
4
+ version: 0.5.7.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Eric Godard
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-11 00:00:00.000000000 Z
11
+ date: 2024-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -475,10 +475,7 @@ files:
475
475
  - lib/atome/utilities/utilities.rb
476
476
  - lib/atome/version.rb
477
477
  - lib/atome_relative.rb
478
- - lib/molecules/_deprecated_examples/site.rb
479
478
  - lib/molecules/init.rb
480
- - lib/molecules/intuition/_deprecated_inputs.rb
481
- - lib/molecules/intuition/_deprecated_toolbox.rb
482
479
  - lib/molecules/intuition/tools.rb
483
480
  - lib/molecules/intuition/utilities.rb
484
481
  - lib/platform_specific/opal/atome_opal_extensions.rb
@@ -487,7 +484,6 @@ files:
487
484
  - lib/platform_specific/opal/extensions/js.rb
488
485
  - lib/platform_specific/opal/extensions/object.rb
489
486
  - lib/platform_specific/opal/extensions/ping.rb
490
- - lib/platform_specific/opal/extensions/sha.rb
491
487
  - lib/platform_specific/opal/opal.rb
492
488
  - lib/platform_specific/opal/opal_parser.rb
493
489
  - lib/platform_specific/wasm/atome_wasm_extensions.rb
@@ -530,6 +526,8 @@ files:
530
526
  - vendor/assets/Guardfile
531
527
  - vendor/assets/Rakefile
532
528
  - vendor/assets/application/examples/above_below_before_after.rb
529
+ - vendor/assets/application/examples/account.rb
530
+ - vendor/assets/application/examples/actor&role.rb
533
531
  - vendor/assets/application/examples/affect.rb
534
532
  - vendor/assets/application/examples/aid.rb
535
533
  - vendor/assets/application/examples/allow_copy.rb
@@ -551,6 +549,7 @@ files:
551
549
  - vendor/assets/application/examples/blur.rb
552
550
  - vendor/assets/application/examples/border.rb
553
551
  - vendor/assets/application/examples/browse.rb
552
+ - vendor/assets/application/examples/buttons.rb
554
553
  - vendor/assets/application/examples/categories.rb
555
554
  - vendor/assets/application/examples/category.rb
556
555
  - vendor/assets/application/examples/center.rb
@@ -567,6 +566,7 @@ files:
567
566
  - vendor/assets/application/examples/database_handling.rb
568
567
  - vendor/assets/application/examples/debug.rb
569
568
  - vendor/assets/application/examples/delete.rb
569
+ - vendor/assets/application/examples/detach.rb
570
570
  - vendor/assets/application/examples/dig.rb
571
571
  - vendor/assets/application/examples/display.rb
572
572
  - vendor/assets/application/examples/display_bck.rb
@@ -577,6 +577,7 @@ files:
577
577
  - vendor/assets/application/examples/encode.rb
578
578
  - vendor/assets/application/examples/encrypt.rb
579
579
  - vendor/assets/application/examples/example.rb
580
+ - vendor/assets/application/examples/exchange.rb
580
581
  - vendor/assets/application/examples/executor.rb
581
582
  - vendor/assets/application/examples/file.rb
582
583
  - vendor/assets/application/examples/fill.rb
@@ -658,6 +659,7 @@ files:
658
659
  - vendor/assets/application/examples/tools.rb
659
660
  - vendor/assets/application/examples/touch.rb
660
661
  - vendor/assets/application/examples/type_mutation.rb
662
+ - vendor/assets/application/examples/unfasten.rb
661
663
  - vendor/assets/application/examples/unit.rb
662
664
  - vendor/assets/application/examples/universe.rb
663
665
  - vendor/assets/application/examples/vector.rb
@@ -1,34 +0,0 @@
1
-
2
- new(application: {name: :compose })
3
-
4
-
5
- grab(:toto).color(:cyan)
6
-
7
- def layout
8
- compose_back=box
9
-
10
- compose_back.color({ alpha: 0 })
11
- media_reader=compose_back.box({left: 99, width: 250, height: 250, top: 99})
12
- viewer_1=compose_back.box({left: 360, width: 250, height: 250, top: 99})
13
- viewer_2=compose_back.box({left: 690, width: 250, height: 250, top: 99})
14
- timeline=compose_back.box({left: 99, width: 250, height: 250, top: 399})
15
- login=compose_back.text(:log)
16
- login.touch(true) do
17
- compose_back.delete(true)
18
- # grab(:view).clear(true)
19
- form
20
- end
21
-
22
- end
23
-
24
- def form
25
- form1=box
26
- form1.text(:login)
27
-
28
- form1.touch(true) do
29
- form1.delete(true)
30
- layout
31
- end
32
-
33
- end
34
- form
@@ -1,111 +0,0 @@
1
- # # frozen_string_literal: true
2
- #
3
- # # def atome_common(atome_preset, params)
4
- # # basic_params = { renderers: [] }
5
- # # # TODO : remove Essentials.default_params[atome_preset] || {} as it is
6
- # # # applied twice because preset is now a particle
7
- # # preset_params = Essentials.default_params[atome_preset] || {}
8
- # #
9
- # # basic_params[:type] = preset_params[:type] || :element
10
- # # basic_params[:id] = params[:id] || identity_generator(atome_preset)
11
- # # basic_params[:renderers] = @renderers || preset_params[:renderers]
12
- # # essential_params = basic_params.merge(preset_params)
13
- # # reordered_params = essential_params.reject { |key, _| params.has_key?(key) }
14
- # # params = reordered_params.merge(params)
15
- # #
16
- # # # condition to handle color/shadow/paint atomes that shouldn't be attach to view
17
- # # # TODO : add category for atome( material/physical vs modifier : color, shadow, .. vs shape, image ..)
18
- # # # then add condition same things fo code in genesis new_atome
19
- # # if %i[color shadow paint].include?(atome_preset)
20
- # # unless params[:affect]
21
- # # params[:affect] = if @id == :view
22
- # # [:black_matter]
23
- # # else
24
- # # [@id]
25
- # # end
26
- # # end
27
- # # else
28
- # # params[:attach] = params[:attach] || @id || :view
29
- # # end
30
- # # params
31
- # # end
32
- # #
33
- # # def preset_common(params, &bloc)
34
- # # # if an atome with current id exist we update the ID in the params
35
- # # params[:id] = "#{params[:id]}_#{Universe.atomes.length}" if grab(params[:id])
36
- # # Atome.new(params, &bloc)
37
- # # end
38
- # # class EVe < Atome
39
- # class EVe < Atome
40
- # def initialize
41
- # @atomes = {}
42
- # end
43
- #
44
- # def atome(atome_to_find)
45
- # @atomes[atome_to_find]
46
- # end
47
- #
48
- # def input_box(params = {}, &bloc)
49
- # height_wanted = 15
50
- # width_wanted = 222
51
- # input_back = Atome.new(
52
- # { renderers: [:html], id: :input_back, type: :shape, attach: :view, apply: [:shape_color],
53
- # left: 120, top: 120,data: '', width: width_wanted, height: height_wanted + height_wanted * 20 / 100, smooth: 6 })
54
- #
55
- # @atomes[:input_back] = input_back
56
- #
57
- # Atome.new(
58
- # { renderers: [:html], id: :input_text_color, type: :color, tag: ({ system: true, persistent: true }),
59
- # red: 0.1, green: 0.1, blue: 0.1, alpha: 1 }
60
- # )
61
- #
62
- # text_input = Atome.new(
63
- # { renderers: [:html], id: :input_text, type: :text, apply: [:input_text_color], component: { size: height_wanted },
64
- # data: :input, left: height_wanted * 20 / 100, top: 0, edit: true, attach: :input_back, height: height_wanted, position: :absolute })
65
- #
66
- # text_input.touch(true) do
67
- # text_input.component({ selected: { color: 'rgba(0,0,0,0.3)', text: :orange } })
68
- # end
69
- #
70
- # text_input.keyboard(:down) do |native_event|
71
- # event = Native(native_event)
72
- # if event[:keyCode].to_s == '13'
73
- # # we prevent the input
74
- # event.preventDefault()
75
- # end
76
- #
77
- # end
78
- #
79
- # text_input.keyboard(:up) do |native_event|
80
- # input_back.data=text_input.data
81
- # end
82
- # @atomes[:input_text] = text_input
83
- #
84
- # input_back
85
- # end
86
- #
87
- # end
88
- #
89
- # def input(params = {}, &proc)
90
- # text_color = :white
91
- # text_size = 12
92
- # back_color = :gray
93
- # width = 2000
94
- # in_b = EVe.new()
95
- # in_b.input_box
96
- # end
97
- #
98
- # i= input
99
- #
100
- # b=box({top: 0, left: 0, width: 33, height: 33})
101
- # b.touch(true) do
102
- # puts "i.data : #{i.data}"
103
- # end
104
- # i.left(66)
105
- # i.color(:white)
106
- # i.text.left(55)
107
- #
108
- #
109
- #
110
- #
111
- #
@@ -1,282 +0,0 @@
1
- # # frozen_string_literal: true
2
- # text(:hello)
3
- # class Atome
4
- #
5
- # def build_tool(&bloc)
6
- # # alert params[:tool]
7
- # a = Atome.instance_exec(&bloc)
8
- # puts "===> a is : #{a[:action]}"
9
- # # check below
10
- # wait 2 do
11
- # send a[:action]
12
- # end
13
- # grab(:toolbox).box({color: :white, width: 33, height: 33})
14
- # end
15
- # end
16
- #
17
- # class Object
18
- # def new(params, &bloc)
19
- # # Genesis = Genesis.Genesis
20
- # if params.key?(:atome)
21
- # Universe.add_atomes_specificities params[:atome]
22
- # Genesis.build_atome(params[:atome], &bloc)
23
- # elsif params.key?(:particle)
24
- # Atome.instance_variable_set("@main_#{params[:particle]}", bloc)
25
- # # render indicate if the particle needs to be rendered
26
- # # store tell the system if it need to store the particle value
27
- # # type help the system what type of type the particle will receive and store
28
- # Genesis.build_particle(params[:particle], { render: params[:render], return: params[:return],
29
- # store: params[:store], type: params[:type] }, &bloc)
30
- # elsif params.key?(:sanitizer)
31
- # Genesis.build_sanitizer(params[:sanitizer], &bloc)
32
- # elsif params.key?(:pre)
33
- # Atome.instance_variable_set("@pre_#{params[:pre]}", bloc)
34
- # elsif params.key?(:post)
35
- # Atome.instance_variable_set("@post_#{params[:post]}", bloc)
36
- # elsif params.key?(:after)
37
- # @startup='coool!!!'
38
- # alert 'after is set'
39
- # Atome.instance_variable_set("@after_#{params[:after]}", bloc)
40
- # elsif params.key?(:read)
41
- # Atome.instance_variable_set("@read_#{params[:read]}", bloc)
42
- # elsif params[:renderer]
43
- # renderer_found = params[:renderer]
44
- # if params[:specific]
45
- # Universe.set_atomes_specificities(params)
46
- # params[:specific] = "#{params[:specific]}_"
47
- # end
48
- # render_method = "#{renderer_found}_#{params[:specific]}#{params[:method]}"
49
- # Genesis.build_render(render_method, &bloc)
50
- # elsif params.key?(:callback)
51
- # particle_targetted = params[:callback]
52
- # Atome.define_method "#{particle_targetted}_callback" do
53
- # bloc.call
54
- # end
55
- # elsif params.key?(:tool)
56
- # A.build_tool(&bloc)
57
- # end
58
- # end
59
- # end
60
- #
61
- # grab(:intuition).box({id: :toolbox, top: :auto, bottom: 0, left: 0, width: 50, height: 255})
62
- #
63
- # def record_tool
64
- # grab(Universe.current_user).selection
65
- # alert "must get selection to treat it "
66
- # end
67
- #
68
- #
69
- # module Intuition
70
- # def intuition_int8
71
- # # tool taxonomy and list
72
- # {
73
- # capture: { int8: { french: :enregistrement, english: :record, german: :datensatz } },
74
- # communication: { french: :communication, english: :communication, german: :communication },
75
- # tool: { french: :outils, english: :tools, german: :werkzeuge },
76
- # view: { french: :vue, english: :view, german: :aussicht },
77
- # time: { french: :horloge, english: :clock, german: :Uhr },
78
- # find: { french: :trouve, english: :find, german: :finden },
79
- # home: { french: :accueil, english: :home, german: :zuhause },
80
- # code: { french: :code, english: :code, german: :code },
81
- # impulse: { french: :impulse, english: :impulse, german: :impulse },
82
- # }
83
- # end
84
- # def intuition_taxonomy
85
- #
86
- # end
87
- #
88
- # def impulse
89
- # # tool start point
90
- # [:capture, :communication, :tool, :view, :time, :find, :home]
91
- # end
92
- #
93
- # # def capture
94
- # # categories=ATOME.methods_categories
95
- # # [categories[:inputs]]
96
- # # end
97
- # #
98
- # # def communication
99
- # # categories=ATOME.methods_categories
100
- # # [categories[:communications]]
101
- # # end
102
- # #
103
- # # def toolz
104
- # # categories=ATOME.methods_categories
105
- # # [categories[:spatials],categories[:helpers],categories[:materials],
106
- # # categories[:geometries],categories[:effects],
107
- # # categories[:medias],categories[:hierarchies],categories[:utilities],categories[:events]]
108
- # # end
109
- # #
110
- # # def tool_style(size = 33)
111
- # # # styling
112
- # # shadows = [{ x: size / 15, y: size / 15, thickness: 0, blur: size / 3, color: { red: 0, green: 0, blue: 0, alpha: 0.3 } }, { x: -size / 15, y: -size / 15, thickness: 0, blur: size / 6, color: { red: 1, green: 1, blue: 1, alpha: 0.3 } }]
113
- # # style = { type: :tool, content: { points: 4 }, color: { red: 0.9, green: 0.9, blue: 0.9, alpha: 0.15 }, parent: :intuition, shadow: shadows, blur: { value: 6, invert: true } }
114
- # # return style
115
- # # end
116
- # #
117
- # # def open_tool(tool_id, widthness=3, orientation=:x, speed=0.6)
118
- # # if orientation == :x
119
- # # orientation = :width
120
- # # value = grab(tool_id).width
121
- # # else
122
- # # orientation = :height
123
- # # value = grab(tool_id).height
124
- # # end
125
- # # animate({
126
- # # start: { orientation => value },
127
- # # end: { orientation => value * widthness },
128
- # # duration: speed * 1000,
129
- # # loop: 0,
130
- # # curve: :easing,
131
- # # target: tool_id
132
- # # })
133
- # # notification "find why this id #{self.atome_id}, add annimation callback to set overflow when anim complete"
134
- # # grab(tool_id).overflow(:visible)
135
- # # end
136
- # #
137
- # # def close_tool(tool_id, widthness, orientation, speed)
138
- # # if orientation == :x
139
- # # orientation = :width
140
- # # value = grab(tool_id).width
141
- # # else
142
- # # orientation = :height
143
- # # value = grab(tool_id).height
144
- # # end
145
- # # animate({
146
- # # start: { orientation => value * widthness },
147
- # # end: { orientation => value },
148
- # # duration: speed * 1000,
149
- # # loop: 0,
150
- # # curve: :easing,
151
- # # target: tool_id
152
- # # })
153
- # # # grab(tool_id).overflow(:hidden)
154
- # # end
155
- # #
156
- # # def create_tool(tool_name, size = 33, x_pos = 0, y_pos = 33, offsset=0)
157
- # # tool_created = tool(self.tool_style(size).merge({ parent: :main_menu, atome_id: "tool_" + tool_name, id: "tool_" + tool_name,
158
- # # width: size, height: size, smooth: size / 9, overflow: :hidden, x: x_pos, y: y_pos, z: 1, content: [] }))
159
- # # icon=tool_created.shape({ path: tool_name, width: size - size / 2, height: size - size / 2, center: true })
160
- # # # name = intuition_list[tool_name][language]
161
- # # particle({ atome_id: :tools_property_container, color: { red: 0.6, green: 0.6, blue: 0.6 } })
162
- # # # we get the plugin code only if the plugin hasn't been interpreted before (unless condition below)
163
- # # unless grab(:intuition).content.include? tool_name
164
- # # ATOME.reader("./medias/e_rubies/tools/#{tool_name}.rb") do |data|
165
- # # # todo add a security parser here
166
- # # # we set the variable tool that can be used to facilitate plugin creation
167
- # # data="tool=grab(:#{tool_created.atome_id})\n"+data
168
- # # compile(data)
169
- # # # we add the tool to the intuition content so it won't be loaded twice
170
- # # grab(:intuition).content |= [tool_name]
171
- # # end
172
- # # end
173
- # # # end
174
- # # tool_created.active({ exec: false })
175
- # # tool_created.inactive({ exec: false })
176
- # # icon.touch(stop: true) do
177
- # # if tool_created.active[:exec] == true
178
- # # tool_created.color(:transparent)
179
- # # tool_created.active(exec: false, proc: tool_created.active[:proc] )
180
- # # tool_created.inactive(exec: true, proc: tool_created.inactive[:proc] )
181
- # # else
182
- # # tool_created.color({alpha: 0.3})
183
- # # tool_created.active({ exec: true, proc: tool_created.active[:proc] })
184
- # # end
185
- # # end
186
- # # end
187
- # #
188
- # # # we get menu entry point
189
- # # def open_intuition(position = {})
190
- # # position = { x: 0, yy: 0, size: 33, orientation: :vertical, offset: 0 }.merge(position)
191
- # # # we get content language from view's language
192
- # # if grab(:main_menu)
193
- # # grab(:main_menu).delete
194
- # # else
195
- # # grab(:view).language
196
- # # self.language(grab(:view).language)
197
- # # orientation = position.delete(:orientation)
198
- # # size = position.delete(:size)
199
- # # offset = position.delete(:offset)
200
- # # # positioning and scaling
201
- # # if orientation == :vertical
202
- # # requested_width = size
203
- # # requested_height = (size+offset)* impulse.length
204
- # # else
205
- # # requested_width = (size+offset) * impulse.length
206
- # # requested_height = size
207
- # # end
208
- # # tool({ atome_id: :main_menu, parent: :intuition, color: { alpha: 0 } }.merge(position).merge(width: requested_width, height: requested_height))
209
- # # impulse.each_with_index do |item, index|
210
- # # if orientation == :vertical
211
- # # create_tool(item, size, 0, index * (size+offset))
212
- # # else
213
- # # create_tool(item, size, index * (size+offset), 0)
214
- # # end
215
- # # end
216
- # # end
217
- # # end
218
- # end
219
- # # atome class extension for eVe
220
- #
221
- # class Atome
222
- # include Intuition
223
- # # def atome(requested_property)
224
- # # # add component list iin the content we maybe ahave to create a tool object because box can't handle this type of content
225
- # # new_atome=self.tool({ atome_id: "#{self.atome_id}_#{requested_property}_atome_#{self.content.length}", x: 66})
226
- # # new_atome.touch({ stop: true, option: :down}) do
227
- # # color(:red)
228
- # # new_atome.height = new_atome.height*3
229
- # # end
230
- # # new_atome.touch({ stop: true, option: :up}) do
231
- # # color(:red)
232
- # # new_atome.height = new_atome.height/3
233
- # # end
234
- # # notification "now we have to add an object or a new property (style) to store complete tool style including size and
235
- # # orientation so we can position the new atome correctly"
236
- # # # alert self.content.class
237
- # # # alert self.content.length
238
- # # # alert tool_style
239
- # # end
240
- # end
241
- #
242
- # # # we initialise the toolbox here :
243
- # #
244
- # # # the launch bar
245
- # # launch_bar = box({ x: 0, y: 0, width: 33, height: "100%", parent: :intuition, z: 0, color: { alpha: 0 } })
246
- # # launch_bar.touch({ option: :long }) do |evt|
247
- # # size = 33
248
- # # yy_touch_position = grab(:view).convert(:height) - evt.page_y
249
- # # if yy_touch_position < size
250
- # # #if the long touch is within the wanted area( in this at bottom of the screen) we open the menu
251
- # # # launch_bar.open_intuition({ x: size, yy: 6,offset: 6, orientation: :horizontal, size: size })
252
- # # launch_bar.open_intuition({ x: 6, yy: size,offset: 6, orientation: :vertical, size: size })
253
- # # end
254
- # # end
255
- # #
256
- # # # # # # # # # # # # # # # # tests below # # # # # # # # # # # # #
257
- # #
258
- # # list = molecule_analysis(@molecules_list)
259
- # # notif list[:tools]
260
- # # notif "======"
261
- # # notif list[:molecules]
262
- # # notif "======"
263
- # # notif list[:atomes]
264
- # # notif "======"
265
- # # notif list[:molecules][:shadow]
266
- #
267
- # new({ tool: :capture }) do |params|
268
- # tool = { id: :rec_01,
269
- #
270
- # name: :record, icon: :record, action: {open: [:sub_menu]}, code: :record_tool, position: { root: 1 }, # position can be multiple
271
- # option: { opt1: :method_2 }, int8: { french: :enregistrement, english: :record, german: :datensatz } }
272
- # tool
273
- # end
274
- #
275
- #
276
- # puts A.impulse
277
- # # def fill_toolzone(tools_ids)
278
- # #
279
- # # end
280
- # #
281
- # # fill_toolzone(%i[files edition select group link copy undo settings])
282
- #
@@ -1,25 +0,0 @@
1
- # # frozen_string_literal: true
2
- #
3
- # # # addon for the Atome class
4
- # class Atome
5
- # # def calculate_sha(string)
6
- # # if RUBY_ENGINE.downcase == 'opal' || 'wasm32-wasi'
7
- # # # `sha256(#{string})`
8
- # # js_code = "sha256('#{string}')"
9
- # # JS.eval(js_code)
10
- # # else
11
- # # Digest::SHA256.hexdigest(string)
12
- # # end
13
- # # end
14
- # #
15
- # #
16
- # def crypt(string)
17
- # # if RUBY_ENGINE.downcase == 'opal' || 'wasm32-wasi'
18
- # # `sha256(#{string})`
19
- # js_code = "sha256('#{string}')"
20
- # JS.eval(js_code)
21
- # # else
22
- # Digest::SHA256.hexdigest(string)
23
- # # end
24
- # end
25
- # end