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,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'atome/renderers/html/effect'
|
4
|
-
require 'atome/renderers/html/event'
|
5
|
-
require 'atome/renderers/html/geometry'
|
6
|
-
require 'atome/renderers/html/identity'
|
7
|
-
require 'atome/renderers/html/spatial'
|
8
|
-
require 'atome/renderers/html/atome'
|
9
|
-
require 'atome/renderers/html/utility'
|
10
|
-
|
11
|
-
# #html object
|
12
|
-
class Html
|
13
|
-
def initialize
|
14
|
-
html = `document.createElement("div")`
|
15
|
-
`document.body.appendChild(#{html})`
|
16
|
-
`document.body.appendChild(#{html})`
|
17
|
-
@html = html
|
18
|
-
end
|
19
|
-
|
20
|
-
def add_class(class_to_add)
|
21
|
-
`#{@html}.classList.add(#{class_to_add})`
|
22
|
-
end
|
23
|
-
|
24
|
-
def attr(attribute, value)
|
25
|
-
`#{@html}.setAttribute(#{attribute}, #{value})`
|
26
|
-
end
|
27
|
-
|
28
|
-
def style
|
29
|
-
# `#{@html}.style`
|
30
|
-
end
|
31
|
-
def append_shape(parent)
|
32
|
-
parent_found = `document.getElementById(#{parent})`
|
33
|
-
parent_found
|
34
|
-
`#{parent_found}.appendChild(#{@html})`
|
35
|
-
end
|
36
|
-
def append_color(parent)
|
37
|
-
"color : #{parent.class}"
|
38
|
-
end
|
39
|
-
def append_to(_node)
|
40
|
-
|
41
|
-
end
|
42
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
generator = Genesis.generator
|
4
|
-
|
5
|
-
generator.build_render(:html_type) do |params|
|
6
|
-
send("html_#{params}", user_proc)
|
7
|
-
end
|
8
|
-
|
9
|
-
generator.build_render(:html_parents) do |parents_found|
|
10
|
-
type_found = @atome[:type]
|
11
|
-
parents_found.each do |parent_found|
|
12
|
-
@html_object.send("append_#{type_found}", parent_found)
|
13
|
-
end
|
14
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
generator = Genesis.generator
|
4
|
-
|
5
|
-
# generator.build_render(:html_left) do |_value, user_proc|
|
6
|
-
# instance_exec(&user_proc) if user_proc.is_a?(Proc)
|
7
|
-
# end
|
8
|
-
#
|
9
|
-
# generator.build_option(:pre_get_left) do
|
10
|
-
# user_proc = @user_proc
|
11
|
-
# instance_exec(&user_proc) if user_proc.is_a?(Proc)
|
12
|
-
# end
|
13
|
-
|
14
|
-
generator.build_render(:html_left) do |value, _user_proc|
|
15
|
-
@html_object.style[:left] = "#{value}px" unless @html_type == :style
|
16
|
-
end
|
17
|
-
|
18
|
-
generator.build_render(:html_right) do |value, _user_proc|
|
19
|
-
@html_object.style[:right] = "#{value}px" unless @html_type == :style
|
20
|
-
end
|
21
|
-
|
22
|
-
generator.build_render(:html_top) do |value, _user_proc|
|
23
|
-
@html_object.style[:top] = "#{value}px" unless @html_type == :style
|
24
|
-
end
|
25
|
-
|
26
|
-
generator.build_render(:html_bottom) do |value, _user_proc|
|
27
|
-
@html_object.style[:bottom] = "#{value}px" unless @html_type == :style
|
28
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
generator = Genesis.generator
|
4
|
-
generator.build_render(:html_bloc)
|
5
|
-
generator.build_render(:html_id)
|
6
|
-
generator.build_render(:html_render)
|
7
|
-
generator.build_render(:html_delete) do
|
8
|
-
html_object&.remove
|
9
|
-
end
|
10
|
-
generator.build_render(:html_clear) do
|
11
|
-
@atome[:children].each do |child_found|
|
12
|
-
grab(child_found).html_object&.remove
|
13
|
-
end
|
14
|
-
children([])
|
15
|
-
end
|
16
|
-
generator.build_render(:html_schedule)
|
17
|
-
generator.build_render(:html_reader)
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
def wait(seconds, &proc)
|
4
|
-
if seconds == :kill
|
5
|
-
abort
|
6
|
-
else
|
7
|
-
seconds = seconds.to_f
|
8
|
-
after seconds, &proc if proc.instance_of?(Proc)
|
9
|
-
end
|
10
|
-
|
11
|
-
end
|
12
|
-
|
13
|
-
def repeater(counter, proc)
|
14
|
-
instance_exec(counter, &proc) if proc.is_a?(Proc)
|
15
|
-
end
|
16
|
-
|
17
|
-
def repeat(delay = 1, repeat = 0, &proc)
|
18
|
-
# below we exec the call a first time
|
19
|
-
instance_exec(0, &proc) if proc.is_a?(Proc)
|
20
|
-
# as we exec one time above we subtract one below
|
21
|
-
`
|
22
|
-
var x = 1
|
23
|
-
var intervalID = window.setInterval(function(){ Opal.Object.$repeater(x,#{proc})
|
24
|
-
if (++x ===#{repeat} ) {
|
25
|
-
window.clearInterval(intervalID);
|
26
|
-
}}, #{delay * 1000})
|
27
|
-
`
|
28
|
-
end
|
29
|
-
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Add on the Atome class
|
4
|
-
class Atome
|
5
|
-
def ping(my_proc = false)
|
6
|
-
instance_exec(my_proc) if my_proc.is_a?(Proc)
|
7
|
-
|
8
|
-
` var p = new Ping();
|
9
|
-
p.ping('https://'+#{address}+'', function (err, data) {
|
10
|
-
if (err) {
|
11
|
-
return false;
|
12
|
-
} else {
|
13
|
-
console.log("the site "+#{address}+" is up!");
|
14
|
-
}
|
15
|
-
});
|
16
|
-
`
|
17
|
-
end
|
18
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Rendering method here
|
4
|
-
class Atome
|
5
|
-
private
|
6
|
-
|
7
|
-
def rendering(element,params, &user_proc)
|
8
|
-
# params=instance_variable_get("@#{element}")
|
9
|
-
render_engines = @atome[:renderers]
|
10
|
-
render_engines.each do |render_engine|
|
11
|
-
# puts "rendering : send('#{render_engine}_#{element}', #{params}, &user_proc)"
|
12
|
-
send("#{render_engine}_#{element}", params, &user_proc)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# require 'atome/renderers/server/effect'
|
4
|
-
# require 'atome/renderers/server/event'
|
5
|
-
# require 'atome/renderers/server/geometry'
|
6
|
-
# require 'atome/renderers/server/identity'
|
7
|
-
# require 'atome/renderers/server/material'
|
8
|
-
# require 'atome/renderers/server/spatial'
|
9
|
-
# require 'atome/renderers/server/atome'
|
10
|
-
require 'atome/renderers/server/utility'
|
data/vendor/assets/aui.rb
DELETED
data/vendor/assets/r&d/misc.rb
DELETED
@@ -1,219 +0,0 @@
|
|
1
|
-
|
2
|
-
b=box()
|
3
|
-
# b.x(33)
|
4
|
-
def custom_code val
|
5
|
-
`console.log(#{val})`
|
6
|
-
end
|
7
|
-
|
8
|
-
custom_code "good news for you"
|
9
|
-
# todo change server strategy and use index.html to test server and connect to it if no connection stay use opal
|
10
|
-
require 'application/view_example'
|
11
|
-
# def toto(e)
|
12
|
-
# e.prevent
|
13
|
-
# e.on.inner_text = "Super Clicked!"
|
14
|
-
# end
|
15
|
-
#
|
16
|
-
# $document.on(:mousedown, "#good") do |e|
|
17
|
-
# toto(e)
|
18
|
-
# end
|
19
|
-
# $document.on(:touchstart, "#good") do |e|
|
20
|
-
# toto(e)
|
21
|
-
# end
|
22
|
-
#
|
23
|
-
# verif = <<-STR
|
24
|
-
# $document.ready do
|
25
|
-
# DOM {
|
26
|
-
# div.info {
|
27
|
-
# span.red "Opal eval cooked up!"
|
28
|
-
# }
|
29
|
-
# }.append_to($document.body)
|
30
|
-
# end
|
31
|
-
# STR
|
32
|
-
#
|
33
|
-
# eval(verif)
|
34
|
-
#
|
35
|
-
#
|
36
|
-
# $document.body.style.apply {
|
37
|
-
# background color: 'black'
|
38
|
-
# color 'orange'
|
39
|
-
# font family: 'Verdana'
|
40
|
-
# }
|
41
|
-
# $document.ready do
|
42
|
-
# DOM {
|
43
|
-
# div.info {
|
44
|
-
# i=0
|
45
|
-
# while i< 20
|
46
|
-
# i+=1
|
47
|
-
# span(id: "good").red "Opal cooked up, click me #{i}"
|
48
|
-
# div(id: "hook").red "lllll#{i} --"
|
49
|
-
# end
|
50
|
-
# }
|
51
|
-
# }.append_to($document["user_view"])
|
52
|
-
#
|
53
|
-
# # alert($document.body.id)
|
54
|
-
# # $document.getElementById("hook").style.color("red")
|
55
|
-
# # bb=$document.find('header')
|
56
|
-
# bb=`document.getElementById('hook')`
|
57
|
-
# # a= $document.get_element_by_id(:hook)
|
58
|
-
# a= $document[:hook]
|
59
|
-
#
|
60
|
-
# elem = $document.at_css(".red").style(color: :yellow)
|
61
|
-
#
|
62
|
-
# $document.on :click do |e|
|
63
|
-
# elem.style(color: :yellowgreen)
|
64
|
-
# # elem.style.apply {
|
65
|
-
# # background color: 'blue'
|
66
|
-
# # color 'green'
|
67
|
-
# # font family: 'Verdana'
|
68
|
-
# # }
|
69
|
-
# # a.style.apply {
|
70
|
-
# # background color: 'red'
|
71
|
-
# # color 'black'
|
72
|
-
# # font family: 'Verdana'
|
73
|
-
# # }
|
74
|
-
# end
|
75
|
-
#
|
76
|
-
# # bb =$document.id='hook'
|
77
|
-
# # bb= $document["hook"]
|
78
|
-
# # bb.on.inner_text"jsqhdgfjqhsdgfjqhsgdjhqsg Clicked!"
|
79
|
-
# # bb.style.apply {
|
80
|
-
# # background color: 'black'
|
81
|
-
# # color 'orange'
|
82
|
-
# # font family: 'Verdana'
|
83
|
-
# # }
|
84
|
-
#
|
85
|
-
# end
|
86
|
-
#
|
87
|
-
# $document.body.style.apply {
|
88
|
-
# background color: 'black'
|
89
|
-
# color 'orange'
|
90
|
-
# font family: 'Verdana'
|
91
|
-
# }
|
92
|
-
#
|
93
|
-
#
|
94
|
-
# def box(params={})
|
95
|
-
# DOM do
|
96
|
-
# el=div(id: "hook")
|
97
|
-
# el( ",jb,jb")
|
98
|
-
# end.append_to($document["user_view"])
|
99
|
-
#
|
100
|
-
# end
|
101
|
-
#
|
102
|
-
# box
|
103
|
-
#
|
104
|
-
# e=$document.at_css("#hook")
|
105
|
-
# e.style { background color: 'lime' }
|
106
|
-
# $document.at_css("#hook").style(color: :red)
|
107
|
-
# # Example 2
|
108
|
-
# DOM do
|
109
|
-
# div(id: "hook").red "lllll"
|
110
|
-
# div(id: "poil").red "kool"
|
111
|
-
# end.append_to($document["user_view"])
|
112
|
-
# elem = $document.css("#poil").style(color: :orange)
|
113
|
-
#
|
114
|
-
# # #Example 3
|
115
|
-
# def box(params = {})
|
116
|
-
# params = { color: :pink, width: 100, height: 100 }.merge(params)
|
117
|
-
# DOM do
|
118
|
-
# div(id: "hook",
|
119
|
-
# class: :toto,
|
120
|
-
# style: "background-color: #{params[:color]};
|
121
|
-
# width: #{params[:width]}px;
|
122
|
-
# height: #{params[:height]}px;
|
123
|
-
# box-shadow: #{params[:shadow]};
|
124
|
-
# ")
|
125
|
-
# .the_class
|
126
|
-
# end.append_to($document["user_view"])
|
127
|
-
# end
|
128
|
-
#
|
129
|
-
# window_height= $window.view.height/12
|
130
|
-
# window_width= $window.view.width/12
|
131
|
-
# box({ color: :green, shadow: "0px 0px 10px black;" })
|
132
|
-
# $document.body['foo'] = 'bar'
|
133
|
-
#
|
134
|
-
#
|
135
|
-
# $window.on :resize do |e|
|
136
|
-
# puts $window.view.height
|
137
|
-
# puts $window.view.width
|
138
|
-
# puts "------"
|
139
|
-
# # alert $document.body.width
|
140
|
-
# end
|
141
|
-
#
|
142
|
-
# puts $document.search('div').size
|
143
|
-
# # $document.search('div')['foo'] = 'bar'
|
144
|
-
#
|
145
|
-
#
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
# require 'browser/socket'
|
150
|
-
|
151
|
-
ws =Browser::Socket.new 'ws://127.0.0.1:9292'
|
152
|
-
ws.on :open do
|
153
|
-
end
|
154
|
-
|
155
|
-
ws.on :message do |e|
|
156
|
-
puts "message received from websocket#{ e.data}"
|
157
|
-
end
|
158
|
-
|
159
|
-
|
160
|
-
def send_message(socket,msg)
|
161
|
-
if socket.alive?
|
162
|
-
socket.send(msg )
|
163
|
-
else
|
164
|
-
after 0.1 do
|
165
|
-
send_message(socket,msg)
|
166
|
-
end
|
167
|
-
end
|
168
|
-
|
169
|
-
end
|
170
|
-
|
171
|
-
my_msg={ foo: "bar" }
|
172
|
-
my_msg=JSON.generate(my_msg)
|
173
|
-
send_message(ws,my_msg)
|
174
|
-
# aa=Digest::SHA1.hexdigest "foo"
|
175
|
-
# alert aa
|
176
|
-
# if RUBY_ENGINE.downcase == 'opal'
|
177
|
-
# puts "ok"
|
178
|
-
# # require 'atome/extensions/sha_opal.rb'
|
179
|
-
# else
|
180
|
-
# require 'atome/extensions/sha_ruby.rb'
|
181
|
-
# puts "pas ok"
|
182
|
-
#
|
183
|
-
# end
|
184
|
-
|
185
|
-
|
186
|
-
# if RUBY_ENGINE.downcase != 'opal'
|
187
|
-
# alert :no
|
188
|
-
# else
|
189
|
-
# alert :good
|
190
|
-
# end
|
191
|
-
|
192
|
-
# alert calculate_sha("jeezs")
|
193
|
-
puts "hellodf=lkjsmlfkjmhljsmfglhkjmflghkjdmlfgkjhmslkfgjh".to_i(36)
|
194
|
-
|
195
|
-
puts "foo".hash
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
# require 'browser/database/sql'
|
201
|
-
#
|
202
|
-
# db = Browser::Database::SQL.new 'test'
|
203
|
-
# db.transaction {|t|
|
204
|
-
# t.query('CREATE TABLE test(ID INTEGER PRIMARY KEY ASC, text TEXT)').then {
|
205
|
-
# t.query('INSERT INTO test (id, text) VALUES(?, ?)', 1, 'huehue')
|
206
|
-
# }.then {
|
207
|
-
# t.query('INSERT INTO test (id, text) VALUES(?, ?)', 2, 'jajaja')
|
208
|
-
# }.then {
|
209
|
-
# t.query('SELECT * FROM test')
|
210
|
-
# }.then {|r|
|
211
|
-
# r.each {|row|
|
212
|
-
# alert row.inspect
|
213
|
-
# }
|
214
|
-
# }
|
215
|
-
# }
|
216
|
-
|
217
|
-
|
218
|
-
puts "Universe identity is : #{Universe.app_identity}"
|
219
|
-
# alert Atome.aui
|
data/vendor/assets/r&d/ping.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
|
2
|
-
`function addElement (width) {
|
3
|
-
// crée un nouvel élément div
|
4
|
-
var newDiv = document.createElement("div");
|
5
|
-
// et lui donne un peu de contenu
|
6
|
-
var newContent = document.createTextNode('Hi there and greetings!');
|
7
|
-
// ajoute le nœud texte au nouveau div créé
|
8
|
-
newDiv.appendChild(newContent);
|
9
|
-
newDiv.id='div1';
|
10
|
-
|
11
|
-
// ajoute le nouvel élément créé et son contenu dans le DOM
|
12
|
-
var currentDiv = document.getElementById('div1');
|
13
|
-
document.body.insertBefore(newDiv, currentDiv);
|
14
|
-
}
|
15
|
-
|
16
|
-
addElement();
|
17
|
-
|
18
|
-
|
19
|
-
var selectedRow = document.querySelector('div#div1');
|
20
|
-
selectedRow.style.color = 'black';
|
21
|
-
selectedRow.style.backgroundColor = 'orange';`
|
@@ -1,40 +0,0 @@
|
|
1
|
-
const atomeCommunication = {
|
2
|
-
controller_sender: function (msg) {
|
3
|
-
var json_msg = JSON.parse(msg);
|
4
|
-
|
5
|
-
if (window.webkit) {
|
6
|
-
try {
|
7
|
-
window.webkit.messageHandlers.toggleMessageHandler.postMessage(json_msg);
|
8
|
-
} catch (error) {
|
9
|
-
console.log('no server, unable to post message')
|
10
|
-
}
|
11
|
-
|
12
|
-
} else {
|
13
|
-
try {
|
14
|
-
window.chrome.webview.postMessage(json_msg);
|
15
|
-
} catch (error) {
|
16
|
-
console.log('no server, unable to post message')
|
17
|
-
}
|
18
|
-
}
|
19
|
-
},
|
20
|
-
controller_listener: function () {
|
21
|
-
if (window.webkit) {
|
22
|
-
try {
|
23
|
-
///
|
24
|
-
} catch (error) {
|
25
|
-
console.log('no server, unable to receive message')
|
26
|
-
}
|
27
|
-
} else {
|
28
|
-
|
29
|
-
try {
|
30
|
-
window.chrome.webview.addEventListener('message', arg => {
|
31
|
-
Opal.Object.$response_listener(arg.data)
|
32
|
-
});
|
33
|
-
} catch (error) {
|
34
|
-
console.log('no server, unable to receive message')
|
35
|
-
}
|
36
|
-
|
37
|
-
|
38
|
-
}
|
39
|
-
},
|
40
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
alert("good!! doody kooly!!")
|
@@ -1,63 +0,0 @@
|
|
1
|
-
######### demos
|
2
|
-
# we create a code container
|
3
|
-
element({id: :code_container, data: :empty})
|
4
|
-
puts "Attention this method only work with a server due to security restriction "
|
5
|
-
demo_container = grab('intuition').box({id: :demo_container,left: 0, overflow: :scroll, height: 567})
|
6
|
-
clearer = grab('intuition').circle({top: 3, left: 3, width: 39, height: 39, color: :orange, id: :debugger})
|
7
|
-
view_code = grab('intuition').circle({top: 3, left: 99, width: 39, height: 39, color: :red, id: :clearer})
|
8
|
-
# view=grab(:view)
|
9
|
-
view_code.touch(true) do
|
10
|
-
code=grab(:code_container).data
|
11
|
-
grab(:view).text({ data: code, width: :auto, height: 333, left: :auto, depth: 33, right: 0, overflow: :scroll })
|
12
|
-
end
|
13
|
-
|
14
|
-
clearer.touch(true) do
|
15
|
-
grab(:view).clear(true)
|
16
|
-
# atomes_found=[]
|
17
|
-
# Universe.atomes.each do |atome_id_found, _atome_content_found|
|
18
|
-
# atomes_found << atome_id_found
|
19
|
-
# end
|
20
|
-
end
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
context=grab(:view)
|
25
|
-
demo_container.read('rubies/demos_list.rb') do |demos_found|
|
26
|
-
# we eval the demo list
|
27
|
-
eval demos_found
|
28
|
-
demos_list.each_with_index do |demo, index|
|
29
|
-
current_demo=demo_container.text ({ data: demo, top: 16*index, left: 12, visual: {size: 12} })
|
30
|
-
current_demo.touch(true) do
|
31
|
-
#TODO : create a ruby method for console clear
|
32
|
-
`console.clear()`
|
33
|
-
puts atome_infos
|
34
|
-
puts "current demo: #{demo}"
|
35
|
-
context.clear(true)
|
36
|
-
# atomes_attached=context.attached
|
37
|
-
users_atomes=[]
|
38
|
-
Universe.atomes.each do |k, _v|
|
39
|
-
users_atomes << k
|
40
|
-
end
|
41
|
-
|
42
|
-
# puts "=> before > atomes attached : #{atomes_attached}"
|
43
|
-
# puts "==-> before > users_atomes : #{users_atomes}"
|
44
|
-
|
45
|
-
# we delete/clear the prev scene
|
46
|
-
# atomes_attached.each do |atome_id_found|
|
47
|
-
# unless atome_id_found == :view_color
|
48
|
-
# atome_found=grab(atome_id_found)
|
49
|
-
# atome_found.delete(true) if atome_found
|
50
|
-
# end
|
51
|
-
# end
|
52
|
-
# we eval the demo content
|
53
|
-
demo_container.read('rubies/examples/'+demo) do |demo_requested|
|
54
|
-
grab(:view).eval demo_requested
|
55
|
-
grab(:code_container).data(demo_requested)
|
56
|
-
end
|
57
|
-
# puts "=> after >atomes attached : #{atomes_attached}"
|
58
|
-
# puts "==-> after > users_atomes : #{users_atomes}"
|
59
|
-
|
60
|
-
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
my_video = Atome.new(
|
4
|
-
video: { renderers: [:browser], id: :video1, type: :video, attach: [:view],
|
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(3)
|
11
|
-
puts "play : #{my_video.play}, pause : #{my_video.pause}"
|
12
|
-
end
|
13
|
-
|
14
|
-
stoper = lambda do
|
15
|
-
my_video.pause(true)
|
16
|
-
end
|
17
|
-
|
18
|
-
jumper=lambda do
|
19
|
-
my_video.play(12)
|
20
|
-
end
|
21
|
-
|
22
|
-
my_video.markers({ markers: { begin: 6, code: jumper } })
|
23
|
-
|
24
|
-
my_video.add({ markers: { my_stop: { begin: 16, code: stoper } }, left: 33 })
|
@@ -1,81 +0,0 @@
|
|
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: [:browser], 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 })
|
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
|
-
|