atome 0.5.7.5.4 → 0.5.7.5.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/documentation/deep learning/basic_infos.txt +5 -0
  3. data/lib/atome/genesis/atomes.rb +12 -0
  4. data/lib/atome/genesis/particles/event.rb +141 -97
  5. data/lib/atome/genesis/particles/identity.rb +2 -1
  6. data/lib/atome/genesis/particles/spatial.rb +25 -0
  7. data/lib/atome/genesis/particles/utility.rb +13 -5
  8. data/lib/atome/utilities/essentials.rb +5 -2
  9. data/lib/atome/version.rb +1 -1
  10. data/lib/molecules/intuition/tools.rb +1 -1
  11. data/lib/molecules/intuition/utilities.rb +3 -0
  12. data/lib/platform_specific/opal/extensions/object.rb +3 -1
  13. data/lib/platform_specific/wasm/atome_wasm_extensions.rb +2 -1
  14. data/lib/renderers/html/event.rb +20 -6
  15. data/lib/renderers/html/html.rb +753 -446
  16. data/lib/renderers/html/identity.rb +33 -6
  17. data/lib/renderers/html/spatial.rb +27 -0
  18. data/lib/renderers/html/utility.rb +4 -0
  19. data/vendor/assets/application/examples/audio.rb +25 -9
  20. data/vendor/assets/application/examples/calendar.rb +186 -0
  21. data/vendor/assets/application/examples/drop.rb +1 -0
  22. data/vendor/assets/application/examples/editor.rb +139 -0
  23. data/vendor/assets/application/examples/inspector.rb +129 -0
  24. data/vendor/assets/application/examples/keyboard.rb +20 -10
  25. data/vendor/assets/application/examples/map.rb +42 -0
  26. data/vendor/assets/application/examples/meteo.rb +8 -0
  27. data/vendor/assets/application/examples/midi.rb +4 -0
  28. data/vendor/assets/application/examples/on_resize.rb +14 -0
  29. data/vendor/assets/application/examples/over.rb +0 -1
  30. data/vendor/assets/application/examples/overflow.rb +20 -5
  31. data/vendor/assets/application/examples/particles.rb +1 -1
  32. data/vendor/assets/application/examples/preset.rb +1 -1
  33. data/vendor/assets/application/examples/resize.rb +11 -0
  34. data/vendor/assets/application/examples/tick.rb +10 -0
  35. data/vendor/assets/application/examples/tools.rb +6 -1
  36. data/vendor/assets/application/examples/touch.rb +2 -14
  37. data/vendor/assets/application/examples/trigger_abstraction.rb +165 -0
  38. data/vendor/assets/application/examples/vr.rb +3 -0
  39. data/vendor/assets/src/css/codemirror.min.css +472 -0
  40. data/vendor/assets/src/css/fonts/tui/icon.eot +0 -0
  41. data/vendor/assets/src/css/fonts/tui/icon.svg +17 -0
  42. data/vendor/assets/src/css/fonts/tui/icon.ttf +0 -0
  43. data/vendor/assets/src/css/fonts/tui/icon.woff +0 -0
  44. data/vendor/assets/src/css/fonts/tui/noto.woff +72 -0
  45. data/vendor/assets/src/css/images/leaflet/layers-2x.png +0 -0
  46. data/vendor/assets/src/css/images/leaflet/layers.png +0 -0
  47. data/vendor/assets/src/css/images/leaflet/marker-icon-2x.png +0 -0
  48. data/vendor/assets/src/css/images/leaflet/marker-icon.png +0 -0
  49. data/vendor/assets/src/css/images/leaflet/marker-shadow.png +0 -0
  50. data/vendor/assets/src/css/images/tui/ic-arrow-line-left.png +0 -0
  51. data/vendor/assets/src/css/images/tui/ic-arrow-line-left@2x.png +0 -0
  52. data/vendor/assets/src/css/images/tui/ic-arrow-line-left@3x.png +0 -0
  53. data/vendor/assets/src/css/images/tui/ic-arrow-line-right.png +0 -0
  54. data/vendor/assets/src/css/images/tui/ic-arrow-line-right@2x.png +0 -0
  55. data/vendor/assets/src/css/images/tui/ic-arrow-line-right@3x.png +0 -0
  56. data/vendor/assets/src/css/images/tui/ic-traveltime-w.png +0 -0
  57. data/vendor/assets/src/css/images/tui/ic-view-day.png +0 -0
  58. data/vendor/assets/src/css/images/tui/ic-view-day@2x.png +0 -0
  59. data/vendor/assets/src/css/images/tui/ic-view-day@3x.png +0 -0
  60. data/vendor/assets/src/css/images/tui/ic-view-month.png +0 -0
  61. data/vendor/assets/src/css/images/tui/ic-view-month@2x.png +0 -0
  62. data/vendor/assets/src/css/images/tui/ic-view-month@3x.png +0 -0
  63. data/vendor/assets/src/css/images/tui/ic-view-week.png +0 -0
  64. data/vendor/assets/src/css/images/tui/ic-view-week@2x.png +0 -0
  65. data/vendor/assets/src/css/images/tui/ic-view-week@3x.png +0 -0
  66. data/vendor/assets/src/css/images/tui/icon.png +0 -0
  67. data/vendor/assets/src/css/images/tui/img-bi.png +0 -0
  68. data/vendor/assets/src/css/images/tui/img-bi@2x.png +0 -0
  69. data/vendor/assets/src/css/images/tui/img-bi@3x.png +0 -0
  70. data/vendor/assets/src/css/leaflet.css +664 -0
  71. data/vendor/assets/src/css/monokai.min.css +127 -0
  72. data/vendor/assets/src/css/style.css +1 -1
  73. data/vendor/assets/src/css/toastui-calendar.min.css +6 -0
  74. data/vendor/assets/src/index.html +12 -1
  75. data/vendor/assets/src/index_opal.html +16 -1
  76. data/vendor/assets/src/index_server.html +11 -1
  77. data/vendor/assets/src/index_server_wasm.html +10 -1
  78. data/vendor/assets/src/index_wasm.html +12 -1
  79. data/vendor/assets/src/js/atome/specific/tauri.js +32 -0
  80. data/vendor/assets/src/js/atome/utilities/importmap.js +9 -0
  81. data/vendor/assets/src/js/atome/utilities/three_module.js +88 -0
  82. data/vendor/assets/src/js/test.js +42 -0
  83. data/vendor/assets/src/js/third_parties/Three/build/three.cjs +54216 -0
  84. data/vendor/assets/src/js/third_parties/Three/build/three.module.min.js +6 -0
  85. data/vendor/assets/src/js/third_parties/Three/build/three.webgpu.min.js +6 -0
  86. data/vendor/assets/src/js/third_parties/Three/jsm/controls/OrbitControls.js +1532 -0
  87. data/vendor/assets/src/js/third_parties/codemirror.min.js +1 -0
  88. data/vendor/assets/src/js/third_parties/leaflet.js +6 -0
  89. data/vendor/assets/src/js/third_parties/leaflet.js.map +1 -0
  90. data/vendor/assets/src/js/third_parties/ruby.min.js +1 -0
  91. data/vendor/assets/src/js/third_parties/toastui-calendar.min.js +9 -0
  92. data/vendor/assets/src/medias/images/puydesancy.jpg +0 -0
  93. data/vendor/assets/src-tauri/Cargo.toml +6 -5
  94. data/vendor/assets/src-tauri/Info.plist +12 -0
  95. data/vendor/assets/src-tauri/src/main.rs +32 -3
  96. data/vendor/assets/src-tauri/src/midi.rs +25 -0
  97. data/vendor/assets/src-tauri/tauri.conf.json +4 -4
  98. metadata +60 -3
  99. data/vendor/assets/src/js/third_parties/three.min.js +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfe68326ce8511009dd9226874a9478fed337b58b33914588569477c53fc5f60
4
- data.tar.gz: f4c496a1eed0f0ca66a8a4cc742e83c962578fa6dd23f58af4a2dda0cf658d0e
3
+ metadata.gz: ed430053dc8b703ad1842ed461684e0018e271ef919dfcfc76f9b2f3fc225c63
4
+ data.tar.gz: 91e03aabb90fc5b616248b5a87dff16a16093d9697a931ae25282bd5bde9b2cc
5
5
  SHA512:
6
- metadata.gz: 22530cfa45962c787536df528f4609511868ecd99994b9dd1fe9f83ceca55517d69a04ce86a0cb92663c030cab0693161b3940f20a6b220aaeb3acc907976dfa
7
- data.tar.gz: cb0f7b157205cd44f2cb254f0b3808908f740268f9dba7b8dd34323399cee13ceb9ab5387992b2816df3f8492c968fc93cbfd2d55965ac5e0bfc3cb21265b653
6
+ metadata.gz: ce9f545a04e8bbe9e09e390f969a4023b585ef5d843a1312cc0fa98b1f09c50957aa503674ed75c52c8162a0250dbe0bc2ac55d5ab2f4b6b2d52e3c6f0e1b5e8
7
+ data.tar.gz: b4d65a623e3f0084602525c1d6fd549f7001802cfaeaefe708ace3fb249c66ba4de37911b4f51aa179b0e300acde588b6d68a797ed9c0b237ca96f4da7728108
@@ -12,6 +12,11 @@ Install rust & tauri
12
12
  curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
13
13
  brew install openssl
14
14
  cargo install tauri-cli --force
15
+ cargo add midir # to add midi dependencies to atome
16
+
17
+ # install elementary
18
+ npm install @nick-thompson/elementary
19
+
15
20
 
16
21
  Install Homebrew
17
22
 
@@ -1,5 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ new({ atome: :editor, type: :hash })
4
+
5
+ new({ sanitizer: :editor }) do |params|
6
+ params = {} unless params.instance_of? Hash
7
+ params[:data] = [] unless params[:data]
8
+ params
9
+ end
10
+
3
11
  new({ atome: :color, type: :hash })
4
12
 
5
13
  new({ sanitizer: :color }) do |params|
@@ -105,6 +113,7 @@ new({ sanitizer: :text }) do |params|
105
113
  params = { data: params } unless params.instance_of? Hash
106
114
  params
107
115
  end
116
+
108
117
  # for later use ( physical is a css like style)
109
118
  new({ atome: :human }) do |params|
110
119
  Universe.add_user = params[:id]
@@ -114,6 +123,9 @@ new({ atome: :paint })
114
123
  new({ atome: :vector })
115
124
  new({ atome: :table })
116
125
  new({ atome: :atomized, type: :hash })
126
+ new({ atome: :map, type: :hash })
127
+ new({atome: :vr, type: :hash})
128
+
117
129
 
118
130
 
119
131
 
@@ -1,61 +1,79 @@
1
1
  # frozen_string_literal: true
2
2
  class Atome
3
- def animation_callback(proc_sub_category, value=nil)
3
+ def animation_callback(proc_sub_category, value = nil)
4
4
  proc_found = @animate_code[proc_sub_category]
5
- instance_exec(value,&proc_found) if proc_found.is_a?(Proc)
5
+ instance_exec(value, &proc_found) if proc_found.is_a?(Proc)
6
6
  end
7
7
  end
8
8
 
9
9
  new({ particle: :touch, category: :event, type: :hash, store: false })
10
+
10
11
  new({ sanitizer: :touch }) do |params, user_bloc|
11
- # user_params=params.dup
12
12
  if params
13
- # TODO: factorise code below
14
13
  @touch ||= {}
15
14
  @touch_code ||= {}
15
+
16
16
  option = true
17
- params = if params.instance_of? Hash
18
- user_bloc =params.delete(:code) if params[:code]
19
- @touch_code[params.keys[0]] = user_bloc
20
- option = params[params.keys[0]]
21
- @touch={ code: user_bloc}
22
- params.keys[0]
23
- else
24
- case params
25
- when true
26
- @touch_code[:tap] = user_bloc
27
- :tap
28
- when :touch
29
- @touch_code[:tap] = user_bloc
30
- :tap
31
- when :down
32
- @touch_code[:down] = user_bloc
33
- :down
34
- when :up
35
- @touch_code[:up] = user_bloc
36
- :up
37
- when :long
38
- @touch_code[:long] = user_bloc
39
- :long
40
- when :double
41
- @touch_code[:double] = user_bloc
42
- :double
43
- when false
44
- @touch_code[:remove] = user_bloc
45
- :remove
46
- else
47
- @touch_code[:tap] = user_bloc
48
- :tap
49
- end
50
- end
51
17
 
52
- @touch[params] = option
53
- params
18
+ key = if params.is_a?(Hash)
19
+
20
+ case
21
+ when params.keys.include?("tap")
22
+ touch_handle_non_hash_params(:tap, params[:code])
23
+ when params.keys.include?("down")
24
+ touch_handle_non_hash_params(:down, params[:code])
25
+ when params.keys.include?("up")
26
+ touch_handle_non_hash_params(:up, params[:code])
27
+ when params.keys.include?("long")
28
+ touch_handle_non_hash_params(:long, params[:code])
29
+ when params.keys.include?("double")
30
+ touch_handle_non_hash_params(:double, params[:code])
31
+ when params.keys.include?(false)
32
+ touch_handle_non_hash_params(false, params[:code])
33
+ when params.keys.include?(:remove)
34
+ touch_handle_non_hash_params(false, params[:remove])
35
+ else
36
+ touch_handle_non_hash_params(:touch, params[:code])
37
+ end
38
+
39
+ else
40
+ touch_handle_non_hash_params(params, user_bloc)
41
+ end
42
+
43
+ @touch[key] = option
44
+ key
54
45
  else
55
46
  @touch = false
56
47
  params
57
48
  end
58
49
  end
50
+
51
+ def touch_handle_non_hash_params(params, user_bloc)
52
+ case params
53
+ when true, :touch, :tap
54
+ (@touch_code[:tap] ||= []) << user_bloc
55
+ :tap
56
+ when :down
57
+ (@touch_code[:down] ||= []) << user_bloc
58
+ :down
59
+ when :up
60
+ (@touch_code[:up] ||= []) << user_bloc
61
+ :up
62
+ when :long
63
+ (@touch_code[:hold] ||= []) << user_bloc
64
+ :long
65
+ when :double
66
+ (@touch_code[:doubletap] ||= []) << user_bloc
67
+ :double
68
+ when false
69
+ (@touch_code[:remove] ||= []) << user_bloc
70
+ :remove
71
+ else
72
+ (@touch_code[:tap] ||= []) << user_bloc
73
+ :tap
74
+ end
75
+ end
76
+
59
77
  new({ particle: :play, category: :event, type: :boolean, store: false })
60
78
  new({ sanitizer: :play }) do |params, user_bloc|
61
79
  @play ||= {}
@@ -101,7 +119,7 @@ new({ sanitizer: :on }) do |params, user_bloc|
101
119
  params = if params.instance_of? Hash
102
120
  @on_code[:view_resize] = user_bloc
103
121
  option = params[params.keys[0]]
104
- @resize={ code: user_bloc}
122
+ @resize = { code: user_bloc }
105
123
  :resize
106
124
  else
107
125
  case params
@@ -109,10 +127,10 @@ new({ sanitizer: :on }) do |params, user_bloc|
109
127
  @on_code[:view_resize] = user_bloc
110
128
  :resize
111
129
  when :remove
112
-
113
130
  :remove
114
131
  else
115
- @on_code[:view_resize] = user_bloc
132
+ @on_code[:view_resize] ||= []
133
+ @on_code[:view_resize] << user_bloc
116
134
  option = params
117
135
  :resize
118
136
  end
@@ -126,50 +144,66 @@ new({ particle: :drag, category: :event, type: :boolean, store: false })
126
144
  new({ sanitizer: :drag }) do |params, user_bloc|
127
145
  @drag ||= {}
128
146
  @drag_code ||= {}
147
+
129
148
  option = true
130
149
  params = if params.instance_of? Hash
131
- user_bloc =params.delete(:code) if params[:code]
132
- @drag_code[params.keys[0]] = user_bloc
133
- option = params[params.keys[0]]
134
- @drag={ code: user_bloc}
135
- params.keys[0]
150
+ user_bloc = params.delete(:code) if params[:code]
151
+ if user_bloc
152
+ @drag_code[params.keys[0]] = [user_bloc]
153
+ else
154
+ @drag_code[params.keys[0]] = []
155
+ end
156
+ option = params[params.keys[0]]
157
+ @drag = { code: [user_bloc] }
158
+ params.keys[0]
136
159
  else
137
160
  case params
138
161
  when true
139
- @drag_code[:move] = user_bloc
162
+ @drag_code[:move] ||= []
163
+ @drag_code[:move] << user_bloc
140
164
  :move
141
165
  when :move
142
- @drag_code[:move] = user_bloc
166
+ @drag_code[:move] ||= []
167
+ @drag_code[:move] << user_bloc
143
168
  :move
144
169
  when :drag
145
- @drag_code[:move] = user_bloc
170
+ @drag_code[:move] ||= []
171
+ @drag_code[:move] << user_bloc
146
172
  :move
147
173
  when :clone
148
- @drag_code[:clone] = user_bloc
174
+ @drag_code[:clone] ||= []
175
+ @drag_code[:clone] << user_bloc
149
176
  :clone
150
177
  when :start
151
- @drag_code[:start] = user_bloc
178
+ @drag_code[:start] ||= []
179
+ @drag_code[:start] << user_bloc
152
180
  :start
153
181
  when :stop
154
- @drag_code[:end] = user_bloc
182
+ @drag_code[:end] ||= []
183
+ @drag_code[:end] << user_bloc
155
184
  :end
156
185
  when :end
157
- @drag_code[:end] = user_bloc
186
+ @drag_code[:end] ||= []
187
+ @drag_code[:end] << user_bloc
158
188
  :end
159
189
  when :locked
160
- @drag_code[:locked] = user_bloc
190
+ @drag_code[:locked] ||= []
191
+ @drag_code[:locked] << user_bloc
161
192
  :locked
162
193
  when false
163
- @drag_code[:remove] = user_bloc
194
+
195
+ @drag_code[:remove] ||= []
196
+ @drag_code[:remove] << option
164
197
  :remove
165
198
  else
166
- @drag_code[:move] = user_bloc
167
- :move
199
+ @drag_code[:move] ||= []
200
+ @drag_code[:move] << user_bloc
168
201
  end
169
202
 
170
203
  end
171
204
  @drag[params] = option
172
205
  if params == :remove
206
+ @drag_code[:remove] << option
173
207
  params = false
174
208
  else
175
209
  @drag[params] = option
@@ -183,30 +217,44 @@ new({ sanitizer: :drop }) do |params, user_bloc|
183
217
  @drop_code ||= {}
184
218
  option = true
185
219
  params = if params.instance_of? Hash
186
- user_bloc =params.delete(:code) if params[:code]
187
- @drop_code[params.keys[0]] = user_bloc
188
- option = params[params.keys[0]]
189
- @drop={ code: user_bloc}
190
- params.keys[0]
220
+ user_bloc = params.delete(:code) if params[:code]
221
+ @drop_code[params.keys[0]] = [user_bloc]
222
+ option = params[params.keys[0]]
223
+ @drop = { code: [user_bloc] }
224
+ params.keys[0]
191
225
  else
192
226
  case params
193
227
  when true
194
- @drop_code[:dropped] = user_bloc
228
+ @drop_code[:dropped] ||= []
229
+ @drop_code[:dropped] << user_bloc
195
230
  :dropped
196
231
  when :enter
197
- @drop_code[:enter] = user_bloc
232
+ @drop_code[:enter] ||= []
233
+ @drop_code[:enter] << user_bloc
198
234
  :enter
199
235
  when :activate
200
- @drop_code[:activate] = user_bloc
236
+ @drop_code[:activate] ||= []
237
+ @drop_code[:activate] << user_bloc
201
238
  :activate
202
239
  when :deactivate
203
- @drop_code[:deactivate] = user_bloc
240
+ @drop_code[:deactivate] ||= []
241
+ @drop_code[:deactivate] << user_bloc
204
242
  :deactivate
243
+ when :remove
244
+ @drop_code[:remove] ||= []
245
+ @drop_code[:remove] << user_bloc
246
+ :remove
247
+ when false
248
+ @drop_code[:remove] ||= []
249
+ @drop_code[:remove] << user_bloc
250
+ :remove
205
251
  when :leave
206
- @drop_code[:leave] = user_bloc
252
+ @drop_code[:leave] ||= []
253
+ @drop_code[:leave] << user_bloc
207
254
  :leave
208
255
  else
209
- @drop_code[:dropped] = user_bloc
256
+ @drop_code[:dropped] ||= []
257
+ @drop_code[:dropped] << user_bloc
210
258
  :dropped
211
259
  end
212
260
 
@@ -222,35 +270,40 @@ new({ sanitizer: :over }) do |params, user_bloc|
222
270
  @over_code ||= {}
223
271
  option = true
224
272
  params = if params.instance_of? Hash
225
- user_bloc =params.delete(:code) if params[:code]
226
- @over_code[params.keys[0]] = user_bloc
227
- option = params[params.keys[0]]
228
- @over={ code: user_bloc}
273
+ user_bloc = params.delete(:code) if params[:code]
274
+ @over_code[params.keys[0]] = [user_bloc]
275
+ option = params[params.keys[0]]
276
+ @over = { code: [user_bloc] }
229
277
 
230
- params.keys[0]
278
+ params.keys[0]
231
279
  else
232
280
  case params
233
281
  when true
234
- @over_code[:over] = user_bloc
282
+ @over_code[:flyover] ||= []
283
+ @over_code[:flyover] << user_bloc
235
284
  :over
236
285
  when :over
237
- @over_code[:over] = user_bloc
286
+ @over_code[:flyover] ||= []
287
+ @over_code[:flyover] << user_bloc
238
288
  :over
239
289
  when :enter
240
- @over_code[:enter] = user_bloc
290
+ @over_code[:enter] ||= []
291
+ @over_code[:enter] << user_bloc
241
292
  :enter
242
293
  when :leave
243
- @over_code[:leave] = user_bloc
294
+ @over_code[:leave] ||= []
295
+ @over_code[:leave] << user_bloc
244
296
  :leave
245
- # when false
246
- # false
247
297
  else
298
+ @over_code[:flyover] ||= []
299
+ @over_code[:flyover] << user_bloc
248
300
  :over
249
301
  end
250
302
 
251
303
  end
252
304
 
253
305
  @over[params] = option
306
+
254
307
  params
255
308
 
256
309
  end
@@ -278,15 +331,8 @@ new({ sanitizer: :keyboard }) do |params, user_bloc|
278
331
 
279
332
  option = {}
280
333
  params = if params.instance_of? Hash
281
- # @keyboard_code[:keyboard] = user_bloc
282
- # option = params[params.keys[0]]
283
- # :remove
284
- user_bloc =params.delete(:code) if params[:code]
285
- @keyboard_code[params.keys[0]] = user_bloc
286
334
  option = params[params.keys[0]]
287
335
  params.keys[0]
288
- @keyboard={ code: user_bloc}
289
-
290
336
  else
291
337
  case params
292
338
  when true
@@ -312,7 +358,6 @@ new({ sanitizer: :keyboard }) do |params, user_bloc|
312
358
 
313
359
  end
314
360
  @keyboard[params] = option
315
-
316
361
  params
317
362
  end
318
363
  new({ particle: :resize, category: :event, type: :boolean, store: false })
@@ -324,8 +369,7 @@ new({ sanitizer: :resize }) do |params, user_bloc|
324
369
  params = if params.instance_of? Hash
325
370
  @resize_code[:resize] = user_bloc
326
371
  option = params[params.keys[0]]
327
- @resize={ code: user_bloc}
328
-
372
+ @resize = { code: user_bloc }
329
373
  :resize
330
374
  else
331
375
  case params
@@ -351,16 +395,16 @@ new({ particle: :overflow, category: :event, type: :boolean }) do |params, bloc|
351
395
 
352
396
  end
353
397
  new({ particle: :animate, category: :event, type: :hash }) do |params, proc|
354
- if params.instance_of? Hash
355
- params = { from: 0, to: 300, duration: 1000 }.merge(params)
356
- else
357
- params = { from: 0, to: 300, duration: 1000 }
358
- end
398
+ params = if params.instance_of? Hash
399
+ { from: 0, to: 300, duration: 1000 }.merge(params)
400
+ else
401
+ { from: 0, to: 300, duration: 1000 }
402
+ end
359
403
  # @animate_code["#{params[:particle]}"] = proc
360
404
  if params[:end]
361
405
  @animate_code["#{params[:end]}_end"] = proc
362
406
  else
363
- @animate_code||= {}
407
+ @animate_code ||= {}
364
408
  @animate_code["#{params[:particle]}"] = proc
365
409
  end
366
410
 
@@ -61,4 +61,5 @@ end
61
61
  new({ particle: :format, category: :identity, type: :string })
62
62
  new({ particle: :alien, category: :identity, type: :string }) # special particel that old alien object
63
63
 
64
- new({ particle: :email, category: :identity, type: :string })
64
+ new({ particle: :email, category: :identity, type: :string })
65
+
@@ -105,4 +105,29 @@ new ({ particle: :increment, category: :spatial, type: :hash }) do |params|
105
105
  prev_value = send(particle)
106
106
  send(particle, value + prev_value)
107
107
  end
108
+ end
109
+
110
+ new({particle: :longitude}) do |params, _user_proc|
111
+ render(:map, {longitude: params })
112
+ params
113
+ end
114
+
115
+ new({particle: :latitude}) do |params, _user_proc|
116
+ render(:map, {latitude: params })
117
+ params
118
+ end
119
+
120
+ new({particle: :location}) do |params, _user_proc|
121
+ render(:map, params)
122
+ params
123
+ end
124
+
125
+ new({particle: :zoom, specific: :map}) do |params, _user_proc|
126
+ render(:map_zoom, params)
127
+ params
128
+ end
129
+
130
+ new({particle: :pan, specific: :map}) do |params, _user_proc|
131
+ render(:map_pan, params)
132
+ params
108
133
  end
@@ -60,19 +60,29 @@ new({ particle: :delete, category: :utility, type: :boolean, render: false }) do
60
60
  grab(attach).unfasten([id])
61
61
  Universe.delete(@aid)
62
62
  end
63
+ elsif params == false
64
+
65
+
66
+ cells.delete(true)
67
+
68
+ # touch(false)
69
+ # render(:delete, params)
70
+ render(:delete, params)
71
+ Universe.delete(@aid)
63
72
  elsif params.instance_of? Hash
64
73
  # if we are on a matrix we delete cells found & group found
65
74
  cells.delete(true)
66
75
  group.delete(true)
67
76
  touch(false)
68
- if params[:recursive]
77
+ if params[:recursive] == true
69
78
  grab(attach).unfasten([id])
70
79
  unless grab(@id).tag && (grab(@id).tag[:persistent] || grab(@id).tag[:system])
71
80
  fasten.each do |atttached_atomes|
72
81
  delete_recursive(atttached_atomes)
73
82
  end
74
83
  # touch(false)
75
- render(:delete, params)
84
+ # render(:delete, params)
85
+ # html.delete(@id)
76
86
  Universe.delete(@aid)
77
87
  end
78
88
  elsif params[:force]
@@ -82,10 +92,7 @@ new({ particle: :delete, category: :utility, type: :boolean, render: false }) do
82
92
  end
83
93
  touch(false)
84
94
  render(:delete, params)
85
- # alert "Universe : #{Universe.atomes[@aid]}"
86
- # alert "length = #{Universe.atomes.length}"
87
95
  Universe.delete(@aid)
88
- # alert "Universe : #{Universe.atomes.length}"
89
96
 
90
97
  else
91
98
  # the machine try to find the sub particle id and remove it eg a.delete(monitor: :my_monitor) remove the monitor
@@ -272,3 +279,4 @@ new({ particle: :storage, category: :utility, type: :hash })
272
279
  new({ particle: :state, category: :utility, type: :symbol })
273
280
  new({ particle: :record, category: :utility, type: :hash })
274
281
  new({ particle: :preview, category: :utility, type: :hash })
282
+ new({particle: :meteo})
@@ -16,10 +16,10 @@ module Essentials
16
16
  @default_params = {
17
17
  # Warning : type must be define first
18
18
  render_engines: [:html],
19
- image: { type: :image, left: 0, top: 0},
19
+ # image: { type: :image, left: 0, top: 0},
20
20
  table: { type: :table, left: 0, top: 0, option: {}},
21
21
  # FIXME : look at build_atome FIXME to resolve default parent attachment problem
22
- video: { type: :video },
22
+ # video: { type: :video },
23
23
  animation: { type: :animation, attach: :black_matter },
24
24
  element: { type: :element, renderers: [], attach: :black_matter },
25
25
  box: { type: :shape, width: 39, height: 39,
@@ -36,6 +36,9 @@ module Essentials
36
36
  shape: { type: :shape, width: 39, height: 39,
37
37
  apply: [:shape_color],
38
38
  left: 0, top: 0 },
39
+ vr: { type: :vr, width: 390, height: 390,
40
+ apply: [:shape_color],
41
+ left: 0, top: 0 },
39
42
  text: { type: :text, component: { size: 12 },left: 0, top: 0,
40
43
  apply: [:text_color],
41
44
  width: :auto, height: :auto,
data/lib/atome/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  # return atome version
4
4
 
5
5
  class Atome
6
- VERSION = '0.5.7.5.4'
6
+ VERSION = '0.5.7.5.9'
7
7
  end
@@ -63,7 +63,7 @@ class Atome
63
63
  atome_found = grab(id_found)
64
64
 
65
65
  is_descendant_of_intuition = atome_found.descendant_of?(:intuition).to_s if atome_found
66
- # # the condition below is use to exclude the treatment any object in the intuition layer
66
+ # the condition below is use to exclude the treatment any object in the intuition layer
67
67
  unless is_descendant_of_intuition == 'true'
68
68
 
69
69
  Universe.active_tools.each do |tool|
@@ -736,3 +736,6 @@ new(molecule: :buttons) do |params, &bloc|
736
736
  main
737
737
  end
738
738
 
739
+ new(molecule: :editor) do |params, &bloc|
740
+
741
+ end
@@ -2,5 +2,7 @@
2
2
 
3
3
  # main add on
4
4
  def alert(val)
5
- JS.eval("alert('#{val.to_s}')")
5
+ val = val.to_s
6
+ escaped_val = val.gsub("'", "\\\\'")
7
+ JS.eval("alert('#{escaped_val}')")
6
8
  end
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  def alert(val)
4
- escaped_val = val.to_s.gsub("'", "\\'").gsub("\n", "\\n")
4
+ val = val.to_s
5
+ escaped_val = val.gsub("'", "\\\\'").gsub("\n", "\\n")
5
6
  JS.eval("alert('#{escaped_val}')")
6
7
  end
7
8
 
@@ -11,8 +11,13 @@ new({ method: :drag, type: :symbol, renderer: :html }) do |params|
11
11
  end
12
12
 
13
13
  new({ method: :drop, type: :symbol, renderer: :html }) do |params|
14
- option = @drop[params]
15
- html.event(:drop, params, option)
14
+ if params
15
+ option = @drop[params]
16
+ html.event(:drop, params, option)
17
+ else
18
+ html.event(:drop, remove, true)
19
+ end
20
+
16
21
  end
17
22
 
18
23
  new({ method: :touch, type: :integer, renderer: :html }) do |params|
@@ -25,13 +30,21 @@ new({ method: :touch, type: :integer, renderer: :html }) do |params|
25
30
  end
26
31
 
27
32
  new({ method: :over, type: :integer, renderer: :html }) do |params|
28
- option = @over[params]
29
- html.event(:over, params, option)
33
+ if params
34
+ option = @over[params]
35
+ html.event(:over, params, option)
36
+ else
37
+ html.event(:over, :remove, true)
38
+ end
30
39
  end
31
40
 
32
41
  new({ method: :keyboard, renderer: :html }) do |params|
33
- option = @keyboard[params]
34
- html.event(:keyboard, params, option)
42
+ if params
43
+ option = @keyboard[params]
44
+ html.event(:keyboard, params, option)
45
+ else
46
+ html.event(:keyboard, :remove, true)
47
+ end
35
48
  end
36
49
 
37
50
  new({ method: :play, renderer: :html }) do |params = true|
@@ -43,6 +56,7 @@ end
43
56
 
44
57
  new({ method: :on, renderer: :html }) do |params|
45
58
  option = @on[params]
59
+
46
60
  html.on(params, option)
47
61
  end
48
62