atome 0.5.2.5 → 0.5.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +25 -15
  3. data/app_builder_helpers/Rakefile +18 -18
  4. data/exe/atome +10 -2
  5. data/lib/atome/atome.rb +18 -14
  6. data/lib/atome/genesis/generators/event.rb +7 -3
  7. data/lib/atome/genesis/generators/geometry.rb +12 -0
  8. data/lib/atome/genesis/generators/identity.rb +6 -2
  9. data/lib/atome/genesis/generators/time.rb +5 -0
  10. data/lib/atome/genesis/genesis.rb +2 -2
  11. data/lib/atome/genesis/sparkle.rb +1 -0
  12. data/lib/atome/helpers/callbacks.rb +8 -9
  13. data/lib/atome/helpers/utilities.rb +35 -30
  14. data/lib/atome/kernel/universe.rb +7 -3
  15. data/lib/atome/renderers/browser/browser.rb +1 -0
  16. data/lib/atome/renderers/browser/event.rb +0 -5
  17. data/lib/atome/renderers/browser/helpers/effect_helper.rb +0 -3
  18. data/lib/atome/renderers/browser/helpers/video_helper.rb +9 -2
  19. data/lib/atome/renderers/browser/time.rb +3 -0
  20. data/lib/atome/renderers/html/html.rb +1 -1
  21. data/lib/atome/version.rb +1 -1
  22. data/lib/atome.rb +1 -0
  23. data/sig/atome.rbs +6 -0
  24. data/vendor/assets/server/atome_server.rb +4 -4
  25. data/vendor/assets/server/config.ru +5 -1
  26. data/vendor/assets/{build → src}/css/style.css +0 -0
  27. data/vendor/assets/{build → src}/favicon.ico +0 -0
  28. data/vendor/assets/{build → src}/index.html +0 -0
  29. data/vendor/assets/{build → src}/js/atome/atome.js +0 -0
  30. data/vendor/assets/{build → src}/js/atome/atome_helpers/atome_animate.js +0 -0
  31. data/vendor/assets/{build → src}/js/atome/atome_helpers/atome_drag.js +0 -0
  32. data/vendor/assets/{build → src}/js/atome/atome_helpers/atome_file.js +0 -0
  33. data/vendor/assets/{build → src}/js/atome/atome_helpers/atome_sort.js +0 -0
  34. data/vendor/assets/{build → src}/js/atome/atome_helpers/atome_time.js +0 -0
  35. data/vendor/assets/{build → src}/js/atome/atome_helpers/atome_video.js +0 -0
  36. data/vendor/assets/{build → src}/js/third_parties/fabric.min.js +0 -0
  37. data/vendor/assets/{build → src}/js/third_parties/interact.min.js +0 -0
  38. data/vendor/assets/{build → src}/js/third_parties/interact.min.js.map +0 -0
  39. data/vendor/assets/{build → src}/js/third_parties/ping.min.js +0 -0
  40. data/vendor/assets/{build → src}/js/third_parties/popmotion.min.js +0 -0
  41. data/vendor/assets/{build → src}/js/third_parties/sha256.min.js +0 -0
  42. data/vendor/assets/{build → src}/js/third_parties/sortable.min.js +0 -0
  43. data/vendor/assets/{build → src}/js/third_parties/three.min.js +0 -0
  44. data/vendor/assets/{build → src}/js/third_parties/w3color.js +0 -0
  45. data/vendor/assets/{build → src}/js/third_parties/wad.min.js +0 -0
  46. data/vendor/assets/{build → src}/js/third_parties/zim.min.js +0 -0
  47. data/vendor/assets/{build → src}/medias/audios/Binrpilot.mp3 +0 -0
  48. data/vendor/assets/{build → src}/medias/audios/audio_missing.wav +0 -0
  49. data/vendor/assets/{build → src}/medias/audios/clap.wav +0 -0
  50. data/vendor/assets/{build → src}/medias/audios/cowbell.wav +0 -0
  51. data/vendor/assets/{build → src}/medias/audios/hihat.wav +0 -0
  52. data/vendor/assets/{build → src}/medias/audios/kick.wav +0 -0
  53. data/vendor/assets/{build → src}/medias/audios/riff.m4a +0 -0
  54. data/vendor/assets/{build → src}/medias/audios/snare.wav +0 -0
  55. data/vendor/assets/{build → src}/medias/audios/tom.wav +0 -0
  56. data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/DancingScript-VariableFont_wght.ttf +0 -0
  57. data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/OFL.txt +0 -0
  58. data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/README.txt +0 -0
  59. data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/static/DancingScript-Bold.ttf +0 -0
  60. data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/static/DancingScript-Medium.ttf +0 -0
  61. data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/static/DancingScript-Regular.ttf +0 -0
  62. data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/static/DancingScript-SemiBold.ttf +0 -0
  63. data/vendor/assets/{build → src}/medias/fonts/Mate_SC/MateSC-Regular.ttf +0 -0
  64. data/vendor/assets/{build → src}/medias/fonts/Mate_SC/OFL.txt +0 -0
  65. data/vendor/assets/{build → src}/medias/fonts/Raleway/OFL.txt +0 -0
  66. data/vendor/assets/{build → src}/medias/fonts/Raleway/README.txt +0 -0
  67. data/vendor/assets/{build → src}/medias/fonts/Raleway/Raleway-Italic-VariableFont_wght.ttf +0 -0
  68. data/vendor/assets/{build → src}/medias/fonts/Raleway/Raleway-VariableFont_wght.ttf +0 -0
  69. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Black.ttf +0 -0
  70. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-BlackItalic.ttf +0 -0
  71. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Bold.ttf +0 -0
  72. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-BoldItalic.ttf +0 -0
  73. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-ExtraBold.ttf +0 -0
  74. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-ExtraBoldItalic.ttf +0 -0
  75. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-ExtraLight.ttf +0 -0
  76. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-ExtraLightItalic.ttf +0 -0
  77. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Italic.ttf +0 -0
  78. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Light.ttf +0 -0
  79. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-LightItalic.ttf +0 -0
  80. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Medium.ttf +0 -0
  81. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-MediumItalic.ttf +0 -0
  82. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Regular.ttf +0 -0
  83. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-SemiBold.ttf +0 -0
  84. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-SemiBoldItalic.ttf +0 -0
  85. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Thin.ttf +0 -0
  86. data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-ThinItalic.ttf +0 -0
  87. data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/LICENSE.txt +0 -0
  88. data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/README.txt +0 -0
  89. data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/RobotoSlab-VariableFont_wght.ttf +0 -0
  90. data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-Black.ttf +0 -0
  91. data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-Bold.ttf +0 -0
  92. data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-ExtraBold.ttf +0 -0
  93. data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-ExtraLight.ttf +0 -0
  94. data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-Light.ttf +0 -0
  95. data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-Medium.ttf +0 -0
  96. data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-Regular.ttf +0 -0
  97. data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-SemiBold.ttf +0 -0
  98. data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-Thin.ttf +0 -0
  99. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/OFL.txt +0 -0
  100. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/README.txt +0 -0
  101. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/Vollkorn-Italic-VariableFont_wght.ttf +0 -0
  102. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/Vollkorn-VariableFont_wght.ttf +0 -0
  103. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-Black.ttf +0 -0
  104. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-BlackItalic.ttf +0 -0
  105. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-Bold.ttf +0 -0
  106. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-BoldItalic.ttf +0 -0
  107. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-ExtraBold.ttf +0 -0
  108. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-ExtraBoldItalic.ttf +0 -0
  109. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-Italic.ttf +0 -0
  110. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-Medium.ttf +0 -0
  111. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-MediumItalic.ttf +0 -0
  112. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-Regular.ttf +0 -0
  113. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-SemiBold.ttf +0 -0
  114. data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-SemiBoldItalic.ttf +0 -0
  115. data/vendor/assets/{build → src}/medias/images/Icon_Help.png +0 -0
  116. data/vendor/assets/{build → src}/medias/images/atome.svg +0 -0
  117. data/vendor/assets/{build → src}/medias/images/avion.jpg +0 -0
  118. data/vendor/assets/{build → src}/medias/images/ballanim.png +0 -0
  119. data/vendor/assets/{build → src}/medias/images/blank.png +0 -0
  120. data/vendor/assets/{build → src}/medias/images/boat.png +0 -0
  121. data/vendor/assets/{build → src}/medias/images/cache.svg +0 -0
  122. data/vendor/assets/{build → src}/medias/images/dices.png +0 -0
  123. data/vendor/assets/{build → src}/medias/images/eVe_back.png +0 -0
  124. data/vendor/assets/{build → src}/medias/images/elephant.png +0 -0
  125. data/vendor/assets/{build → src}/medias/images/eyes.jpg +0 -0
  126. data/vendor/assets/{build → src}/medias/images/freebsd.png +0 -0
  127. data/vendor/assets/{build → src}/medias/images/grain_texture.png +0 -0
  128. data/vendor/assets/{build → src}/medias/images/green_planet.png +0 -0
  129. data/vendor/assets/{build → src}/medias/images/image_missing.svg +0 -0
  130. data/vendor/assets/{build → src}/medias/images/jeezs.png +0 -0
  131. data/vendor/assets/{build → src}/medias/images/keyboard.png +0 -0
  132. data/vendor/assets/{build → src}/medias/images/killer.jpg +0 -0
  133. data/vendor/assets/{build → src}/medias/images/living_room.png +0 -0
  134. data/vendor/assets/{build → src}/medias/images/logo.svg +0 -0
  135. data/vendor/assets/{build → src}/medias/images/logos/Facebook.svg +0 -0
  136. data/vendor/assets/{build → src}/medias/images/logos/GitHub Black.svg +0 -0
  137. data/vendor/assets/{build → src}/medias/images/logos/GitHub-Mark.eps +0 -0
  138. data/vendor/assets/{build → src}/medias/images/logos/GitHub.svg +0 -0
  139. data/vendor/assets/{build → src}/medias/images/logos/TikTok.svg +0 -0
  140. data/vendor/assets/{build → src}/medias/images/logos/Twitter.svg +0 -0
  141. data/vendor/assets/{build → src}/medias/images/logos/YouTube.svg +0 -0
  142. data/vendor/assets/{build → src}/medias/images/logos/apple.svg +0 -0
  143. data/vendor/assets/{build → src}/medias/images/logos/atome.svg +0 -0
  144. data/vendor/assets/{build → src}/medias/images/logos/freebsd.png +0 -0
  145. data/vendor/assets/{build → src}/medias/images/logos/instagram.svg +0 -0
  146. data/vendor/assets/{build → src}/medias/images/logos/tiktok_back.svg +0 -0
  147. data/vendor/assets/{build → src}/medias/images/moto.png +0 -0
  148. data/vendor/assets/{build → src}/medias/images/noise.svg +0 -0
  149. data/vendor/assets/{build → src}/medias/images/piano.png +0 -0
  150. data/vendor/assets/{build → src}/medias/images/poisson.jpg +0 -0
  151. data/vendor/assets/{build → src}/medias/images/red_planet.png +0 -0
  152. data/vendor/assets/{build → src}/medias/images/sky.jpg +0 -0
  153. data/vendor/assets/{build → src}/medias/images/the_mask.svg +0 -0
  154. data/vendor/assets/{build → src}/medias/images/tile.png +0 -0
  155. data/vendor/assets/{build → src}/medias/images/tile_black.png +0 -0
  156. data/vendor/assets/{build → src}/medias/images/tile_white.png +0 -0
  157. data/vendor/assets/{build → src}/medias/javascripts/test.js +0 -0
  158. data/vendor/assets/{build → src}/medias/rubies/examples/!run.rb +0 -0
  159. data/vendor/assets/{build → src}/medias/rubies/examples/_2_solve.rb +1 -1
  160. data/vendor/assets/{build → src}/medias/rubies/examples/_audio.rb +0 -0
  161. data/vendor/assets/src/medias/rubies/examples/_dataset.rb +177 -0
  162. data/vendor/assets/{build → src}/medias/rubies/examples/_os.rb +0 -0
  163. data/vendor/assets/src/medias/rubies/examples/_test.rb +1 -0
  164. data/vendor/assets/{build → src}/medias/rubies/examples/_vie.rb +0 -0
  165. data/vendor/assets/src/medias/rubies/examples/add.rb +25 -0
  166. data/vendor/assets/{build → src}/medias/rubies/examples/animation.rb +0 -0
  167. data/vendor/assets/{build → src}/medias/rubies/examples/atome_new.rb +0 -0
  168. data/vendor/assets/src/medias/rubies/examples/attach.rb +12 -0
  169. data/vendor/assets/{build → src}/medias/rubies/examples/auto_height.rb +0 -0
  170. data/vendor/assets/{build → src}/medias/rubies/examples/auto_width.rb +0 -0
  171. data/vendor/assets/{build → src}/medias/rubies/examples/blur.rb +0 -0
  172. data/vendor/assets/{build → src}/medias/rubies/examples/bottom.rb +0 -0
  173. data/vendor/assets/{build → src}/medias/rubies/examples/box.rb +0 -0
  174. data/vendor/assets/{build → src}/medias/rubies/examples/center.rb +0 -0
  175. data/vendor/assets/{build → src}/medias/rubies/examples/circle.rb +0 -0
  176. data/vendor/assets/{build → src}/medias/rubies/examples/clear.rb +0 -0
  177. data/vendor/assets/src/medias/rubies/examples/clone.rb +35 -0
  178. data/vendor/assets/{build → src}/medias/rubies/examples/code.rb +0 -0
  179. data/vendor/assets/{build → src}/medias/rubies/examples/color.rb +0 -0
  180. data/vendor/assets/{build → src}/medias/rubies/examples/create_atome_in_atome.rb +0 -0
  181. data/vendor/assets/{build → src}/medias/rubies/examples/cursor.rb +0 -0
  182. data/vendor/assets/{build → src}/medias/rubies/examples/delete.rb +0 -0
  183. data/vendor/assets/{build → src}/medias/rubies/examples/drag.rb +0 -0
  184. data/vendor/assets/{build → src}/medias/rubies/examples/edit.rb +0 -0
  185. data/vendor/assets/{build → src}/medias/rubies/examples/element.rb +0 -0
  186. data/vendor/assets/{build → src}/medias/rubies/examples/empty_atome.rb +0 -0
  187. data/vendor/assets/{build → src}/medias/rubies/examples/fullscreen.rb +0 -0
  188. data/vendor/assets/{build → src}/medias/rubies/examples/get_renderer_list.rb +0 -0
  189. data/vendor/assets/{build → src}/medias/rubies/examples/grab.rb +0 -0
  190. data/vendor/assets/{build → src}/medias/rubies/examples/height.rb +0 -0
  191. data/vendor/assets/{build → src}/medias/rubies/examples/hide.rb +0 -0
  192. data/vendor/assets/{build → src}/medias/rubies/examples/id.rb +0 -0
  193. data/vendor/assets/{build → src}/medias/rubies/examples/image.rb +0 -0
  194. data/vendor/assets/{build → src}/medias/rubies/examples/left.rb +0 -0
  195. data/vendor/assets/{build → src}/medias/rubies/examples/link.rb +0 -0
  196. data/vendor/assets/src/medias/rubies/examples/markers.rb +48 -0
  197. data/vendor/assets/{build → src}/medias/rubies/examples/matrix.rb +0 -0
  198. data/vendor/assets/{build → src}/medias/rubies/examples/monitoring.rb +0 -0
  199. data/vendor/assets/{build → src}/medias/rubies/examples/mute.rb +0 -0
  200. data/vendor/assets/{build → src}/medias/rubies/examples/on.rb +0 -0
  201. data/vendor/assets/{build → src}/medias/rubies/examples/parents.rb +1 -1
  202. data/vendor/assets/{build → src}/medias/rubies/examples/pause.rb +0 -0
  203. data/vendor/assets/{build → src}/medias/rubies/examples/play.rb +0 -0
  204. data/vendor/assets/{build → src}/medias/rubies/examples/read.rb +0 -0
  205. data/vendor/assets/{build → src}/medias/rubies/examples/refresh.rb +0 -0
  206. data/vendor/assets/{build → src}/medias/rubies/examples/remove.rb +0 -0
  207. data/vendor/assets/{build → src}/medias/rubies/examples/repeat.rb +0 -0
  208. data/vendor/assets/{build → src}/medias/rubies/examples/right.rb +0 -0
  209. data/vendor/assets/{build → src}/medias/rubies/examples/rotate.rb +0 -0
  210. data/vendor/assets/{build → src}/medias/rubies/examples/schedule.rb +0 -0
  211. data/vendor/assets/{build → src}/medias/rubies/examples/shadow.rb +0 -0
  212. data/vendor/assets/src/medias/rubies/examples/size.rb +8 -0
  213. data/vendor/assets/{build → src}/medias/rubies/examples/smooth.rb +0 -0
  214. data/vendor/assets/{build → src}/medias/rubies/examples/sort.rb +0 -0
  215. data/vendor/assets/{build → src}/medias/rubies/examples/style.rb +0 -0
  216. data/vendor/assets/{build → src}/medias/rubies/examples/text.rb +0 -0
  217. data/vendor/assets/{build → src}/medias/rubies/examples/time.rb +0 -0
  218. data/vendor/assets/{build → src}/medias/rubies/examples/top.rb +0 -0
  219. data/vendor/assets/{build → src}/medias/rubies/examples/touch.rb +0 -0
  220. data/vendor/assets/{build → src}/medias/rubies/examples/video.rb +0 -0
  221. data/vendor/assets/{build → src}/medias/rubies/examples/wait.rb +0 -0
  222. data/vendor/assets/{build → src}/medias/rubies/examples/web.rb +0 -0
  223. data/vendor/assets/{build → src}/medias/rubies/examples/width.rb +0 -0
  224. data/vendor/assets/{build → src}/medias/rubies/test.rb +0 -0
  225. data/vendor/assets/{build → src}/medias/rubies/text_read.rb +0 -0
  226. data/vendor/assets/{build → src}/medias/rubies/users/code.rb +0 -0
  227. data/vendor/assets/{build → src}/medias/texts/lorem.txt +0 -0
  228. data/vendor/assets/{build → src}/medias/utils/infos/color.rb +0 -0
  229. data/vendor/assets/{build → src}/medias/utils/infos/width.rb +0 -0
  230. data/vendor/assets/{build → src}/medias/videos/avengers.mp4 +0 -0
  231. data/vendor/assets/{build → src}/medias/videos/madmax.mp4 +0 -0
  232. data/vendor/assets/{build → src}/medias/videos/starwars.mov +0 -0
  233. data/vendor/assets/{build → src}/medias/videos/superman.mp4 +0 -0
  234. data/vendor/assets/{build → src}/medias/videos/video_missing.mp4 +0 -0
  235. data/vendor/assets/src-tauri/.gitignore +4 -0
  236. data/vendor/assets/src-tauri/Cargo.toml +27 -0
  237. data/vendor/assets/src-tauri/build.rs +3 -0
  238. data/vendor/assets/src-tauri/icons/128x128.png +0 -0
  239. data/vendor/assets/src-tauri/icons/128x128@2x.png +0 -0
  240. data/vendor/assets/src-tauri/icons/32x32.png +0 -0
  241. data/vendor/assets/src-tauri/icons/Square107x107Logo.png +0 -0
  242. data/vendor/assets/src-tauri/icons/Square142x142Logo.png +0 -0
  243. data/vendor/assets/src-tauri/icons/Square150x150Logo.png +0 -0
  244. data/vendor/assets/src-tauri/icons/Square284x284Logo.png +0 -0
  245. data/vendor/assets/src-tauri/icons/Square30x30Logo.png +0 -0
  246. data/vendor/assets/src-tauri/icons/Square310x310Logo.png +0 -0
  247. data/vendor/assets/src-tauri/icons/Square44x44Logo.png +0 -0
  248. data/vendor/assets/src-tauri/icons/Square71x71Logo.png +0 -0
  249. data/vendor/assets/src-tauri/icons/Square89x89Logo.png +0 -0
  250. data/vendor/assets/src-tauri/icons/StoreLogo.png +0 -0
  251. data/vendor/assets/src-tauri/icons/icon.icns +0 -0
  252. data/vendor/assets/src-tauri/icons/icon.ico +0 -0
  253. data/vendor/assets/src-tauri/icons/icon.png +0 -0
  254. data/vendor/assets/src-tauri/src/main.rs +17 -0
  255. data/vendor/assets/src-tauri/tauri.conf.json +70 -0
  256. metadata +250 -210
  257. data/vendor/assets/build/medias/rubies/examples/_dataset.rb +0 -82
  258. data/vendor/assets/build/medias/rubies/examples/_markers.rb +0 -57
  259. data/vendor/assets/build/medias/rubies/examples/at.rb +0 -21
  260. data/vendor/assets/build/medias/rubies/examples/clone.rb +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b7030ffafd358342bdc993dcee7f6a7f35c0c7c2504a85149bea5c2751b5d89
4
- data.tar.gz: bab45507e748e52cf793b19f2bb7457bb0d05fce580286854b49c32515dabd66
3
+ metadata.gz: 06b52ecd6bd8075b2aaf377a9738d205c78182440c184176d12d437867c2b5ae
4
+ data.tar.gz: 90cd690d288403a1239d4d50ec7043171ca75d3a57b728b1866c34b5967b5d4b
5
5
  SHA512:
6
- metadata.gz: 1d72ba4a1af3d68412a3a64f0e3907f523cb03188f0c5becc355e8afc2e4e0d3b59ef06863171c6d8808ceedbace062099535823be732a058282acac7943a320
7
- data.tar.gz: 1146eea7819fca1b160453cdd7187d11bf2e6a9471afeb4489246ba9297ecc708563d63a1ce679caf594fe1218b524c24c6dec3349c6a04c546ae36da9cffb72
6
+ metadata.gz: 223b0c88ae7a5c49c6a368245fdd68a2781c901fd2476eb60d7a1a9f850445d82fe8d842bd9e34a2ee564e577ba2d9f8919f21723394473ed003c6a08573a870
7
+ data.tar.gz: 7d5c8bc64d55da198b5f16d40633487d518a4462eab37bc70ccc32feea75462f04fda94072df7cbced6bda1bee60b2060a1809ddabcd2cfe75b055a8518fd564
data/Rakefile CHANGED
@@ -11,41 +11,51 @@ end
11
11
 
12
12
  task default: :test
13
13
 
14
- task :test_browser do
15
- FileUtils.copy_entry('vendor/assets/build/js/', 'test/test_app/build/js/')
16
- FileUtils.copy_entry('vendor/assets/build/css/', 'test/test_app/build/css/')
17
- FileUtils.copy_entry('vendor/assets/build/medias/', 'test/test_app/build/medias/')
14
+ task :re_build do
15
+ FileUtils.copy_entry('vendor/assets/src/js/', 'test/test_app/src/js/')
16
+ FileUtils.copy_entry('vendor/assets/src/css/', 'test/test_app/src/css/')
17
+ FileUtils.copy_entry('vendor/assets/src/medias/', 'test/test_app/src/medias/')
18
18
  `gem cleanup atome;yes | gem uninstall atome ;gem build atome.gemspec;gem install atome`
19
- `cd test/test_app;atome update;atome run guard`
19
+ `cd test/test_app;atome update`
20
+ puts 'solution re-build!'
21
+ # `cd test/test_app;atome update;atome run`
20
22
  end
21
23
 
22
24
 
23
25
 
26
+
24
27
  task :test_server do
25
- FileUtils.copy_entry('vendor/assets/build/js/', 'test/test_app/build/js/')
26
- FileUtils.copy_entry('vendor/assets/build/css/', 'test/test_app/build/css/')
27
- FileUtils.copy_entry('vendor/assets/build/medias/', 'test/test_app/build/medias/')
28
+ FileUtils.copy_entry('vendor/assets/src/js/', 'test/test_app/src/js/')
29
+ FileUtils.copy_entry('vendor/assets/src/css/', 'test/test_app/src/css/')
30
+ FileUtils.copy_entry('vendor/assets/src/medias/', 'test/test_app/src/medias/')
28
31
  `gem cleanup atome;yes | gem uninstall atome ;gem build atome.gemspec;gem install atome`
29
32
  `cd test/test_app;atome update;atome run server`
30
33
  end
31
34
 
32
- task :run_browser do
33
- `cd test/test_app;atome run guard`
34
- end
35
35
 
36
36
  task :run_server do
37
37
  `cd test/test_app;atome run server guard`
38
38
  end
39
39
 
40
- task :run_example do
41
- FileUtils.copy_entry('vendor/assets/build/medias/rubies/examples/', 'test/test_app/build/medias/rubies/examples/')
42
- `cd test/test_app;atome run `
40
+ task :refresh do
41
+ FileUtils.copy_entry('vendor/assets/src/medias/rubies/examples/', 'test/test_app/src/medias/rubies/examples/')
42
+ `cd test/test_app;atome build`
43
+ puts "refreshed!"
44
+ end
45
+
46
+ task :open_browser do
47
+ `open http://127.0.0.1:1430/`
43
48
  end
44
49
 
45
50
  task :run_example_server do
46
- FileUtils.copy_entry('vendor/assets/build/medias/rubies/examples/', 'test/test_app/build/medias/rubies/examples/')
51
+ FileUtils.copy_entry('vendor/assets/src/medias/rubies/examples/', 'test/test_app/src/medias/rubies/examples/')
47
52
  `cd test/test_app;atome run server `
48
53
  end
49
54
 
50
55
 
56
+ task :taurification do
57
+ `cd test/test_app;cargo tauri dev `
58
+ end
59
+
60
+
51
61
  task default: :test
@@ -20,7 +20,7 @@ def build_opal_content
20
20
  end
21
21
 
22
22
  def build_opal_browser(user_project_path)
23
- opal_directory = "#{user_project_path}/build/js/opal"
23
+ opal_directory = "#{user_project_path}/src/js/opal"
24
24
  browser_js = "#{opal_directory}/opal_browser.js"
25
25
  Dir.mkdir(opal_directory) unless File.directory?(opal_directory)
26
26
 
@@ -33,7 +33,7 @@ def build_opal_browser(user_project_path)
33
33
  end
34
34
 
35
35
  def build_opal(user_project_path)
36
- opal_directory = "#{user_project_path}/build/js/opal"
36
+ opal_directory = "#{user_project_path}/src/js/opal"
37
37
  opal_js = "#{opal_directory}/opal.js"
38
38
  Dir.mkdir(opal_directory) unless File.directory?(opal_directory)
39
39
 
@@ -47,7 +47,7 @@ end
47
47
 
48
48
  def build_aui(user_project_path)
49
49
  # now we add an uniq aui to the app
50
- aui_js = "#{user_project_path}/build/js/aui.js"
50
+ aui_js = "#{user_project_path}/src/js/aui.js"
51
51
  File.new aui_js, 'w'
52
52
  builder = Opal::Builder.new
53
53
  aui_content = builder.build("#{user_project_path}/aui.rb").to_s
@@ -57,15 +57,15 @@ def build_aui(user_project_path)
57
57
  end
58
58
 
59
59
  def copy_assets_files(user_project_path, gem_location)
60
- build_location = "#{gem_location}/../vendor/assets/build/"
60
+ build_location = "#{gem_location}/../vendor/assets/src/"
61
61
  server_location = "#{gem_location}/../vendor/assets/server/"
62
- FileUtils.copy_entry build_location, "#{user_project_path}/build", preserve: nil
62
+ FileUtils.copy_entry build_location, "#{user_project_path}/src", preserve: nil
63
63
  FileUtils.copy_entry server_location, "#{user_project_path}/server", preserve: nil
64
64
  end
65
65
 
66
66
  def build_atome_kernel(user_project_path, gem_location)
67
67
  # now lets build the atome kernel
68
- atome_directory = "#{user_project_path}/build/js/atome"
68
+ atome_directory = "#{user_project_path}/src/js/atome"
69
69
  Dir.mkdir(atome_directory) unless File.directory?(atome_directory)
70
70
  kernel_js = "#{atome_directory}/kernel.js"
71
71
  File.new kernel_js, 'w'
@@ -78,7 +78,7 @@ def build_atome_kernel(user_project_path, gem_location)
78
78
  end
79
79
 
80
80
  def build_opal_extensions(user_project_path, gem_location)
81
- opal_directory = "#{user_project_path}/build/js/opal"
81
+ opal_directory = "#{user_project_path}/src/js/opal"
82
82
  extensions_js = "#{opal_directory}/atome_opal_extensions.js"
83
83
  File.new extensions_js, 'w'
84
84
  builder = Opal::Builder.new
@@ -90,7 +90,7 @@ def build_opal_extensions(user_project_path, gem_location)
90
90
  end
91
91
 
92
92
  def build_opal_parser(user_project_path)
93
- parser_js = "#{user_project_path}/build/js/opal/opal_parser.js"
93
+ parser_js = "#{user_project_path}/src/js/opal/opal_parser.js"
94
94
  File.new parser_js, 'w'
95
95
  parser_content = Opal::Builder.build('../lib/atome/renderers/opal/opal_parser.rb').to_s
96
96
  File.open(parser_js, 'w') do |f|
@@ -99,7 +99,7 @@ def build_opal_parser(user_project_path)
99
99
  end
100
100
 
101
101
  def build_user_code(user_project_path, source_code)
102
- application_js = "#{user_project_path}/build/js/application.js"
102
+ application_js = "#{user_project_path}/src/js/application.js"
103
103
  builder = Opal::Builder.new
104
104
  builder.append_paths("#{user_project_path}/")
105
105
  application_content = builder.build(source_code).to_s
@@ -111,7 +111,7 @@ def build_user_code(user_project_path, source_code)
111
111
  end
112
112
 
113
113
  def minimize_aui(user_project_path)
114
- aui_js = "#{user_project_path}/build/js/aui.js"
114
+ aui_js = "#{user_project_path}/src/js/aui.js"
115
115
  aui_content = File.open(aui_js).read
116
116
  aui_content = Uglifier.new.compile(aui_content)
117
117
  File.open(aui_js, 'w') do |f|
@@ -120,7 +120,7 @@ def minimize_aui(user_project_path)
120
120
  end
121
121
 
122
122
  def minimize_browser(user_project_path)
123
- browser_js = "#{user_project_path}/build/js/opal/opal_browser.js"
123
+ browser_js = "#{user_project_path}/src/js/opal/opal_browser.js"
124
124
  browser_content = File.open(browser_js).read
125
125
  browser_content = Uglifier.new.compile(browser_content)
126
126
  File.open(browser_js, 'w') do |f|
@@ -129,7 +129,7 @@ def minimize_browser(user_project_path)
129
129
  end
130
130
 
131
131
  def minimize_opal(user_project_path)
132
- opal_js = "#{user_project_path}/build/js/opal/opal.js"
132
+ opal_js = "#{user_project_path}/src/js/opal/opal.js"
133
133
  opal_content = File.open(opal_js).read
134
134
  opal_content = Uglifier.new.compile(opal_content)
135
135
  File.open(opal_js, 'w') do |f|
@@ -138,7 +138,7 @@ def minimize_opal(user_project_path)
138
138
  end
139
139
 
140
140
  def minimize_parser(user_project_path)
141
- parser_js = "#{user_project_path}/build/js/opal/opal_parser.js"
141
+ parser_js = "#{user_project_path}/src/js/opal/opal_parser.js"
142
142
  parser_content = File.open(parser_js).read
143
143
  parser_content = Uglifier.new.compile(parser_content)
144
144
  File.open(parser_js, 'w') do |f|
@@ -147,7 +147,7 @@ def minimize_parser(user_project_path)
147
147
  end
148
148
 
149
149
  def minimize_kernel(user_project_path)
150
- kernel_js = "#{user_project_path}/build/js/atome/kernel.js"
150
+ kernel_js = "#{user_project_path}/src/js/atome/kernel.js"
151
151
  kernel_content = File.open(kernel_js).read
152
152
  kernel_content = Uglifier.new.compile(kernel_content)
153
153
  File.open(kernel_js, 'w') do |f|
@@ -156,7 +156,7 @@ def minimize_kernel(user_project_path)
156
156
  end
157
157
 
158
158
  def minimize_atome(user_project_path)
159
- atome_js = "#{user_project_path}/build/js/atome/atome.js"
159
+ atome_js = "#{user_project_path}/src/js/atome/atome.js"
160
160
  atome_content = File.open(atome_js).read
161
161
  atome_content = Uglifier.new.compile(atome_content)
162
162
  File.open(atome_js, 'w') do |f|
@@ -165,7 +165,7 @@ def minimize_atome(user_project_path)
165
165
  end
166
166
 
167
167
  # def minimize_sparkle(user_project_path)
168
- # opal_sparkle_js = "#{user_project_path}/build/js/opal/opal_sparkle.js"
168
+ # opal_sparkle_js = "#{user_project_path}/src/js/opal/opal_sparkle.js"
169
169
  # opal_sparkle_content = File.open(opal_sparkle_js).read
170
170
  # opal_sparkle_content = Uglifier.new.compile(opal_sparkle_content)
171
171
  # File.open(opal_sparkle_js, 'w') do |f|
@@ -174,7 +174,7 @@ end
174
174
  # end
175
175
 
176
176
  def minimize_opal_extensions(user_project_path)
177
- atome_opal_extensions_js = "#{user_project_path}/build/js/opal/atome_opal_extensions.js"
177
+ atome_opal_extensions_js = "#{user_project_path}/src/js/opal/atome_opal_extensions.js"
178
178
  atome_opal_extensions_content = File.open(atome_opal_extensions_js).read
179
179
  atome_opal_extensions_content = Uglifier.new.compile(atome_opal_extensions_content)
180
180
  File.open(atome_opal_extensions_js, 'w') do |f|
@@ -204,7 +204,7 @@ end
204
204
 
205
205
  def minimize_application(user_project_path)
206
206
  # minimizing user codes
207
- application_js = "#{user_project_path}/build/js/application.js"
207
+ application_js = "#{user_project_path}/src/js/application.js"
208
208
  application_content = File.open(application_js).read
209
209
  application_content = Uglifier.new.compile(application_content)
210
210
  File.open(application_js, 'w') do |f|
data/exe/atome CHANGED
@@ -102,7 +102,7 @@ def create_application(project_name, force, production)
102
102
  return unless new_app_creation
103
103
 
104
104
  # now adding name to the app
105
- index_html = "#{current_path}/#{project_name}/build/index.html"
105
+ index_html = "#{current_path}/#{project_name}/src/index.html"
106
106
  index_html_content = File.open(index_html).read
107
107
  index_html_content = index_html_content.gsub('<title>atome</title>', "<title>#{project_name}</title>")
108
108
  File.open(index_html, 'w') do |f|
@@ -123,10 +123,16 @@ def guard_check
123
123
  end
124
124
 
125
125
  def browser_case(location)
126
- `cd #{location}/build;open index.html`
126
+ `cd #{location}/src;open index.html`
127
127
  guard_check
128
128
  end
129
129
 
130
+ def compile_case(location)
131
+ `cd #{location}/src`
132
+ guard_check
133
+ end
134
+
135
+
130
136
  def server_case(port, location)
131
137
  threads = []
132
138
  threads << Thread.new do
@@ -155,6 +161,8 @@ def run_case(build_target, location, port)
155
161
  server_case(port, location)
156
162
  when :browser
157
163
  browser_case(location)
164
+ when :compile
165
+ compile_case(location)
158
166
  when :native
159
167
  test_native(build_target)
160
168
  # freebsd
data/lib/atome/atome.rb CHANGED
@@ -15,13 +15,11 @@ class Atome
15
15
  atomes.each_value do |elements|
16
16
  # the instance variable below contain the id all any atomes that need to be informed when changes occurs
17
17
  @broadcast = {}
18
- @at_time = {}
19
- @markers = {}
18
+ # @at_time = {}
20
19
  # now we store the proc in a an atome's property called :bloc
21
20
  elements[:code] = atomes_proc if atomes_proc
22
21
  @atome = elements
23
22
  # we initiate the rendering, eg for for browser we will call :browser_type generate method in identity.rb file
24
- # create_particle(:type, @atome[:type])
25
23
  create_particle(:type)
26
24
  set_type(@atome[:type])
27
25
  collapse
@@ -77,24 +75,25 @@ class Atome
77
75
 
78
76
  def run_optional_proc(proc_name, atome = self, value = '', &user_proc)
79
77
  option_found = Universe.get_optional_method(proc_name)
80
- atome.instance_exec(value, user_proc,atome, &option_found) if option_found.is_a?(Proc)
78
+ atome.instance_exec(value, user_proc, atome, &option_found) if option_found.is_a?(Proc)
81
79
  end
82
80
 
83
81
  def inject_value(element, value)
82
+ # attention : please keep the method 'inject_value' available as it is sometimes needed to access it directly
84
83
  @atome[element] = value
85
84
  end
86
85
 
87
- def store_value(element, value)
86
+ def store_value(element)
88
87
  # this method save the value of the particle and broadcast to the atomes listed in broadcast
89
- broadcasting(element, value)
90
- inject_value(element, value)
88
+ broadcasting(element, @atome[element])
89
+ inject_value(element, @atome[element])
91
90
  end
92
91
 
93
92
  public
94
93
 
95
94
  # the line below is used for ephemera atomes
96
- attr_accessor :property, :value, :real_atome, :user_proc, :markers
97
- attr_reader :atome, :structure, :at_time
95
+ attr_accessor :property, :value, :real_atome, :user_proc
96
+ attr_reader :atome, :structure#, :at_time
98
97
 
99
98
  def set(value)
100
99
  @real_atome[@property] = value
@@ -105,10 +104,14 @@ class Atome
105
104
 
106
105
  # we create a proc holder of any new particle if user pass a bloc
107
106
  store_code_bloc(element, &user_proc) if user_proc
108
- run_optional_proc("pre_render_#{element}".to_sym, self, params, &user_proc)
109
- rendering(element, params, &user_proc)
110
- run_optional_proc("post_render_#{element}".to_sym, self, params, &user_proc)
111
- store_value(element, params)
107
+ # we store the params immediately into the atome so optionals methods can access and modify it
108
+ @atome[element] = params
109
+ run_optional_proc("pre_render_#{@atome[:type]}".to_sym, self, @atome[element], &user_proc)
110
+ run_optional_proc("pre_render_#{element}".to_sym, self, @atome[element], &user_proc)
111
+ rendering(element, @atome[element], &user_proc)
112
+ run_optional_proc("post_render_#{@atome[:type]}".to_sym, self, @atome[element], &user_proc)
113
+ run_optional_proc("post_render_#{element}".to_sym, self, @atome[element], &user_proc)
114
+ store_value(element)
112
115
  self
113
116
  end
114
117
 
@@ -128,7 +131,8 @@ class Atome
128
131
  virtual_atome.real_atome = @atome
129
132
  virtual_atome.property = element
130
133
  virtual_atome.user_proc = user_proc
131
- run_optional_proc("pre_get_#{element}".to_sym,self, "virtual_atome", &user_proc)
134
+ run_optional_proc("pre_get_#{@atome[:type]}".to_sym, "virtual_atome", &user_proc)
135
+ run_optional_proc("pre_get_#{element}".to_sym, self, "virtual_atome", &user_proc)
132
136
  virtual_atome
133
137
  end
134
138
 
@@ -5,14 +5,18 @@ generator = Genesis.generator
5
5
  # touch
6
6
  generator.build_particle(:touch)
7
7
  # video
8
- generator.build_particle(:play)
8
+ generator.build_particle(:play) do
9
+ @atome[:pause] = :false
10
+ end
9
11
  generator.build_particle(:time)
10
- generator.build_particle(:pause)
12
+ generator.build_particle(:pause) do
13
+ @atome[:play] = :false
14
+ end
11
15
  generator.build_particle(:on)
12
16
  generator.build_particle(:fullscreen)
13
17
  generator.build_particle(:mute)
14
18
  # TODO : add the at event to ny particle : (width, left, ...) maybe use monitor particle
15
- generator.build_particle(:at)
19
+ # generator.build_particle(:at)
16
20
  # drag
17
21
  generator.build_particle(:drag)
18
22
  generator.build_sanitizer(:drag) do |params|
@@ -4,3 +4,15 @@ generator = Genesis.generator
4
4
 
5
5
  generator.build_particle(:width)
6
6
  generator.build_particle(:height)
7
+ generator.build_particle(:size) do |params|
8
+ atome_width = atome[:width]
9
+ atome_height = atome[:height]
10
+ aspect_ratio = atome_width / atome_height
11
+ if atome_width > atome_height
12
+ width(params)
13
+ height(params / aspect_ratio)
14
+ else
15
+ width(params * aspect_ratio)
16
+ height(params)
17
+ end
18
+ end
@@ -41,14 +41,18 @@ generator.build_particle(:attached) do |targets|
41
41
  end
42
42
  end
43
43
 
44
+ generator.build_particle(:intricate, :array)
45
+
46
+
44
47
  generator.build_particle(:clones) do |clones_found|
45
48
  clones_found.each_with_index do |clone_found, index|
49
+ particles_intricated= clone_found[:intricate] ||= []
46
50
  clone_id="#{particles[:id]}_clone_#{index}"
47
51
  original_id=atome[:id]
48
52
  clone_found[:id] = clone_id
49
53
  clone_found = particles.merge(clone_found)
50
- cloned_atome=Atome.new({ shape: clone_found })
51
- cloned_atome.monitor({ atomes: [original_id], particles: [:width, :attached,:height ]}) do |_atome, particle, value|
54
+ cloned_atome=Atome.new({ clone: clone_found })
55
+ cloned_atome.monitor({ atomes: [original_id], particles: particles_intricated}) do |_atome, particle, value|
52
56
  cloned_atome.send(particle,value)
53
57
  end
54
58
  end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ generator = Genesis.generator
4
+ # create particles
5
+ generator.build_particle(:markers, :hash)
@@ -11,9 +11,9 @@ end
11
11
 
12
12
  # Genesis method here
13
13
  class Atome
14
- def build_particle(particle_name, &particle_proc)
14
+ def build_particle(particle_name,type=:string, &particle_proc)
15
15
  # we add the new method to the particle's collection of methods
16
- Universe.add_to_particle_list(particle_name)
16
+ Universe.add_to_particle_list(particle_name, type)
17
17
  auto_render_generator(particle_name)
18
18
  new_particle(particle_name, &particle_proc)
19
19
  additional_particle_methods(particle_name, &particle_proc)
@@ -23,6 +23,7 @@ puts "application identity: #{Universe.app_identity}"
23
23
  puts "atome version: #{Atome::VERSION}"
24
24
  puts "current host: #{Universe.current_machine}"
25
25
  puts "current user: #{Universe.current_user}"
26
+ puts "current server: #{Universe.current_server}"
26
27
 
27
28
  Atome.new(
28
29
  { element: { renderers: [], id: :eDen, type: :element,
@@ -18,16 +18,15 @@ class Atome
18
18
  instance_exec(file, &proc) if proc.is_a?(Proc)
19
19
  end
20
20
 
21
- def time_callback(current_time)
22
- # puts "time_callback = #{current_time.round(1)}\n#{current_time}"
21
+ def time_callback(current_time, markers)
23
22
  @atome[:time] = current_time
24
- # the line below is used only to set up a one shot event
25
- # return unless @at_time[:time] && (current_time > @at_time[:time] && @at_time[:used].nil?)
26
-
27
- return unless @at_time[:time] && (current_time > @at_time[:time])
28
- proc = @at_time[:code]
29
- instance_exec(current_time, &proc) if proc.is_a?(Proc)
30
- # @at_time[:used] = true
23
+ markers.each_value do |marker|
24
+ # check if the current time matches the time of the marker, thanks to chat GPT for the example
25
+ if current_time >= marker[:begin] && current_time < marker[:end]
26
+ code_found = marker[:code]
27
+ instance_exec(current_time, &code_found) if code_found.is_a?(Proc)
28
+ end
29
+ end
31
30
  end
32
31
 
33
32
  def drag_start_callback(page_x, page_y, left_val, top_val)
@@ -28,29 +28,6 @@ class Atome
28
28
  "historize : #{property} #{value}"
29
29
  end
30
30
 
31
- # def broadcasting(modified_particle, value)
32
- # @broadcast.each_value do |particle_monitored|
33
- # if particle_monitored[modified_particle]
34
- # code_found = particle_monitored[modified_particle]
35
- # instance_exec(self, modified_particle, value, &code_found) if code_found.is_a?(Proc)
36
- # end
37
- # end
38
- # end
39
- #
40
- # public
41
- #
42
- # def monitor(params, &proc_monitoring)
43
- # atome[:monitor] ||= {}
44
- # params[:atomes].each do |atome_id|
45
- # target_broadcaster = grab(atome_id).instance_variable_get('@broadcast')
46
- # monitor_id = params[:id] || "monitor#{target_broadcaster.length}"
47
- # atome[:monitor] [monitor_id]=params.merge({code: proc_monitoring})
48
- # params[:particles].each do |targeted_particle|
49
- # target_broadcaster[monitor_id] = { targeted_particle => proc_monitoring }
50
- # end
51
- # end
52
- # end
53
-
54
31
  def broadcasting(altered_particle, value)
55
32
  @broadcast.each_value do |particle_monitored|
56
33
  if particle_monitored[:particles].include?(altered_particle)
@@ -62,21 +39,29 @@ class Atome
62
39
 
63
40
  public
64
41
 
65
- def monitor(params, &proc_monitoring)
66
- atome[:monitor] ||= {}
67
- params[:atomes].each do |atome_id|
68
- target_broadcaster = grab(atome_id).instance_variable_get('@broadcast')
69
- monitor_id = params[:id] || "monitor#{target_broadcaster.length}"
70
- atome[:monitor] [monitor_id]=params.merge({code: proc_monitoring})
71
- target_broadcaster[monitor_id] = { particles: params[:particles], code: proc_monitoring }
42
+ def monitor(params=nil, &proc_monitoring)
43
+ if params
44
+ atome[:monitor] ||= {}
45
+ params[:atomes].each do |atome_id|
46
+ target_broadcaster = grab(atome_id).instance_variable_get('@broadcast')
47
+ monitor_id = params[:id] || "monitor#{target_broadcaster.length}"
48
+ atome[:monitor] [monitor_id]=params.merge({code: proc_monitoring})
49
+ target_broadcaster[monitor_id] = { particles: params[:particles], code: proc_monitoring }
50
+ end
51
+ else
52
+ atome[:monitor]
72
53
  end
54
+
73
55
  end
56
+
74
57
  def store_code_bloc(element, &user_proc)
58
+ # TODO : maybe we have to change tis code if we need multiple proc for an particle
75
59
  Object.attr_accessor "#{element}_code"
76
60
 
77
61
  instance_variable_set("@#{element}_code", user_proc)
78
62
  end
79
63
 
64
+
80
65
  def particles(particles_found = nil)
81
66
  if particles_found
82
67
  particles_found.each do |particle_found, value_found|
@@ -92,6 +77,26 @@ class Atome
92
77
  real_atome[property] << value
93
78
  end
94
79
 
80
+ def add_to_hash(particle, values, &user_proc)
81
+ # we update the holder of any new particle if user pass a bloc
82
+ store_code_bloc(particle, &user_proc) if user_proc
83
+ values.each do |value_id, value|
84
+ @atome[particle][value_id] = value
85
+ end
86
+ end
87
+
88
+ def add_to_array(particle, value, &_user_proc)
89
+ # we update the holder of any new particle if user pass a bloc
90
+ @atome[particle] << value
91
+ end
92
+
93
+ def add(particles, &user_proc)
94
+ particles.each do |particle, value|
95
+ particle_type = Universe.particle_list[particle]
96
+ send("add_to_#{particle_type}", particle, value, &user_proc)
97
+ end
98
+ end
99
+
95
100
  def refresh
96
101
  collapse
97
102
  end
@@ -4,7 +4,7 @@
4
4
  class Universe
5
5
  @atomes = {}
6
6
  @atome_list = []
7
- @particle_list = []
7
+ @particle_list = {}
8
8
  @renderer_list = %i[html browser headless server]
9
9
  @options = {}
10
10
  @sanitizers = {}
@@ -12,8 +12,8 @@ class Universe
12
12
  class << self
13
13
  attr_reader :atomes, :renderer_list, :atome_list, :particle_list
14
14
 
15
- def add_to_particle_list(particle = nil)
16
- instance_variable_get('@particle_list').push(particle)
15
+ def add_to_particle_list(particle = nil, type)
16
+ instance_variable_get('@particle_list')[particle]=type
17
17
  end
18
18
 
19
19
  def add_optional_method(method_name, &method_proc)
@@ -86,6 +86,10 @@ class Universe
86
86
  @user
87
87
  end
88
88
 
89
+ def current_server
90
+ `window.location.href` if RUBY_ENGINE.downcase == 'opal'
91
+ end
92
+
89
93
  def current_user=(user)
90
94
  # TODO: create or load an existing user
91
95
  # if user needs to be create the current_user will be eVe
@@ -8,6 +8,7 @@ require 'atome/renderers/browser/material'
8
8
  require 'atome/renderers/browser/spatial'
9
9
  require 'atome/renderers/browser/atome'
10
10
  require 'atome/renderers/browser/utility'
11
+ require 'atome/renderers/browser/time'
11
12
  require 'atome/renderers/browser/helpers/browser_helper'
12
13
  require 'atome/renderers/browser/helpers/animation_helper'
13
14
  require 'atome/renderers/browser/helpers/color_helper'
@@ -47,11 +47,6 @@ generator.build_render(:mute) do |value, _proc|
47
47
  end
48
48
  end
49
49
 
50
- generator.build_render(:browser_at) do |at, proc|
51
- # @atime is check at each toick of frame in 'time_callback'
52
- @at_time = { code: proc }.merge(at)
53
- end
54
-
55
50
  generator.build_render(:browser_drag) do |options, proc|
56
51
  options.each do |method, params|
57
52
  atome_id = @atome[:id]
@@ -2,9 +2,6 @@
2
2
 
3
3
  # for browser rendering
4
4
  module BrowserHelper
5
- def self.common_shadow_helper
6
- alert :zgeg
7
- end
8
5
 
9
6
  def self.browser_blur_style(_browser_object, value, atome)
10
7
  b_left = "#{atome[:left]}px"
@@ -24,20 +24,27 @@ module BrowserHelper
24
24
  end
25
25
 
26
26
  def self.browser_play_video(_value, browser_object_found, atome_hash, atome_object, proc)
27
+ markers = atome_hash[:markers]
28
+ markers.each_value do |value|
29
+ value[:end] = value[:begin] + 0.25 unless value[:end]
30
+ value[:label] = "label_#{atome_hash[:markers].length}" unless value[:label]
31
+ end
32
+
27
33
  browser_object_found.play
28
34
  # TODO : change timeupdate for when possible requestVideoFrameCallback
29
35
  # (opal-browser/opal/browser/event.rb line 36)
30
36
  video_callback = atome_hash[:code] # this is the video callback not the play callback
31
37
  play_callback = proc # this is the video callback not the play callback
38
+
32
39
  browser_object_found.on(:timeupdate) do |e|
33
40
  current_time = browser_object_found.currentTime
34
41
  # we update the time particle
35
- atome_object.time_callback(current_time)
42
+ atome_object.time_callback(current_time, markers)
36
43
  e.prevent # Prevent the default action (eg. form submission)
37
44
  # You can also use `e.stop` to stop propagating the event to other handlers.
38
-
39
45
  atome_object.instance_exec(current_time, &video_callback) if video_callback.is_a?(Proc)
40
46
  atome_object.instance_exec(current_time, &play_callback) if play_callback.is_a?(Proc)
41
47
  end
42
48
  end
49
+
43
50
  end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ # generator = Genesis.generator
@@ -34,7 +34,7 @@ class Html
34
34
  `#{parent_found}.appendChild(#{@html})`
35
35
  end
36
36
  def append_color(parent)
37
- aleputsrt "color : #{parent.class}"
37
+ "color : #{parent.class}"
38
38
  end
39
39
  def append_to(_node)
40
40