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
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
new({ renderer: :html, method: :id, type: :string })
|
4
|
+
|
5
|
+
new({ method: :type, type: :string, renderer: :html }) do |_value, _user_proc|
|
6
|
+
html.shape(@id)
|
7
|
+
end
|
8
|
+
|
9
|
+
new({ method: :type, type: :string, renderer: :html, specific: :vector }) do |_value, _user_proc|
|
10
|
+
html.svg(@id)
|
11
|
+
end
|
12
|
+
|
13
|
+
new({ method: :type, type: :string, renderer: :html, specific: :image }) do |_value, _user_proc|
|
14
|
+
html.image(@id)
|
15
|
+
end
|
16
|
+
|
17
|
+
new({ method: :type, type: :string, renderer: :html, specific: :video }) do |_value, _user_proc|
|
18
|
+
html.video(@id)
|
19
|
+
end
|
20
|
+
|
21
|
+
new({ method: :type, type: :string, renderer: :html, specific: :www }) do |_value, _user_proc|
|
22
|
+
html.www(@id)
|
23
|
+
end
|
24
|
+
|
25
|
+
new({ method: :type, type: :string, renderer: :html, specific: :raw }) do |_value, _user_proc|
|
26
|
+
html.raw(@id)
|
27
|
+
end
|
28
|
+
|
29
|
+
new({ method: :type, type: :string, specific: :shape, renderer: :html }) do |_value, _user_proc|
|
30
|
+
html.shape(@id)
|
31
|
+
end
|
32
|
+
|
33
|
+
new({ method: :type, type: :string, specific: :text, renderer: :html }) do |_value, _user_proc|
|
34
|
+
html.text(@id)
|
35
|
+
html.add_class(:text)
|
36
|
+
end
|
37
|
+
|
38
|
+
new({ method: :type, type: :string, specific: :paint, renderer: :html }) do
|
39
|
+
end
|
40
|
+
|
41
|
+
new({ method: :type, type: :string, specific: :color, renderer: :html }) do
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
new({ method: :data, type: :string, specific: :text, renderer: :html }) do |value, _user_proc|
|
46
|
+
html.innerText(value)
|
47
|
+
end
|
48
|
+
|
49
|
+
new({ method: :data, type: :string, specific: :vector, renderer: :html }) do |value|
|
50
|
+
html.svg_data(value)
|
51
|
+
end
|
52
|
+
|
53
|
+
new({ method: :component, type: :hash, specific: :text, renderer: :html }) do |params, _user_proc|
|
54
|
+
params.each do |prop, value|
|
55
|
+
# we send component data directly to the text html renderer
|
56
|
+
send("html_text_#{prop}", value)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
new({ method: :component, type: :hash, specific: :vector, renderer: :html }) do |params, _user_proc|
|
61
|
+
html.update_svg_data(params)
|
62
|
+
end
|
63
|
+
|
64
|
+
new({ method: :path, type: :string, renderer: :html }) do |value, _user_proc|
|
65
|
+
html.path(value)
|
66
|
+
end
|
67
|
+
|
68
|
+
new({ method: :path, type: :string, renderer: :html, specific: :image }) do |value, _user_proc|
|
69
|
+
html.path(value)
|
70
|
+
end
|
71
|
+
|
72
|
+
new({ method: :path, type: :string, renderer: :html, specific: :www }) do |value, _user_proc|
|
73
|
+
html.path(value)
|
74
|
+
end
|
75
|
+
|
76
|
+
new({ method: :data, type: :string, renderer: :html, specific: :raw }) do |value, _user_proc|
|
77
|
+
html.raw_data(value)
|
78
|
+
end
|
79
|
+
|
80
|
+
new({ renderer: :html, method: :category, type: :symbol }) do |category_names|
|
81
|
+
category_names.each do |category_name|
|
82
|
+
html.add_class(category_name)
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# require without relative is needed when using Opal
|
4
|
+
|
5
|
+
require 'renderers/html/atome'
|
6
|
+
require 'renderers/html/atome_html'
|
7
|
+
require 'renderers/html/communication'
|
8
|
+
require 'renderers/html/effect'
|
9
|
+
require 'renderers/html/event'
|
10
|
+
require 'renderers/html/geometry'
|
11
|
+
require 'renderers/html/hierarchy'
|
12
|
+
require 'renderers/html/html'
|
13
|
+
require 'renderers/html/identity'
|
14
|
+
require 'renderers/html/material'
|
15
|
+
require 'renderers/html/property'
|
16
|
+
require 'renderers/html//security'
|
17
|
+
require 'renderers/html/spatial'
|
18
|
+
require 'renderers/html//time'
|
19
|
+
require 'renderers/html/utility'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# relative is needed when using ruby wasm
|
5
|
+
|
6
|
+
require_relative './atome'
|
7
|
+
require_relative './atome_html'
|
8
|
+
require_relative './communication'
|
9
|
+
require_relative './effect'
|
10
|
+
require_relative './event'
|
11
|
+
require_relative './geometry'
|
12
|
+
require_relative './hierarchy'
|
13
|
+
require_relative './html'
|
14
|
+
require_relative './identity'
|
15
|
+
require_relative './material'
|
16
|
+
require_relative './property'
|
17
|
+
require_relative './/security'
|
18
|
+
require_relative './spatial'
|
19
|
+
require_relative './/time'
|
20
|
+
require_relative './utility'
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
new({ method: :overflow, renderer: :html, type: :string }) do |params, bloc|
|
4
|
+
html.overflow(params, bloc)
|
5
|
+
end
|
6
|
+
|
7
|
+
new({ method: :gradient, renderer: :html, type: :hash })
|
8
|
+
|
9
|
+
new({ method: :remove, renderer: :html, type: :string }) do |object_id_to_remove, bloc|
|
10
|
+
|
11
|
+
if object_id_to_remove.instance_of? Hash
|
12
|
+
object_id_to_remove.each do |particle, value|
|
13
|
+
case particle
|
14
|
+
when :category
|
15
|
+
html.remove_class(value)
|
16
|
+
else
|
17
|
+
atome_ids_found = send(object_id_to_remove[:all])
|
18
|
+
atome_ids_found.each do |atome_id|
|
19
|
+
remove(atome_id)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
else
|
24
|
+
atome_to_remove = grab(object_id_to_remove)
|
25
|
+
atome_type_found = atome_to_remove.type
|
26
|
+
case atome_type_found
|
27
|
+
when :color
|
28
|
+
if color == []
|
29
|
+
# we remove the last color set
|
30
|
+
html.style(:backgroundColor, :black)
|
31
|
+
else
|
32
|
+
html.style(:background, '')
|
33
|
+
html.style(:backgroundColor, '')
|
34
|
+
@apply.delete(object_id_to_remove)
|
35
|
+
apply(@apply)
|
36
|
+
end
|
37
|
+
when :shadow
|
38
|
+
html.style("boxShadow", 'none')
|
39
|
+
html.style("filter", 'none')
|
40
|
+
@apply.delete(object_id_to_remove)
|
41
|
+
apply(@apply)
|
42
|
+
when :paint
|
43
|
+
atome_to_remove = grab(object_id_to_remove)
|
44
|
+
atome_to_remove.gradient.each do |color_id|
|
45
|
+
html.style(:background, '')
|
46
|
+
html.style(:backgroundColor, '')
|
47
|
+
@apply.delete(color_id)
|
48
|
+
end
|
49
|
+
@apply.delete(object_id_to_remove)
|
50
|
+
apply(@apply)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
new({ renderer: :html, method: :diffusion, type: :string })
|
4
|
+
|
5
|
+
new({ method: :red, type: :integer, specific: :color, renderer: :html }) do |value, _user_proc|
|
6
|
+
end
|
7
|
+
|
8
|
+
new({ method: :green, type: :integer, specific: :color, renderer: :html }) do |value, _user_proc|
|
9
|
+
end
|
10
|
+
|
11
|
+
new({ method: :blue, type: :integer, specific: :color, renderer: :html }) do |value, _user_proc|
|
12
|
+
end
|
13
|
+
|
14
|
+
new({ method: :alpha, type: :integer, specific: :color, renderer: :html }) do |value, _user_proc|
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
new({ renderer: :html, method: :diffusion, type: :string })
|
19
|
+
|
20
|
+
# edit
|
21
|
+
new({ renderer: :html, method: :edit }) do |params|
|
22
|
+
html.attr(:contenteditable, params)
|
23
|
+
html.update_data(params)
|
24
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
new({ method: :top, type: :integer, renderer: :html }) do |params|
|
4
|
+
html.style(:top, "#{params}px")
|
5
|
+
end
|
6
|
+
|
7
|
+
new({ method: :top, type: :integer, renderer: :html, specific: :text }) do |params|
|
8
|
+
html.style(:top, "#{params}px")
|
9
|
+
end
|
10
|
+
new({ method: :top, type: :integer, renderer: :html, specific: :shadow })
|
11
|
+
|
12
|
+
new({ method: :bottom, type: :integer, renderer: :html }) do |params|
|
13
|
+
html.style(:bottom, "#{params}px")
|
14
|
+
end
|
15
|
+
|
16
|
+
new({ method: :bottom, type: :integer, renderer: :html, specific: :text }) do |params|
|
17
|
+
html.style(:bottom, "#{params}px")
|
18
|
+
end
|
19
|
+
|
20
|
+
new({ method: :right, type: :integer, renderer: :html }) do |params|
|
21
|
+
html.style(:right, "#{params}px")
|
22
|
+
end
|
23
|
+
|
24
|
+
new({ method: :left, type: :integer, renderer: :html }) do |params|
|
25
|
+
html.style(:left, "#{params}px")
|
26
|
+
end
|
27
|
+
|
28
|
+
new({ method: :left, type: :integer, specific: :color, renderer: :html })
|
29
|
+
|
30
|
+
new({ method: :left, type: :integer, renderer: :html, specific: :shadow })
|
31
|
+
|
32
|
+
new({ method: :top, type: :integer, specific: :color, renderer: :html })
|
33
|
+
|
34
|
+
new({ method: :rotate, type: :integer, renderer: :html }) do |params|
|
35
|
+
html.transform(:rotate, params)
|
36
|
+
end
|
37
|
+
|
38
|
+
new({ method: :rotate, type: :integer, renderer: :html, specific: :paint })
|
39
|
+
|
40
|
+
new({renderer: :html, method: :position }) do |params|
|
41
|
+
html.style("position", params)
|
42
|
+
end
|
43
|
+
|
44
|
+
new({renderer: :html, method: :depth }) do |params|
|
45
|
+
html.style("z-index", params)
|
46
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
# frozen_string_literal: true
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
new({ renderer: :html, method: :web }) do |params, &user_proc|
|
4
|
+
params
|
5
|
+
end
|
6
|
+
|
7
|
+
new({ renderer: :html, method: :renderers, type: :string })
|
8
|
+
new({ renderer: :html, method: :delete, type: :string }) do |params|
|
9
|
+
html.delete(id)
|
10
|
+
end
|
11
|
+
new({ renderer: :html, method: :hypertext }) do |params|
|
12
|
+
html.hypertext(params)
|
13
|
+
end
|
14
|
+
new({ renderer: :html, method: :hyperedit }) do |params|
|
15
|
+
html.hyperedit(params)
|
16
|
+
end
|
17
|
+
new({ renderer: :html, method: :read, type: :string }) do |value, &bloc|
|
18
|
+
html.read(id, value)
|
19
|
+
end
|
20
|
+
|
21
|
+
new({ renderer: :html, method: :browse, type: :string }) do |value, &bloc|
|
22
|
+
html.browse(id, value)
|
23
|
+
end
|
24
|
+
|
25
|
+
new({ renderer: :html, method: :terminal, type: :string }) do |value, &bloc|
|
26
|
+
html.terminal(id, value)
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
new({renderer: :html, method: :match}) do |params, bloc|
|
31
|
+
case id
|
32
|
+
when :atome || :view
|
33
|
+
result = bloc.call
|
34
|
+
result = { alterations: result }
|
35
|
+
params = params.merge(result)
|
36
|
+
html.match(params)
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Rendering method here
|
4
|
+
class Atome
|
5
|
+
# private
|
6
|
+
|
7
|
+
def render(element, params, &user_proc)
|
8
|
+
|
9
|
+
render_engines = @renderers
|
10
|
+
render_engines.each do |render_engine|
|
11
|
+
# in case we found an exception the method call will have the form, example for color top : html_color_top
|
12
|
+
exception_found = "#{Universe.get_atomes_specificities[type][element]}"
|
13
|
+
send("#{render_engine}_#{exception_found}#{element}", params, &user_proc)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/sig/atome.rbs
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
module Atome
|
2
2
|
VERSION: String
|
3
3
|
# See the writing guide of rbs: https://github.com/ruby/rbs#guides
|
4
|
+
@store_allow: boolish
|
5
|
+
|
4
6
|
def *: -> untyped
|
5
7
|
|
6
8
|
def +: -> untyped
|
@@ -51,8 +53,12 @@ module Atome
|
|
51
53
|
|
52
54
|
def get_row: -> untyped
|
53
55
|
|
56
|
+
def headless: -> untyped
|
57
|
+
|
54
58
|
def matrix: -> untyped
|
55
59
|
|
60
|
+
def physical: -> untyped
|
61
|
+
|
56
62
|
def ping: -> untyped
|
57
63
|
|
58
64
|
def set: -> untyped
|
data/sig/object.rbs
CHANGED
data/sig/universe.rbs
ADDED
data/vendor/assets/Rakefile
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
task :build do
|
2
|
-
|
3
|
-
end
|
1
|
+
# task :build do
|
2
|
+
# `atome build`
|
3
|
+
# end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Chemin du dossier contenant les fichiers
|
2
|
+
folder_path = "./*"
|
3
|
+
|
4
|
+
# Chemin du fichier de sortie
|
5
|
+
output_file_path = "./!all.rb"
|
6
|
+
|
7
|
+
# Création et ouverture du fichier de sortie
|
8
|
+
File.open(output_file_path, "w") do |output_file|
|
9
|
+
# Lecture de tous les fichiers du dossier
|
10
|
+
Dir.glob(folder_path).each do |file_path|
|
11
|
+
# Lecture et écriture du contenu de chaque fichier
|
12
|
+
File.read(file_path).each_line do |line|
|
13
|
+
output_file.write(line)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# # frozen_string_literal: true
|
2
|
+
#
|
3
|
+
# bb = text({ id: :the_ref, width: 369, data: "touch me!" })
|
4
|
+
# bb.color(:orange)
|
5
|
+
# box({ id: :my_box, drag: true })
|
6
|
+
# c = circle({ id: :the_circle, left: 222, drag: { move: true, inertia: true, lock: :start } })
|
7
|
+
# c.shadow({ renderers: [:html], id: :shadow2, type: :shadow,
|
8
|
+
# attach: [:the_circle],
|
9
|
+
# left: 3, top: 9, blur: 19,
|
10
|
+
# red: 0, green: 0, blue: 0, alpha: 1
|
11
|
+
# })
|
12
|
+
#
|
13
|
+
# Atome.new(animation: { renderers: [:browser], id: :the_animation1, type: :animation, attach: [],attached: []})
|
14
|
+
# aa = animation({
|
15
|
+
# targets: %i[my_box the_circle],
|
16
|
+
# begin: {
|
17
|
+
# left_add: 0,
|
18
|
+
# top: :self,
|
19
|
+
# smooth: 0,
|
20
|
+
# width: 3
|
21
|
+
# },
|
22
|
+
# end: {
|
23
|
+
# left_add: 333,
|
24
|
+
# top: 299,
|
25
|
+
# smooth: 33,
|
26
|
+
# width: :the_ref
|
27
|
+
# },
|
28
|
+
# duration: 800,
|
29
|
+
# mass: 1,
|
30
|
+
# damping: 1,
|
31
|
+
# stiffness: 1000,
|
32
|
+
# velocity: 1,
|
33
|
+
# repeat: 1,
|
34
|
+
# ease: 'spring'
|
35
|
+
# }) do |pa|
|
36
|
+
# puts "animation say#{pa}"
|
37
|
+
# end
|
38
|
+
# aa.stop(true) do |val|
|
39
|
+
# puts " stop : #{val}"
|
40
|
+
# end
|
41
|
+
#
|
42
|
+
# aa.start(true) do |val|
|
43
|
+
# puts " start : #{val}"
|
44
|
+
# end
|
45
|
+
#
|
46
|
+
# bb.touch(true) do
|
47
|
+
# aa.play(true) do |po|
|
48
|
+
# puts "play say #{po}"
|
49
|
+
# end
|
50
|
+
# end
|
51
|
+
#
|
52
|
+
# aaa = animation({
|
53
|
+
# # no target for advanced animations control on callback
|
54
|
+
# begin: {
|
55
|
+
# left_add: 0,
|
56
|
+
# top: :self,
|
57
|
+
# smooth: 0,
|
58
|
+
# width: 3
|
59
|
+
# },
|
60
|
+
# end: {
|
61
|
+
# left_add: 333,
|
62
|
+
# top: :self,
|
63
|
+
# smooth: 33,
|
64
|
+
# width: :the_ref
|
65
|
+
# },
|
66
|
+
# duration: 1800,
|
67
|
+
# mass: 1,
|
68
|
+
# damping: 1,
|
69
|
+
# stiffness: 1000,
|
70
|
+
# velocity: 1,
|
71
|
+
# repeat: 1,
|
72
|
+
# ease: 'spring'
|
73
|
+
# }) do |pa|
|
74
|
+
# puts "get params to do anything say#{pa}"
|
75
|
+
# end
|
76
|
+
# wait 7 do
|
77
|
+
# aaa.play(true) do |po|
|
78
|
+
# puts "play aaa say #{po}"
|
79
|
+
# end
|
80
|
+
# end
|
81
|
+
|
82
|
+
#TODO : make the code above works
|
83
|
+
# create a animation object
|
84
|
+
# create callback methode when playing
|
85
|
+
|
86
|
+
|
87
|
+
# here is how to animate shape :
|
88
|
+
new({particle: :animate}) do |params|
|
89
|
+
html.play_animation({ from: 0, to: 300, duration: 1000 })
|
90
|
+
end
|
91
|
+
|
92
|
+
|
93
|
+
b=box({id: :the_box})
|
94
|
+
|
95
|
+
b.animate(true)
|
96
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Here is the attach explanation and example
|
4
|
+
# the attach method in atome is both a getter and a setter
|
5
|
+
# attach and attached particles serve the same purpose but just in the opposite direction
|
6
|
+
# please note that atome.attach([:atome_id]) means that atome will be the parent of the atome with the id :atome_id
|
7
|
+
# to sum up : attach and attached are both setter and getter :
|
8
|
+
# a.attach(b.ib) will attach the current object to the IDs passed in the params. The current atome will be the child of the the atomes width IDS passed in the the params,
|
9
|
+
# a.attach(b.ib) means (insert 'o' into 'b') or a is parent b is child
|
10
|
+
|
11
|
+
# while a.attached(b.id) (insert 'b' into 'a')is the opposite to attached it will attach IDs passed in the params to the current atome. The current atome will be the parent of of the the atomes width IDS passed in the the params
|
12
|
+
# a.attached(b.ib) means (insert 'b' into 'a') or a is child b is parent
|
13
|
+
|
14
|
+
# atome.attach([:atome_id]) means that atome will be the child of the atome with the id :atome_id
|
15
|
+
# Here is how to use it as a setter :
|
16
|
+
b = box({ id: :b315, color: :red })
|
17
|
+
circle({ id: :c_12, top: 0, drag: true, color: :yellow })
|
18
|
+
|
19
|
+
c=circle({ id: :c_123, color: :cyan, left: 233, drag: true })
|
20
|
+
box({ id: :b_1, left: 333, drag: true })
|
21
|
+
grab(:b_1).attach(:c_123)
|
22
|
+
|
23
|
+
bb = box({ top: 99, drag: true })
|
24
|
+
bb.attach(:b_1)
|
25
|
+
|
26
|
+
box({ id: :my_test_box })
|
27
|
+
wait 1 do
|
28
|
+
b.attach(:c_12)
|
29
|
+
# Here is how to use it as a getter :
|
30
|
+
# to retrieve witch atomes b315 is attached to to the atome c_12 just type
|
31
|
+
puts b.attach # => [:c_12]
|
32
|
+
# to retrieve atome attached to the atome c_12 just type tha other method
|
33
|
+
puts c.attached #=> [:b_1]
|
34
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
|
4
|
+
# Here is the attached explanation and example :
|
5
|
+
|
6
|
+
# the attached method in atome is both a getter and a setter
|
7
|
+
# attach and attached particles serve the same purpose but just in the opposite direction
|
8
|
+
# please note that atome.attach([:atome_id]) means that atome will be the parent of the atome with the id :atome_id
|
9
|
+
# to sum up : attach and attached are both setter and getter :
|
10
|
+
# attach will attach the current object to the IDs passed in the params. The current atome will be the child of the the atomes width IDS passed in the the params,
|
11
|
+
# while attached is the opposite to attached it will attach IDs passed in the params to the current atome. The current atome will be the parent of of the the atomes width IDS passed in the the params
|
12
|
+
|
13
|
+
|
14
|
+
# Here is how to use it as a setter :
|
15
|
+
grab(:black_matter).color({ red: 1, green: 0.6, blue: 0.6, id: :active_color })
|
16
|
+
grab(:black_matter).color({ red: 0.3, green: 1, blue: 0.3, id: :inactive_color })
|
17
|
+
|
18
|
+
b = box({ left: 99, drag: true, id: :the_box })
|
19
|
+
wait 1 do
|
20
|
+
b.apply([:active_color])
|
21
|
+
end
|
22
|
+
c = circle({ left: 333, id: :the_circle })
|
23
|
+
wait 2 do
|
24
|
+
c.apply(:inactive_color)
|
25
|
+
b.attached([c.id])
|
26
|
+
|
27
|
+
# Here is how to use it as a getter :
|
28
|
+
# to retrieve witch atomes b315 is attached to to the atome c_12 just type
|
29
|
+
puts "c.attach#{c.attach}" # => [:the_box]
|
30
|
+
# to retrieve atome attached to the atome c_12 just type tha other method
|
31
|
+
puts "b.attached : #{b.attached}" #=> [:the_circle]
|
32
|
+
puts "b.color : #{b.color}"
|
33
|
+
puts "c.color : #{c.color}"
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The class Universe is used to retrieve some data needed for the atome framework
|
4
|
+
# per example you can retrieve the list of all available particles
|
5
|
+
puts Universe.particle_list
|
6
|
+
# this give at the date 14/11/2023 :
|
7
|
+
# or the list of all available atomes
|
8
|
+
puts Universe.atomes
|
9
|
+
# this give at the date 14/11/2023 :
|
10
|
+
# as well as the list of renderer available
|
11
|
+
puts Universe.renderer_list
|
12
|
+
# this give at the date 14/11/2023 :
|
13
|
+
|
14
|
+
# Universe hold all these instance variable :
|
15
|
+
|
16
|
+
# @counter is a integer that store the total number of atome actually active for the current user on the current machine
|
17
|
+
# @atomes = is a hash that contains a list all atomes actually active for the current user on the current machine,
|
18
|
+
# the key is the atome ID the value is the atome object itself
|
19
|
+
# atomes_specificities
|
20
|
+
# @atome_list is a hash that contains all atome's types available
|
21
|
+
# @particle_list is a hash that contains all particle's types available
|
22
|
+
# @renderer_list is an array that contains all renderers available
|
23
|
+
# @specificities indicate to the atome framework witch atomes or particles have specificities, as all atomes and particles methods are define using lot of meta-programming, some atome and particle need special treatment, then we use specificities
|
24
|
+
# @specificities is a hash where the key is either the atome type or the particle type and the value is a proc that hold the code to be executed when the specified atome is instantiated or the particle is applied onto the atome
|
25
|
+
# @sanitizers is a hash where the key is either the atome type or the particle type and the value is a proc holding the code to sanitize user input value before it's the value is interpreted , rendered and stored
|
26
|
+
# @history is a hash that store the history of all modification of any atome's particle that happen on the current machine for current user.
|
27
|
+
# the history hash is define as follow: the key is number of the operation ( 0 is the first modification, 1 the second , and so on... )
|
28
|
+
# that value of the history hash contain also another hash define as follow: the key is the id of the atome altered and the value is again a new hash with three keys :
|
29
|
+
# on of the three keys is sync , the sync value hold the sync state of the alteration (sync true means that the alteration is stored and backup on a server), another keys is time, its value hold the time stamp of the alteration
|
30
|
+
# the third key is the particle altered and value is the new value of the particle
|
31
|
+
# @users = is a hash that contains all user session on the current machine
|
32
|
+
|
33
|
+
# basic usage:
|
34
|
+
# # we create a basic empty atome
|
35
|
+
a=Atome.new
|
36
|
+
# we add a bunch particles
|
37
|
+
a.renderers([:html])
|
38
|
+
a.id(:my_shape)
|
39
|
+
a.type(:shape)
|
40
|
+
a.width(33)
|
41
|
+
a.height(33)
|
42
|
+
a.top(33)
|
43
|
+
a.left(33)
|
44
|
+
# we can now add a color the atome using apply used to apply an atome onto another (please note that color is also an atome not a particle)
|
45
|
+
# in this case we apply the color atome name box_color this a default color created by the system
|
46
|
+
a.apply([:box_color])
|
47
|
+
wait 2 do
|
48
|
+
# a bit less efficient and a bit more processor intensive solution is to use the box preset, that render a box too
|
49
|
+
b=box
|
50
|
+
# we can add a color atome onto the new atome my_shape. as stated before for some atome types such as color, shadows ,the relation between the two atomes won't be attach and attached but apply and affect instead the atome color with the particle red onto the
|
51
|
+
b.color(:red)
|
52
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
|
4
|
+
# browse only works with application version of atome or using server mode , it allow the browse local file on your computer or remote file on server, if operating in server mode
|
5
|
+
|
6
|
+
# here is an example :
|
7
|
+
A.browse('/') do |data|
|
8
|
+
text "folder content :\n #{data}"
|
9
|
+
end
|
10
|
+
|
11
|
+
# if Atome.host == 'tauri'
|
12
|
+
# # JS.eval("readFile('atome','Cargo.toml')")
|
13
|
+
# JS.eval("browseFile('atome','/')")
|
14
|
+
# else
|
15
|
+
# puts 'nothing here'
|
16
|
+
# # JS.eval("terminal('A.terminal_callback','pwd')")
|
17
|
+
# end
|