atome 0.5.4.1.7 → 0.5.5.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/Gemfile +3 -1
- data/README.md +70 -1
- data/Rakefile +246 -75
- data/app_builder_helpers/Rakefile +276 -288
- data/documentation/basic.md +242 -0
- data/documentation/deep learning/architecture.txt +3763 -0
- data/documentation/deep learning/atome.png +0 -0
- data/documentation/deep learning/basic_infos.txt +227 -0
- data/documentation/deep learning/example_of_users_code.rb +1810 -0
- data/documentation/deep learning/misc.txt +24 -0
- data/documentation/deep learning/ruby_js_example.rb +272 -0
- data/documentation/deep learning/wasm_script_help.text +14 -0
- data/documentation/framework/enhance_atome.md +1 -1
- data/documentation/tutorials/tutorials.md +7 -0
- data/exe/atome +308 -208
- data/lib/atome/atome.rb +52 -156
- data/lib/atome/extensions/atome.rb +129 -47
- data/lib/atome/extensions/mathematics.rb +20 -0
- data/lib/atome/extensions/ping.rb +2 -3
- data/lib/atome/genesis/generators/atome.rb +57 -30
- data/lib/atome/genesis/generators/communication.rb +9 -0
- data/lib/atome/genesis/generators/effect.rb +0 -1
- data/lib/atome/genesis/generators/event.rb +279 -43
- data/lib/atome/genesis/generators/geometry.rb +1 -10
- data/lib/atome/genesis/generators/hierarchy.rb +103 -0
- data/lib/atome/genesis/generators/identity.rb +45 -84
- data/lib/atome/genesis/generators/material.rb +31 -34
- data/lib/atome/genesis/generators/property.rb +31 -0
- data/lib/atome/genesis/generators/security.rb +31 -0
- data/lib/atome/genesis/generators/spatial.rb +3 -5
- data/lib/atome/genesis/generators/time.rb +0 -1
- data/lib/atome/genesis/generators/utility.rb +181 -66
- data/lib/atome/genesis/genesis.rb +152 -55
- data/lib/atome/genesis/sparkle.rb +59 -75
- data/lib/atome/helpers/color_helper/color/rgb/colors.rb +1 -1
- data/lib/atome/helpers/color_helper/color/rgb.rb +1 -1
- data/lib/atome/helpers/color_helper/color.rb +226 -7
- data/lib/atome/helpers/essentials.rb +22 -26
- data/lib/atome/helpers/security.rb +71 -0
- data/lib/atome/helpers/utilities.rb +191 -178
- data/lib/atome/kernel/black_matter.rb +22 -0
- data/lib/atome/kernel/universe.rb +123 -24
- data/lib/atome/presets/atome.rb +39 -35
- data/lib/atome/version.rb +3 -2
- data/lib/atome.rb +12 -12
- data/lib/atome_relative.rb +36 -0
- data/lib/{atome/renderers → platform_specific}/opal/atome_opal_extensions.rb +4 -1
- data/lib/{atome/renderers → platform_specific}/opal/extensions/color.rb +12 -5
- data/lib/{atome/renderers → platform_specific}/opal/extensions/geolocation.rb +1 -0
- data/lib/platform_specific/opal/extensions/js.rb +21 -0
- data/lib/platform_specific/opal/extensions/object.rb +6 -0
- data/lib/platform_specific/opal/extensions/ping.rb +31 -0
- data/lib/{atome/renderers → platform_specific}/opal/extensions/sha.rb +4 -2
- data/lib/platform_specific/wasm/atome_wasm_extensions.rb +11 -0
- data/lib/renderers/headless/headless.rb +18 -0
- data/lib/renderers/headless/index.rb +6 -0
- data/lib/renderers/headless/index_relative.rb +6 -0
- data/lib/renderers/headless/utility.rb +6 -0
- data/{vendor/assets/src/medias/rubies/examples/top.rb → lib/renderers/html/atome.rb} +0 -1
- data/lib/renderers/html/atome_html.rb +22 -0
- data/lib/renderers/html/effect.rb +26 -0
- data/lib/renderers/html/event.rb +43 -0
- data/lib/renderers/html/geometry.rb +31 -0
- data/lib/renderers/html/hierarchy.rb +233 -0
- data/lib/renderers/html/html.rb +1112 -0
- data/lib/renderers/html/identity.rb +84 -0
- data/lib/renderers/html/index.rb +19 -0
- data/lib/renderers/html/index_relative.rb +20 -0
- data/lib/renderers/html/material.rb +53 -0
- data/lib/renderers/html/property.rb +24 -0
- data/lib/renderers/html/spatial.rb +46 -0
- data/lib/renderers/html/time.rb +1 -0
- data/lib/renderers/html/utility.rb +38 -0
- data/lib/renderers/renderer.rb +16 -0
- data/lib/renderers/server/index.rb +4 -0
- data/lib/renderers/server/index_relative.rb +4 -0
- data/lib/renderers/server/utility.rb +4 -0
- data/sig/atome.rbs +6 -0
- data/sig/object.rbs +4 -0
- data/sig/universe.rbs +3 -0
- data/vendor/assets/Rakefile +3 -3
- data/vendor/assets/application/examples/a_concat.rb +16 -0
- data/vendor/assets/application/examples/affect.rb +8 -0
- data/vendor/assets/application/examples/animation.rb +96 -0
- data/vendor/assets/application/examples/apply.rb +8 -0
- data/vendor/assets/application/examples/atome.rb +5 -0
- data/vendor/assets/application/examples/attach.rb +34 -0
- data/vendor/assets/application/examples/attached.rb +38 -0
- data/vendor/assets/application/examples/basic_understanding.rb +52 -0
- data/vendor/assets/application/examples/browse.rb +17 -0
- data/vendor/assets/application/examples/callback.rb +20 -0
- data/vendor/assets/application/examples/category.rb +12 -0
- data/vendor/assets/application/examples/clear.rb +96 -0
- data/vendor/assets/application/examples/clones.rb +177 -0
- data/vendor/assets/application/examples/code.rb +13 -0
- data/vendor/assets/application/examples/color.rb +54 -0
- data/vendor/assets/application/examples/convert.rb +163 -0
- data/vendor/assets/application/examples/copy.rb +25 -0
- data/vendor/assets/application/examples/copybck.rb +68 -0
- data/vendor/assets/application/examples/debug.rb +78 -0
- data/vendor/assets/application/examples/delete.rb +93 -0
- data/vendor/assets/application/examples/display.rb +279 -0
- data/vendor/assets/application/examples/display_bck.rb +164 -0
- data/vendor/assets/application/examples/drag.rb +45 -0
- data/vendor/assets/application/examples/drop.rb +35 -0
- data/vendor/assets/application/examples/duplicate.rb +64 -0
- data/vendor/assets/application/examples/edit.rb +21 -0
- data/vendor/assets/application/examples/encode.rb +6 -0
- data/vendor/assets/application/examples/file.rb +50 -0
- data/vendor/assets/application/examples/find.rb +157 -0
- data/vendor/assets/application/examples/generator_and_build.rb +15 -0
- data/vendor/assets/application/examples/getter.rb +16 -0
- data/vendor/assets/application/examples/grab.rb +14 -0
- data/vendor/assets/application/examples/gradient.rb +35 -0
- data/vendor/assets/application/examples/group.rb +44 -0
- data/vendor/assets/application/examples/hierarchy.rb +21 -0
- data/vendor/assets/application/examples/history.rb +31 -0
- data/vendor/assets/application/examples/hypertext.rb +113 -0
- data/vendor/assets/application/examples/image.rb +5 -0
- data/vendor/assets/application/examples/keyboard.rb +59 -0
- data/vendor/assets/application/examples/layout.rb +227 -0
- data/vendor/assets/application/examples/login.rb +10 -0
- data/vendor/assets/application/examples/markup.rb +4 -0
- data/vendor/assets/application/examples/match.rb +115 -0
- data/vendor/assets/application/examples/messaging.rb +16 -0
- data/vendor/assets/application/examples/monitor.rb +14 -0
- data/vendor/assets/application/examples/on_resize.rb +7 -0
- data/vendor/assets/{src/medias/rubies/examples/get_renderer_list.rb → application/examples/online.rb} +1 -1
- data/vendor/assets/application/examples/over.rb +29 -0
- data/vendor/assets/application/examples/paint.rb +23 -0
- data/vendor/assets/application/examples/particles.rb +4 -0
- data/vendor/assets/application/examples/percent_to_px.rb +4 -0
- data/vendor/assets/application/examples/play.rb +50 -0
- data/vendor/assets/application/examples/presets.rb +33 -0
- data/vendor/assets/application/examples/random.rb +42 -0
- data/vendor/assets/application/examples/raw_html.rb +48 -0
- data/vendor/assets/application/examples/read.rb +11 -0
- data/vendor/assets/application/examples/refresh.rb +62 -0
- data/vendor/assets/application/examples/remove.rb +47 -0
- data/vendor/assets/application/examples/repeat.rb +26 -0
- data/vendor/assets/application/examples/resize.rb +17 -0
- data/vendor/assets/application/examples/scroll.rb +11 -0
- data/vendor/assets/application/examples/security.rb +76 -0
- data/vendor/assets/application/examples/selected.rb +30 -0
- data/vendor/assets/application/examples/shadow.rb +46 -0
- data/vendor/assets/application/examples/shapes.rb +6 -0
- data/vendor/assets/{src/medias/rubies → application}/examples/smooth.rb +5 -1
- data/vendor/assets/application/examples/style.rb +4 -0
- data/vendor/assets/application/examples/sync.rb +39 -0
- data/vendor/assets/application/examples/tagged.rb +24 -0
- data/vendor/assets/application/examples/terminal.rb +4 -0
- data/vendor/assets/application/examples/text.rb +5 -0
- data/vendor/assets/application/examples/touch.rb +38 -0
- data/vendor/assets/application/examples/type_mutation.rb +18 -0
- data/vendor/assets/application/examples/universe.rb +8 -0
- data/vendor/assets/application/examples/vector.rb +24 -0
- data/vendor/assets/application/examples/video.rb +14 -0
- data/vendor/assets/application/examples/wait.rb +6 -0
- data/vendor/assets/application/examples/www.rb +10 -0
- data/vendor/assets/application/index.rb +1 -1
- data/vendor/assets/application/test.rb +29 -0
- data/vendor/assets/application/works/photos.rb +672 -0
- data/vendor/assets/application/works/photos2.rb +218 -0
- data/vendor/assets/application/works/photos3.rb +343 -0
- data/vendor/assets/application/works/photos4.rb +34 -0
- data/vendor/assets/application/works/photos6.rb +6 -0
- data/vendor/assets/application/works/trigga.rb +0 -0
- data/vendor/assets/application/works/vie.rb +74 -0
- data/vendor/assets/server/atome_server.rb +37 -41
- data/vendor/assets/server/atome_server_wasm.rb +112 -0
- data/vendor/assets/server/capture.rb +10 -0
- data/vendor/assets/server/config.ru +5 -4
- data/vendor/assets/src/css/style.css +29 -4
- data/vendor/assets/src/index.html +31 -38
- data/vendor/assets/src/index_opal.html +42 -0
- data/vendor/assets/src/index_server.html +43 -0
- data/vendor/assets/src/index_server_wasm.html +46 -0
- data/vendor/assets/src/js/atome/atome.js +170 -150
- data/vendor/assets/src/js/atome/atome_helpers/add_font.js +46 -0
- data/vendor/assets/src/js/atome/atome_helpers/atome_drag.js +3 -1
- data/vendor/assets/src/js/atome/atome_helpers/atome_events.js +12 -7
- data/vendor/assets/src/js/atome/atome_helpers/communication.js +126 -0
- data/vendor/assets/src/js/atome/atome_helpers/{atome_file.js → file.js} +1 -1
- data/vendor/assets/src/js/atome/specific/opal.js +3 -0
- data/vendor/assets/src/js/atome/specific/wasm.js +12 -0
- data/vendor/assets/src/js/third_parties/browser.script.iife.min.js +13 -0
- data/vendor/assets/src/js/third_parties/fabric.min.js +1 -1
- data/vendor/assets/src/js/third_parties/html-to-image.min.js +2 -0
- data/vendor/assets/src/js/third_parties/jsencrypt.min.js +2 -0
- data/vendor/assets/src/js/third_parties/papaparse.min.js +7 -0
- data/vendor/assets/src/medias/fonts/Roboto/LICENSE.txt +202 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Black.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Bold.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Italic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Light.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Medium.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Regular.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Thin.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
- data/vendor/assets/src/medias/images/logos/Facebook.svg +1 -1
- data/vendor/assets/src/medias/images/logos/LinkedIn-full.svg +109 -0
- data/vendor/assets/src/medias/images/logos/LinkedIn.svg +11 -0
- data/vendor/assets/src/medias/images/logos/X.svg +5 -0
- data/vendor/assets/src-tauri/Cargo.toml +1 -1
- data/vendor/assets/src-tauri/src/main.rs +59 -5
- data/vendor/assets/src-tauri/tauri.conf.json +1 -1
- data/vendor/assets/src-wasm/wasm/wasi-vfs-osx_arm +0 -0
- data/vendor/assets/src-wasm/wasm/wasi-vfs-osx_x86 +0 -0
- data/vendor/assets/src-wasm/wasm/wasi-vfs-unix +0 -0
- data/vendor/assets/src-wasm/wasm/wasi-vfs.exe +0 -0
- metadata +188 -180
- data/lib/atome/extensions/mathematic.rb +0 -20
- data/lib/atome/extensions/matrix.rb +0 -346
- data/lib/atome/helpers/callbacks.rb +0 -133
- data/lib/atome/kernel/batch.rb +0 -26
- data/lib/atome/kernel/essentials.rb +0 -23
- data/lib/atome/renderers/browser/atome.rb +0 -158
- data/lib/atome/renderers/browser/browser.rb +0 -47
- data/lib/atome/renderers/browser/effect.rb +0 -23
- data/lib/atome/renderers/browser/event.rb +0 -96
- data/lib/atome/renderers/browser/geometry.rb +0 -27
- data/lib/atome/renderers/browser/helpers/animation_helper.rb +0 -69
- data/lib/atome/renderers/browser/helpers/browser_helper.rb +0 -101
- data/lib/atome/renderers/browser/helpers/color_helper.rb +0 -80
- data/lib/atome/renderers/browser/helpers/drag_helper.rb +0 -52
- data/lib/atome/renderers/browser/helpers/drop_helper.rb +0 -13
- data/lib/atome/renderers/browser/helpers/effect_helper.rb +0 -23
- data/lib/atome/renderers/browser/helpers/event_helper.rb +0 -76
- data/lib/atome/renderers/browser/helpers/image_helper.rb +0 -27
- data/lib/atome/renderers/browser/helpers/over_helper.rb +0 -13
- data/lib/atome/renderers/browser/helpers/shadow_helper.rb +0 -74
- data/lib/atome/renderers/browser/helpers/shape_helper.rb +0 -22
- data/lib/atome/renderers/browser/helpers/text_helper.rb +0 -38
- data/lib/atome/renderers/browser/helpers/video_helper.rb +0 -50
- data/lib/atome/renderers/browser/helpers/web_helper.rb +0 -26
- data/lib/atome/renderers/browser/identity.rb +0 -61
- data/lib/atome/renderers/browser/material.rb +0 -121
- data/lib/atome/renderers/browser/opal_add_on.rb +0 -31
- data/lib/atome/renderers/browser/opal_browser.rb +0 -6
- data/lib/atome/renderers/browser/spatial.rb +0 -59
- data/lib/atome/renderers/browser/time.rb +0 -3
- data/lib/atome/renderers/browser/utility.rb +0 -49
- data/lib/atome/renderers/headless/headless.rb +0 -10
- data/lib/atome/renderers/headless/utility.rb +0 -6
- data/lib/atome/renderers/html/atome.rb +0 -49
- data/lib/atome/renderers/html/effect.rb +0 -19
- data/lib/atome/renderers/html/event.rb +0 -9
- data/lib/atome/renderers/html/geometry.rb +0 -11
- data/lib/atome/renderers/html/html.rb +0 -42
- data/lib/atome/renderers/html/identity.rb +0 -14
- data/lib/atome/renderers/html/opal_browser.rb +0 -6
- data/lib/atome/renderers/html/spatial.rb +0 -28
- data/lib/atome/renderers/html/utility.rb +0 -17
- data/lib/atome/renderers/opal/extensions/atome.rb +0 -29
- data/lib/atome/renderers/opal/extensions/ping.rb +0 -18
- data/lib/atome/renderers/renderer.rb +0 -15
- data/lib/atome/renderers/server/server.rb +0 -10
- data/lib/atome/renderers/server/utility.rb +0 -6
- data/vendor/assets/aui.rb +0 -5
- data/vendor/assets/r&d/misc.rb +0 -219
- data/vendor/assets/r&d/ping.rb +0 -3
- data/vendor/assets/r&d/storage.rb +0 -9
- data/vendor/assets/r&d/view_example.rb +0 -21
- data/vendor/assets/src/js/atome/atome_helpers/atome_communication.js +0 -40
- data/vendor/assets/src/medias/javascripts/test.js +0 -1
- data/vendor/assets/src/medias/rubies/demos.rb +0 -63
- data/vendor/assets/src/medias/rubies/examples/add.rb +0 -24
- data/vendor/assets/src/medias/rubies/examples/animation.rb +0 -81
- data/vendor/assets/src/medias/rubies/examples/atome_new.rb +0 -27
- data/vendor/assets/src/medias/rubies/examples/attach.rb +0 -15
- data/vendor/assets/src/medias/rubies/examples/attached.rb +0 -15
- data/vendor/assets/src/medias/rubies/examples/auto_height.rb +0 -5
- data/vendor/assets/src/medias/rubies/examples/auto_width.rb +0 -4
- data/vendor/assets/src/medias/rubies/examples/batch.rb +0 -17
- data/vendor/assets/src/medias/rubies/examples/blur.rb +0 -4
- data/vendor/assets/src/medias/rubies/examples/bottom.rb +0 -3
- data/vendor/assets/src/medias/rubies/examples/box.rb +0 -20
- data/vendor/assets/src/medias/rubies/examples/center.rb +0 -21
- data/vendor/assets/src/medias/rubies/examples/circle.rb +0 -3
- data/vendor/assets/src/medias/rubies/examples/class.rb +0 -13
- data/vendor/assets/src/medias/rubies/examples/clear.rb +0 -10
- data/vendor/assets/src/medias/rubies/examples/clone.rb +0 -35
- data/vendor/assets/src/medias/rubies/examples/code.rb +0 -11
- data/vendor/assets/src/medias/rubies/examples/color.rb +0 -73
- data/vendor/assets/src/medias/rubies/examples/create_atome_in_atome.rb +0 -13
- data/vendor/assets/src/medias/rubies/examples/cursor.rb +0 -7
- data/vendor/assets/src/medias/rubies/examples/delete.rb +0 -42
- data/vendor/assets/src/medias/rubies/examples/depth.rb +0 -6
- data/vendor/assets/src/medias/rubies/examples/detached.rb +0 -13
- data/vendor/assets/src/medias/rubies/examples/drag.rb +0 -98
- data/vendor/assets/src/medias/rubies/examples/drop.rb +0 -26
- data/vendor/assets/src/medias/rubies/examples/edit.rb +0 -12
- data/vendor/assets/src/medias/rubies/examples/element.rb +0 -6
- data/vendor/assets/src/medias/rubies/examples/empty_atome.rb +0 -12
- data/vendor/assets/src/medias/rubies/examples/fullscreen.rb +0 -15
- data/vendor/assets/src/medias/rubies/examples/grab.rb +0 -5
- data/vendor/assets/src/medias/rubies/examples/height.rb +0 -7
- data/vendor/assets/src/medias/rubies/examples/hide.rb +0 -7
- data/vendor/assets/src/medias/rubies/examples/id.rb +0 -14
- data/vendor/assets/src/medias/rubies/examples/image.rb +0 -8
- data/vendor/assets/src/medias/rubies/examples/left.rb +0 -7
- data/vendor/assets/src/medias/rubies/examples/link.rb +0 -22
- data/vendor/assets/src/medias/rubies/examples/markers.rb +0 -48
- data/vendor/assets/src/medias/rubies/examples/materials.rb +0 -15
- data/vendor/assets/src/medias/rubies/examples/matrix.rb +0 -102
- data/vendor/assets/src/medias/rubies/examples/matrix_changes.rb +0 -483
- data/vendor/assets/src/medias/rubies/examples/matrix_simple.rb +0 -32
- data/vendor/assets/src/medias/rubies/examples/monitoring.rb +0 -70
- data/vendor/assets/src/medias/rubies/examples/mute.rb +0 -22
- data/vendor/assets/src/medias/rubies/examples/on.rb +0 -26
- data/vendor/assets/src/medias/rubies/examples/opacity.rb +0 -5
- data/vendor/assets/src/medias/rubies/examples/over.rb +0 -21
- data/vendor/assets/src/medias/rubies/examples/pause.rb +0 -15
- data/vendor/assets/src/medias/rubies/examples/physical.rb +0 -19
- data/vendor/assets/src/medias/rubies/examples/play.rb +0 -15
- data/vendor/assets/src/medias/rubies/examples/read.rb +0 -11
- data/vendor/assets/src/medias/rubies/examples/refresh.rb +0 -8
- data/vendor/assets/src/medias/rubies/examples/remove.rb +0 -16
- data/vendor/assets/src/medias/rubies/examples/repeat.rb +0 -6
- data/vendor/assets/src/medias/rubies/examples/right.rb +0 -3
- data/vendor/assets/src/medias/rubies/examples/rotate.rb +0 -4
- data/vendor/assets/src/medias/rubies/examples/schedule.rb +0 -13
- data/vendor/assets/src/medias/rubies/examples/shadow.rb +0 -84
- data/vendor/assets/src/medias/rubies/examples/size.rb +0 -8
- data/vendor/assets/src/medias/rubies/examples/sort.rb +0 -18
- data/vendor/assets/src/medias/rubies/examples/style.rb +0 -4
- data/vendor/assets/src/medias/rubies/examples/tags.rb +0 -10
- data/vendor/assets/src/medias/rubies/examples/text.rb +0 -39
- data/vendor/assets/src/medias/rubies/examples/time.rb +0 -18
- data/vendor/assets/src/medias/rubies/examples/to_px.rb +0 -10
- data/vendor/assets/src/medias/rubies/examples/touch.rb +0 -56
- data/vendor/assets/src/medias/rubies/examples/vector.rb +0 -39
- data/vendor/assets/src/medias/rubies/examples/video.rb +0 -65
- data/vendor/assets/src/medias/rubies/examples/wait.rb +0 -8
- data/vendor/assets/src/medias/rubies/examples/web.rb +0 -13
- data/vendor/assets/src/medias/rubies/examples/width.rb +0 -6
- data/vendor/assets/src/medias/rubies/test.rb +0 -1
- data/vendor/assets/src/medias/rubies/text_read.rb +0 -1
- data/vendor/assets/src/medias/rubies/unstable/!run.rb +0 -16
- data/vendor/assets/src/medias/rubies/unstable/_2_solve.rb +0 -72
- data/vendor/assets/src/medias/rubies/unstable/_attach.rb +0 -12
- data/vendor/assets/src/medias/rubies/unstable/_audio.rb +0 -231
- data/vendor/assets/src/medias/rubies/unstable/_dataset.rb +0 -257
- data/vendor/assets/src/medias/rubies/unstable/_matrix.rb +0 -58
- data/vendor/assets/src/medias/rubies/unstable/_os.rb +0 -29
- data/vendor/assets/src/medias/rubies/unstable/_table2.rb +0 -108
- data/vendor/assets/src/medias/rubies/unstable/_vie.rb +0 -211
- data/vendor/assets/src/medias/rubies/users/code.rb +0 -6
- /data/lib/{atome/renderers → platform_specific}/opal/opal.rb +0 -0
- /data/lib/{atome/renderers → platform_specific}/opal/opal_parser.rb +0 -0
- /data/{vendor/assets/src/utilities/mode.rb → lib/renderers/html/communication.rb} +0 -0
- /data/{vendor/assets/src/medias/rubies/unstable/_test.rb → lib/renderers/html/security.rb} +0 -0
@@ -1,48 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
my_video = Atome.new(
|
4
|
-
video: { renderers: [:browser], id: :video1, type: :video, attach: [:view], clones: [],
|
5
|
-
path: './medias/videos/avengers.mp4', left: 33, top: 33, width: 777
|
6
|
-
}
|
7
|
-
)
|
8
|
-
|
9
|
-
my_video.touch(true) do
|
10
|
-
my_video.play(10)
|
11
|
-
puts "play : #{my_video.play}, pause : #{my_video.pause}"
|
12
|
-
end
|
13
|
-
|
14
|
-
m_code1 = lambda do |val|
|
15
|
-
puts "hello : #{val}"
|
16
|
-
end
|
17
|
-
m_code2 = lambda do |val|
|
18
|
-
puts "hi there : #{val}"
|
19
|
-
end
|
20
|
-
|
21
|
-
m_code22 = lambda do |val|
|
22
|
-
puts "Super!! : #{val}"
|
23
|
-
end
|
24
|
-
|
25
|
-
stoper = lambda do
|
26
|
-
my_video.pause(true)
|
27
|
-
end
|
28
|
-
|
29
|
-
looper=lambda do
|
30
|
-
my_video.add({ markers: { my_stop: { begin: 6, code: stoper } } })
|
31
|
-
my_video.play(4)
|
32
|
-
end
|
33
|
-
|
34
|
-
|
35
|
-
# the marker below wont be executed because m2 will override it
|
36
|
-
my_video.markers({ m1: { begin: 13, code: m_code1 } }) do |_params|
|
37
|
-
puts 'stop'
|
38
|
-
end
|
39
|
-
# the marker will replace marker m1
|
40
|
-
my_video.markers({ m2: { begin: 12.876, code: m_code2 } }) do |_params|
|
41
|
-
puts'good'
|
42
|
-
end
|
43
|
-
|
44
|
-
# The markers below will be executed because they're added
|
45
|
-
|
46
|
-
my_video.add({ markers: { my_marker: { begin: 22.87576, code: looper } } })
|
47
|
-
my_video.add({ markers: { m3: { begin: 16.87576, code: m_code2 } } })
|
48
|
-
my_video.add({ markers: { m4: { begin: 14.87576,end: 16, code: m_code22 } } })
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# the materials method is used to retrieve or delete all children with a visual rendering
|
4
|
-
# but leave alone other atome such as color
|
5
|
-
b = box
|
6
|
-
cc2 = color(:yellow)
|
7
|
-
b.color(:red)
|
8
|
-
c = b.circle
|
9
|
-
c.attached(cc2.id)
|
10
|
-
b.text(:hello)
|
11
|
-
b.add(text: { data: :ok, left: 133 })
|
12
|
-
wait 2 do
|
13
|
-
b.delete(:materials)
|
14
|
-
puts "b is : #{b}"
|
15
|
-
end
|
@@ -1,102 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
params = {
|
4
|
-
|
5
|
-
id: :my_table, left: 0, top: 0, width: 500, height: 399, smooth: 8, color: :yellowgreen,
|
6
|
-
columns: { count: 8,
|
7
|
-
titles: { 1 => :col1, 3 => :mycol },
|
8
|
-
data: { 3 => :col_content },
|
9
|
-
actions: { 2 => { touch: :the_action } },
|
10
|
-
particles: { color: :blue }
|
11
|
-
},
|
12
|
-
rows: { count: 6,
|
13
|
-
titles: { 1 => :my_first_row, 5 => :other_row },
|
14
|
-
data: { 0 => :col_content },
|
15
|
-
actions: {},
|
16
|
-
particles: { shadows: :black }
|
17
|
-
},
|
18
|
-
cells: {
|
19
|
-
particles: { margin: 9, color: :blue, smooth: 9, shadow: { blur: 9, left: 3, top: 3,id: :cell_shadow } }
|
20
|
-
},
|
21
|
-
exceptions: {
|
22
|
-
columns: {
|
23
|
-
fusion: { 1 => [3, 5], 7 => [2, 5] }
|
24
|
-
},
|
25
|
-
rows: {
|
26
|
-
divided: { 1 => 3 },
|
27
|
-
fusion: { 2 => [0, 3], 5 => [2, 5] }
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
m = matrix(params)
|
32
|
-
|
33
|
-
found = m.columns(5) do |el|
|
34
|
-
el.color(:yellow)
|
35
|
-
end
|
36
|
-
|
37
|
-
m.rows(3) do |el|
|
38
|
-
el.color(:orange)
|
39
|
-
end
|
40
|
-
|
41
|
-
m.rows(1) do |el|
|
42
|
-
el.color(:lightgray)
|
43
|
-
end
|
44
|
-
|
45
|
-
found.data.each do |el|
|
46
|
-
el.color(:red)
|
47
|
-
end
|
48
|
-
|
49
|
-
# found.data[0..2].each do |el|
|
50
|
-
# el.color(:cyan)
|
51
|
-
# end
|
52
|
-
#
|
53
|
-
grab(:my_table_21).color(:pink)
|
54
|
-
grab(:my_table_26).color(:purple)
|
55
|
-
# m.cells([20, 5]).rotate(15)
|
56
|
-
m.cell(3).color(:black)
|
57
|
-
# test = m.cells([23, 26])
|
58
|
-
# test.color(:black)
|
59
|
-
# m.columns(6).data[0..3].color(:green)
|
60
|
-
|
61
|
-
grab(m.id).drag({ move: true }) do |e|
|
62
|
-
puts e
|
63
|
-
end
|
64
|
-
# wait 1 do
|
65
|
-
# m.add_columns(3)
|
66
|
-
# m.rows(3) do |el|
|
67
|
-
# el.color(:orange)
|
68
|
-
# end
|
69
|
-
# wait 1 do
|
70
|
-
# m.add_rows(4)
|
71
|
-
# m.rows(1) do |el|
|
72
|
-
# el.color(:lightgray)
|
73
|
-
# end
|
74
|
-
# wait 1 do
|
75
|
-
# found.data.each do |el|
|
76
|
-
# el.color(:red)
|
77
|
-
# end
|
78
|
-
# m.resize(330, 300)
|
79
|
-
#
|
80
|
-
# m.fusion(rows: { 2 => [0, 3], 3 => [2, 5] })
|
81
|
-
# end
|
82
|
-
# end
|
83
|
-
# end
|
84
|
-
|
85
|
-
#
|
86
|
-
# m.fusion(columns: { 3=> [3, 5], 4 => [2, 5] })
|
87
|
-
# m.fusion(rows: { 0 => [0, 3], 3 => [5, 9] })
|
88
|
-
# # m.override( {
|
89
|
-
# # columns: { number: [ 0, 3 ] ,width: 200},
|
90
|
-
# # rows: { number: [ 1, 4 ] ,height: 200},
|
91
|
-
# # })
|
92
|
-
# m.last(:rows) do |el|
|
93
|
-
# el.color(:violet)
|
94
|
-
# end
|
95
|
-
# m.divide( rows: {1 => 3})
|
96
|
-
# m.cell(9).box({left: 0, top: 0, id: :the_big_one, width: 66, height: 66, color: :black})
|
97
|
-
# m.cell(9).content([box({ left: 0, top: 0, id: :another_one, width: 66, height: 66, color: :black })])
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
@@ -1,483 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
params = {
|
4
|
-
|
5
|
-
id: :my_table, left: 0, top: 0, width: 500, height: 399, smooth: 8, color: :yellowgreen,
|
6
|
-
columns: { count: 8,
|
7
|
-
titles: { 1 => :col1, 3 => :mycol },
|
8
|
-
data: { 3 => :col_content },
|
9
|
-
actions: { 2 => { touch: :the_action } },
|
10
|
-
particles: { color: :blue }
|
11
|
-
},
|
12
|
-
rows: { count: 6,
|
13
|
-
titles: { 1 => :my_first_row, 5 => :other_row },
|
14
|
-
data: { 0 => :col_content },
|
15
|
-
actions: {},
|
16
|
-
particles: { shadows: :black }
|
17
|
-
},
|
18
|
-
cells: {
|
19
|
-
# data: { 0 => :here, 2 => "hello", 4 => :hi, 5 => :good, 7 => :super },
|
20
|
-
# actions: { 2 => { touch: :my_lambda } },
|
21
|
-
particles: { margin: 9, color: :blue, smooth: 9, shadow: { blur: 9, left: 3, top: 3 } }
|
22
|
-
},
|
23
|
-
exceptions: {
|
24
|
-
columns: {
|
25
|
-
# divided: { 2 => 3 },
|
26
|
-
fusion: { 1 => [3, 5], 7 => [2, 5] }
|
27
|
-
},
|
28
|
-
rows: {
|
29
|
-
divided: { 1 => 3 },
|
30
|
-
fusion: { 2 => [0, 3], 5 => [2, 5] }
|
31
|
-
}
|
32
|
-
}
|
33
|
-
}
|
34
|
-
m = matrix(params)
|
35
|
-
|
36
|
-
found = m.columns(5) do |el|
|
37
|
-
el.color(:yellow)
|
38
|
-
end
|
39
|
-
|
40
|
-
m.rows(3) do |el|
|
41
|
-
el.color(:orange)
|
42
|
-
end
|
43
|
-
|
44
|
-
m.rows(1) do |el|
|
45
|
-
el.color(:lightgray)
|
46
|
-
end
|
47
|
-
|
48
|
-
found.data.each do |el|
|
49
|
-
el.color(:red)
|
50
|
-
end
|
51
|
-
|
52
|
-
# found.data[0..2].each do |el|
|
53
|
-
# el.color(:cyan)
|
54
|
-
# end
|
55
|
-
#
|
56
|
-
grab(:my_table_21).color(:pink)
|
57
|
-
grab(:my_table_26).color(:purple)
|
58
|
-
# m.cells([20, 5]).rotate(15)
|
59
|
-
# m.cell(9).color(:black)
|
60
|
-
# test = m.cells([23, 26])
|
61
|
-
# test.color(:blue)
|
62
|
-
# m.columns(6).data[0..3].color(:white)
|
63
|
-
|
64
|
-
grab(m.id).drag({ move: true }) do |e|
|
65
|
-
puts e
|
66
|
-
end
|
67
|
-
wait 1 do
|
68
|
-
m.add_columns(3)
|
69
|
-
m.rows(3) do |el|
|
70
|
-
el.color(:orange)
|
71
|
-
end
|
72
|
-
wait 1 do
|
73
|
-
m.add_rows(4)
|
74
|
-
m.rows(1) do |el|
|
75
|
-
el.color(:lightgray)
|
76
|
-
end
|
77
|
-
wait 1 do
|
78
|
-
found.data.each do |el|
|
79
|
-
el.color(:red)
|
80
|
-
end
|
81
|
-
m.resize(330, 300)
|
82
|
-
|
83
|
-
m.fusion(rows: { 2 => [0, 3], 3 => [2, 5] })
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
#
|
89
|
-
m.fusion(columns: { 3=> [3, 5], 4 => [2, 5] })
|
90
|
-
m.fusion(rows: { 0 => [0, 3], 3 => [5, 9] })
|
91
|
-
# m.override( {
|
92
|
-
# columns: { number: [ 0, 3 ] ,width: 200},
|
93
|
-
# rows: { number: [ 1, 4 ] ,height: 200},
|
94
|
-
# })
|
95
|
-
m.last(:rows) do |el|
|
96
|
-
el.color(:violet)
|
97
|
-
end
|
98
|
-
m.divide( rows: {1 => 3})
|
99
|
-
m.cell(9).box({left: 0, top: 0, id: :the_big_one, width: 66, height: 66, color: :black})
|
100
|
-
# m.cell(9).content([box({ left: 0, top: 0, id: :another_one, width: 66, height: 66, color: :black })])
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
# # puts m.cell(9).content
|
106
|
-
# m.relations({ relation_1: {
|
107
|
-
# # start: {cell_id => out_nb},
|
108
|
-
# # end: {cell_id => in_nb},
|
109
|
-
# start: { 9 => 2 },
|
110
|
-
# end: { 2 => 3 }
|
111
|
-
# } })
|
112
|
-
# m.add({ relations: {
|
113
|
-
# # start: {cell_id => out_nb},
|
114
|
-
# # end: {cell_id => in_nb},
|
115
|
-
# rel_2: { start: { 7 => 3 },
|
116
|
-
# end: { 1 => 4 } }
|
117
|
-
# }
|
118
|
-
# })
|
119
|
-
# m.delete({ relations: :rel_2 })
|
120
|
-
# # alert m.relations
|
121
|
-
# # "sourceComponent": 0,
|
122
|
-
# # "sourceOutputSlot": 1,
|
123
|
-
# # "targetComponent": 1,
|
124
|
-
# # "targetInputSlot": 1
|
125
|
-
# # puts m.cell(9)
|
126
|
-
# # m.children.each do |child|
|
127
|
-
# # puts "#{grab(child).id} : #{grab(child).width}"
|
128
|
-
# # end
|
129
|
-
#
|
130
|
-
# # alert(grab("my_table_9"))
|
131
|
-
# # grab("my_table_9").children .each do |child|
|
132
|
-
# # grab(child).color(:white)
|
133
|
-
# # end
|
134
|
-
# matrix_ratio=m.height/m.width
|
135
|
-
# # alert prev_size
|
136
|
-
# $window.on :resize do |e|
|
137
|
-
# # m.top(0)
|
138
|
-
# # m.left(0)
|
139
|
-
# # ratio_w=m.width.value/$window.view.width
|
140
|
-
# # ratio_h=m.height.value/$window.view.height
|
141
|
-
# # puts "=====> :#{ratio_w}"
|
142
|
-
# # m.resize(ratio_w*$window.view.width,ratio_h*$window.view.height)
|
143
|
-
# m.resize($window.view.width, $window.view.width*matrix_ratio)
|
144
|
-
# end
|
145
|
-
# # m.ratio(:fixed)
|
146
|
-
#
|
147
|
-
# #TODO : add cell => style, actions, data, content, relation
|
148
|
-
# #TODO : mega important => I must have a reflection on .value
|
149
|
-
#
|
150
|
-
#
|
151
|
-
# # TODO : try matrix in a matrix's cell
|
152
|
-
# # TODO : store data, actions, and titles
|
153
|
-
# # alert m.cell(0)
|
154
|
-
# # ############################## end table tests #############
|
155
|
-
# # TODO : alteration data persistence when resizing color, and other particles are lost
|
156
|
-
#
|
157
|
-
# # generator = Genesis.generator
|
158
|
-
# ############
|
159
|
-
#
|
160
|
-
# # generator.build_option(:pre_render_parents) do |parents_ids|
|
161
|
-
# # parents_ids.each do |parents_id|
|
162
|
-
# # parents_found = grab(parents_id)
|
163
|
-
# # parents_found.atome[:children] << id if parents_found
|
164
|
-
# # end
|
165
|
-
# # family(parents_ids)
|
166
|
-
# # end
|
167
|
-
# #
|
168
|
-
# # generator.build_option(:pre_render_children) do |children_pass|
|
169
|
-
# # children_pass.each do |child_found|
|
170
|
-
# # atome_found = grab(child_found)
|
171
|
-
# # atome_found.parents([@atome[:id]])
|
172
|
-
# # end
|
173
|
-
# # end
|
174
|
-
# #
|
175
|
-
# # generator.build_particle(:family)
|
176
|
-
# #
|
177
|
-
# # generator.build_option(:pre_render_family) do |parents_ids|
|
178
|
-
# #
|
179
|
-
# # end
|
180
|
-
# #
|
181
|
-
# # ###### render #####
|
182
|
-
# #
|
183
|
-
# # generator.build_render(:browser_family) do |parents_found|
|
184
|
-
# # parents_found.each do |parent_found|
|
185
|
-
# # BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
186
|
-
# # end
|
187
|
-
# # end
|
188
|
-
# ############################## new attempt
|
189
|
-
# #
|
190
|
-
# # generator.build_sanitizer(:color) do |params|
|
191
|
-
# # parent_found = found_parents_and_renderers[:parent]
|
192
|
-
# # render_found = found_parents_and_renderers[:renderers]
|
193
|
-
# # default_params = { renderers: render_found, id: "color_#{Universe.atomes.length}", type: :color,
|
194
|
-
# # attach: parent_found,children: [],
|
195
|
-
# # red: 0, green: 0, blue: 0, alpha: 1 }
|
196
|
-
# # params = create_color_hash(params) unless params.instance_of? Hash
|
197
|
-
# # new_params = default_params.merge!(params)
|
198
|
-
# # atome[:color] = new_params
|
199
|
-
# # new_params
|
200
|
-
# # end
|
201
|
-
# #
|
202
|
-
# # generator.build_option(:pre_render_parents) do |parents_ids|
|
203
|
-
# # # family(parents_ids)
|
204
|
-
# # end
|
205
|
-
# # generator.build_option(:pre_render_children) do |children_pass|
|
206
|
-
# # # children_pass.each do |child_found|
|
207
|
-
# # # atome_found = grab(child_found)
|
208
|
-
# # # atome_found.parents([@atome[:id]])
|
209
|
-
# # # end
|
210
|
-
# # end
|
211
|
-
# # # render
|
212
|
-
# # generator.build_render(:browser_parent) do |parents_found|
|
213
|
-
# # # parents_found.each do |parent_found|
|
214
|
-
# # # BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
215
|
-
# # # end
|
216
|
-
# # end
|
217
|
-
# #
|
218
|
-
# # generator.build_render(:browser_children) do |parents_found|
|
219
|
-
# # # parents_found.each do |parent_found|
|
220
|
-
# # # BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
221
|
-
# # # end
|
222
|
-
# # end
|
223
|
-
#
|
224
|
-
# ########### #########
|
225
|
-
#
|
226
|
-
# # module BrowserHelper
|
227
|
-
# # def self.browser_document
|
228
|
-
# # # Work because of the patched version of opal-browser(0.39)
|
229
|
-
# # Browser.window
|
230
|
-
# # end
|
231
|
-
# #
|
232
|
-
# # def self.browser_attach_div(parents, html_object, _atome)
|
233
|
-
# # html_object.append_to(browser_document[parents])
|
234
|
-
# # end
|
235
|
-
# #
|
236
|
-
# # def self.browser_attach_style(parents, _html_object, atome)
|
237
|
-
# # browser_document[parents].add_class(atome[:id])
|
238
|
-
# # end
|
239
|
-
# # end
|
240
|
-
#
|
241
|
-
# # generator.build_option(:pre_render_parents) do |parents_ids|
|
242
|
-
# # parents_ids.each do |parents_id|
|
243
|
-
# # if parents_id.instance_of? Atome
|
244
|
-
# # parents_id = parents_id.value
|
245
|
-
# # end
|
246
|
-
# # parents_found = grab(parents_id)
|
247
|
-
# # family(parents_id)
|
248
|
-
# # parents_found.atome[:children] << atome[:id]
|
249
|
-
# # end
|
250
|
-
# # end
|
251
|
-
# #
|
252
|
-
# # generator.build_option(:pre_render_children) do |children_ids|
|
253
|
-
# # children_ids.each do |child_id|
|
254
|
-
# # if child_id.instance_of? Atome
|
255
|
-
# # child_id = child_id.value
|
256
|
-
# # end
|
257
|
-
# # child_found = grab(child_id)
|
258
|
-
# # parents_found=@atome[:id]
|
259
|
-
# # child_found.family(parents_found)
|
260
|
-
# # child_found.atome[:parents] = [parents_found]
|
261
|
-
# # end
|
262
|
-
# # end
|
263
|
-
# #
|
264
|
-
#
|
265
|
-
# # generator.build_particle(:family, { render: true, store: false })
|
266
|
-
# # generator.build_render(:browser_family) do |parents_found|
|
267
|
-
# # BrowserHelper.send("browser_attach_#{@browser_type}", parents_found, @browser_object, @atome)
|
268
|
-
# # end
|
269
|
-
#
|
270
|
-
# # class Universe
|
271
|
-
# # def add_to_atomes(id, atome)
|
272
|
-
# # # instance_variable_get('@atomes').merge!(atome)
|
273
|
-
# # @atomes[id] = atome
|
274
|
-
# # end
|
275
|
-
# #
|
276
|
-
# # def update_atome_id(id, atome, prev_id)
|
277
|
-
# # puts :ok
|
278
|
-
# # @atomes[id] = atome
|
279
|
-
# # @atomes.delete(prev_id)
|
280
|
-
# # end
|
281
|
-
# # end
|
282
|
-
#
|
283
|
-
# # generator.build_sanitizer(:id) do |params|
|
284
|
-
# # if @atome[:id] != params
|
285
|
-
# # Universe.update_atome_id(params, self, @atome[:id])
|
286
|
-
# # else
|
287
|
-
# # Universe.add_to_atomes(params, self)
|
288
|
-
# # end
|
289
|
-
# # params
|
290
|
-
# # end
|
291
|
-
# #
|
292
|
-
# # generator.build_render(:browser_id) do |params|
|
293
|
-
# # browser_object.id = params if @atome[:id] != params
|
294
|
-
# # end
|
295
|
-
#
|
296
|
-
#
|
297
|
-
#
|
298
|
-
# # b = box({ id: :titi })
|
299
|
-
# # c = color(:orange)
|
300
|
-
# # c.id(:tutu)
|
301
|
-
# # b.children([:tutu])
|
302
|
-
#
|
303
|
-
#
|
304
|
-
# # alert b.children
|
305
|
-
# # alert b
|
306
|
-
# # b.circle({id: :toto})
|
307
|
-
# # grab(:box_color).parents([:titi])
|
308
|
-
# # b.children([:box_color])
|
309
|
-
# # alert b
|
310
|
-
#
|
311
|
-
# # generator.build_render(:browser_parents) do |parents_found|
|
312
|
-
# # # p :number_parents
|
313
|
-
# # # parents_found.each do |parent_found|
|
314
|
-
# # # BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
315
|
-
# # # end
|
316
|
-
# # end
|
317
|
-
# #
|
318
|
-
# # generator.build_render(:browser_children) do |children_found|
|
319
|
-
# # # p :number_children
|
320
|
-
# # # children_found.each do |child_found|
|
321
|
-
# # # BrowserHelper.send("browser_attach_#{@browser_type}", child_found, @browser_object, @atome)
|
322
|
-
# # # end
|
323
|
-
# # end
|
324
|
-
#
|
325
|
-
# # b = box({ id: :the_test_box })
|
326
|
-
# # i = 0
|
327
|
-
# # while i < 9
|
328
|
-
# # # puts :ok
|
329
|
-
# # box({ left: i * 30, width: 9 })
|
330
|
-
# # i += 1
|
331
|
-
# # end
|
332
|
-
# # # c = color({red: 0, green: 1, blue: 0.3, alpha: 1, id: :thcol, children: []})
|
333
|
-
# # c = color(:red)
|
334
|
-
# # # alert a
|
335
|
-
# # # wait 1 do
|
336
|
-
# # b.children([c.id])
|
337
|
-
# # # c.parents([b.id])
|
338
|
-
# # # puts "box is :\n#{b}\n\n color is :\n#{c}"
|
339
|
-
# #
|
340
|
-
# # puts '-----'
|
341
|
-
# # puts "familly content #{b.family}"
|
342
|
-
# # # end
|
343
|
-
#
|
344
|
-
# # generator.build_option(:pre_render_parents) do |parents_ids|
|
345
|
-
# # parents_ids.each do |parents_id|
|
346
|
-
# # parents_found = grab(parents_id)
|
347
|
-
# # parents_found.atome[:children]<< id if parents_found
|
348
|
-
# # end
|
349
|
-
# # family({attach: parents_ids, children: [] })
|
350
|
-
# # end
|
351
|
-
# #
|
352
|
-
# #
|
353
|
-
# # #mess below
|
354
|
-
# # generator.build_option(:pre_render_children) do |children_ids|
|
355
|
-
# # children_ids.each do |child_found|
|
356
|
-
# # atome_found = grab(child_found)
|
357
|
-
# # atome_found.atome[:parents]=[@atome[:id]]
|
358
|
-
# # end
|
359
|
-
# # # family({children: children_ids, attach: [] })
|
360
|
-
# # end
|
361
|
-
# #
|
362
|
-
# #
|
363
|
-
# # generator.build_particle(:family)
|
364
|
-
# #
|
365
|
-
# #
|
366
|
-
# # ####################
|
367
|
-
# # generator.build_render(:browser_family) do |params|
|
368
|
-
# # # puts "kool super kool! : #{parents_found} , type : #{@browser_type}, object : #{@browser_object} ,atome : #{@atome}"
|
369
|
-
# # # puts "atome : #{@atome[:id]}, parent : #{parents_found}}"
|
370
|
-
# # # puts "atome : #{@atome} : #{params[:parents]}"
|
371
|
-
# # puts " #{params[:parents]}"
|
372
|
-
# # parents_found=params[:parents]
|
373
|
-
# # children_found=params[:children]
|
374
|
-
# # parents_found.each do |parent_found|
|
375
|
-
# # # atome=
|
376
|
-
# # BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
377
|
-
# # end
|
378
|
-
# #
|
379
|
-
# # children_found.each do |parent_found|
|
380
|
-
# # BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
381
|
-
# # end
|
382
|
-
# #
|
383
|
-
# # end
|
384
|
-
# #
|
385
|
-
# # generator.build_render(:browser_parents) do |parents_found|
|
386
|
-
# # # puts "moinskool super kool! : #{parents_found} "
|
387
|
-
# # # puts "moinskool super kool! : #{parents_found} , type : #{@browser_type}, object : #{@browser_object} ,atome : #{@atome}"
|
388
|
-
# # # parents_found.each do |parent_found|
|
389
|
-
# # # BrowserHelper.send("browser_attach_#{@browser_type}", parent_found, @browser_object, @atome)
|
390
|
-
# # # end
|
391
|
-
# # end
|
392
|
-
#
|
393
|
-
# ###################
|
394
|
-
# # class Atome
|
395
|
-
# #
|
396
|
-
# # def store_value(element)
|
397
|
-
# # params=instance_variable_get("@#{element}")
|
398
|
-
# # @atome[element] = params
|
399
|
-
# # end
|
400
|
-
# #
|
401
|
-
# # def build_particle(particle_name,options,&particle_proc)
|
402
|
-
# # type = options[:type]
|
403
|
-
# # type = :string if options[:type].nil?
|
404
|
-
# # store = options[:store]
|
405
|
-
# # store = true if options[:store].nil?
|
406
|
-
# # render = options[:render]
|
407
|
-
# # render = true if options[:render].nil?
|
408
|
-
# #
|
409
|
-
# # # we add the new method to the particle's collection of methods
|
410
|
-
# # Universe.add_to_particle_list(particle_name, type)
|
411
|
-
# # auto_render_generator(particle_name) if render # automatise the creation of an empty render method for current particle
|
412
|
-
# # new_particle(particle_name,store,render , &particle_proc)
|
413
|
-
# # additional_particle_methods(particle_name, &particle_proc) # create alternative methods such as create 'method='
|
414
|
-
# # end
|
415
|
-
# #
|
416
|
-
# # def additional_particle_methods(element, &method_proc)
|
417
|
-
# # Atome.define_method "#{element}=" do |params = nil, &user_proc|
|
418
|
-
# # instance_exec(params, user_proc, &method_proc) if method_proc.is_a?(Proc)
|
419
|
-
# # end
|
420
|
-
# # end
|
421
|
-
# #
|
422
|
-
# # def new_particle(element,store,render, &method_proc)
|
423
|
-
# # Atome.define_method element do |params = nil, &user_proc|
|
424
|
-
# # if params || params == false
|
425
|
-
# # # the line below execute the proc created when using the build_particle method
|
426
|
-
# # instance_exec(params, user_proc, &method_proc) if method_proc.is_a?(Proc)
|
427
|
-
# # params = sanitize(element, params)
|
428
|
-
# # create_particle(element,store,render)
|
429
|
-
# # send("set_#{element}", params, &user_proc)
|
430
|
-
# # else
|
431
|
-
# # get_particle(element, &user_proc)
|
432
|
-
# # end
|
433
|
-
# # end
|
434
|
-
# # end
|
435
|
-
# # def run_optional_proc(proc_name, atome = self, element, &user_proc)
|
436
|
-
# # params=instance_variable_get("@#{element}")
|
437
|
-
# # option_found = Universe.get_optional_method(proc_name)
|
438
|
-
# # atome.instance_exec(params, user_proc, atome, &option_found) if option_found.is_a?(Proc)
|
439
|
-
# # end
|
440
|
-
# #
|
441
|
-
# # def rendering(element, &user_proc)
|
442
|
-
# # params=instance_variable_get("@#{element}")
|
443
|
-
# # render_engines = @atome[:renderers]
|
444
|
-
# # render_engines.each do |render_engine|
|
445
|
-
# # send("#{render_engine}_#{element}", params, &user_proc)
|
446
|
-
# # end
|
447
|
-
# # end
|
448
|
-
# #
|
449
|
-
# # def broadcasting(element)
|
450
|
-
# # params=instance_variable_get("@#{element}")
|
451
|
-
# # @broadcast.each_value do |particle_monitored|
|
452
|
-
# # if particle_monitored[:particles].include?(element)
|
453
|
-
# # code_found=particle_monitored[:code]
|
454
|
-
# # instance_exec(self, element, params, &code_found) if code_found.is_a?(Proc)
|
455
|
-
# # end
|
456
|
-
# # end
|
457
|
-
# # end
|
458
|
-
# #
|
459
|
-
# # def particle_creation(element, params,store,render, &user_proc)
|
460
|
-
# # return false unless security_pass(element, params)
|
461
|
-
# # # we create a proc holder of any new particle if user pass a bloc
|
462
|
-
# # store_code_bloc(element, &user_proc) if user_proc
|
463
|
-
# # # Params is now an instance variable so it should be passed thru different methods
|
464
|
-
# # instance_variable_set("@#{element}", params)
|
465
|
-
# # run_optional_proc("pre_render_#{@atome[:type]}".to_sym, self, element, &user_proc)
|
466
|
-
# # run_optional_proc("pre_render_#{element}".to_sym, self, element, &user_proc)
|
467
|
-
# # rendering(element, &user_proc) if render
|
468
|
-
# # run_optional_proc("post_render_#{@atome[:type]}".to_sym, self, element, &user_proc)
|
469
|
-
# # run_optional_proc("post_render_#{element}".to_sym, self, element, &user_proc)
|
470
|
-
# # broadcasting(element)
|
471
|
-
# # store_value(element) if store
|
472
|
-
# # self
|
473
|
-
# # end
|
474
|
-
# #
|
475
|
-
# # def create_particle(element,store,render)
|
476
|
-
# # Atome.define_method "set_#{element}" do |params, &user_proc|
|
477
|
-
# # particle_creation(element, params, store,render,&user_proc)
|
478
|
-
# # end
|
479
|
-
# # end
|
480
|
-
# #
|
481
|
-
# # end
|
482
|
-
|
483
|
-
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
m=matrix({ id: :my_table, left: 330, top: 0, width: 500, height: 399, smooth: 8, color: :yellowgreen,
|
4
|
-
cells: {
|
5
|
-
particles: { margin: 9, color: :red, smooth: 9, shadow: { blur: 9, left: 3, top: 3,id: :cell_shadow } }
|
6
|
-
}
|
7
|
-
})
|
8
|
-
|
9
|
-
m.cells do |el|
|
10
|
-
batch(el)
|
11
|
-
batch.color(:white).rotate(22).text(:hello)
|
12
|
-
end
|
13
|
-
|
14
|
-
m.cells(["my_table_2", 9, "my_table_5"]) do |el|
|
15
|
-
batch(el)
|
16
|
-
batch.color(:red).rotate(33)
|
17
|
-
end
|
18
|
-
|
19
|
-
|
20
|
-
mm=matrix
|
21
|
-
#
|
22
|
-
mm.cells do |el|
|
23
|
-
batch(el)
|
24
|
-
batch.color(:yellowgreen).rotate(33)
|
25
|
-
end
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
mm.cells.each do |el|
|
30
|
-
el_found=grab(el)
|
31
|
-
el_found.rotate(22).text(:hello).color(:red)
|
32
|
-
end
|