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,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# new({ particle: :duplicate, store: false }) do |params|
|
4
|
+
# if @duplicate
|
5
|
+
# copy_number = @duplicate.length
|
6
|
+
# else
|
7
|
+
# copy_number = 0
|
8
|
+
# end
|
9
|
+
#
|
10
|
+
# new_atome_id = "#{@id}_copy_#{copy_number}"
|
11
|
+
# new_atome = Atome.new({ type: @type, renderers: @renderers, id: new_atome_id })
|
12
|
+
#
|
13
|
+
# attached_atomes = []
|
14
|
+
# attached_found = attached.dup
|
15
|
+
# particles_found = instance_variables.dup
|
16
|
+
#
|
17
|
+
# particles_found.delete(:@history)
|
18
|
+
# particles_found.delete(:@callback)
|
19
|
+
# particles_found.delete(:@duplicate)
|
20
|
+
# particles_found.delete(:@touch_code)
|
21
|
+
# # touch_code=instance_variable_get('@touch_code')
|
22
|
+
# particles_found.delete(:@html)
|
23
|
+
# particles_found.delete(:@attached)
|
24
|
+
# particles_found.delete(:@id)
|
25
|
+
# params[:id] = new_atome_id
|
26
|
+
# attached_found.each do |child_id_found|
|
27
|
+
# child_found = grab(child_id_found)
|
28
|
+
# if child_found
|
29
|
+
# new_child = child_found.duplicate({})
|
30
|
+
# attached_atomes << new_child.id
|
31
|
+
# end
|
32
|
+
# end
|
33
|
+
# particles_found.each do |particle_found|
|
34
|
+
# particle_name = particle_found.to_s.sub('@', '')
|
35
|
+
# particle_content = self.send(particle_name)
|
36
|
+
# new_atome.set(particle_name => particle_content)
|
37
|
+
# # new_atome.instance_variable_set('@touch_code',touch_code)
|
38
|
+
# end
|
39
|
+
# params[:attached] = attached_atomes
|
40
|
+
#
|
41
|
+
# if params.instance_of? Hash
|
42
|
+
# params.each do |k, v|
|
43
|
+
# new_atome.send(k, v)
|
44
|
+
# end
|
45
|
+
# end
|
46
|
+
#
|
47
|
+
# @duplicate ||= {}
|
48
|
+
# @duplicate[new_atome_id] = new_atome
|
49
|
+
# new_atome
|
50
|
+
# end
|
51
|
+
#
|
52
|
+
# new({ after: :duplicate }) do |params|
|
53
|
+
# @duplicate[@duplicate.keys[@duplicate.keys.length - 1]]
|
54
|
+
# end
|
55
|
+
|
56
|
+
b = circle({ id: :the_cirlce })
|
57
|
+
b.text(:hello)
|
58
|
+
bb = b.duplicate({ width: 33, left: 234, top: 222 })
|
59
|
+
bb.color(:red)
|
60
|
+
bb2 = b.duplicate({ width: 33, left: 12 })
|
61
|
+
bb3 = b.duplicate({ width: 33, left: 444 })
|
62
|
+
bb3.color(:green)
|
63
|
+
bb2.color(:orange)
|
64
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
t = text :hello
|
4
|
+
t.left(99)
|
5
|
+
|
6
|
+
t.edit(true)
|
7
|
+
|
8
|
+
b=box
|
9
|
+
b.touch(true) do
|
10
|
+
puts t.data
|
11
|
+
end
|
12
|
+
# # frozen_string_literal: true
|
13
|
+
#
|
14
|
+
# c = circle({ id: :the_circle, left: 122, color: :orange, drag: { move: true, inertia: true, lock: :start } })
|
15
|
+
# col = c.color({ id: :col1, red: 1, blue: 1 })
|
16
|
+
# wait 2 do
|
17
|
+
# col.red(0.6)
|
18
|
+
# wait 2 do
|
19
|
+
# col.red(0) # Appel en écriture
|
20
|
+
# end
|
21
|
+
# end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# support=box({top: 250, left: 12, width: 300, height: 40, smooth: 9, color:{red: 0.3, green: 0.3, blue: 0.3}, id: :support })
|
4
|
+
#
|
5
|
+
# support.shadow({
|
6
|
+
# id: :s3,
|
7
|
+
# left: 3, top: 3, blur: 9,
|
8
|
+
# invert: true,
|
9
|
+
# red: 0, green: 0, blue: 0, alpha: 0.7
|
10
|
+
# })
|
11
|
+
def create_file_browser
|
12
|
+
div_element = JS.global[:document].createElement("div")
|
13
|
+
|
14
|
+
# Définir les propriétés CSS de l'élément div
|
15
|
+
div_element[:style][:width] = "33px" # Taille: largeur de 100 pixels
|
16
|
+
div_element[:style][:height] = "33px" # Taille: hauteur de 100 pixels
|
17
|
+
div_element[:style][:backgroundColor] = "rgba(255,0,0,0.3)" # Couleur de fond rouge
|
18
|
+
div_element[:style][:position] = "absolute" # Positionnement absolu
|
19
|
+
div_element[:style][:top] = "0px" # Position par rapport au haut de l'écran
|
20
|
+
div_element[:style][:left] = "0px" # Position par rapport à la gauche de l'écran
|
21
|
+
|
22
|
+
# Définir un ID pour l'élément div
|
23
|
+
div_element[:id] = "monDiv"
|
24
|
+
|
25
|
+
input_element = JS.global[:document].createElement("input")
|
26
|
+
input_element[:type] = "file"
|
27
|
+
input_element[:style][:position] = "absolute"
|
28
|
+
input_element[:style][:display] = "none"
|
29
|
+
input_element[:style][:width] = "0px"
|
30
|
+
input_element[:style][:height] = "0px"
|
31
|
+
input_element.addEventListener("change") do |native_event|
|
32
|
+
event = Native(native_event)
|
33
|
+
file = event[:target][:files][0]
|
34
|
+
if file
|
35
|
+
puts "file requested: #{file[:name]}"
|
36
|
+
# support.controller({ action: :loadProject, params: { path: file[:name]} })
|
37
|
+
end
|
38
|
+
end
|
39
|
+
div_element.addEventListener("mousedown") do |event|
|
40
|
+
# Déclenchez manuellement un clic sur l'input
|
41
|
+
input_element.click
|
42
|
+
end
|
43
|
+
view_div = JS.global[:document].querySelector("#view")
|
44
|
+
|
45
|
+
view_div.appendChild(input_element)
|
46
|
+
view_div.appendChild(div_element)
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
create_file_browser
|
@@ -0,0 +1,157 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
new({ particle: :find }) do |params|
|
4
|
+
puts params
|
5
|
+
|
6
|
+
end
|
7
|
+
|
8
|
+
b = box
|
9
|
+
# alert 'use category top assign class then port hybrid.html to atom'
|
10
|
+
16.times do |index|
|
11
|
+
width_found = b.width
|
12
|
+
b.duplicate({ left: b.left + index * (width_found + 45), top: 0, category: :matrix })
|
13
|
+
end
|
14
|
+
|
15
|
+
def calculate_dynamic_value(particle)
|
16
|
+
500
|
17
|
+
end
|
18
|
+
|
19
|
+
b.find(
|
20
|
+
condition: [{
|
21
|
+
operator: :and,
|
22
|
+
rules: [
|
23
|
+
{
|
24
|
+
property: :left,
|
25
|
+
comparison: :gt,
|
26
|
+
value: { type: :dynamic, content:[22] }
|
27
|
+
},
|
28
|
+
{
|
29
|
+
operator: :or,
|
30
|
+
rules: [
|
31
|
+
{
|
32
|
+
property: :width,
|
33
|
+
comparison: :eq,
|
34
|
+
value: { type: :static, content: 50 }
|
35
|
+
},
|
36
|
+
{
|
37
|
+
property: :width,
|
38
|
+
comparison: :eq,
|
39
|
+
value: { type: :static, content: 100 }
|
40
|
+
}
|
41
|
+
],
|
42
|
+
pre_validate: true
|
43
|
+
},
|
44
|
+
|
45
|
+
]
|
46
|
+
},
|
47
|
+
{
|
48
|
+
operator: :or,
|
49
|
+
rules: [
|
50
|
+
{
|
51
|
+
property: :rotate,
|
52
|
+
comparison: :gt,
|
53
|
+
value: { type: :static, content: 20 }
|
54
|
+
}
|
55
|
+
]
|
56
|
+
}]
|
57
|
+
) do
|
58
|
+
alert 'items found'
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
Universe.user_atomes.each do |atome_id|
|
63
|
+
atome_found = grab(atome_id)
|
64
|
+
if atome_found.type == :shape
|
65
|
+
atome_found.color(:orange)
|
66
|
+
atome_found.smooth(200)
|
67
|
+
atome_found.top(200)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
#
|
71
|
+
random_found =Universe.user_atomes.sample(7)
|
72
|
+
random_found.each do |atome_id|
|
73
|
+
atome_found = grab(atome_id)
|
74
|
+
if atome_found.type == :shape
|
75
|
+
atome_found.top(rand(600))
|
76
|
+
atome_found.width(rand(120))
|
77
|
+
atome_found.height(rand(120))
|
78
|
+
atome_found.smooth(rand(120))
|
79
|
+
atome_found.color(:red)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
random_found =Universe.user_atomes.sample(9)
|
84
|
+
random_found.each do |atome_id|
|
85
|
+
atome_found = grab(atome_id)
|
86
|
+
if atome_found.type == :shape
|
87
|
+
atome_found.left(rand(700))
|
88
|
+
atome_found.width(rand(120))
|
89
|
+
atome_found.height(rand(120))
|
90
|
+
atome_found.smooth(rand(120))
|
91
|
+
atome_found.color(:blue)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
# List of Comparison Operators
|
96
|
+
# :eq (Equal To)
|
97
|
+
# Description: Checks if the value is equal to the specified value.
|
98
|
+
# Usage: { comparison_operator: :eq, value: 100 } would match if the property's value is exactly 100.
|
99
|
+
# :gt (Greater Than)
|
100
|
+
# Description: Checks if the value is greater than the specified value.
|
101
|
+
# Usage: { comparison_operator: :gt, value: 30 } would match if the property's value is greater than 30.
|
102
|
+
# :lt (Less Than)
|
103
|
+
# Description: Checks if the value is less than the specified value.
|
104
|
+
# Usage: { comparison_operator: :lt, value: 50 } would match if the property's value is less than 50.
|
105
|
+
# :gte (Greater Than or Equal To)
|
106
|
+
# Description: Checks if the value is greater than or equal to the specified value.
|
107
|
+
# Usage: { comparison_operator: :gte, value: 20 } would match if the property's value is 20 or more.
|
108
|
+
# :lte (Less Than or Equal To)
|
109
|
+
# Description: Checks if the value is less than or equal to the specified value.
|
110
|
+
# Usage: { comparison_operator: :lte, value: 60 } would match if the property's value is 60 or less.
|
111
|
+
# :neq (Not Equal To)
|
112
|
+
# Description: Checks if the value is not equal to the specified value.
|
113
|
+
# Usage: { comparison_operator: :neq, value: 45 } would match if the property's value is anything other than 45.
|
114
|
+
# :in (In a Set Of)
|
115
|
+
# Description: Checks if the value is within a specified set of values.
|
116
|
+
# Usage: { comparison_operator: :in, value: [1, 2, 3] } would match if the property's value is either 1, 2, or 3.
|
117
|
+
# :nin (Not in a Set Of)
|
118
|
+
# Description: Checks if the value is not within a specified set of values.
|
119
|
+
# Usage: { comparison_operator: :nin, value: [10, 20, 30] } would match if the property's value is anything other than 10, 20, or 30.
|
120
|
+
|
121
|
+
# example :
|
122
|
+
|
123
|
+
# b.find(
|
124
|
+
# condition: {
|
125
|
+
# operator: :and,
|
126
|
+
# rules: [
|
127
|
+
# {
|
128
|
+
# property: :left,
|
129
|
+
# comparison: :gt,
|
130
|
+
# value: { type: :dynamic, content: -> { calculate_dynamic_value('left') }, cache: true }
|
131
|
+
# },
|
132
|
+
# {
|
133
|
+
# operator: :or,
|
134
|
+
# rules: [
|
135
|
+
# {
|
136
|
+
# property: :width,
|
137
|
+
# comparison: :eq,
|
138
|
+
# value: { type: :static, content: 50 }
|
139
|
+
# },
|
140
|
+
# {
|
141
|
+
# operator: :and,
|
142
|
+
# rules: [
|
143
|
+
# {
|
144
|
+
# property: :width,
|
145
|
+
# comparison: :eq,
|
146
|
+
# value: { type: :static, content: 100 }
|
147
|
+
# },
|
148
|
+
# # ...
|
149
|
+
# ]
|
150
|
+
# }
|
151
|
+
# ],
|
152
|
+
# pre_validate: true
|
153
|
+
# },
|
154
|
+
# # ...
|
155
|
+
# ]
|
156
|
+
# }
|
157
|
+
# )
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
gen = generator({ id: :genesis, build: {top: 66, copies: 1} })
|
4
|
+
gen.build({ id: :bundler, copies: 32, color: :red, width: 33, height: 44, left: 123, smooth: 9, blur: 3, attach: [:view] })
|
5
|
+
grab(:bundler_1).color(:blue)
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
# Atome.new(
|
10
|
+
# { renderers: [:html], id: :atomix, type: :element, tag: { system: true }, attach: [], attached: [] }
|
11
|
+
# )
|
12
|
+
#
|
13
|
+
#
|
14
|
+
# {:id=>:eDen, :type=>:element, :renderers=>[], :tag=>{:system=>true}, :attach=>[], :attached=>[]}
|
15
|
+
# {:renderers=>[], :id=>:eDen, :type=>:element, :tag=>{:system=>true}, :attach=>[], :attached=>[]}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
the_text = text({ data: 'hello for al the people in front of their machine jhgj jg jgh jhg iuuy res ', center: true, top: 120, width: 77, component: { size: 11 } })
|
4
|
+
the_box = box({ left: 12 })
|
5
|
+
the_circle = circle({ id: :cc, color: :orange })
|
6
|
+
the_circle.image('red_planet')
|
7
|
+
the_circle.color('red')
|
8
|
+
the_circle.box({ left: 333, id: :the_c })
|
9
|
+
|
10
|
+
element({ id: :the_element })
|
11
|
+
the_view = grab(:view)
|
12
|
+
puts "views_shape's shape are : #{the_view.shape}"
|
13
|
+
puts "the_circle color is : #{the_circle.color}"
|
14
|
+
puts "the_text data is : #{the_text.data}"
|
15
|
+
puts "the_box left is : #{the_box.left}"
|
16
|
+
puts "the_circle particles are : #{the_circle.particles}"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# the grab method is used to retrieve atome using their ID
|
4
|
+
a = box({ id: :my_box })
|
5
|
+
|
6
|
+
# to alter or add a particle you can use the variable, here we set the left value
|
7
|
+
a.left(33)
|
8
|
+
|
9
|
+
# to alter or add a particle you can use the variable
|
10
|
+
# it's also possible to alter or add a particle without a variable using grab and the ID of the atome , here we set the top value
|
11
|
+
|
12
|
+
wait 1 do
|
13
|
+
grab(:my_box).top(5)
|
14
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
circ = circle({ drag: true })
|
4
|
+
circ.remove({ all: :color })
|
5
|
+
col_1 = circ.color(:white)
|
6
|
+
col_2 = circ.color({ red: 1, id: :red_col })
|
7
|
+
col_4 = circ.color({ blue: 1, id: :red_col2, alpha: 0.3 })
|
8
|
+
col_5 = circ.color({ red: 0, green: 1, id: :red_col3, alpha: 0.7 })
|
9
|
+
col_3 = circ.color(:yellow)
|
10
|
+
wait 0.5 do
|
11
|
+
circ.paint({ gradient: [col_1.id, col_2.id], direction: :left })
|
12
|
+
wait 0.5 do
|
13
|
+
circ.paint({ id: :the_painter, rotate: 69, gradient: [col_1.id, col_2.id] })
|
14
|
+
wait 0.5 do
|
15
|
+
circ.color(:cyan)
|
16
|
+
circ.paint({ gradient: [col_1.id, col_2.id, col_3.id], rotate: 33, diffusion: :conic })
|
17
|
+
wait 0.5 do
|
18
|
+
painter = circ.paint({ id: :the_painter2, gradient: [col_1.id, col_2.id, col_3.id], direction: :left })
|
19
|
+
wait 0.5 do
|
20
|
+
circ.color(:blue)
|
21
|
+
circ.paint({ gradient: [col_4.id, col_5.id], diffusion: :conic })
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
the_text = text({ data: 'hello for al the people in front of their machine', center: true, top: 222, width: 777, component: { size: 66 } })
|
30
|
+
|
31
|
+
the_text.left(333)
|
32
|
+
|
33
|
+
the_text.paint({ gradient: [col_1.id, col_2.id], direction: :left , id: :painted_love })
|
34
|
+
|
35
|
+
# #TODO : gradient on text!
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
text({ id: :the_text,data: 'Touch me to group and colorize', center: true, top: 120, width: 77, component: { size: 11 } })
|
4
|
+
box({ left: 12, id: :the_first_box })
|
5
|
+
the_circle = circle({ id: :cc, color: :yellowgreen, top: 222 })
|
6
|
+
the_circle.image({path: 'medias/images/red_planet.png', id: :the__red_planet })
|
7
|
+
the_circle.color('red')
|
8
|
+
the_circle.box({ left: 333, id: :the_c })
|
9
|
+
|
10
|
+
element({ id: :the_element })
|
11
|
+
|
12
|
+
the_view = grab(:view)
|
13
|
+
|
14
|
+
color({ id: :the_orange, red: 1, green: 0.4 })
|
15
|
+
color({ id: :the_lemon, red: 1, green: 1 })
|
16
|
+
the_group = group({ collect: the_view.shape })
|
17
|
+
|
18
|
+
wait 0.5 do
|
19
|
+
the_group.left(633)
|
20
|
+
wait 0.5 do
|
21
|
+
the_group.rotate(23)
|
22
|
+
wait 0.5 do
|
23
|
+
the_group.apply([:the_orange])
|
24
|
+
the_group.blur(6)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
puts the_group.collect
|
29
|
+
grab(:the_first_box).smooth(9)
|
30
|
+
grab(:the_text).touch(true) do
|
31
|
+
bibi=box({left: 555})
|
32
|
+
the_group2= group({ collect: [:the_c,:the_first_box, :the_text, :cc , bibi.id] })
|
33
|
+
the_group2.top(55)
|
34
|
+
# puts we remove the circle(:cc) so it' wont be affected by the color :the_lemon
|
35
|
+
the_group2.collect.delete( :cc )
|
36
|
+
the_group2.apply([:the_lemon])
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
# # # FIXME : on touch code above crash but works with wait
|
43
|
+
|
44
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# here is how to setup a hierarchy within atome using a more simple way than attached and attach .simply adding atome inside another atome. here is a example to do to so : b = box({ id: :the_box })
|
4
|
+
b=box
|
5
|
+
# the line below will create a circle inside the box b
|
6
|
+
c = b.circle({ id: :the_circle })
|
7
|
+
# we can add any atome inside another atome, below we add a text inside de th box b
|
8
|
+
t = b.text({ data: :hello, left: 200, id: :the_cirle })
|
9
|
+
# theres no limit in the depht of atome, we can create an image inside the text, exemple:
|
10
|
+
t.image({ path: 'medias/images/logos/atome.svg', width: 33 })
|
11
|
+
|
12
|
+
# note that creating a hierarchy this way automatically
|
13
|
+
|
14
|
+
# Note that when you create a hierarchy in this way, it automatically creates a relationship by populating the 'attach' and 'attached' properties. So, if you enter:
|
15
|
+
|
16
|
+
|
17
|
+
puts "b attach : #{b.attach}" # prints [:view] in the console as it is attached to the view atom
|
18
|
+
puts "b attached :#{b.attached}" # prints [:the_circle, :the_cirle] in the console
|
19
|
+
|
20
|
+
puts "c attach: #{c.attach}" # prints [:the_box] in the console
|
21
|
+
puts "c attached: #{c.attached}" # prints [:box_14] in the console as there's no child
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
b = box({ id: :the_box })
|
4
|
+
b.data(:canyouwritethis)
|
5
|
+
b.rotate(33)
|
6
|
+
b.rotate(88)
|
7
|
+
b.rotate(99)
|
8
|
+
b.rotate(12)
|
9
|
+
b.rotate(6)
|
10
|
+
b.data
|
11
|
+
b.touch(true) do
|
12
|
+
b.data(:super)
|
13
|
+
b.data
|
14
|
+
box_data_write_history=b.history({ operation: :write, id: :the_box, particle: :data })
|
15
|
+
puts "get data write operation : #{box_data_write_history}"
|
16
|
+
box_data_read_history=b.history({ operation: :read, id: :the_box, particle: :data })
|
17
|
+
puts "get data read operation : #{box_data_read_history}"
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
box_rotate_history=b.history({ operation: :write, id: :the_box, particle: :rotate })
|
23
|
+
puts "get all all rotate write operation : #{box_rotate_history}"
|
24
|
+
|
25
|
+
# we check if an operation synced (that means saved on atome's server)
|
26
|
+
puts "first rotate operation state : #{box_rotate_history[0]}"
|
27
|
+
|
28
|
+
box_data_history=b.history({ operation: :write, id: :the_box, particle: :data })
|
29
|
+
puts "get data write operation : #{box_data_history}"
|
30
|
+
|
31
|
+
|
@@ -0,0 +1,113 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
b = box({ id: :the_html, color: :orange, overflow: :auto, width: :auto, height: :auto, left: 100, right: 100, top: 100, bottom: 100 })
|
4
|
+
# html_desc=<<STR
|
5
|
+
# <!DOCTYPE html>
|
6
|
+
# <html>
|
7
|
+
# <head>
|
8
|
+
# <title>Une petite page HTML</title>
|
9
|
+
# <meta charset="utf-8" />
|
10
|
+
# </head>
|
11
|
+
# <body>
|
12
|
+
# <h1 id='title' style='color: yellowgreen'>Un titre de niveau 1</h1>
|
13
|
+
#
|
14
|
+
# <p>
|
15
|
+
# Un premier petit paragraphe.
|
16
|
+
# </p>
|
17
|
+
#
|
18
|
+
# <h2>Un titre de niveau 2</h2>
|
19
|
+
#
|
20
|
+
# <p>
|
21
|
+
# Un autre paragraphe contenant un lien pour aller
|
22
|
+
# sur le site <a href="http://koor.fr">KooR.fr</a>.
|
23
|
+
# </p>
|
24
|
+
# </body>
|
25
|
+
# </html>
|
26
|
+
# STR
|
27
|
+
html_desc = <<STR
|
28
|
+
<!DOCTYPE html>
|
29
|
+
<html lang="fr">
|
30
|
+
<head>
|
31
|
+
<meta charset="UTF-8">
|
32
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
33
|
+
<title>Com 1 Image</title>
|
34
|
+
<style>
|
35
|
+
body { font-family: Arial, sans-serif; margin: 0; padding: 0; }
|
36
|
+
header { display: flex; justify-content: space-between; align-items: center; padding: 20px; }
|
37
|
+
nav { display: none; }
|
38
|
+
.section { padding: 50px 20px; text-align: center;z-index: 3 }
|
39
|
+
.contact-info { text-align: left; }
|
40
|
+
@media (min-width: 768px) {
|
41
|
+
nav { display: block; }
|
42
|
+
}
|
43
|
+
</style>
|
44
|
+
<style>
|
45
|
+
.ok-info { text-align: left; }
|
46
|
+
@media (min-width: 768px) {
|
47
|
+
nav { display: block; }
|
48
|
+
}
|
49
|
+
</style>
|
50
|
+
</head>
|
51
|
+
<body>
|
52
|
+
|
53
|
+
<header>
|
54
|
+
<button>☰</button> <!-- Icône de menu pour mobile -->
|
55
|
+
<h1>Com 1 Image</h1>
|
56
|
+
<nav>
|
57
|
+
<a href="#accueil">Accueil</a>
|
58
|
+
</nav>
|
59
|
+
</header>
|
60
|
+
|
61
|
+
<section id='title' class="section my_class" style='left: 333px;color: yellow'>
|
62
|
+
<h2>PRODUCTIONS AUDIOVISUELLES</h2>
|
63
|
+
<!-- Contenu de la section -->
|
64
|
+
</section>
|
65
|
+
|
66
|
+
<section class="section">
|
67
|
+
<h2>COLLABORATIF</h2>
|
68
|
+
<p>Texte sur le collaboratif...</p>
|
69
|
+
</section>
|
70
|
+
|
71
|
+
<section class="section">
|
72
|
+
<h2>CORPORATE</h2>
|
73
|
+
<div class="communication">
|
74
|
+
<!-- Images et textes liés à la communication -->
|
75
|
+
</div>
|
76
|
+
<div class="publicite">
|
77
|
+
<!-- Images et textes liés à la publicité -->
|
78
|
+
</div>
|
79
|
+
<!-- ... Autres contenus de la section Corporate -->
|
80
|
+
</section>
|
81
|
+
|
82
|
+
<section class="section">
|
83
|
+
<h2>ART</h2>
|
84
|
+
<p>Texte sur l'art...</p>
|
85
|
+
</section>
|
86
|
+
|
87
|
+
<section class="section contact-info">
|
88
|
+
<h2>CONTACT</h2>
|
89
|
+
<p>email@example.com</p>
|
90
|
+
<address>
|
91
|
+
74 bis avenue des Thèmes<br>
|
92
|
+
63400 - Chamalières
|
93
|
+
</address>
|
94
|
+
</section>
|
95
|
+
|
96
|
+
</body>
|
97
|
+
</html>
|
98
|
+
|
99
|
+
STR
|
100
|
+
b.hypertext(html_desc)
|
101
|
+
|
102
|
+
# b.hyperedit(id) do |html_object|
|
103
|
+
# id convert to atome
|
104
|
+
# get tage type convert to markup
|
105
|
+
# get tag content convert to data
|
106
|
+
# get style and class convert to particle
|
107
|
+
# end
|
108
|
+
b.hyperedit(:title) do |tag_desc|
|
109
|
+
puts tag_desc
|
110
|
+
end
|
111
|
+
|
112
|
+
# TODO : create an html to atome converter
|
113
|
+
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
t = text :hello
|
4
|
+
t.left(99)
|
5
|
+
|
6
|
+
t.edit(true)
|
7
|
+
|
8
|
+
t.keyboard(:press) do |native_event|
|
9
|
+
event = Native(native_event)
|
10
|
+
puts "press : #{event[:key]} : #{event[:keyCode]}"
|
11
|
+
end
|
12
|
+
|
13
|
+
t.keyboard(:down) do |native_event|
|
14
|
+
event = Native(native_event)
|
15
|
+
if event[:keyCode].to_s == '13'
|
16
|
+
event.preventDefault()
|
17
|
+
t.color(:red)
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
t.keyboard(:up) do |native_event|
|
23
|
+
event = Native(native_event)
|
24
|
+
puts "up!!"
|
25
|
+
end
|
26
|
+
|
27
|
+
t.keyboard(true) do |native_event|
|
28
|
+
event = Native(native_event)
|
29
|
+
puts " true => #{event[:keyCode]}"
|
30
|
+
puts "true => #{event[:key]}"
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
# t.keyboard(:input) do |native_event|
|
35
|
+
# event = Native(native_event)
|
36
|
+
# puts event
|
37
|
+
# end
|
38
|
+
|
39
|
+
# t.keyboard(:keydown) do |native_event|
|
40
|
+
# event = Native(native_event)
|
41
|
+
# puts "down : #{event[:keyCode]}"
|
42
|
+
# end
|
43
|
+
|
44
|
+
c = circle({ top: 123, left: 0, width: 55, height: 55 })
|
45
|
+
c2 = circle({ top: 123, left: 80, width: 55, height: 55 })
|
46
|
+
c3 = circle({ top: 123, left: 150, width: 55, height: 55 })
|
47
|
+
|
48
|
+
c.touch(true) do
|
49
|
+
text({ data: 'stop up', top: 150 })
|
50
|
+
t.keyboard({ remove: :up })
|
51
|
+
end
|
52
|
+
c2.touch(true) do
|
53
|
+
text({ data: 'remove all', top: 150 })
|
54
|
+
t.keyboard(:remove)
|
55
|
+
end
|
56
|
+
c3.touch(true) do
|
57
|
+
t.edit(false)
|
58
|
+
text({ data: 'stop editing', top: 150 })
|
59
|
+
end
|