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.
- checksums.yaml +4 -4
- data/Rakefile +25 -15
- data/app_builder_helpers/Rakefile +18 -18
- data/exe/atome +10 -2
- data/lib/atome/atome.rb +18 -14
- data/lib/atome/genesis/generators/event.rb +7 -3
- data/lib/atome/genesis/generators/geometry.rb +12 -0
- data/lib/atome/genesis/generators/identity.rb +6 -2
- data/lib/atome/genesis/generators/time.rb +5 -0
- data/lib/atome/genesis/genesis.rb +2 -2
- data/lib/atome/genesis/sparkle.rb +1 -0
- data/lib/atome/helpers/callbacks.rb +8 -9
- data/lib/atome/helpers/utilities.rb +35 -30
- data/lib/atome/kernel/universe.rb +7 -3
- data/lib/atome/renderers/browser/browser.rb +1 -0
- data/lib/atome/renderers/browser/event.rb +0 -5
- data/lib/atome/renderers/browser/helpers/effect_helper.rb +0 -3
- data/lib/atome/renderers/browser/helpers/video_helper.rb +9 -2
- data/lib/atome/renderers/browser/time.rb +3 -0
- data/lib/atome/renderers/html/html.rb +1 -1
- data/lib/atome/version.rb +1 -1
- data/lib/atome.rb +1 -0
- data/sig/atome.rbs +6 -0
- data/vendor/assets/server/atome_server.rb +4 -4
- data/vendor/assets/server/config.ru +5 -1
- data/vendor/assets/{build → src}/css/style.css +0 -0
- data/vendor/assets/{build → src}/favicon.ico +0 -0
- data/vendor/assets/{build → src}/index.html +0 -0
- data/vendor/assets/{build → src}/js/atome/atome.js +0 -0
- data/vendor/assets/{build → src}/js/atome/atome_helpers/atome_animate.js +0 -0
- data/vendor/assets/{build → src}/js/atome/atome_helpers/atome_drag.js +0 -0
- data/vendor/assets/{build → src}/js/atome/atome_helpers/atome_file.js +0 -0
- data/vendor/assets/{build → src}/js/atome/atome_helpers/atome_sort.js +0 -0
- data/vendor/assets/{build → src}/js/atome/atome_helpers/atome_time.js +0 -0
- data/vendor/assets/{build → src}/js/atome/atome_helpers/atome_video.js +0 -0
- data/vendor/assets/{build → src}/js/third_parties/fabric.min.js +0 -0
- data/vendor/assets/{build → src}/js/third_parties/interact.min.js +0 -0
- data/vendor/assets/{build → src}/js/third_parties/interact.min.js.map +0 -0
- data/vendor/assets/{build → src}/js/third_parties/ping.min.js +0 -0
- data/vendor/assets/{build → src}/js/third_parties/popmotion.min.js +0 -0
- data/vendor/assets/{build → src}/js/third_parties/sha256.min.js +0 -0
- data/vendor/assets/{build → src}/js/third_parties/sortable.min.js +0 -0
- data/vendor/assets/{build → src}/js/third_parties/three.min.js +0 -0
- data/vendor/assets/{build → src}/js/third_parties/w3color.js +0 -0
- data/vendor/assets/{build → src}/js/third_parties/wad.min.js +0 -0
- data/vendor/assets/{build → src}/js/third_parties/zim.min.js +0 -0
- data/vendor/assets/{build → src}/medias/audios/Binrpilot.mp3 +0 -0
- data/vendor/assets/{build → src}/medias/audios/audio_missing.wav +0 -0
- data/vendor/assets/{build → src}/medias/audios/clap.wav +0 -0
- data/vendor/assets/{build → src}/medias/audios/cowbell.wav +0 -0
- data/vendor/assets/{build → src}/medias/audios/hihat.wav +0 -0
- data/vendor/assets/{build → src}/medias/audios/kick.wav +0 -0
- data/vendor/assets/{build → src}/medias/audios/riff.m4a +0 -0
- data/vendor/assets/{build → src}/medias/audios/snare.wav +0 -0
- data/vendor/assets/{build → src}/medias/audios/tom.wav +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/DancingScript-VariableFont_wght.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/OFL.txt +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/README.txt +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/static/DancingScript-Bold.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/static/DancingScript-Medium.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/static/DancingScript-Regular.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Dancing_Script/static/DancingScript-SemiBold.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Mate_SC/MateSC-Regular.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Mate_SC/OFL.txt +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/OFL.txt +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/README.txt +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/Raleway-Italic-VariableFont_wght.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/Raleway-VariableFont_wght.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Black.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-BlackItalic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Bold.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-BoldItalic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-ExtraBold.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-ExtraBoldItalic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-ExtraLight.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-ExtraLightItalic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Italic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Light.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-LightItalic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Medium.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-MediumItalic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Regular.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-SemiBold.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-SemiBoldItalic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-Thin.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Raleway/static/Raleway-ThinItalic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/LICENSE.txt +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/README.txt +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/RobotoSlab-VariableFont_wght.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-Black.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-Bold.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-ExtraBold.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-ExtraLight.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-Light.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-Medium.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-Regular.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-SemiBold.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Roboto_Slab/static/RobotoSlab-Thin.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/OFL.txt +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/README.txt +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/Vollkorn-Italic-VariableFont_wght.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/Vollkorn-VariableFont_wght.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-Black.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-BlackItalic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-Bold.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-BoldItalic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-ExtraBold.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-ExtraBoldItalic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-Italic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-Medium.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-MediumItalic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-Regular.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-SemiBold.ttf +0 -0
- data/vendor/assets/{build → src}/medias/fonts/Vollkorn/static/Vollkorn-SemiBoldItalic.ttf +0 -0
- data/vendor/assets/{build → src}/medias/images/Icon_Help.png +0 -0
- data/vendor/assets/{build → src}/medias/images/atome.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/avion.jpg +0 -0
- data/vendor/assets/{build → src}/medias/images/ballanim.png +0 -0
- data/vendor/assets/{build → src}/medias/images/blank.png +0 -0
- data/vendor/assets/{build → src}/medias/images/boat.png +0 -0
- data/vendor/assets/{build → src}/medias/images/cache.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/dices.png +0 -0
- data/vendor/assets/{build → src}/medias/images/eVe_back.png +0 -0
- data/vendor/assets/{build → src}/medias/images/elephant.png +0 -0
- data/vendor/assets/{build → src}/medias/images/eyes.jpg +0 -0
- data/vendor/assets/{build → src}/medias/images/freebsd.png +0 -0
- data/vendor/assets/{build → src}/medias/images/grain_texture.png +0 -0
- data/vendor/assets/{build → src}/medias/images/green_planet.png +0 -0
- data/vendor/assets/{build → src}/medias/images/image_missing.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/jeezs.png +0 -0
- data/vendor/assets/{build → src}/medias/images/keyboard.png +0 -0
- data/vendor/assets/{build → src}/medias/images/killer.jpg +0 -0
- data/vendor/assets/{build → src}/medias/images/living_room.png +0 -0
- data/vendor/assets/{build → src}/medias/images/logo.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/logos/Facebook.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/logos/GitHub Black.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/logos/GitHub-Mark.eps +0 -0
- data/vendor/assets/{build → src}/medias/images/logos/GitHub.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/logos/TikTok.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/logos/Twitter.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/logos/YouTube.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/logos/apple.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/logos/atome.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/logos/freebsd.png +0 -0
- data/vendor/assets/{build → src}/medias/images/logos/instagram.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/logos/tiktok_back.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/moto.png +0 -0
- data/vendor/assets/{build → src}/medias/images/noise.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/piano.png +0 -0
- data/vendor/assets/{build → src}/medias/images/poisson.jpg +0 -0
- data/vendor/assets/{build → src}/medias/images/red_planet.png +0 -0
- data/vendor/assets/{build → src}/medias/images/sky.jpg +0 -0
- data/vendor/assets/{build → src}/medias/images/the_mask.svg +0 -0
- data/vendor/assets/{build → src}/medias/images/tile.png +0 -0
- data/vendor/assets/{build → src}/medias/images/tile_black.png +0 -0
- data/vendor/assets/{build → src}/medias/images/tile_white.png +0 -0
- data/vendor/assets/{build → src}/medias/javascripts/test.js +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/!run.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/_2_solve.rb +1 -1
- data/vendor/assets/{build → src}/medias/rubies/examples/_audio.rb +0 -0
- data/vendor/assets/src/medias/rubies/examples/_dataset.rb +177 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/_os.rb +0 -0
- data/vendor/assets/src/medias/rubies/examples/_test.rb +1 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/_vie.rb +0 -0
- data/vendor/assets/src/medias/rubies/examples/add.rb +25 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/animation.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/atome_new.rb +0 -0
- data/vendor/assets/src/medias/rubies/examples/attach.rb +12 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/auto_height.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/auto_width.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/blur.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/bottom.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/box.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/center.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/circle.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/clear.rb +0 -0
- data/vendor/assets/src/medias/rubies/examples/clone.rb +35 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/code.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/color.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/create_atome_in_atome.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/cursor.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/delete.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/drag.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/edit.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/element.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/empty_atome.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/fullscreen.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/get_renderer_list.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/grab.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/height.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/hide.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/id.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/image.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/left.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/link.rb +0 -0
- data/vendor/assets/src/medias/rubies/examples/markers.rb +48 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/matrix.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/monitoring.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/mute.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/on.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/parents.rb +1 -1
- data/vendor/assets/{build → src}/medias/rubies/examples/pause.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/play.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/read.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/refresh.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/remove.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/repeat.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/right.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/rotate.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/schedule.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/shadow.rb +0 -0
- data/vendor/assets/src/medias/rubies/examples/size.rb +8 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/smooth.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/sort.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/style.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/text.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/time.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/top.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/touch.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/video.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/wait.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/web.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/examples/width.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/test.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/text_read.rb +0 -0
- data/vendor/assets/{build → src}/medias/rubies/users/code.rb +0 -0
- data/vendor/assets/{build → src}/medias/texts/lorem.txt +0 -0
- data/vendor/assets/{build → src}/medias/utils/infos/color.rb +0 -0
- data/vendor/assets/{build → src}/medias/utils/infos/width.rb +0 -0
- data/vendor/assets/{build → src}/medias/videos/avengers.mp4 +0 -0
- data/vendor/assets/{build → src}/medias/videos/madmax.mp4 +0 -0
- data/vendor/assets/{build → src}/medias/videos/starwars.mov +0 -0
- data/vendor/assets/{build → src}/medias/videos/superman.mp4 +0 -0
- data/vendor/assets/{build → src}/medias/videos/video_missing.mp4 +0 -0
- data/vendor/assets/src-tauri/.gitignore +4 -0
- data/vendor/assets/src-tauri/Cargo.toml +27 -0
- data/vendor/assets/src-tauri/build.rs +3 -0
- data/vendor/assets/src-tauri/icons/128x128.png +0 -0
- data/vendor/assets/src-tauri/icons/128x128@2x.png +0 -0
- data/vendor/assets/src-tauri/icons/32x32.png +0 -0
- data/vendor/assets/src-tauri/icons/Square107x107Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square142x142Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square150x150Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square284x284Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square30x30Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square310x310Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square44x44Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square71x71Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square89x89Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/StoreLogo.png +0 -0
- data/vendor/assets/src-tauri/icons/icon.icns +0 -0
- data/vendor/assets/src-tauri/icons/icon.ico +0 -0
- data/vendor/assets/src-tauri/icons/icon.png +0 -0
- data/vendor/assets/src-tauri/src/main.rs +17 -0
- data/vendor/assets/src-tauri/tauri.conf.json +70 -0
- metadata +250 -210
- data/vendor/assets/build/medias/rubies/examples/_dataset.rb +0 -82
- data/vendor/assets/build/medias/rubies/examples/_markers.rb +0 -57
- data/vendor/assets/build/medias/rubies/examples/at.rb +0 -21
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06b52ecd6bd8075b2aaf377a9738d205c78182440c184176d12d437867c2b5ae
|
4
|
+
data.tar.gz: 90cd690d288403a1239d4d50ec7043171ca75d3a57b728b1866c34b5967b5d4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 :
|
15
|
-
FileUtils.copy_entry('vendor/assets/
|
16
|
-
FileUtils.copy_entry('vendor/assets/
|
17
|
-
FileUtils.copy_entry('vendor/assets/
|
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
|
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/
|
26
|
-
FileUtils.copy_entry('vendor/assets/
|
27
|
-
FileUtils.copy_entry('vendor/assets/
|
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 :
|
41
|
-
FileUtils.copy_entry('vendor/assets/
|
42
|
-
`cd test/test_app;atome
|
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/
|
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}/
|
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}/
|
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}/
|
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/
|
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}/
|
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}/
|
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}/
|
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}/
|
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}/
|
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}/
|
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}/
|
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}/
|
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}/
|
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}/
|
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}/
|
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}/
|
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}/
|
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}/
|
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}/
|
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}/
|
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
|
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,
|
90
|
-
inject_value(element,
|
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
|
97
|
-
attr_reader :atome, :structure
|
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
|
-
|
109
|
-
|
110
|
-
run_optional_proc("
|
111
|
-
|
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_#{
|
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({
|
51
|
-
cloned_atome.monitor({ atomes: [original_id], particles:
|
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
|
@@ -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
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
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')
|
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]
|
@@ -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
|