atome 0.5.4.1.9 → 0.5.5.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (357) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -1
  3. data/README.md +70 -1
  4. data/Rakefile +246 -75
  5. data/app_builder_helpers/Rakefile +276 -288
  6. data/documentation/basic.md +242 -0
  7. data/documentation/deep learning/architecture.txt +3763 -0
  8. data/documentation/deep learning/atome.png +0 -0
  9. data/documentation/deep learning/basic_infos.txt +227 -0
  10. data/documentation/deep learning/example_of_users_code.rb +1810 -0
  11. data/documentation/deep learning/misc.txt +24 -0
  12. data/documentation/deep learning/ruby_js_example.rb +272 -0
  13. data/documentation/deep learning/wasm_script_help.text +14 -0
  14. data/documentation/framework/enhance_atome.md +1 -1
  15. data/documentation/tutorials/tutorials.md +7 -0
  16. data/exe/atome +308 -208
  17. data/lib/atome/atome.rb +52 -156
  18. data/lib/atome/extensions/atome.rb +129 -47
  19. data/lib/atome/extensions/mathematics.rb +20 -0
  20. data/lib/atome/extensions/ping.rb +2 -3
  21. data/lib/atome/genesis/generators/atome.rb +57 -30
  22. data/lib/atome/genesis/generators/communication.rb +9 -0
  23. data/lib/atome/genesis/generators/effect.rb +0 -1
  24. data/lib/atome/genesis/generators/event.rb +279 -43
  25. data/lib/atome/genesis/generators/geometry.rb +1 -10
  26. data/lib/atome/genesis/generators/hierarchy.rb +103 -0
  27. data/lib/atome/genesis/generators/identity.rb +45 -84
  28. data/lib/atome/genesis/generators/material.rb +31 -34
  29. data/lib/atome/genesis/generators/property.rb +31 -0
  30. data/lib/atome/genesis/generators/security.rb +31 -0
  31. data/lib/atome/genesis/generators/spatial.rb +3 -5
  32. data/lib/atome/genesis/generators/time.rb +0 -1
  33. data/lib/atome/genesis/generators/utility.rb +181 -66
  34. data/lib/atome/genesis/genesis.rb +152 -55
  35. data/lib/atome/genesis/sparkle.rb +59 -75
  36. data/lib/atome/helpers/color_helper/color/rgb/colors.rb +1 -1
  37. data/lib/atome/helpers/color_helper/color/rgb.rb +1 -1
  38. data/lib/atome/helpers/color_helper/color.rb +226 -7
  39. data/lib/atome/helpers/essentials.rb +22 -26
  40. data/lib/atome/helpers/security.rb +71 -0
  41. data/lib/atome/helpers/utilities.rb +191 -178
  42. data/lib/atome/kernel/black_matter.rb +22 -0
  43. data/lib/atome/kernel/universe.rb +123 -24
  44. data/lib/atome/presets/atome.rb +39 -35
  45. data/lib/atome/version.rb +3 -2
  46. data/lib/atome.rb +12 -12
  47. data/lib/atome_relative.rb +36 -0
  48. data/lib/{atome/renderers → platform_specific}/opal/atome_opal_extensions.rb +4 -1
  49. data/lib/{atome/renderers → platform_specific}/opal/extensions/color.rb +12 -5
  50. data/lib/{atome/renderers → platform_specific}/opal/extensions/geolocation.rb +1 -0
  51. data/lib/platform_specific/opal/extensions/js.rb +21 -0
  52. data/lib/platform_specific/opal/extensions/object.rb +6 -0
  53. data/lib/platform_specific/opal/extensions/ping.rb +31 -0
  54. data/lib/{atome/renderers → platform_specific}/opal/extensions/sha.rb +4 -2
  55. data/lib/platform_specific/wasm/atome_wasm_extensions.rb +11 -0
  56. data/lib/renderers/headless/headless.rb +18 -0
  57. data/lib/renderers/headless/index.rb +6 -0
  58. data/lib/renderers/headless/index_relative.rb +6 -0
  59. data/lib/renderers/headless/utility.rb +6 -0
  60. data/{vendor/assets/src/medias/rubies/examples/top.rb → lib/renderers/html/atome.rb} +0 -1
  61. data/lib/renderers/html/atome_html.rb +22 -0
  62. data/lib/renderers/html/effect.rb +26 -0
  63. data/lib/renderers/html/event.rb +43 -0
  64. data/lib/renderers/html/geometry.rb +31 -0
  65. data/lib/renderers/html/hierarchy.rb +233 -0
  66. data/lib/renderers/html/html.rb +1112 -0
  67. data/lib/renderers/html/identity.rb +84 -0
  68. data/lib/renderers/html/index.rb +19 -0
  69. data/lib/renderers/html/index_relative.rb +20 -0
  70. data/lib/renderers/html/material.rb +53 -0
  71. data/lib/renderers/html/property.rb +24 -0
  72. data/lib/renderers/html/spatial.rb +46 -0
  73. data/lib/renderers/html/time.rb +1 -0
  74. data/lib/renderers/html/utility.rb +38 -0
  75. data/lib/renderers/renderer.rb +16 -0
  76. data/lib/renderers/server/index.rb +4 -0
  77. data/lib/renderers/server/index_relative.rb +4 -0
  78. data/lib/renderers/server/utility.rb +4 -0
  79. data/sig/atome.rbs +6 -0
  80. data/sig/object.rbs +4 -0
  81. data/sig/universe.rbs +3 -0
  82. data/vendor/assets/Rakefile +3 -3
  83. data/vendor/assets/application/examples/a_concat.rb +16 -0
  84. data/vendor/assets/application/examples/affect.rb +8 -0
  85. data/vendor/assets/application/examples/animation.rb +96 -0
  86. data/vendor/assets/application/examples/apply.rb +8 -0
  87. data/vendor/assets/application/examples/atome.rb +5 -0
  88. data/vendor/assets/application/examples/attach.rb +34 -0
  89. data/vendor/assets/application/examples/attached.rb +38 -0
  90. data/vendor/assets/application/examples/basic_understanding.rb +52 -0
  91. data/vendor/assets/application/examples/browse.rb +17 -0
  92. data/vendor/assets/application/examples/callback.rb +20 -0
  93. data/vendor/assets/application/examples/category.rb +12 -0
  94. data/vendor/assets/application/examples/clear.rb +96 -0
  95. data/vendor/assets/application/examples/clones.rb +177 -0
  96. data/vendor/assets/application/examples/code.rb +13 -0
  97. data/vendor/assets/application/examples/color.rb +54 -0
  98. data/vendor/assets/application/examples/convert.rb +163 -0
  99. data/vendor/assets/application/examples/copy.rb +25 -0
  100. data/vendor/assets/application/examples/copybck.rb +68 -0
  101. data/vendor/assets/application/examples/debug.rb +78 -0
  102. data/vendor/assets/application/examples/delete.rb +93 -0
  103. data/vendor/assets/application/examples/display.rb +279 -0
  104. data/vendor/assets/application/examples/display_bck.rb +164 -0
  105. data/vendor/assets/application/examples/drag.rb +45 -0
  106. data/vendor/assets/application/examples/drop.rb +35 -0
  107. data/vendor/assets/application/examples/duplicate.rb +64 -0
  108. data/vendor/assets/application/examples/edit.rb +21 -0
  109. data/vendor/assets/application/examples/encode.rb +6 -0
  110. data/vendor/assets/application/examples/file.rb +50 -0
  111. data/vendor/assets/application/examples/find.rb +157 -0
  112. data/vendor/assets/application/examples/generator_and_build.rb +15 -0
  113. data/vendor/assets/application/examples/getter.rb +16 -0
  114. data/vendor/assets/application/examples/grab.rb +14 -0
  115. data/vendor/assets/application/examples/gradient.rb +35 -0
  116. data/vendor/assets/application/examples/group.rb +44 -0
  117. data/vendor/assets/application/examples/hierarchy.rb +21 -0
  118. data/vendor/assets/application/examples/history.rb +31 -0
  119. data/vendor/assets/application/examples/hypertext.rb +113 -0
  120. data/vendor/assets/application/examples/image.rb +5 -0
  121. data/vendor/assets/application/examples/keyboard.rb +59 -0
  122. data/vendor/assets/application/examples/layout.rb +227 -0
  123. data/vendor/assets/application/examples/login.rb +10 -0
  124. data/vendor/assets/application/examples/markup.rb +4 -0
  125. data/vendor/assets/application/examples/match.rb +115 -0
  126. data/vendor/assets/application/examples/messaging.rb +16 -0
  127. data/vendor/assets/application/examples/monitor.rb +14 -0
  128. data/vendor/assets/application/examples/on_resize.rb +7 -0
  129. data/vendor/assets/{src/medias/rubies/examples/get_renderer_list.rb → application/examples/online.rb} +1 -1
  130. data/vendor/assets/application/examples/over.rb +29 -0
  131. data/vendor/assets/application/examples/paint.rb +23 -0
  132. data/vendor/assets/application/examples/particles.rb +4 -0
  133. data/vendor/assets/application/examples/percent_to_px.rb +4 -0
  134. data/vendor/assets/application/examples/play.rb +50 -0
  135. data/vendor/assets/application/examples/presets.rb +33 -0
  136. data/vendor/assets/application/examples/random.rb +42 -0
  137. data/vendor/assets/application/examples/raw_html.rb +48 -0
  138. data/vendor/assets/application/examples/read.rb +11 -0
  139. data/vendor/assets/application/examples/refresh.rb +62 -0
  140. data/vendor/assets/application/examples/remove.rb +47 -0
  141. data/vendor/assets/application/examples/repeat.rb +26 -0
  142. data/vendor/assets/application/examples/resize.rb +17 -0
  143. data/vendor/assets/application/examples/scroll.rb +11 -0
  144. data/vendor/assets/application/examples/security.rb +76 -0
  145. data/vendor/assets/application/examples/selected.rb +30 -0
  146. data/vendor/assets/application/examples/shadow.rb +46 -0
  147. data/vendor/assets/application/examples/shapes.rb +6 -0
  148. data/vendor/assets/{src/medias/rubies → application}/examples/smooth.rb +5 -1
  149. data/vendor/assets/application/examples/style.rb +4 -0
  150. data/vendor/assets/application/examples/sync.rb +39 -0
  151. data/vendor/assets/application/examples/tagged.rb +24 -0
  152. data/vendor/assets/application/examples/terminal.rb +4 -0
  153. data/vendor/assets/application/examples/text.rb +5 -0
  154. data/vendor/assets/application/examples/touch.rb +38 -0
  155. data/vendor/assets/application/examples/type_mutation.rb +18 -0
  156. data/vendor/assets/application/examples/universe.rb +8 -0
  157. data/vendor/assets/application/examples/vector.rb +24 -0
  158. data/vendor/assets/application/examples/video.rb +14 -0
  159. data/vendor/assets/application/examples/wait.rb +6 -0
  160. data/vendor/assets/application/examples/www.rb +10 -0
  161. data/vendor/assets/application/index.rb +1 -1
  162. data/vendor/assets/application/test.rb +29 -0
  163. data/vendor/assets/application/works/photos.rb +672 -0
  164. data/vendor/assets/application/works/photos2.rb +218 -0
  165. data/vendor/assets/application/works/photos3.rb +343 -0
  166. data/vendor/assets/application/works/photos4.rb +34 -0
  167. data/vendor/assets/application/works/photos6.rb +6 -0
  168. data/vendor/assets/application/works/trigga.rb +0 -0
  169. data/vendor/assets/application/works/vie.rb +74 -0
  170. data/vendor/assets/server/atome_server.rb +37 -41
  171. data/vendor/assets/server/atome_server_wasm.rb +112 -0
  172. data/vendor/assets/server/capture.rb +10 -0
  173. data/vendor/assets/server/config.ru +5 -4
  174. data/vendor/assets/src/css/style.css +29 -4
  175. data/vendor/assets/src/index.html +31 -38
  176. data/vendor/assets/src/index_opal.html +42 -0
  177. data/vendor/assets/src/index_server.html +43 -0
  178. data/vendor/assets/src/index_server_wasm.html +46 -0
  179. data/vendor/assets/src/js/atome/atome.js +170 -150
  180. data/vendor/assets/src/js/atome/atome_helpers/add_font.js +46 -0
  181. data/vendor/assets/src/js/atome/atome_helpers/atome_drag.js +3 -1
  182. data/vendor/assets/src/js/atome/atome_helpers/atome_events.js +12 -7
  183. data/vendor/assets/src/js/atome/atome_helpers/communication.js +126 -0
  184. data/vendor/assets/src/js/atome/atome_helpers/{atome_file.js → file.js} +1 -1
  185. data/vendor/assets/src/js/atome/specific/opal.js +3 -0
  186. data/vendor/assets/src/js/atome/specific/wasm.js +12 -0
  187. data/vendor/assets/src/js/third_parties/browser.script.iife.min.js +13 -0
  188. data/vendor/assets/src/js/third_parties/fabric.min.js +1 -1
  189. data/vendor/assets/src/js/third_parties/html-to-image.min.js +2 -0
  190. data/vendor/assets/src/js/third_parties/jsencrypt.min.js +2 -0
  191. data/vendor/assets/src/js/third_parties/papaparse.min.js +7 -0
  192. data/vendor/assets/src/medias/fonts/Roboto/LICENSE.txt +202 -0
  193. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Black.ttf +0 -0
  194. data/vendor/assets/src/medias/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
  195. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Bold.ttf +0 -0
  196. data/vendor/assets/src/medias/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
  197. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Italic.ttf +0 -0
  198. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Light.ttf +0 -0
  199. data/vendor/assets/src/medias/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
  200. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Medium.ttf +0 -0
  201. data/vendor/assets/src/medias/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
  202. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Regular.ttf +0 -0
  203. data/vendor/assets/src/medias/fonts/Roboto/Roboto-Thin.ttf +0 -0
  204. data/vendor/assets/src/medias/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
  205. data/vendor/assets/src/medias/images/logos/Facebook.svg +1 -1
  206. data/vendor/assets/src/medias/images/logos/LinkedIn-full.svg +109 -0
  207. data/vendor/assets/src/medias/images/logos/LinkedIn.svg +11 -0
  208. data/vendor/assets/src/medias/images/logos/X.svg +5 -0
  209. data/vendor/assets/src-tauri/Cargo.toml +1 -1
  210. data/vendor/assets/src-tauri/src/main.rs +59 -5
  211. data/vendor/assets/src-tauri/tauri.conf.json +1 -1
  212. data/vendor/assets/src-wasm/wasm/wasi-vfs-osx_arm +0 -0
  213. data/vendor/assets/src-wasm/wasm/wasi-vfs-osx_x86 +0 -0
  214. data/vendor/assets/src-wasm/wasm/wasi-vfs-unix +0 -0
  215. data/vendor/assets/src-wasm/wasm/wasi-vfs.exe +0 -0
  216. metadata +188 -180
  217. data/lib/atome/extensions/mathematic.rb +0 -20
  218. data/lib/atome/extensions/matrix.rb +0 -346
  219. data/lib/atome/helpers/callbacks.rb +0 -133
  220. data/lib/atome/kernel/batch.rb +0 -26
  221. data/lib/atome/kernel/essentials.rb +0 -23
  222. data/lib/atome/renderers/browser/atome.rb +0 -177
  223. data/lib/atome/renderers/browser/browser.rb +0 -47
  224. data/lib/atome/renderers/browser/effect.rb +0 -23
  225. data/lib/atome/renderers/browser/event.rb +0 -96
  226. data/lib/atome/renderers/browser/geometry.rb +0 -27
  227. data/lib/atome/renderers/browser/helpers/animation_helper.rb +0 -69
  228. data/lib/atome/renderers/browser/helpers/browser_helper.rb +0 -101
  229. data/lib/atome/renderers/browser/helpers/color_helper.rb +0 -95
  230. data/lib/atome/renderers/browser/helpers/drag_helper.rb +0 -52
  231. data/lib/atome/renderers/browser/helpers/drop_helper.rb +0 -13
  232. data/lib/atome/renderers/browser/helpers/effect_helper.rb +0 -23
  233. data/lib/atome/renderers/browser/helpers/event_helper.rb +0 -76
  234. data/lib/atome/renderers/browser/helpers/image_helper.rb +0 -27
  235. data/lib/atome/renderers/browser/helpers/over_helper.rb +0 -13
  236. data/lib/atome/renderers/browser/helpers/shadow_helper.rb +0 -74
  237. data/lib/atome/renderers/browser/helpers/shape_helper.rb +0 -22
  238. data/lib/atome/renderers/browser/helpers/text_helper.rb +0 -38
  239. data/lib/atome/renderers/browser/helpers/video_helper.rb +0 -50
  240. data/lib/atome/renderers/browser/helpers/web_helper.rb +0 -26
  241. data/lib/atome/renderers/browser/identity.rb +0 -61
  242. data/lib/atome/renderers/browser/material.rb +0 -121
  243. data/lib/atome/renderers/browser/opal_add_on.rb +0 -32
  244. data/lib/atome/renderers/browser/opal_browser.rb +0 -6
  245. data/lib/atome/renderers/browser/spatial.rb +0 -59
  246. data/lib/atome/renderers/browser/time.rb +0 -3
  247. data/lib/atome/renderers/browser/utility.rb +0 -49
  248. data/lib/atome/renderers/headless/headless.rb +0 -10
  249. data/lib/atome/renderers/headless/utility.rb +0 -6
  250. data/lib/atome/renderers/html/atome.rb +0 -49
  251. data/lib/atome/renderers/html/effect.rb +0 -19
  252. data/lib/atome/renderers/html/event.rb +0 -9
  253. data/lib/atome/renderers/html/geometry.rb +0 -11
  254. data/lib/atome/renderers/html/html.rb +0 -42
  255. data/lib/atome/renderers/html/identity.rb +0 -14
  256. data/lib/atome/renderers/html/opal_browser.rb +0 -6
  257. data/lib/atome/renderers/html/spatial.rb +0 -28
  258. data/lib/atome/renderers/html/utility.rb +0 -17
  259. data/lib/atome/renderers/opal/extensions/atome.rb +0 -29
  260. data/lib/atome/renderers/opal/extensions/ping.rb +0 -18
  261. data/lib/atome/renderers/renderer.rb +0 -15
  262. data/lib/atome/renderers/server/server.rb +0 -10
  263. data/lib/atome/renderers/server/utility.rb +0 -6
  264. data/vendor/assets/aui.rb +0 -5
  265. data/vendor/assets/r&d/misc.rb +0 -219
  266. data/vendor/assets/r&d/ping.rb +0 -3
  267. data/vendor/assets/r&d/storage.rb +0 -9
  268. data/vendor/assets/r&d/view_example.rb +0 -21
  269. data/vendor/assets/src/js/atome/atome_helpers/atome_communication.js +0 -40
  270. data/vendor/assets/src/medias/javascripts/test.js +0 -1
  271. data/vendor/assets/src/medias/rubies/demos.rb +0 -63
  272. data/vendor/assets/src/medias/rubies/examples/add.rb +0 -24
  273. data/vendor/assets/src/medias/rubies/examples/animation.rb +0 -81
  274. data/vendor/assets/src/medias/rubies/examples/atome_new.rb +0 -27
  275. data/vendor/assets/src/medias/rubies/examples/attach.rb +0 -15
  276. data/vendor/assets/src/medias/rubies/examples/attached.rb +0 -15
  277. data/vendor/assets/src/medias/rubies/examples/auto_height.rb +0 -5
  278. data/vendor/assets/src/medias/rubies/examples/auto_width.rb +0 -4
  279. data/vendor/assets/src/medias/rubies/examples/batch.rb +0 -17
  280. data/vendor/assets/src/medias/rubies/examples/blur.rb +0 -4
  281. data/vendor/assets/src/medias/rubies/examples/bottom.rb +0 -3
  282. data/vendor/assets/src/medias/rubies/examples/box.rb +0 -20
  283. data/vendor/assets/src/medias/rubies/examples/center.rb +0 -21
  284. data/vendor/assets/src/medias/rubies/examples/circle.rb +0 -3
  285. data/vendor/assets/src/medias/rubies/examples/class.rb +0 -13
  286. data/vendor/assets/src/medias/rubies/examples/clear.rb +0 -10
  287. data/vendor/assets/src/medias/rubies/examples/clone.rb +0 -35
  288. data/vendor/assets/src/medias/rubies/examples/code.rb +0 -11
  289. data/vendor/assets/src/medias/rubies/examples/color.rb +0 -73
  290. data/vendor/assets/src/medias/rubies/examples/create_atome_in_atome.rb +0 -13
  291. data/vendor/assets/src/medias/rubies/examples/cursor.rb +0 -7
  292. data/vendor/assets/src/medias/rubies/examples/delete.rb +0 -42
  293. data/vendor/assets/src/medias/rubies/examples/depth.rb +0 -6
  294. data/vendor/assets/src/medias/rubies/examples/detached.rb +0 -13
  295. data/vendor/assets/src/medias/rubies/examples/drag.rb +0 -98
  296. data/vendor/assets/src/medias/rubies/examples/drop.rb +0 -26
  297. data/vendor/assets/src/medias/rubies/examples/edit.rb +0 -12
  298. data/vendor/assets/src/medias/rubies/examples/element.rb +0 -6
  299. data/vendor/assets/src/medias/rubies/examples/empty_atome.rb +0 -12
  300. data/vendor/assets/src/medias/rubies/examples/fullscreen.rb +0 -15
  301. data/vendor/assets/src/medias/rubies/examples/grab.rb +0 -5
  302. data/vendor/assets/src/medias/rubies/examples/height.rb +0 -7
  303. data/vendor/assets/src/medias/rubies/examples/hide.rb +0 -7
  304. data/vendor/assets/src/medias/rubies/examples/id.rb +0 -14
  305. data/vendor/assets/src/medias/rubies/examples/image.rb +0 -8
  306. data/vendor/assets/src/medias/rubies/examples/left.rb +0 -7
  307. data/vendor/assets/src/medias/rubies/examples/link.rb +0 -22
  308. data/vendor/assets/src/medias/rubies/examples/markers.rb +0 -48
  309. data/vendor/assets/src/medias/rubies/examples/materials.rb +0 -15
  310. data/vendor/assets/src/medias/rubies/examples/matrix.rb +0 -102
  311. data/vendor/assets/src/medias/rubies/examples/matrix_changes.rb +0 -483
  312. data/vendor/assets/src/medias/rubies/examples/matrix_simple.rb +0 -32
  313. data/vendor/assets/src/medias/rubies/examples/monitoring.rb +0 -70
  314. data/vendor/assets/src/medias/rubies/examples/mute.rb +0 -22
  315. data/vendor/assets/src/medias/rubies/examples/on.rb +0 -26
  316. data/vendor/assets/src/medias/rubies/examples/opacity.rb +0 -5
  317. data/vendor/assets/src/medias/rubies/examples/over.rb +0 -21
  318. data/vendor/assets/src/medias/rubies/examples/pause.rb +0 -15
  319. data/vendor/assets/src/medias/rubies/examples/physical.rb +0 -19
  320. data/vendor/assets/src/medias/rubies/examples/play.rb +0 -15
  321. data/vendor/assets/src/medias/rubies/examples/read.rb +0 -11
  322. data/vendor/assets/src/medias/rubies/examples/refresh.rb +0 -8
  323. data/vendor/assets/src/medias/rubies/examples/remove.rb +0 -16
  324. data/vendor/assets/src/medias/rubies/examples/repeat.rb +0 -6
  325. data/vendor/assets/src/medias/rubies/examples/right.rb +0 -3
  326. data/vendor/assets/src/medias/rubies/examples/rotate.rb +0 -4
  327. data/vendor/assets/src/medias/rubies/examples/schedule.rb +0 -13
  328. data/vendor/assets/src/medias/rubies/examples/shadow.rb +0 -84
  329. data/vendor/assets/src/medias/rubies/examples/size.rb +0 -8
  330. data/vendor/assets/src/medias/rubies/examples/sort.rb +0 -18
  331. data/vendor/assets/src/medias/rubies/examples/style.rb +0 -4
  332. data/vendor/assets/src/medias/rubies/examples/tags.rb +0 -10
  333. data/vendor/assets/src/medias/rubies/examples/text.rb +0 -39
  334. data/vendor/assets/src/medias/rubies/examples/time.rb +0 -18
  335. data/vendor/assets/src/medias/rubies/examples/to_px.rb +0 -10
  336. data/vendor/assets/src/medias/rubies/examples/touch.rb +0 -56
  337. data/vendor/assets/src/medias/rubies/examples/vector.rb +0 -39
  338. data/vendor/assets/src/medias/rubies/examples/video.rb +0 -65
  339. data/vendor/assets/src/medias/rubies/examples/wait.rb +0 -8
  340. data/vendor/assets/src/medias/rubies/examples/web.rb +0 -13
  341. data/vendor/assets/src/medias/rubies/examples/width.rb +0 -6
  342. data/vendor/assets/src/medias/rubies/test.rb +0 -1
  343. data/vendor/assets/src/medias/rubies/text_read.rb +0 -1
  344. data/vendor/assets/src/medias/rubies/unstable/!run.rb +0 -16
  345. data/vendor/assets/src/medias/rubies/unstable/_2_solve.rb +0 -72
  346. data/vendor/assets/src/medias/rubies/unstable/_attach.rb +0 -12
  347. data/vendor/assets/src/medias/rubies/unstable/_audio.rb +0 -231
  348. data/vendor/assets/src/medias/rubies/unstable/_dataset.rb +0 -257
  349. data/vendor/assets/src/medias/rubies/unstable/_matrix.rb +0 -58
  350. data/vendor/assets/src/medias/rubies/unstable/_os.rb +0 -29
  351. data/vendor/assets/src/medias/rubies/unstable/_table2.rb +0 -108
  352. data/vendor/assets/src/medias/rubies/unstable/_vie.rb +0 -211
  353. data/vendor/assets/src/medias/rubies/users/code.rb +0 -6
  354. /data/lib/{atome/renderers → platform_specific}/opal/opal.rb +0 -0
  355. /data/lib/{atome/renderers → platform_specific}/opal/opal_parser.rb +0 -0
  356. /data/{vendor/assets/src/utilities/mode.rb → lib/renderers/html/communication.rb} +0 -0
  357. /data/{vendor/assets/src/medias/rubies/unstable/_test.rb → lib/renderers/html/security.rb} +0 -0
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+
4
+ # here is how callbock is used with atome
5
+ test_box = box({left: -20})
6
+
7
+ test_box.blur(9) do |params_back|
8
+ puts "here is the callback : #{params_back}"
9
+ end
10
+ # per example it's possible to set back params like this
11
+ test_box.callback({ blur: 'I am the callback content!!' })
12
+ # now we call the callback for blur
13
+ test_box.call(:blur)
14
+
15
+ circle({id: :the_c})
16
+ # here is a callback with event params
17
+ test_box.drag(true) do |event|
18
+ grab(:the_c).left(150+event[:pageX].to_i)
19
+ end
20
+
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ # assign a class to atom object in the webview
4
+
5
+ t=text('touch the box')
6
+ b=box({ left: 12, id: :the_first_box })
7
+ b.category(:matrix)
8
+ b.touch(true) do
9
+ b.remove({ category: :matrix})
10
+ t.data= " category is : #{b.category} + look in the browser console"
11
+ end
12
+ t.data= " category is : #{b.category} + look in the browser console"
@@ -0,0 +1,96 @@
1
+ # frozen_string_literal: true
2
+
3
+ # here is how to clear the content of an atome
4
+ b=box
5
+ c=circle
6
+ b.left(0)
7
+ c.left(222)
8
+ wait 2 do
9
+ # Important : please note that the view is also an atome, this this a system atome that can't be deleted,
10
+ # There are a few system atomes created at init time
11
+ # Here are the list of the system atomes created at system startup:
12
+ # we can clear it's content using .clear(true) its the same action as if I have done : b.delete(true) and c.delete(true)
13
+ grab(:view).clear(true)
14
+ end
15
+
16
+
17
+ # here are the list of system atomes created at system startup :
18
+
19
+
20
+ #Atome.new(
21
+ # { renderers: [], id: :eDen, type: :element, tag: { system: true }, attach: [], attached: [] }
22
+ # )
23
+ # Atome.new(
24
+ # { renderers: [], id: :user_view, type: :element, tag: { system: true },
25
+ # attach: [:eDen], attached: [] }
26
+ # )
27
+ #
28
+ # # color creation
29
+ # Atome.new(
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: [] }
32
+ # )
33
+ #
34
+ # Atome.new(
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: [] }
37
+ # )
38
+ #
39
+ # Atome.new(
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: [] }
42
+ # )
43
+ #
44
+ # Atome.new(
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: [] }
47
+ # )
48
+ #
49
+ # Atome.new(
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: [] }
52
+ # )
53
+ #
54
+ # Atome.new(
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: [] }
57
+ # )
58
+ #
59
+ # # system object creation
60
+ # # the black_matter is used to store un materialized atomes
61
+ # Atome.new(
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: []
64
+ # })
65
+ #
66
+ # # view port
67
+ # Atome.new(
68
+ # { renderers: default_render, id: :view, type: :shape, attach: [:user_view], apply: [:view_color],
69
+ # tag: { system: true },
70
+ # attached: [], left: 0, right: 0, top: 0, bottom: 0, width: :auto, height: :auto, overflow: :auto,
71
+ # }
72
+ #
73
+ # )
74
+ #
75
+ # # unreal port, hold system object and tools
76
+ # Atome.new(
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: []
79
+ # }
80
+ # )
81
+ #
82
+ # machine_id = :dummy_machine
83
+ # # attention we must used two separate pass to avoid the password to be encode twice
84
+ # machine_password = { read: {atome: :star_wars},write: {atome: :star_wars} }
85
+ # user_password = { read: {atome: :star_wars},write: {atome: :star_wars} }
86
+ #
87
+ # machine({ id: machine_id, password: machine_password, name: :macAir, data: { date: '10090717' }, tag: { system: true } })
88
+ #
89
+ # human({ id: :anonymous, login: true, password: user_password, data: { birthday: '10/05/1996' }, tag: { system: true } })
90
+ #
91
+ # # default_user.set_current_user(:anonymous)
92
+ # Universe.current_machine = machine_id
93
+ # # the constant A is used to access alla atomes methods
94
+ # A = Atome.new(
95
+ # { renderers: default_render, id: :atome, type: :element, tag: { system: true }, attach: [], attached: [] }
96
+ # )
@@ -0,0 +1,177 @@
1
+ # # frozen_string_literal: true
2
+ #
3
+ # # TODO : clones alteration must be bidirectional, to do so :
4
+ # # 1 - we may create an atome type 'clone' then add a ' pre_render_clones option' when rendering clones property
5
+ # # 2 - this pre_render_clones option, will catch alterations and throw it the the original atome
6
+ # # 3 - we also add a new particle call mirror that holds the particle's list that will reverse intrication
7
+ #
8
+ # b = box({ color: :red, smooth: 6, id: :the_box })
9
+ #
10
+ # b.clones([{ left: 300, top: 300, color: :blue, entangled: [:width, :attached, :height] },
11
+ # { left: 600, top: 366, color: :green, entangled: [:left, :height] }])
12
+ #
13
+ # wait 1 do
14
+ # b.width(190)
15
+ # end
16
+ #
17
+ # wait 2 do
18
+ # b.height(180)
19
+ # end
20
+ #
21
+ # wait 3 do
22
+ # b.left(180)
23
+ # end
24
+ #
25
+ # grab(:the_box_clone_0).smooth(33)
26
+ # #
27
+ # grab(:the_box_clone_1).rotate(33)
28
+ #
29
+ # wait 5 do
30
+ # b.clones.each do |clone_found|
31
+ # grab(clone_found[:id]).delete(true)
32
+ # end
33
+ # end
34
+ #
35
+
36
+ class Atome
37
+ class << self
38
+ def monitoring(atomes_to_monitor, particles_to_monitor, &bloc)
39
+ atomes_to_monitor.each do |atome_to_monitor|
40
+ particles_to_monitor.each do |monitored_particle|
41
+ # Stockage de la méthode originale
42
+ original_method = atome_to_monitor.method(monitored_particle)
43
+
44
+ # Redéfinition de la méthode
45
+ atome_to_monitor.define_singleton_method(monitored_particle) do |*args, &proc|
46
+
47
+ # Bloc de surveillance avant l'appel de la méthode originale
48
+ value_before = atome_to_monitor.instance_variable_get("@#{monitored_particle}")
49
+ # bloc.call({ original: value_before, altered: args, particle: monitored_particle }) if bloc.is_a?(Proc)
50
+ # value_before=previous_value.dup
51
+ if args.empty?
52
+ args = nil
53
+ else
54
+ if monitored_particle == :touch
55
+ instance_variable_set("@#{monitored_particle}", { tap: args[0] })
56
+ instance_variable_set("@#{monitored_particle}_code", { touch: proc })
57
+
58
+ args = { tap: args[0] }
59
+ else
60
+ instance_variable_set("@#{monitored_particle}", args[0])
61
+ end
62
+ # instance_variable_set("@#{monitored_particle}",args[0])
63
+ args = args[0]
64
+ end
65
+ instance_exec({ original: value_before, altered: args, particle: monitored_particle }, &bloc) if bloc.is_a?(Proc)
66
+ original_method.call(*args)
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
73
+
74
+ c = circle({ id: :the_circle, left: 12, top: 0, color: :orange, drag: { move: true, inertia: true, lock: :start } })
75
+ b = box({ top: 123 })
76
+
77
+ t = text({ data: :hello, left: 300 })
78
+
79
+ t.touch(true) do
80
+ alert "#{b.touch} , #{b.touch_code}"
81
+ b.touch_code[:touch].call
82
+ end
83
+ col = color({ id: :col1, red: 1, blue: 1 })
84
+ # #######################
85
+ atomes_monitored = [c, b]
86
+ # particles_monitored=[:left, :width, :touch, :apply]
87
+ particles_monitored=[:left, :width, :apply]
88
+ # particles_monitored = [:touch]
89
+ Atome.monitoring(atomes_monitored, particles_monitored) do |monitor_infos|
90
+ puts "1 ==> #{@id} : #{monitor_infos[:particle]},#{monitor_infos[:altered]}"
91
+
92
+ atomes_monitored.each do |atome_to_update|
93
+ # we exclude the current changing atome to avoid infinite loop
94
+ unless atome_to_update == self || (monitor_infos[:original] == monitor_infos[:altered]) || !monitor_infos[:altered]
95
+ puts "2 ==> #{atome_to_update.id} : #{monitor_infos[:particle]},#{monitor_infos[:altered]}"
96
+ atome_to_update.send(monitor_infos[:particle], monitor_infos[:altered])
97
+ end
98
+
99
+ end
100
+ end
101
+ # ####################
102
+ b.resize(true)
103
+ c.resize(true) do |l|
104
+
105
+ puts c.instance_variable_get("@resize_code")
106
+ end
107
+ ccc = color(:red)
108
+ wait 1 do
109
+ # b.left(133)
110
+ b.touch(true) do
111
+ alert "b width is #{b.width}"
112
+ end
113
+ # alert "touch contain : #{b.instance_variable_get("@touch")}"
114
+ # alert "touch code contain :#{b.instance_variable_get("@touch_code")}"
115
+
116
+ c.left(133)
117
+ wait 1 do
118
+ # c.color(:red)
119
+ # c.apply([ccc.id])
120
+ b.width(155)
121
+ end
122
+ end
123
+
124
+
125
+ # TODO : make multi parents works
126
+ # TODO : make it works for event like touch , also attach and attached
127
+ # wait 2 do
128
+ # col = color({ id: :col1, red: 1, blue: 1 })
129
+ # Atome.monitoring([col], [:red, :blue], [:variable1, :variable2])
130
+ #
131
+ # c.apply([:col1])
132
+ # wait 2 do
133
+ # col.red(0)
134
+ # col.red
135
+ # c.apply([:col1])
136
+ # end
137
+ # end
138
+
139
+
140
+
141
+ ############## add class solution
142
+ the_b=box({color: :green})
143
+
144
+ the_b.resize(true) do
145
+ puts :j
146
+ end
147
+ class HTML
148
+
149
+ def id(id)
150
+ @element[:classList].add(id.to_s)
151
+ attr('id', id)
152
+ self
153
+ end
154
+ def add_class(val)
155
+ @element[:classList].add(val.to_s)
156
+ # @element.setAttribute('id', val)
157
+ end
158
+
159
+ # def force_top(id,value)
160
+ # element=JS.global[:document].getElementById(id.to_s)
161
+ # element[:style][:top] ='33px'
162
+ # end
163
+ end
164
+
165
+ new({ particle: :add_class }) do |params|
166
+ html.add_class(params)
167
+ end
168
+ #
169
+ # new({ particle: :force_top }) do |params|
170
+ # html.force_top(params)
171
+ # end
172
+
173
+ b = box({ id: :toto })
174
+ bb = box({ id: :toto, left: 333 })
175
+ bb.add_class(:toto)
176
+ b.add_class(:toto)
177
+ # bb.force_top(:toto,3)
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+ new({ particle: :run }) do |params, code|
3
+ code_found = @code_code[:code]
4
+ instance_exec(params, &code_found) if code_found.is_a?(Proc)
5
+ end
6
+ a = box
7
+ a.code(:hello) do
8
+ circle({ left: 333 })
9
+ end
10
+ wait 1 do
11
+ a.run(:hello)
12
+ end
13
+
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # frozen_string_literal: true
4
+
5
+ # puts 'type you problematic code here!'
6
+ col=color({green: 1, id: :the_col})
7
+
8
+ b=box({top: 3})
9
+ t=text(data: :red, left: 0, top: 123)
10
+ t1=text(data: :green, left: 100, top: 123)
11
+ t2=text(data: :blue, left: 200, top: 123)
12
+ t3=text(data: :yellow, left: 300, top: 123)
13
+ t4=text(data: :orange, left: 400, top: 123)
14
+ t5=text(data: :cyan, left: 500, top: 123)
15
+
16
+ item_to_batch=[t.id,t1.id,t2.id, t3.id, t4.id, t5.id]
17
+ the_group= group({ collect: item_to_batch })
18
+ the_group.apply([:the_col])
19
+ t.touch(true) do
20
+ b.color({id: :red, red: 1 })
21
+ # puts "number of atomes : #{Universe.atomes.length}"
22
+ end
23
+ t1.touch(true) do
24
+ b.color({id: :green, green: 1 })
25
+ # puts "number of atomes : #{Universe.atomes.length}"
26
+ end
27
+ t2.touch(true) do
28
+ b.color({id: :blue, blue: 1 })
29
+ # puts "number of atomes : #{Universe.atomes.length}"
30
+ end
31
+ t3.touch(true) do
32
+ b.color({id: :yellow, red: 1, green: 1 })
33
+ # puts "number of atomes : #{Universe.atomes.length}"
34
+ end
35
+ t4.touch(true) do
36
+ b.color({id: :orange, red: 1, green: 0.5 })
37
+ # puts "number of atomes : #{Universe.atomes.length}"
38
+ end
39
+ t5.touch(true) do
40
+ b.color({id: :cyan, blue: 1, green: 1 })
41
+ # puts "number of atomes : #{Universe.atomes.length}"
42
+ end
43
+
44
+ t=text({data: "dynamic color propagation, touch me to propagate"})
45
+ t.apply(:the_col)
46
+ c=circle({id: :the_circle, top: 260})
47
+ c.apply([:the_col])
48
+ b.apply([:the_col])
49
+
50
+ t.touch(true) do
51
+ col.red(1)
52
+ end
53
+
54
+
@@ -0,0 +1,163 @@
1
+ # frozen_string_literal: true
2
+
3
+ b = box({ id: :the_html, color: :orange, overflow: :auto, width: :auto, height: :auto, left: 100, right: 100, top: 100, bottom: 100 })
4
+ html_desc = <<STR
5
+ <!DOCTYPE html>
6
+ <html>
7
+ <head>
8
+ <title>Une petite page HTML</title>
9
+ <meta charset="utf-8" />
10
+ </head>
11
+ <body>
12
+ <h1 id='title' style='color: yellowgreen'>Un titre de niveau 1</h1>
13
+
14
+ <p>
15
+ Un premier petit paragraphe.
16
+ </p>
17
+
18
+ <h2>Un titre de niveau 2</h2>
19
+
20
+ <p>
21
+ Un autre paragraphe contenant un lien pour aller
22
+ sur le site <a href="http://koor.fr">KooR.fr</a>.
23
+ </p>
24
+ </body>
25
+ </html>
26
+ STR
27
+
28
+ b.hypertext(html_desc)
29
+
30
+ def markup_analysis(markup) end
31
+
32
+ def convert(params)
33
+ case
34
+ when params.keys.include?(:atome)
35
+
36
+ # Atome.new({type})
37
+ puts params[:atome]
38
+ else
39
+ # ...
40
+ end
41
+ end
42
+
43
+ b.hyperedit(:title) do |tag_desc|
44
+ convert({ atome: tag_desc })
45
+ end
46
+
47
+ # Bien sûr ! Voici une liste des principaux types de balises (tags) HTML. Cependant, notez qu'avec l'évolution du web et les différentes versions de HTML, il peut y avoir de légères variations. Cette liste est basée sur la spécification HTML5 :
48
+ #
49
+ # 1. **Métadonnées**:
50
+ # - `<!DOCTYPE>`
51
+ # - `<head>`
52
+ # - `<meta>`
53
+ # - `<base>`
54
+ # - `<link>`
55
+ # - `<style>`
56
+ # - `<title>`
57
+ # - `<script>`
58
+ # - `<noscript>`
59
+ #
60
+ # 2. **Structure du document**:
61
+ # - `<html>`
62
+ # - `<body>`
63
+ # - `<header>`
64
+ # - `<footer>`
65
+ # - `<nav>`
66
+ # - `<article>`
67
+ # - `<section>`
68
+ # - `<aside>`
69
+ # - `<h1>`, `<h2>`, `<h3>`, `<h4>`, `<h5>`, `<h6>`
70
+ #
71
+ # 3. **Contenu du texte**:
72
+ # - `<p>`
73
+ # - `<hr>`
74
+ # - `<pre>`
75
+ # - `<blockquote>`
76
+ # - `<ol>`
77
+ # - `<ul>`
78
+ # - `<li>`
79
+ # - `<dl>`
80
+ # - `<dt>`
81
+ # - `<dd>`
82
+ # - `<figure>`
83
+ # - `<figcaption>`
84
+ # - `<div>`
85
+ #
86
+ # 4. **Contenu en ligne**:
87
+ # - `<a>`
88
+ # - `<em>`
89
+ # - `<strong>`
90
+ # - `<small>`
91
+ # - `<s>`
92
+ # - `<cite>`
93
+ # - `<q>`
94
+ # - `<dfn>`
95
+ # - `<abbr>`
96
+ # - `<data>`
97
+ # - `<time>`
98
+ # - `<code>`
99
+ # - `<var>`
100
+ # - `<samp>`
101
+ # - `<kbd>`
102
+ # - `<sub>`
103
+ # - `<sup>`
104
+ # - `<i>`
105
+ # - `<b>`
106
+ # - `<u>`
107
+ # - `<mark>`
108
+ # - `<ruby>`
109
+ # - `<rt>`
110
+ # - `<rp>`
111
+ # - `<bdi>`
112
+ # - `<bdo>`
113
+ # - `<span>`
114
+ # - `<br>`
115
+ # - `<wbr>`
116
+ #
117
+ # 5. **Contenu intégré**:
118
+ # - `<img>`
119
+ # - `<iframe>`
120
+ # - `<embed>`
121
+ # - `<object>`
122
+ # - `<param>`
123
+ # - `<video>`
124
+ # - `<audio>`
125
+ # - `<source>`
126
+ # - `<track>`
127
+ # - `<canvas>`
128
+ # - `<map>`
129
+ # - `<area>`
130
+ # - `<svg>`
131
+ # - `<math>`
132
+ #
133
+ # 6. **Données du formulaire**:
134
+ # - `<form>`
135
+ # - `<input>`
136
+ # - `<textarea>`
137
+ # - `<button>`
138
+ # - `<select>`
139
+ # - `<optgroup>`
140
+ # - `<option>`
141
+ # - `<label>`
142
+ # - `<fieldset>`
143
+ # - `<legend>`
144
+ # - `<datalist>`
145
+ # - `<output>`
146
+ # - `<progress>`
147
+ # - `<meter>`
148
+ #
149
+ # 7. **Éléments interactifs**:
150
+ # - `<details>`
151
+ # - `<summary>`
152
+ # - `<command>`
153
+ # - `<menu>`
154
+ #
155
+ # 8. **Éléments d'écriture**:
156
+ # - `<script>`
157
+ # - `<noscript>`
158
+ # - `<template>`
159
+ # - `<canvas>`
160
+ #
161
+ # 9. **D'autres éléments** (comme les éléments dépréciés ou obsolètes de versions antérieures de HTML) peuvent également être trouvés dans le wild web, mais leur utilisation n'est pas recommandée dans les nouveaux projets.
162
+ #
163
+ # Cette liste n'est pas exhaustive et certaines balises pourraient être ajoutées ou modifiées avec de futures versions de HTML. Toujours se référer à la documentation officielle ou à des ressources fiables pour une liste complète à jour.
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ b = box
4
+ c = circle
5
+ t = text('touch me')
6
+
7
+ b.copy([c.id, b.id, t.id])
8
+ b.copy(b.id)
9
+
10
+ wait 1 do
11
+ c.paste([0, 2])
12
+ wait 1 do
13
+ t.paste(0)
14
+ end
15
+
16
+ end
17
+
18
+ t.touch(true) do
19
+ copies = t.paste(0)
20
+ copies.each do |atome_paste|
21
+ wait 1 do
22
+ grab(atome_paste).color(:red)
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ new({ particle: :copy }) do |items_id|
4
+ # alert items_id
5
+ unless items_id.instance_of? Array
6
+ items_id = [items_id]
7
+ end
8
+ grab(:copy).collect << items_id
9
+ # new_copy_group=group({ collect: items_id })
10
+ # @copy << items_id
11
+ # @copy
12
+ # items_id
13
+ grab(:copy).collect
14
+ end
15
+ Atome.new({ renderers: [:html], id: :copy, collect: [], type: :group, tag: { system: true } })
16
+
17
+ new({ read: :copy })
18
+
19
+ new({ particle: :paste }) do |params|
20
+ all_copies = grab(:copy).collect
21
+ if params == true
22
+ copies_found = all_copies.last
23
+ elsif params.instance_of? Integer
24
+ copies_found = all_copies[params.to_i]
25
+ elsif params.instance_of? Array
26
+ copies_found = [all_copies[params[0]][params[1]]]
27
+ end
28
+
29
+ copies_found.each do |copy_found|
30
+ if grab(copy_found)
31
+ pasted_atome = grab(copy_found).duplicate({ left: 333 })
32
+ pasted_atome.attach(@id)
33
+ end
34
+ end
35
+ copies_found
36
+ end
37
+
38
+ b = box
39
+ c = circle
40
+ t = text(:hello)
41
+
42
+ # b.copy([c.id, b.id])
43
+ # b.copy(b.id)
44
+
45
+ # test below
46
+ # b.copy(b.id)
47
+ # b.copy(c.id)
48
+
49
+ # works below
50
+ b.copy([c.id, b.id, t.id])
51
+ b.copy(b.id)
52
+
53
+
54
+ # crash below
55
+ # b.copy([b.id, t.id])
56
+ # b.copy(c.id)
57
+
58
+ # ##########
59
+
60
+ # wait 1 do
61
+ b.paste([0,0])
62
+ # end
63
+
64
+ b.touch(true) do
65
+ t.paste([0,1])
66
+ end
67
+
68
+