atome 0.5.3.8.8 → 0.5.4.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +52 -17
  3. data/app_builder_helpers/Rakefile +20 -3
  4. data/exe/atome +33 -1
  5. data/lib/atome/atome.rb +43 -57
  6. data/lib/atome/extensions/atome.rb +82 -52
  7. data/lib/atome/extensions/mathematic.rb +8 -12
  8. data/lib/atome/extensions/matrix.rb +138 -210
  9. data/lib/atome/genesis/generators/atome.rb +8 -134
  10. data/lib/atome/genesis/generators/communication.rb +0 -1
  11. data/lib/atome/genesis/generators/effect.rb +0 -6
  12. data/lib/atome/genesis/generators/event.rb +64 -77
  13. data/lib/atome/genesis/generators/geometry.rb +0 -18
  14. data/lib/atome/genesis/generators/identity.rb +6 -33
  15. data/lib/atome/genesis/generators/material.rb +3 -54
  16. data/lib/atome/genesis/generators/utility.rb +63 -58
  17. data/lib/atome/genesis/genesis.rb +8 -0
  18. data/lib/atome/genesis/sparkle.rb +35 -16
  19. data/lib/atome/helpers/callbacks.rb +47 -1
  20. data/lib/atome/helpers/essentials.rb +1 -1
  21. data/lib/atome/helpers/sanitizer.rb +0 -10
  22. data/lib/atome/helpers/utilities.rb +74 -28
  23. data/lib/atome/kernel/batch.rb +13 -35
  24. data/lib/atome/kernel/universe.rb +2 -0
  25. data/lib/atome/presets/atome.rb +4 -12
  26. data/lib/atome/renderers/browser/atome.rb +1 -1
  27. data/lib/atome/renderers/browser/browser.rb +2 -0
  28. data/lib/atome/renderers/browser/event.rb +18 -0
  29. data/lib/atome/renderers/browser/helpers/drag_helper.rb +13 -0
  30. data/lib/atome/renderers/browser/helpers/drop_helper.rb +13 -0
  31. data/lib/atome/renderers/browser/helpers/event_helper.rb +16 -11
  32. data/lib/atome/renderers/browser/helpers/over_helper.rb +13 -0
  33. data/lib/atome/renderers/browser/helpers/text_helper.rb +5 -1
  34. data/lib/atome/renderers/browser/spatial.rb +3 -2
  35. data/lib/atome/renderers/browser/utility.rb +7 -7
  36. data/lib/atome/version.rb +2 -2
  37. data/lib/atome.rb +1 -0
  38. data/sig/atome.rbs +16 -0
  39. data/sig/batch.rbs +7 -0
  40. data/sig/browser_helper.rbs +14 -0
  41. data/sig/matrix.rbs +5 -0
  42. data/sig/object.rbs +3 -0
  43. data/vendor/assets/aui.rb +5 -0
  44. data/vendor/assets/src/index.html +15 -3
  45. data/vendor/assets/src/js/atome/atome.js +1 -1
  46. data/vendor/assets/src/js/atome/atome_helpers/atome_animate.js +1 -1
  47. data/vendor/assets/src/js/atome/atome_helpers/atome_communication.js +40 -0
  48. data/vendor/assets/src/js/atome/atome_helpers/atome_drag.js +40 -3
  49. data/vendor/assets/src/js/atome/atome_helpers/atome_drop.js +12 -0
  50. data/vendor/assets/src/js/atome/atome_helpers/atome_events.js +166 -0
  51. data/vendor/assets/src/js/atome/atome_helpers/atome_file.js +6 -1
  52. data/vendor/assets/src/js/atome/atome_helpers/atome_over.js +43 -0
  53. data/vendor/assets/src/medias/rubies/demos.rb +63 -0
  54. data/vendor/assets/src/medias/rubies/examples/add.rb +1 -1
  55. data/vendor/assets/src/medias/rubies/examples/animation.rb +1 -1
  56. data/vendor/assets/src/medias/rubies/examples/atome_new.rb +1 -1
  57. data/vendor/assets/src/medias/rubies/examples/attach.rb +10 -10
  58. data/vendor/assets/src/medias/rubies/examples/attached.rb +2 -3
  59. data/vendor/assets/src/medias/rubies/examples/batch.rb +17 -0
  60. data/vendor/assets/src/medias/rubies/examples/blur.rb +2 -2
  61. data/vendor/assets/src/medias/rubies/examples/box.rb +2 -2
  62. data/vendor/assets/src/medias/rubies/examples/code.rb +1 -1
  63. data/vendor/assets/src/medias/rubies/examples/color.rb +3 -3
  64. data/vendor/assets/src/medias/rubies/examples/delete.rb +17 -1
  65. data/vendor/assets/src/medias/rubies/examples/detached.rb +3 -3
  66. data/vendor/assets/src/medias/rubies/examples/drag.rb +52 -1
  67. data/vendor/assets/src/medias/rubies/examples/drop.rb +26 -0
  68. data/vendor/assets/src/medias/rubies/examples/fullscreen.rb +1 -1
  69. data/vendor/assets/src/medias/rubies/examples/markers.rb +1 -1
  70. data/vendor/assets/src/medias/rubies/examples/matrix.rb +102 -0
  71. data/vendor/assets/src/medias/rubies/examples/matrix_changes.rb +483 -0
  72. data/vendor/assets/src/medias/rubies/examples/matrix_simple.rb +32 -0
  73. data/vendor/assets/src/medias/rubies/examples/monitoring.rb +1 -1
  74. data/vendor/assets/src/medias/rubies/examples/mute.rb +1 -1
  75. data/vendor/assets/src/medias/rubies/examples/on.rb +1 -1
  76. data/vendor/assets/src/medias/rubies/examples/over.rb +6 -4
  77. data/vendor/assets/src/medias/rubies/examples/pause.rb +1 -1
  78. data/vendor/assets/src/medias/rubies/examples/physical.rb +19 -0
  79. data/vendor/assets/src/medias/rubies/examples/play.rb +1 -1
  80. data/vendor/assets/src/medias/rubies/examples/repeat.rb +3 -2
  81. data/vendor/assets/src/medias/rubies/examples/shadow.rb +1 -1
  82. data/vendor/assets/src/medias/rubies/examples/sort.rb +3 -4
  83. data/vendor/assets/src/medias/rubies/examples/tags.rb +10 -0
  84. data/vendor/assets/src/medias/rubies/examples/text.rb +4 -4
  85. data/vendor/assets/src/medias/rubies/examples/time.rb +2 -2
  86. data/vendor/assets/src/medias/rubies/examples/video.rb +2 -2
  87. data/vendor/assets/src/medias/rubies/{examples → unstable}/_2_solve.rb +1 -1
  88. data/vendor/assets/src/medias/rubies/{examples → unstable}/_audio.rb +1 -1
  89. data/vendor/assets/src/medias/rubies/{examples → unstable}/_dataset.rb +4 -4
  90. data/vendor/assets/src/medias/rubies/{examples → unstable}/_table2.rb +2 -2
  91. data/vendor/assets/src/medias/rubies/{examples → unstable}/_vie.rb +2 -2
  92. data/vendor/assets/src/utilities/mode.rb +0 -0
  93. data/vendor/assets/src-tauri/tauri.conf.json +2 -2
  94. metadata +32 -14
  95. data/vendor/assets/src/medias/rubies/examples/table.rb +0 -479
  96. /data/vendor/assets/src/medias/rubies/{examples → unstable}/!run.rb +0 -0
  97. /data/vendor/assets/src/medias/rubies/{examples → unstable}/_attach.rb +0 -0
  98. /data/vendor/assets/src/medias/rubies/{examples → unstable}/_matrix.rb +0 -0
  99. /data/vendor/assets/src/medias/rubies/{examples → unstable}/_os.rb +0 -0
  100. /data/vendor/assets/src/medias/rubies/{examples → unstable}/_test.rb +0 -0
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  my_video = Atome.new(
4
- video: { renderers: [:browser], id: :video1, type: :video, parents: [:view],
4
+ video: { renderers: [:browser], id: :video1, type: :video, attach: [:view],
5
5
  time: 33, path: './medias/videos/avengers.mp4', left: 69, top: 33, width: 777
6
6
  }
7
7
  ) do |params|
@@ -11,7 +11,7 @@ my_video.touch(true) do
11
11
  grab(:video1).time(3)
12
12
  my_video.pause(true)
13
13
  wait 3 do
14
- play(15)
14
+ play(50)
15
15
  end
16
16
 
17
17
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  my_video = Atome.new(
4
- video: { renderers: [:browser], id: :video1, type: :video, parents: [:view], path: './medias/videos/superman.mp4',
4
+ video: { renderers: [:browser], id: :video1, type: :video, attach: [:view], path: './medias/videos/superman.mp4',
5
5
  left: 333, top: 112, width: 199, height: 99
6
6
  }
7
7
  ) do |params|
@@ -22,7 +22,7 @@ my_video.touch(true) do
22
22
  end
23
23
  #############
24
24
  my_video2 = Atome.new(
25
- video: { renderers: [:browser], id: :video9, type: :video, parents: [:view], path: './medias/videos/madmax.mp4',
25
+ video: { renderers: [:browser], id: :video9, type: :video, attach: [:view], path: './medias/videos/madmax.mp4',
26
26
  left: 666, top: 333, width: 199, height: 99,
27
27
  }) do |params|
28
28
  puts "2- video callback time is #{params}, id is : #{id}"
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Text in object
4
- a=Atome.new(code: { type: :code, renderers: [:headless], parents: [], children: [] }) do |params_found|
4
+ a=Atome.new(code: { type: :code, renderers: [:headless], attach: [], children: [] }) do |params_found|
5
5
  puts "the param is #{params_found}"
6
6
  end
7
7
  a.run(:super)
@@ -36,7 +36,7 @@ generator.build_sanitizer(:audio) do |params|
36
36
  parent_found = found_parents_and_renderers[:parent]
37
37
  render_found = found_parents_and_renderers[:renderers]
38
38
  default_params = { renderers: render_found, id: "audio_#{Universe.atomes.length}", type: :audio,
39
- parents: parent_found }
39
+ attach: parent_found }
40
40
  default_params.merge!(params)
41
41
  end
42
42
 
@@ -14,7 +14,7 @@ class Atome
14
14
  parent_found = found_parents_and_renderers[:parent]
15
15
  render_found = found_parents_and_renderers[:renderers]
16
16
  default_params = { renderers: render_found, id: "matrix_#{Universe.atomes.length}", type: :matrix,
17
- parents: parent_found }
17
+ attach: parent_found }
18
18
 
19
19
  params[:renderer] = []
20
20
  params[:children] = []
@@ -141,13 +141,13 @@ generator.build_particle(:display) do |params|
141
141
  end
142
142
 
143
143
  def create_matrix_colors(name, red, green, blue, alpha)
144
- Atome.new({ color: { renderers: [:browser], id: name, type: :color, parents: [], children: [],
144
+ Atome.new({ color: { renderers: [:browser], id: name, type: :color, attach: [], children: [],
145
145
  red: red, green: green, blue: blue, alpha: alpha } })
146
146
  end
147
147
 
148
148
  def create_matrix( style)
149
149
  matrix = Atome.new(
150
- shape: { type: :shape, renderers: [:browser], id: style[:id], parents: [:view], width: 333, height: 333, left: 33,top: 33,
150
+ shape: { type: :shape, renderers: [:browser], id: style[:id], attach: [:view], width: 333, height: 333, left: 33,top: 33,
151
151
  overflow: :hidden, children: [] }
152
152
  )
153
153
  matrix.style(style)
@@ -160,7 +160,7 @@ def create_matrix_cells(id, cell_back_color, number_of_cells, style)
160
160
  while counter < number_of_cells
161
161
  id_generated = id + "_#{counter}"
162
162
  cells << a = Atome.new(
163
- shape: { type: :shape, renderers: [:browser], id: id_generated, parents: [id],
163
+ shape: { type: :shape, renderers: [:browser], id: id_generated, attach: [id],
164
164
  children: [:cell_color]
165
165
 
166
166
  }
@@ -7,7 +7,7 @@ class Atome
7
7
 
8
8
  #
9
9
  def cells(cells_number)
10
- # collector({id: :toto, renderers: [], children: [], parents: []})
10
+ # collector({id: :toto, renderers: [], children: [], attach: []})
11
11
  # collector_object = collector({})
12
12
  collector_object = collector
13
13
  collected_atomes = []
@@ -93,7 +93,7 @@ generator.build_atome(:barnabe)
93
93
  #
94
94
  # # matrix({ id: :totot,columns: { count: 24 } })
95
95
  # m = matrix
96
- # # m.collector({id: :toto, renderers: [], children: [], parents: []})
96
+ # # m.collector({id: :toto, renderers: [], children: [], attach: []})
97
97
  # m.cells([20, 5])
98
98
  # # m.cells([20, 5]).color(:red)
99
99
  # # m.columns(≈6).data[0..3].color(:green)
@@ -151,7 +151,7 @@ a = {
151
151
  ]
152
152
  }
153
153
 
154
- Atome.new({ color: { renderers: [:browser], id: :orange_col, type: :color, parents: [], children: [],
154
+ Atome.new({ color: { renderers: [:browser], id: :orange_col, type: :color, attach: [], children: [],
155
155
  left: 33, top: 66, red: 0, green: 0.15, blue: 0.7, alpha: 0.6 } })
156
156
 
157
157
  def get_vie_module(list)
@@ -176,7 +176,7 @@ def get_vie_module(list)
176
176
  left_pos = 120 + ((module_position[:x].to_i) * (66 + 33+120))
177
177
  top_pos=120 + ((module_position[:y].to_i) * (66 + 33))
178
178
  a=Atome.new(
179
- shape: { type: :shape, renderers: [:browser], id: module_id, parents: [:view],children: [], color: :orange,
179
+ shape: { type: :shape, renderers: [:browser], id: module_id, attach: [:view],children: [], color: :orange,
180
180
  left: left_pos, top: top_pos,
181
181
  width: 120, height: 120
182
182
 
File without changes
@@ -12,9 +12,9 @@
12
12
  },
13
13
  "tauri": {
14
14
  "allowlist": {
15
- "all": false,
15
+ "all": true,
16
16
  "shell": {
17
- "all": false,
17
+ "all": true,
18
18
  "open": true
19
19
  }
20
20
  },
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3.8.8
4
+ version: 0.5.4.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Eric Godard
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-09 00:00:00.000000000 Z
11
+ date: 2023-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: arduino_firmata
@@ -441,9 +441,11 @@ files:
441
441
  - lib/atome/renderers/browser/helpers/browser_helper.rb
442
442
  - lib/atome/renderers/browser/helpers/color_helper.rb
443
443
  - lib/atome/renderers/browser/helpers/drag_helper.rb
444
+ - lib/atome/renderers/browser/helpers/drop_helper.rb
444
445
  - lib/atome/renderers/browser/helpers/effect_helper.rb
445
446
  - lib/atome/renderers/browser/helpers/event_helper.rb
446
447
  - lib/atome/renderers/browser/helpers/image_helper.rb
448
+ - lib/atome/renderers/browser/helpers/over_helper.rb
447
449
  - lib/atome/renderers/browser/helpers/shadow_helper.rb
448
450
  - lib/atome/renderers/browser/helpers/shape_helper.rb
449
451
  - lib/atome/renderers/browser/helpers/text_helper.rb
@@ -480,8 +482,12 @@ files:
480
482
  - lib/atome/version.rb
481
483
  - sig/atome.rbs
482
484
  - sig/atome_js.rbs
485
+ - sig/batch.rbs
486
+ - sig/browser_helper.rbs
483
487
  - sig/essentials.rbs
484
488
  - sig/genesis.rbs
489
+ - sig/matrix.rbs
490
+ - sig/object.rbs
485
491
  - vendor/assets/Guardfile
486
492
  - vendor/assets/Rakefile
487
493
  - vendor/assets/application/index.rb
@@ -519,8 +525,12 @@ files:
519
525
  - vendor/assets/src/index.html
520
526
  - vendor/assets/src/js/atome/atome.js
521
527
  - vendor/assets/src/js/atome/atome_helpers/atome_animate.js
528
+ - vendor/assets/src/js/atome/atome_helpers/atome_communication.js
522
529
  - vendor/assets/src/js/atome/atome_helpers/atome_drag.js
530
+ - vendor/assets/src/js/atome/atome_helpers/atome_drop.js
531
+ - vendor/assets/src/js/atome/atome_helpers/atome_events.js
523
532
  - vendor/assets/src/js/atome/atome_helpers/atome_file.js
533
+ - vendor/assets/src/js/atome/atome_helpers/atome_over.js
524
534
  - vendor/assets/src/js/atome/atome_helpers/atome_sort.js
525
535
  - vendor/assets/src/js/atome/atome_helpers/atome_time.js
526
536
  - vendor/assets/src/js/atome/atome_helpers/atome_video.js
@@ -594,16 +604,7 @@ files:
594
604
  - vendor/assets/src/medias/images/red_planet.png
595
605
  - vendor/assets/src/medias/images/tile.png
596
606
  - vendor/assets/src/medias/javascripts/test.js
597
- - vendor/assets/src/medias/rubies/examples/!run.rb
598
- - vendor/assets/src/medias/rubies/examples/_2_solve.rb
599
- - vendor/assets/src/medias/rubies/examples/_attach.rb
600
- - vendor/assets/src/medias/rubies/examples/_audio.rb
601
- - vendor/assets/src/medias/rubies/examples/_dataset.rb
602
- - vendor/assets/src/medias/rubies/examples/_matrix.rb
603
- - vendor/assets/src/medias/rubies/examples/_os.rb
604
- - vendor/assets/src/medias/rubies/examples/_table2.rb
605
- - vendor/assets/src/medias/rubies/examples/_test.rb
606
- - vendor/assets/src/medias/rubies/examples/_vie.rb
607
+ - vendor/assets/src/medias/rubies/demos.rb
607
608
  - vendor/assets/src/medias/rubies/examples/add.rb
608
609
  - vendor/assets/src/medias/rubies/examples/animation.rb
609
610
  - vendor/assets/src/medias/rubies/examples/atome_new.rb
@@ -611,6 +612,7 @@ files:
611
612
  - vendor/assets/src/medias/rubies/examples/attached.rb
612
613
  - vendor/assets/src/medias/rubies/examples/auto_height.rb
613
614
  - vendor/assets/src/medias/rubies/examples/auto_width.rb
615
+ - vendor/assets/src/medias/rubies/examples/batch.rb
614
616
  - vendor/assets/src/medias/rubies/examples/blur.rb
615
617
  - vendor/assets/src/medias/rubies/examples/bottom.rb
616
618
  - vendor/assets/src/medias/rubies/examples/box.rb
@@ -627,6 +629,7 @@ files:
627
629
  - vendor/assets/src/medias/rubies/examples/depth.rb
628
630
  - vendor/assets/src/medias/rubies/examples/detached.rb
629
631
  - vendor/assets/src/medias/rubies/examples/drag.rb
632
+ - vendor/assets/src/medias/rubies/examples/drop.rb
630
633
  - vendor/assets/src/medias/rubies/examples/edit.rb
631
634
  - vendor/assets/src/medias/rubies/examples/element.rb
632
635
  - vendor/assets/src/medias/rubies/examples/empty_atome.rb
@@ -641,12 +644,16 @@ files:
641
644
  - vendor/assets/src/medias/rubies/examples/link.rb
642
645
  - vendor/assets/src/medias/rubies/examples/markers.rb
643
646
  - vendor/assets/src/medias/rubies/examples/materials.rb
647
+ - vendor/assets/src/medias/rubies/examples/matrix.rb
648
+ - vendor/assets/src/medias/rubies/examples/matrix_changes.rb
649
+ - vendor/assets/src/medias/rubies/examples/matrix_simple.rb
644
650
  - vendor/assets/src/medias/rubies/examples/monitoring.rb
645
651
  - vendor/assets/src/medias/rubies/examples/mute.rb
646
652
  - vendor/assets/src/medias/rubies/examples/on.rb
647
653
  - vendor/assets/src/medias/rubies/examples/opacity.rb
648
654
  - vendor/assets/src/medias/rubies/examples/over.rb
649
655
  - vendor/assets/src/medias/rubies/examples/pause.rb
656
+ - vendor/assets/src/medias/rubies/examples/physical.rb
650
657
  - vendor/assets/src/medias/rubies/examples/play.rb
651
658
  - vendor/assets/src/medias/rubies/examples/read.rb
652
659
  - vendor/assets/src/medias/rubies/examples/refresh.rb
@@ -660,7 +667,7 @@ files:
660
667
  - vendor/assets/src/medias/rubies/examples/smooth.rb
661
668
  - vendor/assets/src/medias/rubies/examples/sort.rb
662
669
  - vendor/assets/src/medias/rubies/examples/style.rb
663
- - vendor/assets/src/medias/rubies/examples/table.rb
670
+ - vendor/assets/src/medias/rubies/examples/tags.rb
664
671
  - vendor/assets/src/medias/rubies/examples/text.rb
665
672
  - vendor/assets/src/medias/rubies/examples/time.rb
666
673
  - vendor/assets/src/medias/rubies/examples/to_px.rb
@@ -672,11 +679,22 @@ files:
672
679
  - vendor/assets/src/medias/rubies/examples/width.rb
673
680
  - vendor/assets/src/medias/rubies/test.rb
674
681
  - vendor/assets/src/medias/rubies/text_read.rb
682
+ - vendor/assets/src/medias/rubies/unstable/!run.rb
683
+ - vendor/assets/src/medias/rubies/unstable/_2_solve.rb
684
+ - vendor/assets/src/medias/rubies/unstable/_attach.rb
685
+ - vendor/assets/src/medias/rubies/unstable/_audio.rb
686
+ - vendor/assets/src/medias/rubies/unstable/_dataset.rb
687
+ - vendor/assets/src/medias/rubies/unstable/_matrix.rb
688
+ - vendor/assets/src/medias/rubies/unstable/_os.rb
689
+ - vendor/assets/src/medias/rubies/unstable/_table2.rb
690
+ - vendor/assets/src/medias/rubies/unstable/_test.rb
691
+ - vendor/assets/src/medias/rubies/unstable/_vie.rb
675
692
  - vendor/assets/src/medias/rubies/users/code.rb
676
693
  - vendor/assets/src/medias/texts/lorem.txt
677
694
  - vendor/assets/src/medias/utils/infos/color.rb
678
695
  - vendor/assets/src/medias/utils/infos/width.rb
679
696
  - vendor/assets/src/medias/videos/video_missing.mp4
697
+ - vendor/assets/src/utilities/mode.rb
680
698
  homepage: https://atome.one
681
699
  licenses:
682
700
  - MIT
@@ -700,7 +718,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
700
718
  - !ruby/object:Gem::Version
701
719
  version: '0'
702
720
  requirements: []
703
- rubygems_version: 3.4.8
721
+ rubygems_version: 3.4.12
704
722
  signing_key:
705
723
  specification_version: 4
706
724
  summary: the creative framework